A method, device, computer equipment and storage medium for processing game progress

By obtaining and updating the total load score of the game game process in the game process processing method, selecting the process with the lowest load to handle the game game creation request, the load balancing problem caused by process load differences in large online games is solved, and load balancing and resource isolation of the process cluster are realized.

CN115430137BActive Publication Date: 2025-04-04NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211098147.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-08
Publication Date
2025-04-04
Estimated Expiration
2042-09-08

AI Technical Summary

Technical Problem

In large online games, the load of the game game process changes rapidly, and the center management process allocates the game game process based on outdated load information, resulting in large load differences among the processes in the process cluster, affecting load balancing.

Method used

By receiving game game creation requests, we obtain the total load scores of each game game process in the current process cluster, select the target game game process that handles game game creation requests from the process cluster based on the total load score, and create the target game game through the target game game process to update its total load score.

Benefits of technology

It realizes load balancing of each process in the process cluster, ensures that the processing resources in the server are isolated and supports the normal operation of the application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115430137B_ABST
    Figure CN115430137B_ABST
Patent Text Reader

Abstract

The disclosed embodiment discloses a method, device, computer equipment and storage medium for processing a game process. The solution calculates the single-game load scores of different types of game battles in advance according to the type of game battle and the load information of the game battle, and uses the load score as the load standard of the game battle. When a battle creation request is received, according to the total load score of the game battles in each battle process in the battle cluster, a target battle process with the lowest total load score is selected from the battle cluster, and the target battle process responds to the battle creation request and creates a game battle, thereby achieving load balancing of each process in the process cluster.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a method, device, computer equipment and storage medium for processing a game process. Background Art

[0002] With the rapid development of online games, the number of game players is increasing. In large-scale online games, it is necessary to process game requests initiated by multiple players at the same time. Using game match process clusters to provide online game services can improve the response speed to multiple game requests.

[0003] In the related art, multiple game match processes in a game match process cluster are managed by a central management process, and each game match process periodically reports its own load information to the central management process. When receiving a game request from a player, the central management process allocates a game match process with a lower load to the player based on the received load information of each game match process. However, the load of the game match process changes rapidly, and the central management process allocates a game match process to the player based on outdated load information, resulting in a large difference in the load of each process in the process cluster, thereby affecting the load balancing between the processes. Summary of the invention

[0004] The embodiments of the present disclosure provide a method, apparatus, computer device, and storage medium for processing a game process, which can ensure the isolation of processing resources in a server and the normal operation of an application program.

[0005] The present disclosure provides a method for processing a game process, including:

[0006] Receive game match creation request;

[0007] Obtaining a total load score of each game match process in the current process cluster, wherein each game match process is used to process at least one game match, and the total load score of each game match process is determined according to a load score corresponding to the game match processed by the current game match process;

[0008] Selecting a target game match process for processing the game match creation request from the process cluster based on the total load score;

[0009] A target game match is created through the target game match process, and the total load score of the target game match process is updated based on the load score of the target game match.

[0010] Accordingly, the embodiment of the present disclosure further provides a device for processing a game process, including:

[0011] A receiving unit, used for receiving a game match creation request;

[0012] A first acquisition unit is used to acquire a total load score of each game match process in the current process cluster, wherein each game match process is used to process at least one game match, and the total load score of each game match process is determined according to the load score corresponding to the game match processed by the current game match process;

[0013] A selection unit, configured to select a target game match process for processing the game match creation request from the process cluster based on the total load score;

[0014] A creation unit is used to create a target game match through the target game match process, and update the total load score of the target game match process based on the load score of the target game match.

[0015] Correspondingly, an embodiment of the present disclosure further provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes any method for processing a game process provided in any embodiment of the present disclosure.

[0016] Correspondingly, the embodiment of the present disclosure further provides a storage medium, which stores a plurality of instructions, and the instructions are suitable for loading by a processor to execute the above-mentioned method for processing the game process.

[0017] The disclosed embodiment calculates the single-game load scores of different types of game battles in advance according to the types of game battles and the load information of the game battles, and uses the load scores as the load standards for the game battles. When a battle creation request is received, the target battle process with the lowest total load score is selected from the battle cluster according to the total load scores of the game battles in each battle process in the battle cluster, and the game battle is created by responding to the battle creation request through the target battle process. In this way, load balancing of each process in the process cluster can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0019] Figure 1 A flowchart of a method for processing a game process provided by an embodiment of the present disclosure.

[0020] Figure 2 A flowchart of another method for processing a game process provided in an embodiment of the present disclosure.

[0021] Figure 3A schematic diagram of an application scenario of a method for processing a game process provided in an embodiment of the present disclosure.

[0022] Figure 4 A structural block diagram of a device for processing a game process provided in an embodiment of the present disclosure.

[0023] Figure 5 A schematic diagram of the structure of a computer device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0024] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.

[0025] The embodiments of the present disclosure provide a method, device, storage medium and computer equipment for processing a game process. Specifically, the method for processing a game process in the embodiments of the present disclosure can be executed by a computer device, wherein the computer device can be a server or other device. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.

[0026] For example, the computer device may be a server that can receive a game match creation request; obtain the total load score of each game match process in the current process cluster, wherein each game match process is used to process at least one game match, and the total load score of each game match process is determined according to the load score corresponding to the game match processed by the current game match process; select a target game match process for processing the game match creation request from the process cluster based on the total load score; create a target game match through the target game match process, and update the total load score of the target game match process based on the load score of the target game match.

[0027] Based on the above problems, the embodiments of the present disclosure provide a method, apparatus, computer device and storage medium for processing a game process, which can achieve load balancing of each process in a process cluster.

[0028] It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments.

[0029] The embodiment of the present disclosure provides a method for processing a game process, which can be executed by a terminal or a server. The embodiment of the present disclosure takes the method for processing a game process executed by a server as an example for explanation.

[0030] like Figure 1 As shown, Figure 1 The following is a flowchart of a method for processing a game process provided by an embodiment of the present disclosure. The specific process of the method for processing a game process may be as follows:

[0031] 101. Receive a game match creation request.

[0032] In the disclosed embodiment, the game match creation request indicates the creation of a game match. The game match creation request may be sent by a player client, and the game match creation request may include the game type of the game match to be created. The game match may be a game in which game players play against each other, and the game type may be a 1V1, 2V2 game match type, etc.

[0033] Specifically, the game server may receive a game match creation request sent by a player client.

[0034] 102. Obtain the total load score of each game process in the current process cluster.

[0035] Among them, the process cluster refers to the server used to process game matches. Due to the large number of online players, the number of game matches that the process cluster needs to process simultaneously increases accordingly. Therefore, multiple game match processes can be set in the process cluster. Each game match process is used to process at least one game match. In other words, multiple game matches that need to be processed simultaneously are assigned to each game match process for processing.

[0036] For example, a process cluster includes: game match process 1, game match process 2, game match process 3, etc. Each game match process can handle different game matches at the same time.

[0037] Among them, the total load score of each game match process is determined according to the load score corresponding to the game match processed by the current game match process.

[0038] In the disclosed embodiment, in order to avoid evaluating the load of a game game process based solely on the load information of the game game process, which would affect the accuracy of the load result evaluation, this solution determines the total load score of the game game process based on the load information of the game game process and in combination with the game types of each game game processed by the game game process, so as to obtain an accurate load evaluation result.

[0039] In some embodiments, in order to improve the accuracy of the load judgment of the game match process, the step of "the total load score of each game match process is determined according to the load score corresponding to the game match processed by the current game match process" may include the following operations:

[0040] Determining at least one ongoing game match currently being processed by the game match process;

[0041] Determine a load score of the ongoing game match according to the game type of the ongoing game match;

[0042] The total load score of the game match process is determined based on the load score of the ongoing game match.

[0043] Among them, the ongoing game match refers to the game match being processed by the game match process. For example, the game match currently being processed by the game match process 1 may include: the first ongoing game match, the second ongoing game match, etc.

[0044] In the disclosed embodiments, game matches may include multiple types, namely match types. Load scores corresponding to game matches of different match types may be set according to different match types. The load score refers to the load score of a single game match. A higher load score indicates a higher load of the single game, and a lower load score indicates a lower load of the single game.

