Instance scheduling method, related method and device, storage medium and equipment

By obtaining cloud game object distribution data, and automatically scheduling the number of instances based on network delay and node affinity strategies, the problem of inaccurate instance scheduling in the cloud game platform is solved, and resource utilization and player experience are improved.

CN120301949APending Publication Date: 2025-07-11TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410045740.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-10
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

现有技术中,云游戏平台中实例调度数量通过人工制定,导致实例数量无法准确分配和动态调节,造成运算资源浪费,影响玩家的云游戏体验。

Method used

By obtaining the object distribution data of the target cloud game, the number of instances to be created in each region is generated, the target server cluster is filtered based on the network delay, and the creation weight is determined for each server cluster according to the node affinity strategy, and the number of instances in each region is calculated for automatic scheduling.

Benefits of technology

It realizes automatic, efficient and flexible instance scheduling, improves computing resource utilization, reduces network delay, and improves players' cloud gaming experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120301949A_ABST
    Figure CN120301949A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an instance scheduling method, a related method, a related device, a storage medium and equipment. The method comprises the following steps: acquiring object distribution data corresponding to a target cloud game; generating the number of instances to be created of each network operator of each region through the object distribution data; based on the network delay, screening out a preset number of target server clusters from each network operator of each region; determining a creation weight for each target server cluster in each network operator of each region according to a node affinity strategy; and in combination with the number of the instances to be created and the corresponding creation weight, calculating the number of created instances of each target server cluster in each network operator of each region, and performing instance scheduling. Therefore, automatic, efficient and flexible instance scheduling is realized, manual staring is avoided, the utilization rate of instances is improved, the utilization rate of operation resources is further improved, meanwhile, the network time delay of connection can be reduced, and the cloud game experience of players is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of cloud technologies, and in particular, to an instance scheduling method, related methods, devices, storage media, and equipment. Background Art

[0002] Cloud gaming is a game mode based on cloud computing. In the operation mode of cloud gaming, all games are run on a server cluster, and the rendered game screens are compressed and transmitted to the target through the network. On the client side, the game device of the target only needs basic video decompression capabilities without any high-end processors and graphics cards.

[0003] With the continuous development and popularization of cloud gaming, there are players from all over the country on the cloud gaming platform. They belong to different network operators, can play different cloud games, and correspondingly run instances of different cloud games. The instances are distributed in server clusters all over the country. Therefore, the scheduling problem of how to determine an appropriate number of instances in each server cluster so that each player can be assigned to the server cluster with the best experience and minimize the waste of computing resources remains to be solved.

[0004] In the related art, the operation staff can manually determine the corresponding instance scheduling quantity for each cloud game in each server cluster, so that each server cluster maintains the same number of instances as the determined instance scheduling quantity until the server cluster is full. However, due to the subjectivity and fixity of the manually determined instance scheduling quantity, the number of instances cannot be accurately allocated and dynamically adjusted subsequently, resulting in waste of computing resources and affecting the cloud gaming experience of players. Summary of the Invention

[0005] Embodiments of this application provide an instance scheduling method, related methods, devices, storage media, and equipment, which can improve the accuracy and flexibility of instance scheduling, thereby improving the utilization rate of computing resources and the cloud gaming experience of players.

[0006] To solve the above technical problems, the embodiments of this application provide the following technical solutions:

[0007] An instance scheduling method includes:

[0008] Obtain the object distribution data corresponding to the target cloud game;

[0009] Generate the number of instances to be created for each network operator in each region based on the object distribution data;

[0010] Based on network latency, screen out a preset number of target server clusters from each network operator in each region;

[0011] Determine the creation weight for each target server cluster in each network operator in each region according to the node affinity policy;

[0012] Combine the number of instances to be created and the corresponding creation weight, calculate the number of instances to be created for each target server cluster in each network operator in each region, and perform instance scheduling based on the number of instances to be created.

[0013] An instance display method, including:

[0014] Display the scheduling plan interface;

[0015] Display the number of instances to be created for each target server cluster in each network operator in each region on the scheduling plan interface;

[0016] Wherein, the number of instances to be created is obtained by executing the above-mentioned instance scheduling method.

[0017] An instance scheduling device, including:

[0018] An acquisition unit for acquiring object distribution data corresponding to the target cloud game;

[0019] A generation unit for generating the number of instances to be created for each network operator in each region through the object distribution data;

[0020] A screening unit for screening out a preset number of target server clusters from each network operator in each region based on network latency;

[0021] A determination unit for determining the creation weight for each target server cluster in each network operator in each region according to the node affinity policy;

[0022] A calculation unit for combining the number of instances to be created and the corresponding creation weight, calculating the number of instances to be created for each target server cluster in each network operator in each region, and performing instance scheduling based on the number of instances to be created.

[0023] In some embodiments, the generation unit includes:

[0024] A statistics subunit for statistically calculating the demand increment of the target cloud game in the current preset unit time according to the object distribution data;

[0025] A calculation subunit for obtaining the instance creation time consumption and the idle redundancy, and calculating the total number of instances to be created based on the instance creation time consumption, demand increment and idle redundancy;

[0026] A proportion determination subunit, configured to obtain the object distribution proportion of each network operator in each region based on the object distribution data;

[0027] A determination subunit, configured to determine the number of instances to be created for each network operator in each region according to the total number of instances to be created and the object distribution proportion.

[0028] In some embodiments, the calculation subunit is configured to:

[0029] Obtain the instance creation time consumption and the total load idle rate;

[0030] Obtain the current total demand according to the object distribution data;

[0031] Calculate the idle redundancy based on the current total demand and the total load idle rate;

[0032] Calculate the total number of instances to be created based on the instance creation time consumption, the demand increment, and the idle redundancy.

[0033] In some embodiments, the node affinity policy includes at least a hard policy and a soft policy, and the determination unit includes:

[0034] A calculation subunit, configured to calculate the target score of each target server cluster in each network operator in each region according to the soft policy;

[0035] A screening subunit, configured to screen each target server cluster in each network operator in each region according to the hard policy to screen out the first server cluster to be adjusted;

[0036] A first zeroing subunit, configured to zero the target score of the first server cluster to be adjusted;

[0037] A weight calculation subunit, configured to calculate the creation weight of each target server cluster in each network operator in each region respectively according to the target scores of each target server cluster in each network operator in each region.

[0038] In some embodiments, the soft policy includes at least a cluster load idle rate policy and an operation unit matching rate policy, and the calculation subunit includes:

[0039] A first calculation sub-module, configured to calculate the corresponding first score of each target server cluster in each network operator in each region according to the cluster load idle rate policy;

[0040] A second calculation sub-module, configured to calculate the corresponding second score of each target server cluster in each network operator in each region according to the operation unit matching rate policy;

[0041] A third calculation sub-module, configured to add the first score and the second score of each target server cluster in each network operator in each region to obtain the target score of each target server cluster in each network operator in each region.

[0042] In some embodiments, the first calculation sub-module is configured to:

[0043] Obtain the cluster load idle rate of each target server cluster in each network operator in each region according to the cluster load idle rate policy;

[0044] Calculate the corresponding first score of each target server cluster in each network operator in each region based on the magnitude of the cluster load idle rate.

[0045] In some embodiments, the second calculation sub-module is configured to:

[0046] Obtain the number of first arithmetic units of each target server cluster in each network operator in each region according to the arithmetic unit matching rate policy;

[0047] Obtain the number of second arithmetic units required for the target cloud game to run;

[0048] Calculate the corresponding second score of each target server cluster in each network operator in each region based on the matching rate of the number of first arithmetic units and the number of second arithmetic units.

[0049] In some embodiments, the hard policy at least includes a preset cluster architecture policy, and the screening sub-unit is configured to:

[0050] Obtain the cluster architecture of each target server cluster in each network operator in each region according to the preset cluster architecture policy;

[0051] Determine the target server clusters whose cluster architecture does not belong to the preset cluster architecture as the first server clusters to be adjusted.

[0052] In some embodiments, the determining unit further includes a second zero-clearing sub-unit, configured to:

[0053] Obtain the cluster load idle rate of each target server cluster in each network operator in each region;

[0054] Determine the target servers with a cluster load idle rate lower than the preset idle rate as the second server clusters to be adjusted, and zero the target scores of the second server clusters to be adjusted.

[0055] In some embodiments, the weight calculation sub-unit includes:

[0056] A statistical sub-module, configured to separately count the target scores of each target server cluster in each network operator in each region, so as to obtain the total target scores of each network operator in each region;

[0057] A weight calculation sub-module, configured to calculate the creation weights of each target server cluster in each network operator in each region according to the ratio of the target score of each target server cluster in each network operator in each region to the corresponding total target score.

[0058] In some embodiments, the statistical sub-module is configured to:

[0059] Sequentially detect whether each target server cluster in each network operator in each region carries a priority label;

[0060] Determine the network operator in the region where the target server cluster carrying the priority label is located as the first network operator in the first region;

[0061] Determine the network operator in the region where the target server cluster not carrying the priority label is located as the second network operator in the second region;

[0062] Count the target scores of the target server clusters carrying the priority label in each first network operator in each first region, so as to obtain the total target scores of each first network operator in each first region;

[0063] Count the target scores of each target server cluster in each second network operator in each second region, so as to obtain the total target scores of each second network operator in each second region.

[0064] In some embodiments, the weight calculation sub-module is configured to:

[0065] Calculate the creation weights of the target server clusters carrying the priority label in each first network operator in each first region according to the ratio of the target score of the target server cluster carrying the priority label in each first network operator in each first region to the corresponding total target score;

[0066] Calculate the creation weights of each target server cluster in each second network operator in each second region according to the ratio of the target score of each target server cluster in each second network operator in each second region to the corresponding total target score.

[0067] An instance display device, comprising:

[0068] A first display unit, configured to display a scheduling plan interface;

[0069] A second display unit, configured to display the number of created instances of each target server cluster in each network operator in each region on the scheduling plan interface;

[0070] Wherein, the number of created instances is obtained by executing the above-mentioned instance scheduling method.

[0071] A computer-readable storage medium storing multiple instructions adapted to be loaded by a processor to execute the above-mentioned instance scheduling method or instance display method.

[0072] A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-mentioned instance scheduling method or instance display method.

[0073] A computer program product or computer program comprising computer instructions stored in a storage medium. A processor of a computer device reads the computer instructions from the storage medium, and the processor executes the computer instructions to implement the above-mentioned instance scheduling method or instance display method.

[0074] In an embodiment of the present application, object distribution data corresponding to a target cloud game is obtained; the number of instances to be created in each network operator in each region is generated based on the object distribution data; a preset number of target server clusters are respectively filtered out from each network operator in each region based on network latency; according to the node affinity policy, a creation weight is determined for each target server cluster in each network operator in each region; by combining the number of instances to be created and the corresponding creation weights, the number of created instances of each target server cluster in each network operator in each region is calculated, and instance scheduling is performed based on the number of created instances. In this way, according to the object distribution data of the target cloud game, the number of instances to be created in each network operator in each region can be automatically determined, and based on network latency, a preset number of target server clusters with the best latency can be filtered out from each network operator in each region. Among the preset number of target server clusters, according to the node affinity policy, the creation weight of each target server cluster can be accurately determined. According to the previous number of instances to be created and the corresponding creation weights, the number of created instances of each target server cluster in each network operator in each region is calculated for instance scheduling. Compared with the solution in the related art of setting the number of instance scheduling by manual monitoring of the disk, the embodiment of the present application can achieve automatic, efficient, and flexible instance scheduling, get rid of manual monitoring of the disk, improve the utilization rate of instances, and thus improve the utilization rate of computing resources. At the same time, it can also reduce the network latency of the connection and improve the cloud game experience of players.

[0075] Other features and advantages of the present disclosure will be set forth in the following description, and in part will be obvious from the description, or may be learned by practice of the present disclosure. The objectives and other advantages of the present disclosure may be realized and attained by the structure particularly pointed out in the specification, claims and drawings. Description of the Drawings

