Node switching method, device, equipment and computer-readable storage medium

By real-time monitoring and pre-switching of the second node with better health status, the reliability problems caused by node failures in cloud games are solved, and the user experience and interaction stability are improved.

CN113144622BActive Publication Date: 2025-08-08TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110470440.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-28
Publication Date
2025-08-08
Estimated Expiration
2041-04-28

AI Technical Summary

Technical Problem

In cloud games, due to the increase in the number of users, the probability of node failure increases, resulting in low interaction reliability between nodes and clients and decreasing user experience.

Method used

Monitor the health status of the first node in real time. If it is a sub-health status, determine the second idle node in advance and interact with the client to realize unsensed node switching.

Benefits of technology

Switch to the second node in advance before the first node fails, reducing the probability of user disconnection, and improving game quality and interactive reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113144622B_ABST
    Figure CN113144622B_ABST
Patent Text Reader

Abstract

The present application discloses a node switching method, device, equipment and computer-readable storage medium, which belongs to the field of cloud gaming technology. The method includes: obtaining the node information of the first node to be detected, the first node is the node currently interacting with the client; based on the node information of the first node, determining the health status of the first node; if the health status of the first node is sub-healthy, determining the second node, the second node is an idle node; connecting the second node to the client, and interacting with the client based on the second node. The method can switch nodes for the user without the user's perception, and the method switches the first node to the second node before the first node fails, thereby improving the user's game quality and improving the reliability of the interaction between the node and the client.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of cloud gaming technology, and in particular to a node switching method, apparatus, device, and computer-readable storage medium. Background Art

[0002] Cloud gaming is a gaming mode based on cloud computing. The logical calculation and screen rendering processes that should be performed on the client are placed on cloud devices. After the cloud devices perform calculations and rendering, they obtain the game screen, compress the game screen and send it to the client, which then displays the game screen.

[0003] In related technologies, a cloud device manages multiple server clusters. Each server cluster consists of multiple servers, and each server manages multiple nodes, which are virtual devices. When a game is running on a client, the client interacts with the first node in the cloud device. The first node performs game logic calculations and screen rendering. The first node compresses the rendered game screen into a compressed file, which is then transmitted to the client via the network. After receiving the compressed file, the client decompresses it to obtain the rendered game screen and displays it.

[0004] However, as the number of game users continues to grow, the load on cloud devices is increasing, and the probability of node failure is also increasing. Therefore, a node switching method is urgently needed to switch from the first node to the second node before the first node fails, making the node switching imperceptible to users, improving user gaming quality, and increasing the reliability of node-client interaction. Summary of the Invention

[0005] The present invention provides a node switching method, apparatus, device, and computer-readable storage medium that can be used to address the problem of low reliability of node-client interaction. The technical solution is as follows:

[0006] In one aspect, an embodiment of the present application provides a node switching method, the method comprising:

[0007] Acquire node information of a first node to be detected, where the first node is a node currently interacting with the client;

[0008] Determining a health status of the first node based on the node information of the first node;

[0009] If the health status of the first node is a sub-healthy state, determining a second node, where the second node is an idle node;

[0010] The second node is connected to the client, and the second node interacts with the client.

[0011] In one possible implementation, the types of games run by the client include strategy games and multiplayer online games, the threshold corresponding to the network quality of the strategy game is higher than the threshold corresponding to the network quality of the multiplayer online game, and the threshold corresponding to the node capacity of the strategy game is higher than the threshold corresponding to the node capacity of the multiplayer online game.

[0012] In one possible implementation, if the type of game run by the client is the strategy game, the threshold corresponding to the network quality of the strategy game is 2.5, the threshold corresponding to the node capacity of the strategy game is 2.4, and the threshold corresponding to the heartbeat information of the strategy game is 5; if the type of game run by the client is the multiplayer online game, the threshold corresponding to the network quality of the multiplayer online game is 1.9, the threshold corresponding to the node capacity of the multiplayer online game is 2.1, and the threshold corresponding to the heartbeat information of the multiplayer online game is 5.

[0013] On the other hand, an embodiment of the present application provides a node switching device, the device comprising:

[0014] an acquiring unit, configured to acquire node information of a first node to be detected, where the first node is a node currently interacting with the client;

[0015] a first determining unit, configured to determine a health status of the first node based on the node information of the first node;

[0016] a second determining unit, configured to determine a second node if the health status of the first node is a sub-healthy state, wherein the second node is an idle node;

[0017] A connecting unit is configured to connect the second node to the client, and to interact with the client based on the second node.

[0018] In one possible implementation, the first determination unit is used to determine the information value of the first node based on the node information of the first node; if the information value of the first node exceeds the threshold corresponding to the node information, the health status of the first node is determined to be the sub-healthy state; if the information value of the first node does not exceed the threshold corresponding to the node information, the health status of the first node is determined to be the normal state.

[0019] In one possible implementation, the node information includes at least one of network quality, node capacity and heartbeat information, and the information value includes at least one of quality value, capacity value and heartbeat number, the quality value is determined based on the network quality of the first node, the capacity value is determined based on the node capacity of the first node, and the heartbeat number is determined based on the heartbeat information of the first node.

[0020] In a possible implementation, the node information includes network quality, and the information value includes a quality value;

[0021] The first determination unit is used to determine a weight parameter corresponding to the network quality of the first node; based on the weight parameter corresponding to the network quality of the first node, determine the quality value of the first node, where the network quality includes at least one of network time consumption, number of network packet losses and network bandwidth information.

[0022] In one possible implementation, the network quality includes network consumption, the number of network packet losses, and network bandwidth information, the weight parameter corresponding to the network consumption is positively correlated with the network consumption, the weight parameter corresponding to the number of network packet losses is positively correlated with the number of network packet losses, and the weight parameter corresponding to the network bandwidth information is negatively correlated with the network bandwidth information;

[0023] The first determining unit is configured to add weight parameters corresponding to the network time consumption, the number of network packet losses, and the network bandwidth information of the first node to obtain a quality value of the first node.

[0024] In a possible implementation, the node information includes node capacity, and the information value includes a capacity value;

[0025] The first determination unit is used to determine a weight parameter corresponding to the node capacity of the first node; based on the weight parameter corresponding to the node capacity of the first node, determine the capacity value of the first node, where the node capacity includes at least one of a central processing unit utilization rate, a memory utilization rate, and a number of input and output requests.

[0026] In one possible implementation, the node capacity includes a CPU usage rate, a memory usage rate, and a number of input / output requests, wherein a weight parameter corresponding to the CPU usage rate is positively correlated with the CPU usage rate, a weight parameter corresponding to the memory usage rate is positively correlated with the memory usage rate, and a weight parameter corresponding to the number of input / output requests is positively correlated with the number of input / output requests;

[0027] The first determining unit is configured to add weight parameters corresponding to the CPU usage, memory usage, and number of input and output requests of the first node to obtain a capacity value of the first node.

[0028] In a possible implementation, the threshold corresponding to the node information is determined based on the type of game run by the client.

[0029] In one possible implementation, the types of games run by the client include strategy games and multiplayer online games, the threshold corresponding to the network quality of the strategy game is higher than the threshold corresponding to the network quality of the multiplayer online game, and the threshold corresponding to the node capacity of the strategy game is higher than the threshold corresponding to the node capacity of the multiplayer online game.

[0030] In one possible implementation, if the type of game run by the client is the strategy game, the threshold corresponding to the network quality of the strategy game is 2.5, the threshold corresponding to the node capacity of the strategy game is 2.4, and the threshold corresponding to the heartbeat information of the strategy game is 5; if the type of game run by the client is the multiplayer online game, the threshold corresponding to the network quality of the multiplayer online game is 1.9, the threshold corresponding to the node capacity of the multiplayer online game is 2.1, and the heartbeat information corresponding to the multiplayer online game is 5.

[0031] In one possible implementation, the cloud device manages multiple server clusters, each of which is composed of multiple servers, each of which includes multiple nodes;

[0032] The second determining unit is configured to determine, if the health status of the first node is a sub-healthy state, a first server cluster from the multiple server clusters, where the number of the first server clusters is not greater than the total number of the server clusters;

[0033] Determining a second server cluster in the first server cluster based on the carrying capacity of the first server cluster, wherein the number of the second server clusters is not greater than the number of the first server clusters;

[0034] Determine a third server cluster in the second server cluster based on the running status of each node in the second server cluster, wherein the third server cluster includes nodes in an idle state, and the number of the third server cluster is not greater than the number of the second server clusters;

[0035] Determining a node in the third server cluster whose node status is idle;

[0036] A node whose node status is idle is determined as the second node.

[0037] In a possible implementation, the apparatus further includes:

[0038] A third determining unit, configured to determine whether the node in the idle state is compatible with the client;

[0039] The second determining unit is configured to determine the node in the idle state as the second node if the node in the idle state is adapted to the client.

[0040] In a possible implementation, the second determining unit is further configured to, if the node in the idle state is not compatible with the client, re-determine a node in the third server cluster in the idle state, until the re-determined node in the idle state is compatible with the client, and determine the re-determined node in the idle state as the second node;

[0041] The device further comprises:

[0042] The display unit is configured to display a warning message if the node in the idle state is incompatible with the client, wherein the warning message is used to indicate that the node in the idle state cannot replace the first node to interact with the client.

[0043] In one possible implementation, the second determination unit is used to obtain the regional attributes of the client if the health status of the first node is sub-healthy; based on the regional attributes of the client, determine the first server cluster among the multiple server clusters, and the regional attributes of the first server cluster are consistent with the regional attributes of the client.

[0044] In a possible implementation, the third determining unit is configured to determine that the node with the idle status is adapted to the client if the client satisfies the access rights of the node with the idle status;

[0045] If the client does not meet the access rights of the node whose node status is idle, it is determined that the node whose node status is idle is not compatible with the client.