[0045] In some embodiments, before the step of “determining the load score of the ongoing game match according to the game type of the ongoing game match”, the following steps may also be included:

[0046] Obtain load information corresponding to game games of a preset game type processed by each game game process in the process cluster, and the game number of game games of the preset game type processed by each game game process;

[0047] Based on the number of game match processes in the process cluster, load information, and match times, calculate the load score corresponding to the preset match type;

[0048] In the disclosed embodiment, before the game is launched, a stress test can be performed on each game type in the game, and the load score corresponding to each game type of game can be determined according to the stress test result. Among them, the preset game type refers to the game type set during the game development process, and the preset game type can include multiple types, such as the first game type, the second game type, the third game type, etc.

[0049] Among them, stress testing refers to the use of a large number of robot scripts to simulate player behavior during game development and perform stress testing of high-concurrency battles. In the disclosed embodiment, for each preset game type, multiple rounds of stress testing are performed to obtain the load score of each preset game type based on the stress testing results.

[0050] Specifically, stress testing of game matches of each preset game type may be performed by respectively creating multiple game matches of each preset game type in multiple game match processes of a process cluster, and then after the multiple game matches are completed, counting load information of each game match process in the process cluster and the number of game matches of each preset game type processed by each game match process.

[0051] Then, based on the number of game match processes in the process cluster, the load information of each game match process, and the number of game matches of each preset match type processed by each game match process, the load score corresponding to each preset match type is calculated.

[0052] For example, the game match processes included in the process cluster are: game match process 1, game match process 2, and game match process 3. Performing stress testing on a game match of the first match type includes: creating n game matches of the first match type in game match process 1, creating m game matches of the first match type in game match process 2, and creating x game matches of the first match type in game match process 3.

[0053] Further, after each game match is completed, the load information of game match process 1 may be obtained as load value a, the load information of game match process 2 may be obtained as load value b, and the load information of game match process 3 may be obtained as load value c. Then, the single-game load score of the game match of the first game type is calculated according to the number of processes in the process cluster: 3, the load information of each game match process, and the number of game matches processed by each game match process. The load scores corresponding to each preset game type can also be calculated in the above manner.

[0054] In some embodiments, the step of “calculating the load score corresponding to the preset game type based on the number of game game processes in the process cluster, load information, and game rounds” may include the following process:

[0055] Calculate the load value corresponding to a single game match processed by each game match process according to the load information of each game match process and the number of games processed by the game match process;

[0056] The load values ​​corresponding to the single game games processed by each game game process are summed up to obtain a sum value;

[0057] Calculate the ratio of the sum value to the number of processes to get the load score corresponding to the preset game type.

[0058] Specifically, this solution designs a load fraction calculation formula as follows:

[0059]

[0060] Among them, S represents the load score, N represents the number of game match processes in the process cluster, b represents the load value of each game match process, and c represents the number of games of each game match process.

[0061] Specifically, calculate the load value b of each game process i The number of games processed by the game process c i The load value of each game match process processing a single game match is obtained by calculating the ratio of the load value of each game match process processing a single game match, and then the load values ​​of N game match processes processing a single game match are added together to obtain the total load value of N game match processes processing a single game match. Finally, the ratio of the total load value to the number of processes N is calculated to obtain the load score of a single game match process processing a single game match.

[0062] In the disclosed embodiment, based on the data obtained by stress testing the game matches of each preset game type, the single game load score corresponding to each preset game type is calculated according to the above formula. For example, the preset game types include a first game type, a second game type, and a third game type. According to the above stress test and the calculation of the stress test results, the load score corresponding to the game match of the first game type can be: the first load score, the load score corresponding to the game match of the second game type can be: the second load score, and the load score corresponding to the game match of the third game type can be: the third load score.

[0063] In some embodiments, the step of “determining the load score of the ongoing game match according to the game type of the ongoing game match” may include the following operations:

[0064] Determine a target game type corresponding to the ongoing game from preset game types;

[0065] Get the load score of the target game type and obtain the load score of the ongoing game.

[0066] For example, the game type of the ongoing game may be the first game type, and according to the first load score corresponding to the first game type, the load score of the ongoing game is obtained as: the first load score.

[0067] Specifically, the total load score of the game match process is determined based on the load score of the ongoing game match, and the total load score of the game match process can be determined according to the sum of the load scores of each ongoing game match.

[0068] For example, the ongoing game matches in the game match process include: a first ongoing game match, a second ongoing game match, and a third ongoing game match. Among them, the load score of the first ongoing game match can be: a first load score, the load score of the second ongoing game match can be: a second load score, and the load score of the third ongoing game match can be: a first load score, then the total load score of the game match process = the first load score + the second load score + the first load score.

[0069] In some embodiments, in order to achieve unified management of multiple game games in a process cluster, the step of "obtaining the total load score of each game game process in the current process cluster" may include the following operations:

[0070] Sending an information access request for the process cluster to the target database;

[0071] Receive the load score information of the process cluster returned by the target database based on the information access request, and obtain the total load score of each game match process in the process cluster.

[0072] The target database is used to store the load score information of each game process in the process cluster.

[0073] In the disclosed embodiment, a target database is selected as the process management center of the process cluster to manage each game match in the process cluster. The target database can be a Redis database. Redis is a key-value storage system and a cross-platform non-relational database. Redis supports network, memory-based, distributed, and optionally persistent key-value storage databases, and provides application programming interfaces in multiple languages. Redis is often referred to as a data structure server because values ​​can be types such as strings, hashes, lists, sets, and ordered sets. Redis is suitable for processing high-concurrency scenarios, so Redis is selected as the management center of the process cluster.

[0074] Specifically, each game match process in the process cluster is connected to the same Redis, and the load information of each game match process is stored in Redis. After the total load score of each game match process is changed, the changed total load score will be sent to Redis, so that the total load score of each game match process stored in Redis is updated in real time.

[0075] In some embodiments, in order to ensure that accurate load score values ​​of game match processes are stored in Redis, each game match process can periodically detect whether its own total load score is consistent with the total load score recorded on Redis. If the number of inconsistencies accumulates to a certain number, an error log message can be output, and the cause of the inconsistency in the total load score can be analyzed based on the log information, and then the problem can be solved; or, if it is detected that the total load score recorded on Redis is a negative number, the total load score recorded on Redis is updated according to the total load score of the game match process itself.

[0076] On the other hand, Redis includes a database master-slave structure. When the pressure on the database master node is too high, the database slave node is switched to start working. In this way, it can ensure that each game process can work normally in a high-concurrency scenario.

[0077] The information access request indicates access to the load score information of the process cluster, and the load score information may include the total load score of each game match process in the process cluster.

[0078] Specifically, the game server sends an information access request to the target database, and the target database returns the total load score of each game match process in the process cluster to the game server according to the information access request, so that the game server obtains the total load score of each game match process in real time.

[0079] In some embodiments, when a problem occurs in the target database, in order to ensure the normal operation of the process cluster, the method may further include the following steps:

[0080] If the load score information sent by the target database is not received within a specified time period after the information access request for the process cluster is sent to the target database, a game match process is selected from the process cluster as the target game match process.

[0081] When a request times out when the game server sends an information access request to the target database, that is, the game server does not receive a response from the target database within a specified time period after the game server sends the information access request to the target database, there may be a problem with the operation of the target database. In order to ensure the normal operation of the process cluster, you can select any game match process from the process cluster as the target game match process for processing the game match creation request.

[0082] Alternatively, in some embodiments, in order to ensure load balance among the game match processes in the process cluster, the game match process with the smallest load is selected from multiple game match processes as the target game match process.

[0083] In some embodiments, in order to ensure load balancing of the process cluster, before the step of "obtaining the total load score of each game match process in the current process cluster", the method may further include the following steps:

[0084] Get the load value of each game process in the process cluster;

[0085] Calculate the average load value of the process cluster based on the load value of each game process;

[0086] If the average load value is not greater than the first threshold, the step of obtaining the total load score of each game match process in the current process cluster is executed.

