Cloud game processing method, device and equipment, medium and product
By performing expansion and capacity prediction and quantization processing in the cloud gaming system and dynamically adjusting the number of virtual devices, the problems of low device utilization and long game access time are solved, and the equipment utilization and game access time are improved.
Patent Information
- Application Number
- CN202410145224.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-01
- Publication Date
- 2025-08-01
AI Technical Summary
In the cloud gaming scenario, when the number of virtual devices deployed in the cloud gaming server is too large, the resource is wasted, and when the number is too small, the game access time is too long, and the existing technology is difficult to effectively adjust the device utilization rate and game access time.
By obtaining information about equipment in cloud gaming systems, using expansion and capacity prediction and quantization processing, formulating reasonable expansion and capacity expansion and capacity adjustment dynamically, the number of virtual devices, including expansion and capacity reduction processing.
It improves the utilization rate of devices in cloud gaming systems, reduces game access time, and avoids waste of resources and queuing of players.
Smart Images

Figure CN120393394A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud computing technology, and particularly to the field of cloud game technology. Specifically, it relates to a method for processing cloud games, a device for processing cloud games, a computer device, a computer-readable storage medium, and a computer program product. Background Art
[0002] In the cloud game scenario, cloud games do not run on the terminal used by players, but on virtual devices (such as Android devices virtualized by Android containers) in the cloud game server. In practice, it is found that if the number of virtual devices deployed (or pre-launched) in the cloud game server is too large, a large number of virtual devices will be in an idle state, resulting in low device utilization; if the number of virtual devices deployed in the cloud game server is too small, virtual devices have to be launched in real time, leading to too long game access time. Summary of the Invention
[0003] Embodiments of the present application provide a method, a device, a device, a medium, and a product for processing cloud games, which can improve the device utilization rate of each cloud game in the cloud game system and reduce the game access time of each cloud game in the cloud game system through a reasonable scaling strategy.
[0004] On the one hand, embodiments of the present application provide a method for processing cloud games. The method for processing cloud games includes:
[0005] Obtain device information of P cloud games in the cloud game system; the device information includes device deployment information and device usage information, and P is a positive integer;
[0006] Perform scaling prediction quantization processing on the cloud game system based on the device information of the P cloud games to obtain a scaling strategy for the cloud game system; the scaling strategy for the cloud game system is used to indicate the target cloud games in the cloud game system that need to be scaled and the target scaling parameters required for scaling the target cloud games;
[0007] Perform scaling processing on the target cloud games in the cloud game system according to the scaling strategy of the cloud game system.
[0008] On the other hand, embodiments of the present application provide a device for processing cloud games. The device for processing cloud games includes:
[0009] An obtaining unit, configured to obtain device information of P cloud games in the cloud game system; the device information includes device deployment information and device usage information, and P is a positive integer;
[0010] A processing unit, configured to perform scaling prediction quantization processing on the cloud game system based on the device information of the P cloud games, so as to obtain a scaling strategy for the cloud game system; the scaling strategy for the cloud game system is used to indicate the target cloud games in the cloud game system that need to be scaled and the target scaling parameters required for scaling the target cloud games;
[0011] The processing unit is further configured to perform scaling processing on the target cloud games in the cloud game system according to the scaling strategy of the cloud game system.
[0012] Correspondingly, an embodiment of the present application provides a computer device, which includes:
[0013] A processor, adapted to implement a computer program;
[0014] A computer-readable storage medium, storing a computer program, which is adapted to be loaded and executed by the processor to perform the above-mentioned processing method for cloud games.
[0015] Correspondingly, an embodiment of the present application provides a computer-readable storage medium, storing a computer program, which when read and executed by a processor of a computer device, causes the computer device to perform the above-mentioned processing method for cloud games.
[0016] Correspondingly, an embodiment of the present application provides a computer program product, which includes a computer program stored in a computer-readable storage medium. The processor of the computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, causing the computer device to perform the above-mentioned processing method for cloud games.
[0017] In an embodiment of the present application, device information of P (a positive integer) cloud games in a cloud game system can be obtained; the device information includes device deployment information and device usage information. Based on the device information of the P cloud games, predictive quantization processing for scaling the cloud game system is performed to obtain a scaling strategy for the cloud game system. Among them, through predictive quantization processing for scaling, it can be predicted whether it is necessary to perform capacity expansion processing on the cloud game at the current moment (such as increasing the number of virtual devices deployed for the cloud game) and the target capacity expansion parameters required when performing the capacity expansion processing; or it can be predicted whether it is necessary to perform capacity reduction processing on the cloud game at the current moment (such as reducing the number of virtual devices deployed for the cloud game) and the target capacity reduction parameters required when performing the capacity reduction processing; or it can be predicted that there is no need to perform scaling processing (including capacity expansion processing and capacity reduction processing) on the cloud game at the current moment. Through predictive quantization processing for scaling, the scaling strategy of the cloud game system can be determined. The scaling strategy of the cloud game system may include the target cloud games in the cloud game system that need to be scaled and the target scaling parameters (including target capacity expansion parameters and target capacity reduction parameters) required for scaling the target cloud games. In this way, the target cloud games in the cloud game system can be scaled according to the scaling strategy of the cloud game system. It can be seen that the present application can dynamically adjust the number of virtual devices deployed for each cloud game in the cloud game system through a reasonable scaling strategy, which is beneficial to improving the device utilization rate of each cloud game in the cloud game system and reducing the game access time of each cloud game in the cloud game system. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0019] Figure 1a is a schematic diagram of the architecture of a cloud game system provided by an embodiment of the present application;
[0020] Figure 1b is another schematic diagram of the architecture of a cloud game system provided by an embodiment of the present application;
[0021] Figure 2 is a schematic flowchart of a processing method for a cloud game provided by an embodiment of the present application;
[0022] Figure 3 is a schematic flowchart of a processing method for a cloud game provided by an embodiment of the present application;
[0023] Figure 4 is a schematic diagram of a mobile smoothing result;
[0024] Figure 5 It is a schematic flowchart of a method for determining a scaling strategy provided by an embodiment of the present application;
[0025] Figure 6 It is a schematic diagram of a fitting result provided by an embodiment of the present application;
[0026] Figure 7 It is a schematic diagram of a scaling analysis scenario provided by an embodiment of the present application;
[0027] Figure 8 It is a schematic diagram of another scaling analysis scenario provided by an embodiment of the present application;
[0028] Figure 9 It is a schematic diagram of another scaling analysis scenario provided by an embodiment of the present application;
[0029] Figure 10 It is a schematic diagram of another scaling analysis scenario provided by an embodiment of the present application;
[0030] Figure 11 It is a schematic diagram of another scaling analysis scenario provided by an embodiment of the present application;
[0031] Figure 12 It is a schematic diagram of another scaling analysis scenario provided by an embodiment of the present application;
[0032] Figure 13 It is a schematic diagram of another scaling analysis scenario provided by an embodiment of the present application;
[0033] Figure 14 It is a schematic flowchart of another method for processing cloud games provided by an embodiment of the present application;
[0034] Figure 15 It is a schematic diagram of device transfer between cloud games provided by an embodiment of the present application;
[0035] Figure 16 It is a schematic diagram of another device transfer between cloud games provided by an embodiment of the present application;
[0036] Figure 17 It is a schematic diagram of another device transfer between cloud games provided by an embodiment of the present application;
[0037] Figure 18 It is a schematic diagram of another device transfer between cloud games provided by an embodiment of the present application;
[0038] Figure 19 It is a schematic diagram of another device transfer between cloud games provided by an embodiment of the present application;
[0039] Figure 20It is a schematic diagram of a comparison result provided by an embodiment of the present application;
[0040] Figure 21 It is a schematic structural diagram of a processing device for cloud games provided by an embodiment of the present application;
[0041] Figure 22 It is a schematic structural diagram of a computer device provided by an embodiment of the present application. Detailed implementation manners
[0042] Next, the technical solutions in the present application will be clearly and completely described in conjunction with the accompanying drawings in 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 of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0043] Cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and networks within a wide area network or a local area network to achieve data calculation, storage, processing, and sharing. Cloud technology is the general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool, be used on demand, and is flexible and convenient. Cloud computing technology will become an important support. The back-end services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites, and more portal websites. With the high development and application of the Internet industry, in the future, each item may have its own identification mark and needs to be transmitted to the back-end system for logical processing. Data at different levels will be processed separately, and various types of industry data require a powerful system back-end support, which can only be achieved through cloud computing.
[0044] Cloud computing is a computing model that distributes computing tasks on a resource pool composed of a large number of computing devices, enabling various application systems to obtain computing power, storage space, and information services as needed. The network that provides resources is called the "cloud". The resources in the "cloud" seem to be infinitely expandable to users, and can be obtained at any time, used on demand, expanded at any time, and paid according to usage. As a basic capability provider of cloud computing, a cloud computing resource pool (abbreviated as a cloud platform, generally called an IaaS (Infrastructure as a Service) platform) will be established, and various types of virtual resources will be deployed in the resource pool for external customers to choose and use. The cloud computing resource pool mainly includes: computing devices (virtual machines, including operating systems), storage devices, and network devices. In the cloud game scenario, the cloud game server can use cloud computing to render the cloud game scenario that the player is experiencing into an audio-video stream, and the audio-video stream can be transmitted to the terminal used by the player for playback.
[0045] Cloud Gaming, also known as Gaming on Demand, is an online game technology based on cloud computing technology. Cloud gaming technology enables thin client devices with relatively limited graphics processing and data computing capabilities to run high-quality games. In the cloud gaming scenario, the game does not run on the player's terminal, but on the cloud gaming server; the cloud gaming server renders the game scene into a video and audio stream and transmits the video and audio stream to the player's terminal through a communication network. The player's terminal does not need to have powerful graphics processing and data computing capabilities, but only needs to have basic streaming media playback capabilities and the ability to obtain the player's input instructions and send the player's input instructions to the cloud gaming server.
[0046] Please refer to Figure 1a , Figure 1a which is a schematic diagram of the architecture of a cloud gaming system provided by an embodiment of the present application. As Figure 1a shown, the cloud gaming system may include a cloud gaming server and a terminal cluster. The terminal cluster may include multiple terminals, and the embodiment of the present application does not limit the number of terminals included in the terminal cluster. Among them, as Figure 1a shown, the terminal cluster may specifically include: terminal a, terminal b,..., terminal n. In addition, there may be a communication connection between the terminal clusters. For example, there is a communication connection between terminal a and terminal b. At the same time, any terminal in the terminal cluster may have a communication connection with the cloud gaming server. For example, there is a communication connection between terminal a and the cloud gaming server, so that each terminal in the terminal cluster can perform data interaction with the cloud gaming server through this communication connection. Among them, the above communication connection does not limit the connection method, and can be directly or indirectly connected through a wired communication method, or can be directly or indirectly connected through a wireless communication method, or can also be connected through other methods, and the present application does not make any restrictions here.
[0047] It should be noted that the cloud gaming system includes P (a positive integer) cloud games (such as Figure 1a Cloud Game 1, Cloud Game 2, Cloud Game 3 in ), and the P cloud games can be provided by the same cloud game service provider. That is to say, the cloud gaming server can be the server used by the cloud game service provider that provides the P cloud games. The terminal cluster may include terminals that play one or more of the P cloud games.
[0048] In an embodiment of the present application, any one of the P cloud games is represented as a first cloud game. The cloud game server deploys (or pre-starts) one or more virtual devices for the first cloud game (such as virtual device 1, virtual device 2, virtual device 3, and virtual device 4 deployed for cloud game 1). Among them, the process of the cloud game server pre-starting virtual devices for the first cloud game may include: deploying virtual devices, installing a game image (a game installation package) of the first cloud game in the deployed virtual devices, pre-starting a game instance of the first cloud game in the virtual devices installed with the first cloud game, and so on. The game instance of the first cloud game refers to the first cloud game that can be actually operated.
[0049] A container is a lightweight virtualization solution in cloud games. A virtual device can be a container; for example, the Android operating system (a mobile operating system) can be packaged into a container image to obtain an Android container, and the Android container can be published to the cloud game server to act as an Android device. A board is hardware that actually carries an operating system. A board can virtualize one or more devices. A virtual device can also refer to a device virtualized by using a board configured by the cloud game server; for example, the cloud game server is configured with an Android board array (such as an ARM board array). Each Android board in the Android board array is hardware that actually carries the Android operating system. The cloud game server can virtualize multiple Android devices through the Android boards. In addition, the virtual device can also be a virtual machine in the cloud game server.
[0050] To better understand the technical solution provided by the embodiments of the present application, the implementation principle of cloud gaming will be introduced below using the first cloud game as an example. The implementation principle of cloud gaming generally includes: ① The terminal may include a game client of the first cloud game, and players can enter the first cloud game through the game client of the first cloud game to play. ② The cloud gaming server assigns a virtual device to each game client participating in the first cloud game; for example, assuming the first cloud game is Cloud Game 1, one or more pre-launched virtual devices for Cloud Game 1 include Virtual Device 1, Virtual Device 2, Virtual Device 3, and Virtual Device 4. The cloud gaming server will select an idle virtual device (such as Virtual Device 1) from Virtual Device 1, Virtual Device 2, Virtual Device 3, and Virtual Device 4 and assign it to the game client used by the player. At this time, the game instance of Cloud Game 1 in Virtual Device 1 corresponds to the game client used by the player, and the game instance of Cloud Game 1 in Virtual Device 1 provides the game interface of Cloud Game 1 for the game client used by the player. ③ The game client of the first cloud game displays the game interface returned by its corresponding virtual device; when the player performs various operations in the game interface, the game client of the first cloud game will report the operation data generated by these operations to the cloud gaming server. The cloud gaming server will refresh the game interface of the cloud game according to the operation data in the corresponding virtual device, and then return the refreshed game interface to the game client of the first cloud game for display. ④ When the first cloud game ends, the corresponding virtual device becomes idle again.
[0051] It can be seen that the method of pre-launching virtual devices can directly provide game services for players and reduce the game waiting time of players. However, if the number of pre-launched virtual devices is too large, it will cause resource waste; if the number of pre-launched virtual devices is too small, virtual devices need to be launched in real time, resulting in long waiting times for players.
[0052] The embodiments of the present application propose a processing solution for cloud gaming. In one implementation, this processing solution for cloud gaming can be executed by the Figure 1a cloud gaming server in. This processing solution for cloud gaming includes: obtaining the device information of P (a positive integer) cloud games in the cloud gaming system; the device information includes device deployment information and device usage information. Based on the device information of the P cloud games, perform scaling prediction quantization processing on the cloud gaming system to obtain a scaling strategy for the cloud gaming system. Among them, the scaling strategy of the cloud gaming system is used to indicate the target cloud games in the cloud gaming system that need to be scaled and the target scaling parameters (including target expansion parameters and target contraction parameters) required for scaling the target cloud games (including expansion processing and contraction processing). According to the scaling strategy of the cloud gaming system, perform scaling processing on the target cloud games in the cloud gaming system.
[0053] Among them, through the scaling prediction quantization process, it is possible to predict whether it is necessary to perform scaling-up processing on the cloud game at the current moment (such as increasing the number of virtual devices deployed for the cloud game) and the target scaling-up parameters required when performing the scaling-up processing; or it is possible to predict whether it is necessary to perform scaling-down processing on the cloud game at the current moment (such as reducing the number of virtual devices deployed for the cloud game) and the target scaling-down parameters required when performing the scaling-down processing; or it is possible to predict that there is no need to perform scaling processing on the cloud game at the current moment. It should be noted that, due to the large differences in the time-consuming of deploying (virtual) devices for different cloud games (for example, the cloud game with a larger game image takes longer to deploy devices, and the cloud game with a smaller game image takes shorter to deploy devices), in addition to considering the device utilization rate (device utilization rate = number of devices in use ÷ number of devices deployed), the scaling prediction quantization process also considers the time-consuming of deploying devices, which can avoid the situation where the scaling-up time is too late and the device deployment is not timely, resulting in a large number of players queuing, and avoid the situation where too much scaling-down occurs and devices cannot be deployed in time, resulting in a large number of players queuing. For the detailed implementation process, please refer to the following Figure 2 corresponding embodiments. It can be seen that in the embodiments of the present application, a reasonable scaling strategy is mainly formulated for the cloud game system through the scaling prediction quantization process, so as to dynamically adjust the number of virtual devices deployed for each cloud game in the cloud game system by using this scaling strategy, thereby improving the device utilization rate of each cloud game in the cloud game system and reducing the game access time of each cloud game in the cloud game system.
[0054] Please refer to Figure 1b , Figure 1b which is a schematic diagram of the architecture of another cloud game system provided by the embodiments of the present application. As Figure 1b shown, in addition to including a cloud game server and a terminal cluster, this cloud game system also includes a scheduling server. Any terminal in the terminal cluster can be in communication connection with the scheduling server, and the scheduling server can be in communication connection with the cloud game server. The scheduling server can be responsible for allocating the virtual devices in the idle state in the cloud game server to any terminal in the terminal cluster, so that players can enter the game client to play the cloud game. In another implementation manner, the processing solution of the cloud game proposed in the embodiments of the present application can be executed by the Figure 1b scheduling server in; schematically, the scheduling server can obtain the device information of P cloud games in the cloud game system, perform scaling prediction quantization processing on the cloud game system based on the device information of the P cloud games, obtain the scaling strategy of the cloud game system, and perform scaling processing on the target cloud game in the cloud game system according to the scaling strategy of the cloud game system.
[0055] In another embodiment, the processing solution of the cloud game proposed in the embodiments of the present application can be jointly executed by a scheduling server and a cloud game server. Schematically, the scheduling server can obtain the device information of P cloud games in the cloud game system, perform scaling prediction quantization processing on the cloud game system based on the device information of the P cloud games, and obtain a scaling policy for the cloud game system; based on the scaling policy of the cloud game system, send a scaling processing request to the cloud game server, where the scaling processing request includes the target cloud game in the cloud game system that needs to be scaled and the target scaling parameters required for scaling the target cloud game. The cloud game server can respond to the scaling processing request and perform scaling processing on the target cloud game according to the target scaling parameters required for scaling the target cloud game.
[0056] It should be noted that the cloud game server can be a distributed server cluster (including multiple servers), and the scheduling server can send respective scaling processing requests to one or more servers in the server cluster; for example, the server cluster includes Server 1, Server 2, Server 3, and Server 4, and the number of virtual devices that need to be expanded for the target cloud game is 100. Then, the scaling processing request sent by the scheduling server to Server 1 can be used to request Server 1 to expand 30 virtual devices for the target cloud game, the scaling processing request sent to Server 2 can be used to request Server 2 to expand 60 virtual devices for the target cloud game, and the scaling processing request sent to Server 3 can be used to request Server 3 to expand 10 virtual devices for the target cloud game. Since the total number of virtual devices expanded for the target cloud game reaches 100, the scaling processing request is not sent to Server 4.
[0057] It should be noted that the cloud game server and the scheduling server can be independent physical servers, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal can be: intelligent terminals such as smart phones, tablet computers, laptop computers, desktop computers, and smart TVs. Moreover, the terminal in the present application can also be an in-vehicle terminal, that is, the solution provided in the present application can also be applied to in-vehicle terminals.
[0058] It can be understood that Figure 1a and Figure 1b merely exemplarily represent the possible architectures of the technical solution of the present application and do not limit the specific architecture of the technical solution of the present application, that is, the technical solution of the present application can also provide other forms of architectures.
[0059] In the embodiments of the present application, the collection and processing of relevant data should be strictly in accordance with the requirements of relevant laws and regulations. Obtaining personal information requires the informed consent or agreement of the individual subject (or having a legal basis for obtaining information), and subsequent data use and processing behaviors should be carried out within the scope authorized by laws, regulations and the individual information subject. For example, when the embodiments of the present application are applied to specific products or technologies, such as obtaining the account information entered by the user to log in to cloud games, the permission or agreement of the user needs to be obtained, and the collection, use and processing of relevant data need to comply with the relevant laws, regulations and standards of the relevant region.
[0060] Please refer to Figure 2 , Figure 2 which is a schematic flow chart of a processing method for cloud games provided by the embodiments of the present application. This processing method for cloud games can be executed by a computer device, which can be the cloud game server in Figure 1a or can be the scheduling server in Figure 1b or can be a distributed device composed of the cloud game server and the scheduling server shown in Figure 1b ; This processing method for cloud games may include but is not limited to steps S201 - S203:
[0061] S201. Obtain the device information of P cloud games in the cloud game system; the device information includes device deployment information and device usage information, and P is a positive integer.
[0062] In the embodiments of the present application, any one of the P cloud games is represented as the first cloud game. The device information of the first cloud game includes the device deployment information of the first cloud game and the device usage information of the first cloud game. In one embodiment, obtaining the device information of P cloud games in the cloud game system includes obtaining the device deployment information of the first cloud game and the device usage information of the first cloud game.
[0063] Among them, the device usage information of the first cloud game includes at least one of the following:
[0064] (1) The device usage quantity of the first cloud game at time T₁.
[0065] Time T₁ refers to the current system time (or the current moment). The device usage quantity (gaming_cnt) refers to the number of virtual devices allocated; for example, if the cloud game server deploys 5 virtual devices for the first cloud game and 3 virtual devices are allocated, then the device usage quantity of the first cloud game at time T₁ is 3.
[0066] (2) The first change curve of the first cloud game.
[0067] The first change curve of the first cloud game is used to represent the change in the number of device usages of the first cloud game within the first time window (ref-window). That is to say, this first change curve is plotted based on the number of device usages of the first cloud game at each moment within the first time window. Please refer to Figure 3 , Figure 3 which is a schematic diagram of a first change curve provided by an embodiment of the present application; as Figure 3 shown, the first time window is from 22:02 to 22:59 today. The number of device usages of the first cloud game between 22:02 and 22:59 is plotted at 3-minute time intervals, thereby obtaining the first change curve.
[0068] The first time window (ref_window) is a historical time window that ends at moment T1; for example, if moment T1 is 5:00 today, the first time window can be from 4:30 to 5:00 today. In one embodiment, the peak concurrent users (PCU, that is, the maximum number of device usages) of the first cloud game can be obtained, and the duration of the first time window is determined according to the peak concurrent users of the first cloud game. Among them, there is an inverse correlation between the peak concurrent users of the first cloud game and the duration of the first time window. Optionally, if the peak concurrent users of the first cloud game are less than 500, the duration of the first time window is set to 60 minutes. If the peak concurrent users of the first cloud game are greater than or equal to 500 and less than 1000, the duration of the first time window is set to 30 minutes. If the peak concurrent users of the first cloud game are greater than or equal to 1000, the duration of the first time window is set to 10 minutes. This is because when the peak concurrent users of the first cloud game are fewer, the number of people playing the first cloud game is fewer, and the fluctuating change in the number of device usages of the first cloud game is greater, and the fluctuating change in the number of device usages of the first cloud game is more difficult to show regularity, so the duration of the first time window is longer. On the contrary, when the peak concurrent users of the first cloud game are more, the number of people playing the first cloud game is more, and the fluctuating change in the number of device usages of the first cloud game is smaller, so the fluctuating change in the number of device usages of the first cloud game is more likely to show regularity, and thus the duration of the first time window is shorter.
[0069] (3) The second change curve of the first cloud game.
[0070] The second change curve of the first cloud game is used to represent the change in the number of device usages of the first cloud game within the second time window. That is to say, this second change curve is drawn based on the number of device usages of the first cloud game at each moment within the second time window. The second time window is the time period to which the year-on-year reference moment T1' corresponding to moment T1 belongs. Schematically, taking one week (i.e., a week) as a time period, there is a weekly year-on-year relationship between moment T1 and the year-on-year reference moment T1'; for example, if moment T1 is 4:30 today (assuming today is Thursday), then the year-on-year reference moment T1' is 4:30 last Thursday. In the embodiments of the present application, taking one week (i.e., a week) as a time period, the time period to which the year-on-year reference moment T1' belongs refers to the previous time period of the current time period (i.e., the previous week corresponding to moment T1).
[0071] In one implementation, the moving average method can be used to perform moving average processing on the second change curve of the first cloud game to eliminate local fluctuations in the second change curve. Optionally, the duration of the sliding window used in the moving average method can be determined based on the maximum number of concurrent online users; for example, when the maximum number of concurrent online users is greater than or equal to 1100, the duration of the sliding window used in the moving average method is 10 minutes, and when the maximum number of concurrent online users is less than 1100, the duration of the sliding window used in the moving average method is: the maximum number of concurrent online users × (-0.036) + 50 minutes; moreover, the step size of the sliding window can be half of the duration of the sliding window, that is, each time it is translated backward by half of the size of the sliding window. Please refer to Figure 4 , Figure 4 is a schematic diagram of a moving average result provided by an embodiment of the present application; as Figure 4 shown, the curve obtained by performing moving average processing on the second change curve ( Figure 4 shows a partial second change curve) using the moving average method will be smoother.
[0072] Among them, the device deployment information of the first cloud game includes at least one of the following:
[0073] (1) The device deployment quantity of the first cloud game at moment T1.
[0074] The device deployment quantity (total_cnt) refers to the number of virtual devices that have been deployed; for example, if the cloud game server deploys 5 virtual devices for the first cloud game, then the device deployment quantity of the first cloud game at moment T1 is 5.
[0075] (2) The device concurrent deployment quantity of the first cloud game.
[0076] In the embodiments of the present application, the device concurrent deployment quantity represents the maximum number of virtual devices that can be deployed simultaneously.
[0077] (3) Time taken for single-device deployment of the first cloud game.
[0078] The time taken for single-device deployment represents the time required to deploy a virtual device. It should be noted that the time taken for single-device deployment is equal to the time required to perform a concurrent device deployment (i.e., deploy multiple virtual devices simultaneously).
[0079] In one embodiment, when the scaling prediction quantization period arrives, device information of P cloud games in the cloud game system is obtained and subsequent steps are performed. That is to say, the processing solution for cloud games proposed in the embodiments of the present application needs to be executed periodically. It can be understood that time T1 is the time corresponding to when the scaling prediction quantization period arrives, that is, the start time of a new scaling prediction quantization period.
[0080] S202. Perform scaling prediction quantization processing on the cloud game system based on the device information of P cloud games to obtain a scaling strategy for the cloud game system; the scaling strategy for the cloud game system is used to indicate the target cloud games in the cloud game system that need to be scaled and the target scaling parameters required for scaling the target cloud games.
[0081] As Figure 5 (which is a flowchart of a method for determining a scaling strategy provided by an embodiment of the present application) shown, performing scaling prediction quantization processing on the cloud game system based on the device information of P cloud games to obtain a scaling strategy for the cloud game system includes the following steps S501-504:
[0082] S501. Perform fitting processing on the first change curve of the first cloud game to obtain a fitting curve.
[0083] Specifically, perform exponential smoothing processing on the first change curve of the first cloud game using the exponential smoothing method (the damping coefficient used can be 0.7), and perform linear regression fitting processing on the curve obtained after the exponential smoothing processing using the linear regression fitting method to obtain a fitting curve (a straight line). For example, for Figure 3 the shown first change curve for fitting processing, the fitting result as shown in Figure 6 can be obtained.
[0084] This exponential smoothing method can be used to eliminate local fluctuations in the curve. This exponential smoothing method is a type of moving smoothing method, and its characteristic is to give different weights to past observations, that is, the weights of more recent observations are larger than the weights of more distant observations. Its basic idea is that the predicted value is the weighted sum of previous observations, and different weights are given to different data, with larger weights given to new data and smaller weights given to old data.
[0085] The linear regression fitting method is a method of fitting a curve through a linear equation and is a basic machine learning. So-called machine learning (ML) is an interdisciplinary subject involving multiple fields, including probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory, and other disciplines. It specifically studies how computers simulate or implement human learning behaviors to acquire new knowledge or skills and reorganize the existing knowledge structure to continuously improve their own performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent, and its applications cover all fields of artificial intelligence. Machine learning and deep learning usually include technologies such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and rote learning.
[0086] S502. Obtain the first slope of the fitting curve. The first slope is used to represent the change rate of the number of device usages of the first cloud game within the first time window. For example, if the first slope is 5, it can indicate that the number of device usages of the first cloud game increases by 5 per minute within the first time window; if the first slope is -5, it can indicate that the number of device usages of the first cloud game decreases by 5 per minute within the first time window.
[0087] S503. Based on the first slope, the number of device usages of the first cloud game at time T1, and the number of device deployments of the first cloud game at time T1, perform scaling prediction quantization processing on the first cloud game to obtain the initial scaling parameter of the first cloud game.
[0088] In one embodiment, detecting the state of the first cloud game at time T1 based on the first slope includes: if the first slope is greater than a preset value (such as 0), it indicates that the first cloud game is in a state of increasing device usage within the first time window (i.e., a state of increasing players). Since time T1 is the end time of the first time window, it can be determined that the first cloud game is in a state of increasing device usage at time T1. On the contrary, if the first slope is less than the preset value (such as 0), it can be determined that the first cloud game is in a state of decreasing device usage at time T1 (i.e., a state of decreasing players). In an optional implementation, if the first slope is equal to the preset value (such as 0), the preset value is determined as the initial scaling parameter of the first cloud game. It should be noted that when the initial scaling parameter of the first cloud game is the preset value, it means that no scaling processing is required for the first cloud game.
[0089] In one embodiment, detecting the state of the first cloud game at time T1 based on the first slope further includes: when the first cloud game is in a state of increasing device usage at time T1, detecting the magnitude relationship between the device deployment rate of the first cloud game and the growth rate of the number of device usages of the first cloud game.
[0090] Specifically, based on the first slope, the growth quantity of device usage of the first cloud game at time T2 is predicted. Time T2 is obtained by adding a preset duration to time T1. Optionally, the preset duration can be equal to the duration of the first time window or can be set to any duration. As Figure 7 (which is a schematic diagram of a scaling analysis scenario provided by an embodiment of the present application) shows that the growth quantity of device usage of the first cloud game at time T2, Δgaming_cnt1 = the device usage quantity of the first cloud game at time T2, gaming_cnt(T2) - the device usage quantity of the first cloud game at time T1, gaming_cnt(T1). That is to say, the growth quantity of device usage of the first cloud game at time T2 is the growth quantity of device usage of the first cloud game within the preset duration. Therefore, the growth quantity of device usage of the first cloud game at time T2, Δgaming_cnt1, can be obtained through the following formula (1).
[0091] Δgaming_cnt1 = lr_recent_used_cnt_delta × pred_window (1)
[0092] Wherein, lr_recent_used_cnt_delta represents the first slope, and pred_window represents the preset duration.
[0093] Calculate the first device expansion time required for deploying (virtual) devices according to the growth quantity of device usage of the first cloud game at time T2. Among them, the first device expansion time, Δt1, can be obtained through the following formula (2).
[0094] Δt1 = Δgaming_cnt1 ÷ max_concurrent × time_cost_of_deploy_one (2)
[0095] Wherein, max_concurrent represents the device concurrent deployment quantity of the first cloud game, and time_cost_of_deploy_one represents the deployment time of a single device of the first cloud game. That is to say, first determine the execution times of device concurrent deployment through the growth quantity of device usage of the first cloud game at time T2 and the device concurrent deployment quantity of the first cloud game, and then multiply the execution times of device concurrent deployment by the deployment time of a single device of the first cloud game to obtain the first device expansion time.
[0096] If the time taken for the first device to expand is less than or equal to the preset duration, it indicates that within the preset duration, virtual devices can be deployed according to the increased number of device usages Δgaming_cnt1. The increased number of device usages Δgaming_cnt1 is actually the increased number of device usages of the first cloud game within the preset duration. Therefore, it can be determined that the device deployment rate of the first cloud game is greater than or equal to the growth rate of the number of device usages of the first cloud game; conversely, if the time taken for the first device to expand is greater than the preset duration, it is determined that the device deployment rate of the first cloud game is less than the growth rate of the number of device usages of the first cloud game.
[0097] It should be noted that when the device deployment rate of the first cloud game is greater than or equal to the growth rate of the number of device usages of the first cloud game, it indicates that the device deployment speed is greater than or equal to the player growth speed. At this time, the time taken for the first cloud game to deploy devices can be ignored; when the device deployment rate of the first cloud game is less than the growth rate of the number of device usages of the first cloud game, it indicates that the device deployment speed is less than the player growth speed, and the time taken for the first cloud game to deploy devices needs to be considered.
[0098] The following takes the state of the first cloud game at time T1 as an example to discuss in different cases how to perform prediction quantization processing on the first cloud game for scaling:
[0099] (1) The first cloud game is in a state of increasing device usages at time T1, and the device deployment rate of the first cloud game is greater than or equal to the growth rate of the number of device usages of the first cloud game.
[0100] In one embodiment, if the first cloud game is in a state of increasing device usages at time T1, and the device deployment rate of the first cloud game is greater than or equal to the growth rate of the number of device usages of the first cloud game, then a fixed-window prediction quantization method is used to perform prediction quantization processing on the first cloud game to obtain the initial scaling parameters of the first cloud game.
[0101] Specifically, the increased number of device usages of the first cloud game at time T2, the number of device usages of the first cloud game at time T1, and the number of device deployments of the first cloud game at time T1 can be used to predict the device utilization rate of the first cloud game at time T2; among them, the device utilization rate utilization1 of the first cloud game at time T2 can be obtained through the following formula (3).
[0102] utilization1 = (Δgaming_cnt1 + gaming_cnt(T1)) ÷ total_cnt(T1) (3)
[0103] Among them, gaming_cnt(T1) represents the number of device usages of the first cloud game at time T1, total_cnt(T1) represents the number of device deployments of the first cloud game at time T1, and Δgaming_cnt1 represents the growth in the number of device usages of the first cloud game at time T2.
[0104] When the device utilization rate of the first cloud game at time T2 is greater than or equal to the device utilization rate threshold, it indicates that there are relatively few idle virtual devices for the first cloud game at time T2. However, since the time taken to deploy devices for the first cloud game does not need to be considered, virtual devices can be deployed starting from time T2. For example, as Figure 7 shown, the number of device deployments (total_cnt) of the first cloud game starts to increase from time T2 and remains unchanged before time T2. Therefore, when the device utilization rate of the first cloud game at time T2 is greater than or equal to the device utilization rate threshold, a preset value (such as 0) can be set as the initial scaling parameter of the first cloud game. It should be noted that if the duration of the scaling prediction quantization period is greater than the preset duration, by the time the next scaling prediction quantization period arrives, the time T2 when the first cloud game should be scaled out has already passed. Therefore, the duration of the scaling prediction quantization period can be equal to the preset duration. When the device utilization rate of the first cloud game at time T2 is less than the device utilization rate threshold (and at this time, the device utilization rate of the first cloud game at time T1 is also less than the device utilization rate threshold), it indicates that there are relatively many idle virtual devices for the first cloud game at time T1. The scaling prediction quantization method can be used to perform scaling prediction quantization processing on the first cloud game to obtain the initial scaling parameter of the first cloud game.
[0105] Among them, the initial scaling parameter includes the initial scaling-down parameter; in one implementation, the scaling prediction quantization method is used to perform scaling prediction quantization processing on the first cloud game to obtain the initial scaling parameter of the first cloud game, including: determining the auxiliary number of device deployments when the device utilization rate of the first cloud game is equal to the device utilization rate threshold based on the number of device usages of the first cloud game at time T1; among them, the auxiliary number of device deployments total_cnt1 can be obtained through the following formula (4).
[0106] total_cnt1 = gaming_cnt(T1) ÷ expected_utilization (4)
[0107] Among them, expected_utilization represents the device utilization rate threshold.
[0108] The difference between the number of devices assisted in deployment and the number of devices deployed for the first cloud game at time T1 (i.e., the number of devices assisted in deployment total_cnt1 - the number of devices deployed for the first cloud game at time T1 total_cnt(T1)) can be determined as the initial scaling-down parameter of the first cloud game. For example, if the number of devices used for the first cloud game at time T1 is 50, the device utilization threshold is 0.8, and the number of devices deployed for the first cloud game at time T1 is 80, then the initial scaling-down parameter of the first cloud game is 50÷0.8 - 80≈ - 18 (indicating that 18 deployed virtual devices need to be reduced).
[0109] (2) The first cloud game is in a state of increasing device usage at time T1, and the device deployment rate of the first cloud game is less than the growth rate of the device usage of the first cloud game.
[0110] In one embodiment, if the first cloud game is in a state of increasing device usage at time T1, and the device deployment rate of the first cloud game is less than the growth rate of the device usage of the first cloud game, then the traversal prediction quantization method is used to perform scaling prediction quantization processing on the first cloud game to obtain the initial scaling parameter of the first cloud game.
[0111] Specifically, based on the first slope, predict the device utilization of the first cloud game at time T3, and based on the second change curve, predict the device utilization of the first cloud game at time T4; both time T3 and time T4 are after time T1. Among them, the device utilization utilization2 of the first cloud game at time T3 can be obtained through the following formula (5).
[0112] utilization2=((T3 - T1)×lr_recent_used_cnt_delta + gaming_cnt(T1))÷
[0113] total_cnt(T1)(5)
[0114] In one implementation, predicting the device utilization of the first cloud game at time T4 based on the second change curve includes: determining the year-on-year reference time T4' of time T4, and time T4 and the year-on-year reference time T4' have a weekly year-on-year relationship; for example, if time T4 is 5:00 on the current day (assumed to be Thursday), then the year-on-year reference time T4' of time T4 is 5:00 on last Thursday. The device usage corresponding to the year-on-year reference time T4' can be determined from the second change curve, and then the device utilization utilization3 of the first cloud game at time T4 can be obtained through the following formula (6).
[0115] utilization3=gaming_cnt(T4')÷total_cnt(T1) (6)
[0116] Among them, gaming_cnt(T4') represents the number of device usages corresponding to the year-on-year reference time T4'. It can be seen that in the embodiment of the present application, the number of device usages gaming_cnt(T4') corresponding to the year-on-year reference time T4' is used as the predicted number of device usages of the first cloud game at time T4.
[0117] If the device utilization rates of the first cloud game at time T3 and at time T4 are both greater than or equal to the device utilization rate threshold, then a reference time is selected from time T3 and time T4; illustratively, the reference time can refer to the earlier-arriving time among time T3 and time T4. In other words, in the embodiment of the present application, on the one hand, based on the first slope, the time when the device utilization rate of the first cloud game exceeds the device utilization rate threshold is predicted backward from time T1 (i.e., time T3), and on the other hand, based on the second change curve, the time when the device utilization rate of the first cloud game exceeds the device utilization rate threshold is predicted backward from time T1 (i.e., time T4), and then the earlier-arriving time among time T3 and time T4 is taken as the reference time when the device utilization rate of the first cloud game exceeds the device utilization rate threshold. For example, as Figure 8 (which is a schematic diagram of another scaling analysis scenario provided by the embodiment of the present application) shows, the daily gaming_cnt is the number of device usages of the first cloud game at each time after time T1 predicted based on the first slope; the year-on-year gaming_cnt is the number of device usages of the first cloud game at each time after time T1 predicted based on the second change curve, that is, the number of device usages of the first cloud game at each time after time T1 is the number of device usages of the first cloud game corresponding to the year-on-year reference time at that time. For example, if the number of device usages of the first cloud game at the year-on-year reference time T4' is 100, then the number of device usages of the first cloud game predicted based on the second change curve at time T4 is also 100. As Figure 8 shown in Figure A in, since time T3 exceeds the device utilization rate threshold earlier than time T4, time T3 can be determined as the reference time. As Figure 8 shown in Figure B in, time T4 exceeds the device utilization rate threshold earlier than time T3, so time T4 can be determined as the reference time.
[0118] Furthermore, it is necessary to predict the device deployment quantity of the first cloud game at the reference time (denoted as time E) and the device deployment quantity of the first cloud game at time T5 based on the second change curve and the device utilization rate threshold. Time T5 is obtained by adding a preset duration to the reference time (i.e., time T5 = time E + preset duration pred_window).
[0119] Among them, the device deployment quantity total_cnt(E) of the first cloud game at the reference time can be obtained by the following formula (7).
[0120] total_cnt(E) = gaming_cnt(E') ÷ expected_utilization (7)
[0121] Among them, gaming_cnt(E') represents the number of device usages of the first cloud game at the year-on-year reference time E'. The year-on-year reference time E' and the reference time have a weekly year-on-year relationship. The number of device usages of the first cloud game at the year-on-year reference time E' is determined based on the second change curve.
[0122] The device deployment quantity total_cnt(T5) of the first cloud game at time T5 can be obtained through the following formula (8).
[0123] total_cnt(T5) = gaming_cnt(T5') ÷ expected_utilization (8)
[0124] Among them, gaming_cnt(T5') represents the number of device usages of the first cloud game at the year-on-year reference time T5'. The year-on-year reference time T5' and time T5 have a weekly year-on-year relationship. The number of device usages of the first cloud game at the year-on-year reference time T5' is determined based on the second change curve.
[0125] Calculate the difference between the device deployment quantity of the first cloud game at time T5 and the device deployment quantity of the first cloud game at the reference time, and determine the calculated difference as the quantity of devices to be expanded, that is, the quantity of devices to be expanded Δtotal_cnt1 = the device deployment quantity total_cnt(T5) of the first cloud game at time T5 - the device deployment quantity total_cnt(E) of the first cloud game at the reference time. Calculate the second device expansion time required to deploy (virtual) devices according to the quantity of devices to be expanded; among them, the second device expansion time Δt2 can be obtained through the following formula (9).
[0126] Δt2 = Δtotal_cnt1 ÷ max_concurrent × time_cost_of_deploy_one (9)
[0127] Since the device deployment speed is less than the player growth speed, if virtual devices are pre-pulled starting from the reference time, it is impossible to deploy the virtual devices with the quantity of devices to be expanded Δtotal_cnt1 before reaching time T5. Therefore, the time SU (time T5 - the second device expansion time Δt2) is taken as the time when the first cloud game should be expanded. For example, as Figure 9(As shown in the schematic diagram of another scaling analysis scenario provided by the embodiments of the present application), starting to pre-pull the device from time SU, the virtual devices with the number of devices to be expanded Δtotal_cnt1 can be deployed by the time T5.
[0128] If time SU <= time T1 + preset duration pred_window, for example, as Figure 10 (As shown in Figure A of the schematic diagram of another scaling analysis scenario provided by the embodiments of the present application), in order to perform the expansion process in a timely manner within the current scaling prediction quantization period, the number of devices to be expanded can be set as the initial expansion parameter (a kind of initial scaling parameter) of the first cloud game.
[0129] It should be noted that time SU = time T5 - the expansion time of the second device, time T5 = reference time + preset duration pred_window, then time SU > time T1 + preset duration pred_window, that is, reference time - time T1 > the expansion time of the second device. Therefore, if it is determined that the time distance between time T1 and the reference time is greater than the expansion time of the second device, then it is determined that time SU > time T1 + preset duration pred_window. If it is determined that the time distance between time T1 and the reference time is less than or equal to the expansion time of the second device, then it is determined that time SU <= time T1 + preset duration pred_window.
[0130] If time SU > time T1 + preset duration pred_window, for example Figure 10 as shown in Figure B, it indicates that no expansion process needs to be performed between time T1 and time T2. At this time, if the device utilization rate of the first cloud game at time T1 is greater than or equal to the device utilization rate threshold, then the preset value is determined as the initial scaling parameter of the first cloud game. Among them, the device utilization rate of the first cloud game at time T1 = the number of devices used by the first cloud game at time T1 ÷ the number of devices deployed by the first cloud game at time T1. If the device utilization rate of the first cloud game at time T1 is less than the device utilization rate threshold, then calculate the maximum number of devices that can be scaled down between time T1 and time T2, and set the maximum number of devices that can be scaled down as the initial scaling-down parameter (a kind of initial scaling parameter) of the first cloud game. Specifically, the maximum number of devices that can be scaled down Δtotal_cnt2 can be obtained by the following formula (10).
[0131] T5 - T2 = (Δtotal_cnt2 + total_cnt(T5) - total_cnt(T1)) ÷ max_concurrent ×
[0132] time_cost_of_deploy_one(10)
[0133] That is to say, as Figure 11 (which is a schematic diagram of another scenario for capacity scaling analysis provided by the embodiments of the present application), the moment SU when the first cloud game should be scaled out is advanced to moment T2, and the maximum number of devices that can be scaled in from moment T2 to moment T5 is used to obtain the maximum number of devices that can be scaled out Δtotal_cnt2 from moment T1 to moment T2. In this way, when the next capacity scaling prediction quantization period arrives, the first cloud game needs to immediately perform a scaling out process.
[0134] (3) The first cloud game is in a state where the number of devices in use is decreasing at moment T1.
[0135] During the period when the number of players decreases, since the first slope is negative at this time, if the trend of the number of devices in use of the first cloud game is predicted based on the first slope, then the number of devices in use of the first cloud game will be 0. However, this is not the actual situation. For example, the number of devices in use will increase after dropping to a certain minimum value. For example, the number of players will increase at 4:00 am, 12:30 pm, and 18:30 pm. Although the number and moments of the troughs of different cloud games are different, the difference for the same cloud game is not too large. Therefore, the second change curve (which is the change curve of the number of devices in use of the first cloud game in the previous time period) of the first cloud game is used as the change curve of the number of devices in use of the first cloud game in the current time period, with reference to the target trough closest to moment T1, to avoid the situation where too many devices are scaled out and devices cannot be deployed in time, resulting in a large number of players queuing.
[0136] Specifically, the reference trough closest to the year-on-year reference moment T1' is determined from the second change curve, and the year-on-year reference moment M' corresponding to the reference trough is obtained. Based on this year-on-year reference moment M', the moment M corresponding to the predicted target trough closest to moment T1 can be determined. The year-on-year reference moment M' and moment M have a weekly year-on-year relationship; for example, if the year-on-year reference moment M' is 4:40 last Thursday, then the moment M corresponding to the target trough closest to moment T1 is 4:40 this Thursday.
[0137] The distance relationship between moment T1 and moment M includes: ① Moment T1 is far from moment M. ② Moment T1 is close to moment M. ③ Moment M is within [moment T1, moment T2]. ④ Moment T1 crosses moment M (i.e., moment M < moment T1).
[0138] ① The distance relationship between moment T1 and moment M satisfies a preset condition.
[0139] Please refer to Figure 12 , Figure 12It is a schematic diagram of another scaling analysis scenario provided by the embodiments of the present application. The device usage quantity gaming_cnt(M') corresponding to the year-on-year reference time M' can be determined from the second change curve, and then through the formula: the device deployment quantity total_cnt(M) of the first cloud game at time M = the device usage quantity gaming_cnt(M') corresponding to the year-on-year reference time M' ÷ the device utilization threshold expected_utilization, the device deployment quantity of the first cloud game at time M can be obtained. The time T6 is obtained by adding a preset duration to the time M, that is, time T6 = time M + preset duration pred_window. The year-on-year reference time T6' has a weekly year-on-year relationship with the time T6; for example, if the year-on-year reference time T6' is 5:00 last Thursday, then the time T6 is 5:00 this Thursday. The device usage quantity gaming_cnt(T6') corresponding to the year-on-year reference time T6' can be determined from the second change curve, and then through the formula: the device deployment quantity total_cnt(T6) of the first cloud game at time T6 = the device usage quantity gaming_cnt(T6') corresponding to the year-on-year reference time T6' ÷ the device utilization threshold expected_utilization, the device deployment quantity of the first cloud game at time T6 can be obtained. Then, the number of devices △total_cnt3 that can be expanded for the first cloud game from time M to time T6 = the device deployment quantity total_cnt(T6) of the first cloud game at time T6 - the device deployment quantity total_cnt(M) of the first cloud game at time M, and determine the third device expansion time required to deploy devices according to the number of devices △total_cnt3. Among them, the third device expansion time Δt3 can be obtained by using the following formula (11).
[0140] Δt3 = △total_cnt3 ÷ max_concurrent × time_cost_of_deploy_one (11)
[0141] Among them, △total_cnt3 represents the number of devices that can be expanded for the first cloud game from time M to time T6.
[0142] At this time, the moment SA when the first cloud game should be expanded is SA = moment T6 - the expansion time Δt3 of the third device. When moment SA > moment T2, it is determined that moment T1 is far from moment M. Since the scaling processing at moment T1 is likely not to affect the device utilization rate at moment T6 at this time, because there is enough time for expansion to ensure that the device utilization rate at moment T6 does not exceed the device utilization rate threshold (exceeding the device utilization rate threshold indicates that fewer devices are deployed), it is only necessary to ensure that the device utilization rate threshold of the first cloud game at moment T1 is not lower than the device utilization rate threshold, that is, if the device utilization rate of the first cloud game at moment T1 is lower than the device utilization rate threshold, a scaling-down requirement is triggered.
[0143] In an implementation, when the distance relationship between moment T1 and moment M is such that moment T1 is far from moment M, it is determined that the distance relationship between moment T1 and moment M satisfies a preset condition. Further, when the device utilization rate of the first cloud game at moment T1 is greater than or equal to the device utilization rate threshold, a preset value is set as the initial scaling parameter of the first cloud game. When the device utilization rate of the first cloud game at moment T1 is less than the device utilization rate threshold, a scaling prediction quantization method is used to perform scaling prediction quantization processing on the first cloud game to obtain the initial scaling parameter of the first cloud game.
[0144] Among them, the initial scaling parameter includes an initial scaling-down parameter. In an implementation, a scaling prediction quantization method is used to perform scaling prediction quantization processing on the first cloud game to obtain the initial scaling parameter of the first cloud game, including: based on the number of devices used by the first cloud game at moment T1, determining the auxiliary number of device deployments when the device utilization rate of the first cloud game is equal to the device utilization rate threshold. The difference between the auxiliary number of device deployments and the number of device deployments of the first cloud game at moment T1 can be determined as the initial scaling-down parameter of the first cloud game.
[0145] ② The distance relationship between moment T1 and moment M does not satisfy the preset condition.
[0146] Please refer to Figure 13 , Figure 13 which is a schematic diagram of another scaling analysis scenario provided by the embodiments of the present application. As shown in Figure A in Figure 13 , when moment SA <= moment T2 and moment M > moment T2, it is determined that moment T1 is close to moment M; when moment T1 is close to moment M, it is determined that the distance relationship between moment T1 and moment M does not satisfy the preset condition. As shown in Figure B in Figure 13 , when moment M is within [moment T1, moment T2], it is determined that the distance relationship between moment T1 and moment M does not satisfy the preset condition. As shown in Figure C in Figure 13 , when moment M < moment T1, it is determined that the distance relationship between moment T1 and moment M does not satisfy the preset condition.
[0147] In one embodiment, if the distance relationship between time T1 and time M does not meet the preset condition, a comparison prediction quantization method is used to perform scaling prediction quantization processing on the first cloud game to obtain the initial scaling parameters of the first cloud game.
[0148] Specifically, based on the second change curve and the device utilization threshold, predict the number of devices deployed by the first cloud game at time T6; that is, the number of devices deployed by the first cloud game at time T6, total_cnt(T6) = the number of devices used corresponding to the year-on-year reference time T6', gaming_cnt(T6') ÷ the device utilization threshold expected_utilization. When the number of devices deployed by the first cloud game at time T6 is equal to the number of devices deployed by the first cloud game at time T1, the preset value is determined as the initial scaling parameter of the first cloud game. When the number of devices deployed by the first cloud game at time T6 is greater than the number of devices deployed by the first cloud game at time T1, it indicates that scaling up processing is required, and the difference between the number of devices deployed by the first cloud game at time T6 and the number of devices deployed by the first cloud game at time T1 is set as the initial scaling-up parameter (an initial scaling parameter) of the first cloud game; for example, if the number of devices deployed by the first cloud game at time T6 is 100 and the number of devices deployed by the first cloud game at time T1 is 80, then the initial scaling-up parameter of the first cloud game is 20. When the number of devices deployed by the first cloud game at time T6 is less than the number of devices deployed by the first cloud game at time T1, it indicates that scaling down processing is required, and the difference between the number of devices deployed by the first cloud game at time T6 and the number of devices deployed by the first cloud game at time T1 is set as the initial scaling-down parameter (an initial scaling parameter) of the first cloud game; for example, if the number of devices deployed by the first cloud game at time T6 is 50 and the number of devices deployed by the first cloud game at time T1 is 100, then the initial scaling-down parameter of the first cloud game is -50.
[0149] In an optional implementation, the number of devices deployed by the first cloud game at the year-on-year reference time M', total_cnt(M') = the number of devices used corresponding to the year-on-year reference time M', gaming_cnt(M') ÷ the device utilization threshold expected_utilization. The number of devices deployed by the first cloud game needs to be greater than or equal to the number of devices deployed total_cnt(M'), that is, when performing scaling down processing on the first cloud game, the number of devices deployed by the first cloud game can be scaled down to at most the number of devices deployed total_cnt(M').
[0150] It should be noted that when the number of device deployments of the first cloud game at time T6 is greater than the number of device deployments of the first cloud game at time T1, it is possible that the number of device deployments of the first cloud game at time T1 is less than the total number of device deployments total_cnt(M'). Although every effort has been made to avoid this situation during scheduling, if this occurs, even if the expansion is not timely, the expansion process must be immediately executed.
[0151] S504. If the initial scaling parameter of the first cloud game is not a preset value, determine that the first cloud game is the target cloud game in the cloud game system that needs to be scaled, and determine the initial scaling parameter of the first cloud game as the target scaling parameter required for scaling the first cloud game.
[0152] If the initial scaling parameter of the first cloud game is a preset value, the initial scaling parameter indicates that there is no need to scale the first cloud game. If the initial scaling parameter of the first cloud game is not a preset value, determine that the first cloud game is the target cloud game in the cloud game system that needs to be scaled, and determine the initial scaling parameter of the first cloud game as the target scaling parameter required for scaling the first cloud game.
[0153] Among them, the initial scaling parameter can be an initial expansion parameter or an initial contraction parameter in addition to being a preset value. The initial expansion parameter is a parameter indicating the expansion process, and the initial contraction parameter is a parameter indicating the contraction process. To facilitate the distinction between the initial expansion parameter and the initial contraction parameter, the initial expansion parameter can be a value with a first symbol (i.e., +), and the initial contraction parameter can be a value with a second symbol (i.e., -). Accordingly, the target scaling parameter includes a target expansion parameter determined based on the initial expansion parameter and a target contraction parameter determined based on the initial contraction parameter.
[0154] S203. According to the scaling strategy of the cloud game system, perform scaling on the target cloud game in the cloud game system.
[0155] In one embodiment, the target cloud game may include Q (a positive integer) second cloud games that need to be expanded. Then, performing scaling on the target cloud game in the cloud game system according to the scaling strategy of the cloud game system includes: obtaining the expansion priorities of each of the Q second cloud games; in the order from high to low expansion priority, allocating expansion resources to the Q second cloud games based on the target scaling parameters of each of the Q second cloud games. Perform expansion processing on each of the second cloud games based on the expansion resources allocated to each second cloud game.
[0156] Among them, the expanded resources include one or more of containers, boards, and virtual machines. Taking the expanded resource as a board as an example for illustration. Suppose a board can virtualize at most 2 virtual devices, Q second cloud games include Cloud Game 1, Cloud Game 2, and Cloud Game 3, the expansion priorities of Cloud Game 1 and Cloud Game 2 (which can be expressed as 1) are both higher than the expansion priority of Cloud Game 3 (which can be expressed as 0), the target scaling parameter of Cloud Game 1 is +10, the target scaling parameter of Cloud Game 2 is +1, and the target scaling parameter of Cloud Game 3 is +4. If the number of boards to be allocated is 10, then the number of boards allocated to Cloud Game 1 is 5, the number of boards allocated to Cloud Game 2 is 1, and the number of boards allocated to Cloud Game 3 is 2. If the number of boards to be allocated is 6, then the number of boards allocated to Cloud Game 1 is 5, the number of boards allocated to Cloud Game 2 is 1, and the number of boards allocated to Cloud Game 3 is 0. That is to say, when the expanded resources to be allocated are greater than or equal to the device resources required for the expansion processing of Q second cloud games, each second cloud game can be allocated the device resources required as indicated by its target scaling parameter; when the expanded resources to be allocated are less than the device resources required for the expansion processing of Q second cloud games, since the expanded resources are allocated in the order of decreasing expansion priority, the lower the expansion priority of the second cloud game, the more likely the expanded resources allocated to it will be less than the device resources required as indicated by its target scaling parameter.
[0157] Optionally, allocating expanded resources to Q second cloud games based on their respective target scaling parameters in the order of decreasing expansion priority includes: if the expanded resources to be allocated are less than the device resources required for the expansion processing of Q second cloud games, then obtain the service attributes of each second cloud game at time T1, and the service attributes include at least one of the following: the number of devices used at time T1 and the number of queuing players at time T1 (which can be determined based on the number of game clients waiting to enter the game due to not being allocated virtual devices). Weight each second cloud game according to the service attributes to obtain a weighted result, and the weighted result includes the weight value of each second cloud game. Among them, there is a positive correlation between the number of devices used by each second cloud game at time T1 and its weight value, and there is also a positive correlation between the number of queuing players of each second cloud game at time T1 and its weight value. Allocate expanded resources to Q second cloud games based on the weighted result and the order of decreasing expansion priority, based on their respective target scaling parameters.
[0158] For example, assume that a board card can virtualize at most 2 virtual devices, and there are Q second cloud games including Cloud Game 1, Cloud Game 2, and Cloud Game 3. The target scaling parameter of Cloud Game 1 is +10, the target scaling parameter of Cloud Game 2 is +4, and the target scaling parameter of Cloud Game 2 is +6. If the number of board cards to be allocated is 8, and the scaling priority of Cloud Game 1 is higher than that of Cloud Game 2, and the scaling priority of Cloud Game 2 is equal to that of Cloud Game 3, then the number of board cards allocated to Cloud Game 1 is 5, and the remaining number of board cards to be allocated (i.e., 3) needs to be allocated according to the weights of Cloud Game 1 and Cloud Game 2. For example, the weight of Cloud Game 1 is 5, and the weight of Cloud Game 2 is 1, then the number of board cards allocated to Cloud Game 2 can be 2, and the number of board cards allocated to Cloud Game 3 can be 1. That is to say, when the scaling resources to be allocated are less than the device resources required for the Q second cloud games to perform scaling processing, the second cloud games with higher scaling priorities will be satisfied first. For multiple second cloud games with the same scaling priority, the remaining scaling resources to be allocated will be allocated according to their weights. Among them, the greater the weight, the more scaling resources can be allocated, and the smaller the weight, the fewer scaling resources can be allocated.
[0159] In one embodiment, if there are N (a positive integer) third cloud games that need to be scaled down in the target cloud game, then according to the scaling strategy of the cloud game system, the scaling processing of the target cloud game in the cloud game system includes: setting the scaling resources to be recycled for the N third cloud games based on the target scaling parameters of the N third cloud games in descending order of scaling priority; and performing scaling processing on each third cloud game based on the scaling resources set for each third cloud game. Among them, the scaling resources include one or more of board cards, containers, and virtual machines. The scaling resources to be recycled set for each third cloud game can be the device resources to be recycled indicated by the target scaling parameter of the corresponding third cloud game. For example, if the scaling resource is a board card, and a board card can virtualize at most 2 virtual devices, and the N third cloud games include Cloud Game 1, Cloud Game 2, and Cloud Game 3, and the target scaling parameter of Cloud Game 1 is -10, the target scaling parameter of Cloud Game 2 is -4, and the target scaling parameter of Cloud Game 2 is -6, then the number of board cards to be recycled set for Cloud Game 1 is 5, the number of board cards to be recycled set for Cloud Game 2 is 2, and the number of board cards to be recycled set for Cloud Game 3 is 3.
[0160] In addition, the embodiment of the present application proposes a scaling quota allocation rule for dynamic scheduling based on device migration between cloud games, that is, the expansion of one cloud game requires the contraction of other cloud games, and the contraction of cloud games is required to meet the needs of the cloud game that needs to be expanded. Taking the target cloud game that includes Q second cloud games that need to be expanded and N third cloud games that need to be contracted as an example for illustration, both Q and N are positive integers. At this time, according to the scaling strategy of the cloud game system, the scaling process of the target cloud game in the cloud game system is as follows: according to the respective target scaling parameters of the N third cloud games and the respective target scaling parameters of the Q second cloud games, the N third cloud games are scaled based on the respective contraction priorities of the N third cloud games, and the contracted resources recovered after the scaling process are obtained. Specifically, based on the respective target scaling parameters of the Q second cloud games, the device resources required for the expansion process of the Q second cloud games can be determined. For example, the device resource is a board card, and a board card can virtualize at most 2 virtual devices. The Q second cloud games include Cloud Game 1, Cloud Game 2, and Cloud Game 3. The target scaling parameter of Cloud Game 1 is +10, the target scaling parameter of Cloud Game 2 is +4, and the target scaling parameter of Cloud Game 2 is +6. Then the number of board cards required for the expansion process of the Q second cloud games is 10. In addition, based on the respective target scaling parameters of the N third cloud games, the device resources recovered by the contraction process of the N third cloud games can be determined. For example, the device resource is a board card, and a board card can virtualize at most 2 virtual devices. The N third cloud games include Cloud Game 4, Cloud Game 5, and Cloud Game 6. The target scaling parameter of Cloud Game 4 is -10, the target scaling parameter of Cloud Game 5 is -4, and the target scaling parameter of Cloud Game 6 is -6. Then the number of board cards recovered by the contraction process of the N third cloud games is 10. If the device resources required for the expansion process of the Q second cloud games are greater than or equal to the device resources recovered by the contraction process of the N third cloud games, it means that the contracted resources to be recovered set for each second cloud game are the device resources indicated by its target scaling parameter, and each second cloud game needs to be scaled according to the device resources indicated by its target scaling parameter. If the device resources required for the expansion process of the Q second cloud games are less than the device resources recovered by the contraction process of the N third cloud games, in order to avoid having extra idle devices after contraction, it is necessary to scale the N third cloud games based on the respective target scaling parameters of the N third cloud games and the device resources required for the expansion process of the Q second cloud games, based on the respective contraction priorities of the N third cloud games.For example, the device resources required for expanding Q second cloud games are 5 boards, and each board can virtualize at most 2 virtual devices. N third cloud games include Cloud Game 1 and Cloud Game 2. The target scaling parameter of Cloud Game 1 is -8, and the target scaling parameter of Cloud Game 2 is -6. The scaling priority of Cloud Game 1 is higher than that of Cloud Game 2. Then, the number of boards recovered from the scaling process of Cloud Game 1 is 4, and the number of boards recovered from the scaling process of Cloud Game 2 is 1. Further, the recovered scaling resources are used as the expandable resources to be allocated and are allocated to Q second cloud games based on the target scaling parameters and expansion priorities of each of the Q second cloud games. Based on the expandable resources allocated to each second cloud game, each second cloud game is expanded. It can be understood that when the expandable resources to be allocated are greater than or equal to the device resources required for expanding Q second cloud games, each second cloud game can be allocated the device resources required as indicated by its target scaling parameter; when the expandable resources to be allocated are less than the device resources required for expanding Q second cloud games, the expandable resources will be allocated in the order of decreasing expansion priority. Therefore, the lower the expansion priority of the second cloud game, the more likely the expandable resources allocated to it will be less than the device resources required as indicated by its target scaling parameter. In addition, when the expandable resources to be allocated are less than the device resources required for expanding Q second cloud games, the second cloud games with higher expansion priorities will be satisfied first. For multiple second cloud games with the same expansion priority, the remaining expandable resources to be allocated will be allocated according to their weights. Among them, the larger the weight, the more expandable resources can be allocated, and the smaller the weight, the fewer expandable resources can be allocated.
[0161] Thus, it can be seen that in the embodiment of the present application, for a certain cloud game, when it is in a state of increasing device usage, based on the size relationship between its actual device utilization and the expected device utilization (i.e., the device utilization threshold), and the time it takes to deploy the device, its expansion time (such as the above-mentioned time SU, time T2) is determined, and the expansion time is realized by the distance relationship between the expansion time and the current time (such as time T1) + the preset time length pred_window to achieve the quantitative processing of expansion and contraction prediction, so as to avoid the situation where the expansion time is too late and the device is not deployed in time, resulting in a large number of players queuing; in addition, when it is in a state of decreasing device usage, based on the size relationship between its actual device utilization and the expected device utilization (i.e., the device utilization threshold), and the distance relationship between the time corresponding to the target trough closest to the current time, the expansion and contraction prediction quantitative processing is realized, so as to avoid the situation where the capacity is reduced too much and the device cannot be deployed in time, resulting in a large number of players queuing. In general, the solution proposed in the embodiment of the present application, while striving to improve the device utilization of each cloud game in the cloud gaming system, also takes into account the time it takes to deploy the device, which can effectively reduce the game access time of each cloud game in the cloud gaming system and, to a certain extent, avoid the situation where a large number of players queue up.
[0162] If the return on investment (ROI) of a cloud game is low (such as 0), but a large number of virtual devices are deployed for it, then the input-output ratio of this cloud game (that is, the ratio between the economic benefits obtained during the operation period and the total investment during the operation period) will be low. If the return on investment of a cloud game is high (such as greater than 80), but a small number of virtual devices are deployed for it, then the probability of players abandoning the game due to long waiting times may increase, thereby reducing economic benefits. Based on this, the embodiment of the present application also proposes another method for processing cloud games. Please refer to Figure 14 , Figure 14 This is another cloud game processing method provided by the embodiment of the present application. The cloud game processing method can be executed by a computer device, which can be Figure 1a The cloud gaming server in , or it can be Figure 1b The dispatch server in , or it can be Figure 1b The distributed device composed of the cloud game server and the scheduling server shown; the processing method of the cloud game may include but is not limited to steps S1401-S1402:
[0163] S1401. Obtain device information of P cloud games in the cloud gaming system; the device information includes device deployment information, device usage information, and a reference number of device deployments, where P is a positive integer.
[0164] In an embodiment of the present application, any one of the P cloud games is represented as the first cloud game. The device information of the first cloud game includes the device deployment information of the first cloud game, the device usage information of the first cloud game, and the reference number of devices to be deployed for the first cloud game.
[0165] The reference number of devices to be deployed for the first cloud game represents the number of virtual devices expected to be deployed for the first cloud game, and the reference number of devices to be deployed for the first cloud game is determined based on the return on investment of the first cloud game. Among them, there is a positive correlation between the return on investment of the first cloud game and the reference number of devices to be deployed for the first cloud game.
[0166] Among them, for the description of the device deployment information of the first cloud game and the device usage information of the first cloud game, reference can be made to S201 in the corresponding embodiment described above. Figure 2 Details are not described herein again.
[0167] S1402. Perform prediction quantization processing on the scaling of the cloud game system based on the device information of the P cloud games to obtain a scaling strategy for the cloud game system. According to the scaling strategy of the cloud game system, perform scaling processing on the target cloud game in the cloud game system. The scaling strategy of the cloud game system is used to indicate the target cloud game that needs to be scaled in the cloud game system and the target scaling parameters required for scaling the target cloud game.
[0168] In one embodiment, performing prediction quantization processing on the scaling of the cloud game system based on the device information of the P cloud games to obtain a scaling strategy for the cloud game system includes: performing fitting processing on the first change curve to obtain a fitting curve; obtaining the first slope of the fitting curve, where the first slope is used to represent the change rate of the number of devices used by the first cloud game within the first time window; based on the first slope, the number of devices used by the first cloud game at time T1, and the number of devices deployed by the first cloud game at time T1, perform prediction quantization processing on the scaling of the first cloud game to obtain the initial scaling parameters of the first cloud game. For the detailed implementation process, reference can be made to S202 in the corresponding embodiment described above. Figure 2 Details are not described herein again.
[0169] If the initial scaling parameters of each cloud game in the cloud game system are all initial scaling-down parameters, it indicates that the cloud game system has a scaling-down requirement and no scaling-up requirement. At this time, correct the initial scaling parameters of the first cloud game based on the difference between the reference number of devices to be deployed for the first cloud game and the number of devices deployed by the first cloud game at time T1 (that is, the difference between the reference number of devices to be deployed for the first cloud game and the number of devices deployed by the first cloud game at time T1). For example, as Figure 15 (which is a schematic diagram of device relocation between cloud games provided by an embodiment of the present application) shows, Figure 15The initial scaling parameter of Cloud Game 1 is -700, and after correction, it is +150.
[0170] If the initial scaling parameters of all cloud games in the cloud game system are initial expansion parameters, it indicates that the cloud game system has an expansion requirement and no scaling requirement. At this time, if the number of device deployments of the first cloud game at time T1 is greater than or equal to the reference number of device deployments of the first cloud game, then the initial scaling parameter of the first cloud game is corrected based on the difference between the reference number of device deployments of the first cloud game and the number of device deployments of the first cloud game at time T1. For example, as Figure 16 (which is another schematic diagram of device relocation between cloud games provided by an embodiment of the present application) shows, Figure 16 The initial scaling parameter of Cloud Game 1 is +90, and after correction, it is -100.
[0171] Furthermore, if the initial scaling parameter of the first cloud game is not the preset value (such as 0), then the first cloud game is determined as the target cloud game that needs to be scaled, and the initial scaling parameter of the first cloud game is determined as the target scaling parameter of the first cloud game.
[0172] Next, a specific example is used to illustrate the scaling quota allocation rule for dynamic scheduling by device relocation between cloud games.
[0173] (1) The cloud game system has a scaling requirement and no expansion requirement. As Figure 15 shows, at this time, the number of device deployments of each cloud game will be adjusted towards its reference number of device deployments to meet the number of virtual devices expected to be deployed by each cloud game calculated based on the return on investment. Among them, Figure 15 Arrow 1 in indicates the cloud game that is the first to be allocated device resources, and arrow 2 indicates the cloud game that is the second to be allocated device resources. It can be seen that the recycled scaling resources will be preferentially allocated to cloud games with a higher expansion priority.
[0174] (2) The cloud game system has no scaling requirement and has an expansion requirement. As Figure 16 shows, at this time, the cloud game 2 in the South China region with a higher scaling priority will be scaled first. Since only the cloud game 3 in the South China region needs to be expanded at this time, the recycled scaling resources are allocated to the cloud game 3 in the South China region. Furthermore, since the current number of device deployments (i.e., the number of device deployments at time T1) of the cloud game 1 in the South China region is greater than its reference number of device deployments, its scaling can be forced through the correction of the initial scaling parameter. The cloud game 3 in the South China region still needs to be expanded by 14 virtual devices, and 7 boards can be recycled by scaling the cloud game 1 in the South China region.
[0175] (3) The cloud game system has a need for capacity reduction and a need for capacity expansion. That is, for some cloud games in the cloud game system, the initial scaling parameters are initial capacity reduction parameters, and for some cloud games, the initial scaling parameters are initial capacity expansion parameters. In one embodiment, the target cloud game includes Q second cloud games that need to be expanded and N third cloud games that need to be scaled down. The N third cloud games can be scaled down in the order of decreasing scaling priority, and the recovered scaling resources can be allocated to the Q second cloud games in the order of decreasing expansion priority. For example, as Figure 17 (which is another schematic diagram of device relocation between cloud games provided by an embodiment of the present application) shows, the cloud game 2 in the South China region with a higher scaling priority can be preferentially scaled down, and the recovered scaling resources can be allocated to the cloud game 3 in the South China region. Since the cloud game 3 in the South China region still needs to be expanded by 2 devices, the cloud game 1 in the South China region can be scaled down to recover 1 board card. In an alternative implementation, if the device resources required for the expansion of the Q second cloud games are greater than the device resources recovered from the scaling of the N third cloud games, the second cloud games among the Q second cloud games whose device deployment quantity at time T1 is less than the device usage quantity at time T1 can be forced to scale down. For example, as Figure 18 (which is another schematic diagram of device relocation between cloud games provided by an embodiment of the present application) shows, the current device deployment quantity of the cloud game 2 in the South China region is less than its current device usage quantity (i.e., the device usage quantity at time T1), and the cloud game 2 in the South China region is forced to scale down to recover 2 board cards. In one implementation, during the process of expanding the Q second cloud games in the order of decreasing expansion priority, if multiple cloud games with the same expansion priority are determined, the remaining expansion resources can be allocated according to the respective weights of the multiple cloud games. For example, as Figure 19 (which is another schematic diagram of device relocation between cloud games provided by an embodiment of the present application) shows, since the weight of the cloud game 2 in the South China region is higher than the weight of the cloud game 3 in the South China region, 6 board cards are allocated to the cloud game 2 in the South China region, and 1 board card is allocated to the cloud game 3 in the South China region. It should be noted that the weight is determined based on the current device usage quantity and the current number of queuing players.
[0176] Please refer to Figure 20 , Figure 20 which is a schematic diagram of a comparison result proposed by an embodiment of the present application. As Figure 20 shown, after applying the processing scheme of the cloud game proposed by the present application, not only the device utilization rate of each cloud game in the cloud game system has been improved, but the number of queuing players has also been greatly reduced.
[0177] It can be seen that in the embodiments of the present application, starting from three dimensions: the device utilization rate of cloud games, the time-consuming for deploying devices, and the reference number of device deployments set based on the return on investment, a reasonable scaling strategy is set for the cloud game system. This can not only improve the device utilization rate of each cloud game in the cloud game system and reduce the game access time of each cloud game in the cloud game system, but also make the number of virtual devices deployed for each cloud game close to the number of virtual devices expected to be deployed.
[0178] The method of the embodiments of the present application has been elaborated in detail above. To facilitate better implementation of the above solutions of the embodiments of the present application, correspondingly, the devices of the embodiments of the present application are provided below.
[0179] Figure 21 It is a schematic structural diagram of a processing device for cloud games provided by an embodiment of the present application; as Figure 21 shown, the processing device 100 for cloud games can be set in the computer device mentioned in the foregoing embodiments. The processing device 100 for cloud games can be used to execute the corresponding steps in the processing method for cloud games provided by the embodiments of the present application. Specifically, the processing device 100 for cloud games can specifically include:
[0180] An obtaining unit 101, configured to obtain device information of P cloud games in the cloud game system; the device information includes device deployment information and device usage information, and P is a positive integer;
[0181] A processing unit 102, configured to perform scaling prediction quantization processing on the cloud game system based on the device information of P cloud games to obtain a scaling strategy for the cloud game system; the scaling strategy for the cloud game system is used to indicate the target cloud games in the cloud game system that need to be scaled and the target scaling parameters required for scaling the target cloud games;
[0182] The processing unit 102 is further configured to perform scaling processing on the target cloud games in the cloud game system according to the scaling strategy of the cloud game system.
[0183] In one embodiment, any one of the P cloud games is represented as the first cloud game; the device usage information of the first cloud game includes the first change curve of the first cloud game and the device usage quantity of the first cloud game at time T1; the first change curve is used to represent the change of the device usage quantity of the first cloud game within the first time window; the first time window is a historical time window with time T1 as the end time; the device deployment information of the first cloud game includes the device deployment quantity of the first cloud game at time T1; when the processing unit 102 is configured to perform scaling prediction quantization processing on the cloud game system based on the device information of P cloud games to obtain a scaling strategy for the cloud game system, it is specifically configured to perform the following steps:
[0184] Perform fitting processing on the first change curve to obtain a fitting curve;
[0185] Obtain the first slope of the fitting curve, where the first slope is used to represent the change rate of the device usage quantity of the first cloud game within the first time window;
[0186] Based on the first slope, the device usage quantity of the first cloud game at time T1, and the device deployment quantity of the first cloud game at time T1, perform prediction quantization processing for scaling the first cloud game to obtain the initial scaling parameter of the first cloud game;
[0187] If the initial scaling parameter of the first cloud game is not a preset value, determine that the first cloud game is the target cloud game in the cloud game system that needs to be scaled, and determine the initial scaling parameter of the first cloud game as the target scaling parameter required for scaling the first cloud game.
[0188] In one embodiment, when the processing unit 102 is used to perform prediction quantization processing for scaling the first cloud game based on the first slope, the device usage quantity of the first cloud game at time T1, and the device deployment quantity of the first cloud game at time T1 to obtain the initial scaling parameter of the first cloud game, it is specifically used to perform the following steps:
[0189] Detect the state of the first cloud game at time T1 based on the first slope;
[0190] If the first cloud game is in a state of increasing device usage quantity at time T1, and the device deployment rate of the first cloud game is greater than or equal to the growth rate of the device usage quantity of the first cloud game, then use the fixed window prediction quantization method to perform prediction quantization processing for scaling the first cloud game to obtain the initial scaling parameter of the first cloud game;
[0191] If the first cloud game is in a state of increasing device usage quantity at time T1, and the device deployment rate of the first cloud game is less than the growth rate of the device usage quantity of the first cloud game, then use the traversal prediction quantization method to perform prediction quantization processing for scaling the first cloud game to obtain the initial scaling parameter of the first cloud game.
[0192] In one embodiment, the device usage information of the first cloud game further includes the second change curve of the first cloud game, where the second change curve is used to represent the change of the device usage quantity of the first cloud game within the second time window; the second time window is the time period to which the year-on-year reference time T1' corresponding to time T1 belongs; when the processing unit 102 is used to perform prediction quantization processing for scaling the first cloud game based on the first slope, the device usage quantity of the first cloud game at time T1, and the device deployment quantity of the first cloud game at time T1 to obtain the initial scaling parameter of the first cloud game, it is specifically used to perform the following steps:
[0193] Detect the state of the first cloud game at time T1 based on the first slope;
[0194] If the first cloud game is in a state of decreasing device usage quantity at time T1, determine the time M corresponding to the target trough closest to time T1 based on the second change curve;
[0195] If the distance relationship between time T1 and time M meets the preset condition, when the device utilization rate of the first cloud game at time T1 is less than the device utilization rate threshold, perform scaling prediction quantization processing on the first cloud game using the shrinkage prediction quantization method to obtain the initial scaling parameters of the first cloud game;
[0196] If the distance relationship between time T1 and time M does not meet the preset condition, perform scaling prediction quantization processing on the first cloud game using the comparison prediction quantization method to obtain the initial scaling parameters of the first cloud game.
[0197] In one embodiment, when the processing unit 102 detects the state of the first cloud game at time T1 based on the first slope, it is specifically used to perform the following steps:
[0198] If the first slope is greater than the preset value, determine that the first cloud game is in a state of increasing device usage quantity at time T1; if the first slope is less than the preset value, determine that the first cloud game is in a state of decreasing device usage quantity at time T1;
[0199] When the first cloud game is in a state of increasing device usage quantity at time T1, predict the growth quantity of device usage of the first cloud game at time T2 based on the first slope, where time T2 is obtained by adding a preset time duration to time T1;
[0200] Calculate the first device expansion time required for deploying the device according to the growth quantity of device usage of the first cloud game at time T2;
[0201] If the first device expansion time is less than or equal to the preset time duration, determine that the device deployment rate of the first cloud game is greater than or equal to the growth rate of the device usage quantity of the first cloud game; if the first device expansion time is greater than the preset time duration, determine that the device deployment rate of the first cloud game is less than the growth rate of the device usage quantity of the first cloud game.
[0202] In one embodiment, when the processing unit 102 is used to perform scaling prediction quantization processing on the first cloud game using the fixed window prediction quantization method to obtain the initial scaling parameters of the first cloud game, it is specifically used to perform the following steps:
[0203] Predicting the device utilization rate of the first cloud game at time T2 based on the number of device usage increases for the first cloud game at time T2, the number of device usages for the first cloud game at time T1, and the number of device deployments for the first cloud game at time T1;
[0204] If the device utilization rate of the first cloud game at time T2 is greater than or equal to the device utilization rate threshold, the initial scaling parameters of the first cloud game are set to preset values;
[0205] If the device utilization of the first cloud game at time T2 is less than the device utilization threshold, the first cloud game is subjected to scaling prediction and quantification processing using a scaling prediction and quantification method to obtain initial scaling parameters of the first cloud game.
[0206] In one embodiment, the initial scaling parameters include initial scaling parameters; the processing unit 102 is configured to perform scaling prediction and quantization processing on the first cloud game using a scaling prediction and quantization method, and when obtaining the initial scaling parameters of the first cloud game, specifically perform the following steps:
[0207] Determine, based on the number of devices used by the first cloud game at time T1, the number of device deployment assistance when the device utilization rate of the first cloud game is equal to the device utilization rate threshold;
[0208] The difference between the number of devices deployed for the first cloud game at time T1 and the number of auxiliary devices deployed is determined as the initial scaling parameter of the first cloud game.
[0209] The device usage information of the first cloud game also includes a second change curve of the first cloud game, which is used to represent the change in the number of devices used for the first cloud game within a second time window; the second time window is the time period corresponding to the year-on-year reference time T1' of time T1; the initial scaling parameters include an initial scaling parameter and an initial scaling parameter;
[0210] In one embodiment, the processing unit 102 is configured to perform scaling prediction and quantization processing on the first cloud game using an ergodic prediction and quantization method, and to obtain initial scaling parameters for the first cloud game by specifically executing the following steps:
[0211] Predicting the device utilization rate of the first cloud game at time T3 based on the first slope, and predicting the device utilization rate of the first cloud game at time T4 based on the second change curve; both time T3 and time T4 are after time T1;
[0212] If the device utilization rate of the first cloud game at time T3 and the device utilization rate at time T4 are both greater than or equal to the device utilization rate threshold, then a reference time is selected from time T3 and time T4; the reference time is the time that arrives first between time T3 and time T4;
[0213] Predict the number of device deployments of the first cloud game at the reference time and the number of device deployments of the first cloud game at time T5 based on the second change curve and the device utilization threshold, where time T5 is obtained by adding a preset duration to the reference time;
[0214] Determine the number of devices to be expanded as the difference between the number of device deployments of the first cloud game at time T5 and the number of device deployments of the first cloud game at the reference time, and calculate the second device expansion time required for deploying devices according to the number of devices to be expanded;
[0215] If the time distance between time T1 and the reference time is less than or equal to the second device expansion time, set the number of devices to be expanded as the initial expansion parameter of the first cloud game;
[0216] If the time distance between time T1 and the reference time is greater than the second device expansion time and the device utilization rate of the first cloud game at time T1 is less than the device utilization threshold, calculate the maximum number of devices that can be scaled down between time T1 and time T2, and set the maximum number of devices that can be scaled down as the initial scaling-down parameter of the first cloud game.
[0217] In one embodiment, the processing unit 102 is used for the initial scaling parameters to include the initial expansion parameter, the initial scaling-down parameter, and a preset value;
[0218] When performing the scaling prediction quantization processing on the first cloud game by using the comparison prediction quantization method to obtain the initial scaling parameters of the first cloud game, it is specifically used to execute the following steps:
[0219] Predict the number of device deployments of the first cloud game at time T6 based on the second change curve and the device utilization threshold, where time T6 is obtained by adding a preset duration to time M;
[0220] When the number of device deployments of the first cloud game at time T6 is greater than the number of device deployments of the first cloud game at time T1, set the difference between the number of device deployments of the first cloud game at time T6 and the number of device deployments of the first cloud game at time T1 as the initial expansion parameter of the first cloud game;
[0221] When the number of device deployments of the first cloud game at time T6 is less than the number of device deployments of the first cloud game at time T1, set the difference between the number of device deployments of the first cloud game at time T6 and the number of device deployments of the first cloud game at time T1 as the initial scaling-down parameter of the first cloud game;
[0222] When the number of device deployments of the first cloud game at time T6 is equal to the number of device deployments of the first cloud game at time T1, set the preset value as the initial scaling parameter of the first cloud game.
[0223] In one embodiment, the device information of the first cloud game further includes the reference number of device deployments for the first cloud game; the apparatus further includes:
[0224] The processing unit 102 is further configured to, if it is determined that the cloud game system has a capacity reduction requirement and no capacity expansion requirement, correct the initial scaling parameter of the first cloud game based on the difference between the reference number of device deployments for the first cloud game and the number of device deployments of the first cloud game at time T1;
[0225] The processing unit 102 is further configured to, if it is determined that the cloud game system has a capacity expansion requirement and no capacity reduction requirement, when the number of device deployments of the first cloud game at time T1 is greater than or equal to the reference number of device deployments for the first cloud game, correct the initial scaling parameter of the first cloud game based on the difference between the reference number of device deployments for the first cloud game and the number of device deployments of the first cloud game at time T1.
[0226] In one embodiment, the target cloud game includes Q second cloud games that need to be expanded, and each second cloud game has its own expansion priority, where Q is a positive integer; when the processing unit 102 is configured to perform scaling processing on the target cloud game in the cloud game system according to the scaling policy of the cloud game system, it is specifically configured to perform the following steps:
[0227] Allocate expansion resources to the Q second cloud games based on the respective target scaling parameters of the Q second cloud games in the order of decreasing expansion priority;
[0228] Perform expansion processing on each second cloud game based on the expansion resources allocated to each second cloud game.
[0229] In one embodiment, when the processing unit 102 is configured to allocate expansion resources to the Q second cloud games based on the respective target scaling parameters of the Q second cloud games in the order of decreasing expansion priority, it is specifically configured to perform the following steps:
[0230] If the expansion resources to be allocated are less than the device resources required for the Q second cloud games to perform expansion processing, obtain the service attributes of each second cloud game at time T1;
[0231] Weight each second cloud game according to the service attributes to obtain a weighted result;
[0232] Allocate expansion resources to the Q second cloud games based on the weighted result and the order of decreasing expansion priority, based on the respective target scaling parameters of the Q second cloud games.
[0233] In one embodiment, the target cloud game includes N third cloud games that need to be scaled down, and each third cloud game has its own scaling-down priority, where N is a positive integer. When the processing unit 102 is used to perform scaling-up and scaling-down processing on the target cloud game in the cloud game system according to the scaling-up and scaling-down strategy of the cloud game system, it is specifically used to perform the following steps:
[0234] Set the scaling-down resources to be recycled for the N third cloud games based on the respective target scaling-up and scaling-down parameters of the N third cloud games in the order of decreasing scaling-down priority;
[0235] Perform scaling-down processing on each third cloud game based on the scaling-down resources set for each third cloud game.
[0236] In one embodiment, the target cloud game includes Q second cloud games that need to be scaled up and N third cloud games that need to be scaled down, where both Q and N are positive integers. When the processing unit 102 is used to perform scaling-up and scaling-down processing on the target cloud game in the cloud game system according to the scaling-up and scaling-down strategy of the cloud game system, it is specifically used to perform the following steps:
[0237] Perform scaling-down processing on the N third cloud games based on the respective target scaling-up and scaling-down parameters of the N third cloud games and the respective target scaling-up and scaling-down parameters of the Q second cloud games, and obtain the scaling-down resources recovered through the scaling-down processing;
[0238] Use the recovered scaling-down resources as the expansion resources to be allocated and allocate them to the Q second cloud games based on the respective target scaling-up and scaling-down parameters and expansion priorities of the Q second cloud games;
[0239] Perform scaling-up processing on each second cloud game based on the expansion resources allocated to each second cloud game.
[0240] According to an embodiment of the present application, Figure 21Each unit in the processing device of the cloud game shown can be separately or wholly combined into one or several other units to form, or a certain one (or some) of the units can be further split into multiple smaller units with more specific functions to form, which can achieve the same operations without affecting the realization of the technical effects of the embodiments of this application. The above units are divided based on logical functions. In practical applications, the function of one unit can also be realized by multiple units, or the functions of multiple units can be realized by one unit. In other embodiments of this application, the processing device of the cloud game can also include other units. In practical applications, these functions can also be assisted by other units and can be realized through the cooperation of multiple units. According to another embodiment of this application, it can be achieved by running a computer program capable of executing the respective steps involved in the corresponding method shown in Figure 2 and Figure 14 on a general computing device such as a computer including processing elements and storage elements such as a central processing unit (CPU), a random access storage medium (RAM), and a read-only storage medium (ROM), to construct the processing device of the cloud game shown in Figure 21 and to implement the processing method of the cloud game of the embodiments of this application. The computer program can be recorded on, for example, a computer-readable recording medium, loaded into the above computing device through the computer-readable recording medium, and run therein.
[0241] In the embodiments of the present application, device information of P (a positive integer) cloud games in a cloud game system can be obtained; the device information includes device deployment information and device usage information. Based on the device information of the P cloud games, predictive quantization processing for scaling the cloud game system is performed to obtain a scaling strategy for the cloud game system. Among them, through the predictive quantization processing for scaling, it can be predicted whether it is necessary to perform scaling-up processing on the cloud game at the current moment (such as increasing the number of virtual devices deployed for the cloud game) and the target scaling-up parameters required when performing the scaling-up processing; or it can be predicted whether it is necessary to perform scaling-down processing on the cloud game at the current moment (such as reducing the number of virtual devices deployed for the cloud game) and the target scaling-down parameters required when performing the scaling-down processing; or it can be predicted that there is no need to perform scaling processing (including scaling-up processing and scaling-down processing) on the cloud game at the current moment. Through the predictive quantization processing for scaling, the scaling strategy of the cloud game system can be determined. The scaling strategy of the cloud game system may include the target cloud games in the cloud game system that need to be scaled and the target scaling parameters (including target scaling-up parameters and target scaling-down parameters) required for scaling the target cloud games. In this way, the target cloud games in the cloud game system can be scaled according to the scaling strategy of the cloud game system. It can be seen that the present application can dynamically adjust the number of virtual devices deployed for each cloud game in the cloud game system through a reasonable scaling strategy, which is beneficial to improving the device utilization rate of each cloud game in the cloud game system and reducing the game access time of each cloud game in the cloud game system.
[0242] Figure 22 is a schematic structural diagram of a computer device provided by an embodiment of the present application. The computer device can be Figure 1a the cloud game server in Figure 1b or the scheduling server in Figure 1b the distributed device composed of the cloud game server and the scheduling server shown in Figure 22 ; please refer to
[0243] The embodiments of the present application also provide a computer-readable storage medium (Memory). A computer-readable storage medium is a memory device in a computer device, used to store programs and data. It can be understood that the computer-readable storage medium here can include both the built-in storage medium in the computer device and, of course, the extended storage medium supported by the computer device. The computer-readable storage medium provides a storage space, and this storage space stores the processing system of the computer device. And, one or more instructions suitable for being loaded and executed by the processor 201 are also stored in this storage space, and these instructions can be one or more computer programs. It should be noted that the computer-readable storage medium here can be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory; optionally, it can also be at least one computer-readable storage medium located far from the aforementioned processor.
[0244] In one embodiment, one or more instructions are stored in the computer-readable storage medium; the processor 201 loads and executes one or more instructions stored in the computer-readable storage medium to implement the corresponding steps in the embodiments of the above-mentioned cloud game processing method; in specific implementation, one or more instructions in the computer-readable storage medium are loaded and executed by the processor 201 to describe the cloud game processing method in the corresponding embodiments described above, which will not be elaborated here.
[0245] Based on the same inventive concept, the principle of problem-solving and the beneficial effects of the computer device provided in the embodiments of the present application are similar to those of the cloud game processing method in the method embodiments of the present application. One can refer to the principle of implementation and the beneficial effects of the method. For the sake of brevity, it will not be elaborated here.
[0246] 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 fully or partially implemented by using software, hardware (such as a processing circuit or a memory), or a combination thereof. Similarly, one 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 this module or unit.
[0247] The embodiments of the present application also provide a computer program product or a computer program. This computer program product or computer program includes computer instructions, and these computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads these computer instructions from the computer-readable storage medium, and the processor executes these computer instructions, so that the computer device executes the above-mentioned cloud game processing method.
[0248] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed in this application can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0249] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the embodiments of this application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted through a computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center in a wired manner (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wirelessly (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that the computer can access or a data processing device such as a server or data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)), etc.
[0250] The above description is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any technician familiar with the technical field of this application can easily think of changes or substitutions within the technical scope disclosed in this application, and all should be covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
Claims
1. A processing method for cloud games, characterized in that The method includes: Obtaining device information of P cloud games in a cloud game system; the device information includes device deployment information and device usage information, and P is a positive integer; Performing scaling prediction quantization processing on the cloud game system based on the device information of the P cloud games to obtain a scaling strategy for the cloud game system; the scaling strategy for the cloud game system is used to indicate target cloud games in the cloud game system that need to be scaled and target scaling parameters required for performing scaling processing on the target cloud games; Performing scaling processing on the target cloud games in the cloud game system according to the scaling strategy of the cloud game system.
2. The method according to claim 1, wherein, Any one of the P cloud games is represented as a first cloud game; the device usage information of the first cloud game includes a first change curve of the first cloud game and the device usage quantity of the first cloud game at time T1; the first change curve is used to represent the change situation of the device usage quantity of the first cloud game within a first time window; the first time window is a historical time window with time T1 as the end time; the device deployment information of the first cloud game includes the device deployment quantity of the first cloud game at time T1; The performing scaling prediction quantization processing on the cloud game system based on the device information of the P cloud games to obtain a scaling strategy for the cloud game system includes: Performing fitting processing on the first change curve to obtain a fitting curve; Obtaining a first slope of the fitting curve, where the first slope is used to represent the change rate of the device usage quantity of the first cloud game within the first time window; Performing scaling prediction quantization processing on the first cloud game based on the first slope, the device usage quantity of the first cloud game at time T1, and the device deployment quantity of the first cloud game at time T1 to obtain an initial scaling parameter for the first cloud game; If the initial scaling parameter of the first cloud game is not a preset value, determining that the first cloud game is a target cloud game in the cloud game system that needs to be scaled, and determining the initial scaling parameter of the first cloud game as the target scaling parameter required for performing scaling processing on the first cloud game.
3. The method according to claim 2, wherein The performing scaling prediction quantization processing on the first cloud game based on the first slope, the device usage quantity of the first cloud game at time T1, and the device deployment quantity of the first cloud game at time T1 to obtain an initial scaling parameter for the first cloud game includes: Detecting the state of the first cloud game at time T1 based on the first slope; If the first cloud game is in a state of increasing device usage quantity at time T1, and the device deployment rate of the first cloud game is greater than or equal to the growth rate of the device usage quantity of the first cloud game, performing scaling prediction quantization processing on the first cloud game using a fixed window prediction quantization method to obtain an initial scaling parameter for the first cloud game; If the first cloud game is in a state of increasing device usage at time T1, and the device deployment rate of the first cloud game is less than the growth rate of the device usage of the first cloud game, then an exhaustive prediction quantization method is used to perform scaling prediction quantization processing on the first cloud game to obtain the initial scaling parameters of the first cloud game.
4. The method according to claim 2, wherein The device usage information of the first cloud game further includes a second change curve of the first cloud game, and the second change curve is used to represent the change in the number of devices used by the first cloud game within a second time window; the second time window is the time period to which the year-on-year reference time T1' corresponding to time T1 belongs; Performing scaling prediction quantization processing on the first cloud game based on the first slope, the number of devices used by the first cloud game at time T1, and the number of devices deployed by the first cloud game at time T1 to obtain the initial scaling parameters of the first cloud game includes: Detecting the state of the first cloud game at time T1 based on the first slope; If the first cloud game is in a state of decreasing device usage at time T1, then determine the time M corresponding to the target trough closest to time T1 based on the second change curve; If the distance relationship between time T1 and time M satisfies a preset condition, then when the device utilization rate of the first cloud game at time T1 is less than the device utilization rate threshold, a scaling prediction quantization method is used to perform scaling prediction quantization processing on the first cloud game to obtain the initial scaling parameters of the first cloud game; If the distance relationship between time T1 and time M does not satisfy the preset condition, then a comparison prediction quantization method is used to perform scaling prediction quantization processing on the first cloud game to obtain the initial scaling parameters of the first cloud game.
5. The method according to claim 3 or 4, characterized in that The detecting the state of the first cloud game at time T1 based on the first slope includes: If the first slope is greater than a preset value, then determine that the first cloud game is in a state of increasing device usage at time T1; if the first slope is less than the preset value, then determine that the first cloud game is in a state of decreasing device usage at time T1; When the first cloud game is in a state of increasing device usage at time T1, predict the growth number of devices used by the first cloud game at time T2 based on the first slope, where time T2 is obtained by adding a preset duration to time T1; Calculate the first device expansion time required for deploying devices according to the growth number of devices used by the first cloud game at time T2; If the first device expansion time is less than or equal to the preset duration, then determine that the device deployment rate of the first cloud game is greater than or equal to the growth rate of the device usage of the first cloud game; if the first device expansion time is greater than the preset duration, then determine that the device deployment rate of the first cloud game is less than the growth rate of the device usage of the first cloud game.
6. The method according to claim 3, characterized in that Performing scaling prediction quantization processing on the first cloud game by using a fixed window prediction quantization method to obtain the initial scaling parameters of the first cloud game includes: Predicting the device utilization rate of the first cloud game at time T2 based on the number of device usage increases of the first cloud game at time T2, the number of device usage of the first cloud game at time T1, and the number of device deployments of the first cloud game at time T1; If the device utilization rate of the first cloud game at time T2 is greater than or equal to the device utilization rate threshold, setting the initial scaling parameters of the first cloud game to preset values; If the device utilization of the first cloud game at time T2 is less than the device utilization threshold, the first cloud game is subjected to scaling prediction and quantization processing using a scaling prediction and quantization method to obtain initial scaling parameters of the first cloud game.
7. The method according to claim 4 or 6, characterized in that, The initial scaling parameters include initial scaling parameters; and the scaling prediction and quantization processing of the first cloud game using the scaling prediction and quantization method to obtain the initial scaling parameters of the first cloud game includes: Determine, based on the number of devices using the first cloud game at time T1, a number of device deployment assistance when the device utilization rate of the first cloud game is equal to a device utilization rate threshold; The difference between the number of devices deployed for the first cloud game at time T1 and the number of auxiliary device deployments is determined as the initial scaling parameter of the first cloud game.
8. The method according to claim 3, characterized in that The device usage information of the first cloud game further includes a second change curve of the first cloud game, the second change curve being used to represent a change in the number of devices used for the first cloud game within a second time window; the second time window being the time period corresponding to the year-on-year reference time T1' corresponding to time T1; the initial scaling parameters including an initial scaling parameter and an initial scaling parameter; The step of performing scaling prediction and quantization processing on the first cloud game by using the ergodic prediction and quantization method to obtain initial scaling parameters of the first cloud game includes: Predicting the device utilization rate of the first cloud game at time T3 based on the first slope, and predicting the device utilization rate of the first cloud game at time T4 based on the second change curve; both time T3 and time T4 are after time T1; If the device utilization rate of the first cloud game at time T3 and the device utilization rate at time T4 are both greater than or equal to the device utilization rate threshold, then a reference time is selected from time T3 and time T4; the reference time is the time that arrives first between time T3 and time T4; Predicting the number of devices deployed for the first cloud game at a reference time and the number of devices deployed for the first cloud game at time T5 based on the second change curve and the device utilization threshold, where time T5 is obtained by adding a preset time duration to the reference time; Determine the difference between the number of devices deployed for the first cloud game at time T5 and the number of devices deployed for the first cloud game at the reference time as the number of devices to be expanded, and calculate the second device expansion time required to deploy devices according to the number of devices to be expanded; If the time distance between time T1 and the reference time is less than or equal to the time taken to expand the second device, the number of devices to be expanded is set as the initial expansion parameter of the first cloud game; If the duration distance between time T1 and the reference time is greater than the expansion time consumption of the second device, and the device utilization rate of the first cloud game at time T1 is less than the device utilization rate threshold, calculate the maximum number of devices that can be scaled down between time T1 and time T2, and set the maximum number of devices that can be scaled down as the initial scaling-down parameter of the first cloud game.
9. The method according to claim 4, wherein The initial scaling parameter includes an initial expansion parameter, an initial scaling-down parameter, and a preset value; The method for performing scaling prediction quantization processing on the first cloud game by using a comparative prediction quantization method to obtain the initial scaling parameter of the first cloud game includes: Predict the device deployment quantity of the first cloud game at time T6 based on the second change curve and the device utilization rate threshold, where time T6 is obtained by adding a preset duration to time M; When the device deployment quantity of the first cloud game at time T6 is greater than the device deployment quantity of the first cloud game at time T1, set the difference between the device deployment quantity of the first cloud game at time T6 and the device deployment quantity of the first cloud game at time T1 as the initial expansion parameter of the first cloud game; When the device deployment quantity of the first cloud game at time T6 is less than the device deployment quantity of the first cloud game at time T1, set the difference between the device deployment quantity of the first cloud game at time T6 and the device deployment quantity of the first cloud game at time T1 as the initial scaling-down parameter of the first cloud game; When the device deployment quantity of the first cloud game at time T6 is equal to the device deployment quantity of the first cloud game at time T1, set the preset value as the initial scaling parameter of the first cloud game.
10. The method according to claim 2, characterized in that, The device information of the first cloud game further includes the reference device deployment quantity of the first cloud game; the method further includes: If it is determined that the cloud game system has a scaling-down requirement and no expansion requirement, correct the initial scaling parameter of the first cloud game based on the difference between the reference device deployment quantity of the first cloud game and the device deployment quantity of the first cloud game at time T1; If it is determined that the cloud game system has an expansion requirement and no scaling-down requirement, when the device deployment quantity of the first cloud game at time T1 is greater than or equal to the reference device deployment quantity of the first cloud game, correct the initial scaling parameter of the first cloud game based on the difference between the reference device deployment quantity of the first cloud game and the device deployment quantity of the first cloud game at time T1.
11. The method according to claim 1, characterized in that, The target cloud game includes Q second cloud games that need to be expanded, and each of the second cloud games has its own expansion priority, where Q is a positive integer; Performing scaling processing on the target cloud game in the cloud game system according to the scaling strategy of the cloud game system includes: Allocating expansion resources to the Q second cloud games based on the respective target scaling parameters of the Q second cloud games in the order of decreasing expansion priority; Performing expansion processing on each of the second cloud games based on the expansion resources allocated to each of the second cloud games.
12. The method according to claim 11, wherein Allocating expansion resources to the Q second cloud games based on the target scaling parameters of each of the Q second cloud games in the order of decreasing expansion priority, includes: If the expansion resources to be allocated are less than the device resources required for the expansion processing of the Q second cloud games, obtain the service attributes of each of the second cloud games at time T1; Weight each of the second cloud games according to the service attributes to obtain a weighted result; Based on the weighted result and the order of decreasing expansion priority, allocate expansion resources to the Q second cloud games based on the target scaling parameters of each of the Q second cloud games.
13. The method according to claim 1, characterized in that, The target cloud games include N third cloud games that need to be scaled down, and each of the third cloud games has its own scaling-down priority, where N is a positive integer; Performing scaling processing on the target cloud games in the cloud game system according to the scaling strategy of the cloud game system, includes: Setting the scaling-down resources to be recycled for the N third cloud games based on the target scaling parameters of each of the N third cloud games in the order of decreasing scaling-down priority; Performing scaling-down processing on each of the third cloud games based on the scaling-down resources set for each of the third cloud games.
14. The method according to claim 1, characterized in that, The target cloud games include Q second cloud games that need to be expanded and N third cloud games that need to be scaled down, where both Q and N are positive integers; Performing scaling processing on the target cloud games in the cloud game system according to the scaling strategy of the cloud game system, includes: Performing scaling-down processing on the N third cloud games based on the target scaling parameters of each of the N third cloud games and the target scaling parameters of each of the Q second cloud games, and obtaining the scaling-down resources recovered through the scaling-down processing; Using the recovered scaling-down resources as the expansion resources to be allocated and allocating them to the Q second cloud games based on the target scaling parameters and expansion priority of each of the Q second cloud games; Performing expansion processing on each of the second cloud games based on the expansion resources allocated to each of the second cloud games.
15. A processing device for cloud games, characterized in that, The device includes: An acquisition unit, configured to acquire device information of P cloud games in the cloud game system; the device information includes device deployment information and device usage information, where P is a positive integer; A processing unit, configured to perform scaling prediction quantization processing on the cloud game system based on the device information of the P cloud games to obtain the scaling strategy of the cloud game system; the scaling strategy of the cloud game system is used to indicate the target cloud games that need to be scaled in the cloud game system and the target scaling parameters required for performing scaling processing on the target cloud games; The processing unit is further configured to perform scaling processing on the target cloud games in the cloud game system according to the scaling strategy of the cloud game system.
16. A computer device, characterized in that, The computer device includes: A processor, adapted to implement a computer program; A computer-readable storage medium stores a computer program, and the computer program is adapted to be loaded and executed by the processor to perform the processing method of the cloud game according to any one of claims 1-14.
17. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, and the computer program is adapted to be loaded and executed by the processor to perform the processing method of the cloud game according to any one of claims 1-14.
18. A computer program product, characterized in that, The computer program product includes a computer program, and when the computer program is executed by the processor, it implements the processing method of the cloud game according to any one of claims 1-14.