[0076] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the accompanying drawings required for the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present application, and those skilled in the art can obtain other drawings according to these drawings without creative efforts.

[0077] Figure 1 It is a schematic diagram of an example configuration of an example scheduling method provided by an embodiment of the present application.

[0078] Figure 2 It is a schematic diagram of a scenario of an example scheduling method provided by an embodiment of the present application.

[0079] Figure 3 It is a schematic diagram of a scenario of an example scheduling system provided by an embodiment of the present application.

[0080] Figure 4 It is another schematic diagram of a scenario of an example scheduling method provided by an embodiment of the present application.

[0081] Figure 5 It is a schematic flowchart of an example scheduling method provided by an embodiment of the present application.

[0082] Figure 6 It is another schematic diagram of a scenario of an example scheduling method provided by an embodiment of the present application.

[0083] Figure 7 It is another schematic diagram of a scenario of an example scheduling method provided by an embodiment of the present application.

[0084] Figure 8 It is another schematic diagram of a scenario of an example scheduling method provided by an embodiment of the present application.

[0085] Figure 9 It is another schematic diagram of a scenario of an example scheduling method provided by an embodiment of the present application.

[0086] Figure 10 It is another schematic diagram of a scenario of an example scheduling method provided by an embodiment of the present application.

[0087] Figure 11 It is another schematic diagram of a scenario of an example scheduling method provided by an embodiment of the present application.

[0088] Figure 12 It is another schematic diagram of the instance scheduling method provided by the embodiments of the present application.

[0089] Figure 13 It is another flowchart of the instance scheduling method provided by the embodiments of the present application.

[0090] Figure 14 It is a timing diagram of the instance scheduling method provided by the embodiments of the present application.

[0091] Figure 15 It is a program diagram of the instance scheduling method provided by the embodiments of the present application.

[0092] Figure 16 It is a flowchart of the instance display method provided by the embodiments of the present application.

[0093] Figure 17 It is a schematic structural diagram of the instance scheduling device provided by the embodiments of the present application.

[0094] Figure 18 It is a schematic structural diagram of the instance display device provided by the embodiments of the present application.

[0095] Figure 19 It is a schematic structural diagram of the terminal provided by the embodiments of the present application.

[0096] Figure 20 It is a schematic structural diagram of the server provided by the embodiments of the present application. Detailed implementation manners

[0097] In order to enable those skilled in the art to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative efforts shall fall within the protection scope of the present application.

[0098] It can be understood that in the specific implementation manners of the present application, data related to object distribution data, etc. is involved. When the above embodiments of the present application are applied to specific products or technologies, object permissions or consents need to be obtained, and the collection, use, and processing of relevant data need to comply with relevant laws, regulations, and standards.

[0099] In addition, when the embodiments of the present application need to obtain relevant data such as object distribution data, a separate permission or separate consent for the relevant data such as object distribution data will be obtained by means of a pop-up window or jumping to a confirmation page. After clearly obtaining the separate permission or separate consent for the relevant data such as object distribution data, the necessary relevant data such as object distribution data for enabling the embodiments of the present application to operate normally will be obtained.

[0100] It should be noted that in some processes described in the specification, claims and the above-mentioned drawings, there are multiple steps that appear in a specific order. However, it should be clearly understood that these steps may not be executed in the order in which they appear in this document or may be executed in parallel. The step numbers are only used to distinguish different steps, and the numbers themselves do not represent any execution order. In addition, descriptions such as "first", "second" or "target" in this document are used to distinguish similar objects and do not necessarily describe a specific order or sequence.

[0101] Before further elaborating on the embodiments of the present disclosure, the nouns and terms involved in the embodiments of the present disclosure are explained. The nouns and terms involved in the embodiments of the present disclosure are applicable to the following explanations:

[0102] Instance: A packaged set of computing resources obtained by partitioning and encapsulating computing resources and allocated for an object to use is called an instance.

[0103] Resource scheduling: Assigning game instance creation tasks to computing resources in a suitable edge cluster (i.e., server cluster) to achieve efficient resource utilization and task execution.

[0104] Optimal allocation: When allocating an object to a certain server cluster can bring the lowest latency and the best experience, this allocation is called optimal allocation.

[0105] Latency (i.e., network delay): When server clusters are distributed over a large geographical area, network latency may increase. Network latency is the time required for a data packet to be transmitted between nodes. Higher latency may lead to a decline in the performance of network applications and a slower response time.

[0106] A network operator is an entity that conducts network operations and provides services. Network operators not only need to know the network operating conditions from a network perspective but also from a service perspective. In addition, they need to effectively utilize network resources when providing multimedia services and applications. Each network operator needs to provide instances of cloud games to provide the ability of cloud games for objects using its services.

[0107] Optimal cluster: The server cluster corresponding to the optimal allocation is called the optimal cluster for this object.

[0108] Optimal cluster model: By inputting information such as the region of the input object and the network operator, etc., the ranking of each server cluster can be output according to the quality of experience.

[0109] Multi-region deployment: In a computing power platform, it refers to deploying computing power resources and supporting services in server clusters in multiple geographical locations to improve the availability, disaster tolerance of the platform and enhance the object experience.

[0110] Cross-cluster scheduling: In a multi-region deployed computing power platform, cross-cluster scheduling refers to task scheduling and resource allocation between multiple server clusters in different regions. Dynamically allocate computing tasks between different server clusters according to the object requirements to obtain a better user experience and higher resource utilization rate.

[0111] A server cluster (server-cluster) is a group of servers that are managed together and participate in workload management. The server cluster connects two or more servers through a high-speed network, enabling these servers to cooperate to provide services such as application programs, system resources, and data to users. When interacting between the client and the cluster, from the client's perspective, the cluster is like only one server.

[0112] The node affinity policy can be understood as a more flexible scheduling method. For example, it can be used to bind certain instances to a cluster. Corresponding node affinity has soft policies (preferred execution plan) and hard policies (required execution plan). It is an attribute (preference or hard requirement) of an instance that attracts the instance to a specific type of cluster. Through the node affinity policy, more accurate and flexible instance scheduling can be achieved.

[0113] Cluster architecture refers to the architecture type of the graphics cards used by the cluster, such as the architecture type of NVIDIA graphics cards or AMD graphics cards.

[0114] In an actual cloud game scenario, an instance can only provide cloud game services to 1 player at the same time. Suppose a certain server cluster has 20 instances, then at most 20 players can be provided with cloud game services at the same moment. However, when the 21st player needs to access the cloud game, they need to queue up and wait to access after other players exit, that is, the instance will only be released after the player exits. Since there are players from all over the country in the cloud game platform, they belong to different network operators, can play different cloud games, and correspondingly there will be various cloud game instances running. The instances are correspondingly distributed in server clusters across the country. Therefore, how to determine the appropriate number of instances in each server cluster so that each player can be assigned to the server cluster with the best experience, reduce queuing, and avoid instance idleness, and solve the scheduling problem of minimizing the waste of computing resources is still urgently to be solved.

[0115] In related technologies, an operator can manually set the corresponding instance scheduling quantity for each cloud game in each server cluster, so that each server cluster will maintain the instance quantity consistent with the set instance scheduling quantity until the server cluster is fully loaded. For example, please also refer to Figure 1 As shown in the figure, the operator can set 15 instance scheduling quantities for the City Axx cluster, 15 instance scheduling quantities for the City Bxx cluster, and 8 instance scheduling quantities for the City Cxx cluster. Please also refer to Figure 2 As shown in the figure, after manually setting the corresponding instance scheduling quantity for each cloud game in each server cluster, the scheduling system will allocate the corresponding number of instances to each server cluster according to the set instance scheduling quantity. When an object from a certain operator in a certain region requests instance allocation, the allocation system will select the best server cluster from multiple server clusters to allocate the corresponding instance to achieve instance allocation.

[0116] However, with the continuous development of cloud technology, server clusters are becoming more and more widely distributed, and server clusters are distributed in each city. When an object enters the cloud game platform, it will be allocated an instance of a cloud game by the nearest server cluster. Once there are no available instances in the nearest server cluster, the object needs to wait for a new instance to be created or for other players to log out before it can enter the game. Assuming that the waiting time is too long, it will lead to player loss and a very poor cloud game experience. Therefore, the cloud game platform needs to prepare an appropriate number of instances in the server clusters with object requirements as much as possible, and reduce the waiting time of the overall objects as much as possible. Due to the real-time nature of player changes, the manually set instance scheduling quantity is obviously unable to solve the above problems.

[0117] To solve the above problems, the embodiments of the present application propose a method that can automatically determine the number of instances to be created for each network operator in each region according to the object distribution data of the target cloud game, and can also screen out a preset number of target server clusters with the best latency from each network operator in each region based on network latency. In the preset number of target server clusters, according to the node affinity policy, accurately determine the creation weight for each target server cluster, and calculate the number of instances to be created for each target server cluster in each network operator in each region based on the previous number of instances to be created and the corresponding creation weight for automatic instance scheduling. This method can achieve automatic, efficient, and flexible instance scheduling, get rid of manual monitoring, improve the utilization rate of instances, and then improve the utilization rate of computing resources. At the same time, it can also reduce the network latency of connections and improve the cloud game experience of players.

[0118] Please refer to Figure 3 , Figure 3It is a scenario schematic diagram of the instance scheduling system provided by the embodiments of the present application. It includes a terminal 140, the Internet 130, a gateway 120, a server 110, etc.

[0119] The terminal 140 includes, but is not limited to, mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, aircraft, etc. Additionally, it can be a single device or a collection of multiple devices. Cloud games can run on the terminal 140. The terminal 140 can communicate with the Internet 130 in a wired or wireless manner to exchange data.

[0120] The server 110 refers to a computer system that can provide certain services to the terminal 140, such as cloud game services. Compared with ordinary terminals 140, the server 110 has higher requirements in terms of stability, security, performance, etc. The server 110 can be a high-performance computer in a network platform, a cluster of multiple high-performance computers, a part (such as a virtual machine) allocated from a high-performance computer, a combination of parts (such as virtual machines) allocated from multiple high-performance computers, etc.

[0121] The gateway 120 is also known as an internetwork connector and protocol converter. The gateway realizes network interconnection at the transport layer and is a computer system or device that acts as a converter. Between two systems using different communication protocols, data formats, or languages, and even with completely different architectures, the gateway is a translator. At the same time, the gateway can also provide filtering and security functions. Messages sent by the terminal 140 to the server 110 need to be sent to the corresponding server 110 through the gateway 120. Messages sent by the server 110 to the terminal 140 also need to be sent to the corresponding terminal 140 through the gateway 120.

[0122] The instance scheduling method of the embodiments of the present disclosure can be implemented on the server 110.

[0123] When the instance scheduling method is implemented on the server 110, the server 110 obtains the object distribution data corresponding to the target cloud game; generates the number of instances to be created for each network operator in each region based on the object distribution data; filters out a preset number of target server clusters from each network operator in each region based on network latency; determines the creation weight for each target server cluster in each network operator in each region according to the node affinity policy; combines the number of instances to be created and the corresponding creation weight, and calculates the number of instances to be created for each target server cluster in each network operator in each region for instance scheduling.

[0124] The embodiments of the present disclosure can be applied in various scenarios, such as Figure 4 the scenario of the instance scheduling method shown.

[0125] Scenario of the instance scheduling method:

[0126] The scenario of the instance scheduling method can reflect the rapid allocation of instances.