[0087] The load value refers to the CPU (Central Processing Unit / Processor) load value.

[0088] In the embodiment of the present disclosure, the process cluster includes a load balancing process, and the load balancing process can be used to calculate the average load value of the process cluster.

[0089] Specifically, the load value of each game process is obtained through the load balancing process, and then the average value is calculated based on the load value of each game process to obtain the load average value of the process cluster. This load average value can be used as the overall load value of the process cluster to reflect the load situation of the process cluster.

[0090] The first threshold may be a preset load threshold, which is used to determine whether the load of the process cluster is too high or too low. If the average load value of the process cluster is less than or equal to the first threshold, it means that the current load of the process cluster is not high, and then the step of obtaining the total load score of each game match process in the current process cluster may be performed.

[0091] If the average load value of the process cluster is greater than the first threshold, it means that the current load of the process cluster is high.

[0092] In some embodiments, when the current load of the process cluster is high, in order to improve the utilization rate of the processes in the process cluster, the method may further include the following steps:

[0093] If the average load value is greater than the first threshold, the load information of each game scene process in the process cluster is obtained;

[0094] Determine a target game scene process based on the game scene process that meets a preset load condition in the load information of each game scene process;

[0095] The target game scene process is converted into a game match process, so that the target game match is created through the target game scene process.

[0096] In the disclosed embodiment, the process cluster also includes at least one game scene process, which is used to process the game scene. Specifically, the game scene process is a process that loads a multiplayer game scene, in which multiple game players may perform activities. One game scene process may process multiple game scenes.

[0097] Among them, the game scene process will also be set with a corresponding load score based on different scene types and the upper limit of the number of people it can carry.

[0098] In the disclosed embodiment, the load balancing strategies for the game scene process and the game match process are different. The game match process is prioritized for load balancing, while the game scene process is prioritized for filling up one process.

[0099] Specifically, when the average load value of the process cluster is greater than the first threshold, the load information of each game scene process in the process cluster can be obtained. The load information of the game scene process can be the CPU load value or load score of the game scene process.

[0100] The preset load condition may be a low load, such as a load of 0. Then, a game scene process with a load of 0 may be selected from the process cluster to obtain a target game scene process.

[0101] In some embodiments, if there are multiple game scene processes that meet the preset load conditions, multiple game scene processes can be selected as target game scene processes, that is, multiple target game scene processes are obtained. However, not all game scene processes in the process cluster will be used as target game scene processes at the same time. According to the process configuration, some game scene processes in the process cluster can be fixed processes for processing game scenes.

[0102] For the selected target game scene process, no new game scene is created, but the target game match is created through the target game scene process. In this way, when the load of the game match process in the process cluster is high, the game scene process with a lower load is switched to the game match process to create a game match.

[0103] In the disclosed embodiment, the game match process includes two types of instances: the first instance and the second instance; the game scene process may also include two types of instances: the third instance and the fourth instance. Ideally, for the game match process, when the first instance is working, the second instance is in a stopped working state, and conversely, when the second instance is working, the first instance is in a stopped working state; for the game scene, when the third instance is working, the fourth instance is in a stopped working state, and conversely, when the fourth instance is working, the third instance is in a stopped working state.

[0104] The instance is also a service object, which is used to process the tasks of the process. For example, for a game match process, the first instance is used to process the game match, and the second instance is used to process the game scene; for a game scene process, the third instance is used to process the game scene, and the fourth instance is used to process the game match.

[0105] Specifically, the above-mentioned creation of the target game match through the target game scene process refers to: switching the third instance in the target game scene process from a working state to a stopped working state, and switching the fourth instance from a stopped working state to a working state, that is, creating the target game match through the fourth instance in the target game scene process, so as to realize the conversion of the target game scene process into a game match process to work, and realize the process utilization in the process cluster.

[0106] Among them, the selection of the target game scene process can be completed on the target database through a specified script, and the specified script can be a Lua (a lightweight and compact scripting language) script.

[0107] In some embodiments, in order to ensure the normal operation of each process in the process cluster, after the step of "creating a target game match through a target game scene process", the method may further include the following steps:

[0108] If the average load value of the process cluster is less than the second threshold, after the target game match is over, the target game scene process is converted into a game scene processing process so that the game scene is processed based on the target game scene process.

[0109] Among them, the second preset value is less than the first threshold. When the average load value of the process cluster is less than the second threshold, it means that the load of the game game process in the process cluster is not high. After the target game game is over, the target game scene process can be restored, that is, the fourth instance in the target game scene process is switched from a working state to a stopped working state, and the third instance is switched from a stopped working state to a working state, and a game scene is created through the third instance.

[0110] In some embodiments, in order to ensure load balancing among multiple process clusters, before the step of "obtaining the total load score of each game match process in the current process cluster", the method may further include the following steps:

[0111] Determine a candidate process cluster from multiple process clusters according to the process cluster corresponding to the player client that sends the game match creation request;

[0112] Get the total load information of the candidate process cluster;

[0113] If the total load information indicates that the load of the candidate process cluster is too high, then obtaining load information of other process clusters in the multiple process clusters;

[0114] Select other process clusters whose load information indicates a lower load from the load information of other process clusters to obtain a target process cluster;

[0115] The player client refers to the client associated with the game player who initiates the game match creation request.

[0116] In the disclosed embodiment, there may be multiple process clusters, that is, there may be multiple servers for processing processes, and each process cluster may be connected to multiple player clients. When the game server receives a game match creation request sent by a player client, it may preferentially assign the player client to the process cluster to which the player client is connected to process the game match creation request.

[0117] In some embodiments, in order to ensure load balancing among multiple process clusters, when a game match creation request sent by a player client is received, the load information of the process cluster connected to the player client can be obtained first, and a suitable process cluster can be selected based on the load information.

[0118] Among them, the candidate process cluster refers to the process cluster connected to the player client. For example, the process cluster includes: a first process cluster, a second process cluster and a third process cluster, etc., and a game match creation set request sent by the player client is received. The process cluster connected to the player client can be: the first process cluster, then the candidate process cluster can be determined to be the first process cluster.

[0119] The total load information of the candidate process cluster may refer to the sum of the loads of the processes in the candidate process cluster.

[0120] Specifically, the total load information indicates that the load of the candidate process cluster is too high, which may be the total load value in the load information exceeding the preset load value. When the load of the candidate process cluster is too high, it means that the load pressure of the candidate process cluster is too large, and continuing to process game requests will affect the process tasks in the process cluster. At this time, other process clusters except the candidate process cluster can be obtained from the multiple process clusters.

[0121] For example, the process clusters include: a first process cluster, a second process cluster and a third process cluster, the candidate process cluster may be the first process cluster, and the other process clusters may be: the second process cluster and the third process cluster. Then, the total load information of the second process cluster (including the sum of the load values ​​of each process in the second process cluster) and the total load information of the third process cluster (including the sum of the load values ​​of each process in the third process cluster) are obtained.

[0122] Furthermore, a process cluster with a lower load is selected from the load information of other process clusters, wherein a lower load may be a total load value lower than a preset load value. A lower load indicates that the load pressure of the process cluster is relatively small and the game request can be processed. The process cluster with a lower load is then used as the target process cluster.

[0123] In some embodiments, the step of “obtaining the total load score of each game match process in the current process cluster” may include the following operations:

[0124] Get the total load score of each game process in the current target process cluster.

[0125] After selecting a target process cluster with a smaller load from multiple process clusters, the total load score of each game process in the target process cluster can be obtained. Specifically, the detailed instructions for obtaining the total load score of each game process in the target process cluster refer to the above steps, which will not be repeated here.

[0126] In the disclosed embodiment, the load balancing process can periodically obtain the load information of the process cluster in which it is located, and then broadcast the load information of the process cluster in which it is located to other process clusters. Similarly, the load balancing process can receive the load information of other process clusters broadcasted by the load balancing processes of other process clusters.

