Game management method, device and game server

By creating the identification information of the game room in the game server and obtaining management threads, and uniformly managing multiple game rooms of the same type, the problems of high code coupling and low development and operation and maintenance efficiency in game development are solved, and efficient game management and optimized resource use are achieved.

CN114642883BActive Publication Date: 2025-07-08BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210334037.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-31
Publication Date
2025-07-08
Estimated Expiration
2042-03-31

AI Technical Summary

Technical Problem

In the prior art, the game development method of interactive mini-games or mini-programs requires the design of the game room and status management process for each game, resulting in high code coupling and a large number of problems of repeated development and low development operation and maintenance efficiency.

Method used

Add the identification information of the game room to the target game room list and obtain the game management target thread bound to the list, and use the thread to manage multiple game rooms of the same type to achieve unified game room management.

Benefits of technology

It solves the problems of high code coupling and repeated development, improves development and operation and maintenance efficiency, and ensures the normal operation and user experience of the game through real-time management and resource optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114642883B_ABST
    Figure CN114642883B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a game management method, apparatus and game server, including: in response to a game access request for a first game, creating a first game room; based on the game type of the first game running in the first game room, adding the identification information of the first game room to a target game room list, where the target game room list includes the identification information of at least one second game room corresponding to a second game having the same game type as the first game; obtaining a game management target thread bound to the target game room list; and invoking the game management target thread to manage each game room corresponding to the target game room list.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of game data processing, and in particular, to a game management method, apparatus, and game server. Background Art

[0002] In the related art, a separate management process for game rooms and states is designed for each game. However, for interactive mini-games or applets, interactive games generally create a room, then users enter the game room to start the game, and the in-game logic is controlled. Finally, the game ends. In the game, there is mainly interaction between users, and there are not many other differences. That is, the game operation processes are basically the same. Therefore, it is not necessary to separately set up a management process for game rooms and states for each game. Therefore, the development methods in the related art often lead to a high degree of code coupling, a large amount of duplicate development, and low development and operation and maintenance efficiency. Summary of the Invention

[0003] The present disclosure provides a game management method, apparatus, and game server to at least solve the problems of high code coupling, a large amount of duplicate development, and low development and operation and maintenance efficiency caused by the need to separately design a management process for game rooms and states for each game in the game development method in the related art. The technical solution of the present disclosure is as follows:

[0004] According to a first aspect of an embodiment of the present disclosure, a game management method is provided, including: in response to a game access request for a first game, creating a first game room; based on the game type of the first game running in the first game room, adding the identification information of the first game room to a target game room list, where the target game room list includes the identification information of at least one second game room corresponding to a second game having the same game type as the first game; obtaining a game management target thread bound to the target game room list; and calling the game management target thread to manage each game room corresponding to the target game room list.

[0005] Optionally, calling the game management target thread to manage each game room corresponding to the target game room list includes: selecting a game management target thread from a game management thread group, and traversing the target game room list through the game management target thread, where the traversal result is used to indicate an operation that a target user should perform on a target game at the current time, and the target game room includes: the first game room and the second game room; within a first preset duration after the traversal ends, if no operation instruction of the target user is detected, a prompt message is displayed in the target game room, where the prompt message is used to prompt the target user to operate on the target game.

[0006] Optionally, the above method further includes: after the expiration of the first preset duration, detecting whether an operation instruction from the target user is received within the second preset duration; in the case of receiving the operation instruction, executing the operation instruction and updating the state of the target game room according to the operation instruction, where the first preset duration is less than the second preset duration; in the case of not receiving the operation instruction, performing the operation indicated by the traversal result to obtain an execution result, and updating the state of the target game room according to the execution result.

[0007] Optionally, calling a game management target thread to manage each game room corresponding to the target game room list includes: calling the game management target thread to obtain the running attributes of each game in the running state of each game room; determining the size of the first processing resource occupied by each game room according to the running attributes; obtaining the size of the second processing resource corresponding to the target game room list, and determining the number of game rooms that can be added to the target game room list according to the size of the second processing resource and the size of the first processing resource.

[0008] Optionally, determining the number of game rooms that can be added to the target game room list according to the size of the second processing resource and the size of the first processing resource includes: determining the average value of the processing resources occupied by each game room according to the size of the first processing resource occupied by each game room; determining the total number of game rooms that can be supported in the target game room list according to the ratio of the size of the second processing resource to the average value; determining the number of currently running game rooms; and obtaining the number of currently addable game rooms according to the difference between the total number of game rooms and the number of currently running game rooms.