[0127] The instance scheduling system obtains the object distribution data corresponding to the target cloud game; generates the number of instances to be created for each network operator in each region through the object distribution data; filters out a preset number of target server clusters from each network operator in each region based on network latency; determines the creation weight for each target server cluster in each network operator in each region according to the node affinity policy; combines the number of instances to be created and the corresponding creation weight, calculates the number of instances to be created for each target server cluster in each network operator in each region, and performs instance scheduling. In this way, the object can operate the terminal 140 to open the cloud game login interface 11. The cloud game login interface 11 includes a "Log in immediately" control. The object can log in to the cloud game by clicking the "Log in immediately" control, generate a cloud game request and send it to the server 140. The instance scheduling system on the server 140 can determine the most suitable target server cluster according to the region and operator where the object is located. Since instance scheduling has been performed for each target server cluster according to the number of instances to be created before, the target server cluster can quickly allocate corresponding instances to the cloud game on the terminal 140 operated by the object, avoiding player waiting and realizing fast cloud games.

[0128] It should be noted that Figure 3 The schematic diagram of the scenario of the instance scheduling system shown is only an example. The instance scheduling system and scenario described in the embodiments of the present application are for more clearly explaining the technical solutions of the embodiments of the present application, and do not constitute a limitation to the technical solutions provided by the embodiments of the present application. Those skilled in the art know that with the evolution of instance scheduling and the emergence of new business scenarios, the technical solutions provided by the embodiments of the present application are equally applicable to similar technical problems.

[0129] In this embodiment, the description will be made from the perspective of the instance scheduling device. The instance scheduling device can be specifically integrated in a computer device with a storage unit and equipped with a microprocessor and having computing capabilities. The computer device can be a server, and this server can be understood as a scheduling server, which can implement instance scheduling for all server clusters. In this embodiment, the computer device is used as a server for explanation.

[0130] Please refer to Figure 5 , Figure 5 which is a flowchart of the instance scheduling method provided by the embodiments of the present application. The instance scheduling method includes:

[0131] In step 201, obtain the object distribution data corresponding to the target cloud game.

[0132] Among them, the target cloud game is a certain cloud game application developed based on cloud game technology. For this target cloud game, a certain number of instances need to be prepared in advance. The basic idea of instance scheduling is to make idle instances appear on the server cluster where they are most needed. Where the usage of objects is high, the entry and exit of objects will be more frequent, and the fluctuation value of the number of objects will be greater. Therefore, a certain number of idle instances are more needed to ensure that the number of players queuing is reduced.

[0133] Therefore, the embodiments of this application need to periodically count the object distribution to obtain object distribution data. For example, please refer to Figure 6 As shown, the object distribution can be counted every 5 minutes. Specifically, the number of queuing objects of the target cloud game is counted through Redis (a high-performance key-value database), and the number of online objects of the target cloud game is counted through an in-memory DB (Database). After integrating the two, the object quantity (which can also be called the demand quantity) is written into the MySQL database for storage to obtain the object distribution data. The object distribution data includes the corresponding object quantity of each operator in each region under the target cloud game. To better illustrate the embodiments of this application, please refer to Figure 7 As shown, Figure 7 is a certain network operator of the target cloud game, and the object quantities in each city (only part of which is shown in the figure). It can be seen that the number of objects from City B in Province A is the largest. By separately counting the object quantities of each network operator of the target cloud game in each city, the object distribution data can be obtained. Therefore, the object distribution data can characterize the distribution of objects of each network operator in each city.

[0134] In step 202, the number of instances to be created for each network operator in each region is generated based on the object distribution data.

[0135] Among them, the region can be understood as a province or a city. In the embodiments of this application, the region is taken as an example of a city. Since the object distribution data represents the distribution of objects of each network operator in each city, therefore, the total number of objects of each network operator in each city can be counted according to the object distribution data. According to the total number of objects, the number of to-be-created instances to be generated for each network operator in each city can be pre-evaluated automatically. The larger the total number of objects, the larger the corresponding number of to-be-created instances allocated; the smaller the total number of objects, the smaller the corresponding number of to-be-created instances allocated. For example, the total number of objects of the mobile operator in City A of Province A is 100, and the corresponding number of to-be-created instances that can be allocated is 150. The total number of objects of the mobile operator in City B of Province B is 200, and the corresponding number of to-be-created instances that can be allocated is 300, and so on. The number of to-be-created instances for each network operator in each city can be generated according to the object distribution data. Compared with the manual monitoring solution, the embodiments of this application can automatically and accurately estimate the number of to-be-created instances for each network operator in each region according to the distribution of objects, improving the utilization rate of subsequent computing resources.

[0136] In some embodiments, generating the number of to-be-created instances for each network operator in each region through the object distribution data may include:

[0137] (1) According to the object distribution data, count the demand increment of the target cloud game in the current preset unit time;

[0138] (2) Obtain the instance creation time consumption and idle redundancy, and calculate the total number of to-be-created instances based on the instance creation time consumption, demand increment, and idle redundancy;

[0139] (3) Based on the object distribution data, obtain the object distribution ratio of each network operator in each region;

[0140] (4) According to the total number of to-be-created instances and the object distribution ratio, determine the number of to-be-created instances for each network operator in each region.

[0141] For better illustration of the embodiments of this application, please refer to the following formula for understanding:

[0142] Total number of to-be-created instances = a * demand increment in the current preset unit time + current total demand * total load idle rate (i.e., idle redundancy)

[0143] Among them, a represents the time consumption for instance creation, which represents the time consumption for the server cluster to create an instance, such as 30 seconds. The preset unit time can be 60 seconds. That is, the demand increment for the current preset unit time can be understood as the total number of objects increased by the target cloud game in the current preset unit time. That is, the demand increment for the target cloud game in the current preset unit time can be analyzed and statistically obtained based on the object distribution data. The greater the demand increment for the current preset unit time, the greater the object activity of the target cloud game, and more instances need to be configured to prevent instance overload. On the contrary, the smaller the demand for the current preset unit time, the smaller the object activity of the target cloud game, and some instances can be reduced in configuration to prevent instance idleness and waste of computing resources.

[0144] During the actual operation of cloud games, due to game activities or the launch of new modes, the number of objects may increase explosively in a short period of time. If there are insufficient instances, it will cause players to queue up and seriously affect the cloud game experience of the objects. Therefore, the embodiment of the present application can also increase the idle redundancy to prevent players from queuing up. As can be seen from the above formula, the idle redundancy can be calculated from the current total demand and the total load idle rate. The current total demand can be understood as the total number of objects of the target cloud game at the current time, and the current total demand can be calculated based on the object distribution data. The total load idle rate can be the total load idle rate statistically based on all server clusters. The higher the total load idle rate, the more servers are in the idle state, and the idle redundancy will increase accordingly, resulting in an increase in the total number of instances to be created, better avoiding players queuing up. The lower the total load idle rate, the more servers are in the high-load state, and the idle redundancy will be appropriately reduced, resulting in an appropriate reduction in the total number of instances to be created, avoiding server overload. That is, the total load idle rate is proportional to the total number of instances to be created. For a better understanding of the embodiment of the present application, please refer to Figure 8 as shown Figure 8 The monitoring screen A including the total number of pre-created instances (i.e., the total number of instances to be created) and the monitoring screen B of the high-load cluster ratio. From the monitoring screen A and the monitoring screen B, it can be seen that when the high-load cluster ratio is low, it represents a high total load idle rate, and the total number of instances to be created will be correspondingly high. On the contrary, when the high-load cluster ratio is high, it represents a low total load idle rate, and the total number of instances to be created will be correspondingly low.

[0145] Therefore, based on the above formula, the embodiment of the present application can calculate the total number of instances to be created according to the sum of the product of the instance creation time consumption and the demand increment for the current preset unit time and the idle redundancy on the right side.

[0146] In actual cloud gaming scenarios, server clusters are distributed in cities across the country. The closer the physical distance between the object and the server cluster, the lower the corresponding network delay will be due to the short physical transmission distance. The farther the physical distance between the object and the server cluster, the higher the corresponding network delay will be due to the longer physical transmission distance. Therefore, it is also necessary to allocate the total number of instances to be created according to the demand for the number of objects, and allocate the total number of instances to be created to the dimensions of each network operator in each region. Specifically, statistics can be performed based on the object distribution data to obtain the number of objects for each network operator in each region, and the number of objects for each network operator in each region can be divided by the total number of objects to obtain the object distribution ratio allocated to each network operator in each region. For example, the number of objects of China Unicom operator A in city A in province A is 200, and the total number of objects is 10,000. Then the object distribution ratio of China Unicom operator A in city A in province A is 0.02. For a better understanding of the embodiments of the present application, please refer to Figure 9 As shown, Figure 9 A monitoring screen C including an object distribution ratio, wherein the monitoring screen C displays the object distribution ratio of each network operator in each region.

[0147] Finally, the object distribution ratio of each network operator in each region can be multiplied by the total number of instances to be created, that is, the number of instances to be created for each network operator in each region can be obtained, thereby achieving accurate allocation according to the distribution of objects.

[0148] In step 203, based on the network delay, a preset number of target server clusters are screened out from each network operator in each region.

[0149] Among them, in the cloud gaming scenario, network latency is an important indicator related to the player experience. When the network latency is high, the player's game screen will have frame skipping, affecting the player's operation. Therefore, when the object of a certain network operator in a certain region connects to the cloud game, the cloud game distribution system will allocate the object to the server cluster with lower network latency among all server clusters of a certain network operator in a certain region. Accordingly, it is necessary to prepare enough instances in advance on these server clusters with lower network latency.

[0150] Therefore, the embodiment of the present application can pre-screen a preset number of target server clusters from each network operator in each region based on network delay, so that instances can be pre-prepared in these target server clusters later. The preset number can be manually set, such as 10 or 20.

[0151] To better illustrate the embodiments of this application, please refer to Figure 10As shown, output the network operator of the province or city (i.e., region) to the optimal server cluster model, that is, according to the network latency, a preset number of target server clusters can be filtered out. In this way, based on the network latency, a preset number of target server clusters can be filtered out from each network operator in each region respectively.

[0152] In step 204, according to the node affinity policy, determine the creation weight for each target server cluster in each network operator in each region.

[0153] Among them, due to the differences in configurations and load conditions among different server clusters. For example, the architecture type of the graphics card in some server clusters is the NVIDIA graphics card architecture type, while the architecture type of the graphics card in some server clusters is the AMD graphics card architecture type. Assuming that the target cloud game can only run on a graphics card with the NVIDIA graphics card architecture type, some other server clusters will not be usable. Regarding the differences in load conditions, for example, the cluster load idle rate of some server clusters is relatively large, and there is sufficient computing resources to support instance creation, while the cluster load idle rate of some server clusters is relatively small, and there is not enough computing resources to support instance creation, which will result in the inability to create or only partially create instances.

[0154] Therefore, if the number of instances to be created is directly allocated to the preset number of server clusters in an average distribution manner, it will cause some instances to be unable to be created, or the instances cannot be used by the target cloud game. To solve the above problems, this application proposes that the creation weight can be determined for each target server cluster in each network operator in each region according to the node affinity policy. This node affinity policy is an allocation policy dynamically configured according to the operation configuration environment requirements of the target cloud game and the operation environment requirements of the server cluster. For example, the node affinity policy can be determined according to the cluster load idle rate. Allocate more creation weights to the target server clusters with a high cluster idle rate to achieve more allocations of the instances to be created, and allocate fewer creation weights to the target server clusters with a low cluster idle rate to achieve fewer allocations of the instances to be created, realizing flexible configuration of the instances and avoiding instance creation failures or instance idleness.

[0155] In some embodiments, the node affinity policy may include a soft policy and a hard policy. Based on this, determining the creation weight for each target server cluster in each network operator in each region according to the node affinity policy includes:

[0156] (1) According to the soft policy, calculate the target score for each target server cluster in each network operator in each region;

[0157] (2) According to this hard policy, each target server cluster in each network operator in each region is screened to select the first server cluster to be adjusted.

[0158] (3) Set the target score of the first server cluster to be adjusted to zero.

[0159] (4) Calculate the creation weights of each target server cluster in each network operator in each region according to the target scores of each target server cluster in each network operator in each region.

