GPU resource dynamic allocation method and device, electronic equipment and medium

By collecting real-time data in the cloud gaming platform and using load prediction models and resource demand profiles to dynamically adjust the GPU resource pool, the problem of uneven resource allocation in existing technologies is solved, achieving efficient resource utilization and ensuring user experience.

CN121116626AActive Publication Date: 2025-12-12BEIJING DAYU ZHIXIN TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202511276588.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-08
Publication Date
2025-12-12
Estimated Expiration
2045-09-08

AI Technical Summary

Technical Problem

Existing GPU resource allocation schemes cannot adapt to the volatility of business workloads, resulting in resource shortages or idleness, degraded user experience, high operating costs, and a lack of consideration for the differentiated needs of different task types, making fine-grained scheduling impossible.

Method used

By collecting real-time operational data from cloud gaming platforms and using load prediction models to forecast future GPU resource demands, combined with game type-resource demand profiles, the total amount of GPU resources in the pool and the resource configuration of individual games are dynamically adjusted to achieve fine-grained scheduling, ensuring user experience and resource utilization.

Benefits of technology

It significantly improves GPU cluster resource utilization and reduces operating costs while ensuring user experience, and solves the challenges of sudden and heterogeneous resource demand.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121116626A_ABST
    Figure CN121116626A_ABST
Patent Text Reader

Abstract

The invention provides a GPU resource dynamic allocation method and device, electronic equipment and a medium, and the method comprises the steps: collecting real-time operation data of a plurality of cloud games of a target tenant in a cloud game platform, and inputting the real-time operation data into a pre-trained load prediction model; determining the total GPU resource demand prediction amount of the plurality of cloud games in the future target time window and the GPU resource demand prediction value of each cloud game; adjusting the total resource amount of the GPU resource pool based on the total GPU resource demand prediction amount; based on the GPU resource demand predicted value, the preset frame rate and the preset delay target value of each cloud game, determining a target GPU resource adjustment amount of the cloud game, and determining a target GPU instance of the cloud game according to the game type-resource demand portrait; therefore, the resource utilization rate of the GPU cluster is improved on the premise of guaranteeing the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, in particular to a GPU resource dynamic allocation method and device, electronic equipment and medium. BACKGROUND

[0002] In the existing GPU resource allocation scheme, static allocation or dynamic allocation strategy based on simple threshold is mainly adopted. The static allocation strategy usually allocates a fixed number of GPU resources to different applications or users according to the preliminary estimation of business load at the initial stage of system deployment, and maintains the allocation unchanged during the entire running period. This strategy is simple to implement, but cannot adapt to the volatility of business load, and is prone to cause resource shortage, request queuing and user experience decline during peak access, and a large amount of idle resources, low resource utilization and high operating cost during low access.

[0003] In order to overcome the shortcomings of static allocation, the industry has proposed a simple dynamic allocation scheme based on real-time monitoring. This scheme usually sets a resource utilization threshold (such as triggering expansion when the GPU utilization rate is continuously higher than 80%, and triggering contraction when it is lower than 20%) to make small adjustments to the resource pool. However, such a scheme is essentially a kind of lagging passive response mechanism, which has many inherent defects. SUMMARY

[0004] Therefore, the purpose of the present application is to provide a GPU resource dynamic allocation method, device, electronic equipment and medium, which can more finely and in advance dynamically allocate resources for cloud games.

[0005] The GPU resource dynamic allocation method provided by the embodiment of the present application comprises: Collecting real-time running data of a plurality of cloud games of a target tenant in a cloud game platform; the real-time running data comprises game type, user session number, event type, GPU utilization rate, video memory occupancy rate, video coding frame rate and end-to-end delay; inputting the real-time running data of the plurality of cloud games into a pre-trained load prediction model, processing the real-time running data of the plurality of cloud games by the load prediction model, and determining a total GPU resource demand prediction amount of the plurality of cloud games and a GPU resource demand prediction value of each cloud game in a future target time window; Adjusting the total resource amount of the target tenant GPU resource pool based on the total GPU resource demand prediction amount of the plurality of cloud games; In the adjusted GPU resource pool, determining a target GPU resource adjustment amount of each cloud game based on the GPU resource demand prediction value of each cloud game, a preset frame rate and a preset delay target value; wherein each cloud game corresponds to a game type-resource demand portrait, which represents the attribute requirements of the GPU instance matched by the cloud game; Determine the target GPU instance of the cloud game in the resource pool after the total resource adjustment based on the target GPU resource adjustment amount of the cloud game, and the game type-resource demand profile.

[0006] In some embodiments, the GPU resource dynamic allocation method further comprises: Compare the total resource adjustment amount of the GPU resource demand prediction of the plurality of cloud games with the current total resource in the GPU resource pool to determine a resource total amount comparison result. If the resource total amount comparison result is resource deficiency, generate a resource expansion instruction; the resource expansion instruction includes a first GPU instance number. If the resource total amount comparison result is resource surplus, generate a resource contraction instruction; the resource contraction instruction includes a second GPU instance number. Execute the resource expansion instruction or the resource contraction instruction to adjust the total resource amount of the GPU resource pool.

[0007] In some embodiments, the GPU resource dynamic allocation method further comprises: Based on the basic GPU resource adjustment amount, schedule a GPU instance for the cloud game, and monitor the real-time average frame rate and real-time delay of the cloud game after instance scheduling. Determine the target GPU resource adjustment amount of the cloud game based on the comparison result of the real-time average frame rate and the preset frame rate, and the real-time delay and the preset delay.

[0008] In some embodiments, the GPU resource dynamic allocation method further comprises: When expanding, if the real-time average frame rate is lower than the first preset frame rate threshold, and / or the real-time delay is higher than the first preset delay threshold, increase the resource adjustment amount; the first preset frame rate threshold is determined by the preset frame rate and a first preset frame rate tolerance ratio; the first preset delay threshold is determined by the preset delay and a first preset delay tolerance ratio. When the capacity is reduced, if the real-time average frame rate is lower than the second preset frame rate threshold and / or the real-time delay is higher than the second preset delay threshold, the resource adjustment amount to be released is reduced; the second preset frame rate threshold is determined by a preset frame rate and a second preset frame rate tolerance ratio; and the second preset delay threshold is determined by a preset delay and a first preset delay tolerance ratio.

[0009] In some embodiments, in the GPU resource dynamic allocation method, based on the target GPU resource adjustment amount of the cloud game and the game type-resource demand profile, a target GPU instance of the cloud game is determined in the resource pool after the resource total amount is adjusted; and the method comprises: Based on the GPU instance attribute requirements defined by the game type-resource demand profile, candidate GPU instances meeting the GPU instance attribute requirements are screened out from the resource pool; and according to the preset cost optimization strategy and / or performance optimization strategy corresponding to the cloud game, a target GPU instance meeting the target GPU resource adjustment amount is selected from the candidate GPU instances.