[0046] In a possible implementation, the acquisition unit is further configured to acquire files required for the client to run and generate an image file;

[0047] The connection unit is configured to pull up the image file in the second node; and disconnect the first node from the client.

[0048] On the other hand, an embodiment of the present application provides a cloud device, which includes a processor and a memory, wherein at least one program code is stored in the memory, and the at least one program code is loaded and executed by the processor so that the cloud device implements any of the node switching methods described above.

[0049] On the other hand, a computer-readable storage medium is provided, in which at least one program code is stored. The at least one program code is loaded and executed by a processor to enable a computer to implement any of the above-mentioned node switching methods.

[0050] On the other hand, a computer program or computer program product is also provided, wherein the computer program or computer program product stores at least one computer instruction, and the at least one computer instruction is loaded and executed by a processor to enable the computer to implement any of the above-mentioned node switching methods.

[0051] The technical solution provided in the embodiment of the present application performs health detection on the first node in real time. When it is detected that the health status of the first node is sub-healthy, the second node is determined, and the second node is used to interact with the client. That is, the first node is replaced with the second node before the first node fails, thereby achieving early warning of the first node, so that the first node can be switched to the second node when the user is unaware of the failure of the first node. The probability of user disconnection is reduced, the user's gaming experience and game quality are improved, and the reliability of the interaction between the node and the client can also be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0053] Figure 1 This is a schematic diagram of an implementation environment of a node switching method provided in an embodiment of the present application;

[0054] Figure 2 This is a flowchart of a node switching method provided by an embodiment of the present application;

[0055] Figure 3 This is a schematic diagram of the structure of a cloud device provided in an embodiment of the present application;

[0056] Figure 4 This is a schematic diagram of the architecture of a cloud device provided in an embodiment of the present application;

[0057] Figure 5 This is a schematic diagram of the structure of a node switching device provided in an embodiment of the present application;

[0058] Figure 6 This is a schematic diagram of the structure of a client provided in an embodiment of the present application;

[0059] Figure 7 This is a structural diagram of a cloud device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0060] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.

[0061] For ease of understanding, several terms involved in the embodiments of this application are first explained:

[0062] Cloud gaming, also known as gaming on demand, is an online gaming technology based on cloud computing. Cloud gaming enables thin clients with relatively limited graphics and data processing capabilities to run high-quality games. In cloud gaming scenarios, the game runs not on the player's terminal but on a cloud server. The cloud server renders the game scene into a video and audio stream, which is then transmitted to the player's terminal over the network. The player's terminal does not need powerful graphics and data processing capabilities; it only needs basic streaming capabilities and the ability to receive player input and transmit it to the cloud server.

[0063] Cloud computing is a computing model that distributes computing tasks across a resource pool consisting of a large number of computers, enabling various application systems to access computing power, storage space, and information services as needed. The network that provides these resources is called the "cloud." To users, these resources appear infinitely scalable and can be accessed at any time, used on demand, expanded at any time, and paid for on a per-use basis.

[0064] As a provider of cloud computing infrastructure, a cloud computing resource pool (referred to as a cloud platform, often referred to as an IaaS (Infrastructure as a Service) platform) is established. Within this pool, various virtual resources are deployed for external clients to choose from. This resource pool primarily includes computing devices (virtualized machines, including operating systems), storage devices, and network equipment.

[0065] Based on logical functional divisions, the PaaS (Platform as a Service) layer can be deployed on top of the IaaS layer, and the SaaS (Software as a Service) layer can be deployed on top of the PaaS layer. SaaS can also be deployed directly on top of IaaS. PaaS is a platform for software execution, such as databases and web containers. SaaS is a variety of business software, such as web portals and text messaging apps. Generally speaking, SaaS and PaaS are upper layers relative to IaaS.

[0066] Cloud technology refers to a hosting technology that unifies hardware, software, and network resources within a wide area network (WAN) or local area network (LAN) to enable data computing, storage, processing, and sharing. Cloud technology is a general term for network, information technology, integration technology, management platform technology, and application technology, all based on the cloud computing business model. It can form a resource pool that can be used on demand with flexibility and convenience. Cloud computing technology will become a crucial support. Backend services for technical network systems, such as video websites, image websites, and more portals, require extensive computing and storage resources. With the rapid development and application of the internet industry, every item will likely have its own unique identification mark and will need to be transmitted to backend systems for logical processing. Data of varying levels will be processed separately, and data from all industries will require a strong system backend, which can only be achieved through cloud computing.

[0067] An embodiment of the present application provides a node switching method, which includes but is not limited to applications in cloud gaming scenarios. Like other online games, the services provided by the game server will be affected by network quality, support capacity, and machine downtime. If the player experience is affected by current node capacity issues, network problems, etc., how to quickly and imperceptibly switch to an available new node is an urgent problem to be solved.

[0068] In this regard, the method provided in the embodiments of the present application targets cloud gaming scenarios and pre-processes and migrates sub-healthy server-side cluster nodes. This means hot migration is performed before a node failure actually occurs, and pre-processing is performed before the migration occurs, making it imperceptible to players. Compared to switching nodes after a failure, this method improves the player experience, reduces game losses, improves game quality, and reduces the actual failure rate, thereby improving the efficiency of cloud gaming operations and maintenance personnel and reducing manpower.

[0069] Please refer to Figure 1 , which shows a schematic diagram of an implementation environment of the node switching method provided in an embodiment of the present application. The implementation environment includes: a client 11 and a cloud device 12.

[0070] The client 11 can be a smart phone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, etc., but is not limited to these. The cloud device 12 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. The client 11 and the cloud device 12 can be directly or indirectly connected through wired or wireless communication, and this application does not impose any restrictions on this.

[0071] Those skilled in the art should understand that the above-mentioned client 11 and cloud device 12 are only examples. Other existing or future clients or cloud devices that are applicable to this application should also be included in the scope of protection of this application and are included here by reference.

[0072] Based on the above Figure 1 In the implementation environment shown, the present application embodiment provides a node switching method, taking the method applied to the cloud device 12 as an example. Figure 2 As shown, the method provided in the embodiment of the present application includes the following steps.

[0073] In step 201, node information of a first node to be detected is obtained, where the first node is a node currently interacting with a client.

[0074] The embodiment of the present application is executed by a cloud device, and the cloud device and the client are connected to each other through a wired network or a wireless network. The cloud device manages multiple server clusters, and the server cluster is composed of multiple servers, and each server includes multiple nodes. An application is installed and running in the client. The application can be a game application or other types of applications. This embodiment of the present application does not limit this. The client communicates and interacts with the first node in the cloud device so that the first node completes the logical calculation and picture rendering process of the scene picture required by the application running in the client. The first node sends the rendered scene picture to the client, and the client displays it.

[0075] For example, if the application installed and running on the client is a game application, the client communicates and interacts with the first node, which performs game logic calculations and screen rendering. The first node compresses the rendered game screen to obtain a compressed file, which is then transmitted to the client via the network. The client receives the compressed file, decompresses it, obtains the rendered game screen, and displays the rendered game screen on the display interface.

[0076] If there is only one node in the cloud device that is currently interacting with the client, the node that is currently interacting with the client is determined as the first node to be detected. If there are multiple nodes in the cloud device that are currently interacting with the client, one of the multiple nodes that are currently interacting with the client is randomly determined as the first node to be detected; or, based on the time when the multiple nodes that are currently interacting with the client started interacting, the multiple nodes that are currently interacting with the client are sequentially detected as the first nodes to be detected.

[0077] like Figure 3 The diagram shows a schematic diagram of the structure of a cloud device provided by an embodiment of the present application. Figure 3 In the cloud device management, there are five server clusters, namely server cluster 1, server cluster 2, server cluster 3, server cluster 4 and server cluster 5. Among them, server cluster 1 consists of server 1 and server 2, server cluster 2 consists of server 3 and server 4, server cluster 3 consists of server 5 and server 6, server cluster 4 consists of server 7 and server 8, and server cluster 5 consists of server 9 and server 10. Among them, server 1 manages nodes 1, 2 and 3. The nodes managed by other servers are shown in Figure 3 As shown, I will not go into details here.

[0078] It should be noted that the number of server clusters managed by cloud devices can be more or less, the server cluster can be composed of more or less servers, and the number of nodes managed by the server can be more or less, and this application does not limit this.

[0079] In one possible implementation, the node information includes at least one of the node's network quality, the node's capacity, and the node's heartbeat information. The cloud device stores the node information and the correspondence between the node number and the node information. After determining the first node to be detected, the node information of the first node is obtained based on the node number of the first node and the correspondence between the node number and the node information.

[0080] For example, the node number of the first node to be detected is node 1. Based on the node number of the first node and the correspondence between the node information and the node number, the node information of the first node is obtained. The node information of the first node is as follows: the network quality of the first node includes the network time of the first node being 90 milliseconds, the number of network packet losses of the first node being 8, and the network bandwidth information of the first node being 30 megabytes; the node capacity of the first node includes the central processing unit (CPU) utilization rate of the first node being 70%, the memory utilization rate of the first node being 90%, and the number of input / output (IO) requests of the first node being 300; and the number of heartbeats of the first node being 4.

[0081] In step 202 , a health status of the first node is determined based on the node information of the first node.

[0082] In the exemplary embodiment of the present application, the health status of the first node includes a normal state and a sub-healthy state. The normal state means that the information value of the first node does not exceed the threshold corresponding to the node information, and the sub-healthy state means that the information value of the first node exceeds the threshold corresponding to the node information. This method provides an early warning of the sub-health status of the server node, so that the data write-back status and new node preparation work can be prepared in advance, and seamless, imperceptible automatic switching can be achieved. In addition, the health status of the server node is monitored in real time, and the operating status of the existing network can be grasped in real time, which can serve as the basis for fault switching.

[0083] In one possible implementation, the process of determining the health status of the first node based on the node information of the first node is: based on the node information of the first node, determining the information value of the first node; if the information value of the first node exceeds the threshold corresponding to the node information, determining that the health status of the first node is a sub-healthy state; if the information value of the first node does not exceed the threshold corresponding to the node information, determining that the health status of the first node is a normal state.

[0084] The threshold corresponding to the node information can be set based on experience and application scenarios, and can also be adjusted based on the application situation. This embodiment of the present application does not limit this.

[0085] Exemplarily, the threshold corresponding to the node information is determined based on the type of game run by the client. The types of games run by the client include, but are not limited to, strategy games and multiplayer online games. The threshold corresponding to the network quality of strategy games is higher than the threshold corresponding to the network quality of multiplayer online games, and the threshold corresponding to the node capacity of strategy games is higher than the threshold corresponding to the node capacity of multiplayer online games. If the type of game run by the client is a strategy game, the threshold corresponding to the network quality of the strategy game is 2.5, the threshold corresponding to the node capacity of the strategy game is 2.4, and the threshold corresponding to the heartbeat information of the strategy game is 5. If the type of game run by the client is a multiplayer online game, the threshold corresponding to the network quality of the multiplayer online game is 1.9, the threshold corresponding to the node capacity of the multiplayer online game is 2.1, and the threshold corresponding to the heartbeat information of the multiplayer online game is 5.

[0086] The node information includes at least one of network quality, node capacity, and heartbeat information, and the information value includes at least one of a quality value, a capacity value, and a heartbeat count. The quality value is determined based on the network quality of the first node, the capacity value is determined based on the node capacity of the first node, and the heartbeat count is determined based on the heartbeat information of the first node.

[0087] In a possible implementation, the health status of the first node is determined based on the node information of the first node, including the following four situations.

[0088] Case 1: The node information includes network quality, the information value includes a quality value, and the health status of the first node is determined based on the network quality of the first node.

[0089] In one possible implementation, when the node information of the first node only includes the network quality of the first node, a quality value of the first node is determined based on the network quality of the first node. If the quality value of the first node does not exceed a threshold corresponding to network quality, the health status of the first node is determined to be normal; if the quality value of the first node exceeds the threshold corresponding to network quality, the health status of the first node is determined to be sub-healthy. The threshold corresponding to network quality is determined based on the type of game running on the client.

[0090] Among them, network quality includes at least one of network time consumption, network packet loss number and network bandwidth information. Of course, network quality can also include others. The embodiment of this application only uses the above-mentioned network qualities as examples for illustration and does not limit the number of network qualities.

[0091] The process of determining the quality value of the first node based on the network quality of the first node is as follows: determining a weight parameter corresponding to the network quality of the first node; and determining the quality value of the first node based on the weight parameter corresponding to the network quality of the first node.

[0092] In one possible implementation, determining the weight parameter corresponding to the network quality of the first node includes: if the network quality of the first node includes network consumption, the number of network packet losses, and network bandwidth information, determining the weight parameter corresponding to the network consumption, the weight parameter corresponding to the number of network packet losses, and the weight parameter corresponding to the network bandwidth information.

[0093] In one possible implementation, when the network time is in different ranges, the weight parameters corresponding to the network time are inconsistent, as shown in Table 1 below, which is a table of the correspondence between network time and weight parameters provided in an embodiment of the present application.

[0094] Table 1

[0095] Network time (unit: milliseconds) Weight parameters (0,20] 0.1 (20,40] 0.3 (40,60] 0.6 (60,80] 0.8 (80,+∞) 1.0

[0096] In Table 1 above, when the network time is in the interval range of (0, 20], the weight parameter corresponding to the network time is 0.1; when the network time is in the interval range of (20, 40], the weight parameter corresponding to the network time is 0.3; when the network time is in the interval range of (40, 60], the weight parameter corresponding to the network time is 0.6; when the network time is in the interval range of (60, 80], the weight parameter corresponding to the network time is 0.8; when the network time is in the interval range of (80, +∞), the weight parameter corresponding to the network time is 1.0.

[0097] It should be noted that the weight parameter corresponding to network time is positively correlated with network time. That is, the longer the network time, the larger the corresponding weight parameter, and conversely, the shorter the network time, the smaller the corresponding weight parameter. When network time is within different ranges, the corresponding weight parameters are only used as examples shown in Table 1 above and are not used to limit the value of the weight parameter corresponding to network time.

[0098] In one possible implementation, when the number of network packet losses is within different ranges, the weight parameters corresponding to the number of network packet losses are inconsistent, as shown in Table 2 below, which is a table of the correspondence between the number of network packet losses and the weight parameters provided in an embodiment of the present application.

[0099] Table 2

[0100] Number of network packet losses (unit: piece) Weight parameters (0,5] 0.1 (5,10] 0.3 (10,15] 0.5 (15,20] 0.8 (20,+∞) 1.0

[0101] In Table 2 above, when the number of network packet losses is in the interval range of (0, 5], the weight parameter corresponding to the number of network packet losses is 0.1; when the number of network packet losses is in the interval range of (5, 10], the weight parameter corresponding to the number of network packet losses is 0.3; when the number of network packet losses is in the interval range of (10, 15], the weight parameter corresponding to the number of network packet losses is 0.5; when the number of network packet losses is in the interval range of (15, 20], the weight parameter corresponding to the number of network packet losses is 0.8; when the number of network packet losses is in the interval range of (20, +∞), the weight parameter corresponding to the number of network packet losses is 1.0.

[0102] It should be noted that the weight parameter corresponding to the number of network packet losses is positively correlated with the number of network packet losses. That is, the greater the number of network packet losses, the larger the corresponding weight parameter. Conversely, the smaller the number of network packet losses, the smaller the corresponding weight parameter. The corresponding weight parameters for different ranges of network packet losses are only used as examples shown in Table 2 above and are not intended to limit the value of the weight parameter corresponding to the number of network packet losses.

[0103] In one possible implementation, when the network bandwidth information is within different intervals, the weight parameters corresponding to the network bandwidth information are inconsistent. Table 3 below is a table showing the correspondence between network bandwidth information and weight parameters provided in an embodiment of the present application.

[0104] Table 3

[0105]

[0106]

[0107] In Table 3 above, when the network bandwidth information is in the interval range of (0, 50], the weight parameter corresponding to the network bandwidth information is 1.0; when the network bandwidth information is in the interval range of (50, 100], the weight parameter corresponding to the network bandwidth information is 0.8; when the network bandwidth information is in the interval range of (100, 150], the weight parameter corresponding to the network bandwidth information is 0.4; when the network bandwidth information is in the interval range of (150, 200], the weight parameter corresponding to the network bandwidth information is 0.1; when the network bandwidth information is in the interval range of (200, +∞), the weight parameter corresponding to the network bandwidth information is 0.

[0108] It should be noted that the weight parameter of network bandwidth information is negatively correlated with the network bandwidth information. That is, the smaller the network bandwidth information, the larger the corresponding weight parameter, and conversely, the larger the network bandwidth information, the smaller the corresponding weight parameter. When network bandwidth information is within different ranges, the corresponding weight parameters are only shown in Table 3 above as examples and are not intended to limit the value of the weight parameter corresponding to the network bandwidth information.

[0109] In one possible implementation, if the network quality of the first node includes the network time consumption of the first node, a weight parameter corresponding to the network time consumption of the first node is determined based on the network time consumption of the first node and Table 1. If the network quality of the first node includes the number of network packet losses of the first node, a weight parameter corresponding to the number of network packet losses of the first node is determined based on the number of network packet losses of the first node and Table 2. If the network quality of the first node includes the network bandwidth information of the first node, a weight parameter corresponding to the network bandwidth information of the first node is determined based on the network bandwidth information of the first node and Table 3.

[0110] In one possible implementation, the network quality of the first node includes network time consumption, number of network packet losses, and network bandwidth information. Based on the weight parameter corresponding to the network quality of the first node, the process of determining the quality value of the first node is: adding the weight parameters corresponding to the network time consumption, number of network packet losses, and network bandwidth information of the first node to obtain the quality value of the first node. The following formula (1) is a formula for determining the quality value Q of the first node.

[0111] Q=W1+W2+W3 (1)

[0112] In the above formula (1), W1 is the weight parameter corresponding to the network time consumption of the first node, W2 is the weight parameter corresponding to the number of network packet losses of the first node, and W3 is the weight parameter corresponding to the network bandwidth information of the first node.

[0113] For example, the network consumption of the first node is 90 milliseconds, the number of network packet losses of the first node is 8, and the network bandwidth information of the first node is 30 megabytes. Based on the network consumption of the first node and the above Table 1, it is determined that the weight parameter corresponding to the network consumption of the first node is 1.0. Based on the number of network packet losses of the first node and the above Table 2, it is determined that the weight parameter corresponding to the number of network packet losses of the first node is 0.3. Based on the network bandwidth information of the first node and the above Table 3, it is determined that the weight parameter corresponding to the network bandwidth information of the first node is 1.0. Based on the weight parameter corresponding to the network consumption of the first node, the weight parameter corresponding to the number of network packet losses of the first node, and the weight parameter corresponding to the network bandwidth information of the first node, according to the above formula (1), Q=1.0+0.3+1.0=2.3 is obtained, that is, the quality value of the first node is 2.3.

[0114] In one possible implementation, when the quality value of the first node exceeds a threshold corresponding to network quality, the health status of the first node is considered sub-healthy. When the quality value of the first node does not exceed the threshold corresponding to network quality, the health status of the first node is considered normal. The threshold corresponding to network quality is determined based on the type of game being run by the client.

[0115] For example, the type of game run by the client is a multiplayer online game, the threshold corresponding to the network quality of the multiplayer online game is 1.9, and the quality value of the first node is 2.3. Since the quality value of the first node is greater than the threshold corresponding to the network quality, the health status of the first node is determined to be a sub-healthy state.