[0160] Among them, this soft policy refers to the priority execution plan, that is, more instances can be allocated to the server clusters allocated preferentially according to the priority execution plan, which can include but are not limited to the cluster load idle rate policy and the arithmetic unit matching rate policy. The cluster load idle rate policy can be understood as allocating more creation weights to the target server clusters with high cluster idle rates to achieve more instance creations to be allocated, and allocating fewer creation weights to the target server clusters with low cluster idle rates to achieve fewer instance creations to be allocated.

[0161] In an actual cloud game scenario, running a target cloud game requires a certain number of arithmetic units, such as 8. The arithmetic unit can be a central processing unit (CPU for short) or a graphics processing unit (GPU). Each server cluster also has a certain number of arithmetic units, such as 32, 33, or 34 arithmetic units. A server cluster with 32 arithmetic units can fully run 4 instances of the target cloud game. A server cluster with 33 arithmetic units can fully run 4 instances of the target cloud game, but there will be one empty arithmetic unit left. A server cluster with 34 arithmetic units can fully run 4 instances of the target cloud game, but there will be two empty arithmetic units left. It can be seen that the server cluster with 32 arithmetic units has the best utilization rate of arithmetic units for running the target cloud game and there will be no situation of idle arithmetic units. On this basis, the arithmetic unit matching rate can be determined according to the remainder of the arithmetic units in the server cluster and the arithmetic units required for running the target cloud game. The smaller the remainder, the higher the arithmetic unit matching rate, and the larger the remainder, the lower the arithmetic unit matching rate. Therefore, the arithmetic unit matching rate policy can be understood as allocating more creation weights to the target server clusters with high arithmetic unit matching rates to achieve more instance creations to be allocated, and allocating fewer creation weights to the target server clusters with low arithmetic unit matching rates to achieve fewer instance creations to be allocated.

[0162] The hard policy is to require an execution plan, that is, the instance allocation can be limited according to the execution plan requirements to some specific server clusters, which may include but are not limited to the preset cluster architecture policy. In an actual cloud game scenario, the target cloud game can only run on the preset cluster architecture, for example, it can only run on a graphics card of the NVIDIA graphics card architecture type. The preset cluster architecture policy can be understood as screening out server clusters with non-preset cluster architectures.

[0163] Based on this, according to the soft policy, the target score of each target server cluster in each network operator in each region can be calculated. The target score can be understood as a weight representation. The higher the target score, the more suitable the target server cluster is for the soft policy, and the lower the target score, the less suitable the target server is for the soft policy.

[0164] Furthermore, according to the hard policy, each target server cluster in each network operator in each region can be screened, and the first server cluster to be adjusted that does not meet the hard policy can be selected. Furthermore, the target score of the first server cluster to be adjusted can be set to zero, so that it does not participate in subsequent instance allocation.

[0165] Finally, the weight calculation can be performed according to the target scores of each target server cluster in each network operator in each region. For example, under the mobile operator in City A of Province A, there are 10 target server clusters, and each target server cluster has a corresponding target score. The total target score can be obtained by adding up all the target scores, and the ratio of each target score to the total target score can be calculated to obtain the creation weights of the 10 target server clusters. By analogy, the creation weights of each target server cluster in each network operator in each region can be calculated. It should be particularly noted that for the first server cluster to be adjusted with a zero target score, its creation weight is 0. Therefore, it will not participate in instance allocation in the future.

[0166] In some embodiments, assume that the soft policy at least includes the cluster load idle rate policy and the operation unit matching rate policy. Calculating the target score of each target server cluster in each network operator in each region according to the soft policy includes:

[0167] (1.1) According to the cluster load idle rate policy, calculate the corresponding first score of each target server cluster in each network operator in each region;

[0168] (1.2) According to the operation unit matching rate policy, calculate the corresponding second score of each target server cluster in each network operator in each region;

[0169] (1.3) Add the first score and the second score of each target server cluster in each network operator in each region to obtain the target score of each target server cluster in each network operator in each region.

[0170] Among them, according to the cluster load idle rate policy, the cluster load idle rate corresponding to each target server cluster in each network operator in each region can be obtained, and then, based on the size of the cluster load idle rate, the first score of each server cluster in each network operator in each region can be calculated. The scoring criterion is that the higher the cluster load idle rate of the target server cluster, the higher the first score, and the lower the cluster load idle rate of the target server cluster, the lower the first score.

[0171] Correspondingly, according to the operation unit matching rate policy, the operation unit matching rate between the number of operation units of each target server cluster in each network operator in each region and the number of operation units required for running target cloud games can be calculated, and then, based on the size of the operation unit matching rate, the second score of each server cluster in each network operator in each region can be calculated. The scoring criterion is that the higher the operation unit matching rate of the target server cluster, the higher the second score, and the lower the operation unit matching rate of the target server cluster, the lower the second score.

[0172] Finally, the first score and the corresponding second score of each target server cluster in each network operator in each region can be directly added or weighted added to obtain the target score of each target server cluster in each network operator in each region.

[0173] In some embodiments, calculating the first score corresponding to each target server cluster in each network operator in each region according to the cluster load idle rate policy includes:

[0174] (2.1) According to the cluster load idle rate policy, obtain the cluster load idle rate of each target server cluster in each network operator in each region;

[0175] (2.2) Based on the size of the cluster load idle rate, calculate the first score corresponding to each target server cluster in each network operator in each region.

[0176] Among them, according to the cluster load idle rate policy, the cluster load idle rate of each target server cluster in each network operator in each region can be obtained. For better illustration of the embodiments of the present application, please refer to Figure 11 as shown Figure 11It includes the monitoring screen D of the load idle rate of each target server cluster of the target cloud game under a certain operator in a certain region, and the monitoring screen E of the first score of each target server cluster of the target cloud game under a certain operator in a certain region. It can be seen from the monitoring screen D that the cluster load idle rate of target server cluster 1 is 0.8, the cluster load idle rate of target server cluster 2 is 0.7, and the cluster load idle rate of target server cluster 3 is 0.5.

[0177] Furthermore, it is possible to sum up the cluster load idle rates of each target server under a certain operator in a certain region to obtain the total cluster load idle rate, and calculate the ratio of the cluster load idle rate of each target server to the total cluster load idle rate to obtain the corresponding first score of each target server cluster in each network operator in each region. Please continue to refer to Figure 11 As shown, sum up the cluster load idle rate of 0.8 for target server cluster 1, the cluster load idle rate of 0.7 for target server cluster 2, and the cluster load idle rate of 0.5 for target server cluster 3 to obtain the total cluster load idle rate of 2, and calculate the ratio of the cluster load idle rate of 0.8 for target server cluster 1 to the total cluster load idle rate of 2 to obtain the first score of 0.4, calculate the ratio of the cluster load idle rate of 0.7 for target server cluster 2 to the total cluster load idle rate of 2 to obtain the first score of 0.35, calculate the ratio of the cluster load idle rate of 0.5 for target server cluster 3 to the total cluster load idle rate of 2 to obtain the first score of 0.25, which is as shown in the monitoring screen E. By analogy, the corresponding first scores of each target server cluster in each network operator in each region can be calculated.

[0178] In some embodiments, calculating the corresponding second scores of each target server cluster in each network operator in each region according to the operation unit matching rate policy includes:

[0179] (3.1) According to the operation unit matching rate policy, obtain the number of first operation units of each target server cluster in each network operator in each region;

[0180] (3.2) Obtain the number of second operation units required for the operation of the target cloud game;

[0181] (3.3) Based on the matching rate of the number of first operation units and the number of second operation units, calculate the corresponding second scores of each target server cluster in each network operator in each region.

[0182] Among them, according to the operation unit matching rate strategy, the number of first operation units of each target server cluster in each network operator in each region can be obtained. For example, there are 3 target server clusters under a certain network operator in a certain region, namely target server cluster 1, target server cluster 2, and target server cluster 3. The number of first operation units of target server cluster 1 is 32, the number of first operation units of target server cluster 2 is 33, and the number of first operation units of target server cluster 3 is 34.

[0183] Furthermore, the number of second operation units required for the target cloud game to run can be obtained, and the matching rate of the number of first operation units and the number of second operation units can be calculated. For example, the number of second operation units required for the target cloud game to run is 8. The operation unit matching rate can be determined according to the remainder of the operation units of the server cluster and the operation units required by the target cloud game. The smaller the remainder, the higher the operation unit matching rate, and the larger the remainder, the lower the operation unit matching rate. For example, the remainder of the operation units of target server cluster 1 and the operation units required by the target cloud game is 0, the remainder of the operation units of target server cluster 2 and the operation units required by the target cloud game is 1, and the remainder of the operation units of target server cluster 3 and the operation units required by the target cloud game is 2. Therefore, it can be determined that the matching rate of target server cluster 1 is 1, the matching rate of target server cluster 2 is 0.9, and the matching rate of target server cluster 3 is 0.8.

[0184] Finally, based on the matching rate of the number of first operation units and the number of second operation units, the corresponding second score of each target server cluster in each network operator in each region is calculated. For example, the matching rate 1 of target server cluster 1, the matching rate 0.9 of target server cluster 2, and the matching rate 0.8 of target server cluster 3 can be summed up to obtain a total matching rate of 2.7, and the ratio of the matching rate 1 of target server cluster 1 to the total matching rate 2.7 is calculated to obtain a second score of 0.37. The ratio of the matching rate 0.9 of target server cluster 2 to the total matching rate 2.7 is calculated to obtain a second score of 0.33. The ratio of the matching rate 0.8 of target server cluster 3 to the total matching rate 2.7 is calculated to obtain a second score of 0.29. And so on, the corresponding second scores of each target server cluster in each network operator in each region can be calculated.

[0185] In some embodiments, assuming that the hard policy at least includes a preset cluster architecture policy, according to this hard policy, each target server cluster in each network operator in each region is screened to select the first server clusters to be adjusted, including:

[0186] (4.1) Obtain the cluster architecture of each target server cluster in each network operator in each region according to the preset cluster architecture policy;

[0187] (4.2) Determine the target server clusters whose cluster architecture does not belong to the preset cluster architecture as the first server clusters to be adjusted.

[0188] Among them, the cluster architecture of the target server clusters in each network operator in each region can be obtained according to the preset cluster architecture policy. For example, there are 3 target server clusters under a certain network operator in a certain region, namely target server cluster 1, target server cluster 2, and target server cluster 3. The cluster architecture of target server cluster 1 is NVIDIA, the cluster architecture of target server cluster 2 is NVIDIA, and the cluster architecture of target server cluster 3 is AMD.

[0189] Furthermore, the preset cluster architecture is the cluster architecture of the target cloud game. Assuming that the preset cluster architecture is NVIDIA, correspondingly, determine the target server 3 whose cluster architecture does not belong to the preset cluster architecture as the first server cluster to be adjusted, and set the target score of the target server 3 to zero in the subsequent process, so that it does not participate in the subsequent instance allocation.

[0190] In some embodiments, assuming that the cluster load idle rate of a cluster is too low, it indicates that the cluster load is large and belongs to a high-load state, and it may not be possible to successfully create an instance. Therefore, the embodiments of the present application further include:

[0191] (5.1) Obtain the cluster load idle rate of each target server cluster in each network operator in each region;

[0192] (5.2) Determine the target servers with a cluster load idle rate lower than the preset idle rate as the second server clusters to be adjusted, and set the target scores of the second server clusters to be adjusted to zero.

[0193] Among them, the preset idle rate can be 5. Assuming that the cluster load rate of a certain server cluster is lower than the preset idle rate, it indicates that the server cluster is in a high-load state. To prevent overload, the cluster load idle rate of each target server cluster in each network operator in each region can be obtained, and the target servers with a cluster load idle rate lower than the preset idle rate are determined as the second server clusters to be adjusted, and the second server clusters to be adjusted that do not meet the load conditions are screened out, and then the target scores of the second server clusters to be adjusted are set to zero, so that they do not participate in the subsequent instance allocation.