[0010] In some embodiments, in the GPU resource dynamic allocation method, according to the preset cost optimization strategy and / or performance optimization strategy corresponding to the cloud game, a target GPU instance meeting the target GPU resource adjustment amount is selected from the candidate GPU instances, which comprises: Based on the real-time average frame rate and real-time delay of the cloud game monitored in real time, it is determined dynamically whether to enable the cost optimization strategy or the performance optimization strategy in this scheduling; If the cost optimization strategy is enabled, the candidate GPU instances are sorted from low to high according to the unit time cost of the candidate GPU instances; If the performance optimization strategy is enabled, the candidate GPU instances are sorted from high to low according to the predefined performance score of the candidate GPU instances; The target GPU instance is determined according to the sorting order and the target GPU resource adjustment amount.

[0011] In some embodiments, in the GPU resource dynamic allocation method, based on the real-time average frame rate and real-time delay of the cloud game monitored in real time, it is determined dynamically whether to enable the cost optimization strategy or the performance optimization strategy in this scheduling, which comprises: It is determined whether the real-time average frame rate is lower than the third preset frame rate threshold and / or the real-time delay is higher than the third preset delay threshold; the third preset frame rate threshold is determined by a preset frame rate and a third preset frame rate tolerance ratio; and the third preset delay threshold is determined by a preset delay and a third preset delay tolerance ratio; If any of the determination results is yes, it is determined that the performance optimization strategy is enabled in this scheduling; If the determination results are all no, it is determined that the cost optimization strategy is enabled in this scheduling.

[0012] In some embodiments, a GPU resource dynamic allocation apparatus is also provided, and the apparatus comprises: The collection module is configured to collect real-time running data of a plurality of cloud games of a target tenant in a cloud game platform; the real-time running data comprises game type, user session number, event type, GPU utilization rate, video memory occupancy rate, video encoding frame rate, and end-to-end delay; the first determination module is configured to input the real-time running data of the plurality of cloud games into a pre-trained load prediction model, process the real-time running data of the plurality of cloud games by using the load prediction model, and determine a total GPU resource demand prediction amount of the plurality of cloud games and a GPU resource demand prediction value of each cloud game in a future target time window; The adjustment module is configured to adjust a total resource amount of a GPU resource pool of the target tenant based on the total GPU resource demand prediction amount of the plurality of cloud games; The second determination module is configured to determine a target GPU resource adjustment amount of each cloud game in the adjusted GPU resource pool based on the GPU resource demand prediction value of the cloud game, a preset frame rate, and a preset delay target value; each cloud game corresponds to a game type-resource demand profile, which represents attribute requirements of a GPU instance matched by the cloud game; The third determination module is configured to determine a target GPU instance of the cloud game in the resource pool after the total resource amount is adjusted based on the target GPU resource adjustment amount of the cloud game and the game type-resource demand profile; the target GPU instance matches the target GPU resource adjustment amount and the attribute requirements of the cloud game.

[0013] In some embodiments, an electronic device is also provided, which comprises a processor, a memory, and a bus, the memory stores machine readable instructions executable by the processor, when the electronic device is running, the processor and the memory communicate through the bus, and the machine readable instructions are executed by the processor to perform the steps of the GPU resource dynamic allocation method.

[0014] In some embodiments, a computer readable storage medium is also provided, which stores a computer program, when the computer program is executed by a processor, the steps of the GPU resource dynamic allocation method are performed.

[0015] In the embodiments of the present application, a GPU resource dynamic allocation method, device, electronic equipment and medium are provided. The method collects real-time running data of multiple cloud games of a target tenant in a cloud game platform. The real-time running data includes game type, user session number, event type, GPU utilization rate, video memory occupancy rate, video encoding frame rate and end-to-end delay. The real-time running data of the multiple cloud games is input into a pre-trained load prediction model. The real-time running data of the multiple cloud games is processed by the load prediction model to determine a total GPU resource demand prediction amount of the multiple cloud games and a GPU resource demand prediction value of each cloud game in a future target time window. The total resource amount of a target tenant GPU resource pool is adjusted based on the total GPU resource demand prediction amount of the multiple cloud games. In the adjusted GPU resource pool, a target GPU resource adjustment amount of each cloud game is determined based on the GPU resource demand prediction value of each cloud game, a preset frame rate and a preset delay target value. Each cloud game corresponds to a game type-resource demand portrait representing the attribute requirements of the GPU instance matched by the cloud game. Based on the target GPU resource adjustment amount of the cloud game and the game type-resource demand portrait, a target GPU instance of the cloud game is determined in the resource pool after the total resource amount is adjusted. The target GPU instance matches the target GPU resource adjustment amount and the attribute requirements of the cloud game. In this way, the load is accurately predicted based on multi-dimensional real-time data, and the prediction result and the user experience index (frame rate / delay) are cooperatively decided, so as to realize intelligent expansion and contraction of the total amount of the GPU resource pool and fine scheduling of individual game sessions, effectively solve the challenges brought by the burstiness and heterogeneity of resource demand in the cloud game scenario, significantly improve the GPU cluster resource utilization rate and reduce the overall operating cost on the premise of guaranteeing the user experience (stable high frame rate and low delay). BRIEF DESCRIPTION OF DRAWINGS

[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can also be obtained without creative labor.

[0017] Figure 1 A method flowchart of the GPU resource dynamic allocation method described in the embodiments of the present application is shown. Figure 2 A method flowchart of adjusting the total resource amount of the target tenant GPU resource pool is shown. Figure 3 A method flowchart of determining the target GPU instance of the cloud game is shown. Figure 4A flow chart of a method for selecting a target GPU instance that meets a target GPU resource adjustment amount from the candidate GPU instances is shown. Figure 5 A structural schematic diagram of a GPU resource dynamic allocation apparatus is shown. Figure 6 A structural schematic diagram of an electronic device is shown. DETAILED DESCRIPTION

[0018] To make the objectives, technical solutions, and superiorities of the embodiments of the present application clearer, the following will be combined with the accompanying drawings for the embodiments of the present application to make a clear and complete description of the technical solutions in the embodiments of the present application. It should be understood that the accompanying drawings in the present application are only for the purpose of illustration and description, and are not used to limit the protection scope of the present application. In addition, it should be understood that the accompanying drawings are not drawn according to the actual proportions. The flow chart used in the present application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flow chart can not be implemented in sequence, and the steps without logical context relationship can be reversed in sequence or implemented simultaneously. In addition, one or more other operations can be added to the flow chart or one or more operations can be removed from the flow chart under the guidance of the content of the present application.

[0019] In addition, the described embodiments are only some of the embodiments of the present application, not all the embodiments. The components of the embodiments of the present application described and shown in the accompanying drawings can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0020] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.

[0021] In the existing GPU resource allocation scheme, static allocation or dynamic allocation strategy based on simple threshold is mainly adopted. The static allocation strategy usually allocates a fixed number of GPU resources to different applications or users according to the preliminary estimation of business load at the initial stage of system deployment, and maintains the allocation unchanged during the entire running period. This strategy is simple to implement, but cannot adapt to the volatility of business load, and is prone to cause resource shortage, request queuing, and user experience degradation during access peak, while a large amount of resources are idle during access valley, resulting in low resource utilization and high operating cost.

[0022] To overcome the shortcomings of static allocation, the industry has proposed a simple dynamic allocation scheme based on real-time monitoring. This scheme usually makes small adjustments to the resource pool by setting resource utilization thresholds (such as triggering expansion when GPU utilization is consistently above 80% and triggering contraction when it is below 20%). However, such a scheme is essentially a passive response mechanism with inherent defects.

[0023] Specifically, the existing allocation mechanism has a lag: the adjustment of resources always lags behind the changes in load. From monitoring to threshold exceeding, to resource allocation completion, there is a significant delay. For cloud gaming, VR / AR and other applications with extremely high real-time requirements, this delay is enough to cause frame rate to drop, delay to soar and other serious impacts on user experience.

[0024] The existing allocation mechanism is relatively rough: its decision-making relies only on limited real-time indicators (such as GPU utilization), lacks insight into future changes in load, and cannot respond to sudden traffic or complex periodic changes. At the same time, it also fails to consider the differentiated needs of different task types (such as different games or rendering tasks) for GPU resources (such as memory and core computing power), and cannot achieve fine-grained resource scheduling.

[0025] In a multi-tenant shared public cloud environment, a simple threshold strategy is difficult to intelligently coordinate resource allocation among multiple tenants' businesses, and is prone to resource competition. To avoid this situation, operators often tend to over-provision resources, resulting in high costs.

[0026] Based on this, in the embodiments of the present application, a GPU resource dynamic allocation method, device, electronic equipment and medium are provided. The method collects real-time running data of multiple cloud games of a target tenant in a cloud game platform. The real-time running data includes game type, user session number, event type, GPU utilization rate, video memory occupancy rate, video encoding frame rate and end-to-end delay. The real-time running data of the multiple cloud games is input into a pre-trained load prediction model. The real-time running data of the multiple cloud games is processed by the load prediction model to determine a total GPU resource demand prediction amount of the multiple cloud games and a GPU resource demand prediction value of each cloud game in a future target time window. The total resource amount of a target tenant GPU resource pool is adjusted based on the total GPU resource demand prediction amount of the multiple cloud games. In the adjusted GPU resource pool, a target GPU resource adjustment amount of the cloud game is determined based on the GPU resource demand prediction value of each cloud game, a preset frame rate and a preset delay target value. Each cloud game corresponds to a game type-resource demand portrait representing the attribute requirements of the GPU instance matched by the cloud game. The target GPU instance of the cloud game is determined in the resource pool after the total resource amount is adjusted based on the target GPU resource adjustment amount of the cloud game and the game type-resource demand portrait. The target GPU instance matches the target GPU resource adjustment amount and the attribute requirements of the cloud game. In this way, the load is accurately predicted based on multi-dimensional real-time data, and the prediction result and the user experience index (frame rate / delay) are cooperatively decided to realize intelligent expansion and contraction of the total amount of the GPU resource pool and fine scheduling of individual game sessions, effectively solving the challenges brought by the burstiness and heterogeneity of resource demand in the cloud game scenario. The GPU cluster resource utilization rate is significantly improved and the overall operating cost is reduced under the premise of ensuring user experience (stable high frame rate and low delay).

[0027] Please refer to Figure 1 , Figure 1 The method flowchart of the GPU resource dynamic allocation method described in the embodiments of the present application is shown. As shown in Figure 1 , the method includes the following steps S101-S105: S101, collecting real-time running data of multiple cloud games of a target tenant in a cloud game platform. The real-time running data includes game type, user session number, event type, GPU utilization rate, video memory occupancy rate, video encoding frame rate and end-to-end delay. S102, inputting the real-time running data of the multiple cloud games into a pre-trained load prediction model. The real-time running data of the multiple cloud games is processed by the load prediction model to determine a total GPU resource demand prediction amount of the multiple cloud games and a GPU resource demand prediction value of each cloud game in a future target time window. S103, adjusting the total resource amount of a target tenant GPU resource pool based on the total GPU resource demand prediction amount of the multiple cloud games. S104、In the adjusted GPU resource pool, based on the GPU resource demand prediction value of each cloud game, the preset frame rate and the preset delay target value, the target GPU resource adjustment amount of the cloud game is determined; wherein each cloud game corresponds to a game type-resource demand portrait, which represents the attribute requirements of the GPU instance matched by the cloud game; S105, based on the target GPU resource adjustment amount of the cloud game, the game type-resource demand portrait, the target GPU instance of the cloud game is determined in the resource pool after the total resource adjustment; the target GPU instance matches the target GPU resource adjustment amount and the attribute requirements of the cloud game.

[0028] In the step S101, the real-time running data of a plurality of cloud games of a target tenant in a cloud game platform is collected; the real-time running data includes game type, user session number, event type, GPU utilization, video memory occupancy, video coding frame rate and end-to-end delay.

[0029] The game type is a task type (such as VR game, 2D game, 4K rendering, etc.) that marks the running of the cloud game. Different game types require different GPU resources, so the weighted average value of the GPU resource demand is estimated by the task complexity during the running of the cloud game.

[0030] The user session number is the number of game connections currently established and in active state. For example: there are 15,342 users currently playing games on the platform. The user session number is the most direct load indicator, directly reflecting the current platform pressure, and is one of the most core input features of the load prediction model, used to predict future user growth trends and total resource demand.

[0031] The event type refers to pre-planned external event factors that may affect the load. For example: new game online, large-scale promotion activities, e-sports live broadcast, holidays, etc. for responding to non-periodic sudden load. Traditional load prediction models (such as LSTM) can capture periodic rules, but cannot predict such sudden event-driven traffic surges. By inputting this index as a feature into the model, the prediction accuracy of sudden traffic can be greatly improved.

[0032] The GPU utilization is the percentage of busy time of GPU computing unit (such as CUDA core). For example: the GPU utilization of a certain server is 85%. The GPU utilization reflects the tension of GPU computing power and is one of the core threshold indicators for triggering expansion (such as > 85%) or contraction (such as < 20%).

[0033] GPU memory usage, the proportion of GPU dedicated memory used, for example: a game session occupies 12GB / 16GB of GPU memory, to evaluate the memory resource bottleneck. Even if the GPU utilization is not high, the GPU memory is full, and a new game session cannot be started.

[0034] Video encoding frame rate, the speed at which the cloud GPU encodes the rendered picture into a video stream, in FPS (frames per second), for example: 60 FPS. Frame rate directly determines whether the game picture is smooth, and is the ultimate goal of service quality (SLA) guarantee.

[0035] End-to-end delay, the total time from player operation input to reaction seen on the screen, in milliseconds (ms), for example: 80ms; delay determines whether the operation is "in time". It is another ultimate goal of SLA guarantee. High delay will seriously affect the experience.

[0036] The real-time running data is rich in dimensions, and collectively constitutes a multi-level and all-round monitoring system.

[0037] In some embodiments, the acquired real-time running data is stored to obtain historical running data.

[0038] The real-time data is stored in a time series database (such as Prometheus, InfluxDB), with a time granularity of 1 minute or 5 minutes, to ensure low-latency access.

[0039] The historical running data: at least 90 days of data is retained and stored in a distributed database (such as Apache Cassandra, Amazon S3), for model training and long-term trend analysis.

[0040] The collected real-time running data is preprocessed to ensure the quality of the data input into the load prediction model.

[0041] Preprocessing includes data cleaning, data normalization, feature engineering, and data windowing.

[0042] Data cleaning: remove outliers, such as sudden changes in GPU utilization (>100% or <0%), abnormal fluctuations in the number of users (single-minute growth / drop of more than 50%); handle missing values using linear interpolation or mean filling to preserve data integrity.

[0043] Data normalization: Min-Max normalization or Z-Score standardization is performed on different dimension data (such as the number of user sessions, GPU utilization, and GPU memory usage) to unify them to the interval [0,1] or standard normal distribution.

[0044] Feature engineering: extract key features, including user growth rate, task queue length change rate, GPU utilization trend, time periodicity features (e.g., hour, week), event markers, etc.

[0045] Construct combined features, such as "the product of the number of users and task complexity" to reflect the comprehensive resource demand.

[0046] Data windowing: aggregate data by time window (5 minutes, 15 minutes, 30 minutes) to generate structured data sets suitable for time series prediction.

[0047] In the step S102, the real-time running data of multiple cloud games is input into a pre-trained load prediction model, and the real-time running data of the multiple cloud games is processed by the load prediction model to determine the predicted total amount of GPU resource demand of multiple cloud games and the predicted value of GPU resource demand of each cloud game in a future target time window.

[0048] The load prediction model can use a time series model, such as LSTM (Long Short-Term Memory Network) or Prophet, to capture the periodicity of user numbers, GPU utilization, etc. (such as daily peak, weekly pattern); or a machine learning regression model, such as XGBoost or LightGBM, to handle non-linear relationships and complex feature interactions (such as the coupling effect between "user growth rate" and "event type").

[0049] The load prediction model is also configured with a rule supplement mechanism, such as setting a threshold trigger rule (such as "user growth rate > 15% and GPU utilization > 85%"), to cope with sudden load scenarios and ensure prediction robustness.

[0050] For example, an LSTM neural network model trained with 3 months of historical data, with an input of 7 days of data window and an output of 1 day of prediction.

[0051] The training and optimization process of the load prediction model is as follows: training period: update the model based on the latest data daily or weekly to adapt to changes in user behavior.

[0052] Verification method: use 80% of historical data for training and 20% for verification, and evaluation indicators include MAE (Mean Absolute Error), RMSE (Root Mean Square Error).

[0053] Hyperparameter tuning: adjust model parameters (such as LSTM hidden layer unit number, XGBoost tree depth) through grid search or Bayesian optimization.

[0054] Real-time correction: combined with real-time monitoring data (such as current GPU utilization), dynamically correct the prediction bias.

[0055] The future target time window refers to a future time interval predicted by the load prediction model; the starting point of the time window is the time when the prediction is performed, and the ending point is a specific time in the future.

[0056] In some embodiments, the length of the future target time window is 10-30 minutes.

[0057] The plurality of cloud games refers to a plurality of cloud games operated by the target tenant.

[0058] The total GPU resource demand prediction refers to the total GPU resource demand of the plurality of cloud games within the target time window, that is, the total GPU resource demand that needs to be allocated to the target tenant.

[0059] The GPU resource demand prediction value of each cloud game refers to the GPU resource demand of each specific cloud game at the end of the target time window.

[0060] That is, the load prediction model simultaneously performs two calculations: macro prediction: considering all data as a whole, predicting the total resource demand trend of the platform (total GPU resource demand prediction); micro prediction: identifying and analyzing the data of each game, predicting the resource demand of each individual (GPU resource demand prediction value of each cloud game).

[0061] In some embodiments, in addition to the GPU resource demand prediction, the load prediction model also outputs parameters such as the predicted number of user sessions.

[0062] In some embodiments, the total GPU resource demand prediction and the GPU resource demand prediction value of each cloud game obtained by the prediction are stored in a memory database (such as Redis) for use by the resource allocation module.

[0063] In some embodiments, the prediction is run every 5 minutes to generate prediction results for the next 10, 15, and 30 minutes.

[0064] Based on the total GPU resource demand prediction of the plurality of cloud games and the GPU resource demand prediction value of each cloud game, an efficient GPU resource dynamic allocation strategy is developed.

[0065] In the step S103, the total resource amount of the target tenant GPU resource pool is adjusted based on the total GPU resource demand prediction of the plurality of cloud games.

[0066] Please refer to Figure 2The method comprises the following steps S201-S204: S201, comparing the total amount of GPU resource demand prediction of multiple cloud games with the current total amount of resources in the GPU resource pool to determine a resource total amount comparison result; S202, if the resource total amount comparison result is resource deficiency, generating a resource expansion instruction; the resource expansion instruction includes a first GPU instance number; S203, if the resource total amount comparison result is resource surplus, generating a resource contraction instruction; the resource contraction instruction includes a second GPU instance number; S204, executing the resource expansion instruction or the resource contraction instruction to adjust the total amount of resources of the GPU resource pool.

[0067] The resource total amount comparison result is resource deficiency, that is, the ratio of the current total amount of resources to the total amount of GPU resource demand prediction is greater than a preset expansion threshold; for example, the preset expansion threshold is 85%. That is, when the real-time GPU utilization rate is greater than 85% of the total amount of GPU resource demand prediction, it indicates resource deficiency.

[0068] The resource total amount comparison result is resource surplus, that is, the ratio of the current total amount of resources to the total amount of GPU resource demand prediction is greater than a preset contraction threshold; for example, the preset expansion threshold is 20%.

[0069] That is, when the real-time GPU utilization rate is less than 20% of the total amount of GPU resource demand prediction, it indicates resource surplus.

[0070] In the embodiment of the application, the resource total amount of the prediction-driven GPU resource pool is adjusted from "passive response" to "active planning", which improves the response speed and user experience, reduces the performance degradation and service interruption time caused by resource deficiency, and ensures the smooth and stable user experience.

[0071] Here, the total amount of resources of the GPU resource pool is the total amount of resources of multiple cloud games of the target tenant, not for the entire platform, and the cloud architecture mode of "tenant-isolated resource pool" or "dedicated cluster".

[0072] Here, the total amount of resources of the GPU resource pool is adjusted by executing the resource expansion instruction or the resource contraction instruction in combination with the upper limit of the total amount of resources of the target tenant, the priority and the cost.

[0073] Suppose the cloud platform provides cloud game services for "Company A" and "Company B" at the same time, Company A holds a hot promotion activity, and the user volume surges; if the total amount of resources is not set for the tenant, the burst traffic of Company A may squeeze the GPU resources that should belong to Company B, causing the game of Company B to be laggy; therefore, a logically isolated resource pool is allocated for each tenant, and the total amount of resources of the tenant is adjusted in advance.

[0074] Alternatively, Company A is a large game manufacturer, requires the highest service quality and performance, and is willing to pay a higher fee; Company B is a start-up company, is extremely sensitive to cost, and can accept occasional performance fluctuations, so a logically isolated resource pool also needs to be allocated for each tenant for differential services.

[0075] That is, the first GPU instance number in the resource expansion instruction and the second GPU instance number in the resource expansion instruction are determined based on the total amount of resources of the tenant operating the plurality of cloud games, priority, and cost.

[0076] In the step S104, the target GPU resource adjustment amount of the cloud game is determined in the adjusted GPU resource pool based on the GPU resource demand prediction value of each cloud game, the preset frame rate, and the preset delay target value.

[0077] Specifically, the target GPU resource adjustment amount of the cloud game is determined in the adjusted GPU resource pool based on the GPU resource demand prediction value of each cloud game, the preset frame rate, and the preset delay target value, including: determining the basic GPU resource adjustment amount of the cloud game based on the GPU resource demand prediction value of the cloud game; The GPU instance is scheduled for the cloud game based on the basic GPU resource adjustment amount, and the real-time average frame rate and real-time delay of the cloud game after instance scheduling are monitored; The target GPU resource adjustment amount of the cloud game is determined based on the comparison result of the real-time average frame rate and the preset frame rate, and the real-time delay and the preset delay.

[0078] That is, the target GPU resource adjustment amount of the cloud game is determined in two stages.

[0079] The target GPU resource adjustment amount of the cloud game is determined based on the comparison result of the real-time average frame rate and the preset frame rate, and the real-time delay and the preset delay, including: When scaling out, if the real-time average frame rate is lower than the first preset frame rate threshold, and / or the real-time delay is higher than the first preset delay threshold, the resource adjustment amount is increased; the first preset frame rate threshold is determined by a preset frame rate and a first preset frame rate tolerance ratio; the first preset delay threshold is determined by a preset delay and a first preset delay tolerance ratio. When scaling out, if the real-time average frame rate is lower than the first preset frame rate threshold, and / or the real-time delay is higher than the first preset delay threshold, the resource adjustment amount is increased; the first preset frame rate threshold is determined by a preset frame rate and a first preset frame rate tolerance ratio; the first preset delay threshold is determined by a preset delay and a first preset delay tolerance ratio.

[0080] Based on the GPU resource demand prediction value of each cloud game, the basic GPU resource adjustment amount of the cloud game is determined, and specifically, the calculation formula of the basic GPU resource adjustment amount (AB) is: AB = P - C; wherein P represents the GPU resource demand prediction value of the cloud game in the future target time window given by the load prediction model; C represents the amount of GPU resources currently allocated to the cloud game.

[0081] If AB > 0, the cloud game needs to be scaled out; if AB < 0, the cloud game can be considered to be scaled in.

[0082] The system performs preliminary GPU instance scheduling for the cloud game based on the calculated basic GPU resource adjustment amount (AB). For example, if AB = +2, the scheduler is called to try to allocate 2 new GPU instances for the game in the resource pool.

[0083] At the same time, the system starts real-time monitoring at a high frequency, continuously collecting the real-time average frame rate (Current_FPS) and real-time delay (Current_Latency) of the cloud game after the preliminary scheduling. The monitoring data is collected by Prometheus and other monitoring tools at a granularity of seconds or minutes.

[0084] After adjusting based on the basic GPU resource adjustment amount (AB), the system compares the real-time user experience indicators (real-time average frame rate, real-time delay) monitored in real time with the preset target, and dynamically corrects the basic adjustment amount (AB) according to the comparison result, to obtain the final, more accurate target GPU resource adjustment amount (AF).

[0085] The first preset frame rate threshold (FPS_Threshold) is determined by the preset frame rate (Target_FPS) and the first preset frame rate tolerance ratio (a). The calculation formula is: FPS_Threshold = Target_FPS * a (wherein a < 1, for example a = 0.95); For example, if Target_FPS is 60 FPS and a is 0.95, then FPS_Threshold is 57 FPS.

[0086] A first preset latency threshold (Latency_Threshold) is determined by a preset latency (Target_Latency) and a first preset latency tolerance ratio (b). The calculation formula is: Latency_Threshold = Target_Latency * b (wherein b > 1, for example b = 1.1) For example, if Target_Latency is 100 ms and b is 1.1, then Latency_Threshold is 110 ms.

[0087] The second preset frame rate threshold and the second preset latency threshold are set in the same way as the first preset frame rate threshold and the first preset latency threshold, and will not be described again.

[0088] In the expansion scenario, if the real-time average frame rate is lower than the first preset frame rate threshold and / or the real-time latency is higher than the first preset latency threshold, it indicates that the preliminary scheduled basic resource amount (AB) is still insufficient, and the user experience cannot be restored to the safe range. At this time, the system needs to increase the resource adjustment amount.

[0089] In the contraction scenario, if the real-time average frame rate is lower than the first preset frame rate threshold and / or the real-time latency is higher than the first preset latency threshold, it indicates that even if the contraction has not yet been performed, the current user experience is already on the verge of danger. At this time, the contraction risk is extremely high. Therefore, the system should reduce the resource adjustment amount to be released, or even suspend the contraction.

[0090] In the embodiments of the present application, after determining the overall resource pool of the tenant, the two-stage adjustment mechanism of GPU resource prediction preliminary adjustment and user experience verification for a single cloud game brings significant technical progress, effectively overcomes the possible errors of the load prediction model, ensures that the resource allocation always aims to guarantee the real user experience through real-time feedback; Moreover, a safety buffer is provided to avoid mistakenly releasing resources when the system performance is already under pressure, thereby ensuring the stability of the service; In the sudden load scenario, it can quickly respond and ensure that the user experience is restored to the standard level as quickly as possible through the way of adding resources.

[0091] In the step S105, based on the target GPU resource adjustment amount of the cloud game, the game type-resource demand profile, the target GPU instance of the cloud game is determined in the resource pool after the total resource adjustment; the target GPU instance matches the target GPU resource adjustment amount and the attribute requirement of the cloud game.

[0092] Please refer to Figure 3 , based on the target GPU resource adjustment amount of the cloud game, the game type-resource demand profile, the target GPU instance of the cloud game is determined in the resource pool after the total resource adjustment; including the following steps S301-S302: S301, based on the GPU instance attribute requirement defined by the game type-resource demand profile, the candidate GPU instance meeting the GPU instance attribute requirement is selected from the resource pool; S302, according to the preset cost optimization strategy and / or performance optimization strategy corresponding to the cloud game, the target GPU instance meeting the target GPU resource adjustment amount is selected from the candidate GPU instance.

[0093] The game type-resource demand profile is a predefined data structure, which clearly specifies the technical attribute requirement of the GPU instance required to run such games. For example, for "3A big works" games, its profile may be defined as: {GPU memory: >=16GB, GPU model: ABC; computing power level: high}.

[0094] Each GPU instance in the resource pool has been labeled with a technical label describing its specifications, and the attributes (i.e. technical labels) of each instance are matched with the resource demand profile, and all instances meeting the requirements are added to the candidate GPU instance list.

[0095] In the embodiments of the present application, instead of randomly selecting instances from the candidate list, the most suitable instance is intelligently selected according to a dynamic decision-making strategy.

[0096] It should be noted that the core basis of the dynamic strategy determination is the real user experience of the current cloud game, i.e. the real-time average frame rate (Current_FPS) and real-time average delay (Current_Latency) monitored in real time.

[0097] In some embodiments, please refer to Figure 4 , according to the preset cost optimization strategy and / or performance optimization strategy corresponding to the cloud game, the target GPU instance meeting the target GPU resource adjustment amount is selected from the candidate GPU instance, including the following steps S401-S404: S401, based on the real-time average frame rate and real-time delay of the cloud game monitored in real time, dynamically determine whether to enable the cost optimization strategy or the performance optimization strategy in this scheduling. S402, if the cost-optimal strategy is enabled, the candidate GPU instances are sorted by unit time cost from low to high; S403, if the performance-optimal strategy is enabled, the candidate GPU instances are sorted by predefined performance score from high to low; S404, the target GPU instance is determined according to the sorting order and the target GPU resource adjustment amount.

[0098] If the cost-optimal strategy is enabled, the unit time cost of each candidate instance is queried (for example, 3 yuan / hour for on-demand instances and 1 yuan / hour for preemptible instances); then sorted by unit time cost from low to high to form a cost-optimal candidate queue, and the instance with the lowest cost is ranked first.

[0099] If the performance-optimal strategy is enabled, the system calculates a score for each candidate instance according to a predefined performance score model. The model takes into account hardware indicators such as GPU model, memory size, vCPU number, network bandwidth (for example, A100 instance performance score is 100 points, V100 instance is 70 points, T4 instance is 40 points). Then sorted by performance score from high to low to form a performance-optimal candidate queue, and the instance with the strongest performance is ranked first.

[0100] It should be noted that the predefined performance score of each instance can be predefined to improve real-time performance.

[0101] Suppose the target GPU resource adjustment amount is 3 GPUs.

[0102] Under the cost-optimal strategy, the first, second, and third instances with the lowest cost are selected from the cost-optimal queue in turn.

[0103] Under the performance-optimal strategy, the first, second, and third instances with the strongest performance are selected from the performance-optimal queue in turn.

[0104] In some embodiments, based on the real-time average frame rate and real-time delay of the cloud game monitored in real time, it is determined dynamically whether to enable the cost-optimal strategy or the performance-optimal strategy for this scheduling, including: determining whether the real-time average frame rate is lower than the third preset frame rate threshold and / or the real-time delay is higher than the third preset delay threshold; the third preset frame rate threshold is determined by a preset frame rate and a third preset frame rate tolerance ratio; the third preset delay threshold is determined by a preset delay and a third preset delay tolerance ratio; If any of the determination results is yes, the performance-optimal strategy is determined for this scheduling; If the determination result is no, the cost-optimal strategy is determined for this scheduling.

[0105] The third preset frame rate tolerance ratio is exemplarily 0.8; and the third preset delay tolerance ratio is exemplarily 1.2.

[0106] If any of the judgment results is yes, it indicates that the current user experience is at or will be below the acceptable lower limit, at this time, guaranteeing service performance and quality is the first priority, and it is determined that the performance optimal strategy is enabled for this time of scheduling.

[0107] If both of the judgment results are no, it indicates that the current user experience is good, and there is sufficient resource margin. At this time, optimization of operation cost is possible on the premise of guaranteeing experience, and therefore the system determines that the cost optimal strategy is enabled for this time of scheduling.

[0108] It should be noted that in the embodiments of the present application, two-layer resource scheduling is involved, the first layer is tenant-level resource total amount adjustment, and the second layer is game-level fine scheduling within a tenant; a global scheduler of the platform is only responsible for managing resource pool expansion and contraction at the tenant level, and the order of magnitude of the scheduling target is relatively small; a dedicated scheduler (or scheduling strategy) of each tenant is only responsible for managing the allocation of dozens or hundreds of instances in its own resource pool, and the order of magnitude of the scheduling target is also relatively small; if there is no first-layer scheduling and only second-layer scheduling is performed, not only is the scheduling amount large, but also "Cloud Game A" belonging to company A and "Cloud Game B" belonging to company B compete for instances of the platform, and it is difficult to implement the cost optimal strategy or the performance optimal strategy, and it is also unfair.

[0109] The second layer is game-level fine scheduling within a tenant, which is essentially resource adaptation of each game in the tenant. In the first step, how to optimally allocate GPU instances in the pool to different games in the internal pool to improve the experience of cloud games of the tenant.

[0110] In some embodiments, the technical architecture and tools for performing the GPU resource dynamic allocation method are as follows.

[0111] Monitoring system: Prometheus + Grafana: real-time collection and visualization of indicators, supporting dynamic alarm; NVIDIA DCGM: collection of GPU-specific indicators (such as memory, core utilization, and power consumption).

[0112] Resource management: Kubernetes + NVIDIA GPU Operator: containerized GPU task scheduling, supporting dynamic allocation.

[0113] AWS Auto Scaling / Azure VM Scale Sets: automatic management of the number of GPU instances.

[0114] Load prediction model deployment: deploy the prediction model using an ML framework (e.g., TensorFlow, PyTorch) or a time series tool (e.g., Prophet); integrate the prediction results into the scheduling system through a RESTful API (e.g., Flask, FastAPI).

[0115] Load balancing: use AWS Elastic Load Balancer or NGINX to ensure efficient allocation of user requests to available GPU instances.

[0116] Based on the same inventive concept, the embodiments of the present application also provide a GPU resource dynamic allocation device corresponding to the GPU resource dynamic allocation method. Since the principle of solving problems in the device of the embodiments of the present application is similar to the above-mentioned GPU resource dynamic allocation method of the embodiments of the present application, the implementation of the device can be referred to the implementation of the method, and the repeated parts will not be described here.

[0117] Please refer to Figure 5 , Figure 5 The structure diagram of the GPU resource dynamic allocation device according to the embodiments of the present application is shown; the device comprises: The acquisition module 501 is configured to acquire real-time running data of a plurality of cloud games of a target tenant in a cloud game platform; the real-time running data comprises game type, user session number, event type, GPU utilization rate, video memory occupancy rate, video encoding frame rate, and end-to-end delay; the first determination module 502 is configured to input the real-time running data of the plurality of cloud games into a pre-trained load prediction model, process the real-time running data of the plurality of cloud games through the load prediction model, and determine a total GPU resource demand prediction amount of the plurality of cloud games and a GPU resource demand prediction value of each cloud game in a future target time window; The adjustment module 503 is configured to adjust a total resource amount of a target tenant GPU resource pool based on the total GPU resource demand prediction amount of the plurality of cloud games; The second determination module 504 is configured to determine a target GPU resource adjustment amount of each cloud game in the adjusted GPU resource pool based on the GPU resource demand prediction value of each cloud game, a preset frame rate, and a preset delay target value; wherein each cloud game corresponds to a game type-resource demand portrait, which represents the attribute requirements of the GPU instance matched by the cloud game; The third determination module 505 determines a target GPU instance of the cloud game in the resource pool after the total resource amount is adjusted based on the target GPU resource adjustment amount of the cloud game and the game type-resource demand portrait; the target GPU instance matches the target GPU resource adjustment amount and the attribute requirements of the cloud game.

[0118] In some embodiments, the GPU resource dynamic allocation device, the adjustment module, when adjusting the total amount of resources of the target tenant GPU resource pool based on the total amount of predicted GPU resource requirements of the plurality of cloud games, is specifically configured to: compare the total amount of predicted GPU resource requirements of the plurality of cloud games with the current total amount of resources in the GPU resource pool to determine a resource total amount comparison result; if the resource total amount comparison result is resource deficiency, generate a resource expansion instruction; the resource expansion instruction includes a first GPU instance number; if the resource total amount comparison result is resource surplus, generate a resource contraction instruction; the resource contraction instruction includes a second GPU instance number; execute the resource expansion instruction or the resource contraction instruction to adjust the total amount of resources of the GPU resource pool.

[0119] In some embodiments, the GPU resource dynamic allocation device, the second determination module, when determining the target GPU resource adjustment amount of each cloud game in the adjusted GPU resource pool based on the predicted GPU resource requirement value of each cloud game, the preset frame rate and the preset delay target value, is specifically configured to: based on the basic GPU resource adjustment amount, schedule a GPU instance for the cloud game, and monitor the real-time average frame rate and real-time delay of the cloud game after instance scheduling; based on the comparison result of the real-time average frame rate and the preset frame rate, the real-time delay and the preset delay, determine the target GPU resource adjustment amount of the cloud game.

[0120] In some embodiments, the GPU resource dynamic allocation device, the second determination module, when determining the target GPU resource adjustment amount of each cloud game based on the comparison result of the real-time average frame rate and the preset frame rate, the real-time delay and the preset delay, is specifically configured to: when expanding, if the real-time average frame rate is lower than the first preset frame rate threshold, and / or the real-time delay is higher than the first preset delay threshold, increase the resource adjustment amount; the first preset frame rate threshold is determined by the preset frame rate and a first preset frame rate tolerance ratio; the first preset delay threshold is determined by the preset delay and a first preset delay tolerance ratio; when contracting, if the real-time average frame rate is lower than the second preset frame rate threshold, and / or the real-time delay is higher than the second preset delay threshold, reduce the resource adjustment amount to be released; the second preset frame rate threshold is determined by the preset frame rate and a second preset frame rate tolerance ratio; the second preset delay threshold is determined by the preset delay and a first preset delay tolerance ratio.

[0121] In some embodiments, in the GPU resource dynamic allocation device, the third determination module, when determining the target GPU instance in the resource pool based on the target GPU resource adjustment amount of the cloud game, the game type-resource demand profile, is specifically used for: Based on the GPU instance attribute requirement defined by the game type-resource demand profile, the candidate GPU instance meeting the GPU instance attribute requirement is filtered out from the resource pool; according to the preset cost optimization strategy and / or performance optimization strategy corresponding to the cloud game, the target GPU instance meeting the target GPU resource adjustment amount is selected from the candidate GPU instance.

[0122] In some embodiments, in the GPU resource dynamic allocation device, the third determination module, when selecting the target GPU instance meeting the target GPU resource adjustment amount from the candidate GPU instance according to the preset cost optimization strategy and / or performance optimization strategy corresponding to the cloud game, is specifically used for: Based on the real-time average frame rate and real-time delay of the cloud game monitored in real time, dynamically determine whether to enable the cost optimization strategy or the performance optimization strategy in this scheduling; If the cost optimization strategy is enabled, the candidate GPU instances are sorted from low to high according to the unit time cost; If the performance optimization strategy is enabled, the candidate GPU instances are sorted from high to low according to the predefined performance score; Determine the target GPU instance according to the sorting order and the target GPU resource adjustment amount.

[0123] In some embodiments, in the GPU resource dynamic allocation device, the third determination module, when dynamically determining whether to enable the cost optimization strategy or the performance optimization strategy in this scheduling based on the real-time average frame rate and real-time delay of the cloud game monitored in real time, is specifically used for: Determine whether the real-time average frame rate is lower than the first preset frame rate threshold and / or the real-time delay is higher than the first preset delay threshold; the second preset frame rate threshold is determined by the preset frame rate and the second preset frame rate tolerance ratio; the first preset delay threshold is determined by the preset delay and the second preset delay tolerance ratio; If any of the determination results is yes, it is determined that the performance optimization strategy is enabled in this scheduling; If the determination result is no, it is determined that the cost optimization strategy is enabled in this scheduling.

[0124] Based on the same inventive concept, the embodiment of the present application also provides an electronic device corresponding to the GPU resource dynamic allocation method. Since the principle of the electronic device in the embodiment of the present application solves the problem is similar to the GPU resource dynamic allocation method described above, the implementation of the electronic device can be referred to the implementation of the method, and the repeated parts will not be described here.

[0125] Please refer to Figure 6 , Figure 6 The structure of the electronic device described in the embodiment of the present application is shown. The electronic device 600 includes a processor 602, a memory 601 and a bus. The memory 601 stores machine readable instructions executable by the processor 602. When the electronic device 600 is running, the processor 602 and the memory 601 communicate through the bus. The machine readable instructions are executed by the processor 602 to perform the steps of the GPU resource dynamic allocation method.

[0126] Based on the same inventive concept, the embodiment of the present application also provides a computer readable storage medium corresponding to the GPU resource dynamic allocation method. Since the principle of the computer readable storage medium in the embodiment of the present application solves the problem is similar to the GPU resource dynamic allocation method described above, the implementation of the computer readable storage medium can be referred to the implementation of the method, and the repeated parts will not be described here.

[0127] A computer readable storage medium, the computer readable storage medium stores a computer program, the computer program is run by the processor to execute the steps of the GPU resource dynamic allocation method as described.

[0128] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working process of the above described system and device can refer to the corresponding process in the method embodiment, and will not be described here in the present application. In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented by other ways. The above described device embodiment is only schematic, for example, the division of the modules is only a logical function division, and actual implementation can have another division way, and for example, a plurality of modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed each other can be through some communication interface, indirect coupling or communication connection between the devices or modules, which can be electrical, mechanical or other forms.

[0129] The modules described as separate components may or may not be physically separate, and the components displayed as modules may or may not be physical units, i.e., may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.

[0130] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present alone, or two or more units can be integrated in one unit.

[0131] If the functions are realized in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer readable storage medium executable by a processor. Based on this understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a plurality of instructions for causing a computer device (which can be a personal computer, a platform server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk, and various program code storage media.

[0132] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A method for dynamically allocating GPU resources, characterized in that, The method includes: The system collects real-time running data of multiple cloud games belonging to a target tenant on a cloud gaming platform. This real-time running data includes game type, number of user sessions, event type, GPU utilization, video memory usage, video encoding frame rate, and end-to-end latency. The system inputs this real-time running data of the multiple cloud games into a pre-trained load prediction model. The load prediction model processes this data to determine the total predicted GPU resource demand for the multiple cloud games within a future target time window and the predicted GPU resource demand for each cloud game. Adjust the total amount of GPU resource in the target tenant's GPU resource pool based on the total predicted GPU resource demand of multiple cloud games; In the adjusted GPU resource pool, the target GPU resource adjustment amount for each cloud game is determined based on the predicted GPU resource requirements, preset frame rate, and preset latency target value. Each cloud game corresponds to a game type-resource requirement profile, which represents the attribute requirements of the GPU instance matched to the cloud game. Based on the target GPU resource adjustment amount and game type-resource requirement profile of the cloud game, the target GPU instance of the cloud game is determined in the resource pool after the total resource amount is adjusted; the target GPU instance matches the target GPU resource adjustment amount and attribute requirements of the cloud game.

2. The GPU resource dynamic allocation method according to claim 1, characterized in that, The adjustment of the total GPU resource pool of the target tenant based on the total predicted GPU resource demand of multiple cloud games includes: The total predicted GPU resource demand of multiple cloud games is compared with the current total resource quantity in the GPU resource pool to determine the total resource quantity comparison result. If the total resource comparison result indicates insufficient resources, a resource expansion instruction is generated; the resource expansion instruction includes the number of first GPU instances; If the total resource comparison result is that there is a resource surplus, a resource reduction instruction is generated; the resource reduction instruction includes the number of second GPU instances; Execute the resource expansion or resource reduction instruction to adjust the total amount of resources in the GPU resource pool.

3. The GPU resource dynamic allocation method according to claim 1, characterized in that, In the adjusted GPU resource pool, the target GPU resource adjustment amount for each cloud game is determined based on the predicted GPU resource demand, preset frame rate, and preset latency target value. This includes: determining the basic GPU resource adjustment amount for each cloud game based on the predicted GPU resource demand. Based on the aforementioned basic GPU resource adjustment amount, GPU instances are scheduled for the cloud game, and the real-time average frame rate and real-time latency of the cloud game after instance scheduling are monitored. Based on the comparison results of the real-time average frame rate and the preset frame rate, the real-time latency and the preset latency, the target GPU resource adjustment amount for the cloud game is determined.

4. The GPU resource dynamic allocation method according to claim 3, characterized in that, Based on the comparison results of the real-time average frame rate and the preset frame rate, real-time latency, and the preset latency, the target GPU resource adjustment amount for the cloud game is determined, including: When expanding capacity, if the real-time average frame rate is lower than the first preset frame rate threshold, and / or the real-time latency is higher than the first preset latency threshold, then the resource adjustment amount is increased; the first preset frame rate threshold is determined by the ratio of a preset frame rate and a first preset frame rate tolerance; the first preset latency threshold is determined by the ratio of a preset latency and a first preset latency tolerance. When scaling down, if the real-time average frame rate is lower than the second preset frame rate threshold, and / or the real-time latency is higher than the second preset latency threshold, then the amount of resources to be released is reduced; the second preset frame rate threshold is determined by the ratio of the preset frame rate and the second preset frame rate tolerance; the second preset latency threshold is determined by the ratio of the preset latency and the first preset latency tolerance.

5. The GPU resource dynamic allocation method according to claim 1, characterized in that, Based on the target GPU resource adjustment amount and game type-resource requirement profile for this cloud game, the target GPU instances for this type of cloud game are determined in the resource pool after the total resource amount has been adjusted; including: Based on the GPU instance attribute requirements defined in the game type-resource requirement profile, candidate GPU instances that meet the GPU instance attribute requirements are selected from the resource pool; according to the preset cost-optimal strategy and / or performance-optimal strategy corresponding to the cloud game, a target GPU instance that meets the target GPU resource adjustment amount is selected from the candidate GPU instances.

6. The GPU resource dynamic allocation method according to claim 5, characterized in that, Based on the preset cost-optimal strategy and / or performance-optimal strategy corresponding to the cloud gaming, a target GPU instance that meets the target GPU resource adjustment amount is selected from the candidate GPU instances, including: Based on the real-time average frame rate and real-time latency of the cloud game, the system dynamically determines whether to use the cost-optimal strategy or the performance-optimal strategy for this scheduling. If the cost-optimal strategy is enabled, candidate GPU instances are sorted from low to high based on their unit time cost. If the performance optimization strategy is enabled, candidate GPU instances are sorted from highest to lowest according to their predefined performance scores. The target GPU instance is determined according to the sorting order and the target GPU resource adjustment amount.

7. The GPU resource dynamic allocation method according to claim 6, characterized in that, Based on the real-time average frame rate and real-time latency of the cloud game, the system dynamically determines whether to use the most cost-effective or most performance-effective strategy for this scheduling, including: Determine whether the real-time average frame rate is lower than a third preset frame rate threshold, and / or whether the real-time latency is higher than the third preset latency threshold; the third preset frame rate threshold is determined by a preset frame rate and a third preset frame rate tolerance ratio; the third preset latency threshold is determined by a preset latency and a third preset latency tolerance ratio. If any judgment result is yes, then the optimal performance strategy will be used for this scheduling. If all the judgment results are negative, then the cost-optimal strategy will be used for this scheduling.

8. A GPU resource dynamic allocation device, characterized in that, The device includes: The acquisition module is used to acquire real-time running data of multiple cloud games of a target tenant in the cloud gaming platform; the real-time running data includes game type, number of user sessions, event type, GPU utilization, video memory usage, video encoding frame rate, and end-to-end latency; the first determination module is used to input the real-time running data of the multiple cloud games into a pre-trained load prediction model, process the real-time running data of the multiple cloud games through the load prediction model, and determine the total predicted GPU resource demand of the multiple cloud games and the predicted GPU resource demand value of each cloud game within a future target time window; The adjustment module is used to adjust the total amount of resources in the target tenant's GPU resource pool based on the predicted total amount of GPU resource demand for multiple cloud games. The second determining module is used to determine the target GPU resource adjustment amount for each cloud game in the adjusted GPU resource pool based on the predicted GPU resource requirements, preset frame rate, and preset latency target value for each cloud game; wherein, each cloud game corresponds to a game type-resource requirement profile, which represents the attribute requirements of the GPU instance matched by the cloud game; The third determining module is used to determine the target GPU instance of the cloud game in the resource pool after the total resource volume is adjusted, based on the target GPU resource adjustment amount and game type-resource requirement profile of the cloud game; the target GPU instance matches the target GPU resource adjustment amount and attribute requirements of the cloud game.

9. An electronic device, characterized in that, include: The device includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, the steps of the GPU resource dynamic allocation method as described in any one of claims 1 to 7 are performed.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the GPU resource dynamic allocation method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Adaptive scheduling host system and scheduling method of GPU virtual resources in cloud game

    CN103309748A

  • User SLO modeling method and device based on application performance prediction model

    CN115934343A

  • Cloud game scene intelligent scheduling method and system based on deep dual reinforcement learning

    CN116360946A

  • Cloud game load scheduling method and system based on fine-grained scene splitting

    CN118304641A

  • Cloud game resource dynamic allocation and management system

    CN119105864A