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

Node switching method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN113144622A
CN113144622A CN202110470440.3A CN202110470440A CN113144622A CN 113144622 A CN113144622 A CN 113144622A CN 202110470440 A CN202110470440 A CN 202110470440A CN 113144622 A CN113144622 A CN 113144622A
Authority
CN
China
Prior art keywords
node
client
determining
information
network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110470440.3A
Other languages
Chinese (zh)
Inventor
陆燕慧
洪楷
徐士立
付亚彬
钟炳武
马啸虎
胡玉林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202110470440.3A priority Critical patent/CN113144622A/en
Publication of CN113144622A publication Critical patent/CN113144622A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/70Game security or game management aspects
    • A63F13/77Game security or game management aspects involving data related to game devices or game servers, e.g. configuration data, software version or amount of memory
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Business, Economics & Management (AREA)
  • Computer Security & Cryptography (AREA)
  • General Business, Economics & Management (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application discloses a node switching method, a node switching device, a node switching equipment and a computer readable storage medium, and belongs to the technical field of cloud games. The method comprises the following steps: acquiring node information of a first node to be detected, wherein the first node is a node which is interacted with a client currently; determining a health state of the first node based on node information of the first node; if the health state of the first node is a sub-health state, determining a second node, wherein the second node is an idle node; and connecting the second node with the client, and interacting with the client based on the second node. The method can switch the nodes for the user under the condition that the user does not sense, and the first node is switched to the second node before the first node fails, so that the game quality of the user is improved, and the interaction reliability of the nodes and the client is improved.

Description

Node switching method, device, equipment and computer readable storage medium
Technical Field
The embodiment of the application relates to the technical field of cloud games, in particular to a node switching method, a node switching device, a node switching equipment and a computer readable storage medium.
Background
The cloud game is a game mode based on cloud computing, the process of logic computing and picture rendering which should be carried out at a client is placed on a cloud device, the cloud device carries out computing and rendering to obtain a game picture, the game picture is compressed and sent to the client, and the game picture is displayed by the client.
In the related art, the cloud device management includes a plurality of server clusters, each server cluster is composed of a plurality of servers, each server manages a plurality of nodes, and the nodes are virtual devices. When a game runs in the client, the client interacts with a first node in the cloud equipment, game logic calculation and picture rendering are carried out by the first node, the rendered game picture is compressed by the first node to obtain a compressed file, and the compressed file is transmitted to the client by the first node through a network. And the client decompresses the compressed file after receiving the compressed file to obtain a rendered game picture, and displays the rendered game picture.
However, as the number of game users is increasing, the load of the cloud device is increasing, and the probability of the node failure is also increasing. Therefore, a node switching method is needed to switch a first node to a second node before the first node fails, so that a user is unaware of the switching of the nodes, the game quality of the user is improved, and the reliability of interaction between the nodes and a client is improved.
Disclosure of Invention
The embodiment of the application provides a node switching method, a node switching device and a computer readable storage medium, which can be used for solving the problem of low reliability of interaction between a node and a client. The technical scheme is as follows:
in one aspect, an embodiment of the present application provides a node switching method, where the method includes:
acquiring node information of a first node to be detected, wherein the first node is a node which is interacted with the client currently;
determining a health status of the first node based on node information of the first node;
if the health state of the first node is a sub-health state, determining a second node, wherein the second node is an idle node;
and connecting the second node with the client, and interacting with the client based on the second node.
In a possible implementation manner, the types of the games executed by the client include a policy-type game and a multiplayer online-type game, a threshold corresponding to the network quality of the policy-type game is higher than a threshold corresponding to the network quality of the multiplayer online-type game, and a threshold corresponding to the node capacity of the policy-type game is higher than a threshold corresponding to the node capacity of the multiplayer online-type game.
In a possible implementation manner, if the type of the game run by the client is the policy game, a threshold corresponding to the network quality of the policy game is 2.5, a threshold corresponding to the node capacity of the policy game is 2.4, and a threshold corresponding to the heartbeat information of the policy game is 5; if the type of the game operated 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.
In another aspect, an embodiment of the present application provides a node switching apparatus, where the apparatus includes:
the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring node information of a first node to be detected, and the first node is a node which is interacted with the client currently;
a first determination unit, configured to determine a health status of the first node based on node information of the first node;
a second determining unit, configured to determine a second node if the health state of the first node is a sub-health state, where the second node is an idle node;
and the connecting unit is used for connecting the second node with the client and interacting with the client based on the second node.
In a possible implementation manner, the first determining unit is configured to determine an information value of the first node based on node information of the first node; if the information value of the first node exceeds the threshold value corresponding to the node information, determining that the health state of the first node is the sub-health state; and if the information value of the first node does not exceed the threshold corresponding to the node information, determining that the health state of the first node is a normal state.
In one possible implementation, the node information includes at least one of network quality, node capacity, and heartbeat information, the information value includes at least one of a quality value, a capacity value, and a number of heartbeats, 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 number of heartbeats is determined based on the heartbeat information of the first node.
In one possible implementation, the node information includes network quality, and the information value includes a quality value;
the first determining unit is configured to determine a weight parameter corresponding to the network quality of the first node; and determining a quality value of the first node based on a weight parameter corresponding to the network quality of the first node, wherein the network quality comprises at least one of network time consumption, network packet loss quantity and network bandwidth information.
In a possible implementation manner, the network quality includes network consumed time, network packet loss number, and network bandwidth information, a weight parameter corresponding to the network consumed time is positively correlated with the network consumed time, a weight parameter corresponding to the network packet loss number is positively correlated with the network packet loss number, and a weight parameter corresponding to the network bandwidth information is negatively correlated with the network bandwidth information;
the first determining unit is configured to add the network consumption time of the first node, the number of network packet losses, and the weight parameter corresponding to the network bandwidth information, to obtain a quality value of the first node.
In one possible implementation, the node information includes a node capacity, and the information value includes a capacity value;
the first determining unit is configured to determine a weight parameter corresponding to a node capacity of the first node; and determining a capacity value of the first node based on a weight parameter corresponding to the node capacity of the first node, wherein the node capacity comprises at least one of a central processing unit utilization rate, a memory utilization rate and an input/output request quantity.
In a possible implementation manner, the node capacity includes a central processing unit usage rate, a memory usage rate, and an input/output request number, a weight parameter corresponding to the central processing unit usage rate is positively correlated with the central processing unit 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 input/output request number is positively correlated with the input/output request number;
the first determining unit is configured to add weight parameters corresponding to the central processing unit utilization rate, the memory utilization rate, and the number of input/output requests of the first node to obtain a capacity value of the first node.
In a possible implementation manner, the threshold corresponding to the node information is determined based on the type of the game run by the client.
In a possible implementation manner, the types of the games executed by the client include a policy-type game and a multiplayer online-type game, a threshold corresponding to the network quality of the policy-type game is higher than a threshold corresponding to the network quality of the multiplayer online-type game, and a threshold corresponding to the node capacity of the policy-type game is higher than a threshold corresponding to the node capacity of the multiplayer online-type game.
In a possible implementation manner, if the type of the game run by the client is the policy game, a threshold corresponding to the network quality of the policy game is 2.5, a threshold corresponding to the node capacity of the policy game is 2.4, and a threshold corresponding to the heartbeat information of the policy game is 5; if the type of the game operated 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.
In one possible implementation manner, the cloud device manages a plurality of server clusters, each server cluster is composed of a plurality of servers, and each server includes a plurality of nodes;
the second determining unit is configured to determine, if the health state of the first node is a sub-health state, a first server cluster in the plurality of 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 bearable capacity of the first server cluster, wherein the number of the second server cluster is not greater than the number of the first server cluster;
determining a third server cluster in the second server cluster based on the running state of each node in the second server cluster, wherein nodes with node states being idle exist in the third server cluster, and the number of the third server clusters is not more than that of the second server cluster;
determining nodes with idle node states in the third server cluster;
and determining the node with the node state as idle as the second node.
In one possible implementation, the apparatus further includes:
a third determining unit, configured to determine whether the node whose node status is idle and the client are adapted;
the second determining unit is configured to determine, if the node in the idle node state is adapted to the client, the node in the idle node state as the second node.
In a possible implementation manner, the second determining unit is further configured to determine, if the node with the idle node state is not adapted to the client, the node with the idle node state again in the third server cluster until the node with the idle node state determined again is adapted to the client, and determine the node with the idle node state determined again as the second node;
the device further comprises:
and the display unit is used for displaying an early warning message if the node with the idle node state is not matched with the client, wherein the early warning message is used for indicating that the node with the idle node state cannot take over the interaction between the first node and the client.
In a possible implementation manner, the second determining unit is configured to obtain a region attribute of the client if the health state of the first node is a sub-health state; determining the first server cluster in the plurality of server clusters based on the zone attribute of the client, wherein the zone attribute of the first server cluster is consistent with the zone attribute of the client.
In a possible implementation manner, the third determining unit is configured to determine that the node with the idle node status is adapted to the client if the client satisfies the access right of the node with the idle node status;
and if the client does not meet the access right of the node with the idle node state, determining that the node with the idle node state is not adaptive to the client.
In a possible implementation manner, the obtaining unit is further configured to obtain a file required by the client to operate, and generate an image file;
the connecting unit is used for pulling up the mirror image file in the second node; and disconnecting the first node and the client.
On the other hand, an embodiment of the present application provides a cloud device, where the cloud device includes a processor and a memory, where 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 one of the above node switching methods.
In another aspect, a computer-readable storage medium is provided, in which at least one program code is stored, and the at least one program code is loaded and executed by a processor, so as to enable a computer to implement any one of the above-mentioned node switching methods.
In another aspect, a computer program or a computer program product is provided, in which at least one computer instruction is stored, and the at least one computer instruction is loaded and executed by a processor, so as to enable a computer to implement any one of the above node switching methods.
According to the technical scheme, the health detection is carried out on the first node in real time, when the health state of the first node is detected to be a sub-health state, the second node is determined, the second node is used for interacting with the client, namely the first node is replaced by the second node before the first node breaks down, the early warning of the first node is achieved, the first node is switched to the second node under the condition that a user does not sense the failure of the first node, the probability of the user disconnection is reduced, the game experience and the game quality of the user are improved, and the reliability of the interaction between the node and the client can be improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic diagram of an implementation environment of a node switching method according to an embodiment of the present application;
fig. 2 is a flowchart of a node switching method according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a cloud device according to an embodiment of the present disclosure;
fig. 4 is a schematic architecture diagram of a cloud device according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a node switching apparatus according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a client according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a cloud device according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
For ease of understanding, a number of terms referred to in the embodiments of the present application are explained first:
cloud Gaming (Cloud Gaming) may also be called game On Demand (Gaming On Demand), which is an online game technology based On Cloud computing technology. Cloud game technology enables light-end devices (thin clients) with relatively limited graphics processing and data computing capabilities to run high-quality games. In a cloud game scene, a game is not operated in a player game terminal but in a cloud server, and the cloud server renders the game scene into a video and audio stream which is transmitted to the player game terminal through a network. The player game terminal does not need to have strong graphic operation and data processing capacity, and only needs to have basic streaming media playing capacity and capacity of acquiring player input instructions and sending the instructions to the cloud server.
Cloud computing (Cloud computing) is a computing model that distributes computing tasks over a pool of resources made up of a large number of computers, enabling various application systems to obtain computing power, storage space, and information services as needed. The network that provides the resources is referred to as the "cloud". Resources in the "cloud" appear to the user as being infinitely expandable and available at any time, available on demand, expandable at any time, and paid for on-demand.
As a basic capability provider of cloud computing, a cloud computing resource pool (called as an IaaS (Infrastructure as a Service) platform for short) is established, and multiple types of virtual resources are deployed in the resource pool and are selectively used by external clients. The cloud computing resource pool mainly comprises: computing devices (which are virtualized machines, including operating systems), storage devices, and network devices.
According to the logic function division, a Platform as a Service (PaaS) layer can be deployed on the IaaS layer, a Software as a Service (SaaS) layer is deployed on the PaaS layer, and the SaaS layer can be directly deployed on the IaaS layer. PaaS is a platform on which software runs, such as a database, a web container, etc. SaaS is a variety of business software, such as web portal, sms, and mass texting. Generally speaking, SaaS and PaaS are upper layers relative to IaaS.
Cloud technology refers to a hosting technology for unifying serial resources such as hardware, software, network and the like in a wide area network or a local area network to realize calculation, storage, processing and sharing of data. The cloud technology is a general term of network technology, information technology, integration technology, management platform technology, application technology and the like applied based on a cloud computing business model, can form a resource pool, is used as required, and is flexible and convenient. Cloud computing technology will become an important support. Background services of the technical network system require a large amount of computing and storage resources, such as video websites, picture-like websites and more web portals. With the high development and application of the internet industry, each article may have its own identification mark and needs to be transmitted to a background system for logic processing, data in different levels are processed separately, and various industrial data need strong system background support and can only be realized through cloud computing.
The embodiment of the application provides a node switching method, which is applied to a cloud game scene, and the cloud game is the same as other network games, and the service provided by a game server is influenced by network quality, supporting capacity and machine downtime.
In contrast, the method provided by the embodiment of the application is used for preprocessing and migrating the sub-healthy server side cluster nodes aiming at the cloud game scene. The method has the advantages that thermal migration is carried out before the node fault really occurs, and preprocessing before the migration is adopted, so that the player can be unaware, compared with a processing mode that the node is switched after the fault, the player experience is improved, the game loss is reduced, the game quality is improved, the occurrence rate of the actual fault is reduced, the efficiency of cloud game operation and maintenance personnel can be improved, and the manpower is reduced.
Please refer to fig. 1, which illustrates a schematic diagram of an implementation environment of a node switching method according to an embodiment of the present application. The implementation environment includes: a client 11 and a cloud device 12.
The client 11 may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, and the like. The cloud device 12 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), a big data and artificial intelligence platform, and the like. The client 11 and the cloud device 12 may be directly or indirectly connected through wired or wireless communication, and the application is not limited herein.
Those skilled in the art should understand that the client 11 and the cloud device 12 are only examples, and other existing or future client or cloud devices may be applicable to the present application, and are included in the scope of the present application and are incorporated herein by reference.
Based on the implementation environment shown in fig. 1, an embodiment of the present application provides a node switching method, which is applied to the cloud device 12 as an example. As shown in fig. 2, the method provided by the embodiment of the present application includes the following steps.
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.
The cloud equipment is executed, the cloud equipment and the client are in communication connection through a wired network or a wireless network, the cloud equipment is managed by a plurality of server clusters, each server cluster is composed of a plurality of servers, and each server comprises a plurality of nodes. The client has an application installed and run therein, and the application may be a game application or other types of applications, which is not limited in this embodiment of the present application. The client-side carries out communication interaction with a first node in the cloud-side equipment, so that the first node completes the logical calculation and picture rendering process of a scene picture required by an application program running in the client-side, and the rendered scene picture is sent to the client-side by the first node and displayed by the client-side.
Illustratively, the application installed and run in the client is a game application, the client performs communication interaction with the first node, the first node performs game logic calculation and image rendering, the first node compresses a rendered game image to obtain a compressed file, and the first node transmits the compressed file to the client through a network. And the client receives the compressed file, decompresses the compressed file to obtain a rendered game picture, and displays the rendered game picture on the display interface.
If only one node which is interacting with the client exists in the cloud device, the node which is interacting with the client is determined as a first node to be detected. If a plurality of nodes which are interacting with the client exist in the cloud equipment, randomly determining one node as a first node to be detected in the plurality of nodes which are interacting with the client; or, sequentially taking the plurality of nodes interacting with the client as the first nodes to be detected according to the time when the plurality of nodes interacting with the client begin to interact.
Fig. 3 is a schematic structural diagram of a cloud device according to an embodiment of the present application, in fig. 3, the cloud device manages five server clusters, which are a server cluster 1, a server cluster 2, a server cluster 3, a server cluster 4, and a server cluster 5. The server cluster 1 is composed of a server 1 and a server 2, the server cluster 2 is composed of a server 3 and a server 4, the server cluster 3 is composed of a server 5 and a server 6, the server cluster 4 is composed of a server 7 and a server 8, and the server cluster 5 is composed of a server 9 and a server 10. The server 1 manages the node 1, the node 2, and the node 3, and the nodes managed by other servers are shown in fig. 3, which is not described in detail herein.
It should be noted that the number of server clusters managed by the cloud device may be greater or less, the server clusters may be composed of a greater or less number of servers, and the number of nodes managed by the server may be greater or less, which is not limited in the present application.
In one possible implementation, the node information includes at least one of a network quality of the node, a node capacity of the node, and heartbeat information of the node. The cloud device stores node information and the corresponding relation between the node number and the node information, and after a first node to be detected is determined, the node information of the first node is obtained based on the node number of the first node and the corresponding relation between the node number and the node information.
Illustratively, the node number of the first node to be detected is node 1, and the node information of the first node is acquired based on the node number of the first node and the corresponding relationship between the node information and the node number. The node information of the first node is: the network quality of the first node comprises that the network consumption of the first node is 90 milliseconds, the network packet loss number of the first node is 8, and the network bandwidth information of the first node is 30 million; the node capacity of the first node includes that the utilization rate of a Central Processing Unit (CPU) of the first node is 70%, the memory utilization rate of the first node is 90%, and the number of Input/Output (IO) requests of the first node is 300; the first node has a heartbeat number of 4.
In step 202, a health status of the first node is determined based on the node information of the first node.
In the exemplary embodiment of the present application, the health state of the first node includes a normal state and a sub-health 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-health state means that the information value of the first node exceeds the threshold corresponding to the node information. According to the method, early warning is carried out on the sub-health state of the server node, so that the server node can be prepared in advance on the data write-back state and the new node preparation work, and seamless and perceptive automatic switching can be achieved. And the health state of the server node is monitored in real time, and the current network running state can be mastered in real time, so that the health state can be used as a basis for fault switching.
In a possible implementation manner, based on the node information of the first node, the process of determining the health status of the first node is: determining an information value of a first node based on node information of the first node, and determining that the health state of the first node is a sub-health state if the information value of the first node exceeds a threshold corresponding to the node information; and if the information value of the first node does not exceed the threshold corresponding to the node information, determining that the health state of the first node is a normal state.
The threshold corresponding to the node information may be set based on experience and an application scenario, and may also be adjusted based on an application situation, which is not limited in the embodiment of the present application.
Illustratively, the threshold value 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, policy-type games and multiplayer online-type games. The threshold value corresponding to the network quality of the strategy game is higher than the threshold value corresponding to the network quality of the multiplayer online game, and the threshold value corresponding to the node capacity of the strategy game is higher than the threshold value corresponding to the node capacity of the multiplayer online game. If the type of the game operated 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 the game operated 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.
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 number of heartbeats. 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 frequency is determined based on the heartbeat information of the first node.
In one possible implementation manner, the determining the health status of the first node based on the node information of the first node includes the following four cases.
In case one, the node information includes a network quality and the information value includes a quality value, the health status of the first node is determined based on the network quality of the first node.
In one possible implementation, when the node information of the first node includes only the network quality of the first node, the 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 the threshold corresponding to the network quality, determining that the health state of the first node is a normal state; and if the quality value of the first node exceeds the threshold corresponding to the network quality, determining that the health state of the first node is a sub-health state. The threshold value corresponding to the network quality is determined based on the type of game run by the client.
The network quality includes at least one of network time consumption, network packet loss amount, and network bandwidth information, and certainly, the network quality may also include other network qualities.
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.
In a possible implementation manner, determining a weight parameter corresponding to the network quality of the first node includes: if the network quality of the first node comprises network consumed time, network packet loss quantity and network bandwidth information, determining a weight parameter corresponding to the network consumed time, a weight parameter corresponding to the network packet loss quantity and a weight parameter corresponding to the network bandwidth information.
In a possible implementation manner, when the network consumed time is in different interval ranges, the weighting parameters corresponding to the network consumed time are inconsistent, as shown in the table one below, which is a table of a corresponding relationship between the network consumed time and the weighting parameters provided in the embodiment of the present application.
Watch 1
Network time consumption (unit: millisecond) Weight parameter
(0,20] 0.1
(20,40] 0.3
(40,60] 0.6
(60,80] 0.8
(80,+∞) 1.0
In the first table, when the network elapsed time is within the interval range (0, 20), the weight parameter corresponding to the network elapsed time is 0.1, when the network elapsed time is within the interval range (20, 40), the weight parameter corresponding to the network elapsed time is 0.3, when the network elapsed time is within the interval range (40, 60), the weight parameter corresponding to the network elapsed time is 0.6, when the network elapsed time is within the interval range (60, 80), the weight parameter corresponding to the network elapsed time is 0.8, and when the network elapsed time is within the interval range (80, + ∞), the weight parameter corresponding to the network elapsed time is 1.0.
It should be noted that the weight parameter corresponding to the network consumed time is positively correlated with the network consumed time, that is, the longer the network consumed time is, the larger the weight parameter corresponding to the network consumed time is, and conversely, the shorter the network consumed time is, the smaller the weight parameter corresponding to the network consumed time is. When the network consumed time is in different interval ranges, the corresponding weight parameter is only shown in the table one as an example, and is not used to limit the value of the weight parameter corresponding to the network consumed time.
In a possible implementation manner, when the number of network packet losses is in different interval ranges, the weight parameters corresponding to the number of network packet losses are inconsistent, and as shown in the following table two, a table of a corresponding relationship between the number of network packet losses and the weight parameters is provided in the embodiment of the present application.
Watch two
Network packet loss number (unit: one) Weight parameter
(0,5] 0.1
(5,10] 0.3
(10,15] 0.5
(15,20] 0.8
(20,+∞) 1.0
In the above table two, when the network packet loss number is within the interval range (0, 5), the weight parameter corresponding to the network packet loss number is 0.1, when the network packet loss number is within the interval range (5, 10), the weight parameter corresponding to the network packet loss number is 0.3, when the network packet loss number is within the interval range (10, 15), the weight parameter corresponding to the network packet loss number is 0.5, when the network packet loss number is within the interval range (15, 20), the weight parameter corresponding to the network packet loss number is 0.8, and when the network packet loss number is within the interval range (20, + ∞), the weight parameter corresponding to the network packet loss number is 1.0.
It should be noted that the weight parameter corresponding to the network packet loss number is positively correlated to the network packet loss number. That is, the more the network packet loss number is, the larger the weight parameter corresponding to the network packet loss number is, otherwise, the less the network packet loss number is, the smaller the weight parameter corresponding to the network packet loss number is. When the network packet loss number is in different interval ranges, the corresponding weight parameter is only shown in the above table two as an example, and is not used to limit the value of the weight parameter corresponding to the network packet loss number.
In a possible implementation manner, when the network bandwidth information is located in different interval ranges, the weighting parameters corresponding to the network bandwidth information are inconsistent, and as shown in the following table three, a table of a corresponding relationship between the network bandwidth information and the weighting parameters provided in the embodiment of the present application is provided.
Watch III
Figure BDA0003045158880000121
Figure BDA0003045158880000131
In the third table, when the network bandwidth information is in the interval range (0, 50), the weight parameter corresponding to the network bandwidth information is 1.0, when the network bandwidth information is in the interval range (50, 100), the weight parameter corresponding to the network bandwidth information is 0.8, when the network bandwidth information is in the interval range (100, 150), the weight parameter corresponding to the network bandwidth information is 0.4, when the network bandwidth information is in the interval range (150, 200), the weight parameter corresponding to the network bandwidth information is 0.1, and when the network bandwidth information is in the interval range (200, + ∞), the weight parameter corresponding to the network bandwidth information is 0.
It should be noted that the weighting parameter of the network bandwidth information is inversely related to the network bandwidth information. That is, the smaller the network bandwidth information is, the larger the weight parameter corresponding to the network bandwidth information is, and conversely, the larger the network bandwidth information is, the smaller the weight parameter corresponding to the network bandwidth information is. When the network bandwidth information is in different interval ranges, the weight parameter corresponding to the network bandwidth information is only shown in the third table as an example, and is not used to limit the value of the weight parameter corresponding to the network bandwidth information.
In a possible implementation manner, if the network quality of the first node includes the network consumed time of the first node, a weight parameter corresponding to the network consumed time of the first node is determined based on the network consumed time of the first node and the first table. If the network quality of the first node includes the network packet loss number of the first node, determining a weight parameter corresponding to the network packet loss number of the first node based on the network packet loss number of the first node and the second table. And if the network quality of the first node comprises the network bandwidth information of the first node, determining a weight parameter corresponding to the network bandwidth information of the first node based on the network bandwidth information of the first node and the third table.
In a possible implementation manner, the network quality of the first node includes network time consumption, network packet loss amount, and network bandwidth information, and the process of determining the quality value of the first node based on the weight parameter corresponding to the network quality of the first node is as follows: and adding the network time consumption, the network packet loss quantity and the weight parameters corresponding to the network bandwidth information of the first node to obtain the quality value of the first node. The following equation (1) is a determination equation of the quality value Q of the first node.
Q=W1+W2+W3 (1)
In the above formula (1), W1A weight parameter, W, corresponding to the network consumption time of the first node2A weight parameter, W, corresponding to the number of network packet losses of the first node3And the weight parameter is the weight parameter corresponding to the network bandwidth information of the first node.
Illustratively, the network time 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. And determining that the weight parameter corresponding to the network consumed time of the first node is 1.0 based on the network consumed time of the first node and the first table. And determining that the weight parameter corresponding to the network packet loss number of the first node is 0.3 based on the network packet loss number of the first node and the second table. And determining that the weight parameter corresponding to the network bandwidth information of the first node is 1.0 based on the network bandwidth information of the first node and the third table. Based on the weight parameter corresponding to the network consumption time of the first node, the weight parameter corresponding to the network packet loss number 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 is 1.0+0.3+1.0 is 2.3, that is, the quality value of the first node is 2.3.
In a possible implementation manner, when the quality value of the first node exceeds the threshold corresponding to the network quality, the health state of the first node is indicated as a sub-health state, and when the quality value of the first node does not exceed the threshold corresponding to the network quality, the health state of the first node is indicated as a normal state. The threshold value corresponding to the network quality is determined based on the type of game run by the client.
Illustratively, the type of the 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 quality value of the first node is 2.3, and the health state of the first node is determined to be a sub-health state because the quality value of the first node is greater than the threshold corresponding to the network quality.
For another example, the type of the game run by the client is a policy-type game, the threshold corresponding to the network quality of the policy-type game is 2.5, the quality value of the first node is 2.3, and the health state of the first node is determined to be a normal state because the quality value of the first node is smaller than the threshold corresponding to the network quality.
And in the second case, the node information comprises node capacity, the information value comprises a capacity value, and the health state of the first node is determined based on the node capacity of the first node.
In a possible implementation manner, when the node information of the first node only includes the node capacity of the first node, determining a capacity value of the first node based on the node capacity of the first node, and if the capacity value of the first node does not exceed a threshold corresponding to the node capacity, determining that the health state of the first node is a normal state; and if the capacity value of the first node exceeds the threshold value corresponding to the node capacity, determining that the health state of the first node is a sub-health state. The threshold value corresponding to the node capacity is determined based on the type of game run by the client.
The node capacity includes at least one of a CPU utilization rate, a memory utilization rate, and an IO request number, and certainly, the node capacity may also include others.
Based on the node capacity of the first node, the process of determining the capacity value 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.
In a possible implementation manner, determining a weight parameter corresponding to the node capacity of the first node includes: if the node capacity of the first node comprises the CPU utilization rate, the memory utilization rate and the IO request quantity, determining a weight parameter corresponding to the CPU utilization rate, a weight parameter corresponding to the memory utilization rate and a weight parameter corresponding to the IO request quantity.
In a possible implementation manner, when the CPU utilization is located in different interval ranges, the weighting parameters corresponding to the CPU utilization are inconsistent, and as shown in the following table four, the table of the correspondence relationship between the CPU utilization and the weighting parameters provided in the embodiment of the present application is provided.
Watch four
CPU utilization Weight parameter
[0,30%) 0.1
[30,60%) 0.3
[60,80%) 0.7
[80,100%] 1.0
In the fourth table, when the CPU utilization is within the interval range [0, 30%), the weight parameter corresponding to the CPU utilization is 0.1; when the CPU utilization rate is in the interval range [30, 60%), the weight parameter corresponding to the CPU utilization rate is 0.3; when the CPU utilization rate is in the interval range [60, 80%), the weight parameter corresponding to the CPU utilization rate is 0.7; when the CPU utilization rate is in the interval range [80, 100% ], the weight parameter corresponding to the CPU utilization rate is 1.0.
It should be noted that the weighting parameter corresponding to the CPU utilization rate is positively correlated with the CPU utilization rate. That is, the higher the CPU utilization rate is, the larger the weight parameter corresponding to the CPU utilization rate is, whereas, at the end of the CPU utilization rate, the smaller the weight parameter corresponding to the CPU utilization rate is. When the CPU utilization is in different interval ranges, the corresponding weight parameter is only shown in the above table four as an example, and is not used to limit the value of the weight parameter corresponding to the CPU utilization.
In a possible implementation manner, when the memory usage rate is in different interval ranges, the weighting parameters corresponding to the memory usage rate are inconsistent, and a table of a correspondence relationship between the memory usage rate and the weighting parameters provided in this embodiment is shown in the following table five.
Watch five
Figure BDA0003045158880000151
Figure BDA0003045158880000161
In the fifth table, when the memory usage rate is within the interval range [0, 60%), the weight parameter corresponding to the memory usage rate is 0.1; when the memory utilization rate is within the interval range of [ 60%, 80%), the weight parameter corresponding to the memory utilization rate is 0.4; when the memory utilization rate is within the interval range of 80 percent and 90 percent, the weight parameter corresponding to the memory utilization rate is 0.8; when the memory usage rate is in the interval range of [ 90%, 100% ], the weight parameter corresponding to the memory usage rate is 1.0.
It should be noted that the weight parameter corresponding to the memory usage rate is positively correlated to the memory usage rate. That is, the higher the memory usage rate is, the larger the weight parameter corresponding to the memory usage rate is, and conversely, the lower the memory usage rate is, the smaller the weight parameter corresponding to the memory usage rate is. When the memory usage rates are in different interval ranges, the weight parameters corresponding to the memory usage rates are only shown in the fifth table as an example, and are not used to limit the values of the weight parameters corresponding to the memory usage rates.
In a possible implementation manner, when the number of IO requests is in different interval ranges, the weight parameters corresponding to the number of IO requests are inconsistent, and as shown in the following table six, a table of a corresponding relationship between the number of IO requests and the weight parameters provided in the embodiment of the present application is provided.
Watch six
IO request amount (unit: order) Weight parameter
[0,100) 0
[100,200) 0.3
[200,400) 0.6
[400,+∞) 1.0
In the sixth table, when the number of IO requests is within the range [0, 100], the weight parameter corresponding to the number of IO requests is 0; when the IO request quantity is within the interval range [100, 200], the weight parameter corresponding to the IO request quantity is 0.3; when the IO request quantity is within the interval range [200, 400 ], the weight parameter corresponding to the IO request quantity is 0.6; when the number of IO requests is within the range [400, + ∞ ], the weighting parameter corresponding to the number of IO requests is 1.0.
It should be noted that the weight parameters corresponding to the number of IO requests are positively correlated with the number of IO requests, that is, the larger the number of IO requests is, the larger the weight parameters corresponding to the number of IO requests is, and conversely, the smaller the number of IO requests is, the smaller the weight parameters corresponding to the number of IO requests is. When the number of IO requests is in different interval ranges, the corresponding weight parameters are only shown in the above table six as an example, and are not used to limit the values of the weight parameters corresponding to the number of IO requests.
It should be further noted that the operating system of the first node may be an Android operating system, a multi-user network (Linux) operating system, or another operating system, which is not limited in this embodiment of the present application. Because the operating systems of the first nodes are different, the modes for acquiring the node capacity of the first nodes are also different, and therefore, the cloud device provides the compatibility and conversion functions, and the compatibility and conversion functions are that the node capacity of the first nodes is acquired in different modes according to the first nodes of different operating systems.
In a possible implementation manner, if the node capacity of the first node includes the CPU utilization of the first node, the weight parameter corresponding to the CPU utilization of the first node is determined based on the CPU utilization of the first node and the fourth table. And if the node capacity of the first node comprises the memory utilization rate of the first node, determining a weight parameter corresponding to the memory utilization rate of the first node based on the memory utilization rate of the first node and the fifth table. If the node capacity of the first node includes the number of the IO requests of the first node, determining a weight parameter corresponding to the number of the IO requests of the first node based on the number of the IO requests of the first node and the sixth table.
In a possible implementation manner, the node capacity of the first node includes a CPU utilization rate, a memory utilization rate, and an IO request number, and based on a 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: and adding the weight parameters corresponding to the CPU utilization rate, the memory utilization rate and the IO request quantity of the first node to obtain the capacity value of the first node. The following equation (2) is a determination equation of the capacity value C of the first node.
C=W4+W5+W6 (2)
As described aboveIn the formula (2), W4Is a weight parameter, W, corresponding to the CPU utilization of the first node5Is a weight parameter, W, corresponding to the memory usage of the first node6And the weight parameters correspond to the IO request quantity of the first node.
Illustratively, the CPU usage rate of the first node is 70%, the memory usage rate of the first node is 90%, and the number of IO requests of the first node is 300. Determining that the weight parameter corresponding to the CPU utilization rate of the first node is 0.7 based on the CPU utilization rate of the first node and the fourth table; determining that the weight parameter corresponding to the memory utilization rate of the first node is 1.0 based on the memory utilization rate of the first node and the fifth table; and determining that the weight parameter corresponding to the IO request quantity of the first node is 0.6 based on the IO request quantity of the first node and the fifth table. Based on the weight parameter corresponding to the node capacity of the first node, according to the above formula (2), C is 0.7+1.0+0.6 is 2.3, that is, the capacity value of the first node is 2.3.
In one possible implementation manner, when the capacity value of the first node exceeds the threshold corresponding to the node capacity, the health state of the first node is a sub-health state. When the capacity value of the first node does not exceed the threshold value corresponding to the node capacity, the health state of the first node is a normal state. The threshold value corresponding to the node capacity is determined based on the type of game run by the client.
Illustratively, the type of the 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, the capacity value of the first node is 2.3, and the health state of the first node is determined to be a sub-health state because the capacity value of the first node is greater than the threshold corresponding to the node capacity.
For another example, the type of the game run by the client is a policy game, the threshold corresponding to the node capacity of the policy game is 2.4, the capacity value of the first node is 2.3, and the health state of the first node is determined to be a normal state because the capacity value of the first node is smaller than the threshold corresponding to the node capacity.
And thirdly, the node information comprises heartbeat information, the information value comprises the number of heartbeat times, and the health state of the first node is determined based on the heartbeat information of the first node.
In a possible implementation manner, when the node information of the first node only includes the heartbeat information of the first node, determining the number of heartbeats of the first node, where the number of heartbeats is the number of times that the heartbeat information is not continuously received within the target time period. If the heartbeat frequency of the first node does not exceed the threshold value corresponding to the heartbeat information, determining that the health state of the first node is a normal state; and if the heartbeat frequency of the first node exceeds the threshold value corresponding to the heartbeat information, determining that the health state of the first node is a sub-health state.
The time length of the target time period is an arbitrary value, which is not limited in the embodiment of the present application. For example, the time length of the target time period is 1 minute, and for another example, the time length of the target time period is 30 seconds. The threshold value corresponding to the heartbeat information is determined based on the type of the game run by the client.
Illustratively, when the type of the game run by the client is a multiplayer online game, the corresponding threshold value of the heartbeat information is 5, and the number of heartbeats of the first node is 6. And determining that the health state of the first node is a sub-health state because the heartbeat frequency of the first node exceeds the threshold corresponding to the heartbeat information.
For another example, when the type of the game run by the client is a policy game, the threshold corresponding to the heartbeat information is 5, and the number of heartbeats of the first node is 4. Because the heartbeat frequency of the first node does not exceed the threshold corresponding to the heartbeat information, the health state of the first node is determined to be a normal state.
And fourthly, the node information comprises at least two of network quality, node capacity and heartbeat information, the information values comprise at least two of quality values, capacity values and heartbeat times, and the health state of the first node is determined based on 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.
In a possible implementation manner, 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-health state, it is determined that the health state of the first node is the sub-health state. And if the network quality of the first node, the node capacity of the first node and the heartbeat information of the first node do not meet the requirement corresponding to the sub-health, determining that the health state of the first node is a normal state.
The determination process of whether the network quality of the first node meets the requirement corresponding to the sub-health state is consistent with the determination process in the first case, the determination process of whether the node capacity of the first node meets the requirement corresponding to the sub-health state is consistent with the determination process in the second case, and the determination process of whether the heartbeat information of the first node meets the requirement corresponding to the sub-health state is consistent with the determination process in the third case, which is not described in detail herein.
Illustratively, the node information of the 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 the game run by the client is a policy-type game, the threshold value corresponding to the network quality of the policy-type game is 2.5, and the threshold value corresponding to the node capacity of the policy-type game is 2.4. Although the quality value of the first node is smaller than the threshold corresponding to the network quality of the strategy game, the capacity value of the first node is larger than the threshold corresponding to the node capacity of the strategy game, and therefore the health state of the first node is determined to be a sub-health state.
For another example, the node information of the 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, the type of the 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 threshold corresponding to the node capacity of the multiplayer online game is 2.1. Because the quality value of the first node is smaller than the threshold corresponding to the network quality of the multiplayer online game and the capacity value of the first node is smaller than the threshold corresponding to the node capacity of the multiplayer online game, the health state of the first node is determined to be a normal state.
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 state of the first node is determined to be a sub-health state as long as at least one of the quality value, the capacity value, and the number of heartbeats of the first node exceeds a corresponding threshold. And determining the health state of the first node as a normal state only if the quality value, the capacity value and the heartbeat frequency of the first node do not exceed the corresponding threshold values.
In step 203, if the health status of the first node is sub-health status, the second node is determined.
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 interaction between the first node and the client.
In one possible implementation manner, if the health status of the first node is a sub-health status, the process of determining the second node is: if the health state of the first node is a sub-health state, determining a first server cluster in the plurality of server clusters; determining a second server cluster in the first server cluster based on the bearable capacity of the first server cluster; determining a third server cluster in the second server cluster based on the running state of each node in the second server cluster, wherein the third server cluster has nodes with idle node states; and determining the node with the idle node state as the second node in the third server cluster. The number of the first server clusters is not more than the total number of the server clusters, the number of the second server clusters is not more than the number of the first server clusters, and the number of the third server clusters is not more than the number of the second server clusters.
In one possible implementation, one server cluster corresponds to one zone attribute, one zone may correspond to one or more server clusters, and nodes included in the server clusters interact only with clients in the zone corresponding to the server cluster. For example, if the region attribute corresponding to the server cluster 1 is beijing, the nodes included in the server cluster 1 interact with the clients in beijing.
If the health state of the first node is a sub-health state, the process of determining the first server cluster in the plurality of server clusters is as follows: the method comprises the steps of obtaining a region attribute of a client, and determining a first server cluster in a plurality of server clusters based on the region attribute of the client, wherein the region attribute of the first server cluster is consistent with the region attribute of the client.
In a possible implementation manner, the process of obtaining the region attribute of the client includes: the method includes the steps of obtaining an Internet Protocol Address (IP Address) of a client, analyzing the IP Address of the client, and obtaining a region attribute of the client. Illustratively, the IP address of the client is 1.119.168.90, and the IP address is analyzed to obtain the regional attribute of the client, which is "beijing". For another example, the IP address of the client is 124.78.217.0, and the IP address is analyzed to obtain the regional attribute of the client as "shanghai".
Illustratively, the cloud device management includes five server clusters, namely a server cluster 1, a server cluster 3, a server cluster 4, and a server cluster 5. The region attribute corresponding to the server cluster 1 is "beijing", the region attribute corresponding to the server cluster 2 is "shanghai", the region attribute corresponding to the server cluster 3 is "beijing", the region attribute corresponding to the server cluster 4 is "beijing", and the region attribute corresponding to the server cluster 5 is "beijing". The IP address of the client is analyzed, and the region attribute of the client is "beijing", so that the server cluster 1, the server cluster 3, the server cluster 4, and the server cluster 5 of the five server clusters are determined as the first server cluster.
In one possible implementation manner, based on the bearable capacity of the first server cluster, the process of determining the second server cluster in the first server cluster is: and determining the bearable capacity of the first server cluster, and determining the first server cluster with the bearable capacity meeting the requirement as a second server cluster. The determination process of the bearable capacity of the first server cluster is as follows: and determining the number of nodes with idle node states in the first server cluster as the bearable capacity of the first server cluster.
The first server cluster whose bearable capacity meets the requirement may be the first server cluster whose bearable capacity is before the target location, for example, the first server cluster whose bearable capacity is 3 bits before is determined as the second server cluster. The first server cluster that can carry capacity satisfying the requirement may also be the first server cluster that can carry capacity exceeding a target threshold, e.g., the first server cluster that can carry capacity exceeding 25 is determined as the second server cluster. The target threshold is an arbitrary value, which is not limited in the embodiment of the present application.
Illustratively, the loadable capacity of the server cluster 1 is 32, the loadable capacity of the server cluster 3 is 30, the loadable capacity of the server cluster 4 is 23, and the loadable capacity of the server cluster 5 is 28. When the first server cluster with the bearable capacity meeting the requirement is the first server cluster with the bearable capacity of the first 3 bits, the determined second server cluster is as follows: server cluster 1, server cluster 3, and server cluster 5. When the first server cluster with the bearable capacity meeting the requirement is the first server cluster with the bearable capacity exceeding 25, the determined second server cluster is as follows: server cluster 1, server cluster 3, and server cluster 5.
In a possible implementation manner, the node state of the node managed by the second server cluster is determined, and the server cluster in which the node in the node state is idle is determined as the third server cluster. For example, there are nodes in which the node status is idle in the server cluster 1, the server cluster 3, and the server cluster 5, and thus, the third server cluster includes the server cluster 1, the server cluster 3, and the server cluster 5.
In one possible implementation, a node whose node status is idle is determined in the third server cluster. And determining whether the node with the idle node state is adaptive to the client, and if the node with the idle node state is adaptive to the client, determining the node with the idle node state as a second node. If the node with the idle state is not suitable for the client, re-determining a node with the idle state in the third server cluster until the re-determined node with the idle state is suitable for the client, and determining the node with the re-determined node with the idle state as a second node; or if the node with the idle node state is not matched with the client, displaying an early warning message, wherein the early warning message is used for indicating that the node with the idle node state cannot take over the interaction between the first node and the client. The content of the warning message may be that "the node whose node state is idle is not adapted to the client, and the node whose node state is idle is determined again. "of course, the warning message may also be other contents, which is not limited in this embodiment of the present application.
In one possible implementation, in order to increase the utilization rate of the server clusters, the priority of the third server cluster having the node status as the running node is higher than that of the third server cluster not having the node status as the running node. That is, the third server cluster with the node in operation is prioritized over the fully idle third server cluster. Therefore, a fourth server cluster is determined in the third server cluster based on the operating state of each node in the third server cluster, and both nodes with node states being idle and nodes with node states being operating exist in the fourth server cluster.
Exemplarily, there exist nodes in the server cluster 1, the node state of which is idle, and there exist nodes in which the node state of which is running; only nodes with idle node states exist in the server cluster 3; in the server cluster 5, there are both nodes whose node states are idle and nodes whose node states are running. Therefore, the server cluster 1 and the server cluster 5 are determined as the fourth server cluster.
In a possible implementation manner, after the fourth server cluster is determined, a node with a node state being idle is randomly determined in the fourth server cluster, whether the node with the node state being idle is adapted to the client is determined, and if the node with the node state being idle is adapted to the client, the node with the node state being idle is determined as the second node. If the node with the idle state is not suitable for the client, re-determining a node with the idle state in the fourth server cluster until the re-determined node with the idle state is suitable for the client, and determining the node with the re-determined node with the idle state as a second node; or if the node with the idle node state is not matched with the client, displaying an early warning message, wherein the early warning message is used for indicating that the node with the idle node state cannot take over the interaction between the first node and the client.
In a possible implementation process, the process of determining whether the node with the node state being idle and the client are adapted is as follows: if the client side meets the access right of the node with the idle node state, the node with the idle node state is determined to be matched with the client side; and if the client does not meet the access right of the node with the idle node state, determining that the node with the idle node state is not adaptive to the client.
Illustratively, a node with an idle node state needs to access a picture of the client, and if the access right of the picture of the client is access prohibition, it indicates that the node with the idle node state is not adapted to the client. For another example, if a node whose node state is idle needs to access a picture of the client, and the access right of the picture of the client is accessible or accessible during operation, it is said that the node whose node state is idle is adapted to the client.
The above description only takes the access right as the right to access the picture of the client as an example, and the access right may also be the right to access other application programs in the client, which is not limited in the embodiment of the present application.
Illustratively, the node 25 is determined to be a node with a node status of idle in the third server cluster, and the node 25 is adapted to the client, so the node 25 is determined to be the second node. For another example, the node 25 is determined to be a node whose node state is idle in the third server cluster, but the node 25 is not adapted to the client, and the node 30 is determined to be a node whose node state is idle in the third server cluster again, and the node 30 is adapted to the client, so that the node 30 is determined to be the second node.
In step 204, the second node is connected to the client, and the client is interacted with based on the second node.
In a possible implementation manner, after the second node is determined in step 203, a file required by the operation of the client needs to be acquired, an image file is generated based on the file required by the operation of the client, the image file is pulled up in the second node, and the connection between the first node and the client is disconnected.
The process of generating the mirror image file based on the file required by the client operation is as follows: all files required by the operation of the client are stored in the cloud equipment, the cloud equipment acquires the files required by the operation of the client from the storage space of the cloud equipment, and the files are copied to obtain the mirror image files.
In a possible implementation manner, because the client is disconnected from the first node, that is, the client is not connected to any node at present and does not interact with any node, the second node is quickly connected to the client at this time, so that the second node interacts with the client, that is, the second node performs logic calculation 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.
In a possible implementation manner, after the connection between the first node and the client is disconnected, the cloud device may also repair the first node, so that the health state of the repaired first node is a normal state, and the repaired first node may take over other nodes with sub-health states to interact with other clients.
In a possible implementation manner, after the cloud device connects the second node and the client, the cloud device needs to monitor the health state of the second node in real time, and when the health state of the second node is a sub-health state, the cloud device needs to determine a third node again, so that the third node replaces the second node to interact with the client. The determination process of the third node is consistent with the determination process of the second node in the embodiment of the present application, and is not described herein again.
According to the method, the health of the first node is detected in real time, the second node is determined when the health state of the first node is detected to be a sub-health state, the second node and the client are used for interaction, namely the first node is replaced by the second node before the first node fails, early warning of the first node is achieved, the first node is switched to the second node under the condition that a user does not sense the failure of the first node, the probability of user disconnection is reduced, the game experience and the game quality of the user are improved, and the reliability of interaction between the node and the client can be improved.
Fig. 4 is a schematic diagram illustrating an architecture of a cloud device according to an embodiment of the present disclosure, where in fig. 4, the cloud device includes a server cluster, a monitoring center, and a migration management and control center.
The cloud device is managed by a plurality of server clusters, each server cluster is managed by a plurality of servers, each server comprises a plurality of nodes, and the server clusters report node information of each node managed by the server cluster to the monitoring center.
The monitoring center receives the node information of the first node reported by the server cluster, and determines the health state of the first node based on the node information of the first node. The determination process of the health status of the first node is the same as the process of step 202, and is not described herein again. When the health state of the first node is a sub-health state, the monitoring center obtains the region attribute of the client interacting with the first node, and determines a second node replacing the first node based on the region attribute of the client. The process of determining the second node is the same as the process of step 203, and is not described herein again. And the monitoring center sends a migration notification message to the migration control center, wherein the migration notification message is used for notifying the migration control center to replace the first node with the second node. The first node is a node which is interacted with the client and is included in any server cluster.
And the migration control center receives the migration notification message, analyzes the migration notification message to obtain a second node and a first node carried by the migration notification message, and determines whether the second node is matched with the client side. The process of determining whether the second node and the client are adapted is the same as the process of step 203, and is not described herein again. And if the second node is matched with the client, generating a mirror image file based on the file required by the client operation, pulling up the mirror image file in the second node, disconnecting the first node from the client, and connecting the second node with the client. And if the second node is not matched with the client, the migration control center generates an early warning message and displays the early warning message, wherein the early warning message is used for indicating that the second node is not matched with the client.
In a possible implementation manner, after determining that the second node and the client are not adapted, the migration management and control center may further send a feedback message to the monitoring center, where the feedback message is used to instruct the monitoring center to determine the second node again. After the monitoring center determines the second node again, the monitoring center sends a migration notification message to the migration management and control center again, the retransmitted migration notification message carries the first node and the second node which is determined again, the migration management and control center determines whether the second node which is determined again is matched with the client, if the second node which is determined again is matched with the client, a file which is needed by the operation of the client is obtained, a mirror image file is generated based on the file which is needed by the operation of the client, the mirror image file is pulled up in the second node which is determined again, the first node is disconnected from the client, and the second node which is determined again is connected with the client.
Fig. 5 is a schematic structural diagram of a node switching apparatus according to an embodiment of the present application, and as shown in fig. 5, the apparatus includes:
an obtaining unit 501, configured to obtain node information of a first node to be detected, where the first node is a node currently interacting with a client;
a first determining unit 502, configured to determine a health status of a first node based on node information of the first node;
a second determining unit 503, configured to determine a second node if the health state of the first node is a sub-health state, where the second node is an idle node;
a connecting unit 504, configured to connect the second node with the client, and interact with the client based on the second node.
In a possible implementation manner, the first determining unit 502 is configured to determine an information value of a first node based on node information of the first node; if the information value of the first node exceeds the threshold value corresponding to the node information, determining that the health state of the first node is a sub-health state; and if the information value of the first node does not exceed the threshold corresponding to the node information, determining that the health state of the first node is a normal state.
In one possible implementation, the node information includes at least one of network quality, node capacity, and heartbeat information, the information value includes at least one of a quality value, a capacity value, and a number of heartbeats, 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 number of heartbeats is determined based on the heartbeat information of the first node.
In one possible implementation, the node information includes network quality, and the information value includes a quality value;
a first determining unit 502, configured to determine a weight parameter corresponding to the network quality of the first node; and determining a quality value of the first node based on a weight parameter corresponding to the network quality of the first node, wherein the network quality comprises at least one of network time consumption, network packet loss quantity and network bandwidth information.
In a possible implementation manner, the network quality includes network consumed time, network packet loss number and network bandwidth information, a weight parameter corresponding to the network consumed time is positively correlated with the network consumed time, a weight parameter corresponding to the network packet loss number is positively correlated with the network packet loss number, and a weight parameter corresponding to the network bandwidth information is negatively correlated with the network bandwidth information;
a first determining unit 502, configured to add the network consumption of the first node, the network packet loss amount, and the weighting parameter corresponding to the network bandwidth information to obtain a quality value of the first node.
In one possible implementation, the node information includes a node capacity, and the information value includes a capacity value;
a first determining unit 502, configured to determine a weight parameter corresponding to a node capacity of a first node; and determining a capacity value of the first node based on a weight parameter corresponding to the node capacity of the first node, wherein the node capacity comprises at least one of a central processing unit utilization rate, a memory utilization rate and an input/output request quantity.
In one possible implementation manner, the node capacity includes a central processing unit usage rate, a memory usage rate and an input/output request number, wherein a weight parameter corresponding to the central processing unit usage rate is positively correlated with the central processing unit 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 input/output request number is positively correlated with the input/output request number;
the first determining unit 502 is configured to add weight parameters corresponding to the central processing unit utilization rate, the memory utilization rate, and the number of input/output requests of the first node to obtain a capacity value of the first node.
In one possible implementation, the threshold corresponding to the node information is determined based on the type of game run by the client.
In a possible implementation manner, the types of the games run by the client include a policy-type game and a multiplayer online-type game, a threshold corresponding to the network quality of the policy-type game is higher than a threshold corresponding to the network quality of the multiplayer online-type game, and a threshold corresponding to the node capacity of the policy-type game is higher than a threshold corresponding to the node capacity of the multiplayer online-type game.
In a possible implementation manner, if the type of the game run by the client is a policy game, the threshold corresponding to the network quality of the policy game is 2.5, the threshold corresponding to the node capacity of the policy game is 2.4, and the threshold corresponding to the heartbeat information of the policy game is 5; if the type of the game operated 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.
In one possible implementation manner, the cloud device manages a plurality of server clusters, each server cluster is composed of a plurality of servers, and each server comprises a plurality of nodes;
a second determining unit 503, configured to determine, if the health state of the first node is a sub-health state, a first server cluster in the plurality of 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 bearable capacity of the first server cluster, wherein the number of the second server cluster is not greater than that of the first server cluster;
determining a third server cluster in the second server cluster based on the running state of each node in the second server cluster, wherein nodes with idle node states exist in the third server cluster, and the number of the third server clusters is not more than that of the second server clusters;
determining nodes with idle node states in a third server cluster;
and determining the node with the node state as idle as the second node.
In one possible implementation, the apparatus further includes:
a third determining unit, configured to determine whether a node whose node status is idle is adapted to the client;
a second determining unit 503, configured to determine, if the node in the node state is idle and the client is adaptive, the node in the node state is idle as the second node.
In a possible implementation manner, the second determining unit 503 is further configured to determine the node with the idle node state again in the third server cluster if the node with the idle node state is not adapted to the client, until the node with the idle node state determined again is adapted to the client, and determine the node with the idle node state determined again as the second node;
the device still includes:
and the display unit is used for displaying an early warning message if the node with the idle node state is not matched with the client, wherein the early warning message is used for indicating that the node with the idle node state cannot take over the interaction between the first node and the client.
In a possible implementation manner, the second determining unit 503 is configured to obtain a region attribute of the client if the health state of the first node is a sub-health state; and determining a first server cluster in the plurality of server clusters based on the region attribute of the client, wherein the region attribute of the first server cluster is consistent with the region attribute of the client.
In a possible implementation manner, the third determining unit is configured to determine that the node with the idle node status is adapted to the client if the client satisfies the access right of the node with the idle node status;
and if the client does not meet the access right of the node with the idle node state, determining that the node with the idle node state is not adaptive to the client.
In a possible implementation manner, the obtaining unit 501 is further configured to obtain a file required by the client to operate, and generate an image file;
a connection unit 504, configured to pull up the mirror image file in the second node; and disconnecting the first node and the client.
The device carries out health detection on the first node in real time, when the health state of the first node is detected to be a sub-health state, the second node is determined, the second node and the client are used for interaction, namely the first node is replaced by the second node before the first node fails, early warning of the first node is achieved, the first node is switched to the second node under the condition that a user does not sense the failure of the first node, the probability of user disconnection is reduced, the game experience and the game quality of the user are improved, and the reliability of interaction between the node and the client can be improved.
It should be understood that, when the apparatus provided in fig. 5 implements its functions, it is only illustrated by the division of the functional modules, and in practical applications, the above functions may be distributed by different functional modules according to needs, that is, the internal structure of the apparatus is divided into different functional modules to implement all or part of the functions described above. In addition, the apparatus and method embodiments provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments for details, which are not described herein again.
Fig. 6 shows a block diagram of a client 600 according to an exemplary embodiment of the present application. The client 600 may be a portable mobile client, such as: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion video Experts compression standard Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, motion video Experts compression standard Audio Layer 4), a notebook computer, or a desktop computer. Client 600 may also be referred to by other names such as user equipment, portable client, laptop client, desktop client, and so forth.
In general, client 600 includes: a processor 601 and a memory 602.
The processor 601 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so on. The processor 601 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 601 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a 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 that the display screen needs to display. In some embodiments, processor 601 may also include an AI (Artificial Intelligence) processor for processing computational operations related to machine learning.
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, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 602 is used to store at least one instruction for execution by processor 601 to implement the node switching method provided by the method embodiments herein.
In some embodiments, client 600 may also optionally include: a peripheral interface 603 and at least one peripheral. The processor 601, memory 602, and peripheral interface 603 may be connected by buses or signal lines. Various peripheral devices may be connected to the peripheral interface 603 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 604, a display 605, a camera assembly 606, an audio circuit 607, a positioning component 608, and a power supply 609.
The peripheral interface 603 may be used to connect at least one peripheral related to I/O (Input/Output) to the processor 601 and the memory 602. In some embodiments, the processor 601, memory 602, and peripheral 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 interface 603 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
The Radio Frequency circuit 604 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuitry 604 communicates with communication networks and other communication devices via electromagnetic signals. The rf circuit 604 converts an electrical signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 604 comprises: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuitry 604 may communicate with other clients via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: the world wide web, metropolitan area networks, intranets, 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 further include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display 605 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 605 is a touch display screen, the display screen 605 also has the ability to capture touch signals on or over the surface of the display screen 605. The touch signal may be input to the processor 601 as a control signal for processing. At this point, the display 605 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display 605 may be one, disposed on the front panel of the client 600; in other embodiments, the display 605 may be at least two, respectively disposed on different surfaces of the client 600 or in a folding design; in other embodiments, display 605 may be a flexible display disposed on a curved surface or on a folded surface of client 600. Even more, the display 605 may be arranged in a non-rectangular irregular pattern, i.e., a shaped screen. The Display 605 may be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), and the like.
The camera assembly 606 is used to capture images or video. Optionally, camera assembly 606 includes a front camera and a rear camera. Generally, the front camera is arranged on the front panel of the client, and the rear camera is arranged on the back of the client. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 606 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
Audio circuitry 607 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 601 for processing or inputting the electric signals to the radio frequency circuit 604 to realize voice communication. For the purpose of stereo sound collection or noise reduction, a plurality of microphones may be provided at different positions of the client 600. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 601 or the radio frequency circuit 604 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, audio circuitry 607 may also include a headphone jack.
The Location component 608 is used to locate the current geographic Location of the client 600 to implement navigation or LBS (Location Based Service). The Positioning component 608 can be a Positioning component based on the Global Positioning System (GPS) in the united states, the beidou System in china, or the galileo System in russia.
Power supply 609 is used to provide power to the various components in client 600. The power supply 609 may be ac, dc, disposable or rechargeable. When the power supply 609 includes a rechargeable battery, the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery. The wired rechargeable battery is a battery charged through a wired line, and the wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, client 600 also includes one or more sensors 160. The one or more sensors 160 include, but are not limited to: acceleration sensor 611, gyro sensor 612, pressure sensor 613, fingerprint sensor 614, optical sensor 615, and proximity sensor 616.
The acceleration sensor 611 may detect the magnitude of acceleration on three coordinate axes of the coordinate system established with the client 600. For example, the acceleration sensor 611 may be used to detect components of the gravitational acceleration in three coordinate axes. The processor 601 may control the display screen 605 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 611. The acceleration sensor 611 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 612 may detect a body direction and a rotation angle of the client 600, and the gyro sensor 612 and the acceleration sensor 611 may cooperate to acquire a 3D motion of the user on the client 600. The processor 601 may implement the following functions according to the data collected by the gyro sensor 612: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
Pressure sensor 613 may be located on the side frame of client 600 and/or underneath display screen 605. When the pressure sensor 613 is disposed on the side frame of the client 600, a user's holding signal to the client 600 can be detected, and the processor 601 performs left-right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 613. When the pressure sensor 613 is disposed at the lower layer of the display screen 605, the processor 601 controls the operability control on the UI interface according to the pressure operation of the user on the display screen 605. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 614 is used for collecting a fingerprint of a user, and the processor 601 identifies the identity of the user according to the fingerprint collected by the fingerprint sensor 614, or the fingerprint sensor 614 identifies the identity of the user according to the collected fingerprint. Upon identifying that the user's identity is a trusted identity, the processor 601 authorizes the user to perform relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying, and changing settings, etc. Fingerprint sensor 614 may be disposed on the front, back, or side of client 600. When a physical button or vendor Logo is provided on client 600, fingerprint sensor 614 may be integrated with the physical button or vendor Logo.
The optical sensor 615 is used to collect the ambient light intensity. In one embodiment, processor 601 may control the display brightness of display screen 605 based on the ambient light intensity collected by optical sensor 615. Specifically, when the ambient light intensity is high, the display brightness of the display screen 605 is increased; when the ambient light intensity is low, the display brightness of the display screen 605 is adjusted down. In another embodiment, the processor 601 may also dynamically adjust the shooting parameters of the camera assembly 606 according to the ambient light intensity collected by the optical sensor 615.
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 gather 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 gradually decreases, processor 601 controls display 605 to switch from the bright screen state to the dark screen state; when the proximity sensor 616 detects that the distance between the user and the front of the client 600 gradually becomes larger, the processor 601 controls the display 605 to switch from the breath-screen state to the bright-screen state.
Those skilled in the art will appreciate that the architecture shown in fig. 6 does not constitute a limitation on client 600, and may include more or fewer components than shown, or combine certain components, or employ a different arrangement of components.
Fig. 7 is a schematic structural diagram of a cloud device according to an embodiment of the present disclosure, where the cloud device 700 may generate a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 701 and one or more memories 702, where 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 according to the foregoing method embodiments. Certainly, the cloud device 700 may further include components such as a wired or wireless network interface, a keyboard, and an input/output interface, so as to perform input/output, and the cloud device 700 may further include other components for implementing device functions, which are not described herein.
In an exemplary embodiment, there is also provided a computer-readable storage medium having at least one program code stored therein, the at least one program code being loaded and executed by a processor to cause a computer to implement any of the above-described node switching methods.
Alternatively, the computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a Compact Disc Read-Only Memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, there is also provided a computer program or a computer program product having at least one computer instruction stored therein, the at least one computer instruction being loaded and executed by a processor to cause a computer to implement any of the above node switching methods.
It should be understood that reference to "a plurality" herein means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
The above description is only exemplary of the present application and should not be taken as limiting the present application, and any modifications, equivalents, improvements and the like that are made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (17)

