Cloud game resource dynamic allocation and management system
The cloud game resource dynamic allocation system addresses unpredictable user behavior by combining CNN and LSTM for prediction, linear regression for demand calculation, and real-time monitoring, ensuring efficient and stable resource management.
Patent Information
- Application Number
- CN202411101453.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2024-12-10
AI Technical Summary
Existing cloud gaming systems face challenges in dynamically managing resource allocation due to unpredictable user behavior and demand fluctuations, leading to inefficiencies, response delays, and potential server failures, as traditional methods struggle to adapt to complex and changing user behaviors.
A cloud game resource dynamic allocation system utilizing a hybrid model combining convolutional neural networks (CNN) and long short-term memory networks (LSTM) for user behavior prediction, linear regression for resource demand calculation, and a resource allocation strategy optimized by a greedy algorithm and reinforcement learning, with real-time monitoring and automatic adjustments.
The system accurately predicts resource demands, ensures optimal utilization, and continuously optimizes resource allocation to maintain system stability and efficiency by dynamically responding to changes in user behavior and environmental factors.
Smart Images

Figure CN119105864A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of resource scheduling, and in particular to a method and system for dynamically allocating and managing cloud game resources. Background Art
[0002] With the development of cloud computing technology, cloud gaming is becoming a new form of entertainment and is becoming increasingly popular. Cloud gaming places the computing and rendering of games on cloud servers, so users can experience high-quality gaming content on their terminal devices simply through a network connection. This model reduces user requirements for hardware devices and provides game manufacturers with more flexible content updates and operations. However, with the increase in the number of users and the enrichment of game content, the technical challenges faced by cloud gaming are also gradually intensifying.
[0003] In the existing cloud gaming environment, user behavior is highly diverse and unpredictable, resulting in large fluctuations in resource demand. Behavioral data such as user gaming duration, active time periods, and consumption behavior show large individual differences and time dependence. These factors directly affect the resource utilization of cloud computing nodes. For example, during peak hours when users log in and use the system in large numbers, resource utilization such as CPU usage, memory usage, and network bandwidth of cloud computing nodes will increase significantly; while during off-peak hours, these resource utilization rates will decrease significantly. This volatility in resource demand poses a challenge to the operation of cloud gaming, especially when resources are improperly allocated, which may lead to system response delays, reduced user experience, and even server failures.
[0004] At present, most of the existing resource allocation strategies rely on static prediction models or simple time series analysis. This approach cannot fully consider the complexity of user behavior and the dynamic changes in resource demand. For example, traditional resource allocation methods are usually based on fixed user behavior patterns and historical data for linear prediction, which is difficult to cope with sudden large-scale user influxes or abnormal events. In these cases, resource allocation strategies may not be adjusted in time, resulting in low resource utilization or insufficient resource allocation. In addition, the existing monitoring and adjustment mechanisms lack real-time and automated processing capabilities. Abnormal resource usage usually requires manual intervention, which not only increases operating costs, but may also affect the stability of the game and user experience due to response delays.
[0005] Based on the above problems, existing technologies have obvious deficiencies in dealing with complex and changeable user behaviors and resource demands. The scale of cloud games continues to expand, and the complexity of resource management also increases. Traditional resource allocation methods are difficult to adapt to the needs of this complex environment. Therefore, exploring new technical solutions to accurately predict resource demands and dynamically optimize resource allocation has become an important direction in the field of cloud gaming technology. Summary of the invention
[0006] In order to solve the above technical problems, the present invention provides a cloud game resource dynamic allocation and management system;
[0007] A cloud game resource dynamic allocation and management system, the system comprising:
[0008] The first prediction module is used to obtain user behavior data of the cloud game in the first time period, and input the user behavior data into a preset resource prediction model to obtain a prediction of the resource utilization rate of the cloud game in the second time period;
[0009] The second prediction module is used to obtain the resource utilization rate of the cloud game and input the demand value prediction model to obtain the current resource demand value;
[0010] Environmental analysis module: used for obtaining environmental parameter data of the cloud game, inputting the environmental parameter data as input data into the pre-trained random forest model to obtain error adjustment data, and correcting the resource demand value based on the error adjustment data;
[0011] Resource allocation module: used to generate resource allocation strategies for cloud games based on user behavior data, corrected resource demand values, and environmental parameter data;
[0012] Allocation execution module: used to execute resource allocation plan according to resource allocation strategy and monitor resource usage in real time;
[0013] Allocation evaluation module: used to evaluate the resource allocation effect and iteratively optimize the resource prediction model and allocation strategy based on the evaluation results.
[0014] Furthermore, the user behavior data includes game duration, active time period and in-game consumption behavior data.
[0015] Furthermore, the steps for generating the resource prediction model are as follows:
[0016] a1: Obtain historical resource data of cloud games, where the historical resource data includes user behavior data and corresponding resource utilization rates;
[0017] a2: Divide the historical resource data into a historical resource training set and a historical resource test set. Based on the convolutional neural network (CNN) part, construct n convolutional layers and pooling layers, where n is an integer greater than 0, to obtain local features of user behavior data. The convolutional layer is used to identify local changes in behavior patterns, and the pooling layer is used to reduce the dimension of the feature map.
[0018] a3: Input the features extracted by the convolutional neural network (CNN) into the long short-term memory network (LSTM) to capture the time series characteristics of user behavior data;
[0019] a4: Based on the output of the convolutional neural network (CNN) and the long short-term memory network (LSTM), a hybrid network is constructed with the user behavior data in the historical resource training set as input and the resource utilization rate in the historical resource training set as output;
[0020] a5: Train the hybrid network based on the back propagation algorithm and the historical processing training set, and verify the hybrid network using the historical resource test set;
[0021] a6: Output a hybrid network that is less than or equal to a preset first test error threshold as a resource prediction model.
[0022] Furthermore, the resource utilization data includes the CPU usage, memory occupancy, network bandwidth usage and the total number of current tasks of each node of the cloud computing node where the cloud game is located. These resource utilization data are analyzed through the demand value prediction model to generate a resource demand value.
[0023] Furthermore, the generation logic of the demand value prediction model is:
[0024] Assume that the CPU usage of the cloud computing node is U k , memory usage M k 、Network bandwidth utilization rate B k and the total number of current tasks T for each node k , k is an integer greater than 0, construct the input feature Xz of the linear regression model:
[0025] Xz={[U1,M1,B1,T1],[U2,M2,B2,T2],……,[U k ,M k ,B k ,T k ]}; where k is the number of data samples;
[0026] The target variable of the linear regression model is set to the resource demand value, and the logical formula of the resource demand value is:
[0027] Yx=[y1,y2,y3,…,y n ]; where Yx is the resource demand value;
[0028] Construct a loss function for the linear regression model. The logical formula of the loss function is: Among them, Q is the loss function of the linear regression model, y i is the i-th resource demand value among n, i is greater than 0 and less than or equal to n; The predicted value of resource demand, Among them, W is the model weight parameter and B is the bias term;
[0029] The loss function is optimized by the gradient descent method, and the first influencing parameter and the second influencing parameter of the linear regression model are updated. The logical formula of the first influencing parameter and the second influencing parameter is: Among them, α is the model learning rate, and are the gradients of the loss function with respect to the first and second parameters of the model, respectively;
[0030] The linear regression model after loss function optimization is used as the final demand value prediction model.
[0031] Furthermore, the environmental parameter data includes the network delay of the target data center, the temperature of the data center and the operating energy consumption; the historical correlation between the environmental parameter data and the resource demand of the cloud game is analyzed through the random forest model to obtain the error adjustment data of the resource demand under the change of environmental parameters.
[0032] Furthermore, the steps of generating a resource allocation strategy are as follows:
[0033] P1: Input the corrected resource demand value into the resource allocation model. The resource allocation model calculates the resource allocation amount of each cloud computing node based on user behavior data and environmental parameter data.
[0034] P2: Use the greedy algorithm to perform preliminary optimization on resource allocation to ensure that the resource requirements of high-priority tasks are met first. The specific steps are as follows:
[0035] Sort all tasks by priority, and the tasks with higher priority will be allocated resources first;
[0036] According to the resource demand value of each task, the corresponding cloud computing node resources are allocated. If the current cloud computing node resources are insufficient, they will be transferred to the next node;
[0037] P3: Combine historical resource allocation data to optimize resource adjustment strategies;
[0038] The resource allocation model gradually optimizes future resource allocation strategies by continuously learning the differences between historical allocation results and actual resource consumption; the reward function provides feedback based on actual resource utilization and task completion efficiency, and optimizes the resource allocation strategy by maximizing cumulative rewards.
[0039] Furthermore, the resource allocation plan execution logic is:
[0040] R1: Allocate the allocated resources to the corresponding cloud computing nodes through the API interface and start task execution;
[0041] R2: Use the monitoring system to collect key data such as resource utilization and task execution progress of each cloud computing node in real time;
[0042] R3: If the monitoring system finds that the resource usage of a node is abnormal, it triggers the automatic adjustment mechanism to migrate the task to other nodes with sufficient resources;
[0043] R4: Dynamically adjust task allocation based on task priority, current node load and resource demand value.
[0044] Furthermore, the steps for evaluating the resource allocation effect are as follows:
[0045] E1: Collect resource usage data after execution, including actual resource demand value, task completion time, and user response time;
[0046] E2: Compare and analyze the predicted resource demand value and calculate the resource prediction error and allocation error ratio; the logical formula for resource prediction error is: Among them, Sz is the actual resource demand value; Sc is the predicted corrected resource demand value, and β is the resource prediction error;
[0047] E3: Analyze the source of the error. If the error is large, check the input data and parameter settings of the resource prediction model, consider whether there are unconsidered environmental factors or abnormal user behaviors, and optimize the resource prediction model based on the error analysis results, adjust the model parameters and iteratively optimize the resource allocation strategy.
[0048] A method for dynamically allocating and managing cloud game resources, the method being applied to the cloud game resource dynamic allocation and management system, the method comprising:
[0049] Obtaining user behavior data of the cloud game in a first time period, and inputting the user behavior data into a preset resource prediction model to obtain a prediction of resource utilization of the cloud game in a second time period;
[0050] Obtain resource utilization of cloud games and input into the demand value prediction model to obtain the current resource demand value;
[0051] Obtaining environmental parameter data of the cloud game, inputting the environmental parameter data into a pre-trained random forest model as input data to obtain error adjustment data, and correcting the resource demand value based on the error adjustment data;
[0052] Generate a resource allocation strategy for cloud games based on user behavior data, revised resource demand values, and environmental parameter data;
[0053] Execute resource allocation plans according to resource allocation strategies and monitor resource usage in real time;
[0054] Evaluate the resource allocation effect and iteratively optimize the resource prediction model and allocation strategy based on the evaluation results.
[0055] Compared with the prior art, the present invention has the following beneficial effects:
[0056] The present invention constructs a dynamic resource prediction and allocation model by introducing user behavior data, resource utilization data and environmental parameter data. By combining convolutional neural network (CNN) and long short-term memory network (LSTM), the user's behavior pattern is deeply analyzed to predict future resource demand values, thereby more accurately predicting resource utilization. The resource demand value is further calculated by combining with linear regression model, ensuring the accuracy and reliability in the resource demand prediction process. Based on this, the generated resource allocation strategy can dynamically respond to changes in user behavior, thereby ensuring the optimal utilization of resources.
[0057] The present invention corrects the errors of resource demand values, utilizes greedy algorithms and reinforcement learning mechanisms, and continuously optimizes resource allocation strategies to ensure that the resource demands of high-priority tasks are met first. Through real-time monitoring and automatic adjustment mechanisms, the system can respond quickly to abnormal resource usage and migrate tasks to nodes with sufficient resources, thereby further improving the stability and operating efficiency of the system. Finally, through a closed-loop optimization process, the resource allocation effect is continuously evaluated, and the resource prediction model and allocation strategy are iteratively improved, thereby achieving efficient and intelligent cloud game resource management. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0059] Figure 1 A module diagram of a cloud gaming resource dynamic allocation and management system provided by Embodiment 1 of the present invention;
[0060] Figure 2 This is a flow chart of a method for dynamically allocating and managing cloud gaming resources provided in Example 2 of the present invention. DETAILED DESCRIPTION
[0061] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0062] Example 1
[0063] See also Figure 1 As shown, this embodiment discloses a cloud game resource dynamic allocation and management system, the system comprising:
[0064] The first prediction module S101 is used to obtain user behavior data of a cloud game in a first time period, and input the user behavior data into a preset resource prediction model to obtain a resource utilization rate of the cloud game in a second time period;
[0065] Specifically, the user behavior data includes game duration, active time period, and in-game consumption behavior data;
[0066] Specifically, the steps for generating the resource prediction model are as follows:
[0067] a1: Obtain historical resource data of cloud games, where the historical resource data includes user behavior data and corresponding resource utilization rates;
[0068] It should be noted that: the game duration is in minutes, and the active time period is in hours. For example, if the player's game active time period is from 2:00 to 3:15, then the player's active interval is divided into 2:00 to 4:00. The in-game consumption behavior includes the consumption amount and the types of virtual items purchased;
[0069] a2: Divide the historical resource data into a historical resource training set and a historical resource test set. Based on the convolutional neural network (CNN) part, construct n convolutional layers and pooling layers, where n is an integer greater than 0, to obtain local features of user behavior data. The convolutional layer is used to identify local changes in behavior patterns, and the pooling layer is used to reduce the dimension of the feature map.
[0070] a3: Input the features extracted by the convolutional neural network (CNN) into the long short-term memory network (LSTM) to capture the time series characteristics of user behavior data;
[0071] It should be noted that: LSTM can effectively handle the long-term dependencies of user behaviors through its memory units;
[0072] a4: Based on the output of the convolutional neural network (CNN) and the long short-term memory network (LSTM), a hybrid network is constructed with the user behavior data in the historical resource training set as input and the resource utilization rate in the historical resource training set as output.
[0073] a5: Train the hybrid network based on the back propagation algorithm and the historical processing training set, and verify the hybrid network using the historical resource test set;
[0074] It should be noted that training the resource prediction model based on the back-propagation algorithm and the historical processing training set can reduce the prediction error of the resource prediction model, and validating the model using the historical processing test set can ensure its generalization ability on different data sets;
[0075] a6: Output a hybrid network that is less than or equal to a preset first test error threshold as a resource prediction model.
[0076] It should be noted that the generated resource prediction model can effectively predict the resource demand value corresponding to user behavior data, providing a reliable basis for subsequent resource allocation.
[0077] The second prediction module S102 is used to obtain the resource utilization rate of the cloud game and input the demand value prediction model to obtain the current resource demand value;
[0078] Specifically, the resource utilization data includes the CPU utilization, memory usage, network bandwidth utilization and the total number of current tasks of each node of the cloud computing node where the cloud game is located. The resource utilization data are analyzed by the demand value prediction model to generate a resource demand value;
[0079] It should be noted that: the CPU usage is expressed in percentage, the memory usage is in GB, and the network bandwidth usage is in Mbps;
[0080] Specifically, the generation logic of the demand value prediction model is:
[0081] Assume that the CPU usage of the cloud computing node is U k , memory usage M k 、Network bandwidth utilization rate B k and the total number of current tasks T for each node k , k is an integer greater than 0, construct the input feature Xz of the linear regression model:
[0082] Xz={[U1,M1,B1,T1],[U2,M2,B2,T2],……,[U k ,M k ,B k ,T k ]}; where k is the number of data samples;
[0083] The target variable of the linear regression model is set to the resource demand value, and the logical formula of the resource demand value is:
[0084] Yx=[y1,y2,y3,…,y n ]; where Yx is the resource demand value;
[0085] Construct a loss function for the linear regression model. The logical formula of the loss function is: Among them, Q is the loss function of the linear regression model, y i is the i-th resource demand value among n, i is greater than 0 and less than or equal to n; The predicted value of resource demand, Among them, W is the model weight parameter and B is the bias term;
[0086] The loss function is optimized by the gradient descent method, and the first influencing parameter and the second influencing parameter of the linear regression model are updated. The logical formula of the first influencing parameter and the second influencing parameter is: Among them, α is the model learning rate, and are the gradients of the loss function with respect to the first and second parameters of the model, respectively;
[0087] The linear regression model after loss function optimization is used as the final demand value prediction model.
[0088] Environmental analysis module S103: used to obtain environmental parameter data of the cloud game, input the environmental parameter data as input data into a pre-trained random forest model to obtain error adjustment data, and correct the resource demand value based on the error adjustment data;
[0089] The environmental parameter data includes the network delay of the target data center, the temperature of the data center and the operating energy consumption; the historical correlation between the environmental parameter data and the resource demand of the cloud game is analyzed by the random forest model to obtain the error adjustment data of the resource demand under the change of environmental parameters.
[0090] It should be noted that the environmental parameter data is in milliseconds, and the data center temperature is in degrees Celsius.
[0091] Resource allocation module S104: used to generate a resource allocation strategy for the cloud game based on the user behavior data, the corrected resource demand value and the environmental parameter data;
[0092] Specifically, the steps of generating the resource allocation strategy are as follows:
[0093] P1: Input the corrected resource demand value into the resource allocation model. The resource allocation model calculates the resource allocation amount of each cloud computing node based on user behavior data and environmental parameter data.
[0094] P2: Use the greedy algorithm to perform preliminary optimization on resource allocation to ensure that the resource requirements of high-priority tasks are met first. The specific steps are as follows:
[0095] Sort all tasks by priority, and the tasks with higher priority will be allocated resources first;
[0096] According to the resource requirement value of each task, the corresponding cloud computing node resources are allocated. If the current cloud computing node resources are insufficient, they are transferred to the next node.
[0097] P3: Combine historical resource allocation data to optimize resource adjustment strategies;
[0098] The resource allocation model gradually optimizes the future resource allocation strategy by continuously learning the differences between historical allocation results and actual resource consumption; the reward function provides feedback based on actual resource utilization and task completion efficiency, and optimizes the resource allocation strategy by maximizing the cumulative reward.
[0099] Allocation execution module S105; used to execute resource allocation plan according to resource allocation strategy and monitor resource usage in real time;
[0100] Specifically, the resource allocation plan execution logic is:
[0101] R1: Allocate the allocated resources to the corresponding cloud computing nodes through the API interface and start task execution;
[0102] R2: Use the monitoring system to collect key data such as resource utilization and task execution progress of each cloud computing node in real time;
[0103] R3: If the monitoring system finds that the resource usage of a node is abnormal, it triggers the automatic adjustment mechanism to migrate the task to other nodes with sufficient resources;
[0104] It should be noted that the resource usage abnormalities include but are not limited to excessive CPU usage, memory overflow, etc.
[0105] R4: Dynamically adjust task allocation based on task priority, current node load and resource demand value.
[0106] Allocation evaluation module S106: used to evaluate the resource allocation effect and iteratively optimize the resource prediction model and allocation strategy based on the evaluation results;
[0107] Specifically, the steps for evaluating the resource allocation effect are as follows:
[0108] E1: Collect resource usage data after execution, including actual resource demand value, task completion time, and user response time;
[0109] E2: Compare and analyze the predicted resource demand value and calculate the resource prediction error and allocation error ratio; the logical formula for resource prediction error is: Among them, Sz is the actual resource demand value; Sc is the predicted corrected resource demand value, and β is the resource prediction error;
[0110] E3: Analyze the source of the error. If the error is large, check the input data and parameter settings of the resource prediction model, consider whether there are unconsidered environmental factors or abnormal user behaviors, and optimize the resource prediction model based on the error analysis results, adjust the model parameters and iteratively optimize the resource allocation strategy.
[0111] Example 2
[0112] See also Figure 2 As shown, based on the unified inventive concept, this embodiment discloses a method for dynamically allocating and managing cloud game resources, the method comprising:
[0113] S201: Obtaining user behavior data of a cloud game in a first time period, and inputting the user behavior data into a preset resource prediction model to obtain a prediction of resource utilization of the cloud game in a second time period;
[0114] Specifically, the user behavior data includes game duration, active time period, and in-game consumption behavior data;
[0115] Specifically, the steps for generating the resource prediction model are as follows:
[0116] a1: Obtain historical resource data of cloud games, where the historical resource data includes user behavior data and corresponding resource utilization rates;
[0117] a2: Divide the historical resource data into a historical resource training set and a historical resource test set. Based on the convolutional neural network (CNN) part, construct n convolutional layers and pooling layers, where n is an integer greater than 0, to obtain local features of user behavior data. The convolutional layer is used to identify local changes in behavior patterns, and the pooling layer is used to reduce the dimension of the feature map.
[0118] a3: Input the features extracted by the convolutional neural network (CNN) into the long short-term memory network (LSTM) to capture the time series characteristics of user behavior data;
[0119] a4: Based on the output of the convolutional neural network (CNN) and the long short-term memory network (LSTM), a hybrid network is constructed with the user behavior data in the historical resource training set as input and the resource utilization rate in the historical resource training set as output.
[0120] a5: Train the hybrid network based on the back propagation algorithm and the historical processing training set, and verify the hybrid network using the historical resource test set;
[0121] a6: Output a hybrid network that is less than or equal to a preset first test error threshold as a resource prediction model.
[0122] S202: Obtain resource utilization of the cloud game and input into the demand value prediction model to obtain the current resource demand value;
[0123] Specifically, the resource utilization data includes the CPU utilization, memory usage, network bandwidth utilization and the total number of current tasks of each node of the cloud computing node where the cloud game is located. The resource utilization data are analyzed by the demand value prediction model to generate a resource demand value;
[0124] Specifically, the generation logic of the demand value prediction model is:
[0125] Assume that the CPU usage of the cloud computing node is U k , memory usage M k 、Network bandwidth utilization rate B k and the total number of current tasks T for each node k , k is an integer greater than 0, construct the input feature Xz of the linear regression model:
[0126] Xz={[U1,M1,B1,T1],[U2,M2,B2,T2],……,[U k ,M k ,B k ,T k ]}; where k is the number of data samples;
[0127] The target variable of the linear regression model is set to the resource demand value, and the logical formula of the resource demand value is:
[0128] Yx=[y1,y2,y3,…,y n ]; where Yx is the resource demand value;
[0129] Construct a loss function for the linear regression model. The logical formula of the loss function is: Among them, Q is the loss function of the linear regression model, y i is the i-th resource demand value among n, i is greater than 0 and less than or equal to n; The predicted value of resource demand, Among them, W is the model weight parameter and B is the bias term;
[0130] The loss function is optimized by the gradient descent method, and the first influencing parameter and the second influencing parameter of the linear regression model are updated. The logical formula of the first influencing parameter and the second influencing parameter is: Among them, α is the model learning rate, and are the gradients of the loss function with respect to the first and second parameters of the model, respectively;
[0131] The linear regression model after loss function optimization is used as the final demand value prediction model.
[0132] S203: Obtaining environmental parameter data of the cloud game, and inputting the environmental parameter data into a pre-trained random forest model as input data to obtain error adjustment data, and correcting the resource demand value based on the error adjustment data;
[0133] Specifically, the environmental parameter data includes the network delay of the target data center, the temperature of the data center and the operating energy consumption; the historical correlation between the environmental parameter data and the resource demand of the cloud game is analyzed through the random forest model to obtain the error adjustment data of the resource demand under the change of environmental parameters.
[0134] S204: Generate a resource allocation strategy for the cloud game based on the user behavior data, the corrected resource demand value, and the environmental parameter data;
[0135] Specifically, the steps of generating the resource allocation strategy are as follows:
[0136] P1: Input the corrected resource demand value into the resource allocation model. The resource allocation model calculates the resource allocation amount of each cloud computing node based on user behavior data and environmental parameter data.
[0137] P2: Use the greedy algorithm to perform preliminary optimization on resource allocation to ensure that the resource requirements of high-priority tasks are met first. The specific steps are as follows:
[0138] Sort all tasks by priority, and the tasks with higher priority will be allocated resources first;
[0139] According to the resource requirement value of each task, the corresponding cloud computing node resources are allocated. If the current cloud computing node resources are insufficient, they are transferred to the next node.
[0140] P3: Combine historical resource allocation data to optimize resource adjustment strategies;
[0141] The resource allocation model gradually optimizes the future resource allocation strategy by continuously learning the differences between historical allocation results and actual resource consumption; the reward function provides feedback based on actual resource utilization and task completion efficiency, and optimizes the resource allocation strategy by maximizing the cumulative reward.
[0142] S205: Execute the resource allocation plan according to the resource allocation strategy and monitor resource usage in real time;
[0143] Specifically, the resource allocation plan execution logic is:
[0144] R1: Allocate the allocated resources to the corresponding cloud computing nodes through the API interface and start task execution;
[0145] R2: Use the monitoring system to collect key data such as resource utilization and task execution progress of each cloud computing node in real time;
[0146] R3: If the monitoring system finds that the resource usage of a node is abnormal, it triggers the automatic adjustment mechanism to migrate the task to other nodes with sufficient resources;
[0147] R4: Dynamically adjust task allocation based on task priority, current node load and resource demand value.
[0148] S206: Evaluate the resource allocation effect, and iteratively optimize the resource prediction model and allocation strategy based on the evaluation result;
[0149] Specifically, the steps for evaluating the resource allocation effect are as follows:
[0150] E1: Collect resource usage data after execution, including actual resource demand value, task completion time, and user response time;
[0151] E2: Compare and analyze the predicted resource demand value and calculate the resource prediction error and allocation error ratio; the logical formula for resource prediction error is: Among them, Sz is the actual resource demand value; Sc is the predicted corrected resource demand value, and β is the resource prediction error;
[0152] E3: Analyze the source of the error. If the error is large, check the input data and parameter settings of the resource prediction model, consider whether there are unconsidered environmental factors or abnormal user behaviors, and optimize the resource prediction model based on the error analysis results, adjust the model parameters and iteratively optimize the resource allocation strategy.
[0153] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented by software, the above embodiments 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 or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center through a wired network or a wireless network. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD) or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.
[0154] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the present invention can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0155] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0156] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a cloud game resource dynamic allocation and management system. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0157] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0158] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0159] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
[0160] Finally: The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A cloud game resource dynamic allocation and management system, characterized in that: The system comprises: The first prediction module is used to obtain user behavior data of the cloud game in the first time period, and input the user behavior data into a preset resource prediction model to obtain a prediction of the resource utilization rate of the cloud game in the second time period; The second prediction module is used to obtain the resource utilization rate of the cloud game and input the demand value prediction model to obtain the current resource demand value; Environmental analysis module: used for obtaining environmental parameter data of the cloud game, inputting the environmental parameter data as input data into the pre-trained random forest model to obtain error adjustment data, and correcting the resource demand value based on the error adjustment data; Resource allocation module: used to generate resource allocation strategies for cloud games based on user behavior data, corrected resource demand values, and environmental parameter data; Allocation execution module: used to execute resource allocation plan according to resource allocation strategy and monitor resource usage in real time; Allocation evaluation module: used to evaluate the resource allocation effect and iteratively optimize the resource prediction model and allocation strategy based on the evaluation results.
2. The cloud game resource dynamic allocation and management system according to claim 1, characterized in that: The user behavior data includes game duration, active time period and in-game consumption behavior data.
3. The cloud game resource dynamic allocation and management system according to claim 2, characterized in that: The steps to generate the resource prediction model are as follows: a1: Obtain historical resource data of cloud games, where the historical resource data includes user behavior data and corresponding resource utilization rates; a2: Divide the historical resource data into a historical resource training set and a historical resource test set. Based on the convolutional neural network (CNN) part, construct n convolutional layers and pooling layers, where n is an integer greater than 0, to obtain local features of user behavior data. The convolutional layer is used to identify local changes in behavior patterns, and the pooling layer is used to reduce the dimension of the feature map. a3: Input the features extracted by the convolutional neural network (CNN) into the long short-term memory network (LSTM) to capture the time series characteristics of user behavior data; a4: Based on the output of the convolutional neural network (CNN) and the long short-term memory network (LSTM), a hybrid network is constructed with the user behavior data in the historical resource training set as input and the resource utilization rate in the historical resource training set as output; a5: Train the hybrid network based on the back propagation algorithm and the historical processing training set, and verify the hybrid network using the historical resource test set; a6: Output a hybrid network that is less than or equal to a preset first test error threshold as a resource prediction model.
4. The cloud gaming resource dynamic allocation and management system according to claim 3, characterized in that: The resource utilization data includes the CPU usage, memory occupancy, network bandwidth usage and the total number of current tasks of each node of the cloud computing node where the cloud game is located. These resource utilization data are analyzed through the demand value prediction model to generate a resource demand value.
5. The cloud gaming resource dynamic allocation and management system according to claim 4, characterized in that: The generation logic of the demand value prediction model is: Assume that the CPU usage of the cloud computing node is U k , memory usage M k , Network bandwidth utilization rate B k and the total number of current tasks T for each node k , k is an integer greater than 0, construct the input feature Xz of the linear regression model: Xz={[U1,M1,B1,T1],[U2,M2,B2,T2],……,[U k ,M k ,B k ,T k ]}; where k is the number of data samples; The target variable of the linear regression model is set to the resource demand value, and the logical formula of the resource demand value is: Yx=[y1,y2,y3,…,y n ]; where Yx is the resource demand value; Construct a loss function for the linear regression model. The logical formula of the loss function is: Among them, Q is the loss function of the linear regression model, y i is the i-th resource demand value among n, i is greater than 0 and less than or equal to n; The predicted value of resource demand, Among them, W is the model weight parameter and B is the bias term; The loss function is optimized by the gradient descent method, and the first influencing parameter and the second influencing parameter of the linear regression model are updated. The logical formula of the first influencing parameter and the second influencing parameter is: Among them, α is the model learning rate, and are the gradients of the loss function with respect to the first and second parameters of the model, respectively; The linear regression model after loss function optimization is used as the final demand value prediction model.
6. The cloud gaming resource dynamic allocation and management system according to claim 5, characterized in that: Environmental parameter data includes the network delay, data center temperature, and operating energy consumption of the target data center. The historical correlation between environmental parameter data and cloud game resource requirements is analyzed through a random forest model to obtain error adjustment data on resource requirements when environmental parameters change.
7. The cloud gaming resource dynamic allocation and management system according to claim 6, characterized in that: The steps to generate a resource allocation strategy are as follows: P1: Input the corrected resource demand value into the resource allocation model. The resource allocation model calculates the resource allocation amount of each cloud computing node based on user behavior data and environmental parameter data. P2: Use the greedy algorithm to perform preliminary optimization on resource allocation to ensure that the resource requirements of high-priority tasks are met first. The specific steps are as follows: Sort all tasks by priority, and the tasks with higher priority will be allocated resources first; According to the resource demand value of each task, the corresponding cloud computing node resources are allocated. If the current cloud computing node resources are insufficient, they will be transferred to the next node; P3: Combine historical resource allocation data to optimize resource adjustment strategies; The resource allocation model gradually optimizes future resource allocation strategies by continuously learning the differences between historical allocation results and actual resource consumption; The reward function provides feedback based on the actual resource utilization and task completion efficiency, and optimizes the resource allocation strategy by maximizing the cumulative reward.
8. The cloud gaming resource dynamic allocation and management system according to claim 7, characterized in that: The resource allocation plan execution logic is: R1: Allocate the allocated resources to the corresponding cloud computing nodes through the API interface and start task execution; R2: Use the monitoring system to collect key data such as resource utilization and task execution progress of each cloud computing node in real time; R3: If the monitoring system finds that the resource usage of a node is abnormal, it triggers the automatic adjustment mechanism to migrate the task to other nodes with sufficient resources; R4: Dynamically adjust task allocation based on task priority, current node load and resource demand value.
9. The cloud gaming resource dynamic allocation and management system according to claim 8, characterized in that: The steps for evaluating the resource allocation effect are as follows: E1: Collect resource usage data after execution, including actual resource demand value, task completion time, and user response time; E2: Compare and analyze the predicted resource demand value and calculate the resource prediction error and allocation error ratio; the logical formula for resource prediction error is: Among them, Sz is the actual resource demand value; Sc is the predicted corrected resource demand value, and β is the resource prediction error; E3: Analyze the source of the error. If the error is large, check the input data and parameter settings of the resource prediction model, consider whether there are unconsidered environmental factors or abnormal user behaviors, and optimize the resource prediction model based on the error analysis results, adjust the model parameters and iteratively optimize the resource allocation strategy.
10. A method for dynamically allocating and managing cloud game resources, the method being applied to the cloud game resource dynamic allocation and management system according to claim 1, characterized in that: The method comprises: Obtaining user behavior data of the cloud game in a first time period, and inputting the user behavior data into a preset resource prediction model to obtain a prediction of resource utilization of the cloud game in a second time period; Obtain resource utilization of cloud games and input into the demand value prediction model to obtain the current resource demand value; Obtaining environmental parameter data of the cloud game, inputting the environmental parameter data into a pre-trained random forest model as input data to obtain error adjustment data, and correcting the resource demand value based on the error adjustment data; Generate a resource allocation strategy for cloud games based on user behavior data, revised resource demand values, and environmental parameter data; Execute resource allocation plans according to resource allocation strategies and monitor resource usage in real time; Evaluate the resource allocation effect and iteratively optimize the resource prediction model and allocation strategy based on the evaluation results.
Citation Information
Cited By
Cloud server virtual machine management method and system
CN120011002A
5G-based adaptive network resource scheduling method
CN120076054A
Intelligent computing power and storage scheduling method and system of multi-service system
CN120144260A
An intelligent computing power and storage scheduling method and system of a multi-service system
CN120144260B
Light and shadow rendering method, system and device based on 2D image and storage medium
CN120451309A