[0116] For another example, the type of game run by the client is a strategy game, the threshold value corresponding to the network quality of strategy games is 2.5, and the quality value of the first node is 2.3. Since the quality value of the first node is less than the threshold value corresponding to the network quality, the health status of the first node is determined to be normal.

[0117] Case 2: The node information includes node capacity, the information value includes a capacity value, and the health status of the first node is determined based on the node capacity of the first node.

[0118] In one possible implementation, when the node information of the first node only includes the node capacity of the first node, a capacity value of the first node is determined based on the node capacity of the first node. If the capacity value of the first node does not exceed a threshold corresponding to the node capacity, the health status of the first node is determined to be normal; if the capacity value of the first node exceeds the threshold corresponding to the node capacity, the health status of the first node is determined to be sub-healthy. The threshold corresponding to the node capacity is determined based on the type of game running on the client.

[0119] Among them, the node capacity includes at least one of CPU utilization, memory utilization and the number of IO requests. Of course, the node capacity can also include others. The embodiment of the present application only uses the above-mentioned node capacities as examples for illustration and does not limit the number of node capacities.

[0120] The process of determining the capacity value of the first node based on the node capacity of the first node is as follows: determining a weight parameter corresponding to the node capacity of the first node; and determining the capacity value of the first node based on the weight parameter corresponding to the node capacity of the first node.

[0121] In one possible implementation, determining the weight parameters corresponding to the node capacity of the first node includes: if the node capacity of the first node includes CPU usage, memory usage, and the number of IO requests, determining the weight parameters corresponding to the CPU usage, the weight parameters corresponding to the memory usage, and the weight parameters corresponding to the number of IO requests.

[0122] In one possible implementation, when the CPU usage is in different ranges, the weight parameters corresponding to the CPU usage are inconsistent, as shown in Table 4 below, which is a table of the correspondence between CPU usage and weight parameters provided in an embodiment of the present application.

[0123] Table 4

[0124] CPU usage Weight parameters [0,30%) 0.1 [30,60%) 0.3 [60,80%) 0.7 [80,100%] 1.0

[0125] In Table 4 above, when the CPU usage is in the interval range [0, 30%), the weight parameter corresponding to the CPU usage is 0.1; when the CPU usage is in the interval range [30, 60%), the weight parameter corresponding to the CPU usage is 0.3; when the CPU usage is in the interval range [60, 80%), the weight parameter corresponding to the CPU usage is 0.7; when the CPU usage is in the interval range [80, 100%), the weight parameter corresponding to the CPU usage is 1.0.

[0126] It should be noted that the weight parameter corresponding to CPU usage is positively correlated with CPU usage. That is, higher CPU usage indicates a larger weight parameter, and conversely, lower CPU usage indicates a smaller weight parameter. The weight parameters corresponding to different CPU usage ranges are shown in Table 4 above as examples only and do not limit the value of the weight parameter corresponding to CPU usage.

[0127] In one possible implementation, when the memory usage is in different ranges, the weight parameters corresponding to the memory usage are inconsistent, as shown in Table 5 below, which is a table of the correspondence between memory usage and weight parameters provided in an embodiment of the present application.

[0128] Table 5

[0129]

[0130]

[0131] In Table 5 above, when the memory usage is in the interval range [0, 60%), the weight parameter corresponding to the memory usage is 0.1; when the memory usage is in the interval range [60%, 80%), the weight parameter corresponding to the memory usage is 0.4; when the memory usage is in the interval range [80%, 90%), the weight parameter corresponding to the memory usage is 0.8; when the memory usage is in the interval range [90%, 100%), the weight parameter corresponding to the memory usage is 1.0.

[0132] It should be noted that the weight parameter corresponding to memory usage is positively correlated with memory usage. That is, the higher the memory usage, the larger the corresponding weight parameter. Conversely, the lower the memory usage, the smaller the corresponding weight parameter. The corresponding weight parameters for different memory usage ranges are only shown in Table 5 above as examples and do not limit the value of the weight parameter corresponding to memory usage.

[0133] In one possible implementation, when the number of IO requests is within different ranges, the weight parameters corresponding to the number of IO requests are inconsistent. Table 6 below is a table showing the correspondence between the number of IO requests and the weight parameters provided in an embodiment of the present application.

[0134] Table 6

[0135] Number of IO requests (unit: times) Weight parameters [0,100) 0 [100,200) 0.3 [200,400) 0.6 [400,+∞) 1.0

[0136] In Table 6 above, when the number of IO requests is in the range [0, 100), the weight parameter corresponding to the number of IO requests is 0; when the number of IO requests is in the range [100, 200), the weight parameter corresponding to the number of IO requests is 0.3; when the number of IO requests is in the range [200, 400), the weight parameter corresponding to the number of IO requests is 0.6; when the number of IO requests is in the range [400, +∞), the weight parameter corresponding to the number of IO requests is 1.0.

[0137] It should be noted that the weight parameter corresponding to the number of I / O requests is positively correlated with the number of I / O requests. That is, the greater the number of I / O requests, the larger the corresponding weight parameter. Conversely, the smaller the number of I / O requests, the smaller the corresponding weight parameter. The weight parameters corresponding to different ranges of I / O requests are only used as examples in Table 6 above and are not intended to limit the value of the weight parameter corresponding to the number of I / O requests.

[0138] It should also be noted that the operating system of the first node can be an Android operating system, a Linux operating system, or other operating systems, and this embodiment of the present application does not limit this. Due to the different operating systems of the first node, the method of obtaining the node capacity of the first node is also different. Therefore, the cloud device provides a compatibility and conversion function, which is to use different methods to obtain the node capacity of the first node according to the first node of different operating systems.

[0139] In one possible implementation, if the node capacity of the first node includes the CPU usage of the first node, a weight parameter corresponding to the CPU usage of the first node is determined based on the CPU usage of the first node and Table 4. If the node capacity of the first node includes the memory usage of the first node, a weight parameter corresponding to the memory usage of the first node is determined based on the memory usage of the first node and Table 5. If the node capacity of the first node includes the number of IO requests of the first node, a weight parameter corresponding to the number of IO requests of the first node is determined based on the number of IO requests of the first node and Table 6.

[0140] In one possible implementation, the node capacity of the first node includes CPU usage, memory usage, and the number of I / O requests. Based on the weight parameter corresponding to the node capacity of the first node, the process of determining the capacity value of the first node is as follows: adding the weight parameters corresponding to the CPU usage, memory usage, and number of I / O requests of the first node to obtain the capacity value of the first node. The following formula (2) is a formula for determining the capacity value C of the first node.

[0141] C=W4+W5+W6 (2)

[0142] In the above formula (2), W4 is the weight parameter corresponding to the CPU usage of the first node, W5 is the weight parameter corresponding to the memory usage of the first node, and W6 is the weight parameter corresponding to the number of IO requests of the first node.

[0143] For example, the CPU utilization rate of the first node is 70%, the memory utilization rate of the first node is 90%, and the number of IO requests of the first node is 300. Based on the CPU utilization rate of the first node and the above Table 4, the weight parameter corresponding to the CPU utilization rate of the first node is determined to be 0.7; based on the memory utilization rate of the first node and the above Table 5, the weight parameter corresponding to the memory utilization rate of the first node is determined to be 1.0; based on the number of IO requests of the first node and the above Table 5, the weight parameter corresponding to the number of IO requests of the first node is determined to be 0.6. Based on the weight parameter corresponding to the node capacity of the first node, according to the above formula (2), C = 0.7 + 1.0 + 0.6 = 2.3 is obtained, that is, the capacity value of the first node is 2.3.

[0144] In one possible implementation, when the capacity value of the first node exceeds a threshold corresponding to the node capacity, the health status of the first node is sub-healthy. When the capacity value of the first node does not exceed the threshold corresponding to the node capacity, the health status of the first node is normal. The threshold corresponding to the node capacity is determined based on the type of game running on the client.

[0145] For example, the type of game run by the client is a multiplayer online game, the threshold corresponding to the node capacity of the multiplayer online game is 2.1, and the capacity value of the first node is 2.3. Since the capacity value of the first node is greater than the threshold corresponding to the node capacity, the health status of the first node is determined to be a sub-healthy state.

[0146] For another example, the type of game run by the client is a strategy game. The threshold value corresponding to the node capacity of the strategy game is 2.4, and the capacity value of the first node is 2.3. Since the capacity value of the first node is less than the threshold value corresponding to the node capacity, the health status of the first node is determined to be normal.

[0147] Case 3: The node information includes heartbeat information, the information value includes the number of heartbeats, and the health status of the first node is determined based on the heartbeat information of the first node.

[0148] In one possible implementation, when the node information of the first node includes only heartbeat information of the first node, the heartbeat count of the first node is determined, where the heartbeat count is the number of consecutive times that no heartbeat information is received within a target time period. If the heartbeat count of the first node does not exceed a threshold corresponding to the heartbeat information, the health status of the first node is determined to be normal; if the heartbeat count of the first node exceeds the threshold corresponding to the heartbeat information, the health status of the first node is determined to be sub-healthy.

[0149] The target time period is any value and is not limited in the present embodiment. For example, the target time period is 1 minute, or 30 seconds. The threshold corresponding to the heartbeat information is determined based on the type of game being run by the client.

[0150] For example, when the game type run by the client is a multiplayer online game, the threshold corresponding to the heartbeat information is 5, and the number of heartbeats of the first node is 6. Since the number of heartbeats of the first node exceeds the threshold corresponding to the heartbeat information, the health status of the first node is determined to be sub-healthy.

[0151] For another example, when the game type run by the client is a strategy game, the threshold corresponding to the heartbeat information is 5, and the number of heartbeats of the first node is 4. Since the number of heartbeats of the first node does not exceed the threshold corresponding to the heartbeat information, the health status of the first node is determined to be normal.