1. A node switching method, wherein the method is executed by a cloud device, the cloud device and a client are in communication connection through a network, and the cloud device manages a plurality of nodes, and the method comprises:
acquiring node information of a first node to be detected, wherein the first node is a node which is interacted with the client currently;
determining a health status of the first node based on node information of the first node;
if the health state of the first node is a sub-health state, determining a second node, wherein the second node is an idle node;
and connecting the second node with the client, and interacting with the client based on the second node.
2. The method of claim 1, wherein determining the health status of the first node based on the node information of the first node comprises:
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 the threshold value corresponding to the node information, determining that the health state of the first node is the sub-health state;
and if the information value of the first node does not exceed the threshold corresponding to the node information, determining that the health state of the first node is a normal state.
3. The method of claim 2, wherein the node information comprises at least one of network quality, node capacity, and heartbeat information, wherein the information value comprises at least one of a quality value, a capacity value, and a number of heartbeats, wherein the quality value is determined based on the network quality of the first node, wherein the capacity value is determined based on the node capacity of the first node, and wherein the number of heartbeats is determined based on the heartbeat information of the first node.
4. The method of claim 2, wherein the node information includes network quality, and the information value includes a quality value;
the determining an information value of the first node based on the node information of the first node comprises:
determining a weight parameter corresponding to the network quality of the first node;
and determining a quality value of the first node based on a weight parameter corresponding to the network quality of the first node, wherein the network quality comprises at least one of network time consumption, network packet loss quantity and network bandwidth information.
5. The method according to claim 4, wherein the network quality includes network consumed time, network packet lost quantity, and network bandwidth information, wherein a weight parameter corresponding to the network consumed time is positively correlated with the network consumed time, a weight parameter corresponding to the network packet lost quantity is positively correlated with the network packet lost quantity, and a 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 comprises:
and adding the network time consumption, the network packet loss quantity and the weight parameters corresponding to the network bandwidth information of the first node to obtain the quality value of the first node.
6. The method of claim 2, wherein the node information comprises a node capacity, and wherein the information value comprises a capacity value;
determining an information value of the first node based on the node information of the first node, including:
determining a weight parameter corresponding to the node capacity of the first node;
and determining a capacity value of the first node based on a weight parameter corresponding to the node capacity of the first node, wherein the node capacity comprises at least one of a central processing unit utilization rate, a memory utilization rate and an input/output request quantity.
7. The method according to claim 6, wherein the node capacities include a central processing unit usage rate, a memory usage rate and a number of input/output requests, wherein the weight parameter corresponding to the central processing unit usage rate is positively correlated with the central processing unit 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;
the determining the capacity value of the first node based on the weight parameter corresponding to the node capacity of the first node includes:
and adding the weight parameters corresponding to the central processing unit utilization rate, the memory utilization rate and the input/output request quantity of the first node to obtain the capacity value of the first node.
8. The method according to any one of claims 2 to 7, wherein the threshold value corresponding to the node information is determined based on a type of a game run by the client.
9. The method according to any one of claims 1 to 7, wherein the cloud device manages a plurality of server clusters, each server cluster is composed of a plurality of servers, and each server comprises a plurality of nodes;
if the health state of the first node is a sub-health state, determining a second node comprises:
if the health state of the first node is a sub-health state, determining a first server cluster in the plurality of server clusters, wherein the number of the first server cluster is not more than the total number of the server clusters;
determining a second server cluster in the first server cluster based on the bearable capacity of the first server cluster, wherein the number of the second server cluster is not greater than the number of the first server cluster;
determining a third server cluster in the second server cluster based on the running state of each node in the second server cluster, wherein nodes with node states being idle exist in the third server cluster, and the number of the third server clusters is not more than that of the second server cluster;
determining nodes with idle node states in the third server cluster;
and determining the node with the node state as idle as the second node.
10. The method of claim 9, wherein before determining the node with the node status as idle as the second node, the method further comprises:
determining whether the node with the node state being idle is adapted to the client;
the determining the node with the node state being idle as the second node comprises:
and if the node with the idle node state is adaptive to the client, determining the node with the idle node state as the second node.
11. The method of claim 10, further comprising:
if the node with the idle node state is not adapted to the client, re-determining the node with the idle node state in the third server cluster until the node with the idle node state is adapted to the client, and determining the node with the idle node state as the second node;
or if the node with the idle node state is not adaptive to the client, displaying an early warning message, wherein the early warning message is used for indicating that the node with the idle node state cannot take over the interaction between the first node and the client.
12. The method of claim 9, wherein determining a first server cluster among the plurality of server clusters if the health status of the first node is sub-health status comprises:
if the health state of the first node is a sub-health state, acquiring a region attribute of the client;
determining the first server cluster in the plurality of server clusters based on the zone attribute of the client, wherein the zone attribute of the first server cluster is consistent with the zone attribute of the client.
13. The method of claim 10, wherein the determining whether the node with the idle node status and the client are adapted comprises:
if the client side meets the access right of the node with the idle node state, the node with the idle node state is determined to be adapted to the client side;
and if the client does not meet the access right of the node with the idle node state, determining that the node with the idle node state is not adaptive to the client.
14. The method of any one of claims 1 to 7 and 10 to 13, wherein after determining the second node if the health status of the first node is sub-health status, the method further comprises:
acquiring a file required by the operation of the client, and generating a mirror image file;
pulling up the image file in the second node;
and disconnecting the first node and the client.
15. An apparatus for node switching, the apparatus comprising:
the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring node information of a first node to be detected, and the first node is a node which is interacted with the client currently;
a first determination unit, configured to determine a health status of the first node based on node information of the first node;
a second determining unit, configured to determine a second node if the health state of the first node is a sub-health state, where the second node is an idle node;
and the connecting unit is used for connecting the second node with the client and interacting with the client based on the second node.
16. Cloud device, characterized in that the cloud device comprises 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 as to enable the cloud device to implement the node switching method according to any one of claims 1 to 14.
17. A computer-readable storage medium having at least one program code stored therein, the at least one program code being loaded and executed by a processor to cause a computer to implement the node switching method according to any one of claims 1 to 14.
CN202110470440.3A 2021-04-28 2021-04-28 Node switching method, device, equipment and computer readable storage medium Pending CN113144622A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110470440.3A CN113144622A (en) 2021-04-28 2021-04-28 Node switching method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110470440.3A CN113144622A (en) 2021-04-28 2021-04-28 Node switching method, device, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN113144622A true CN113144622A (en) 2021-07-23