[0009] Optionally, the above method further includes: closing the game service of the game server for at least providing the first game by the following method: disconnecting the connection with the registration server to refuse to respond to the creation request from the registration server, where the creation request is used to create a game room in the game list; determining the remaining working duration of the game server, and triggering a countdown corresponding to the remaining working duration; and controlling the game server to close the game service when the countdown ends.

[0010] Optionally, creating a first game room includes: determining the identity identifier of the game account corresponding to the game access request;

[0011] determining the identifier information of the first game room according to the identity identifier; and creating a first game room corresponding to the identifier information of the first game room, where the identifier information corresponds to the first game room one by one.

[0012] According to a second aspect of the embodiments of the present disclosure, a game management device is provided, including: a creation module configured to execute a game access request for a first game and create a first game room; an addition module configured to execute adding identification information of the first game room to a target game room list based on the game type of the first game running in the first game room, where the target game room list includes identification information of at least one second game room corresponding to a second game having the same game type as the first game; an acquisition module configured to acquire a game management target thread bound to the target game room list; and an invocation module configured to invoke the game management target thread to manage each game room corresponding to the target game room list.

[0013] Optionally, the invocation module includes: a traversal unit configured to select a game management target thread from a game management thread group and traverse the target game room list through the game management target thread, where the traversal result is used to indicate an operation that a target user should perform on a target game at the current time, and the target game room includes: the first game room and the second game room; and a display unit configured to, within a first preset duration after the traversal ends, if no operation instruction of the target user is detected, display a prompt message in the target game room, where the prompt message is used to prompt the target user to operate on the target game.

[0014] Optionally, the device further includes: a reception unit configured to, after the first preset duration ends, detect whether an operation instruction of the target user is received within a second preset duration; and an update unit configured to, in the case of receiving the operation instruction, execute the operation instruction and update the state of the target game room according to the operation instruction, where the first preset duration is less than the second preset duration; and in the case of not receiving the operation instruction, execute the operation indicated by the traversal result to obtain an execution result and update the state of the target game room according to the execution result.

[0015] Optionally, the invocation module includes: an invocation unit configured to invoke the game management target thread to obtain the running attributes of each game running in each game room; a first determination unit configured to determine the size of the first processing resources occupied by each game room according to the running attributes; and a second determination unit configured to obtain the size of the second processing resources corresponding to the target game room list, and determine the number of game rooms that can be added to the target game room list according to the size of the second processing resources and the size of the first processing resources.

[0016] Optionally, the second determination unit includes: a first determination subunit configured to determine an average value of the processing resources occupied by each game room according to the size of the first processing resources occupied by each game room; a second determination subunit configured to determine the total number of game rooms that can be supported in the target game room list according to the ratio of the second processing resource size to the average value; a third determination subunit configured to determine the number of game rooms currently running; and a fourth determination subunit configured to obtain the number of game rooms that can be added currently according to the difference between the total number of game rooms and the number of game rooms currently running.

[0017] Optionally, the creation module includes: a third determination unit configured to determine the identity identifier of the game account corresponding to the game access request; a creation unit configured to determine the identification information of the first game room according to the identity identifier; and create the first game room corresponding to the identification information of the first game room, where the identification information corresponds to the first game room one by one.

[0018] According to the third aspect of the embodiments of the present disclosure, there is also provided a game server, including: a processor; a memory for storing instructions executable by the processor; wherein, the processor is configured to execute the instructions to implement any one of the game management methods.

[0019] According to the fourth aspect of the embodiments of the present disclosure, there is also provided a computer-readable storage medium, when the instructions in the computer-readable storage medium are executed by the processor of the game server, enabling the game server to execute any one of the game management methods.

[0020] According to the fifth aspect of the embodiments of the present disclosure, there is also provided a computer program product, including computer programs / instructions, and when the computer programs / instructions are executed by the processor, any one of the game management methods is implemented.

[0021] The technical solutions provided by the embodiments of the present disclosure at least bring the following beneficial effects:

[0022] By responding to the game access request for the first game, creating the first game room; based on the game type of the first game running in the first game room, adding the identification information of the first game room to the target game room list; then, obtaining the game management target thread bound to the target game room list, and managing each game room corresponding to the target game room list based on the game management target thread, the technical effect of managing multiple game rooms of the same type of game based on the same thread management group is achieved, and the problem that the game development method in the related art needs to design a set of management processes for game rooms and states for each game separately, resulting in a high code coupling degree, a large amount of duplicate development, and low development and operation and maintenance efficiency is solved.

[0023] It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, and do not limit the present disclosure. Description of the Drawings

[0024] The drawings herein are incorporated into the specification and form a part of this specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure, and do not constitute an undue limitation on the present disclosure.

[0025] Figure 1 is a flowchart of a game management method shown according to an exemplary embodiment.

[0026] Figure 2 is a schematic structural diagram of a game management system shown according to an exemplary embodiment.

[0027] Figure 3 is a schematic architecture diagram of an alternative game management system shown according to an exemplary embodiment.

[0028] Figure 4 is a schematic structural diagram of a game management device shown according to an exemplary embodiment.

[0029] Figure 5 is a schematic structural diagram of a game server shown according to an exemplary embodiment. Detailed Embodiments

[0030] To enable those of ordinary skill in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.

[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above drawings are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that such data used may be interchanged under appropriate circumstances so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0032] Figure 1 is a flowchart of a game management method shown according to an exemplary embodiment, as Figure 1 shown, the method is applied to the management of game operation and includes the following steps:

[0033] In step S11, in response to a game access request for a first game, a first game room is created;

[0034] In step S12, based on the game type of the first game running in the first game room, add the identification information of the first game room to the target game room list, where the target game room list includes the identification information of at least one second game room corresponding to a second game having the same game type as the first game;

[0035] In step S13, obtain the game management target thread bound to the target game room list;

[0036] In step S14, call the game management target thread to manage each game room corresponding to the target game room list.

[0037] In this game management method, by responding to a game access request for the first game, create the first game room, then based on the game type of the first game running in the first game room, add the identification information of the first game room to the target game room list, and obtain the game management target thread bound to the target game room list; finally, call the game management target thread to manage each game room corresponding to the target game room list, achieving the technical effect of managing multiple game rooms of the same type of game based on the same thread management group, and solving the problem of high code coupling degree caused by the need to design a separate management process for game rooms and states for each game in the related game development method, with a large amount of repetitive development and low development and operation and maintenance efficiency.

[0038] In some embodiments of the present application, call the game management target thread to manage each game room corresponding to the target game room list. The specific implementation manner may be to select the game management target thread from the game management thread group and traverse the target game room list through the game management target thread. It should be noted that the traversal result is used to indicate the operation that the target user should perform on the target game at the current time. Among them, the target game room includes: the first game room and the second game room, that is, the target game room includes all game rooms in the target game room list. Within the first preset duration after the traversal ends, if no operation instruction of the target user is detected, a prompt message is displayed in the target game room, where the prompt message is used to prompt the target user to operate on the target game. That is, the main function of traversing the room is to prompt the user to operate. If no user operation is detected within the preset duration, the user is prompted to operate. For example, when the currently running game is Dou Di Zhu and it's Zhang San's turn to play a card, if Zhang San's operation has not been detected within 10 seconds, the game management thread automatically prompts Zhang San to play a card and can give specific card-playing strategies.

[0039] By traversing the game room list through the game management thread, the purpose of polling and managing each game room in the game room list can be achieved, thereby updating the game status of each game room in real time, and the game status of the user can be prompted in real time, improving the user's game experience.

[0040] Optionally, after the end of the first preset duration, it is possible to detect whether an operation instruction of the target user is received within the second preset duration, where the first preset duration can be less than the second preset duration; in the case of receiving the operation instruction, the operation instruction can be executed, and the state of the target game room can be updated according to the operation instruction, while in the case of not receiving the operation instruction, the operation indicated by the traversal result is executed to obtain an execution result, and the state of the target game room is updated according to the execution result.

[0041] Still taking the current running game as Dou Di Zhu as an example, when it is Zhang San's turn to play a card, in the case where the first preset duration has ended, for example, when the reminder period of 10 seconds has ended, then within the next 15 seconds (the second preset duration), it is possible to detect whether an operation instruction from Zhang San is received. If an operation instruction from Zhang San is received within this period, then play a card based on the card-playing strategy indicated by the operation instruction, while if no operation instruction from Zhang San is still received within this period, automatically play a card based on the card-playing strategy determined by the target game management thread, and update the game result.

[0042] It is easy to notice that by calling the game management target thread to traverse the game room list, not only can the game status of each game room be updated in real time and the game status of the user be prompted in real time, but also in the case where no game operation instruction of a certain user is detected, a game operation action can be generated and the game operation action can be automatically executed, ensuring the normal operation of the game, avoiding affecting the game process of other users, and creating a good game experience for users.

[0043] In some optional embodiments of the present application, before managing each game room based on the game management target thread, a game management target thread can be allocated to the game room based on the following steps. Specifically, a query request from the game room management module can be responded to, and the game management target thread can be selected from the game management thread group.

[0044] It should be noted that the game management thread group includes multiple game management threads. When a query request from the game room management module is received, a game management thread corresponding to the game type can be allocated according to the game type managed by the game room management module to manage the game room. Therefore, multiple game rooms of the same game type can be managed based on the same game management thread, avoiding the technical problems of high code coupling degree and large development workload caused by the need to separately design a set of game room management processes for each game.

[0045] Optionally, the game management target thread can also be used to manage the life cycles of each game room. It should be noted that the above life cycles include the entire life cycle of the game from the start of the game, game preparation, rounds of the game, game results, to the end of the game.

[0046] In some alternative embodiments of the present application, by invoking the game management target thread to manage each game room corresponding to the target game room list, it is also possible to invoke the game management target thread to obtain the running attributes of each game in a running state in each game room; determine the size of the first processing resource occupied by each game room according to the running attributes; obtain the size of the second processing resource corresponding to the target game room list, and determine the number of game rooms that can be added to the target game room list according to the second processing resource size and the first processing resource size. By the running attributes of the game, the purpose of flexibly adjusting the number of game rooms that can run in the game room list can be achieved, avoiding game lag caused by a large number of running game rooms, and at the same time, avoiding waste of processing resources caused by a small number of running game rooms.

[0047] It should be noted that the above running attributes include but are not limited to: the refresh frequency of the game page, and the complexity of the game's processing logic. It can be understood that the faster the refresh frequency of the game page or the higher the logical complexity of the game, the more first processing resources the game occupies in the game room list.

[0048] In some embodiments of the present application, determining the number of game rooms that can be added to the target game room list according to the second processing resource size and the first processing resource size can be achieved through the following steps:

[0049] Specifically, the average value of the processing resources occupied by each game room can be determined according to the size of the first processing resource occupied by each game room. Then, according to the ratio of the second processing resource size to the average value, the total number of game rooms that can be supported in the target game room list can be determined, and the number of currently running game rooms can be determined; finally, the difference between the total number of game rooms and the number of currently running game rooms is obtained to get the number of game rooms that can be added currently. It is easy to note that by calculating in real time the number of game rooms that can be added to the game room list according to the running attributes of the game, new game rooms can be added in real time and dynamically, thereby making full use of the redundant processing resources of the game room list.

[0050] For example, in the current target game room list, there are 4 running game rooms, and the average size of the first resource occupied by each game room is 10M. The size of the second processing resource corresponding to the target game room list is 100M. Then, according to the difference, it can be determined that the remaining processing resource size of the target game room list is 60M. If calculated based on the processing resource occupied by each game room being 10M, then the currently addable game rooms are 6.

[0051] In some embodiments of the present application, determining the number of addable game rooms in the target game room list can also be achieved through the following steps:

[0052] Specifically, the size of the first processing resource occupied by each currently running game room in the target game room list can be obtained, and the sizes of the first processing resources are summed to obtain the total processing resource size occupied by each game room. Then, the size of the second processing resource configured for the target game room list is obtained, and the difference between the size of the second processing resource and the total processing resource size occupied by each game room is determined. Then, the game type of the game rooms running in the target game room list is obtained, and the maximum resource occupancy value required for the game rooms of this game type is determined. The number of addable game rooms is determined based on the difference and the maximum resource occupancy value.

[0053] For example, in the current target game room list, there are 3 running game rooms, and the sizes of the first processing resources occupied by each game room are 4M, 6M, and 10M respectively. Then the total processing resource size occupied is 20M. The size of the second processing resource corresponding to the target game room list is 100M. Then, according to the difference between the two, it can be determined that the remaining processing resource size of the target game room list is 80M. Assuming that the maximum processing resource occupied by a single game room is 20M, then it can be determined that the currently addable game rooms are 4.

[0054] It should be noted that summing the sizes of the first processing resources corresponding to each game room to obtain the total processing resource size occupied by each game room can ensure that the obtained resource occupancy value is relatively accurate. At the same time, determining the number of addable game rooms based on the maximum resource occupancy value required for a single game room ensures that the game room list can allocate processing resources to the game rooms to be added according to the maximum resource occupancy value of a single game room. Furthermore, it ensures that after the game rooms are added to the game room list, there will be no lag or even downtime due to insufficient processing resources.

[0055] During the actual operation of the game server, for some reasons, such as server failures, or regular maintenance, upgrades, etc., it is sometimes inevitable to shut down and maintain the game server. Before shutting down the game server, in some embodiments of the present application, the game service of the game server for at least providing the first game can be shut down in the following manner:

[0056] First, the connection with the registration server can be disconnected to reject the creation requests from the registration server. Among them, the creation requests are used to create game rooms in the game list. That is, before the game server is shut down, new game room creation requests are rejected to prevent new game rooms from being added. Secondly, the remaining working duration of the game server can be determined, and a countdown corresponding to the remaining working duration can be triggered. When the countdown ends, the game server is controlled to shut down the game service.

[0057] It should be noted that the above remaining working duration can be determined according to the game duration of the running game rooms. For example, currently, there are game rooms A, B, C, and D running on the game server. Among them, through historical game data, it is predicted that the remaining durations of the games in these four game rooms A, B, C, and D until the end of their respective games are 5, 10, 15, and 20 minutes respectively. Then, in order not to affect the game operation experience of each user, the longest duration of 20 minutes can be used as the remaining working duration of the game server.

[0058] It is easy to notice that through the above game server shutdown control method, it can be ensured that the user's game operations are not interrupted and the user's game experience is not affected, achieving the purpose of graceful shutdown. At the same time, after all users' games end, the upgrade service of the game server can be realized.

[0059] In some embodiments of the present application, creating the first game room can be completed through the following steps:

[0060] Determine the identity identifier of the game account corresponding to the game access request; determine the identifier information of the first game room based on the identity identifier; and create the first game room corresponding to the identifier information of the first game room, where the identifier information corresponds one-to-one with the first game room. For example, if the identity identifier (which can be the account ID) of a player (user) is 01, the unique identifier information of the corresponding game room is 10, and if the identity identifier is 02, the unique identifier information of the corresponding game room is 20.

[0061] Figure 2 A game management system shown according to an exemplary embodiment, the game management system includes: a game room management module 01, a game management thread group 02.

[0062] The game room management module 01 is used to store the first game room created by the game server according to the game access request.

[0063] The game management thread group 02 includes: at least one game management thread, and the game management thread is used to manage the target game room list where the first game room is located.

[0064] In this game management system, the game room management module 01 stores the first game room created by the game server according to the game access request; the game management thread is used to manage the target game room list where the first game room is located, achieving the technical effect of managing the status of multiple game rooms storing the same type of game based on a single thread management group, and solving the problem in the related art that the game development method needs to design a separate management process for the game room and status for each game, resulting in a high degree of code coupling, a large amount of repetitive development, and low development and operation and maintenance efficiency.

[0065] Optionally, the above system further includes: a thread selector, which is used to respond to the allocation request of the game room management module, select a game management target thread from the game management thread group, and allocate the game management target thread to the target game room list.

[0066] In some embodiments of the present application, the game room management module is further used to store the mapping relationship between each game room and the identification information, and after receiving the identification information sent by the game server, determine the game room corresponding to the identification information according to the mapping relationship.

[0067] Figure 3 It is a schematic diagram of the architecture of an optional game management system according to an embodiment of the present disclosure, as Figure 3 shown: The architecture mainly includes:

[0068] The game room management module (Game Room Manager), the game management thread group (Room Thread Group); the game room management module (Game Room Manager) stores the mapping relationship between the game room number (i.e., identification information) and the game room (Game Room), and can quickly find the corresponding game room through the game room number; the game management thread group (Room Thread Group) is a group of threads used to manage all game rooms (operations such as status transition, ending the game, and releasing resources), where each game management thread can manage a group of game rooms; when a game room is created, this room will be bound to a specific game management thread (Thread), and the status transition of this game room throughout its life cycle can be responsible by this game management thread.

[0069] The process of managing a game room is introduced in detail below in conjunction with an optional embodiment:

[0070] 1. Create a game room

[0071] When a user joins the game, the server assigns a globally unique room number and creates a game room corresponding to this room number. Various states required for the game, player information, etc. are stored in the game room. For example, a globally unique game room number is assigned to the user based on the ID of the terminal held by the user.

[0072] 2. Bind the game management thread

[0073] The created game room can be added to a game room list, and this game room list is maintained and managed by a separate game management thread; during the entire life cycle of this game room, it is maintained by the management thread of the current list. It should be noted that the above game room list can be a container for running the game.

[0074] 3. Manage the game room status

[0075] At regular intervals, the game management thread can traverse each room in the list, that is, traverse each game room in the container, and process the game status; if the running game is a small interactive game, since the game status of small interactive games is generally relatively few, the processing time may be very short, and the time for the game management thread to traverse the game room list each time may also be very short; it should be noted that each game management thread only manages one type of game room, so the size of the game room list can be adjusted according to the characteristics of the game to ensure that the delay of game status change is within the required range.

[0076] It can be understood that the game room information can be obtained through the room number. The created game room can be saved in the game room management module. This module mainly stores the mapping relationship between the game room number and the game room, and can quickly find the corresponding game room through the game room number, which is convenient for the upstream service to directly operate on the game room.

[0077] Optionally, the present disclosure can be used to manage small interactive games. The characteristic of such games is that they can end in a relatively short time (generally less than 20 minutes). Based on this characteristic, when the game server is shut down, it will first remove itself from the service registration center. After removal, no new requests to create game rooms will be sent to this game server. This game server can continue to work for a predetermined time (for example, it can be set to 20 minutes) to ensure that all game rooms on the current game server end before shutting down. It can be understood that based on this management method, the user's game experience will not be affected during service upgrade.

[0078] Figure 4 A game management device shown according to an embodiment of the present disclosure, as Figure 4 shown, the game management module includes:

[0079] A creation module 40, configured to execute in response to a game access request for a first game, and create a first game room;

[0080] An addition module 42, configured to execute based on the game type of the first game running in the first game room, add the identification information of the first game room to a target game room list, where the target game room list includes identification information of at least one second game room corresponding to a second game having the same game type as the first game;

[0081] An acquisition module 44, configured to acquire a game management target thread bound to the target game room list;

[0082] An invocation module 46, configured to invoke the game management target thread to manage each game room corresponding to the target game room list.

[0083] In this game management device, the creation module 40 is configured to execute in response to a game access request for a first game and create a first game room; the addition module 42 is configured to execute based on the game type of the first game running in the first game room, add the identification information of the first game room to the target game room list, where the target game room list includes identification information of at least one second game room corresponding to a second game having the same game type as the first game; the acquisition module 44 is configured to acquire a game management target thread bound to the target game room list; the invocation module 46 is configured to invoke the game management target thread to manage each game room corresponding to the target game room list, achieving the technical effect of managing multiple game rooms of the same type of game based on the same thread management group, and solving the problem that the game development method in the related art requires a separate set of management processes for game rooms and states for each game, resulting in a high degree of code coupling, a large amount of repetitive development, and low development and operation and maintenance efficiency.

[0084] In some embodiments of the present application, the invocation module includes: a traversal unit, configured to select a game management target thread from a game management thread group and traverse the target game room list through the game management target thread, where the traversal result is used to indicate the operation that the target user should perform on the target game at the current time, where the target game room includes: the first game room and the second game room; a display unit, configured to, within a first preset duration after the traversal ends, if no operation instruction of the target user is detected, display a prompt message in the target game room, where the prompt message is used to prompt the target user to operate on the target game.

[0085] In some alternative embodiments of the present application, the above device further includes: a receiving unit configured to detect whether an operation instruction of a target user is received within a second preset duration after the end of a first preset duration; an updating unit configured to, in the case of receiving the operation instruction, execute the operation instruction and update the state of the target game room according to the operation instruction, where the first preset duration is less than the second preset duration; and in the case of not receiving the operation instruction, execute the operation indicated by the traversal result to obtain an execution result, and update the state of the target game room according to the execution result.

[0086] In some embodiments of the present application, the calling module includes: a calling unit configured to call a game management target thread to obtain the running attributes of each game in each running game room; a first determining unit configured to determine the size of the first processing resources occupied by each game room according to the running attributes; a second determining unit configured to obtain the size of the second processing resources corresponding to the target game room list, and determine the number of game rooms that can be added in the target game room list according to the ratio between the second processing resources size and the first processing resources size.

[0087] In some alternative embodiments of the present application, the second determining unit includes: a first determining subunit configured to determine the average value of the processing resources occupied by each game room according to the size of the first processing resources occupied by each game room; a second determining subunit configured to determine the total number of game rooms that can be supported in the target game room list according to the ratio between the second processing resources size and the average value; a third determining subunit configured to determine the number of currently running game rooms; a fourth determining subunit configured to obtain the number of currently addable game rooms according to the difference between the total number of game rooms and the number of currently running game rooms.

[0088] In some alternative embodiments of the present application, the creating module includes: a third determining unit configured to determine the identity identifier of the game account corresponding to the game access request; a creating unit configured to determine the identification information of the first game room according to the identity identifier; and create the first game room corresponding to the identification information of the first game room, where the identification information corresponds to the first game room one by one.

[0089] Regarding the device in the above embodiments, the specific manners in which each module executes operations have been described in detail in the embodiments related to the method, and will not be elaborated here.

[0090] Figure 5 A game server shown according to an exemplary embodiment, as Figure 5As shown, the game server includes: a processor 01; a memory 02 for storing executable instructions of the processor 01; wherein, the processor 01 is configured to execute instructions to implement any one of the game management methods.

[0091] In an exemplary embodiment, there is also provided a computer-readable storage medium. When the instructions in the computer-readable storage medium are executed by the processor of the game server, the game server is enabled to execute any one of the game management methods.

[0092] In an exemplary embodiment, there is also provided a computer program product, including a computer program / instructions. When the computer program / instructions are executed by the processor, any one of the game management methods is implemented.

[0093] After considering the specification and practicing the invention disclosed herein, those skilled in the art will readily conceive of other embodiments of the present disclosure. This application is intended to cover any variations, uses, or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common general knowledge or conventional technical means in the technical field not disclosed herein. The specification and embodiments are only to be considered as exemplary, and the true scope and spirit of the present disclosure are pointed out by the following claims.

[0094] It should be understood that the present disclosure is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is only limited by the appended claims.

Claims

1. A game management method, characterized in that, Including: In response to a game access request for a first game, create a first game room; Based on the game type of the first game running in the first game room, add the identification information of the first game room to a target game room list, where the target game room list includes the identification information of at least one second game room corresponding to a second game having the same game type as the first game; Obtain a target game management thread bound to the target game room list; Invoke the target game management thread to manage each game room corresponding to the target game room list; Among them, invoking the target game management thread to manage each game room corresponding to the target game room list includes: Select the target game management thread from a game management thread group and traverse the target game room list through the target game management thread, where the traversal result is used to indicate the operation that a target user should perform on the target game at the current time, where the target game room includes: the first game room and the second game room; Within a first preset duration after the traversal ends, if no operation instruction of the target user is detected, display a prompt message in the target game room, where the prompt message is used to prompt the target user to operate on the target game.

2. The method according to claim 1, wherein The method further includes: After the first preset duration ends, detect whether an operation instruction of the target user is received within a second preset duration; In the case of receiving the operation instruction, execute the operation instruction and update the state of the target game room according to the operation instruction, where the first preset duration is less than the second preset duration; In the case of not receiving the operation instruction, execute the operation indicated by the traversal result to obtain an execution result, and update the state of the target game room according to the execution result.

3. The method according to claim 1, characterized in that, Invoking the target game management thread to manage each game room corresponding to the target game room list includes: Invoke the target game management thread to obtain the running attributes of each game running in each game room; Determine the size of the first processing resources occupied by each game room according to the running attributes; Obtain the size of the second processing resources corresponding to the target game room list, and determine the number of game rooms that can be added in the target game room list according to the size of the second processing resources and the size of the first processing resources.