[0127] When the load balancing process receives the broadcast message, it can put the received load information of other process clusters on Redis. The game match process in the process cluster can periodically pull the load information of other process clusters from Redis. When the game match process finds that the load of its own process cluster exceeds a certain threshold, it can forward the game match creation request to other process clusters for processing. The lower the load of other process clusters, the greater the probability of being selected to process the game match creation request. Among them, the game match creation request forwarded to other process clusters will also follow the load balancing rules of other process clusters, and the Lua script on Redis will select the appropriate game match process in the other process cluster to create a game match.

[0128] In the disclosed embodiment, the load balancing process will continuously receive and update information of other process clusters. When one of the other process clusters goes offline, the heartbeat information will disappear, and the other offline process clusters will not be selected by other process clusters to process game match creation requests.

[0129] 103. Select a target game match process for processing the game match creation request from the process cluster based on the total load score.

[0130] In some embodiments, the step of “selecting a target game match process for processing a game match creation request from a process cluster based on the total load score” may include the following operations:

[0131] Determine the game match process with the lowest total load score from the process cluster and obtain the target game match process.

[0132] For example, the process cluster includes: game match process 1, game match process 2, and game match process 3. Among them, the total load score of game match process 1 can be: 40, the total load score of game match process 2 can be: 50, and the total load score of game match process 3 can be: 70. By comparing the total load scores of each game match process, the game match process with the lowest score is: game match process 1, and game match process 1 can be used as the target game match process.

[0133] 104. Create a target game match through the target game match process, and update the total load score of the target game match process based on the load score of the target game match.

[0134] Specifically, after the target game match process is determined, the game match creation request is responded to based on the target game match process, the target game match is created in the target game match process, and the game match creation request of the player client is completed. At the same time, the total load score of the target game match process is updated based on the load score of the target game match to ensure the accuracy of the total load score of the target game match process.

[0135] In some embodiments, the step of “updating the total load score of the target game match process based on the load score of the target game match” may include the following operations:

[0136] The sum of the load score of the target game match and the total load score of the target game match process is calculated to obtain the updated total score of the target game match process.

[0137] The load score of the target game match is determined according to the match type of the target game match.

[0138] For example, the match type of the target game match may be the first match type, and the load score corresponding to the first match type may be 10. Then, the sum of the load score of the target game match and the total load score of the target game match process is calculated: 40+10=50, and the updated total score of the target game match process is 50.

[0139] In the disclosed embodiment, since the logical processing part of Redis is single-threaded, the scoring part can choose to use Lua scripts to ensure atomicity to avoid data obsolescence. Specifically, atomicity means that the two operations of selecting the target game process and scoring are performed continuously on Redis, and no other operations such as scoring or deducting are inserted in between.

[0140] In some embodiments, in order to update the total load score of the game match process in real time, the method may further include the following steps:

[0141] In response to the target game match ending, obtaining a current total load score of the target game match process;

[0142] The difference between the current total load score and the total load score of the target game match process is calculated to obtain the updated total score of the target game match process.

[0143] Specifically, when the target game is over, the total load score of the target game process can be subtracted from the load score of the target game. When the target game is over, the target game process can initiate a score reduction request to Redis, so that Redis performs a score reduction operation.

[0144] For example, the load score of the target game match can be: 10, the total load score of the target game match process is: 50, and the difference between the total load score of the target game match process and the load score of the target game match is calculated: 50-10=40, and the updated total score of the target game match process is 40.

[0145] The present disclosure embodiment discloses a method for processing a game process, the method comprising: receiving a game match creation request; obtaining a total load score of each game match process in a current process cluster, wherein each game match process is used to process at least one game match, and the total load score of each game match process is determined according to a load score corresponding to a game match processed by the current game match process; selecting a target game match process for processing the game match creation request from the process cluster based on the total load score; creating a target game match through the target game match process, and updating the total load score of the target game match process based on the load score of the target game match, thereby achieving load balancing of each process in the process cluster.

[0146] Based on the above introduction, the following example will further illustrate the method for processing the game process disclosed in the present invention. Figure 2 , Figure 2 This is a flow chart of another method for processing a game process provided by an embodiment of the present disclosure. Taking the method for processing a game process applied to a game server as an example, the specific process may be as follows:

[0147] 201. The game server receives a battle creation request sent by a player client.

[0148] The player client refers to a client associated with a game player, and the battle creation request indicates the creation of a game battle.

[0149] 202. The game server obtains the load information of each battle cluster, and selects a target battle cluster from multiple battle clusters according to the load information.

[0150] In the disclosed embodiment, the game server includes multiple battle clusters, wherein the battle cluster may be a server for processing player battles, a battle cluster may include multiple battle processes, and each battle process may create multiple battles.

[0151] The load information includes the CPU load of the battle cluster. Specifically, obtaining the load information of each battle cluster may be obtaining the CPU load of each battle cluster, and then selecting the battle cluster with the lowest CPU load as the target battle cluster to ensure load balance of each battle cluster.

[0152] In some embodiments, the load information of the battle cluster where the player client is located can also be obtained first. If the CPU load of the battle cluster where the player client is located is too high and it is necessary to ask for help from other battle clusters, the load information of each battle cluster can be obtained, and the target battle cluster can be selected from multiple battle clusters according to the load information. Alternatively, if the CPU load of the battle cluster where the player client is located is not high, the battle cluster where the player client is located can be used as the target battle cluster. Under normal circumstances, when Player 1 and Player 2 fight, the battle cluster where Player 1 or Player 2 is located will be selected first, but when the overall load of the battle clusters where Player 1 and Player 2 are located is too high, it is necessary to ask for help from other battle clusters.

[0153] In the disclosed embodiment, the battle cluster includes a BSBalance process, which is used to handle process load balancing within the battle cluster and cluster load balancing between battle clusters.

[0154] Specifically, the BSBalance process in the battle cluster can broadcast the load information of its battle cluster to the BSBalance processes of other battle clusters at regular intervals. After receiving the broadcast message, the load information of the battle cluster is put on Redis. The battle process will regularly pull the load information of the battle cluster from Redis. When the battle process finds that the load of its cluster exceeds a certain threshold, it will forward the request to create a battle to other battle clusters for processing. The lower the load of the battle cluster, the greater the probability of being selected.

[0155] Among them, the battles forwarded to another battle cluster will also follow the load balancing rules of the battle cluster, and the Lua script on Redis will be used to select the appropriate battle process to create the battle. In terms of disaster recovery, the BSBalance process will continuously receive and update the information of other battle clusters. When a battle cluster goes offline, the heartbeat information will disappear, and the offline battle cluster will not be selected by other battle clusters.

[0156] 203. The game server sends an access request for the total load score of the target battle cluster to the target database.

[0157] The target database may be a Redis database. Redis is a high-performance key-value database suitable for handling high-concurrency scenarios. In the disclosed embodiment, Redis is selected as the "BattleMgr" of the battle cluster. All battle processes in the same battle cluster will be connected to the same Redis, and the battle load information can be recorded on Redis.

[0158] Among them, BattleMgr is the battle management center, which is used to manage the battle processes in the battle cluster. Redis includes a master-slave structure database. When the pressure of the master node database is too high, it switches to the slave node database to work, which can ensure the normal operation of the Redis database in high concurrency scenarios.

[0159] In the disclosed embodiment, the load information of the battle process is stored in Redis using Sorted Set, so there is a ranking list of the load information of the battle process in Redis. Wherein, Sorted Set is an ordered set, which is a built-in data structure of Redis.

[0160] Among them, the access request indicates to obtain the total load score of each combat process in the target combat cluster from Redis.

[0161] In the disclosed embodiment, a load assessment index for the battle process is formulated, and the total load score corresponding to a single battle of each battle type is calculated through the load information of the battle process (CPU load value), the number of battles processed by the battle process, and the battle type.

[0162] Specifically, the load score value when creating a battle is determined by the battle type. Based on the characteristics of battles in game projects, the overhead of battles of the same type is slightly different. Therefore, based on multiple stress tests of battles of the same type, the CPU load value and the number of battlefields (battles) of each battle process in the battle cluster are counted, denoted as b and c. The total number of battle processes is N. The single-game load score S of the battle type is calculated as follows:

[0163]

[0164] Based on the above method, the load score corresponding to each battle type of game battle is calculated.