[0194] In some embodiments, the creation weights of each target server cluster in each network operator in each region are calculated by performing weight calculations according to the target scores of each target server cluster in each network operator in each region, including:

[0195] (6.1) Statistically analyze the target scores of each target server cluster in each network operator in each region respectively to obtain the total target scores of each network operator in each region.

[0196] (6.2) Calculate the creation weights of each target server cluster in each network operator in each region according to the ratio of the target score of each target server cluster in each network operator in each region to the corresponding total target score.

[0197] Among them, the target scores of each target server cluster in a certain network operator in a certain region can be statistically analyzed to obtain the total target score of a certain network operator in a certain region. By analogy, the total target scores of each network operator in each region can be obtained.

[0198] Furthermore, the ratio of the target score of each target server cluster in a certain network operator in a certain region to the corresponding total target score can be calculated to obtain the creation weight of each target server in a certain network operator in a certain region. By analogy, the creation weights of each target server in each network operator in each region can be obtained. It should be noted that the creation weights are screened by the affinity policy, which can achieve more accurate and flexible allocation of instances to different target server clusters in the follow-up.

[0199] In some embodiments, for some high-value target cloud games, designers often hope that they can fill up some server clusters with excellent performance. Therefore, corresponding priority tags can be set for these server clusters to achieve priority setting. Based on this, the step of statistically analyzing the target scores of each target server cluster in each network operator in each region respectively to obtain the total target scores of each network operator in each region includes:

[0200] (7.1) Sequentially detect whether each target server cluster in each network operator in each region carries a priority tag.

[0201] (7.2) Determine the network operator in the first region of the first region to which the target server cluster carrying the priority tag belongs.

[0202] (7.3) Determine the network operator in the second region of the second region to which the target server cluster not carrying the priority tag belongs.

[0203] (7.4) Statistically analyze the target scores of the target server clusters carrying the priority tag in each first network operator in each first region to obtain the total target scores of each first network operator in each first region.

[0204] (7.5) Count the target scores of each target server cluster in each second network operator in each second region to obtain the total target scores of each second network operator in each second region.

[0205] Among them, it is possible to pre-detect whether each target server cluster in each network operator in each region carries a previously preset priority label. Assume that there is a target server cluster carrying a priority label in a certain network operator in a certain region, and determine the network operator in the first region of this certain region as the first network operator. While assuming that there is no target server cluster carrying a priority label in a certain network operator in a certain region, then determine the network operator in this certain region as the second network operator in the second region.

[0206] For the first network operator in the first region, only need to count the target scores of the target server clusters carrying priority labels, and other target server clusters without priority labels do not participate in the statistics, that is, count the target scores of the target server clusters carrying priority labels in each first network operator in each first region to obtain the total target scores of each first network operator in each first region.

[0207] Correspondingly, for the second network operator in the second region, it is necessary to count the target scores of all target server clusters to obtain the total target scores of each second network operator in each second region.

[0208] In some embodiments, calculate the creation weights of each target server cluster in each network operator in each region according to the ratio of the target score of each target server cluster in each network operator in each region to the corresponding total target score, including:

[0209] (8.1) Calculate the creation weights of the target server clusters carrying priority labels in each first network operator in each first region according to the ratio of the target score of the target server clusters carrying priority labels in each first network operator in each first region to the corresponding total target score;

[0210] (8.2) Calculate the creation weights of each target server cluster in each second network operator in each second region according to the ratio of the target score of each target server cluster in each second network operator in each second region to the corresponding total target score.

[0211] Among them, for the first network operator in the first region, it only needs to count the ratio of the target score of the target server cluster with a priority label to the corresponding total target score, and calculate the creation weight of the target server cluster with a priority label, that is, the other target server clusters without a priority label do not participate in the statistics. Therefore, for the first network operator in the first region, instances will only be allocated to the target server clusters with a priority label.

[0212] Correspondingly, for the second network operator in the second region, it will calculate the ratio of the target score of each target server cluster to the corresponding total target score, and calculate the creation weight of each target server cluster in each second network operator in the second region. Based on this, more flexible instance scheduling can be achieved, improving the diversity and accuracy of instance scheduling.

[0213] In step 205, in combination with the number of instances to be created and the corresponding creation weights, calculate the number of instances to be created for each target server cluster in each network operator in each region, and perform instance scheduling based on the number of instances to be created.

[0214] Among them, since the target servers in each network operator in each region carry creation weights, and each network operator in each region is allocated the number of instances to be created, therefore, it only needs to multiply the number of instances to be created of each network operator in each region by the corresponding creation weight, that is, the number of instances to be created for each target server cluster in each network operator in each region can be calculated, and scheduling can be performed according to the number of instances to be created.

[0215] For example, the number of instances to be created for a certain network operator in a certain region is 100, including 3 target server clusters, namely target server cluster 1, target server cluster 2, and target server cluster 3. The creation weight of target server cluster 1 is 0.5, the creation weight of target server cluster 2 is 0.3, and the creation weight of target server cluster 3 is 0.2. Thus, according to the number of instances to be created 100 and the creation weights, the number of instances to be created for target server cluster 1 can be calculated as 50, the number of instances to be created for target server cluster 2 is 30, and the number of instances to be created for target server cluster 3 is 20. By analogy, the number of instances to be created for each target server cluster in each network operator in each region can be calculated for instance scheduling. For example, please refer to Figure 12 as shown, Figure 12 including the monitoring interface F of the scheduling plan. It can be seen from the monitoring interface F that through the above method, the number of instances to be created for each target server cluster in each network operator in each region can be calculated.

[0216] In one embodiment, for special objects under a certain operator in a certain region, during the instance scheduling process, a certain number of instances can be locked for these special objects. These locked instances can only be used by these special objects, so that they do not need to wait due to queuing for instance allocation, ensuring the cloud game experience of special objects.

[0217] As can be seen from the above, in the embodiment of the present application, the object distribution data corresponding to the target cloud game is obtained; the number of instances to be created for each network operator in each region is generated through the object distribution data; based on the network latency, a preset number of target server clusters are respectively selected from each network operator in each region; according to the node affinity policy, the creation weight is determined for each target server cluster in each network operator in each region; by combining the number of instances to be created and the corresponding creation weights, the number of instances to be created for each target server cluster in each network operator in each region is calculated for instance scheduling. In this way, according to the object distribution data of the target cloud game, the number of instances to be created for each network operator in each region can be automatically determined, and based on the network latency, a preset number of target server clusters with the best latency can be selected from each network operator in each region. Among the preset number of target server clusters, according to the node affinity policy, the creation weight can be accurately determined for each target server cluster. According to the previous number of instances to be created and the corresponding creation weights, the number of instances to be created for each target server cluster in each network operator in each region is calculated for instance scheduling. Compared with the solution of setting the instance scheduling quantity by manual monitoring in the related art, the embodiment of the present application can achieve automatic, efficient and flexible instance scheduling, get rid of manual monitoring, improve the utilization rate of instances, and then improve the utilization rate of computing resources. At the same time, it can also reduce the network latency of the connection and improve the cloud game experience of players.

[0218] Combined with the method described in the above embodiments, the following will give further detailed examples.

[0219] In this embodiment, it will be described by taking the instance scheduling device being specifically integrated in the server as an example.

[0220] To better illustrate the embodiments of the present application, please refer to Figure 13 , Figure 13 which is another process schematic diagram of the instance scheduling method provided by the embodiment of the present application. It includes:

[0221] In step 301, the server obtains the object distribution data corresponding to the target cloud game, according to the object distribution data, statistics the demand increment of the target cloud game in the current preset unit time, obtains the instance creation time-consuming and the total load idle rate, according to the object distribution data, obtains the current total demand, and calculates the idle redundancy based on the current total demand and the total load idle rate.

[0222] In step 302, the server calculates the total number of instances to be created based on the instance creation time, demand increment, and idle redundancy, obtains the object distribution ratio of each network operator in each region based on the object distribution data, and determines the number of instances to be created for each network operator in each region according to the total number of instances to be created and the object distribution ratio.

[0223] To better illustrate the embodiments of the present application, please refer to the following formula for understanding:

[0224] Total number of instances to be created = a * demand increment of the current preset unit time + current total demand * total load idle rate (i.e., idle redundancy)

[0225] Among them, a is the instance creation time, representing the time taken for the server cluster to create an instance, for example, 30 seconds. The preset unit time can be 60 seconds, that is, the demand increment of the current preset unit time can be understood as the total number of objects added by the target cloud game in the current preset unit time. That is, it can be analyzed based on the object distribution data and the demand increment of the target cloud game in the current preset unit time can be statistically obtained. The greater the demand increment of the current preset unit time, the greater the object activity of the target cloud game, and more instances need to be configured to prevent instance overload. On the contrary, the smaller the demand of the current preset unit time, the smaller the object activity of the target cloud game, and some instances can be configured less to prevent instance idleness and waste of computing resources.

[0226] During the actual operation of cloud games, due to game activities or the launch of new modes, the number of objects may increase rapidly in a short period of time. If the number of instances is insufficient, it will cause players to queue up, seriously affecting the cloud game experience of the objects. Therefore, the embodiments of the present application can also increase the idle redundancy to prevent players from queuing up. As can be seen from the above formula, the idle redundancy can be calculated from the current total demand and the total load idle rate. The current total demand can be understood as the total number of objects of the target cloud game at the current time, and the current total demand can be calculated based on the object distribution data. The total load idle rate can be the total load idle rate statistically based on all server clusters. The higher the total load idle rate, the more servers are in the idle state, and the idle redundancy will increase accordingly, making the total number of instances to be created increase, better avoiding players queuing up. The lower the total load idle rate, the more servers are in the high-load state, and the idle redundancy will be appropriately reduced, making the total number of instances to be created decrease appropriately, avoiding server overload. That is, the total load idle rate is proportional to the total number of instances to be created. To better understand the embodiments of the present application, please continue to refer to Figure 8 as shown Figure 8Monitoring screen A including the total number of pre-created instances (i.e., the total number of instances to be created) and monitoring screen B of the high-load cluster ratio. From monitoring screen A and monitoring screen B, it can be seen that when the high-load cluster ratio is low, it means the total load idle rate is high, and the total number of instances to be created will be correspondingly high. On the contrary, when the high-load cluster ratio is high, it means the total load idle rate is low, and the total number of instances to be created will be correspondingly low.

[0227] Therefore, based on the above formula, the server can calculate the total number of instances to be created according to the product of the instance creation time consumption and the demand increment of the current preset unit time and the sum with the idle redundancy on the right side.

[0228] Since in the actual cloud game scenario, the server clusters are distributed in various cities across the country, the closer the physical distance between the object and the server cluster, the lower the corresponding network latency, and the farther the physical distance between the object and the server cluster, the higher the corresponding network latency. Therefore, it is also necessary to allocate the total number of instances to be created according to the demand of the number of objects, and allocate the total number of instances to be created to each network operator in each region. Specifically, it can be statistically analyzed based on the object distribution data to obtain the number of objects of each network operator in each region, divide the number of objects of each network operator in each region by the total number of objects respectively to obtain the object distribution ratio allocated to each network operator in each region. For example, the number of objects of the Unicom operator in City A of Province A is 200, and the total number of objects is 10,000, then the object distribution ratio of the Unicom operator in City A of Province A is 0.02. For a better understanding of the embodiments of the present application, please continue to refer to Figure 9 as shown Figure 9 Monitoring screen C containing the object distribution ratio, and the object distribution ratio of each network operator in each region is displayed in monitoring screen C.

[0229] Finally, the object distribution ratio of each network operator in each region can be multiplied by the total number of instances to be created, that is, the number of instances to be created for each network operator in each region can be obtained, realizing the precise allocation of the number of instances according to the distribution of objects.

