Server allocation method, system, apparatus, server and storage medium

By selecting the game server with the largest number of online players as the target server through the central server, the problems of resource waste and reduced experience caused by the imbalance of the number of players are solved, and more efficient resource utilization and player activity are achieved.

CN115068934BActive Publication Date: 2025-10-10NETEASE (HANGZHOU) NETWORK CO LTD

Patent Information

Application Number
CN202210692318.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-17
Publication Date
2025-10-10
Estimated Expiration
2042-06-17

AI Technical Summary

Technical Problem

In the prior art, there are problems such as waste of game server resources and reduced player gaming experience due to the imbalance of the number of players.

Method used

The central server selects a target game server with the largest number of players and whose number of online players does not reach a preset threshold from multiple game servers, and instructs the character server to establish a communication connection between the first game client and the target game server to execute corresponding game logic.

Benefits of technology

It avoids the waste of server resources caused by the scattered distribution of players, improves the resource utilization of the server, and increases the concentration and activity of players in the game server, thereby improving the player's gaming experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115068934B_ABST
    Figure CN115068934B_ABST
Patent Text Reader

Abstract

The application provides a server distribution method, system and device, a server and a storage medium, and relates to the technical field of computers. The method comprises the following steps: receiving a game distribution request of a first game client sent by a role server; determining game servers with an online player number not reaching a preset player number threshold as multiple idle game servers from multiple game servers; determining a game server with the largest online player number as a target game server from the multiple idle game servers according to the online player numbers of the multiple idle game servers; sending an identifier of the target game server to the role server; the identifier of the target game server is used to instruct the role server to inform the first game client to establish a communication connection with the target game server according to the identifier, so that the target game server executes game logic corresponding to the first game client. The application can improve the game experience of players by improving the aggregation degree of players.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, in particular to a server distribution method, system, device, server and storage medium. BACKGROUND

[0002] With the rapid development of the Internet and wireless communication technology, large-scale multiplayer online games are becoming more and more popular.

[0003] Generally, a network game contains multiple game modes, each game mode is arranged on a plurality of game servers to distribute players on different game servers for playing, and the player connects to a fixed game server after selecting the game mode each time.

[0004] At the beginning of each game mode, the number of players is the largest, but as time goes on, the number of players on some game servers will gradually decrease, and due to this fixed game server connection mode, the exploration progress of the game mode on the game server with fewer players is slow, which not only wastes server resources, but also reduces the game experience of the players. SUMMARY

[0005] The present application aims at the deficiencies in the prior art, and provides a server distribution method, system, device, server and storage medium to improve the game experience of players and the resource utilization of servers by improving the aggregation of players.

[0006] To achieve the above object, the technical scheme adopted by the embodiments of the present application is as follows:

[0007] In a first aspect, the embodiments of the present application provide a server distribution method applied to a center server, and the method comprises:

[0008] receiving a game distribution request of a first game client sent by a role server;

[0009] determining game servers with online player numbers not reaching a preset player number threshold from a plurality of game servers as a plurality of idle game servers;

[0010] determining a game server with the largest number of online players from the idle game servers as a target game server according to the number of online players of the idle game servers;

[0011] sending an identifier of the target game server to the role server, the identifier of the target game server being used to instruct the role server to inform the first game client to establish a communication connection with the target game server according to the identifier, so that the target game server executes the game logic corresponding to the first game client.

[0012] Optionally, the game allocation request includes an identifier of a preset game mode, and determining, based on the number of online players on the plurality of idle game servers, the game server with the largest number of online players as the target game server includes:

[0013] Determining, according to the identifier of the preset game mode, at least one idle game server corresponding to the preset game mode from the plurality of idle game servers;

[0014] According to the number of online players of the at least one idle game server, the game server with the largest number of online players is determined from the at least one idle game server as the target game server.

[0015] Optionally, each game server has at least one game mode, and each game mode is set on at least one game server.

[0016] Optionally, determining, based on the number of online players on the plurality of idle game servers, a game server with the largest number of online players as the target game server from the idle game servers includes:

[0017] sorting the plurality of idle game servers according to the number of online players on the plurality of idle game servers;

[0018] According to the sorted plurality of idle game servers, the game server with the largest number of online players is determined as the target game server.

[0019] Optionally, sorting the plurality of idle game servers according to the number of online players on the plurality of idle game servers includes:

[0020] Sort and number the plurality of idle game servers from largest to smallest according to the number of online players on the plurality of idle game servers;

[0021] The step of determining, based on the sorted plurality of idle game servers, the game server with the largest number of online players as the target game server comprises:

[0022] Determine the idle game server with the smallest number as the target game server.

[0023] Optionally, sorting the plurality of idle game servers according to the number of online players on the plurality of idle game servers includes:

[0024] Sort and number the plurality of idle game servers from smallest to largest according to the number of online players on the plurality of idle game servers;

[0025] The step of determining, based on the sorted plurality of idle game servers, the game server with the largest number of online players as the target game server comprises:

[0026] Determine the idle game server with the largest number as the target game server.

[0027] Optionally, determining, based on the number of online players on the plurality of idle game servers, a game server with the largest number of online players as the target game server from the idle game servers includes:

[0028] Calculating the load balancing degree of the plurality of idle game servers according to the number of online players of the plurality of idle game servers and the preset player number threshold;

[0029] According to the load balancing degrees of the plurality of idle game servers, the game server with the greatest load balancing degree is determined as the target game server.

[0030] Optionally, after sending the identifier of the target game server to the character server, the method further includes:

[0031] Update the number of online players of the target game server.

[0032] Optionally, the method further includes:

[0033] receiving a notification message sent by the target game server, wherein the notification message is used to instruct the second game client to exit from the target game server;

[0034] According to the notification message, the number of online players of the target game server is updated.

[0035] In a second aspect, an embodiment of the present invention further provides a game server system, the game server system comprising: at least one character server, a central server, and a plurality of game servers;

[0036] The at least one character server is communicatively connected to the central server, and the central server is also communicatively connected to the multiple game servers. The central server is used to execute the steps of the server allocation method described in any one of the first aspects above.

[0037] In a third aspect, an embodiment of the present invention further provides a server allocation device, applied to a central server, the device comprising:

[0038] A request receiving module, configured to receive a game allocation request from a first game client sent by a role server;

[0039] The idle game server determining module is configured to determine, from the plurality of game servers, a game server with an online player quantity not reaching a preset player quantity threshold as a plurality of idle game servers;

[0040] The target game server determining module is configured to determine, from the idle game servers, a game server with the largest online player quantity as a target game server according to the online player quantities of the idle game servers.

[0041] The target game server determining module is configured to determine, from the idle game servers, a game server with the largest online player quantity as a target game server according to the online player quantities of the idle game servers.

[0042] Optionally, the game allocation request comprises an identification of a preset game mode, and the target game server determining module comprises:

[0043] The game mode selection unit is configured to determine at least one idle game server corresponding to the preset game mode from the plurality of idle game servers according to the identification of the preset game mode.

[0044] The target game server determining unit is configured to determine, from the at least one idle game server, a game server with the largest online player quantity as the target game server according to the online player quantities of the at least one idle game server.

[0045] Optionally, each game server has at least one game mode, and each game mode is set on at least one game server.

[0046] Optionally, the target game server determining module comprises:

[0047] The sorting unit is configured to sort the plurality of idle game servers according to the online player quantities of the plurality of idle game servers.

[0048] The target game server determining unit is further configured to determine, from the plurality of idle game servers after sorting, a game server with the largest online player quantity as the target game server.

[0049] Optionally, the sorting unit is specifically configured to sort and number the plurality of idle game servers according to the online player quantities of the plurality of idle game servers in descending order.

[0050] The target game server determining unit is specifically configured to determine the idle game server with the smallest number as the target game server.

[0051] Optionally, the sorting unit is specifically configured to sort and number the plurality of idle game servers in ascending order according to the number of online players of the plurality of idle game servers.

[0052] The target game server determination unit is specifically configured to determine the idle game server with the largest number as the target game server.

[0053] Optionally, the target game server determination module comprises:

[0054] The load balancing degree calculation unit is configured to calculate the load balancing degrees of the plurality of idle game servers according to the number of online players of the plurality of idle game servers and the preset player number threshold.

[0055] The target game server determination unit is further configured to determine the game server with the largest load balancing degree as the target game server according to the load balancing degrees of the plurality of idle game servers.

[0056] Optionally, the device further comprises:

[0057] The number updating module is configured to update the number of online players of the target game server.

[0058] Optionally, the device further comprises:

[0059] The notification message receiving module is configured to receive a notification message sent by the target game server, the notification message being used to instruct the second game client to exit from the target game server.

[0060] The number updating module is further configured to update the number of online players of the target game server according to the notification message.

[0061] In a fourth aspect, an embodiment of the present application further provides a server, comprising a processor, a storage medium and a bus, the storage medium stores program instructions executable by the processor, when the server is running, the processor and the storage medium communicate through the bus, and the processor executes the program instructions to perform the steps of the server allocation method according to any one of the first aspect.

[0062] In a fifth aspect, an embodiment of the present application further provides a computer readable storage medium, the storage medium stores a computer program, when the computer program is run by a processor, the steps of the server allocation method according to any one of the first aspect are performed.

[0063] The present application has the following beneficial effects:

[0064] The present invention provides a server allocation method, system, device, server, and storage medium, wherein the method comprises: receiving a game allocation request from a first game client sent by a role server, determining from a plurality of game servers that the number of online players does not reach a preset player number threshold as a plurality of idle game servers, determining, based on the number of online players of the plurality of idle game servers, the game server with the largest number of online players from the idle game servers as a target game server, and sending an identifier of the target game server to the role server, wherein the identifier of the target game server is used to instruct the role server to notify the first game client to establish a communication connection with the target game server according to the identifier, so that the target game server executes the game logic corresponding to the first game client. By enabling the first game client to establish a communication connection with the target game server with the largest number of online players among the plurality of game servers that does not reach the preset player number threshold, the present invention avoids the waste of server resources caused by the scattered distribution of players in different game servers, improves the resource utilization of the game servers, and by increasing the concentration of players in the game servers, makes the activity between players in the game servers higher, thereby improving the players' gaming experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.

[0066] Figure 1 A schematic diagram of the structure of the game server system provided by the present invention;

[0067] Figure 2 A schematic flow chart of a first embodiment of the server allocation method provided by the present invention;

[0068] Figure 3 A schematic flow chart of a second embodiment of the server allocation method provided by the present invention;

[0069] Figure 4 A schematic flow chart of a third embodiment of the server allocation method provided by the present invention;

[0070] Figure 5 A schematic flow chart of a fourth embodiment of the server allocation method provided by the present invention;

[0071] Figure 6 A schematic flow chart of a fifth embodiment of the server allocation method provided by the present invention;

[0072] Figure 7 An interaction schematic diagram of the server allocation method provided by the present application;

[0073] Figure 8 A structure schematic diagram of the server allocation apparatus provided by the present application;

[0074] Figure 9 A schematic diagram of the server provided by the present application. DETAILED DESCRIPTION

[0075] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments of the present application.

[0076] Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative labor are within the scope of protection of the present application.

[0077] The terms “first”, “second”, and the like in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms “include” and “have” and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0078] It should be noted that the features in the embodiments of the present application can be combined with each other without conflict.

[0079] Generally, a network game includes multiple game modes, and the developers arrange each game mode to run on multiple game servers and assign players to different game servers for game playing. After selecting a corresponding game mode each time, the players are connected to a fixed game server.

[0080] At the beginning of each game mode's launch, it is often the time when the number of players is the largest. However, as time goes by, the number of players on some game servers will gradually decrease. Due to this fixed game server connection method, the concentration of players on game servers with fewer players decreases, and the exploration progress of the game mode slows down. Even in this game mode, the copy that requires a preset number of players to be opened cannot be opened on the game server with a smaller number of players, resulting in players connected to the game server being unable to open the corresponding copy, or even if the copy is opened, the copy activity cannot be completed within the copy activity time to obtain rewards due to the small number of players. Over time, players on game servers with a smaller number of players may choose to abandon the game, which not only wastes server resources but also reduces the player's gaming experience.

[0081] In response to the above-mentioned problems of the prior art, the present invention proposes the following technical concept: by establishing a communication connection between the first game client and the target game server with the largest number of online players among multiple game servers that has not reached a preset player number threshold, it is possible to avoid the waste of server resources caused by the scattered distribution of players in different servers, thereby improving the resource utilization of the server, and by increasing the concentration of players in the game server, the activity between players in the game server is higher, thereby improving the players' gaming experience.

[0082] To facilitate understanding of the present invention, the game server system targeted by the server allocation method provided by the present invention is first described below.

[0083] Please refer to Figure 1 , is a structural diagram of the game server system provided by the present invention, such as Figure 1 As shown, the game server system includes: at least one character server (Character server) 10, a central server (Central server) 20 and multiple game servers (Solar server) 30, at least one character server 10 is communicatively connected to the central server 20, and the central server 20 is also communicatively connected to the multiple game servers 30.

[0084] Specifically, a game client is run on each player's terminal device, the game client is in communication connection with one of the at least one role server 10, the role server 10 is used for login management of the game client, so that the game client can establish a connection with the game server 30. Each game client has a unique corresponding connection role server 10, the player runs the game client on the terminal device, inputs the player identity information in the game client, and the game client addresses the address of the role server 10 corresponding to the game client according to the player identity information to make the game client establish a communication connection with the role server 10 through the address of the role server 10.

[0085] After the role server 10 establishes a communication connection with the game client, the role server 10 sends a game allocation request for the game client to the center server 20, and requests the center server 20 to allocate a game server 30 for the game client.

[0086] After the center server 20 receives the game allocation request sent by the role server 10, the center server 20 determines the game servers 30 in which the number of online players does not reach the preset player number threshold from the plurality of game servers 30 as a plurality of idle game servers, determines the game server with the largest number of online players from the plurality of idle game servers as a target game server according to the number of online players of the plurality of idle game servers, and sends the identifier of the target game server to the role server 10, instructs the role server 10 to address the target game server according to the identifier of the target game server, and notifies the game client to establish a communication connection with the target game server according to the address of the target game server, so that the target game server executes the game logic corresponding to the game client.

[0087] In some embodiments, the game server system can further include a game management server in communication connection with the game client to obtain game data executed on the game client and store the game data in a database.

[0088] Based on the above game server system, the application provides a server allocation method of a center server applied to the above game server system. Please refer to Figure 2 , the flowchart of the first embodiment of the server allocation method provided by the application is shown in Figure 2 , the method comprises:

[0089] S10: receiving the game allocation request of the first game client sent by the role server.

[0090] In this embodiment, a first player runs a first game client on a first terminal device and enters player identity information into the first game client. The first game client then uses a formatting algorithm based on the player identity information to locate the address of the character server corresponding to the first game client, thereby establishing a communication connection with the character server via the address of the character server. A central server then receives a game allocation request from the character server after confirming that the first game client has successfully logged in. The game allocation request is used to request the central server to allocate a game server to the first game client.

[0091] S20: Determine from the multiple game servers that the number of online players does not reach a preset player number threshold as multiple idle game servers.

[0092] The purpose of this embodiment is to allow players to enter game servers with a high player concentration. However, since each game server has a load limit, if the number of connected players exceeds the load limit, the game server will become stuck or even crash. Therefore, the central server determines, based on the number of online players in the multiple game servers it manages, game servers whose number of online players does not reach a preset player number threshold from the multiple game servers to form an idle game server list. The idle game server list includes multiple idle game servers.

[0093] Using multiple idle game servers in the idle game server list as candidate game servers for the game client to connect to can prevent game server lag or crashes caused by the game client connecting to a game server whose online player count has reached a preset player threshold. The preset player threshold can be set based on the game server's capacity.

[0094] S30: According to the number of online players of the plurality of idle game servers, a game server with the largest number of online players is determined from the idle game servers as a target game server.

[0095] In this embodiment, after the central server determines multiple idle game servers from multiple game servers, it selects the idle game server with the largest number of online players from the idle game server list as the target game server. The target game server is the game server with the highest player concentration among the multiple idle game servers.

[0096] S40: Sending the identifier of the target game server to the role server, where the identifier of the target game server is used to instruct the role server to notify the first game client to establish a communication connection with the target game server according to the identifier, so that the target game server executes the game logic corresponding to the first game client.

[0097] In this embodiment, the central server pre-establishes a coding rule corresponding to the game server addresses and game server identifiers. The central server uses this coding rule to encode the multiple game servers based on their addresses, so that each game server has a unique identifier. The idle game server list includes multiple idle game servers and their corresponding identifiers. After the central server determines the identifier of a target game server from the idle game server list, it sends the identifier (key) of the target game server to the character server.

[0098] The character server pre-establishes an addressing rule corresponding to the game server identifier and the game server address. This addressing rule corresponds to the encoding rule and is a decoding rule corresponding to the encoding rule. The character server uses this addressing rule to determine the target game server address based on the target game server identifier and sends the target game server address to the first game client. The first game client establishes a communication connection with the target game server based on the target game server address, causing the target game server to execute the game logic corresponding to the first game client.

[0099] In some embodiments, after the first game client establishes a communication connection with the target game server, the target game server sends a notification message to the central server to notify the central server that the first game client has established a communication connection with the target game server. The central server updates the number of online players of the target game server based on the notification message.

[0100] The server allocation method provided in the above embodiment determines, based on the game allocation request of the first game client sent by the character server, a target game server with the largest number of online players and the number of online players from multiple game servers, so that the first client establishes a communication connection with the target game server, thereby avoiding the waste of server resources caused by the scattered distribution of players in different game servers, improving the resource utilization of the game server, and by increasing the concentration of players in the game server, making the activity between players in the game server higher, thereby improving the player's gaming experience.

[0101] The following combination Figure 3 A possible implementation of the above S30 is described below. Figure 3 , which is a flow chart of the second embodiment of the server allocation method provided by the present invention, as shown Figure 3 As shown, the above S30 includes:

[0102] S31: According to the identifier of the preset game mode, determine at least one idle game server corresponding to the preset game mode from multiple idle game servers.

[0103] In this embodiment, multiple game servers have the same or different game modes, and different game modes correspond to different game play styles. When a player runs a first game client on a terminal device and successfully logs in to a character server through the first game client, the terminal device's graphical user interface displays multiple game modes corresponding to the online game. After the player selects a preset game mode from the multiple game modes, the character server sends a game allocation request containing an identifier of the preset game mode to a central server. The central server's storage medium pre-stores game modes corresponding to multiple game servers. Based on the identifier of the preset game mode, the central server determines at least one idle game server corresponding to the preset game mode from multiple idle game servers.

[0104] In some embodiments, the distribution of game modes can be: each game server has at least one game mode, and each game mode is set on at least one game server.

[0105] Specifically, in order to enrich the gameplay of online games, developers will develop multiple different game modes in online games, and set each game mode on at least one game server based on the number of players that different game modes can attract.

[0106] In some embodiments, the method of displaying multiple game modes corresponding to the online game on the graphical user interface of the terminal device can be: displaying the world map or gameplay list of the online game on the graphical user interface of the terminal device, each node in the world map or each option in the gameplay list corresponds to a game mode, and the player can select a game mode from multiple nodes on the world map or multiple options in the gameplay list.