[0165] 204. The game server determines whether the access request has timed out.

[0166] After sending an access request to Redis, determine whether a return message from Redis is received within a specified time period. If no return message from Redis is received within the specified time period, it means that the access request has timed out, and step 205 can be executed; if a return message from Redis is received within the specified time period, step 206 can be executed.

[0167] 205. The game server randomly selects a target battle process from the target battle cluster, and creates a game battle based on the target battle process.

[0168] Specifically, when access to the Redis database fails, in order to ensure that the battle creation request can be responded to, that is, the battle can still be created when the Redis service fails and does not block the player's game flow, a battle process can be randomly selected from the target battle cluster as the target battle process.

[0169] Further, the target battle process responds to the battle creation request and creates a game battle.

[0170] 206. The game server receives the total load score of the target battle cluster returned by the target database, and determines the target battle process from the target battle cluster based on the total load score.

[0171] Among them, the total load score of the target battle cluster includes the total load scores of each battle process in the target battle cluster, and the total load score of each battle process is the sum of the load scores of each battle in the battle process.

[0172] For example, the battle processes included in the target battle cluster may be: a first battle process, a second battle process, and a third battle process. The total load score of the first battle process is the sum of the load scores of the battles currently processed by the first battle process, the total load score of the second battle process is the sum of the load scores of the battles currently processed by the second battle process, and the total load score of the third battle process is the sum of the load scores of the battles currently processed by the third battle process.

[0173] Furthermore, the battle process with the lowest total load score is selected from each battle process to determine the target battle process. For example, the total load score of the first battle process may be 10, the total load score of the second battle process may be 40, and the total load score of the third battle process may be 20, then the first battle process may be selected as the target battle process.

[0174] In some embodiments, when the battle process with the lowest total load score in the target battle cluster dies, the total load score of the battle process on Redis will only increase but not decrease (because the score reduction is an operation that will only be performed after the battle ends normally. When the battle process dies, the battle on the battle process cannot end normally, so there will be no score reduction). In this case, the battle process will no longer be the "lowest load" process, and only a small number of players will be affected. When the battle process is restarted, the score on Redis will be reset, and it can participate in the cluster's load balancing normally again.

[0175] 207. The game server creates a game battle through a target battle process.

[0176] Specifically, the game server responds to the battle creation request through the target battle process and creates the game battle through the target battle process.

[0177] In some embodiments, the battle cluster may also include scene processes. The relationship between the processes in the battle cluster and the Redis database may be: each battle process is connected to the Redis database, each scene process is connected to the Redis database, and the BSBalance process is connected to the Redis database.

[0178] For example, see Figure 3 , Figure 3 A schematic diagram of an application scenario of a method for processing a game process provided by an embodiment of the present disclosure. Figure 3 The battle cluster shown includes: scene process 1, scene process 2, BSBalance process, battle process 1, battle process 2 and battle process 3, and each process is connected to the Redis database respectively.

[0179] In the disclosed embodiment, the scene process is responsible for the multiplayer scene. Players can be active in the multiplayer scene. There can be several multiplayer scenes in one scene process. The multiplayer scene will also have its own score according to its different types and the upper limit of the number of people it can carry. The load balancing strategies of the scene process and the battle process are different. The battle process prioritizes load balancing, while the scene process prioritizes filling up a process. Therefore, when the server multiplayer scene is not busy, there will be many scene processes with a score of 0.

[0180] Specifically, the scene process has two instances, a Space instance and a BattleGhost instance; similarly, the battle process also has two instances, a Battle instance and a SpaceGhost instance. Ideally, when one instance is working, the other instance is in a closed state. The Space instance is the scene Manager object, and the BattleGhost instance is the BattleManager object. Multiple service objects can work simultaneously on a process, and the two instances are used to convert each other to ensure that there are enough processes available for hotspot gameplay.

[0181] In some embodiments, when BSBalance finds that the average CPU of the battle cluster exceeds the first threshold, it selects several scene processes with the lowest load (such as 0 load) at regular intervals, and these Space instances no longer create new multiplayer scenes, and the BattleGhost instances start working; when the average CPU of the battle cluster is less than the second threshold, the scene process starts to restore. It should be noted that not all scene processes will be converted to Battle instances, and a certain number of scenes are prohibited from conversion according to the configuration.

[0182] The selection of the converted process is completed through the Lua script on Redis. Although the script content is relatively large, the call frequency is low and acceptable. In terms of disaster recovery, there is only one BSBalance process in the process cluster and it supports restart. All the data used is on Redis. When the conversion occurs, the Lua script is only responsible for selecting the converted process and does not mark it directly on Redis because the converted process may hang up. The BSBalance process will notify the converted process based on the selection result, and the process will be marked on Redis after preparation.

[0183] The disclosed embodiment discloses a method for processing a game process, the method comprising: a game server receives a battle creation request sent by a player client, obtains the load information of each battle cluster, selects a target battle cluster from multiple battle clusters according to the load information, sends an access request for the total load score of the target battle cluster to a target database, determines whether the access request has timed out, and if the access request has timed out, randomly selects a target battle process from the target battle cluster, and creates a game battle based on the target battle process; if the access request has not timed out, receives the total load score of the target battle cluster returned by the target database, determines the target battle process from the target battle cluster based on the total load score, and creates a game battle through the target battle process. In this way, load balancing of each process in the process cluster can be achieved.

[0184] In order to facilitate better implementation of the method for processing the game process provided by the embodiment of the present disclosure, the embodiment of the present disclosure also provides a device for processing the game process based on the method for processing the game process. The meanings of the terms are the same as those in the method for processing the game process, and the specific implementation details can refer to the description in the method embodiment.

[0185] See also Figure 4 , Figure 4 This is a structural block diagram of a device for processing a game process provided by an embodiment of the present disclosure, the device comprising:

[0186] A receiving unit 301 is used to receive a game match creation request;

[0187] A first acquisition unit 302 is used to acquire a total load score of each game match process in the current process cluster, wherein each game match process is used to process at least one game match, and the total load score of each game match process is determined according to a load score corresponding to the game match processed by the current game match process;

[0188] A selection unit 303 is used to select a target game match process for processing the game match creation request from the process cluster based on the total load score;

[0189] The creation unit 304 is used to create a target game match through the target game match process, and update the total load score of the target game match process based on the load score of the target game match.

[0190] In some embodiments, the first acquisition unit 302 may include:

[0191] A first determining subunit, configured to determine at least one ongoing game currently being processed by the game process;

[0192] A second determining subunit, configured to determine a load score of the ongoing game match according to a match type of the ongoing game match;

[0193] The third determining subunit is used to determine the total load score of the game game process based on the load score of the ongoing game game.

[0194] In some embodiments, the first acquiring unit 302 may further include:

[0195] A first acquisition subunit is used to acquire load information corresponding to game games of a preset game type processed by each game game process in the process cluster, and game numbers of game games of the preset game type processed by each game game process;

[0196] The first calculation subunit is used to calculate the load score corresponding to the preset game type based on the number of game game processes in the process cluster, the load information and the game number.

[0197] In some embodiments, the second determining subunit may be specifically used for:

[0198] Determining a target game type corresponding to the ongoing game from preset game types;

[0199] Obtain the load score of the target game type to obtain the load score of the ongoing game game.

[0200] In some embodiments, the first computing subunit may be specifically used for:

[0201] Calculate the load value corresponding to a single game game processed by each game game process according to the load information of each game game process and the number of games processed by the game game process;

[0202] The load values ​​corresponding to the single game games processed by each game game process are summed up to obtain a sum value;

[0203] The ratio of the sum value to the number of processes is calculated to obtain a load score corresponding to the preset game type.

[0204] In some embodiments, the first acquisition unit 302 may include:

[0205] A sending subunit, used for sending an information access request for the process cluster to a target database, where the target database is used for storing load score information of each game match process in the process cluster;

[0206] The receiving subunit is used to receive the load score information of the process cluster returned by the target database based on the information access request, and obtain the total load score of each game match process in the process cluster.

[0207] In some embodiments, the apparatus may further include:

[0208] The first execution unit is used to select a game match process from the process cluster as the target game match process if the load score information sent by the target database is not received within a specified time period after sending an information access request for the process cluster to the target database.

[0209] In some embodiments, the apparatus may further include:

[0210] A second acquisition unit is used to acquire a load value of each game match process in the process cluster;

[0211] A first calculation unit, configured to calculate an average load value of the process cluster based on the load value of each game match process;

[0212] The second execution unit is used to execute the step of obtaining the total load score of each game match process in the current process cluster if the average load value is not greater than the first threshold.

[0213] In some embodiments, the apparatus may further include:

[0214] A third acquisition unit, configured to acquire load information of each game scene process in the process cluster if the average load value is greater than the first threshold;

[0215] A first determining unit, configured to determine a target game scene process based on a game scene process that meets a preset load condition in the load information of each game scene process;

[0216] The third execution unit is used to convert the target game scene process into a game match process, so that the target game match is created through the target game scene process.

[0217] In some embodiments, the apparatus may further include:

[0218] A processing unit is used to convert the target game scene process into a game scene processing process after the target game game ends if the average load value of the process cluster is less than a second threshold value, so as to process the game scene based on the target game scene process.

[0219] In some embodiments, the apparatus may further include:

[0220] A second determining unit, configured to determine a candidate process cluster from multiple process clusters according to a process cluster corresponding to a player client that sends the game match creation request;

[0221] A fourth acquisition unit, configured to acquire total load information of the candidate process cluster;

[0222] a fourth acquiring unit, configured to acquire load information of other process clusters among the multiple process clusters if the total load information indicates that the load of the candidate process cluster is too high;

[0223] The third determining unit is configured to select, according to the load information of the other process clusters, other process clusters whose load information indicates a lower load, to obtain a target process cluster.

[0224] In some embodiments, the first acquisition unit 302 may include:

[0225] The second acquisition subunit is used to obtain the total load score of each game match process in the current target process cluster.

[0226] In some embodiments, the selection unit 303 may include:

[0227] A subunit is selected to determine the game match process with the lowest total load score from the process cluster to obtain the target game match process.

[0228] In some embodiments, the creating unit 304 may include:

[0229] The second calculation subunit is used to calculate the sum of the load score of the target game game and the total load score of the target game game process to obtain the updated total score of the target game game process.

[0230] In some embodiments, the apparatus may further include:

[0231] a fifth acquisition unit, configured to acquire a current total load score of the target game game process in response to the target game game ending;

[0232] The second calculation unit is used to calculate the difference between the current total load score and the total load score of the target game game process to obtain the updated total score of the target game game process.

[0233] The disclosed embodiment discloses a device for processing a game process, wherein a game match creation request is received by a receiving unit 301, and a first acquisition unit 302 acquires a total load score of each game match process in a current process cluster, wherein each game match process is used to process at least one game match, and the total load score of each game match process is determined according to a load score corresponding to a game match currently processed by the game match process; a selection unit 303 selects a target game match process for processing the game match creation request from the process cluster based on the total load score; a creation unit 304 creates a target game match through the target game match process, and updates the total load score of the target game match process based on the load score of the target game match, thereby achieving load balancing of each process in the process cluster.

[0234] Accordingly, the embodiment of the present disclosure also provides a computer device, which may be a server. Figure 5 As shown, Figure 5A schematic diagram of the structure of a computer device provided in an embodiment of the present disclosure. The computer device 400 includes a processor 401 having one or more processing cores, a memory 402 having one or more computer-readable storage media, and a computer program stored in the memory 402 and executable on the processor. The processor 401 is electrically connected to the memory 402. Those skilled in the art will appreciate that the computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0235] The processor 401 is the control center of the computer device 400. It uses various interfaces and lines to connect the various parts of the entire computer device 400, executes various functions of the computer device 400 and processes data by running or loading software programs and / or modules stored in the memory 402, and calling data stored in the memory 402, thereby monitoring the computer device 400 as a whole.

[0236] In the embodiment of the present disclosure, the processor 401 in the computer device 400 will load instructions corresponding to the processes of one or more application programs into the memory 402 according to the following steps, and the processor 401 will run the application programs stored in the memory 402 to implement various functions:

[0237] Receive game match creation request;

[0238] Obtaining the total load score of each game match process in the current process cluster, wherein each game match process is used to process at least one game match, and the total load score of each game match process is determined according to the load score corresponding to the game match processed by the current game match process;

[0239] Selecting a target game match process for processing a game match creation request from a process cluster based on the total load score;

[0240] A target game match is created through the target game match process, and the total load score of the target game match process is updated based on the load score of the target game match.

[0241] In some embodiments, the total load score of each game match process is determined according to the load score corresponding to the game match processed by the current game match process, including:

[0242] Determining at least one ongoing game match currently being processed by the game match process;

[0243] Determine a load score of the ongoing game match according to the game type of the ongoing game match;

[0244] The total load score of the game match process is determined based on the load score of the ongoing game match.

[0245] In some embodiments, before determining the load score of the ongoing game match according to the game type of the ongoing game match, the method further includes:

[0246] Obtain load information corresponding to game games of a preset game type processed by each game game process in the process cluster, and the game number of game games of the preset game type processed by each game game process;

[0247] Based on the number of game match processes in the process cluster, load information, and match times, calculate the load score corresponding to the preset match type;

[0248] The load score of the game in progress is determined based on the game type of the game in progress, including:

[0249] Determine a target game type corresponding to the ongoing game from preset game types;

[0250] Get the load score of the target game type and obtain the load score of the ongoing game.

[0251] In some embodiments, based on the number of game match processes in the process cluster, load information, and match times, a load score corresponding to a preset match type is calculated, including:

[0252] Calculate the load value corresponding to a single game match processed by each game match process according to the load information of each game match process and the number of games processed by the game match process;

[0253] The load values ​​corresponding to the single game games processed by each game game process are summed up to obtain a sum value;

[0254] Calculate the ratio of the sum value to the number of processes to get the load score corresponding to the preset game type.

[0255] In some embodiments, obtaining the total load score of each game match process in the current process cluster includes:

[0256] Sending an information access request for the process cluster to a target database, where the target database is used to store load score information of each game match process in the process cluster;

[0257] Receive the load score information of the process cluster returned by the target database based on the information access request, and obtain the total load score of each game match process in the process cluster.

[0258] In some embodiments, the method further comprises:

[0259] If the load score information sent by the target database is not received within a specified time period after the information access request for the process cluster is sent to the target database, a game match process is selected from the process cluster as the target game match process.

[0260] In some embodiments, before obtaining the total load score of each game match process in the current process cluster, the method further includes:

[0261] Get the load value of each game process in the process cluster;

[0262] Calculate the average load value of the process cluster based on the load value of each game process;

[0263] If the average load value is not greater than the first threshold, the step of obtaining the total load score of each game match process in the current process cluster is executed.

[0264] In some embodiments, the process cluster further includes at least one game scene process, and the game scene process is used to process the game scene;

[0265] The method also includes:

[0266] If the average load value is greater than the first threshold, the load information of each game scene process in the process cluster is obtained;

[0267] Determine a target game scene process based on the game scene process that meets a preset load condition in the load information of each game scene process;

[0268] The target game scene process is converted into a game match process, so that the target game match is created through the target game scene process.

[0269] In some embodiments, after creating the target game match through the target game scenario process, the method further includes:

[0270] If the average load value of the process cluster is less than the second threshold, after the target game match is over, the target game scene process is converted into a game scene processing process so that the game scene is processed based on the target game scene process.

[0271] In some embodiments, before obtaining the total load score of each game match process in the current process cluster, the method further includes:

[0272] Determine a candidate process cluster from multiple process clusters according to the process cluster corresponding to the player client that sends the game match creation request;

[0273] Get the total load information of the candidate process cluster;

[0274] If the total load information indicates that the load of the candidate process cluster is too high, then obtaining load information of other process clusters in the multiple process clusters;

[0275] Select other process clusters whose load information indicates a lower load from the load information of other process clusters to obtain a target process cluster;

[0276] Get the total load score of each game process in the current process cluster, including:

[0277] Get the total load score of each game process in the current target process cluster.

[0278] In some embodiments, updating the total load score of the target game match process based on the load score of the target game match includes:

[0279] The sum of the load score of the target game match and the total load score of the target game match process is calculated to obtain the updated total score of the target game match process.

[0280] In some embodiments, the method further comprises:

[0281] In response to the target game match ending, obtaining a current total load score of the target game match process;

[0282] The difference between the current total load score and the total load score of the target game match process is calculated to obtain the updated total score of the target game match process.

[0283] The disclosed embodiment calculates the single-game load scores of different types of game battles in advance according to the types of game battles and the load information of the game battles, and uses the load scores as the load standards for the game battles. When a battle creation request is received, the target battle process with the lowest total load score is selected from the battle cluster according to the total load scores of the game battles in each battle process in the battle cluster, and the game battle is created by responding to the battle creation request through the target battle process. In this way, load balancing of each process in the process cluster can be achieved.

[0284] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0285] Optional, such as Figure 5 As shown, the computer device 400 further includes: a touch screen 403, a radio frequency circuit 404, an audio circuit 405, an input unit 406, and a power supply 407. The processor 401 is electrically connected to the touch screen 403, the radio frequency circuit 404, the audio circuit 405, the input unit 406, and the power supply 407, respectively. Those skilled in the art can understand that Figure 5The computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0286] The touch display screen 403 can be used to display a graphical user interface and receive operation instructions generated by the user acting on the graphical user interface. The touch display screen 403 may include a display panel and a touch panel. Among them, the display panel may be used to display information input by the user or information provided to the user and various graphical user interfaces of the computer device, and these graphical user interfaces may be composed of graphics, text, icons, videos and any combination thereof. Optionally, the display panel may be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), an organic light emitting diode (OLED, Organic Light-Emitting Diode) and the like. The touch panel may be used to collect the user's touch operation on or near it (such as the user using any suitable object or attachment such as a finger, a stylus, etc. on the touch panel or near the touch panel), and generate corresponding operation instructions, and the operation instructions execute corresponding programs. Optionally, the touch panel may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch direction, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 401, and can receive the command sent by the processor 401 and execute it. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it is transmitted to the processor 401 to determine the type of touch event, and then the processor 401 provides a corresponding visual output on the display panel according to the type of touch event. In the embodiment of the present disclosure, the touch panel and the display panel can be integrated into the touch display screen 403 to realize the input and output functions. However, in some embodiments, the touch panel and the touch panel can be used as two independent components to realize the input and output functions. That is, the touch display screen 403 can also be used as a part of the input unit 406 to realize the input function.

[0287] In the embodiment of the present disclosure, the processor 401 executes the game application to generate a graphical user interface on the touch display screen 403. The virtual scene on the graphical user interface includes at least one skill control area, and the skill control area includes at least one skill control. The touch display screen 403 is used to present the graphical user interface and receive operation instructions generated by the user acting on the graphical user interface.

[0288] The radio frequency circuit 404 may be used to send and receive radio frequency signals, so as to establish wireless communication with a network device or other computer devices through wireless communication, and to send and receive signals between the network device or other computer devices.

[0289] The audio circuit 405 can be used to provide an audio interface between the user and the computer device through a speaker and a microphone. The audio circuit 405 can transmit the electrical signal converted from the received audio data to the speaker, which is converted into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 405 and converted into audio data, and then the audio data is output to the processor 401 for processing, and then sent to another computer device through the radio frequency circuit 404, or the audio data is output to the memory 402 for further processing. The audio circuit 405 may also include an earphone jack to provide communication between an external headset and the computer device.

[0290] The input unit 406 may be used to receive input numbers, character information or user feature information (such as fingerprint, iris, facial information, etc.), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0291] The power supply 407 is used to supply power to various components of the computer device 400. Optionally, the power supply 407 can be logically connected to the processor 401 through a power management system, so that the power management system can manage charging, discharging, and power consumption. The power supply 407 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0292] although Figure 5 Not shown, the computer device 400 may also include a camera, a sensor, a wireless fidelity module, a Bluetooth module, etc., which will not be described in detail here.

[0293] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0294] As can be seen from the above, the computer device provided in this embodiment receives a game match creation request; obtains the total load score of each game match process in the current process cluster, wherein each game match process is used to process at least one game match, and the total load score of each game match process is determined according to the load score corresponding to the game match processed by the current game match process; selects a target game match process for processing the game match creation request from the process cluster based on the total load score; creates a target game match through the target game match process, and updates the total load score of the target game match process based on the load score of the target game match.

[0295] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0296] To this end, the present disclosure provides a computer-readable storage medium, which stores a plurality of computer programs, which can be loaded by a processor to execute the steps in any of the game process processing methods provided in the present disclosure. For example, the computer program can execute the following steps:

[0297] Receive game match creation request;

[0298] Obtaining the total load score of each game match process in the current process cluster, wherein each game match process is used to process at least one game match, and the total load score of each game match process is determined according to the load score corresponding to the game match processed by the current game match process;

[0299] Selecting a target game match process for processing a game match creation request from a process cluster based on the total load score;

[0300] A target game match is created through the target game match process, and the total load score of the target game match process is updated based on the load score of the target game match.

[0301] In some embodiments, the total load score of each game match process is determined according to the load score corresponding to the game match processed by the current game match process, including:

[0302] Determining at least one ongoing game match currently being processed by the game match process;

[0303] Determine a load score of the ongoing game match according to the game type of the ongoing game match;

[0304] The total load score of the game match process is determined based on the load score of the ongoing game match.

[0305] In some embodiments, before determining the load score of the ongoing game match according to the game type of the ongoing game match, the method further includes:

[0306] Obtain load information corresponding to game games of a preset game type processed by each game game process in the process cluster, and the game number of game games of the preset game type processed by each game game process;

[0307] Based on the number of game match processes in the process cluster, load information, and match times, calculate the load score corresponding to the preset match type;

[0308] The load score of the game in progress is determined based on the game type of the game in progress, including:

[0309] Determine a target game type corresponding to the ongoing game from preset game types;

[0310] Get the load score of the target game type and obtain the load score of the ongoing game.

[0311] In some embodiments, based on the number of game match processes in the process cluster, load information, and match times, a load score corresponding to a preset match type is calculated, including:

[0312] Calculate the load value corresponding to a single game match processed by each game match process according to the load information of each game match process and the number of games processed by the game match process;

[0313] The load values ​​corresponding to the single game games processed by each game game process are summed up to obtain a sum value;

[0314] Calculate the ratio of the sum value to the number of processes to get the load score corresponding to the preset game type.

[0315] In some embodiments, obtaining the total load score of each game match process in the current process cluster includes:

[0316] Sending an information access request for the process cluster to a target database, where the target database is used to store load score information of each game match process in the process cluster;

[0317] Receive the load score information of the process cluster returned by the target database based on the information access request, and obtain the total load score of each game match process in the process cluster.

[0318] In some embodiments, the method further comprises:

[0319] If the load score information sent by the target database is not received within a specified time period after the information access request for the process cluster is sent to the target database, a game match process is selected from the process cluster as the target game match process.

[0320] In some embodiments, before obtaining the total load score of each game match process in the current process cluster, the method further includes:

[0321] Get the load value of each game process in the process cluster;

[0322] Calculate the average load value of the process cluster based on the load value of each game process;

[0323] If the average load value is not greater than the first threshold, the step of obtaining the total load score of each game match process in the current process cluster is executed.

[0324] In some embodiments, the process cluster further includes at least one game scene process, and the game scene process is used to process the game scene;

[0325] The method also includes:

[0326] If the average load value is greater than the first threshold, the load information of each game scene process in the process cluster is obtained;

[0327] Determine a target game scene process based on the game scene process that meets a preset load condition in the load information of each game scene process;

[0328] The target game scene process is converted into a game match process, so that the target game match is created through the target game scene process.

[0329] In some embodiments, after creating the target game match through the target game scenario process, the method further includes:

[0330] If the average load value of the process cluster is less than the second threshold, after the target game match is over, the target game scene process is converted into a game scene processing process so that the game scene is processed based on the target game scene process.

[0331] In some embodiments, before obtaining the total load score of each game match process in the current process cluster, the method further includes:

[0332] Determine a candidate process cluster from multiple process clusters according to the process cluster corresponding to the player client that sends the game match creation request;

[0333] Get the total load information of the candidate process cluster;

[0334] If the total load information indicates that the load of the candidate process cluster is too high, then obtaining load information of other process clusters in the multiple process clusters;

[0335] Select other process clusters whose load information indicates a lower load from the load information of other process clusters to obtain a target process cluster;

[0336] Get the total load score of each game process in the current process cluster, including:

[0337] Get the total load score of each game process in the current target process cluster.

[0338] In some embodiments, updating the total load score of the target game match process based on the load score of the target game match includes:

[0339] The sum of the load score of the target game match and the total load score of the target game match process is calculated to obtain the updated total score of the target game match process.

[0340] In some embodiments, the method further comprises:

[0341] In response to the target game match ending, obtaining a current total load score of the target game match process;

[0342] The difference between the current total load score and the total load score of the target game match process is calculated to obtain the updated total score of the target game match process.

[0343] The disclosed embodiment calculates the single-game load scores of different types of game battles in advance according to the types of game battles and the load information of the game battles, and uses the load scores as the load standards for the game battles. When a battle creation request is received, the target battle process with the lowest total load score is selected from the battle cluster according to the total load scores of the game battles in each battle process in the battle cluster, and the game battle is created by responding to the battle creation request through the target battle process. In this way, load balancing of each process in the process cluster can be achieved.

[0344] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0345] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0346] Since the computer program stored in the storage medium can execute the steps in any method for processing a game process provided in the embodiments of the present disclosure, the beneficial effects that can be achieved by any method for processing a game process provided in the embodiments of the present disclosure can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0347] The above is a detailed introduction to a method, device, storage medium and computer equipment for processing a game process provided by an embodiment of the present disclosure. Specific examples are used herein to illustrate the principles and implementation methods of the present disclosure. The description of the above embodiments is only used to help understand the method and core idea of ​​the present disclosure. At the same time, for those skilled in the art, according to the idea of ​​the present disclosure, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present disclosure.

Claims

1. A method for processing a game process, characterized in that: The method comprises: Receive game match creation request; If the average load value of the current process cluster is not greater than the first threshold, the total load score of each game match process in the current process cluster is obtained, wherein each game match process is used to process at least one game match, and the total load score of each game match process is determined according to the load score corresponding to the game match processed by the current game match process, and the process cluster also includes at least one game scene process, and the game scene process is used to process the game scene; Selecting a target game match process for processing the game match creation request from the process cluster based on the total load score; Creating a target game match through the target game match process, and updating the total load score of the target game match process based on the load score of the target game match; If the average load value is greater than the first threshold, the load information of each game scene process in the process cluster is obtained; based on the game scene process that meets the preset load conditions in the load information of each game scene process, the target game scene process is determined; the target game scene process is converted into a game match process, so that the target game match is created through the target game scene process.

2. The method according to claim 1, characterized in that The total load score of each game match process is determined according to the load score corresponding to the game match currently processed by the game match process, including: Determining at least one ongoing game match currently being processed by the game match process; Determining a load score of the ongoing game match according to the game type of the ongoing game match; The total load score of the game game process is determined based on the load score of the ongoing game game.

3. The method according to claim 2, characterized in that Before determining the load score of the ongoing game match according to the game type of the ongoing game match, the method further includes: Obtaining load information corresponding to game games of a preset game type processed by each game game process in the process cluster, and game numbers of game games of the preset game type processed by each game game process; Calculate the load score corresponding to the preset game type based on the number of game game processes in the process cluster, the load information, and the game number; The determining the load score of the ongoing game match according to the game type of the ongoing game match includes: Determining a target game type corresponding to the ongoing game from preset game types; Obtain the load score of the target game type to obtain the load score of the ongoing game game.

4. The method according to claim 3, characterized in that The calculating the load score corresponding to the preset game type based on the number of game game processes in the process cluster, the load information, and the game number includes: Calculate the load value corresponding to a single game game processed by each game game process according to the load information of each game game process and the number of games processed by the game game process; The load values ​​corresponding to the single game games processed by each game game process are summed up to obtain a sum value; The ratio of the sum value to the number of processes is calculated to obtain a load score corresponding to the preset game type.

5. The method according to claim 1, characterized in that The obtaining of the total load score of each game process in the current process cluster includes: Sending an information access request for the process cluster to a target database, where the target database is used to store load score information of each game match process in the process cluster; Receive the load score information of the process cluster returned by the target database based on the information access request, and obtain the total load score of each game match process in the process cluster.

6. The method according to claim 5, characterized in that The method further comprises: If the load score information sent by the target database is not received within a specified time period after the information access request for the process cluster is sent to the target database, a game match process is selected from the process cluster as the target game match process.

7. The method according to claim 1, characterized in that Before obtaining the total load score of each game match process in the current process cluster, the method further includes: Obtaining the load value of each game process in the process cluster; Calculate the average load value of the process cluster based on the load value of each game match process; If the average load value is not greater than the first threshold, the step of obtaining the total load score of each game match process in the current process cluster is executed.

8. The method according to claim 1, characterized in that After creating the target game match through the target game scenario process, the method further includes: If the average load value of the process cluster is less than a second threshold, after the target game match is finished, the target game scene process is converted into a game scene processing process so that the game scene is processed based on the target game scene process.

9. The method according to claim 1, characterized in that: Before obtaining the total load score of each game match process in the current process cluster, the method further includes: Determining a candidate process cluster from multiple process clusters according to the process cluster corresponding to the player client that sends the game match creation request; Obtaining total load information of the candidate process cluster; If the total load information indicates that the load of the candidate process cluster is too high, obtaining load information of other process clusters in the multiple process clusters; Selecting other process clusters whose load information indicates a lower load from the load information of the other process clusters to obtain a target process cluster; The obtaining of the total load score of each game process in the current process cluster includes: Obtain the total load score of each game process in the current target process cluster.

10. The method according to claim 1, characterized in that The selecting a target game match process for processing the game match creation request from the process cluster based on the total load score includes: Determine the game match process with the lowest total load score from the process cluster to obtain the target game match process.

11. The method according to claim 1, characterized in that: The updating of the total load score of the target game match process based on the load score of the target game match comprises: The sum of the load score of the target game match and the total load score of the target game match process is calculated to obtain the updated total score of the target game match process.

12. The method according to claim 10, characterized in that The method further comprises: In response to the target game game ending, obtaining a current total load score of the target game game process; The difference between the current total load score and the total load score of the target game match process is calculated to obtain the updated total score of the target game match process.

13. A device for processing a game process, characterized in that: The device comprises: A receiving unit, used for receiving a game match creation request; A first acquisition unit is configured to acquire a total load score of each game match process in the current process cluster if the average load value of the current process cluster is not greater than a first threshold value, wherein each game match process is used to process at least one game match, and the total load score of each game match process is determined according to a load score corresponding to the game match currently processed by the game match process, and the process cluster further includes at least one game scene process, and the game scene process is used to process a game scene; A selection unit, configured to select a target game match process for processing the game match creation request from the process cluster based on the total load score; A creating unit, configured to create a target game match through the target game match process, and update the total load score of the target game match process based on the load score of the target game match; A third acquisition unit, configured to acquire load information of each game scene process in the process cluster if the average load value is greater than the first threshold; A first determining unit, configured to determine a target game scene process based on a game scene process that meets a preset load condition in the load information of each game scene process; The third execution unit is used to convert the target game scene process into a game match process, so that the target game match is created through the target game scene process.

14. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method for processing the game process as described in any one of claims 1 to 12 is implemented.

15. A storage medium, characterized in that: The storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the method for processing a game process as described in any one of claims 1 to 12.

Citation Information

Patent Citations

  • Mobile terminal online game server configuration system

    CN105381613A

  • Game cluster management method and device thereof, storage medium and electronic equipment

    CN112148495A