[0152] Case 4: The node information includes at least two of the network quality, node capacity and heartbeat information, and the information value includes at least two of the quality value, capacity value and heartbeat number. The health status of the first node is determined based on the network quality of the first node, the node capacity of the first node and at least two of the heartbeat information of the first node.

[0153] In one possible implementation, when the node information of the first node includes at least two of the network quality of the first node, the node capacity of the first node, and the heartbeat information of the first node, if at least one of the network quality of the first node, the node capacity of the first node, and the heartbeat information of the first node meets a requirement corresponding to a sub-healthy state, the health state of the first node is determined to be a sub-healthy state. If the network quality of the first node, the node capacity of the first node, and the heartbeat information of the first node all do not meet the requirements corresponding to a sub-healthy state, the health state of the first node is determined to be a normal state.

[0154] Among them, the determination process of whether the network quality of the first node meets the requirements corresponding to the sub-health state is consistent with the determination process in the above situation one, the determination process of whether the node capacity of the first node meets the requirements corresponding to the sub-health state is consistent with the determination process in the above situation two, and the determination process of whether the heartbeat information of the first node meets the requirements corresponding to the sub-health state is consistent with the determination process in the above situation three, and they will not be repeated here one by one.

[0155] For example, the node information of a first node includes the network quality of the first node and the node capacity of the first node. The quality value of the first node is 2.3, the capacity value of the first node is 2.5, the type of game run by the client is a strategy game, the threshold value corresponding to the network quality of strategy games is 2.5, and the threshold value corresponding to the node capacity of strategy games is 2.4. Although the quality value of the first node is lower than the threshold value corresponding to the network quality of strategy games, the capacity value of the first node is higher than the threshold value corresponding to the node capacity of strategy games. Therefore, the health status of the first node is determined to be sub-healthy.

[0156] For another example, the node information of a first node includes the network quality of the first node and the node capacity of the first node. The quality value of the first node is 1.8, the capacity value of the first node is 2.0, and the type of game run by the client is a multiplayer online game. The threshold value corresponding to the network quality of a multiplayer online game is 1.9, and the threshold value corresponding to the node capacity of a multiplayer online game is 2.1. Because the quality value of the first node is less than the threshold value corresponding to the network quality of a multiplayer online game, and the capacity value of the first node is less than the threshold value corresponding to the node capacity of a multiplayer online game, the health status of the first node is determined to be normal.

[0157] In one possible implementation, when the node information of the first node includes the network quality of the first node, the node capacity of the first node, and the heartbeat information of the first node, the health status of the first node is determined to be sub-healthy as long as at least one of the quality value, capacity value, and heartbeat number of the first node exceeds a corresponding threshold. The health status of the first node is determined to be normal only if the quality value, capacity value, and heartbeat number of the first node all exceed the corresponding threshold.

[0158] In step 203, if the health status of the first node is a sub-healthy state, a second node is determined.

[0159] The second node is an idle node, that is, the second node is not currently interacting with any client, and the second node is a node that takes over the first node to interact with the client.

[0160] In one possible implementation, if the health status of the first node is sub-healthy, the process of determining the second node is as follows: if the health status of the first node is sub-healthy, determine a first server cluster from multiple server clusters; based on the loadable capacity of the first server cluster, determine a second server cluster from the first server cluster; based on the operating status of each node in the second server cluster, determine a third server cluster from the second server cluster, where the third server cluster has a node with an idle status; determine a node with an idle status in the third server cluster, and determine the node with an idle status as the second node. The number of first server clusters is not greater than the total number of server clusters, the number of second server clusters is not greater than the number of first server clusters, and the number of third server clusters is not greater than the number of second server clusters.

[0161] In one possible implementation, a server cluster corresponds to a region. A region can correspond to one or more server clusters. Nodes within a server cluster interact only with clients located in the region corresponding to the server cluster. For example, if server cluster 1 corresponds to Beijing, then nodes within server cluster 1 interact with clients located in Beijing.

[0162] If the health status of the first node is sub-healthy, the process of determining the first server cluster among multiple server clusters is: obtaining the client's regional attributes, and based on the client's regional attributes, determining the first server cluster among multiple server clusters, and the regional attributes of the first server cluster are consistent with the client's regional attributes.

[0163] In one possible implementation, the process of obtaining the client's regional attribute is as follows: obtaining the client's Internet Protocol Address (IP address), resolving the client's IP address, and obtaining the client's regional attribute. For example, if the client's IP address is 1.119.168.90, resolving the IP address yields the client's regional attribute of "Beijing." For another example, if the client's IP address is 124.78.217.0, resolving the IP address yields the client's regional attribute of "Shanghai."

[0164] For example, the cloud device manages five server clusters: server cluster 1, server cluster 1, server cluster 3, server cluster 4, and server cluster 5. The region attribute corresponding to server cluster 1 is "Beijing," the region attribute corresponding to server cluster 2 is "Shanghai," the region attribute corresponding to server cluster 3 is "Beijing," the region attribute corresponding to server cluster 4 is "Beijing," and the region attribute corresponding to server cluster 5 is "Beijing." The client's IP address is parsed, and the client's region attribute is determined to be "Beijing." Therefore, server cluster 1, server cluster 3, server cluster 4, and server cluster 5 among the five server clusters are determined as the first server cluster.

[0165] In one possible implementation, based on the load-bearing capacity of the first server cluster, determining the second server cluster in the first server cluster includes: determining the load-bearing capacity of the first server cluster, and determining the first server cluster whose load-bearing capacity meets the requirements as the second server cluster. Specifically, determining the load-bearing capacity of the first server cluster includes: determining the number of nodes in the first server cluster with an idle status as the load-bearing capacity of the first server cluster.

[0166] The first server cluster whose load-bearing capacity meets the requirements may be the first server cluster whose load-bearing capacity is before the target position. For example, the first server cluster whose load-bearing capacity is in the top three is determined as the second server cluster. The first server cluster whose load-bearing capacity meets the requirements may also be the first server cluster whose load-bearing capacity exceeds the target threshold. For example, the first server cluster whose load-bearing capacity exceeds 25 is determined as the second server cluster. The target threshold is an arbitrary value and is not limited in the embodiments of the present application.

[0167] For example, the loadable capacity of server cluster 1 is 32, the loadable capacity of server cluster 3 is 30, the loadable capacity of server cluster 4 is 23, and the loadable capacity of server cluster 5 is 28. When the first server cluster whose loadable capacity meets the requirements is the first server cluster with the loadable capacity in the top three, the second server clusters determined are: server cluster 1, server cluster 3, and server cluster 5. When the first server cluster whose loadable capacity meets the requirements is the first server cluster with the loadable capacity exceeding 25, the second server clusters determined are: server cluster 1, server cluster 3, and server cluster 5.

[0168] In one possible implementation, the node status of the nodes managed by the second server cluster is determined, and the server clusters having nodes in the idle state are identified as the third server cluster. For example, if server cluster 1, server cluster 3, and server cluster 5 all have nodes in the idle state, the third server cluster includes server cluster 1, server cluster 3, and server cluster 5.

[0169] In one possible implementation, a node with an idle status is determined in the third server cluster. Determine whether the node with an idle status is compatible with the client. If the node with an idle status is compatible with the client, determine the node with an idle status as the second node. If the node with an idle status is not compatible with the client, re-determine a node with an idle status in the third server cluster until the re-determined node with an idle status is compatible with the client, and determine the re-determined node with an idle status as the second node; or, if the node with an idle status is not compatible with the client, display a warning message, which is used to indicate that the node with an idle status cannot replace the first node to interact with the client. The content of the warning message can be "The node with an idle status is not compatible with the client, please re-determine the node with an idle status." Of course, the warning message can also be other content, which is not limited in the embodiments of the present application.

[0170] In one possible implementation, to improve server cluster utilization, a third server cluster with nodes in a running state is prioritized over a third server cluster without running nodes. In other words, a third server cluster with running nodes is prioritized over a third server cluster that is completely idle. Therefore, based on the operating status of each node in the third server cluster, a fourth server cluster is determined within the third server cluster. The fourth server cluster contains both idle and running nodes.

[0171] For example, server cluster 1 contains both idle and active nodes; server cluster 3 contains only idle nodes; and server cluster 5 contains both idle and active nodes. Therefore, server cluster 1 and server cluster 5 are identified as the fourth server cluster.

[0172] In one possible implementation, after determining the fourth server cluster, a node with an idle status is randomly determined in the fourth server cluster to determine whether the idle node and the client are compatible. If the idle node and the client are compatible, the idle node is determined as the second node. If the idle node and the client are not compatible, a new idle node is determined in the fourth server cluster until the newly determined idle node and the client are compatible, and the newly determined idle node is determined as the second node; or, if the idle node and the client are not compatible, a warning message is displayed, which is used to indicate that the idle node cannot take over the first node to interact with the client.

[0173] In a possible implementation process, the process of determining whether the node with an idle status and the client are compatible is: if the client meets the access rights of the node with an idle status, it is determined that the node with an idle status and the client are compatible; if the client does not meet the access rights of the node with an idle status, it is determined that the node with an idle status and the client are not compatible.

[0174] For example, if a node in the idle state needs to access a client's picture, and the client's picture access permission is "forbidden", then the node in the idle state is not compatible with the client. For another example, if a node in the idle state needs to access a client's picture, and the client's picture access permission is "accessible" or "accessible during runtime", then the node in the idle state is compatible with the client.

[0175] The above description only uses the access permission of accessing pictures of the client as an example. The access permission may also be the permission of accessing other applications in the client, which is not limited in the embodiment of the present application.

[0176] For example, in the third server cluster, node 25 is determined to be in an idle state and compatible with the client, so node 25 is determined to be the second node. For another example, in the third server cluster, node 25 is determined to be in an idle state, but incompatible with the client. In the third server cluster, node 30 is determined to be in an idle state and compatible with the client, so node 30 is determined to be the second node.

[0177] In step 204, the second node is connected to the client, and the second node interacts with the client.

[0178] In one possible implementation, after determining the second node in step 203, it is necessary to obtain the files required for the client to run, generate a mirror file based on the files required for the client to run, pull up the mirror file in the second node, and disconnect the connection between the first node and the client.

[0179] The process of generating a mirror file based on the files required for client operation is as follows: all files required for client operation are stored in the cloud device, the cloud device obtains the files required for client operation from its storage space, copies the files, and obtains the mirror file.

[0180] In one possible implementation, since the client is disconnected from the first node, that is, the client is currently not connected to any node and is not interacting with any node, the second node is quickly connected to the client to enable the second node to interact with the client, that is, the second node performs logical calculations and image rendering, the second node compresses the rendered image to obtain a compressed file, and the second node sends the compressed file to the client.

[0181] In one possible implementation, after disconnecting the first node from the client, the cloud device can also repair the first node so that the health status of the repaired first node is normal, thereby allowing the repaired first node to take over other nodes with sub-health status to interact with other clients.

[0182] In one possible implementation, after the cloud device connects the second node to the client, it also monitors the health of the second node in real time. When the health of the second node is sub-healthy, the cloud device re-determines a third node so that the third node can replace the second node in interacting with the client. The process for determining the third node is consistent with the process for determining the second node in the embodiments of the present application and will not be repeated here.

[0183] The above method performs health detection on the first node in real time. When the health status of the first node is detected to be sub-healthy, the second node is determined and the second node is used to interact with the client. That is, the first node is replaced by the second node before the first node fails, thereby achieving early warning of the first node. The first node is switched to the second node when the user is unaware of the failure of the first node, reducing the probability of user disconnection, improving the user's gaming experience and game quality, and improving the reliability of the interaction between the node and the client.

[0184] like Figure 4 The diagram shows a schematic diagram of the architecture of a cloud device provided by an embodiment of the present application. Figure 4 In the cloud, the equipment includes server clusters, observation centers and migration control centers.

[0185] Among them, the cloud device manages multiple server clusters, each server cluster manages multiple servers, each server includes multiple nodes, and the server cluster reports the node information of each node it manages to the observation center.

[0186] The observation center receives the node information of the first node reported by the server cluster, and determines the health status of the first node based on the node information of the first node. The process of determining the health status of the first node is consistent with the process of step 202 above, and will not be repeated here. When the health status of the first node is sub-healthy, the observation center obtains the regional attributes of the client interacting with the first node, and determines the second node to replace the first node based on the regional attributes of the client. The process of determining the second node is consistent with the process of step 203 above, and will not be repeated here. The observation center sends a migration notification message to the migration control center, and the migration notification message is used to notify the migration control center to replace the first node with the second node. The first node is a node included in any server cluster that is interacting with the client.

[0187] The migration control center receives the migration notification message, parses the migration notification message, obtains the second node and the first node carried by the migration notification message, and the migration control center determines whether the second node is compatible with the client. The process of determining whether the second node and the client are compatible is consistent with the process of step 203 above and will not be repeated here. If the second node and the client are compatible, a mirror file is generated based on the files required for the client to run, the mirror file is pulled up in the second node, the connection between the first node and the client is disconnected, and the second node and the client are connected. If the second node and the client are not compatible, the migration control center generates an early warning message and displays the early warning message, which is used to indicate that the second node and the client are not compatible.

[0188] In one possible implementation, after the migration control center determines that the second node and the client are not compatible, it can also send a feedback message to the observation center, and the feedback message is used to instruct the observation center to redetermine the second node. After the observation center redetermines the second node, the observation center re-sends a migration notification message to the migration control center, and the re-sent migration notification message carries the first node and the redetermined second node. The migration control center determines whether the redetermined second node and the client are compatible. If the redetermined second node and the client are compatible, the file required for the client to run is obtained, and a mirror file is generated based on the file required for the client to run. The mirror file is pulled up in the redetermined second node, the connection between the first node and the client is disconnected, and the redetermined second node is connected to the client.

[0189] Figure 5 FIG. 1 is a schematic diagram of a node switching device according to an embodiment of the present application. Figure 5 As shown, the device includes:

[0190] An acquiring unit 501 is configured to acquire node information of a first node to be detected, where the first node is a node currently interacting with the client;

[0191] A first determining unit 502 is configured to determine a health status of the first node based on the node information of the first node;

[0192] The second determining unit 503 is configured to determine a second node if the health status of the first node is a sub-healthy state, and the second node is an idle node;

[0193] The connecting unit 504 is configured to connect the second node to the client, and to enable the second node to interact with the client.

[0194] In one possible implementation, the first determination unit 502 is used to determine the information value of the first node based on the node information of the first node; if the information value of the first node exceeds the threshold corresponding to the node information, the health status of the first node is determined to be a sub-healthy state; if the information value of the first node does not exceed the threshold corresponding to the node information, the health status of the first node is determined to be a normal state.

[0195] In one possible implementation, the node information includes at least one of network quality, node capacity, and heartbeat information, and the information value includes at least one of quality value, capacity value, and heartbeat number. The quality value is determined based on the network quality of the first node, the capacity value is determined based on the node capacity of the first node, and the heartbeat number is determined based on the heartbeat information of the first node.

[0196] In one possible implementation, the node information includes network quality, and the information value includes a quality value;

[0197] The first determination unit 502 is used to determine the weight parameter corresponding to the network quality of the first node; based on the weight parameter corresponding to the network quality of the first node, determine the quality value of the first node, where the network quality includes at least one of network time consumption, number of network packet losses and network bandwidth information.

[0198] In one possible implementation, the network quality includes network time, number of network packet losses, and network bandwidth information. The weight parameter corresponding to the network time is positively correlated with the network time, the weight parameter corresponding to the number of network packet losses is positively correlated with the number of network packet losses, and the weight parameter corresponding to the network bandwidth information is negatively correlated with the network bandwidth information.

[0199] The first determining unit 502 is configured to add weight parameters corresponding to the network time consumption, the number of network packet losses, and the network bandwidth information of the first node to obtain a quality value of the first node.

[0200] In one possible implementation, the node information includes node capacity, and the information value includes a capacity value;

[0201] The first determination unit 502 is used to determine the weight parameter corresponding to the node capacity of the first node; based on the weight parameter corresponding to the node capacity of the first node, the capacity value of the first node is determined, and the node capacity includes at least one of the central processing unit utilization rate, memory utilization rate and the number of input and output requests.

[0202] In a possible implementation, the node capacity includes a CPU usage rate, a memory usage rate, and the number of input / output requests, wherein the weight parameter corresponding to the CPU usage rate is positively correlated with the CPU usage rate, the weight parameter corresponding to the memory usage rate is positively correlated with the memory usage rate, and the weight parameter corresponding to the number of input / output requests is positively correlated with the number of input / output requests;

[0203] The first determining unit 502 is configured to add weight parameters corresponding to the CPU usage, memory usage, and number of input and output requests of the first node to obtain a capacity value of the first node.

[0204] In one possible implementation, the threshold corresponding to the node information is determined based on the type of game run by the client.

[0205] In one possible implementation, the types of games run by the client include strategy games and multiplayer online games. The threshold corresponding to the network quality of strategy games is higher than the threshold corresponding to the network quality of multiplayer online games, and the threshold corresponding to the node capacity of strategy games is higher than the threshold corresponding to the node capacity of multiplayer online games.

[0206] In one possible implementation, if the type of game run by the client is a strategy game, the threshold corresponding to the network quality of the strategy game is 2.5, the threshold corresponding to the node capacity of the strategy game is 2.4, and the threshold corresponding to the heartbeat information of the strategy game is 5; if the type of game run by the client is a multiplayer online game, the threshold corresponding to the network quality of the multiplayer online game is 1.9, the threshold corresponding to the node capacity of the multiplayer online game is 2.1, and the threshold corresponding to the heartbeat information of the multiplayer online game is 5.

[0207] In one possible implementation, a cloud device manages multiple server clusters, where the server clusters are composed of multiple servers, and the servers include multiple nodes;

[0208] The second determining unit 503 is configured to determine a first server cluster from the plurality of server clusters if the health status of the first node is a sub-healthy state, where the number of the first server clusters is not greater than the total number of server clusters;

[0209] Determine a second server cluster in the first server cluster based on the loadable capacity of the first server cluster, wherein the number of the second server clusters is not greater than the number of the first server clusters;

[0210] Based on the running status of each node in the second server cluster, a third server cluster is determined in the second server cluster, where there are nodes in the third server cluster with an idle status, and the number of the third server clusters is not greater than the number of the second server clusters;

[0211] Determining a node in the third server cluster whose node status is idle;

[0212] A node whose node status is idle is determined as the second node.

[0213] In a possible implementation, the apparatus further includes:

[0214] A third determining unit, configured to determine whether the node in the idle state is compatible with the client;

[0215] The second determining unit 503 is configured to determine the node in the idle state as the second node if the node in the idle state is adapted to the client.

[0216] In a possible implementation, the second determining unit 503 is further configured to, if the node in the idle state is not compatible with the client, re-determine a node in the third server cluster in the idle state, until the re-determined node in the idle state is compatible with the client, and determine the re-determined node in the idle state as the second node;

[0217] The device also includes:

[0218] The display unit is used to display a warning message if the node with an idle status is not compatible with the client, where the warning message is used to indicate that the node with an idle status cannot replace the first node to interact with the client.

[0219] In one possible implementation, the second determination unit 503 is used to obtain the regional attributes of the client if the health status of the first node is sub-healthy; based on the regional attributes of the client, determine the first server cluster among multiple server clusters, and the regional attributes of the first server cluster are consistent with the regional attributes of the client.

[0220] In a possible implementation, the third determining unit is configured to determine that the node with the idle status is adapted to the client if the client satisfies the access rights of the node with the idle status;

[0221] If the client does not meet the access rights of the node whose node status is idle, it is determined that the node whose node status is idle and the client are not compatible.

[0222] In a possible implementation, the acquisition unit 501 is further configured to acquire files required for the client to run and generate an image file;

[0223] The connection unit 504 is configured to pull up the image file in the second node and disconnect the first node from the client.

[0224] The above-mentioned device performs health detection on the first node in real time. When it is detected that the health status of the first node is sub-healthy, the second node is determined, and the second node is used to interact with the client. That is, the first node is replaced by the second node before the first node fails, thereby achieving early warning of the first node, so that the first node can be switched to the second node without the user being aware of the failure of the first node. The probability of user disconnection is reduced, the user's gaming experience and game quality are improved, and the reliability of the interaction between the node and the client can also be improved.

[0225] It should be understood that the above Figure 5 The provided device is illustrated only by the division of the above-mentioned functional modules when implementing its functions. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiments are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0226] Figure 6The following is a block diagram of a client 600 according to an exemplary embodiment of the present application. The client 600 can be a portable mobile client, such as a smartphone, tablet computer, MP3 player (Moving Picture Experts Group Audio Layer III), MP4 player (Moving Picture Experts Group Audio Layer IV), laptop computer, or desktop computer. The client 600 may also be referred to as a user device, portable client, laptop client, desktop client, or other similar names.

[0227] Typically, the client 600 includes a processor 601 and a memory 602 .

[0228] The processor 601 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 601 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor 601 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 601 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 601 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0229] The memory 602 may include one or more computer-readable storage media, which may be non-transitory. The memory 602 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 602 is used to store at least one instruction, which is used to be executed by the processor 601 to implement the node switching method provided in the method embodiment of the present application.

[0230] In some embodiments, client 600 may optionally include a peripheral device interface 603 and at least one peripheral device. The processor 601, memory 602, and peripheral device interface 603 may be connected via a bus or signal lines. Each peripheral device may be connected to peripheral device interface 603 via a bus, signal lines, or circuit boards. Specifically, the peripheral device may include at least one of a radio frequency circuit 604, a display screen 605, a camera assembly 606, an audio circuit 607, and a power supply 609.

[0231] The peripheral device interface 603 can be used to connect at least one I / O (Input / Output)-related peripheral device to the processor 601 and the memory 602. In some embodiments, the processor 601, the memory 602, and the peripheral device interface 603 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 601, the memory 602, and the peripheral device interface 603 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.

[0232] The RF circuit 604 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 604 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 604 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the RF circuit 604 includes an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. The RF circuit 604 can communicate with other clients via at least one wireless communication protocol. Such wireless communication protocols include, but are not limited to, the World Wide Web, metropolitan area networks, intranets, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 604 may also include circuits related to Near Field Communication (NFC), which is not limited in this application.

[0233] Display screen 605 is used to display a user interface (UI). This UI can include graphics, text, icons, videos, or any combination thereof. When display screen 605 is a touchscreen display, it can also capture touch signals on or above the surface of display screen 605. These touch signals can be input as control signals to processor 601 for processing. Display screen 605 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there can be a single display screen 605, located on the front panel of client 600. In other embodiments, there can be at least two display screens 605, located on different surfaces of client 600 or in a foldable design. In still other embodiments, display screen 605 can be a flexible display screen, located on a curved or foldable surface of client 600. Display screen 605 can also be configured as a non-rectangular, irregular shape, i.e., a special-shaped screen. Display screen 605 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).

[0234] The camera assembly 606 is used to capture images or videos. Optionally, the camera assembly 606 includes a front camera and a rear camera. Typically, the front camera is set on the front panel of the client, and the rear camera is set on the back of the client. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 606 may also include a flash. The flash can be a monochrome temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.

[0235] The audio circuit 607 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals that are input into the processor 601 for processing, or input into the radio frequency circuit 604 to achieve voice communication. For the purpose of stereo sound collection or noise reduction, there may be multiple microphones, each located in different parts of the client 600. The microphone may also be an array microphone or an omnidirectional collection microphone. The speaker is used to convert electrical signals from the processor 601 or the radio frequency circuit 604 into sound waves. The speaker may be a traditional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert electrical signals into sound waves audible to humans, but also convert electrical signals into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 607 may also include a headphone jack.

[0236] Power supply 609 is used to power various components in client 600. Power supply 609 can be AC power, DC power, a disposable battery, or a rechargeable battery. When power supply 609 includes a rechargeable battery, the rechargeable battery can be wired or wireless. A wired rechargeable battery is charged via a wired line, while a wireless rechargeable battery is charged via a wireless coil. The rechargeable battery can also support fast charging technology.

[0237] In some embodiments, the client 600 further includes one or more sensors 160 , including but not limited to: an acceleration sensor 611 , a gyroscope sensor 612 , a pressure sensor 613 , an optical sensor 615 , and a proximity sensor 616 .

[0238] The accelerometer 611 can detect the magnitude of acceleration along the three coordinate axes of the coordinate system established by the client 600. For example, the accelerometer 611 can be used to detect the components of gravity acceleration along the three coordinate axes. The processor 601 can control the display screen 605 to display the user interface in a landscape or portrait view based on the gravity acceleration signal collected by the accelerometer 611. The accelerometer 611 can also be used to collect game or user motion data.

[0239] The gyroscope sensor 612 can detect the orientation and rotation angle of the client 600. It can work in conjunction with the accelerometer 611 to collect the user's 3D movements on the client 600. Based on the data collected by the gyroscope sensor 612, the processor 601 can implement the following functions: motion sensing (for example, changing the UI based on the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.

[0240] The pressure sensor 613 can be installed on the side frame of the client 600 and / or the lower layer of the display screen 605. When the pressure sensor 613 is installed on the side frame of the client 600, it can detect the user's grip signal on the client 600. The processor 601 performs left and right hand recognition or shortcut operations based on the grip signal collected by the pressure sensor 613. When the pressure sensor 613 is installed on the lower layer of the display screen 605, the processor 601 controls the operational controls on the UI interface based on the user's pressure operation on the display screen 605. The operational controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.

[0241] Optical sensor 615 is used to detect ambient light intensity. In one embodiment, processor 601 can control the display brightness of display screen 605 based on the ambient light intensity detected by optical sensor 615. Specifically, when the ambient light intensity is high, the display brightness of display screen 605 is increased; when the ambient light intensity is low, the display brightness of display screen 605 is decreased. In another embodiment, processor 601 can also dynamically adjust the shooting parameters of camera assembly 606 based on the ambient light intensity detected by optical sensor 615.

[0242] Proximity sensor 616, also known as a distance sensor, is typically located on the front panel of client 600. Proximity sensor 616 is used to detect the distance between the user and the front of client 600. In one embodiment, when proximity sensor 616 detects that the distance between the user and the front of client 600 is gradually decreasing, processor 601 controls display screen 605 to switch from the screen-on state to the screen-off state. When proximity sensor 616 detects that the distance between the user and the front of client 600 is gradually increasing, processor 601 controls display screen 605 to switch from the screen-off state to the screen-on state.

[0243] Those skilled in the art will understand that Figure 6 The structure shown in the figure does not constitute a limitation on the client 600, and the client 600 may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component arrangement.

[0244] Figure 7This is a schematic diagram of the structure of the cloud device provided in the embodiment of the present application. The cloud device 700 may have relatively large differences due to different configurations or performances, and may include one or more processors (Central Processing Units, CPU) 701 and one or more memories 702, wherein at least one program code is stored in the one or more memories 702, and the at least one program code is loaded and executed by the one or more processors 701 to implement the node switching method provided in the above-mentioned various method embodiments. Of course, the cloud device 700 may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output. The cloud device 700 may also include other components for implementing device functions, which will not be described in detail here.

[0245] In an exemplary embodiment, a computer-readable storage medium is further provided, in which at least one program code is stored. The at least one program code is loaded and executed by a processor to enable a computer to implement any of the above-mentioned node switching methods.

[0246] Optionally, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, or the like.

[0247] In an exemplary embodiment, a computer program or a computer program product is further provided. The computer program or the computer program product stores at least one computer instruction, and the at least one computer instruction is loaded and executed by a processor to enable a computer to implement any of the above-mentioned node switching methods.

[0248] It should be understood that the term "plurality" used herein refers to two or more. "And / or" describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone. The character " / " generally indicates an "or" relationship between the associated objects.

[0249] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0250] The above description is merely an exemplary embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A node switching method, characterized in that: The method is executed by a cloud device, the cloud device and the client are connected to each other via a network, the cloud device manages multiple server clusters, the server clusters include multiple servers, and the servers include multiple nodes. The method includes: Acquire node information of a first node to be detected, where the first node is a node currently interacting with the client; Determining a health status of the first node based on the node information of the first node; If the health status of the first node is a sub-healthy state, determining a first server cluster from the multiple server clusters, where the number of the first server clusters is not greater than the total number of the server clusters; Determining a second server cluster in the first server cluster based on the carrying capacity of the first server cluster, wherein the number of the second server clusters is not greater than the number of the first server clusters; Determine a third server cluster in the second server cluster based on the running status of each node in the second server cluster, wherein the third server cluster includes nodes in an idle state, and the number of the third server cluster is not greater than the number of the second server clusters; Determining a node in the third server cluster whose node status is idle; Determine the node whose node status is idle as the second node; The second node is connected to the client, and the second node interacts with the client.

2. The method according to claim 1, characterized in that The determining, based on the node information of the first node, the health status of the first node includes: determining an information value of the first node based on the node information of the first node; If the information value of the first node exceeds a threshold corresponding to the node information, determining that the health state of the first node is the sub-health state; If the information value of the first node does not exceed a threshold corresponding to the node information, it is determined that the health status of the first node is normal.

3. The method according to claim 2, characterized in that The node information includes at least one of network quality, node capacity and heartbeat information, and the information value includes at least one of quality value, capacity value and heartbeat number. The quality value is determined based on the network quality of the first node, the capacity value is determined based on the node capacity of the first node, and the heartbeat number is determined based on the heartbeat information of the first node.

4. The method according to claim 2, characterized in that The node information includes network quality, and the information value includes a quality value; The determining the information value of the first node based on the node information of the first node includes: Determining a weight parameter corresponding to the network quality of the first node; The quality value of the first node is determined based on a weight parameter corresponding to the network quality of the first node, where the network quality includes at least one of network time consumption, number of network packet losses, and network bandwidth information.

5. The method according to claim 4, characterized in that The network quality includes network time consumption, number of network packet losses and network bandwidth information, the weight parameter corresponding to the network time consumption is positively correlated with the network time consumption, the weight parameter corresponding to the number of network packet losses is positively correlated with the number of network packet losses, and the weight parameter corresponding to the network bandwidth information is negatively correlated with the network bandwidth information; The determining the quality value of the first node based on the weight parameter corresponding to the network quality of the first node includes: The weight parameters corresponding to the network time consumption, the number of network packet losses, and the network bandwidth information of the first node are added together to obtain the quality value of the first node.

6. The method according to claim 2, characterized in that The node information includes node capacity, and the information value includes capacity value; Determining an information value of the first node based on the node information of the first node includes: Determining a weight parameter corresponding to the node capacity of the first node; A capacity value of the first node is determined based on a weight parameter corresponding to a node capacity of the first node, where the node capacity includes at least one of a central processing unit usage rate, a memory usage rate, and a number of input and output requests.

7. The method according to claim 6, characterized in that The node capacity includes a CPU usage rate, a memory usage rate, and a number of input / output requests, wherein a weight parameter corresponding to the CPU usage rate is positively correlated with the CPU usage rate, a weight parameter corresponding to the memory usage rate is positively correlated with the memory usage rate, and a weight parameter corresponding to the number of input / output requests is positively correlated with the number of input / output requests; The determining the capacity value of the first node based on the weight parameter corresponding to the node capacity of the first node includes: The weight parameters corresponding to the central processing unit usage rate, the memory usage rate, and the number of input and output requests of the first node are added together to obtain the capacity value of the first node.

8. The method according to any one of claims 2 to 7, characterized in that: The threshold corresponding to the node information is determined based on the type of game run by the client.

9. The method according to any one of claims 1 to 7, characterized in that: Before determining the node whose node status is idle as the second node, the method further includes: Determining whether the node with the idle status is compatible with the client; The step of determining the node whose node status is idle as the second node includes: If the node in the idle state is compatible with the client, the node in the idle state is determined as the second node.

10. The method according to claim 9, characterized in that The method further comprises: If the node in the idle state is not compatible with the client, re-determine a node in the third server cluster in the idle state until the re-determined node in the idle state is compatible with the client, and determine the re-determined node in the idle state as the second node; Alternatively, if the node in the idle state is not compatible with the client, a warning message is displayed, where the warning message is used to indicate that the node in the idle state cannot replace the first node to interact with the client.

11. The method according to any one of claims 1 to 7, characterized in that: If the health status of the first node is a sub-healthy state, determining a first server cluster from the multiple server clusters includes: If the health status of the first node is sub-healthy, obtaining the regional attribute of the client; Based on the regional attribute of the client, the first server cluster is determined from the multiple server clusters, and the regional attribute of the first server cluster is consistent with the regional attribute of the client.

12. The method according to claim 9, characterized in that The determining whether the node whose node status is idle is compatible with the client includes: If the client satisfies the access rights of the node whose node status is idle, determining that the node whose node status is idle is adapted to the client; If the client does not meet the access rights of the node whose node status is idle, it is determined that the node whose node status is idle is not compatible with the client.

13. The method according to any one of claims 1 to 7, characterized in that: After determining the node whose node status is idle as the second node, the method further includes: Obtain the files required for the client to run and generate an image file; Pulling up the image file in the second node; Disconnect the first node from the client.

14. A node switching device, characterized in that: The device comprises: an acquiring unit, configured to acquire node information of a first node to be detected, where the first node is a node currently interacting with the client; a first determining unit, configured to determine a health status of the first node based on the node information of the first node; A second determining unit is configured to, if the health status of the first node is a sub-healthy state, determine a first server cluster in a plurality of server clusters, the number of the first server clusters being no greater than the total number of the server clusters; determine a second server cluster in the first server cluster based on the carrying capacity of the first server cluster, the number of the second server clusters being no greater than the number of the first server clusters; determine a third server cluster in the second server cluster based on the running status of each node in the second server cluster, the third server cluster having nodes in an idle state, the number of the third server clusters being no greater than the number of the second server clusters; determine a node in the third server cluster in an idle state; and determine the node in the idle state as the second node; A connecting unit is configured to connect the second node to the client, and to interact with the client based on the second node.

15. The device according to claim 14, characterized in that The first determination unit is used to determine the information value of the first node based on the node information of the first node; if the information value of the first node exceeds the threshold corresponding to the node information, the health status of the first node is determined to be the sub-healthy state; if the information value of the first node does not exceed the threshold corresponding to the node information, the health status of the first node is determined to be the normal state.

16. The device according to claim 15, characterized in that The node information includes at least one of network quality, node capacity and heartbeat information, and the information value includes at least one of quality value, capacity value and heartbeat number. The quality value is determined based on the network quality of the first node, the capacity value is determined based on the node capacity of the first node, and the heartbeat number is determined based on the heartbeat information of the first node.

17. The device according to claim 15, characterized in that The node information includes network quality, and the information value includes a quality value; The first determination unit is used to determine a weight parameter corresponding to the network quality of the first node; based on the weight parameter corresponding to the network quality of the first node, determine the quality value of the first node, where the network quality includes at least one of network time consumption, number of network packet losses and network bandwidth information.

18. The device according to claim 17, characterized in that The network quality includes network time consumption, number of network packet losses and network bandwidth information, the weight parameter corresponding to the network time consumption is positively correlated with the network time consumption, the weight parameter corresponding to the number of network packet losses is positively correlated with the number of network packet losses, and the weight parameter corresponding to the network bandwidth information is negatively correlated with the network bandwidth information; The first determining unit is configured to add weight parameters corresponding to the network time consumption, the number of network packet losses, and the network bandwidth information of the first node to obtain a quality value of the first node.

19. The device according to claim 15, characterized in that The node information includes node capacity, and the information value includes capacity value; The first determination unit is used to determine a weight parameter corresponding to the node capacity of the first node; based on the weight parameter corresponding to the node capacity of the first node, determine the capacity value of the first node, where the node capacity includes at least one of a central processing unit utilization rate, a memory utilization rate, and a number of input and output requests.

20. The device according to claim 19, characterized in that The node capacity includes a CPU usage rate, a memory usage rate, and a number of input / output requests, wherein a weight parameter corresponding to the CPU usage rate is positively correlated with the CPU usage rate, a weight parameter corresponding to the memory usage rate is positively correlated with the memory usage rate, and a weight parameter corresponding to the number of input / output requests is positively correlated with the number of input / output requests; The first determining unit is configured to add weight parameters corresponding to the CPU usage, memory usage, and number of input and output requests of the first node to obtain a capacity value of the first node.

21. The device according to any one of claims 15 to 20, characterized in that The threshold corresponding to the node information is determined based on the type of game run by the client.

22. The device according to any one of claims 14 to 20, characterized in that The device further comprises: A third determining unit, configured to determine whether the node in the idle state is compatible with the client; The second determining unit is configured to determine the node in the idle state as the second node if the node in the idle state is adapted to the client.

23. The device according to claim 22, characterized in that The second determining unit is further configured to, if the node in the idle state is not compatible with the client, re-determine a node in the third server cluster in the idle state, until the re-determined node in the idle state is compatible with the client, and determine the re-determined node in the idle state as the second node; The device further comprises: The display unit is configured to display a warning message if the node in the idle state is incompatible with the client, wherein the warning message is used to indicate that the node in the idle state cannot replace the first node to interact with the client.

24. The device according to any one of claims 14 to 20, characterized in that The second determination unit is used to obtain the regional attribute of the client if the health status of the first node is sub-healthy; based on the regional attribute of the client, determine the first server cluster among the multiple server clusters, and the regional attribute of the first server cluster is consistent with the regional attribute of the client.

25. The device according to claim 22, characterized in that The third determining unit is configured to determine that the node in the idle state is adapted to the client if the client satisfies the access permission of the node in the idle state; If the client does not meet the access rights of the node whose node status is idle, it is determined that the node whose node status is idle is not compatible with the client.

26. The device according to any one of claims 14 to 20, characterized in that The acquisition unit is further configured to acquire files required for the client to run and generate a mirror file; The connecting unit is configured to pull up the image file in the second node; Disconnect the first node from the client.

27. A cloud device, characterized in that: The cloud device includes a processor and a memory, wherein at least one program code is stored in the memory, and the at least one program code is loaded and executed by the processor so that the cloud device implements the node switching method as described in any one of claims 1 to 13.

28. A computer-readable storage medium, characterized in that The computer-readable storage medium stores at least one program code, and the at least one program code is loaded and executed by a processor to enable a computer to implement the node switching method according to any one of claims 1 to 13.

29. A computer program product, characterized in that The computer program product stores at least one computer instruction, and the at least one computer instruction is loaded and executed by a processor to enable a computer to implement the node switching method according to any one of claims 1 to 13.

Citation Information

Patent Citations

  • Multi-level data center master-slave switching control method and cloud scheduling director

    CN109995554A