Family

ID=76872392

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110470440.3A Pending CN113144622A (en) 2021-04-28 2021-04-28 Node switching method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN113144622A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023109479A1 (en) * 2021-12-16 2023-06-22 北京有竹居网络技术有限公司 Network access method and apparatus, and medium and electronic device
CN116701043A (en) * 2023-08-04 2023-09-05 浪潮电子信息产业股份有限公司 Heterogeneous computing system-oriented fault node switching method, device and equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023109479A1 (en) * 2021-12-16 2023-06-22 北京有竹居网络技术有限公司 Network access method and apparatus, and medium and electronic device
CN116701043A (en) * 2023-08-04 2023-09-05 浪潮电子信息产业股份有限公司 Heterogeneous computing system-oriented fault node switching method, device and equipment
CN116701043B (en) * 2023-08-04 2024-01-12 浪潮电子信息产业股份有限公司 Heterogeneous computing system-oriented fault node switching method, device and equipment

Similar Documents

Publication Publication Date Title
CN111614549B (en) Interaction processing method and device, computer equipment and storage medium
CN110868459B (en) Data transmission method, device, terminal and storage medium
CN108762881B (en) Interface drawing method and device, terminal and storage medium
CN110278464B (en) Method and device for displaying list
CN109194972B (en) Live stream acquisition method and device, computer equipment and storage medium
CN110569220B (en) Game resource file display method and device, terminal and storage medium
CN110659127A (en) Method, device and system for processing task
CN111866140B (en) Fusion management device, management system, service calling method and medium
CN111061550A (en) Task processing method, device, equipment and storage medium
CN111510482B (en) Method and device for determining failed network request and computer storage medium
CN113069760A (en) Resource allocation method, device, computing equipment and computer readable storage medium
CN110704324A (en) Application debugging method and device and storage medium
CN113144622A (en) Node switching method, device, equipment and computer readable storage medium
CN111682983B (en) Interface display method and device, terminal and server
CN110381155B (en) Task management method, device, storage medium and terminal
CN110086814B (en) Data acquisition method and device and storage medium
CN112612539A (en) Data model unloading method and device, electronic equipment and storage medium
CN111258683A (en) Detection method, detection device, computer equipment and storage medium
CN107800720B (en) Hijacking reporting method, device, storage medium and equipment
CN112181915A (en) Method, device, terminal and storage medium for executing service
CN112995587B (en) Electronic equipment monitoring method, system, computer equipment and storage medium
CN112597417B (en) Page updating method and device, electronic equipment and storage medium
CN114785766A (en) Control method of intelligent equipment, terminal and server
CN112260845B (en) Method and device for accelerating data transmission
CN114071224A (en) Video data processing method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40048688

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination