A game server allocation method, system and storage medium
By collaboratively managing cloud gaming servers through Agent and PaaS servers and directly connecting to idle servers, the waiting problem caused by cloud gaming server allocation is solved, thus improving the user experience.
Patent Information
- Application Number
- CN202211543215.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-02
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2042-12-02
AI Technical Summary
The existing cloud gaming server allocation algorithm causes excessively long client wait times and a poor user experience. This is because the server requested by the client is currently occupied and needs to wait for other clients to release and restart.
By working together with the Agent server and PaaS server, information about idle cloud gaming servers is located and stored in a preset storage space. Clients can directly connect to idle servers, avoiding the need to wait for occupied servers to be released and restarted.
This reduces the waiting time for the client to establish a connection with the cloud gaming server, thus improving the user experience.
Smart Images

Figure CN115869616B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of cloud gaming technology, and in particular to a game server allocation method, system, and storage medium. Background Technology
[0002] Cloud gaming refers to a gaming method based on cloud computing. In this mode, data processing and computation are all performed on cloud gaming servers. Therefore, a suitable cloud gaming server needs to be assigned to the client when logging in.
[0003] Currently, most cloud gaming server allocation algorithms are implemented by having the client request the allocation of a corresponding cloud gaming server, and then assigning the requested server to the client. However, in some cases, the cloud gaming server requested by the client may be in a connected state with other clients, meaning that the requested server is currently occupied. Therefore, it is necessary to wait for other clients to finish using the server and for the cloud gaming server to restart before re-establishing a connection with the client. This results in a long waiting time for the client, leading to a poor user experience. Summary of the Invention
[0004] To address the above technical issues, this application provides a game server allocation method, system, and storage medium.
[0005] Firstly, this application provides a game server allocation method applied to a game server allocation system, the game server allocation system comprising: at least one PaaS server, at least one Agent server, at least one cloud gaming server (GS), and at least one client, wherein the PaaS server interacts with both the at least one Agent server and the at least one client, and the at least one GS also interacts with the at least one client, the method being executed by any Agent server, and comprising:
[0006] Receive a GS allocation request sent by the target PaaS server. The GS allocation request is triggered when a login request from the target client is detected. The target PaaS server is the PaaS server corresponding to any of the Agents. The target client is any of the at least one client.
[0007] The queue is used to check if there is any server information for an idle GS. The queue stores server information for idle GS, and the idle GS is a GS that is not currently occupied by a client.
[0008] If there is idle GS server information in the queue, the server information of the target GS is obtained from the queue and stored in the preset storage space, so that the target client can establish a connection with the target GS based on the server information of the target GS.
[0009] The preset storage space is used by the target PaaS server to obtain the server information of the target GS and send it to the target client.
[0010] In one possible implementation, the storage to the preset storage space includes:
[0011] Store the server information of the target GS in a hash table.
[0012] In one possible implementation, the cloud gaming allocation system further includes: a network service that interacts with the at least one GameSpot (GS), and the method further includes:
[0013] Receive the server identifier sent by the target GS, and look up the server information of the target GS based on the server identifier;
[0014] A binding relationship is established between the target GS and its server information, so that the network service and the target GS can send and receive data based on the binding relationship.
[0015] In one possible implementation, the method further includes:
[0016] Based on the server identifier of the target GS, the target network connection channel is identified, which is a connection channel created based on the binding relationship.
[0017] In one possible implementation, the process of checking whether the queue contains server information for an idle GS further includes:
[0018] If there is no available server information for a GS in the queue, an error instruction is returned, indicating that there is currently no available GS.
[0019] Secondly, a game server allocation method is provided, applied to a game server allocation system, the game server allocation system comprising: at least one PaaS server, at least one Agent server, at least one cloud gaming server (GS), and at least one client, wherein the at least one PaaS server interacts with the at least one Agent and the at least one client respectively, and the at least one GS also interacts with the at least one client, the method being executed by any PaaS server, comprising:
[0020] When a login request from a target client is detected, a GS allocation request is generated, wherein the target client is any one of the at least one clients;
[0021] Send the GS allocation request to the corresponding Agent server so that the corresponding Agent server can search for server information of an idle GS in the queue;
[0022] The server information of the target GS is obtained from the preset storage space to establish a connection between the target client and the target GS. The server information of the target GS is obtained by the corresponding Agent server from finding an idle GS in the queue and storing it in the preset storage space.
[0023] In one possible implementation, obtaining the server information of the target GS from the preset storage space includes:
[0024] Retrieve the server information of the target GS from the hash table;
[0025] The step of obtaining the server information of the target GS from the preset storage space further includes:
[0026] Receive the scheduling string request message sent by the target client;
[0027] Based on the scheduling string request message, a scheduling string is sent to the target client. The scheduling string carries the server information of the target GS, so that the target client can establish a connection with the target GS.
[0028] In one possible implementation, the method further includes any of the following:
[0029] The server status corresponding to each GS is obtained at preset intervals, and the server information corresponding to the GS that is currently in an idle state is stored in the queue.
[0030] The system receives a notification message from a GS that is currently in an idle state, obtains the server information of the GS based on the notification message, and stores the obtained server information of the GS in an idle state in a queue. The notification message is used to notify the PaaS server that the GS is currently in an idle state.
[0031] Thirdly, a game server allocation device is provided, comprising:
[0032] The allocation request receiving module is used to receive the allocation request of GS sent by the target PaaS server. The allocation request of GS is triggered when the login request of the target client is detected. The target PaaS server is the PaaS server corresponding to any of the Agents.
[0033] The first search module is used to search whether there is server information for an idle GS in the queue. The queue stores server information for idle GS, and the idle GS is a GS that is not currently occupied by a client.
[0034] The server information acquisition module is used to acquire the server information of the target GS from the queue when there is idle GS server information in the queue, so that the target client can establish a connection with the target GS based on the server information of the target GS.
[0035] The preset storage space is used by the target PaaS server to obtain the server information of the target GS and send it to the target client.
[0036] In one possible implementation, the device further includes: a storage module, wherein,
[0037] The storage module is used to store the server information of the target GS in a hash table.
[0038] In one possible implementation, the apparatus further includes: a server identifier receiving module, a second lookup module, and a binding relationship establishment module, wherein,
[0039] The server identifier receiving module is used to receive the server identifier sent by the target GS;
[0040] The second search module is used to search for the server information of the target GS based on the server identifier;
[0041] The binding relationship establishment module is used to establish a binding relationship with the target GS based on the server information of the target GS, so that the network service and the target GS can send and receive data based on the binding relationship.
[0042] In one possible implementation, the device further includes: an identification module, wherein,
[0043] The identification module is used to identify the target network connection channel based on the server identifier of the target GS, wherein the target network connection channel is a connection channel created based on the binding relationship.
[0044] In one possible implementation, the device further includes a return module, wherein,
[0045] The return module is used to return an error instruction when there is no free GS server information in the queue. The error instruction is used to indicate that there is currently no free GS.
[0046] Fourthly, a game server allocation device is provided, comprising:
[0047] The allocation request generation module is used to generate an allocation request for GS when a login request from a target client is detected.
[0048] The allocation request sending module is used to send the allocation request of the GS to the corresponding Agent server, so that the corresponding Agent server can search for server information of an idle GS in the queue;
[0049] The information acquisition module is used to obtain the server information of the target GS from the preset storage space, so as to obtain the connection between the target client and the target GS. The server information of the target GS is obtained by the corresponding Agent server from the queue to find an idle GS and store it in the preset storage space.
[0050] In one possible implementation, when the information acquisition module sends an instruction to the corresponding target GS based on the server information of the target GS, it is specifically used for:
[0051] The server information of the target GS is obtained from the hash table, wherein the server information of the target GS is stored in the hash table by the Agent server;
[0052] The device further includes: a request message receiving module and a scheduling string sending module, wherein...
[0053] The request message receiving module is used to receive the scheduling string request message sent by the target client;
[0054] The scheduling string sending module is used to send a scheduling string to the target client based on the scheduling string request message. The scheduling string carries the server information of the target GS, so that the target client can establish a connection with the target GS.
[0055] In one possible implementation, the device further includes: a first processing module or a second processing module, wherein,
[0056] The first processing module is used to obtain the server status corresponding to each GS at preset time intervals, and store the server information corresponding to the GS that is currently in an idle state into a queue;
[0057] The second processing module is used to receive a notification message from a GS that is currently in an idle state, obtain the server information of the GS that is currently in an idle state based on the notification message, and store the obtained server information of the GS that is currently in an idle state in a queue. The notification message is used to notify any PaaS server that the GS is currently in an idle state.
[0058] Fifthly, a game server allocation system is provided, comprising: at least one PaaS server, at least one Agent server, at least one cloud gaming server (GS), and at least one client, wherein the at least one PaaS server interacts with both the at least one Agent and the at least one client, and the at least one GS also interacts with the at least one client.
[0059] The at least one PaaS server is configured to send a GS allocation request to the target Agent server when a login request from a corresponding target client is detected, wherein the target client is any one of the at least one clients;
[0060] The at least one Agent server is used to check whether there is server information for an idle GS in the queue when it receives a GS allocation request, and if there is server information for an idle GS, then retrieve the server information of the target GS from the queue and store it in a preset storage space.
[0061] The at least one PaaS server is further configured to obtain server information of the target GS from the preset storage space, so that the target client can establish a connection with the target GS.
[0062] Sixthly, this application provides an Agent server, which includes:
[0063] At least one processor;
[0064] Memory;
[0065] At least one application, wherein the at least one application is stored in memory and configured to be executed by at least one processor, the at least one application being configured to: perform the game server allocation method shown in the first aspect above or any possible implementation thereof.
[0066] Seventhly, a PaaS server is provided, including:
[0067] At least one processor;
[0068] Memory;
[0069] At least one application, wherein the at least one application is stored in memory and configured to be executed by at least one processor, the at least one application being configured to: perform the game server allocation method shown in the second aspect above or any possible implementation thereof.
[0070] Eighthly, this application provides a computer-readable storage medium, comprising: storing a computer program capable of being loaded by a processor and executing the above-described game allocation server allocation method.
[0071] In summary, this application includes the following beneficial technical effects:
[0072] This application provides a game server allocation method, apparatus, system, agent server, and storage medium. Compared with related technologies, in this application embodiment, when the agent server receives a GS allocation request, it searches for an available GS in a queue of stored available GS. If an available GS exists in the queue, the agent server retrieves the server information of the available GS from the queue and stores it in a preset storage space. This allows the client to establish a connection with an available GS without waiting for a GS to change from an occupied state to an available state and restart before establishing a connection. This reduces the waiting time for the client to establish a connection with the cloud gaming server, thereby improving the user experience.
[0073] This application provides a game server allocation method, apparatus, system, PaaS server, and storage medium. Compared with related technologies, in this application embodiment, when the PaaS server receives a login request sent by the Agent server, the Agent server searches the queue for idle Game Servers (GSs) and stores the server information of the idle GSs in a preset storage space. This allows the PaaS server to obtain the server information of currently idle GSs from the preset storage space, enabling the currently idle GSs to establish a connection with the requesting client without waiting for a GS to change from an occupied state to an idle state and restart before a connection can be established. This reduces the waiting time for the client to establish a connection with the cloud gaming server, thereby improving the user experience. Attached Figure Description
[0074] Figure 1 This is a schematic diagram of a game server allocation system according to an embodiment of this application;
[0075] Figure 2 This is a flowchart illustrating a game server allocation method according to an embodiment of this application;
[0076] Figure 3 This is a flowchart illustrating another game server allocation method according to an embodiment of this application;
[0077] Figure 4 This is an example diagram of a game server allocation method according to an embodiment of this application;
[0078] Figure 5 This is a schematic diagram of a game server allocation device according to an embodiment of this application;
[0079] Figure 6 This is a schematic diagram of another game server allocation device according to an embodiment of this application;
[0080] Figure 7 This is a schematic diagram of the structure of an Agent server according to an embodiment of this application. Detailed Implementation
[0081] The present application will be further described in detail below with reference to the accompanying drawings.
[0082] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0083] Cloud gaming, also known as gaming on demand, is a gaming method based on cloud computing technology. It enables lightweight devices (thin clients) with relatively limited graphics processing and data processing capabilities to run high-quality games. In a cloud gaming scenario, all game processes do not run on the user's client device, but rather on the game server. The game server compresses and encodes the game's visuals and audio into a media stream, which is then transmitted to the user's client over the network. This media stream can include both game video and audio streams. The user's client does not need powerful graphics processing and data processing capabilities; it only needs basic streaming media playback capabilities and the ability to receive user input commands and send them to the game server.
[0084] Cloud computing technology provides game servers with graphics processing and data computing capabilities to support the smooth operation of cloud games. Cloud computing is a computing model that distributes computing tasks across a resource pool composed of a large number of computers, enabling various application systems to obtain computing power, storage space, and information services as needed. The network providing these resources is called the "cloud." From the user's perspective, resources in the "cloud" are infinitely scalable and can be accessed, used on demand, expanded at any time, and paid for based on usage. As a provider of basic cloud computing capabilities, a cloud computing resource pool (referred to as a cloud platform) is established, generally called an Infrastructure as a Service (IaaS) platform. Various types of virtual resources are deployed in the cloud computing resource pool for external customers to choose from. The cloud computing resource pool mainly includes: computing devices (virtualized machines containing operating systems), storage devices, and network devices. Logically, a Platform as a Service (PaaS) layer can be deployed on top of the IaaS layer, and a Software as a Service (SaaS) layer can be deployed on top of the PaaS layer. Alternatively, SaaS can be directly deployed on top of IaaS. PaaS is a platform for running software (such as databases, web containers, etc.). SaaS refers to various types of business software (such as web portals, bulk SMS senders, etc.). Generally speaking, SaaS and PaaS are upper layers compared to IaaS.
[0085] The process of cloud gaming involves different users acting as game players, accessing and playing cloud games through terminals containing cloud gaming clients (such as mobile phones, PCs, etc.). The game server launches the cloud game's game process for each participating client. For example, when a player uses a client to enter a cloud game, the game server starts and runs a game process in the cloud. This game process corresponds to the client used by the player and provides the client with the rendered game screen. The client displays the rendered game screen returned by its corresponding game process. When the user performs various operations in the game screen (such as touch screen operations, mouse and keyboard operations), the client reports the operation data generated by these operations to the game server. The game server then refreshes the cloud game screen in the corresponding game process based on the operation data and returns the refreshed game screen to the client for display.
[0086] This application provides a game server allocation system, such as... Figure 1As shown, the game server allocation system includes: at least one PaaS server, at least one Agent server, at least one cloud gaming server (GS), and at least one client. The at least one PaaS server interacts with at least one Agent server and at least one client, respectively, and the at least one GS server also interacts with at least one client. In this embodiment, one PaaS server can correspond to at least two Agent servers.
[0087] Furthermore, the game server allocation system may also include: a network service (Netserver) that interacts with at least one game server (GS); it should be noted that, in Figure 1 This article uses a game server allocation system containing one PaaS server and one Agent server as an example for introduction, but it is not intended to limit the scope of game server allocation systems.
[0088] Furthermore, based on the game server allocation system described above, this application embodiment provides a game server allocation method, executed by any Agent server, such as... Figure 2 As shown, the game server allocation method may include:
[0089] Step S201: Receive the GS allocation request sent by the target PaaS server.
[0090] In this embodiment, the target PaaS server is the PaaS server corresponding to any Agent, and the GS allocation request is triggered when a login request from a target client is detected. The target client can be any one of at least one client. In this embodiment, the GS allocation request is used to allocate a corresponding GS to the target client in response to the request.
[0091] For example, the allocation request of GS can be a command in the format of Assign or other formats, which is not limited in this embodiment.
[0092] Step S202: Check if there is any idle GS server information in the queue.
[0093] In this embodiment of the application, when the Agent server receives a GS allocation request sent by the target PaaS server, it searches the queue for server information of any idle GS, and allocates an idle GS to the target client.
[0094] Furthermore, the queue stores server information for idle service boxes (GS), where an idle GS is a GS that is not currently occupied by a client. In this embodiment, the server information may include: server identifier, server processing capacity information, handle information, and server location information.
[0095] Step S203: If there is idle GS server information in the queue, retrieve the target GS server information from the queue and store it in the preset storage space so that the target client can establish a connection with the target GS based on the target GS server information.
[0096] The preset storage space is used by the target PaaS server to obtain the server information of the target GS and send it to the target client.
[0097] In this embodiment of the application, if there is server information of GS in the queue, that is, there is idle server information of GS in the queue, the server information of the target GS is obtained from the queue in the "first-in, first-out" manner of the queue, and then the obtained server information of the target GS is stored in the preset storage space, so that the target PaaS server can obtain the server information of the target GS from the preset storage space, so that the target client can establish a connection with the target GS.
[0098] Specifically, after the target PaaS server obtains the server information of the target GS from the preset storage space, the target client can send a scheduling string request message to the target PaaS server. After receiving the scheduling string request message, the target PaaS server sends the corresponding scheduling string to the target client so that the target client can establish a connection with the corresponding GS based on the scheduling string.
[0099] Specifically, in one possible implementation, the queue may only store the GSIDs of servers with available free servers. Then, the GSID of a GS is retrieved from the queue and stored in a preset storage space. This allows the PaaS server to retrieve the target GSID from the preset storage space, enabling the target client to establish a connection with the target GS.
[0100] This application provides a game server allocation method. Compared with related technologies, in this application embodiment, when the Agent server receives a GS allocation request, it searches for an available GS in the queue of stored available GS. If an available GS exists in the queue, the Agent server retrieves the server information of the available GS from the queue and stores it in a preset storage space. This allows the client to establish a connection with an available GS without having to wait for a GS to change from an occupied state to an available state and restart before establishing a connection. This reduces the waiting time for the client to establish a connection with the cloud gaming server, thereby improving the user experience.
[0101] Furthermore, in the game server allocation system, the PaaS server and the Agent server directly interact with each other; that is, the PaaS server can send a GS allocation request to the Agent server. In this embodiment, one PaaS server can correspond to one Agent server, or one PaaS server can correspond to multiple Agent servers.
[0102] Furthermore, after the Agent server receives the GS allocation request, it checks the queue to see if it contains server information for an idle GS. In this embodiment, the queue can be a single queue or multiple queues. Furthermore, when multiple queues are included, GS can be placed in different queues based on their idle time.
[0103] Furthermore, after checking if there is any free GS server information in the queue, the process may further include: if no free GS server information exists in the queue, then returning an error instruction. In this embodiment, the error instruction is used to indicate that there is currently no free GS.
[0104] Furthermore, if there is no idle GS server information in the queue, the Agent server can record relevant information of the GS request client. When an idle GS server is detected, the Agent server stores the idle GS server information in a preset storage space and sends an instruction to the target PaaS server so that the target PaaS server can retrieve the GS server information from the preset storage space to establish a connection between the GS request client and the corresponding GS server.
[0105] Furthermore, if there is idle GS server information in the queue, the Agent server retrieves the target GS server information from the queue and stores it in a preset storage space. In this embodiment, storing the target GS server information in the preset storage space can specifically include storing the target GS server information in a hash table. Specifically, one GS corresponds to one GSID, that is, the target GS ID can be stored in a hash table, where the KEY value in the hash table is the GS ID, thereby enabling quick matching of the user's GS server. Furthermore, the target PaaS server can retrieve the target GS ID from the hash table and establish a connection between the target client and the target GS. In this embodiment, storing the target GS ID in a hash table allows the target PaaS server to search for the target GS ID from the hash table. Since the time complexity of the hash table is O(1), the search efficiency can be further improved.
[0106] Furthermore, after the target client and the target GS establish a connection, the target client and the target GS send and receive data to ensure the normal operation of cloud gaming. In order to enable the target client and the target GS to send and receive data smoothly, the method may further include: the Agent server receiving the server identifier sent by the target GS and searching for the information of the target GS based on the server identifier; establishing a binding relationship between the target GS and the server information of the target GS, so that the network service and the target GS can send and receive data based on the binding relationship.
[0107] In this embodiment, since the GS (Gateway to Target) cannot be determined in the network connection, the GSID is carried in the URL after the WebSocket connection is successful. The Agent server receives the GSID and uses it to find other relevant information corresponding to the target GS. In this embodiment, the target GS information may include, in addition to the GSID, the target GS handle information, server location information, and server processing capacity information. After finding the target GS information, the Agent server can establish a binding relationship with the corresponding target GS based on this information. Subsequently, the Agent server sends data to the target GS according to the binding relationship.
[0108] It should be noted that after receiving the GSID, the Agent server can also look up other information about the server corresponding to the GSID, mainly including the handle information of the target GS, and then establish a binding relationship with the target GS based on the handle information.
[0109] Furthermore, the Agent server, upon obtaining information about the target GS (or other server information), sends it to the network service and identifies the target network connection channel based on the server identifier of the target GS. In this embodiment, the target network connection channel is the network connection channel determined based on the aforementioned binding relationship, used by the network service (Netserver) to interact with the target GS based on this determined network connection channel.
[0110] In the embodiments of this application, the target network connection channel can be TCPConnect, and the identifier of the target network connection channel can include TCPConnect Tag. The TCPConnect Tag can be of any type. For example, if the GSID of the target GS of the TCPConnect connection object is 1, then the TCPConnect Tag is 1.
[0111] This application provides another method for allocating game servers, which can be executed by any PaaS server, such as... Figure 3 As shown, the method may further include:
[0112] Step S301: When a login request from the target client is detected, generate a GS allocation request.
[0113] The target client can be any one of at least one client. In this embodiment, when the PaaS server detects a login request from any client, it generates a GS allocation request.
[0114] Step S302: Send a GS allocation request to the corresponding Agent server so that the Agent server can search for server information of an available GS in the queue.
[0115] For the embodiments of this application, the method by which the corresponding Agent server searches for the server information of an idle GS in the queue is detailed in the above embodiments and will not be repeated here.
[0116] Step S303: Obtain the server information of the target GS from the preset storage space to establish a connection between the target client and the target GS.
[0117] The server information for the target GS is obtained by the corresponding Agent server from the queue by finding an available GS and storing it in the preset storage space.
[0118] In the embodiments of this application, after sending the allocation request for the GS, the PaaS server can obtain the server information of the target GS from the preset storage space after a preset time, or it can obtain the server information of the target GS from the preset storage space after receiving the search confirmation message sent by the target GS and determining that the Agent server has found an idle GS.
[0119] This application provides a game server allocation method. Compared with related technologies, in this application embodiment, when the PaaS server receives a login request sent by the Agent server, the Agent server searches the queue for idle Game Servers (GS) and stores the server information of the idle GS in a preset storage space. This allows the PaaS server to obtain the server information of the currently idle GS from the preset storage space, enabling the currently idle GS to establish a connection with the requesting client without waiting for a GS to change from an occupied state to an idle state and restart before a connection can be established. This reduces the waiting time for the client to establish a connection with the cloud gaming server, thereby improving the user experience.
[0120] Specifically, step S303, obtaining the server information of the target GS from the preset storage space, may include: obtaining the server information of the target GS from a hash table. In this embodiment, the method by which the PaaS server obtains the server information of the target GS from the hash table is detailed in the above embodiments and will not be repeated here.
[0121] Further, after retrieving the server information of the target GS from the preset storage space, the process includes: receiving a scheduling string request message sent by the target client; and sending a scheduling string to the target client based on the scheduling string request message, wherein the scheduling string carries the server information of the target GS, so that the target client and the target GS can establish a connection. In this embodiment, when the PaaS server retrieves the server information of the target GS from the preset storage space, the target client and the target GS can establish a connection. In this embodiment, the preset storage space can be a hash table or other types of tables. When the preset storage space is a hash table, the PaaS server retrieves the server information of the target GS from the hash table, so that the target client and the target GS can establish a connection.
[0122] Furthermore, after the target client establishes a connection with the target GS, the PaaS server sends instructions to the target GS to enable the target client and the target GS to send and receive data.
[0123] Furthermore, another possible implementation of this application embodiment includes: either step Sm (not shown in the figure) or step Sn (not shown in the figure). In this application embodiment, step Sm or step Sn can be executed before step S301, or before step S302, or in other execution orders. This application embodiment does not impose any limitations on the execution order.
[0124] Step Sm: Obtain the server status corresponding to each GS at preset time intervals, and store the server information corresponding to the GS that is currently in an idle state into a queue.
[0125] For example, the PaaS server obtains the server status of each GS (GS1, GS2, GS3 and GS4) every 10 minutes. If it detects that GS1, GS2 and GS3 are currently idle, the server information corresponding to GS1, GS2 and GS3 is stored in the queue. Specifically, GSID=1, GSID=2 and GSID=3 can be stored in the queue.
[0126] In this embodiment of the application, the PaaS server stores the server information corresponding to the currently idle GS in the queue at preset intervals to avoid situations where there are currently idle GS servers but they cannot be found in the queue. This improves the accuracy of finding idle GS servers in the queue, thereby further reducing the waiting time for the client to establish a connection with the cloud gaming server and further improving the user experience.
[0127] Step Sn: Receive a notification message from a GS that is currently in an idle state, obtain the server information of the GS that is currently in an idle state based on the notification message, and store the obtained server information of the GS that is currently in an idle state into a queue.
[0128] The notification message is used to inform the PaaS server that the GS is currently idle. In this embodiment, the notification message may carry the server information of the GS, so that the PaaS server can determine the server information of the GS that is currently idle.
[0129] For example, if the PaaS server receives notification messages sent by GS1, GS2 and GS3 respectively, it will retrieve the GSID=1 corresponding to GS1, the GSID=2 corresponding to GS2 and the GSID=3 corresponding to GS3 and store them in the queue.
[0130] In this embodiment of the application, by receiving a notification message of a GS that is currently in an idle state, the GS that is currently in an idle state can be identified, so as to avoid the situation where there is an idle GS server but it cannot be found in the queue. This can improve the accuracy of finding an idle GS in the queue, thereby further reducing the waiting time for the client to establish a connection with the cloud gaming server and further improving the user experience.
[0131] The above embodiments describe a cloud server allocation method from the perspectives of Agent server and PaaS server. The following embodiments describe a specific scenario to illustrate the cloud server allocation method, as follows: Figure 4 As shown, where,
[0132] The PaaS server sends a server allocation request to the Agent server. The Agent server checks if there is an idle GS in the queue. For example, if the queue stores idle GS, namely GS1 (GSID=1), GS2 (GSID=2), and GS3 (GSID=3), the Agent server stores GSID=1 in a hash table according to the first-in-first-out principle. The PaaS server retrieves GSID=1 from the hash table so that the client can establish a connection with GS1. Further, the target GS sends GSID=1 to the Agent server so that the Agent server can find the corresponding GS handle and establish a binding relationship with GS1 based on the GS handle. That is, GS1 establishes a connection with TCPconnect and sets TCPConnectTag=1. The network service (netserver) sends and receives data with GS1 through the binding relationship corresponding to TCPConnectTag=1.
[0133] The above embodiments describe a game server allocation method from the perspective of process flow. The following embodiments describe a game server allocation device from the perspective of virtual modules or virtual units. For details, please refer to the following embodiments.
[0134] This application provides a game server allocation device, such as... Figure 5 As shown, the game server allocation device 50 includes: an allocation request receiving module 51, a first search module 52, and a server information acquisition module 53, wherein...
[0135] The allocation request receiving module 51 is used to receive the allocation request of GS sent by the target PaaS server.
[0136] The allocation request of GS is triggered when the login request of the target client is detected, and the target PaaS server is the PaaS server corresponding to any Agent.
[0137] The first search module 52 is used to search the queue for server information of an idle GS.
[0138] The queue stores server information for available service slots (GS), which are currently not occupied by clients.
[0139] The server information acquisition module 53 is used to acquire the server information of the target GS from the queue when there is idle server information of the GS in the queue, so that the target client can establish a connection with the target GS based on the server information of the target GS.
[0140] The preset storage space is used by the target PaaS server to obtain the server information of the target GS and send it to the target client.
[0141] In another possible implementation of this application embodiment, the device 50 further includes: a storage module, wherein...
[0142] The storage module is used to store the server information of the target GS in a hash table.
[0143] In another possible implementation of this application embodiment, the apparatus 50 further includes: a server identifier receiving module, a second lookup module, and a binding relationship establishment module, wherein...
[0144] The server identifier receiving module is used to receive the server identifier sent by the target GS;
[0145] The second search module is used to search for the server information of the target GS based on the server identifier;
[0146] The binding relationship establishment module is used to establish a binding relationship between the target GS and the target GS based on the server information of the target GS, so that the network service and the target GS can send and receive data based on the binding relationship.
[0147] In another possible implementation of this application embodiment, the device 50 further includes: an identification module, wherein...
[0148] The identification module is used to identify the target network connection channel based on the server identifier of the target GS. The target network connection channel is a connection channel created based on the binding relationship.
[0149] In another possible implementation of this application embodiment, the device 50 further includes: a return module, wherein...
[0150] The return module is used to return an error instruction when there is no available GS server information in the queue. The error instruction indicates that there is currently no available GS.
[0151] This application provides a game server allocation device. Compared with related technologies, in this application embodiment, when the Agent server receives a GS allocation request, it searches for an available GS in the queue of stored available GS. If an available GS exists in the queue, the Agent server retrieves the server information of the available GS from the queue and stores it in a preset storage space. This allows the client to establish a connection with an available GS without having to wait for a GS to change from an occupied state to an available state and restart before establishing a connection. This reduces the waiting time for the client to establish a connection with the cloud gaming server, thereby improving the user experience.
[0152] This application provides another game server allocation device, such as... Figure 6 As shown, the game server allocation device 60 may further include: an allocation request generation module 61, an allocation request sending module 62, and an information acquisition module 63, wherein,
[0153] The allocation request generation module 61 is used to generate an allocation request for GS when a login request from a target client is detected.
[0154] The allocation request sending module 62 is used to send the allocation request of GS to the corresponding Agent server so that the corresponding Agent server can search for server information of idle GS from the queue.
[0155] The information acquisition module 63 is used to acquire the server information of the target GS from the preset storage space, so as to obtain the connection between the target client and the target GS. The server information of the target GS is obtained by the corresponding Agent server from the queue to find an idle GS and store it in the preset storage space.
[0156] In another possible implementation of this application embodiment, when the information acquisition module 63 sends an instruction to the corresponding target GS based on the server information of the target GS, it is specifically used for:
[0157] Retrieve the target GS's server information from the hash table. The target GS's server information is stored in the hash table by the Agent server.
[0158] Furthermore, the device 60 also includes: a request message receiving module and a scheduling string sending module, wherein,
[0159] The request message receiving module is used to receive the scheduling string request message sent by the target client;
[0160] The scheduling string sending module is used to send a scheduling string to the target client based on the scheduling string request message. The scheduling string carries the server information of the target GS so that the target client can establish a connection with the target GS.
[0161] In another possible implementation of this application embodiment, the apparatus 60 further includes: a first processing module or a second processing module, wherein...
[0162] The first processing module is used to obtain the server status corresponding to each GS at preset time intervals and store the server information corresponding to the GS that is currently in an idle state into a queue.
[0163] The second processing module is used to receive notification messages from GSs that are currently in an idle state, obtain server information of GSs that are currently in an idle state based on the notification messages, and store the obtained server information of GSs that are currently in an idle state into a queue.
[0164] The notification message is used to notify any PaaS server that GS is currently in an idle state.
[0165] This application provides a game server allocation device. Compared with related technologies, in this application embodiment, when the PaaS server receives a login request sent by the Agent server, the Agent server searches the queue for idle GS and stores the server information of the idle GS in a preset storage space. This allows the PaaS server to obtain the server information of the currently idle GS from the preset storage space, enabling the currently idle GS to establish a connection with the requesting client without waiting for a GS to change from an occupied state to an idle state and restart before a connection can be established. This reduces the waiting time for the client to establish a connection with the cloud gaming server, thereby improving the user experience.
[0166] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0167] This application also describes an Agent server from the perspective of a physical device, such as... Figure 7 As shown, Figure 7 The Agent server 700 shown includes a processor 701 and a memory 703. The processor 701 and the memory 703 are connected, for example, via a bus 702. Optionally, the electronic device 700 may also include a transceiver 704. It should be noted that in practical applications, the transceiver 704 is not limited to one type, and the structure of this Agent server 700 does not constitute a limitation on the embodiments of this application.
[0168] Processor 701 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 701 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
[0169] Bus 702 may include a pathway for transmitting information between the aforementioned components. Bus 702 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 702 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 7 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0170] The memory 703 may be a ROM (Read Only Memory) or other type of static storage device capable of storing static information and instructions, RAM (Random Access Memory) or other type of dynamic storage device capable of storing information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto.
[0171] The memory 703 stores application code that executes the scheme of this application, and its execution is controlled by the processor 701. The processor 701 executes the application code stored in the memory 703 to implement the content shown in the aforementioned method embodiment executed by the Agent server.
[0172] Figure 7 The Agent server shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0173] This application also describes a PaaS server from the perspective of a physical device. The structure of the PaaS server is similar to that of the Agent server shown in the above embodiments, and will not be described again here.
[0174] This application provides a computer-readable storage medium storing a computer program. When the program is run on a computer, it enables the computer to execute the corresponding content in the aforementioned method embodiments. In this application embodiment, when the Agent server receives a GS allocation request from the PaaS server, it searches for an available GS in a queue of stored available GS. If an available GS exists in the queue, the Agent server retrieves the server information of the available GS from the queue and stores it in a preset storage space. The PaaS server retrieves the server information of the available GS from the preset storage space, allowing the client to establish a connection with the available GS without waiting for a GS to change from an occupied state to an available state and restart before establishing a connection. This reduces the waiting time for the client to establish a connection with the cloud gaming server, thereby improving the user experience.
[0175] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0176] The above are only some embodiments of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A game server allocation method, applied to a game server allocation system, characterized in that, The game server allocation system includes: at least one PaaS server, at least one Agent server, at least one cloud gaming server (GS), and at least one client. The at least one PaaS server interacts with both the at least one Agent server and the at least one client. The at least one GS also interacts with the at least one client. The method is executed by any Agent server and includes: Receive a GS allocation request sent by the target PaaS server. The GS allocation request is triggered when a login request from the target client is detected. The target PaaS server is the PaaS server corresponding to any of the Agents. The target client is any of the at least one client. The queue is used to check if there is any server information for an idle GS. The queue stores server information for idle GS, and the idle GS is a GS that is not currently occupied by a client. If there is idle GS server information in the queue, the server information of the target GS is obtained from the queue and stored in the preset storage space, so that the target client can establish a connection with the target GS based on the server information of the target GS. The preset storage space is used by the target PaaS server to obtain the server information of the target GS and send it to the target client.
2. The method according to claim 1, characterized in that, The storage to the preset storage space includes: Store the server information of the target GS in a hash table.
3. The method according to claim 1, characterized in that, The cloud gaming allocation system further includes: a network service, which interacts with the at least one GS; The method further includes: Receive the server identifier sent by the target GS, and look up the server information of the target GS based on the server identifier; A binding relationship is established between the target GS and its server information, so that the network service and the target GS can send and receive data based on the binding relationship.
4. The method according to claim 3, characterized in that, The method further includes: Based on the server identifier of the target GS, the target network connection channel is identified, which is a connection channel created based on the binding relationship.
5. The method according to claim 1, characterized in that, The process of checking whether the queue contains server information for an idle GS (Server Group) further includes: If there is no available server information for a GS in the queue, an error instruction is returned, indicating that there is currently no available GS.
6. A game server allocation method, applied to a game server allocation system, characterized in that, The game server allocation system includes: at least one PaaS server, at least one Agent server, at least one cloud gaming server (GS), and at least one client. The at least one PaaS server interacts with both the at least one Agent and the at least one client. The at least one GS also interacts with the at least one client. The method is executed by any PaaS server and includes: When a login request from a target client is detected, a GS allocation request is generated, wherein the target client is any one of the at least one clients; Send the GS allocation request to the corresponding Agent server so that the corresponding Agent server can search for server information of an idle GS in the queue; The server information of the target GS is obtained from the preset storage space to establish a connection between the target client and the target GS. The server information of the target GS is obtained by the corresponding Agent server from finding an idle GS in the queue and storing it in the preset storage space.
7. The method according to claim 6, characterized in that, The step of obtaining the server information of the target GS from the preset storage space includes: Retrieve the server information of the target GS from the hash table; The step of obtaining the server information of the target GS from the preset storage space further includes: Receive the scheduling string request message sent by the target client; Based on the scheduling string request message, a scheduling string is sent to the target client. The scheduling string carries the server information of the target GS, so that the target client can establish a connection with the target GS.
8. The method according to claim 6, characterized in that, The method further includes any one of the following: The server status corresponding to each GS is obtained at preset intervals, and the server information corresponding to the GS that is currently in an idle state is stored in the queue. Receive a notification message from a GS that is currently in an idle state, obtain the server information of the GS that is currently in an idle state based on the notification message, and store the obtained server information of the GS that is currently in an idle state in a queue. The notification message is used to notify any PaaS server that the GS is currently in an idle state.
9. A game server allocation system, characterized in that, The game server allocation system includes: at least one PaaS server, at least one Agent server, at least one cloud gaming server (GS), and at least one client. The at least one PaaS server interacts with both the at least one Agent server and the at least one client. The at least one GS also interacts with the at least one client. The at least one PaaS server is used to send a GS allocation request to the target Agent server when a login request from the corresponding target client is detected, wherein the target client is any one of the at least one clients; The at least one Agent server is used to check whether there is server information for an idle GS in the queue when it receives a GS allocation request, and if there is server information for an idle GS, then retrieve the server information of the target GS from the queue and store it in a preset storage space. The at least one PaaS server is further configured to obtain server information of the target GS from the preset storage space, so that the target client can establish a connection with the target GS.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed in the computer, the computer is instructed to perform the game server allocation method according to any one of claims 1 to 5 or any one of claims 6 to 8.
Citation Information
Patent Citations
Network game running system and method
CN105327508A
A multi-client / multi-server managing method and system
CN110178351A