[0230] In step 303, the server filters out a preset number of target server clusters from each network operator in each region based on the network latency.

[0231] Please continue to refer to Figure 10 as shown, the server outputs the network operator of the province and city (i.e., region) to the optimal server cluster model, that is, a preset number of target server clusters can be filtered out according to the network latency. By analogy, based on the network latency, a preset number of target server clusters can be filtered out from each network operator in each region respectively.

[0232] In step 304, the server obtains the cluster load idle rate of each target server cluster in each network operator in each region according to the cluster load idle rate policy, and calculates the corresponding first score of each target server cluster in each network operator in each region based on the size of the cluster load idle rate.

[0233] Among them, the server can obtain the cluster load idle rate of each target server cluster in each network operator in each region according to the cluster load idle rate policy. To better illustrate the embodiments of the present application, please continue to refer to Figure 11 as shown Figure 11 It includes the monitoring screen D of the load idle rate of each target server cluster of the target cloud game under a certain operator in a certain region, and the monitoring screen E of the first score of each target server cluster of the target cloud game under a certain operator in a certain region. It can be seen from the monitoring screen D that the cluster load idle rate of the target server cluster 1 is 0.8, the cluster load idle rate of the target server cluster 2 is 0.7, and the cluster load idle rate of the target server cluster 3 is 0.5.

[0234] Furthermore, please continue to refer to Figure 11 as shown. Add up the cluster load idle rate of 0.8 for the target server cluster 1, the cluster load idle rate of 0.7 for the target server cluster 2, and the cluster load idle rate of 0.5 for the target server cluster 3 to obtain the total cluster load idle rate of 2, and calculate the ratio of the cluster load idle rate of 0.8 of the target server cluster 1 to the total cluster load idle rate of 2 to obtain the first score of 0.4. Calculate the ratio of the cluster load idle rate of 0.7 of the target server cluster 2 to the total cluster load idle rate of 2 to obtain the first score of 0.35. Calculate the ratio of the cluster load idle rate of 0.5 of the target server cluster 3 to the total cluster load idle rate of 2 to obtain the first score of 0.25, as shown in the monitoring screen E. By analogy, the corresponding first score of each target server cluster in each network operator in each region can be calculated.

[0235] In step 305, the server obtains the number of first computing units of each target server cluster in each network operator in each region according to the computing unit matching rate policy, obtains the number of second computing units required for the target cloud game to run, and calculates the corresponding second score of each target server cluster in each network operator in each region based on the matching rate of the number of first computing units and the number of second computing units.

[0236] Among them, the server can obtain the number of first computing units of each target server cluster in each network operator in each region according to the computing unit matching rate policy. For example, there are 3 target server clusters under a certain network operator in a certain region, namely target server cluster 1, target server cluster 2, and target server cluster 3. The number of first computing units of target server cluster 1 is 32, the number of first computing units of target server cluster 2 is 33, and the number of first computing units of target server cluster 3 is 34.

[0237] Furthermore, the number of second computing units required for the target cloud game to run can be obtained, and the matching rate of the number of first computing units and the number of second computing units can be calculated. For example, the number of second computing units required for the target cloud game to run is 8. The computing unit matching rate can be determined according to the remainder of the computing units of the server cluster and the computing units required by the target cloud game. The smaller the remainder, the higher the computing unit matching rate, and the larger the remainder, the lower the computing unit matching rate. For example, the remainder of the computing units of target server cluster 1 and the computing units required by the target cloud game is 0, the remainder of the computing units of target server cluster 2 and the computing units required by the target cloud game is 1, and the remainder of the computing units of target server cluster 3 and the computing units required by the target cloud game is 2. Therefore, it can be determined that the matching rate of target server cluster 1 is 1, the matching rate of target server cluster 2 is 0.9, and the matching rate of target server cluster 3 is 0.8.

[0238] Finally, based on the matching rate of the number of first computing units and the number of second computing units, the corresponding second scores of each target server cluster in each network operator in each region are calculated. For example, the matching rate 1 of target server cluster 1, the matching rate 0.9 of target server cluster 2, and the matching rate 0.8 of target server cluster 3 can be summed up to obtain a total matching rate of 2.7, and the ratio of the matching rate 1 of target server cluster 1 to the total matching rate 2.7 is calculated to obtain a second score of 0.37. The ratio of the matching rate 0.9 of target server cluster 2 to the total matching rate 2.7 is calculated to obtain a second score of 0.33. The ratio of the matching rate 0.8 of target server cluster 3 to the total matching rate 2.7 is calculated to obtain a second score of 0.29. And so on, the corresponding second scores of each target server cluster in each network operator in each region can be calculated.

[0239] In step 306, the server adds the first score and the second score of each target server cluster in each network operator in each region to obtain the target score of each target server cluster in each network operator in each region.

[0240] Among them, the server can directly add or weighted add the first score and the corresponding second score of each target server cluster in each network operator in each region to obtain the target score of each target server cluster in each network operator in each region. For example, for target server cluster 1, target server cluster 2, and target server cluster 3 under a certain operator in a certain region, add the first score 0.4 and the second score 0.37 of target server cluster 1 to obtain a target score of 0.77. Add the first score 0.35 and the second score 0.33 of target server cluster 2 to obtain a target score of 0.68. Add the first score 0.25 and the second score 0.29 of target server cluster 3 to obtain a target score of 0.54.

[0241] In step 307, the server obtains the cluster architecture of each target server cluster in each network operator in each region according to the preset cluster architecture policy, determines the target server clusters whose cluster architecture does not belong to the preset cluster architecture as the first server clusters to be adjusted, and zeros the target scores of the first server clusters to be adjusted.

[0242] Among them, the server can obtain the cluster architecture of each target server cluster in each network operator in each region according to the preset cluster architecture policy. For example, the cluster architecture of target server cluster 1 is NVIDIA, the cluster architecture of target server cluster 2 is NVIDIA, and the cluster architecture of target server cluster 3 is AMD.

[0243] Furthermore, the preset cluster architecture is the cluster architecture of the target cloud game. Assuming that the preset cluster architecture is NVIDIA, correspondingly, determine target server 3 whose cluster architecture does not belong to the preset cluster architecture as the first server cluster to be adjusted, and in the subsequent process, zero the target score 0.54 of this target server 3 so that it does not participate in the subsequent instance allocation.

[0244] In step 308, the server obtains the cluster load idle rate of each target server cluster in each network operator in each region, determines the target server clusters with a cluster load idle rate lower than the preset idle rate as the second server clusters to be adjusted, and zeros the target scores of the second server clusters to be adjusted.

[0245] Among them, the preset idle rate can be 5. Assuming that the cluster load rate of a certain server cluster is lower than the preset idle rate, it means that the server cluster is in a high-load state. To prevent overload, the server can obtain the cluster load idle rate of each target server cluster in each network operator in each region, determine the target server clusters with a cluster load idle rate lower than the preset idle rate as the second server clusters to be adjusted, screen out the second server clusters to be adjusted that do not meet the load conditions, and then zero the target scores of the second server clusters to be adjusted so that they do not participate in the subsequent instance allocation.

[0246] In step 309, the server sequentially detects whether each target server cluster in each network operator in each region carries a priority label, determines the network operator in the region where the target server cluster carrying the priority label belongs as the first network operator in the first region, and determines the network operator in the region where the target server cluster without the priority label belongs as the second network operator in the second region.

[0247] For some high-value target cloud games, designers often hope that they can fully occupy some server clusters with excellent performance, that is, preferentially allocate instances to server clusters with excellent performance. Therefore, corresponding priority labels can be set for these server clusters to achieve priority setting. Based on this, it can be pre-detected whether each target server cluster in each network operator in each region carries a previously preset priority label. Suppose there is a target server cluster carrying a priority label in a certain network operator in a certain region, and determine the network operator in the region as the first network operator in the first region. If there is no target server cluster carrying a priority label in a certain network operator in a certain region, then determine the network operator in the region as the second network operator in the second region.

[0248] In step 310, the server counts the target scores of the target server clusters carrying priority labels in each first network operator in each first region to obtain the total target scores of each first network operator in each first region, and counts the target scores of each target server cluster in each second network operator in each second region to obtain the total target scores of each second network operator in each second region.

[0249] Among them, for the first network operator in the first region, only the target scores of the target server clusters carrying priority labels need to be counted, and other target server clusters without priority labels do not participate in the statistics. That is, the target scores of the target server clusters carrying priority labels in each first network operator in each first region are counted to obtain the total target scores of each first network operator in each first region.

[0250] Correspondingly, for the second network operator in the second region, the target scores of all target server clusters need to be counted to obtain the total target scores of each second network operator in each second region.

[0251] In step 311, the server calculates the creation weight of the target server clusters with priority tags in each first network operator in each first region according to the ratio of the target scores of the target server clusters with priority tags in each first network operator in each first region to the corresponding total target scores, and calculates the creation weight of each target server cluster in each second network operator in each second region according to the ratio of the target scores of each target server cluster in each second network operator in each second region to the corresponding total target scores.

[0252] Among them, for the first network operator in the first region, it only needs to count the ratio of the target scores of the target server clusters with priority tags to the corresponding total target scores, and calculate the creation weight of the target server clusters with priority tags, that is, other target server clusters without priority tags do not participate in the statistics. Therefore, for the first network operator in the first region, instances will only be allocated to the target server clusters with priority tags.

[0253] Correspondingly, for the second network operator in the second region, it will calculate the ratio of the target scores of each target server cluster to the corresponding total target scores, and calculate the creation weight of each target server cluster in each second network operator in each second region. Based on this, more flexible instance scheduling is achieved, and the diversity and accuracy of instance scheduling are improved.

[0254] In step 312, the server combines the number of instances to be created and the corresponding creation weights, calculates the number of instances to be created in each target server cluster in each network operator in each region, and performs instance scheduling based on the number of instances to be created.

[0255] Among them, since the target servers in each network operator in each region carry creation weights, and the number of instances to be created is allocated to each network operator in each region, therefore, it only needs to multiply the number of instances to be created in each network operator in each region by the corresponding creation weights, that is, the number of instances to be created in each target server cluster in each network operator in each region can be calculated, and scheduling can be performed according to the number of instances to be created.

[0256] For example, the number of instances to be created by a certain network operator in a certain region is 100, including 3 target server clusters, namely target server cluster 1, target server cluster 2, and target server cluster 3. That is, the creation weight of target server cluster 1 is 0.5, the creation weight of target server cluster 2 is 0.3, and the creation weight of target server cluster 3 is 0.2. Thus, based on the number of instances to be created, which is 100, and the creation weights, it can be calculated that the number of instances to be created for target server cluster 1 is 50, the number of instances to be created for target server cluster 2 is 30, and the number of instances to be created for target server cluster 3 is 20. By analogy, the number of instances to be created for each target server cluster in each network operator in each region can be calculated for instance scheduling. For example, please continue to refer to Figure 12 as shown Figure 12 It includes a monitoring interface F for the scheduling plan. From the monitoring interface F, it can be seen that through the above method, the number of instances to be created for each target server cluster in each network operator in each region can be calculated.

[0257] As can be seen from the above, in the embodiment of the present application, the object distribution data corresponding to the target cloud game is obtained; the number of instances to be created for each network operator in each region is generated based on the object distribution data; based on the network latency, a preset number of target server clusters are respectively screened out from each network operator in each region; according to the node affinity policy, the creation weight is determined for each target server cluster in each network operator in each region; in combination with the number of instances to be created and the corresponding creation weights, the number of instances to be created for each target server cluster in each network operator in each region is calculated for instance scheduling. Thus, based on the object distribution data of the target cloud game, the number of instances to be created for each network operator in each region can be automatically determined. Also, based on the network latency, a preset number of target server clusters with the best latency can be screened out from each network operator in each region. Among the preset number of target server clusters, according to the node affinity policy, the creation weight can be accurately determined for each target server cluster. Based on the previous number of instances to be created and the corresponding creation weights, the number of instances to be created for each target server cluster in each network operator in each region is calculated for instance scheduling. Compared with the solution in the related art where the instance scheduling quantity is set by manual monitoring of the disk, the embodiment of the present application can achieve automatic, efficient, and flexible instance scheduling, get rid of manual monitoring of the disk, improve the utilization rate of instances, and further improve the utilization rate of computing resources. At the same time, it can also reduce the network latency of the connection and enhance the cloud game experience of players.

[0258] Furthermore, in the embodiment of the present application, through the setting of priority tags, the instances are preferentially allocated to the server clusters with excellent performance, further enhancing the flexibility of instance scheduling.

[0259] In some embodiments, for a better illustration of the embodiments of the present application, please refer to Figure 14 as shown in Figure 14 FIG. 577 is a timing schematic diagram of the instance scheduling method provided in the embodiments of the present application. The instance scheduling method is scheduled once every 2 seconds, calculates the total number of pre-pulled instances (i.e., the total number of instances to be created), and generates a scheduling plan for the number of instances to be created for each network operator in each region according to the distribution of user regional operators. Through the pre-selection phase, based on network latency, a preset number of target server clusters are respectively filtered out from each network operator in each region, and based on the node affinity policy, a creation weight is determined for each target server cluster in each network operator in each region, and the proportion of each server cluster is determined. Finally, in combination with the number of instances to be created and the corresponding creation weights, the number of instances to be created for each target server cluster in each network operator in each region is calculated for instance scheduling, so as to bind the instances to each server cluster.

[0260] For the specific implementation of each of the above steps, reference may be made to the previous embodiments, which will not be elaborated herein.

[0261] In some embodiments, for a better illustration of the embodiments of the present application, please refer to Figure 15 as shown in Figure 15 FIG. 583 is a program schematic diagram of the instance scheduling method provided in the embodiments of the present application. As shown in program diagram G, the server cluster can select the inerface interface to implement the above method. First, the policy name is obtained and initialized to start executing the program. The globally available clusters are selected through the PreFilter method, and then a group of initial clusters are elected for the objects of network operators in each city through the Candidate method. The affinity policy is applied to the initial clusters of each city operator through the Preferred method, and finally the load quantity ratio is assigned to the clusters in each group through the Weighted method to achieve instance scheduling.

[0262] For the specific implementation of each of the above steps, reference may be made to the previous embodiments, which will not be elaborated herein.

[0263] In this embodiment, a description will be made from the perspective of the instance display device. The instance display device may be specifically integrated in a computer device having a storage unit and installed with a microprocessor and having computing capabilities. The computer device may be a terminal, and in this embodiment, the computer device is used as a terminal for illustration.

[0264] Please refer to Figure 16 , Figure 16 which is a flowchart of the instance display method provided in the embodiments of the present application. The instance scheduling method includes:

[0265] In step 401, a scheduling plan interface is displayed.

[0266] Among them, a scheduling plan interface can be displayed on the display screen of the terminal, and this scheduling plan interface is the monitoring interface of the scheduling plan. Please continue to refer to Figure 12 as shown Figure 12 including the monitoring interface F of the scheduling plan.

[0267] In step 402, the number of created instances of each target server cluster in each network operator in each region is displayed on the scheduling plan interface.

[0268] Please continue to refer to Figure 12 as shown, it can be seen from the monitoring interface F that the number of created instances of each target server cluster in each network operator in each region can be displayed on the scheduling plan interface. It should be noted that the number of created instances is obtained through the above instance scheduling method.

[0269] For the specific implementation of each of the above steps, reference can be made to the embodiments of the previous instance scheduling method, which will not be elaborated here.

[0270] To facilitate better implementation of the instance scheduling method provided in the embodiments of the present application, the embodiments of the present application further provide a device based on the above instance scheduling method. The meanings of the nouns are the same as those in the above instance scheduling method, and the specific implementation details can be referred to the description in the method embodiments.

[0271] Please refer to Figure 17 , Figure 17 which is a schematic structural diagram of the instance scheduling device provided in the embodiments of the present application. This instance scheduling device is applied to a computer device, and this computer device can be a server. Among them, this instance scheduling device can include an acquisition unit 501, a generation unit 502, a screening unit 503, a determination unit 504, a calculation unit 505, etc.

[0272] The acquisition unit 501 is used to acquire the object distribution data corresponding to the target cloud game.

[0273] The generation unit 502 is used to generate the number of instances to be created for each network operator in each region through this object distribution data.

[0274] In some embodiments, this generation unit 502 includes:

[0275] A statistics subunit (not labeled), which is used to statistically calculate the demand increment of the target cloud game in the current preset unit time according to this object distribution data;

[0276] A calculation subunit (not labeled), which is used to obtain the instance creation time consumption and the idle redundancy, and calculate the total number of instances to be created based on this instance creation time consumption, demand increment, and idle redundancy;

[0277] A proportion determination subunit (not labeled), configured to obtain the object distribution proportion of each network operator in each region based on the object distribution data;

[0278] A determination subunit (not labeled), configured to determine the number of instances to be created for each network operator in each region according to the total number of instances to be created and the object distribution proportion.

[0279] In some embodiments, the calculation subunit (not labeled) is configured to:

[0280] Obtain the instance creation time consumption and the total load idle rate;

[0281] Obtain the current total demand according to the object distribution data;

[0282] Calculate the idle redundancy based on the current total demand and the total load idle rate;

[0283] Calculate the total number of instances to be created based on the instance creation time consumption, the demand increment, and the idle redundancy.

[0284] A screening unit 503, configured to respectively screen out a preset number of target server clusters from each network operator in each region based on network latency.

[0285] A determination unit 504, configured to determine the creation weight for each target server cluster in each network operator in each region according to the node affinity policy.

[0286] In some embodiments, the node affinity policy at least includes a hard policy and a soft policy, and the determination unit 504 includes:

[0287] A calculation subunit (not labeled), configured to calculate the target score of each target server cluster in each network operator in each region according to the soft policy;

[0288] A screening subunit (not labeled), configured to screen each target server cluster in each network operator in each region according to the hard policy to screen out the first server cluster to be adjusted;

[0289] A first zeroing subunit (not labeled), configured to zero the target score of the first server cluster to be adjusted;

[0290] A weight calculation subunit (not labeled), configured to respectively calculate the creation weight of each target server cluster in each network operator in each region according to the target scores of each target server cluster in each network operator in each region.

[0291] In some embodiments, the soft policy at least includes a cluster load idle rate policy and an operation unit matching rate policy. The computing subunit (not labeled) includes:

[0292] A first computing sub-module (not labeled), configured to calculate a corresponding first score for each target server cluster in each network operator in each region according to the cluster load idle rate policy;

[0293] A second computing sub-module (not labeled), configured to calculate a corresponding second score for each target server cluster in each network operator in each region according to the operation unit matching rate policy;

[0294] A third computing sub-module (not labeled), configured to add the first score and the second score of each target server cluster in each network operator in each region to obtain a target score for each target server cluster in each network operator in each region.

[0295] In some embodiments, the first computing sub-module (not labeled) is configured to:

[0296] Obtain the cluster load idle rate of each target server cluster in each network operator in each region according to the cluster load idle rate policy;

[0297] Based on the magnitude of the cluster load idle rate, calculate a corresponding first score for each target server cluster in each network operator in each region.

[0298] In some embodiments, the second computing sub-module (not labeled) is configured to:

[0299] Obtain the number of first operation units of each target server cluster in each network operator in each region according to the operation unit matching rate policy;

[0300] Obtain the number of second operation units required for running the target cloud game;

[0301] Based on the matching rate of the number of first operation units and the number of second operation units, calculate a corresponding second score for each target server cluster in each network operator in each region.

[0302] In some embodiments, the hard policy at least includes a preset cluster architecture policy. The screening subunit (not labeled) is configured to:

[0303] Obtain the cluster architecture of each target server cluster in each network operator in each region according to the preset cluster architecture policy;

[0304] Determine the target server clusters whose cluster architecture does not belong to the preset cluster architecture as the first server clusters to be adjusted.

[0305] In some embodiments, the determining unit 504 further includes a second clearing subunit (not labeled) for:

[0306] Obtain the cluster load idle rate of each target server cluster in each network operator in each region;

[0307] Determine the target server clusters with a cluster load idle rate lower than the preset idle rate as the second server clusters to be adjusted, and zero the target scores of the second server clusters to be adjusted.

[0308] In some embodiments, the weight calculation subunit (not labeled) includes:

[0309] A statistics sub-module for respectively counting the target scores of each target server cluster in each network operator in each region to obtain the total target scores of each network operator in each region;

[0310] A weight calculation sub-module for calculating the creation weights of each target server cluster in each network operator in each region according to the ratio of the target score of each target server cluster in each network operator in each region to the corresponding total target score.

[0311] In some embodiments, the statistics sub-module (not labeled) is used for:

[0312] Sequentially detect whether each target server cluster in each network operator in each region carries a priority label;

[0313] Determine the network operator in the region where the target server cluster carrying the priority label belongs as the first network operator in the first region;

[0314] Determine the network operator in the region where the target server cluster not carrying the priority label belongs as the second network operator in the second region;

[0315] Count the target scores of the target server clusters carrying the priority label in each first network operator in each first region to obtain the total target scores of each first network operator in each first region;

[0316] Count the target scores of each target server cluster in each second network operator in each second region to obtain the total target scores of each second network operator in each second region.

[0317] In some embodiments, the weight calculation sub-module (not labeled) is used for:

[0318] Calculate the creation weight of the target server clusters with priority tags in each first network operator in each first region according to the ratio of the target score of the target server clusters with priority tags in each first network operator in each first region to the corresponding total target score;

[0319] Calculate the creation weight of each target server cluster in each second network operator in each second region according to the ratio of the target score of each target server cluster in each second network operator in each second region to the corresponding total target score.

[0320] The calculation unit 505 is configured to calculate the number of creation instances of each target server cluster in each network operator in each region for instance scheduling by combining the number of instances to be created and the corresponding creation weight.

[0321] For the specific implementation of each of the above units, reference may be made to the previous embodiments, which will not be elaborated herein.

[0322] Please refer to Figure 18 , Figure 18 which is a schematic structural diagram of the instance scheduling device provided in the embodiment of the present application. The instance scheduling device is applied to a computer device, and the computer device may be a terminal. The instance scheduling device may include a first display unit 601, a second display unit 602, etc.

[0323] The first display unit 601 is configured to display a scheduling plan interface.

[0324] The second display unit 602 is configured to display the number of creation instances of each target server cluster in each network operator in each region on the scheduling plan interface.

[0325] Wherein, the number of creation instances is obtained by executing the above instance scheduling method.

[0326] For the specific implementation of each of the above units, reference may be made to the previous embodiments, which will not be elaborated herein.

[0327] Refer to Figure 19 , Figure 19 which is a partial structural block diagram of the terminal 140 for implementing the embodiment of the present disclosure. The terminal 140 includes components such as a radio frequency (RF) circuit 710, a memory 715, an input unit 730, a display unit 740, a sensor 750, an audio circuit 760, a wireless fidelity (WiFi) module 770, a processor 780, and a power supply 790. Those skilled in the art can understand, Figure 19The structure of the illustrated terminal 140 does not constitute a limitation on mobile phones or computers, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0328] The RF circuit 710 can be used for receiving and transmitting information during communication or calls. Specifically, after receiving the downlink information from the base station, it is sent to the processor 780 for processing; in addition, the uplink data is sent to the base station.

[0329] The memory 715 can be used to store software programs and modules. The processor 780 executes various functional applications and data processing of the terminal by running the software programs and modules stored in the memory 715.

[0330] The input unit 730 can be used to receive input digital or character information, and generate key signal inputs related to the settings and function control of the terminal. Specifically, the input unit 730 may include a touch panel 731 and other input devices 732.

[0331] The display unit 740 can be used to display the input information or provided information and various menus of the terminal. The display unit 740 may include a display panel 741.

[0332] The audio circuit 760, speaker 761, and microphone 762 can provide an audio interface.

[0333] In this embodiment, the processor 780 included in the terminal 140 can execute the instance display method of the previous embodiment, that is: display the scheduling plan interface; display the number of created instances of each target server cluster in each network operator in each region on the scheduling plan interface; wherein, the number of created instances is obtained by executing the above instance scheduling method.

[0334] The terminal 140 of the embodiments of the present disclosure includes but is not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle terminals, aircraft, etc. The embodiments of the present invention can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, intelligent transportation, assisted driving, etc.

[0335] Figure 20FIG. 0 is a block diagram of a part of the server 110 for implementing the embodiments of the present disclosure. The server 110 may vary greatly due to configuration or performance differences, and may include one or more central processing units (CPUs) 822 (e.g., one or more processors) and a memory 632, and one or more storage media 830 (e.g., one or more mass storage devices) for storing application programs 842 or data 844. Among them, the memory 832 and the storage media 830 may be transient storage or persistent storage. The programs stored in the storage media 830 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server 110. Further, the central processing unit 822 may be configured to communicate with the storage media 830 and execute a series of instruction operations in the storage media 830 on the server 110.

[0336] The server 110 may further include one or more power supplies 826, one or more wired or wireless network interfaces 850, one or more input / output interfaces 858, and / or one or more operating systems 841, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.

[0337] The central processing unit 822 in the server 110 may be used to execute the instance scheduling method of the embodiments of the present disclosure, that is: obtaining the object distribution data corresponding to the target cloud game; generating the number of instances to be created for each network operator in each region through the object distribution data; based on the network latency, screening out a preset number of target server clusters from each network operator in each region; determining the creation weight for each target server cluster in each network operator in each region according to the node affinity policy; and combining the number of instances to be created and the corresponding creation weight to calculate the number of instances to be created for each target server cluster in each network operator in each region for instance scheduling.

[0338] The embodiments of the present disclosure also provide a computer-readable storage medium, which is used to store program codes. The program codes are used to execute the instance scheduling method or the instance display method of the foregoing embodiments, that is: obtaining the object distribution data corresponding to the target cloud game; generating the number of instances to be created for each network operator in each region based on the object distribution data; screening out a preset number of target server clusters from each network operator in each region based on network latency; determining the creation weight for each target server cluster in each network operator in each region according to the node affinity policy; combining the number of instances to be created and the corresponding creation weight to calculate the number of instances to be created for each target server cluster in each network operator in each region for instance scheduling. Or displaying a scheduling plan interface; displaying the number of instances to be created for each target server cluster in each network operator in each region on the scheduling plan interface; wherein, the number of instances to be created is obtained by executing the above instance scheduling method.

[0339] The embodiments of the present disclosure also provide a computer program product, which includes a computer program. The processor of the computer device reads and executes the computer program, so that the computer device executes to implement the above instance scheduling method.

[0340] In addition, the terms "include" and "comprise" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these process, method, product or device.

[0341] It should be understood that in the present disclosure, "at least one (item)" means one or more, and "a plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that there can be three relationships. For example, "A and / or B" can mean: only A exists, only B exists, and both A and B exist at the same time. Among them, A and B can be singular or plural. The character " / " generally means that the associated objects before and after are in an "or" relationship. "At least one (piece) of the following" or similar expressions refer to any combination of these items, including any combination of single item (piece) or plural items (pieces). For example, at least one (piece) of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a, b and c", where a, b, c can be single or multiple.

[0342] It should be understood that in the description of the embodiments of the present disclosure, the meaning of "a plurality (or multiple items)" is more than two. Understandings such as greater than, less than, exceeding, etc. do not include this number, and understandings such as above, below, within, etc. include this number.

[0343] In several embodiments provided by the present disclosure, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections between each other can be through some interfaces, and the indirect couplings or communication connections of devices or units can be in electrical, mechanical, or other forms.

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

[0345] In addition, each functional unit in various embodiments of the present disclosure can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

[0346] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present disclosure, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in various embodiments of the present disclosure. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM for short), random access memory (RAM for short), magnetic disks, or optical discs that can store program codes.

[0347] It should also be understood that the various implementation manners provided in the embodiments of the present disclosure can be combined arbitrarily to achieve different technical effects.

[0348] In the embodiments of the present application, the term "module" or "unit" refers to a computer program with a predetermined function or a part of a computer program, which works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as a processing circuit or a memory), or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be a part of the overall module or unit that includes the function of that module or unit.

[0349] The above is a specific description of the embodiments of the present disclosure. However, the present disclosure is not limited to the above embodiments. Those skilled in the art can make various equivalent deformations or substitutions without departing from the spirit of the present disclosure, and these equivalent deformations or substitutions are all included within the scope defined by the claims of the present disclosure.

Claims

1. An instance scheduling method, characterized in that, Including: Obtaining object distribution data corresponding to the target cloud game; Generating the number of instances to be created for each network operator in each region based on the object distribution data; Based on network latency, screening out a preset number of target server clusters from each network operator in each region; Determining creation weights for each target server cluster in each network operator in each region according to the node affinity policy; Combining the number of instances to be created and the corresponding creation weights, calculating the number of instances to be created for each target server cluster in each network operator in each region, and performing instance scheduling based on the number of instances to be created.

2. The example scheduling method according to claim 1, characterized in that The generating the number of instances to be created for each network operator in each region based on the object distribution data includes: According to the object distribution data, counting the demand increment of the target cloud game in the current preset unit time; Obtaining the instance creation time consumption and idle redundancy, and calculating the total number of instances to be created based on the instance creation time consumption, demand increment and idle redundancy; Based on the object distribution data, obtaining the object distribution ratio of each network operator in each region; Determining the number of instances to be created for each network operator in each region according to the total number of instances to be created and the object distribution ratio.

3. The instance scheduling method according to claim 2, wherein The obtaining the instance creation time consumption and idle redundancy includes: Obtaining the instance creation time consumption and the total load idle rate; According to the object distribution data, obtaining the current total demand; Calculating the idle redundancy based on the current total demand and the total load idle rate.

4. The example scheduling method according to claim 1, wherein The node affinity policy at least includes a hard policy and a soft policy. The determining creation weights for each target server cluster in each network operator in each region according to the node affinity policy includes: According to the soft policy, calculating the target score of each target server cluster in each network operator in each region; According to the hard policy, screening each target server cluster in each network operator in each region to select the first server cluster to be adjusted; Resetting the target score of the first server cluster to be adjusted to zero; Calculating the creation weights of each target server cluster in each network operator in each region respectively according to the target scores of each target server cluster in each network operator in each region.

5. The example scheduling method according to claim 4, wherein The soft policy at least includes a cluster load idle rate policy and an operation unit matching rate policy. The calculating the target score of each target server cluster in each network operator in each region according to the soft policy includes: According to the cluster load idle rate policy, calculating the corresponding first score of each target server cluster in each network operator in each region; According to the operation unit matching rate policy, calculating the corresponding second score of each target server cluster in each network operator in each region; Adding the first score and the second score of each target server cluster in each network operator in each region to obtain the target score of each target server cluster in each network operator in each region.

6. The example scheduling method according to claim 5, wherein, Calculating a corresponding first score for each target server cluster in each network operator in each region according to the cluster load idle rate policy includes: Obtaining the cluster load idle rate of each target server cluster in each network operator in each region according to the cluster load idle rate policy; Calculating a corresponding first score for each target server cluster in each network operator in each region based on the magnitude of the cluster load idle rate.

7. The instance scheduling method according to claim 5, wherein Calculating a corresponding second score for each target server cluster in each network operator in each region according to the operation unit matching rate policy includes: Obtaining the number of first operation units of each target server cluster in each network operator in each region according to the operation unit matching rate policy; Obtaining the number of second operation units required for the target cloud game to run; Calculating a corresponding second score for each target server cluster in each network operator in each region based on the matching rate of the number of first operation units and the number of second operation units.

8. The instance scheduling method according to claim 4, wherein The hard policy at least includes a preset cluster architecture policy. Screening out a first server cluster to be adjusted for each target server cluster in each network operator in each region according to the hard policy includes: Obtaining the cluster architecture of each target server cluster in each network operator in each region according to the preset cluster architecture policy; Determining a target server cluster whose cluster architecture does not belong to the preset cluster architecture as the first server cluster to be adjusted.

9. The instance scheduling method according to claim 4, wherein The method further includes: Obtaining the cluster load idle rate of each target server cluster in each network operator in each region; Determining a target server with a cluster load idle rate lower than the preset idle rate as the second server cluster to be adjusted and resetting the target score of the second server cluster to zero.

10. The example scheduling method according to claim 4, wherein Calculating a creation weight for each target server cluster in each network operator in each region by respectively calculating weights according to the target scores of each target server cluster in each network operator in each region includes: Respectively counting the target scores of each target server cluster in each network operator in each region to obtain the total target score of each network operator in each region; Calculating a creation weight for each target server cluster in each network operator in each region according to the ratio of the target score of each target server cluster in each network operator in each region to the corresponding total target score.

11. The example scheduling method according to claim 10, characterized in that, The respectively counting the target scores of each target server cluster in each network operator in each region to obtain the total target score of each network operator in each region includes: Sequentially detecting whether each target server cluster in each network operator in each region carries a priority label; Determining the network operator in the region where the target server cluster carrying the priority label belongs as the first network operator in the first region; Determining the network operator in the region where the target server cluster not carrying the priority label belongs as the second network operator in the second region; Count the target scores of the target server clusters with priority tags in each first network operator in each first region to obtain the total target scores of each first network operator in each first region; Count the target scores of each target server cluster in each second network operator in each second region to obtain the total target scores of each second network operator in each second region.

12. The instance scheduling method according to claim 11, wherein The calculating the creation weights of each target server cluster in each network operator in each region according to the ratio of the target score of each target server cluster in each network operator in each region to the corresponding total target score includes: Calculate the creation weights of the target server clusters with priority tags in each first network operator in each first region according to the ratio of the target scores of the target server clusters with priority tags in each first network operator in each first region to the corresponding total target scores; Calculate the creation weights of each target server cluster in each second network operator in each second region according to the ratio of the target scores of each target server cluster in each second network operator in each second region to the corresponding total target scores.

13. An instance display method, characterized in that, Include: Display a scheduling plan interface; Display the number of creation instances of each target server cluster in each network operator in each region on the scheduling plan interface; Wherein, the number of creation instances is obtained by executing the instance scheduling method according to any one of claims 1 to 12.

14. An instance scheduling device, characterized in that, Include: An acquisition unit for acquiring object distribution data corresponding to a target cloud game; A generation unit for generating the number of instances to be created for each network operator in each region through the object distribution data; A screening unit for screening out a preset number of target server clusters from each network operator in each region based on network latency; A determination unit for determining creation weights for each target server cluster in each network operator in each region according to a node affinity policy; A calculation unit for combining the number of instances to be created and the corresponding creation weights to calculate the number of creation instances of each target server cluster in each network operator in each region, and performing instance scheduling based on the number of creation instances.

15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores multiple instructions, and the instructions are suitable for being loaded by a processor to execute the instance scheduling method according to any one of claims 1 to 12 or the instance display method according to claim 13.

16. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the instance scheduling method according to any one of claims 1 to 12 or the instance display method according to claim 13.

17. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instruction is executed by the processor, it implements the instance scheduling method according to any one of claims 1 to 12 or the instance display method according to claim 13.

Citation Information

Cited By

  • At-211 separation process data sharing and collaborative analysis method and system based on cloud platform

    CN121907931A

  • Cloud platform-based at-211 separation process data sharing and collaborative analysis method and system

    CN121907931B