4. The method according to claim 3, characterized in that, Determining the number of game rooms that can be added in the target game room list according to the size of the second processing resources and the size of the first processing resources includes: Determine the average value of the processing resources occupied by each game room according to the size of the first processing resources occupied by each game room; Determine the total number of game rooms that can be supported in the target game room list according to the ratio of the size of the second processing resources to the average value; Determine the number of currently running game rooms; Obtain the number of currently addable game rooms according to the difference between the total number of game rooms and the number of currently running game rooms.

5. The method according to claim 1, characterized in that, The method further includes: closing the game service of the game server for at least providing the first game in the following manner: Disconnecting from the registration server to reject a creation request from the registration server, where the creation request is used to create a game room in the game list; Determining the remaining working duration of the game server and triggering a countdown corresponding to the remaining working duration; when the countdown ends, controlling the game server to close the game service.

6. The method according to claim 1, wherein Creating a first game room, including: Determining the identity identifier of the game account corresponding to the game access request; Determining the identification information of the first game room based on the identity identifier; and Creating the first game room corresponding to the identification information of the first game room, where the identification information corresponds one-to-one with the first game room.

7. A game management device, characterized in that, Including: A creation module configured to execute in response to a game access request for the first game to create a first game room; An adding module configured to execute adding the identification information of the first game room to a target game room list based on the game type of the first game running in the first game room, where the target game room list includes the identification information of at least one second game room corresponding to a second game having the same game type as the first game; An obtaining module configured to obtain a game management target thread bound to the target game room list; An invocation module configured to invoke the game management target thread to manage each game room corresponding to the target game room list; The invocation module includes: A traversing unit configured to select the game management target thread from a game management thread group and traverse the target game room list through the game management target thread, where the traversal result is used to indicate the operation that a target user should perform on the target game at the current time, where the target game room includes: the first game room and the second game room; A display unit configured to, within a first preset duration after the traversal ends, if no operation instruction of the target user is detected, display a prompt message in the target game room, where the prompt message is used to prompt the target user to operate on the target game.

8. The device according to claim 7, characterized in that, The device further includes: A receiving unit configured to, after the first preset duration ends, detect whether an operation instruction of the target user is received within a second preset duration; An updating unit configured to, in the case of receiving the operation instruction, execute the operation instruction and update the state of the target game room according to the operation instruction, where the first preset duration is less than the second preset duration; and in the case of not receiving the operation instruction, execute the operation indicated by the traversal result to obtain an execution result and update the state of the target game room according to the execution result.

9. The device according to claim 7, characterized in that, The invocation module includes: An invocation unit configured to invoke the game management target thread to obtain the running attributes of each game in a running state of each game room; A first determination unit, configured to determine the size of the first processing resources occupied by each game room according to the running attribute; A second determination unit, configured to obtain the size of the second processing resources corresponding to the target game room list, and determine the number of game rooms that can be added in the target game room list according to the size of the second processing resources and the size of the first processing resources.

10. The device according to claim 9, characterized in that, The second determination unit includes: A first determination subunit, configured to determine the average value of the processing resources occupied by each game room according to the size of the first processing resources occupied by each game room; A second determination subunit, configured to determine the total number of game rooms that can be supported in the target game room list according to the ratio of the size of the second processing resources to the average value; A third determination subunit, configured to determine the number of game rooms that are currently running; A fourth determination subunit, configured to obtain the number of game rooms that can be added currently according to the difference between the total number of game rooms and the number of game rooms that are currently running.

11. The device according to claim 7, wherein The creation module includes: A third determination unit, configured to determine the identity identifier of the game account corresponding to the game access request; A creation unit, configured to determine the identification information of the first game room according to the identity identifier; and create the first game room corresponding to the identification information of the first game room, where the identification information corresponds to the first game room one by one.

12. A game server, characterized in that, It includes: A processor; A memory for storing executable instructions of the processor; Wherein, the processor is configured to execute the instructions to implement the game management method according to any one of claims 1 to 6.

13. A computer-readable storage medium, when the instructions in the computer-readable storage medium are executed by a processor of a game server, enabling the game server to execute the game management method according to any one of claims 1 to 6.

14. A computer program product, comprising a computer program / instructions, characterized in that, The computer program / instructions, when executed by a processor, implement the game management method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Load balancing method for game room servers

    CN109173245A

  • Multimedia data processing method and equipment

    CN112000454A