[0107] In some embodiments, the method for determining at least one idle game server corresponding to a preset game mode can also be: based on the identifier of the preset game mode, determine at least one game server corresponding to the preset game mode from multiple game servers, and then based on the number of online players, determine at least one idle game server from at least one game server corresponding to the preset game mode.

[0108] S32: According to the number of online players of at least one idle game server, determine a game server with the largest number of online players from the at least one idle game server as a target game server.

[0109] In this embodiment, after determining at least one idle game server corresponding to the preset game mode, the central server selects the idle game server with the largest number of online players from the at least one idle game server corresponding to the preset game mode as the target game server.

[0110] The server allocation method provided in the above embodiment determines the target game server with the largest number of online players corresponding to the preset game mode from multiple idle game servers based on the identifier of the preset game mode, so that the first client establishes a communication connection with the target game server, thereby avoiding the waste of server resources caused by the scattered distribution of players of the same game mode in different game servers, improving the resource utilization of the game server, and by increasing the aggregation of players of the same game mode in the game server corresponding to the game mode, the activity between players in the game server of the game mode is higher, thereby improving the player's gaming experience.

[0111] Based on the above embodiment, this embodiment of the application also provides a server allocation method. Figure 4 , which is a flow chart of the third embodiment of the server allocation method provided by the present invention, as shown Figure 4 As shown, the above S30 includes:

[0112] S33: Sort the idle game servers according to the number of online players in the idle game servers.

[0113] S34: According to the sorted plurality of idle game servers, the game server with the largest number of online players is determined as the target game server.

[0114] According to the above records, when selecting a target game server from a list of idle game servers, it is necessary to traverse multiple idle game servers in the list in sequence, compare the number of online players of the current space game server with that of the previous idle game server, and only after traversing the last idle game server can the target game server with the largest number of online players be determined. The speed and efficiency of the traversal process are relatively low.

[0115] In this embodiment, in order to improve the speed and efficiency of determining the target game server, the central server can pre-sort multiple idle game servers in the idle game server list according to the number of online players of the multiple idle game servers, so that when receiving the game allocation request sent by the role server, the game server with the largest number of online players is directly determined as the target game server based on the sorting result in the idle game server list.

[0116] In an optional embodiment, the idle game servers may be sorted and numbered from largest to smallest according to the number of online players on the idle game servers, and the idle game server with the smallest number may be determined as the target game server.

[0117] In this embodiment, the central server preorders and numbers the multiple idle game servers in the idle game server list according to the number of online players of the multiple idle game servers in descending order. The idle game server with a larger number of online players has a smaller number, and the idle game server with a smaller number of online players has a larger number. When the central server receives the game allocation request sent by the role server, the idle game server with the smallest number can be directly determined as the target game server according to the pre-recorded ordering result in the idle game server list.

[0118] In another optional embodiment, the multiple idle game servers can be reordered and numbered according to the number of online players of the multiple idle game servers in ascending order, and the idle game server with the largest number can be determined as the target game server.

[0119] In this embodiment, the central server preorders and numbers the multiple idle game servers in the idle game server list according to the number of online players of the multiple idle game servers in descending order. The idle game server with a larger number of online players has a smaller number, and the idle game server with a smaller number of online players has a larger number. When the central server receives the game allocation request sent by the role server, the idle game server with the smallest number can be directly determined as the target game server according to the pre-recorded ordering result in the idle game server list.

[0120] It should be noted that, after the first game client establishes a connection with the target game server, the target game server will immediately send a notification message to the central server to indicate that the first game client establishes a connection with the target game server, and the central server will update the number of online players of the target game server and the ordering result in the idle game server list according to the notification message. When the number of online players of the target game server reaches the preset player number threshold, the target game server is deleted from the idle game server list.

[0121] The server allocation method provided in the above embodiments can reorder the multiple idle game servers according to the number of online players of the multiple idle game servers, and directly determine the game server with the largest number of online players as the target game server according to the ordering result, thereby improving the speed and efficiency of determining the target game server from the multiple idle game servers, and facilitating the game client to connect to the target game server more quickly.

[0122] On the basis of the above embodiments, the present embodiment further provides a server allocation method. Please refer to Figure 5 The flowchart of the fourth embodiment of the server allocation method provided by the present application is shown in Figure 5 The above S30 includes:

[0123] S35: Calculate the load balancing degrees of the plurality of idle game servers according to the online player numbers of the plurality of idle game servers and the preset player number threshold.

[0124] S36: Determine the game server with the maximum load balancing degree as the target game server according to the load balancing degrees of the plurality of idle game servers.

[0125] In addition to determining the target game server directly according to the online player numbers of the plurality of idle game servers, in the embodiment, the load balancing degrees of the plurality of idle game servers can also be calculated according to the online player numbers of the plurality of idle game servers and the preset player number threshold, and the idle game server with the maximum load balancing degree can be determined as the target game server according to the load balancing degrees of the plurality of idle game servers. The load balancing degree can represent the player number and the player aggregation degree of the idle game server. The higher the load balancing degree of the idle game server is, the more the player number of the idle game server is, and the higher the player aggregation degree is. The lower the load balancing degree of the idle game server is, the less the player number of the idle game server is, and the lower the player aggregation degree is. For example, the calculation method of the load balancing degree can be the ratio of the online player number to the preset player number threshold.

[0126] In some embodiments, when the central server updates the online player number of the target game server according to the notification message of the target game server, the load balancing degree of the target game server is also updated in real time. When the load balancing degree of the target game server is 100%, the target game server is no longer an idle game server.

[0127] The server allocation method provided in the above embodiments calculates the load balancing degrees of the plurality of idle game servers according to the online player numbers of the plurality of idle game servers and the preset player number threshold, so as to determine the target game server with the maximum load balancing degree from the plurality of idle game servers, and make the first client establish a communication connection with the target game server. This avoids the waste of server resources caused by the scattered distribution of players in different game servers, improves the resource utilization rate of the game server, and improves the activity degree between players in the game server by increasing the aggregation degree of players in the game server, thereby improving the game experience of the players.

[0128] On the basis of the above embodiments, the embodiments of the present application further provide a server allocation method. Please refer to Figure 6 The flowchart of the fifth embodiment of the server allocation method provided by the present application is shown in Figure 6 The method further includes:

[0129] S41: receiving a notification message sent by the target game server, the notification message being used to indicate that the second game client exits from the target game server.

[0130] S42: updating the number of online players of the target game server according to the notification message.

[0131] In the embodiment, the second game client is a game client corresponding to one of the online players of the target game server, when the second game client exits from the target game server, the target game server sends a notification message to the center server, and the center server reduces the number of online players of the target game server by one according to the notification message.

[0132] In some embodiments, the second game client exiting from the target game server can return the main interface of the network game to the player, or the second game client directly exits from the role server. The main interface of the network game can be a world map or a game list interface.

[0133] It should be noted that when all the online players in the target game server exit, the target game server enters a dormant state, that is, the target game server only occupies a storage medium, but does not consume the resources of the processor, which can effectively avoid the waste of server resources.

[0134] If the target game server determined from the plurality of game servers is in a dormant state, the target game server is only pulled up when the game client requests to establish a communication connection with the target game server, which can effectively avoid the waste of server resources.

[0135] Please refer to Figure 7 , the server allocation method provided by the present application, as shown in Figure 7 , the method comprises:

[0136] S101: The game client determines the address of the role server according to the player identity information.

[0137] S102: The game client sends a login request to the role server according to the address of the role server, so as to log in to the role server.

[0138] S103: The role server sends a game allocation request to the center server after determining that the game client logs in successfully.

[0139] S104: The center server determines a target game server from a plurality of game servers according to the game allocation request.

[0140] S105: The center server sends the identifier of the target game server to the role server.

[0141] S106: The role server determines the address of the target game server according to the identifier of the target game server.

[0142] S107: The role server sends the address of the target game server to the game client.

[0143] S108: The game client establishes a communication connection with the target game server according to the address of the target game server.

[0144] S109: The target game server sends a first notification message to the center server to instruct the center server to increase the number of online players of the target game server.

[0145] S110: The center server increases the number of online players of the target game server according to the first notification message.

[0146] Further, the method further comprises:

[0147] S201: The game client exits the target game server.

[0148] S202: The target game server sends a second notification message to the center server to instruct the center server to reduce the number of online players of the target game server.

[0149] S203: The center server reduces the number of online players of the target game server according to the second notification message.

[0150] On the basis of the above-mentioned embodiments, the embodiments of the present application further provide a server allocation device. Please refer to Figure 8 The structural schematic diagram of the server allocation device provided by the present application is shown in Figure 8 The device comprises:

[0151] The request receiving module 100 is configured to receive the game allocation request of the first game client sent by the role server.

[0152] The idle game server determining module 200 is configured to determine the game servers whose number of online players does not reach the preset player number threshold from the plurality of game servers as a plurality of idle game servers.

[0153] The target game server determining module 300 is configured to determine the game server with the largest number of online players from the idle game servers as the target game server according to the number of online players of the plurality of idle game servers.

[0154] The identification sending module 400 is used to send the identification of the target game server to the role server. The identification of the target game server is used to instruct the role server to notify the first game client to establish a communication connection with the target game server according to the identification, so that the target game server executes the game logic corresponding to the first game client.

[0155] The server allocation device provided in the above embodiment determines, based on the game allocation request of the first game client sent by the character server, a target game server with the largest number of online players and the number of online players from multiple game servers, so that the first client establishes a communication connection with the target game server, thereby avoiding the waste of server resources caused by the scattered distribution of players in different game servers, improving the resource utilization of the game server, and by increasing the concentration of players in the game server, making the activity between players in the game server higher, thereby improving the player's gaming experience.

[0156] Optionally, the game allocation request includes: an identifier of a preset game mode; the target game server determination module 300 includes:

[0157] a game mode selection unit, configured to determine, based on an identifier of the preset game mode, at least one idle game server corresponding to the preset game mode from a plurality of idle game servers;

[0158] The target game server determining unit is configured to determine, based on the number of online players of at least one idle game server, a game server with the largest number of online players from among the at least one idle game server as a target game server.

[0159] Optionally, each game server has at least one game mode, and each game mode is set on at least one game server.

[0160] Optionally, the target game server determination module 300 includes:

[0161] A sorting unit, configured to sort the plurality of idle game servers according to the number of online players in the plurality of idle game servers;

[0162] The target game server determination unit is further configured to determine, based on the sorted plurality of idle game servers, the game server with the largest number of online players as the target game server.

[0163] Optionally, a sorting unit is specifically configured to sort and number the plurality of idle game servers from largest to smallest according to the number of online players on the plurality of idle game servers;

[0164] The target game server determination unit is specifically configured to determine the idle game server with the smallest number as the target game server.

[0165] Optionally, the sorting unit is specifically configured to sort and number the plurality of idle game servers in ascending order according to the number of online players of the plurality of idle game servers.

[0166] The target game server determination unit is specifically configured to determine the idle game server with the largest number as the target game server.

[0167] Optionally, the target game server determination module 300 comprises:

[0168] The balance degree calculation unit is configured to calculate the load balance degree of the plurality of idle game servers according to the number of online players of the plurality of idle game servers and the preset player number threshold.

[0169] The target game server determination unit is further configured to determine the game server with the largest load balance degree as the target game server according to the load balance degree of the plurality of idle game servers.

[0170] Optionally, the apparatus further comprises:

[0171] The number updating module is configured to update the number of online players of the target game server.

[0172] Optionally, the apparatus further comprises:

[0173] The notification message receiving module is configured to receive a notification message sent by the target game server, the notification message being used to instruct the second game client to exit from the target game server.

[0174] The number updating module is further configured to update the number of online players of the target game server according to the notification message.

[0175] The apparatus is used to execute the method provided by the foregoing embodiments, and has similar implementation principles and technical effects, which will not be described here in detail.

[0176] The above modules can be one or more integrated circuits configured to implement the above methods, for example, one or more application specific integrated circuits (ASICs), or one or more microprocessors, or one or more field programmable gate arrays (FPGAs), etc. For another example, when a certain module above is implemented in the form of a processing element scheduling code, the processing element can be a general-purpose processor, such as a central processing unit (CPU) or other processor that can invoke program code. For another example, the modules can be integrated together to implement in the form of a system on a chip (SOC).

[0177] Reference is made to Figure 9 The schematic diagram of the server provided by the present application is shown in Figure 9 The server 500 includes a processor 501, a storage medium 502, and a bus. The storage medium 502 stores program instructions executable by the processor 501. When the server 500 is running, the processor 501 communicates with the storage medium 502 through the bus. The processor 501 executes the program instructions to perform the embodiments of the above server allocation method. For example, the server 500 can be the center server 20 in the game server system as shown in Figure 1

[0178] Specifically, the processor executes the steps of the above server allocation method, which includes:

[0179] receiving a game allocation request of the first game client sent by the role server;

[0180] determining, from the plurality of game servers, a game server whose number of online players does not reach a preset player number threshold as a plurality of idle game servers;

[0181] determining, from the idle game servers, a game server with the largest number of online players as a target game server according to the number of online players of the idle game servers;

[0182] sending an identifier of the target game server to the role server, the identifier of the target game server being used to instruct the role server to inform the first game client to establish a communication connection with the target game server according to the identifier, so that the target game server executes game logic corresponding to the first game client.

[0183] ​The server allocation method executed by the processor in the above embodiment, based on the game allocation request of the first game client sent by the character server, determines from multiple game servers the target game server with the largest number of online players and the number of online players that has not reached a preset player number threshold, so that the first client establishes a communication connection with the target game server, thereby avoiding the waste of server resources caused by the scattered distribution of players in different game servers, improving the resource utilization of the game server, and by increasing the concentration of players in the game server, making the activity between players in the game server higher, thereby improving the player's gaming experience.

[0184] Optionally, the present invention further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the computer program executes the embodiment of the above-mentioned server allocation method. Specifically, the steps of executing the above-mentioned server allocation method by the computer program include:

[0185] Receive a game allocation request from a first game client sent by the role server;

[0186] Determining, from the plurality of game servers, game servers whose number of online players does not reach a preset player number threshold as a plurality of idle game servers;

[0187] According to the number of online players on multiple idle game servers, determine the game server with the largest number of online players from the idle game servers as the target game server;

[0188] The identifier of the target game server is sent to the role server. The identifier of the target game server is used to instruct the role server to notify the first game client to establish a communication connection with the target game server according to the identifier, so that the target game server executes the game logic corresponding to the first game client.

[0189] The server allocation method executed by the computer program in the above embodiment, based on the game allocation request of the first game client sent by the character server, determines from multiple game servers the target game server with the largest number of online players and the number of online players that has not reached a preset player number threshold, so that the first client establishes a communication connection with the target game server, thereby avoiding the waste of server resources caused by the scattered distribution of players in different game servers, improving the resource utilization of the game server, and by increasing the concentration of players in the game server, making the activity between players in the game server higher, thereby improving the player's gaming experience.

[0190] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0191] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0192] In addition, the functional units in various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or hardware plus software functional units.

[0193] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor (English: processor) to perform some steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory (English: Read-Only Memory, abbreviated: ROM), a random access memory (English: Random Access Memory, abbreviated: RAM), a magnetic disk or an optical disk, and other media that can store program code.

[0194] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.

Claims

1. A server allocation method, characterized in that: Applied to a central server, the method includes: Receive a game allocation request from a first game client sent by the role server; Determining, from the plurality of game servers, game servers whose number of online players does not reach a preset player number threshold as a plurality of idle game servers; According to the number of online players of the plurality of idle game servers, determining a game server with the largest number of online players from the idle game servers as a target game server; The identifier of the target game server is sent to the character server, where the identifier of the target game server is used to instruct the character server to notify the first game client to establish a communication connection with the target game server according to the identifier, so that the target game server executes the game logic corresponding to the first game client.

2. The method according to claim 1, wherein The game allocation request includes: an identifier of a preset game mode; and determining, based on the number of online players on the plurality of idle game servers, a game server with the largest number of online players as a target game server from among the idle game servers, includes: Determining, according to the identifier of the preset game mode, at least one idle game server corresponding to the preset game mode from the plurality of idle game servers; According to the number of online players of the at least one idle game server, the game server with the largest number of online players is determined from the at least one idle game server as the target game server.

3. The method according to claim 2, wherein Each game server has at least one game mode, and each game mode is set on at least one game server.

4. The method according to claim 1, wherein The step of determining, based on the number of online players on the plurality of idle game servers, a game server with the largest number of online players as a target game server comprises: sorting the plurality of idle game servers according to the number of online players on the plurality of idle game servers; According to the sorted plurality of idle game servers, the game server with the largest number of online players is determined as the target game server.

5. The method according to claim 4, wherein The sorting of the plurality of idle game servers according to the number of online players of the plurality of idle game servers comprises: Sort and number the plurality of idle game servers from largest to smallest according to the number of online players on the plurality of idle game servers; The step of determining, based on the sorted plurality of idle game servers, the game server with the largest number of online players as the target game server comprises: Determine the idle game server with the smallest number as the target game server.

6. The method according to claim 4, wherein The sorting of the plurality of idle game servers according to the number of online players of the plurality of idle game servers comprises: Sort and number the plurality of idle game servers from smallest to largest according to the number of online players on the plurality of idle game servers; The step of determining, based on the sorted plurality of idle game servers, the game server with the largest number of online players as the target game server comprises: Determine the idle game server with the largest number as the target game server.

7. The method according to claim 1, wherein The step of determining, based on the number of online players on the plurality of idle game servers, a game server with the largest number of online players as a target game server comprises: Calculating the load balancing degree of the plurality of idle game servers according to the number of online players of the plurality of idle game servers and the preset player number threshold; According to the load balancing degrees of the plurality of idle game servers, the game server with the greatest load balancing degree is determined as the target game server.

8. The method according to claim 1, wherein After sending the identifier of the target game server to the character server, the method further includes: Update the number of online players of the target game server.

9. The method according to claim 1, wherein The method further comprises: receiving a notification message sent by the target game server, wherein the notification message is used to instruct the second game client to exit from the target game server; According to the notification message, the number of online players of the target game server is updated.

10. A game server system, characterized in that: The game server system includes: at least one character server, a central server and multiple game servers; The at least one character server is communicatively connected to the central server, and the central server is also communicatively connected to the multiple game servers. The central server is used to execute the steps of the server allocation method described in any one of claims 1-9 above.

11. A server allocation device, characterized in that: Applied to a central server, the device includes: A request receiving module, configured to receive a game allocation request from a first game client sent by a role server; An idle game server determination module, configured to determine, from a plurality of game servers, game servers whose number of online players does not reach a preset player number threshold as a plurality of idle game servers; a target game server determination module, configured to determine, based on the number of online players on the plurality of idle game servers, a game server with the largest number of online players from among the idle game servers as a target game server; An identification sending module is used to send the identification of the target game server to the role server, and the identification of the target game server is used to instruct the role server to notify the first game client to establish a communication connection with the target game server according to the identification, so that the target game server executes the game logic corresponding to the first game client.

12. A server, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor. When the server is running, the processor and the storage medium communicate via the bus, and the processor executes the program instructions to perform the steps of the server allocation method according to any one of claims 1 to 9.

13. A computer-readable storage medium, characterized in that The storage medium stores a computer program, which, when executed by a processor, executes the steps of the server allocation method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Game scene management method and scene management server

    CN107147730A

Cited By

  • Self-assembling geometric networks

    US20250375702A1