GPU intelligent scheduling method, system and device and medium
By performing task identification classification and load prediction on game scene information, combined with reinforcement learning to optimize load allocation strategy, the problem of GPU uneven load is solved, and load balancing and graph data processing efficiency is improved in high-complex scenarios.
Patent Information
- Application Number
- CN202411485185.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2025-02-14
AI Technical Summary
In high-complex game scenarios, the GPU is prone to uneven load conditions, resulting in unstable game operation, such as frame rate drop, picture stuttering or rendering delay, affecting player experience and reducing system performance.
By obtaining game scene information, performing task identification and classification, building load prediction models, performing reinforcement learning processing, optimizing load allocation strategies, realizing dynamic adjustment of GPUs, and ensuring load balancing.
Implement load balancing in high-complex scenarios, improve graphics data processing efficiency, improve game operation fluency and stability, and reduce GPU load pressure.
Smart Images

Figure CN119440818A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a GPU intelligent scheduling method, system, device and medium. Background Art
[0002] With the improvement of living standards, entertainment methods are becoming more and more abundant and diversified. In addition to traditional movies, music and sports activities, video games, as an emerging form of entertainment, have become an important part of many people's daily lives. The types and complexity of video games are increasing. From simple arcade games to 3D open world games with exquisite graphics, various types of games meet the needs of different players. However, these high-quality games often have higher requirements for computer hardware, especially for graphics processing units, or GPUs. In order to present more realistic graphics and more complex game scenes, modern games require powerful GPU performance support.
[0003] However, when the game's image quality is set to a high level or the scene design is more complex, the GPU will have an uneven load, which will cause the game to run unstably, such as frame rate drop, screen freeze or rendering delay. This will not only affect the player's gaming experience, but may also create additional burden on other components of the system, leading to a decline in overall performance. The above problems need to be solved. Summary of the invention
[0004] In order to achieve load balancing in highly complex scenarios and improve graphics data processing efficiency, the present application provides a GPU intelligent scheduling method, system, device and medium, which adopts the following technical solutions:
[0005] In a first aspect, the present application provides a GPU intelligent scheduling method, comprising:
[0006] Acquire game scene information, perform task identification and classification on the game scene information, and obtain classified data information;
[0007] Construct a load prediction model, input the classified data information into the load prediction model, and obtain load prediction result information;
[0008] Performing reinforcement learning processing on the load forecast result information to obtain reinforced forecast result information;
[0009] Load distribution processing is performed according to the enhanced prediction result information to obtain dynamic adjustment information acting on the GPU.
[0010] Preferably, the specific steps of performing reinforcement learning processing on the load forecast result information to obtain the reinforced forecast result information are:
[0011] The reinforcement learning algorithm model is used to optimize the load forecasting results to obtain enhanced forecasting result information.
[0012] Preferably, it also includes:
[0013] Obtain GPU operation status data, adjust the reinforcement learning algorithm model according to the GPU operation status data, optimize the reinforcement prediction result information, and obtain optimization strategy information;
[0014] Load distribution processing is performed according to the optimization strategy information, and dynamic adjustment information acting on the GPU is updated.
[0015] Preferably, the specific steps of constructing the load prediction model are:
[0016] Obtain GPU load history data and task characteristic data, train a prediction model according to the GPU load history data and task characteristic data, and obtain a load prediction model.
[0017] Preferably, the specific steps of inputting the classified data information into the load prediction model to obtain the load prediction result information are:
[0018] Input the classified data information into the long short-term memory network model for load forecasting to obtain peak forecast information;
[0019] Or input the classified data information into the autoregressive integrated moving average model for load forecasting to obtain load change forecast information;
[0020] Or input the classified data information into the XGBoost model for load prediction to obtain the scenario load information.
[0021] Preferably, the specific steps of optimizing the load forecasting result by using the reinforcement learning algorithm model to obtain the enhanced forecasting result information are:
[0022] Perform reinforcement learning processing on the load forecast result information according to the deep Q network algorithm model to obtain reinforced forecast result information;
[0023] Or, the load forecast result information is subjected to reinforcement learning processing according to the proximal strategy optimization algorithm model to obtain reinforced forecast result information;
[0024] Or, reinforcement learning is performed on the load prediction result information according to the A3C model to obtain enhanced prediction result information.
[0025] Preferably, the classified data information includes rendering task information, physical computing task information and AI task information.
[0026] In a second aspect, the present application provides a GPU intelligent scheduling system, including:
[0027] The identification and classification module is used to obtain game scene information, perform task identification and classification on the game scene information, and obtain classification data information;
[0028] The result prediction module is used to build a load prediction model, input the classified data information into the load prediction model, and obtain the load prediction result information;
[0029] A reinforcement learning module is used to perform reinforcement learning processing on the load forecast result information to obtain reinforced forecast result information;
[0030] The dynamic adjustment module is used to perform load distribution processing according to the enhanced prediction result information to obtain dynamic adjustment information acting on the GPU.
[0031] In a third aspect, the present application provides a GPU intelligent scheduling device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the GPU intelligent scheduling method as described above.
[0032] In a fourth aspect, the present application provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the GPU intelligent scheduling method as described above when running.
[0033] In summary, compared with the prior art, the technical solution provided by this application has at least the following beneficial effects:
[0034] The present application performs task identification and classification on the game scene information, determines the execution content included in the game scene information, and classifies it according to the execution content to obtain classified data information, inputs the classified data information into a pre-built load prediction model for prediction, obtains load prediction result information, performs reinforcement learning processing on the information, optimizes the GPU load distribution strategy, obtains reinforced prediction result information, and then obtains dynamic adjustment information based on the optimized reinforced prediction result information. The GPU is dynamically adjusted through the dynamic adjustment information to achieve load balancing in highly complex scenarios and improve the efficiency of graphics data processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 It is a flow chart of a GPU intelligent scheduling method described in an embodiment of the present application.
[0036] Figure 2 It is a flowchart of the specific steps for obtaining load prediction result information described in an embodiment of the present application.
[0037] Figure 3 It is a flowchart of the specific steps for obtaining enhanced prediction result information described in the embodiment of the present application.
[0038] Figure 4 It is a flowchart of the acquisition and processing of GPU operating status data described in the embodiment of the present application.
[0039] Figure 5 It is a module schematic diagram of a GPU intelligent scheduling system described in an embodiment of the present application.
[0040] Figure 6 It is a module schematic diagram of a GPU intelligent scheduling device described in an embodiment of the present application.
[0041] Description of reference numerals:
[0042] 1. Identification and classification module; 2. Result prediction module; 3. Reinforcement learning module; 4. Dynamic adjustment module. DETAILED DESCRIPTION
[0043] The following combination Figure 1-Figure 6 The present application is described in further detail. The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments and are not intended to be limiting.
[0044] When the game's image quality is set to a high level or the scene design is more complex, the GPU will have an uneven load, which will cause the game to run unstably, such as frame rate drop, screen freeze or rendering delay, which not only affects the player's gaming experience, but also puts additional burden on other components of the system, resulting in a decrease in overall performance.
[0045] In order to solve the above problems, achieve load balancing in highly complex scenarios, and improve graphics data processing efficiency, the present application provides a GPU intelligent scheduling method.
[0046] Reference Figure 1 , a GPU intelligent scheduling method involved in this application specifically includes:
[0047] Step S1: Acquire game scene information, perform task identification and classification on the game scene information, and obtain classification data information;
[0048] Step S2: construct a load prediction model, input the classified data information into the load prediction model, and obtain load prediction result information;
[0049] Step S3: Perform reinforcement learning processing on the load forecast result information to obtain reinforced forecast result information;
[0050] Step S4: Perform load distribution processing according to the enhanced prediction result information to obtain dynamic adjustment information acting on the GPU.
[0051] Specifically, the present application classifies the game scene information through task identification, determines the execution content included in the game scene information, and classifies it according to the execution content to obtain classified data information. Based on the classification results and the corresponding game scene information, the classified data information is input into the pre-built load prediction model for prediction to obtain load prediction result information. The load prediction result information is subjected to reinforcement learning processing, the GPU load distribution strategy is optimized, and the enhanced prediction result information is obtained. Then, the optimized enhanced prediction result information is processed to obtain dynamic adjustment information. The GPU is dynamically adjusted through the dynamic adjustment information to achieve load balancing in highly complex scenarios and improve the efficiency of graphics data processing.
[0052] The game scene information is data related to the game scene and input to the recognition and classification module in real time. The game scene information includes scene input based on OpenGL, scene input based on Unreal Engine, and scene input based on Unity.
[0053] In the case of OpenGL-based scene input for game scene information, the OpenGL rendering engine is used to input game scene data such as models, textures, and lighting effects into the system module for efficient rendering. OpenGL-based scene input is suitable for projects that require highly customized rendering, such as scenes with specific visual effects or high performance requirements. For example, in a large online game, the player enters a new city scene and loads all the 3D models, textures, and lighting effects of the scene into the system through the OpenGL engine.
[0054] In the case where the game scene information is based on the scene input of Unreal Engine, the rendering capabilities and data interface of Unreal Engine are used to input various data of complex game scenes into the system. The scene input based on Unreal Engine is suitable for large-scale game projects or scenes that require high-fidelity graphics effects, such as open world games or complex battle scenes. For example, when the player, current task, etc. enters a battle scene, all the characters, buildings, special effects and other related information in the scene are loaded and rendered in real time through Unreal Engine.
[0055] In the case where the game scene information is based on Unity's scene input, all game scene resources, such as models, animations, lighting and other related information, are input into the system through Unity's rendering pipeline. Unity-based scene input is suitable for small and medium-sized game projects, prototype development, and applications that need to be released across platforms, such as multiplayer online games or mobile games. For example, in a multiplayer online game, a player enters a copy and loads all the environment and target data of the copy through the Unity engine.
[0056] As one implementation method, the classified data information includes rendering task information, physical calculation task information and AI task information.
[0057] Specifically, the embodiment of the present application uses a deep learning algorithm to perform task identification and classification on the game scene information to obtain classified data information. The task identification and classification method of the present embodiment includes at least one of task classification based on TensorFlow, task classification based on PyTorch, and task classification based on Scikit-learn.
[0058] Among them, the task classification based on TensorFlow uses a pre-trained deep learning model to classify the input scene tasks, identifying tasks such as graphics rendering, AI computing, and physical simulation, such as using the ResNet model to classify the input scene tasks.
[0059] Task classification first involves data collection and preparation. Game scene data, such as rendered images, AI behavior records, physical calculation logs, and other information, is collected and preprocessed, including image scaling, normalization, noise removal, and other operations, to meet the input requirements of the deep learning model.
[0060] Then, features are extracted from the input image using a pre-trained ResNet model. ResNet captures high-level features in images through its deep network structure, including residual connections. Non-image data, such as text or logs, can be converted into a suitable format, such as vectorized text, before being input into the model. The extracted features are input into the fully connected layer for task classification. Based on the output of the model, the task type, such as graphics rendering, AI computing, or physical simulation, is identified, and a classification label is generated and associated with the original data.
[0061] Finally, based on the classification results, the system decides the specific tasks that need to be performed, such as processing target AI behavior, physical collision detection, or special effects rendering.
[0062] In one implementation example, the system detects that the player has entered a complex combat scene and uses the TensorFlow model to identify the target AI behaviors, physical collisions, and special effects rendering tasks that need to be processed.
[0063] The task classification based on PyTorch uses the trained convolutional neural network to classify the input scene tasks to obtain NPC dialogue, environmental interaction and real-time combat tasks, such as using a CNN network model to classify the input scene tasks.
[0064] Task classification begins with data collection and preparation, collecting and annotating game scene data, including images and other related information. Images are preprocessed, such as resizing and standardization, and data augmentation, such as rotation and cropping, is performed to improve the generalization ability of the model.
[0065] Then, features are extracted from the preprocessed image data using a convolutional neural network model, or CNN model. PyTorch allows for flexible definition of CNN architectures, capturing the spatial features of images through multiple convolutional and pooling layers for classification.
[0066] Task classification: The extracted features are passed through the fully connected layer to classify tasks and output the probability distribution of different tasks. The task type is marked according to the probability distribution prediction results of the model, so as to achieve classification and labeling, such as NPC dialogue, environmental interaction and real-time combat tasks.
[0067] For example, in an open world game, the player triggers a series of tasks. The PyTorch model classifies and identifies NPC dialogues, environmental interactions, and real-time combat tasks, and sends the identified information to the load prediction module for load prediction.
[0068] Scikit-learn-based task classification uses a random forest classifier to classify the input scenario tasks and obtain information related to resource management, unit movement, and combat simulation.
[0069] Task classification first involves data collection and preparation, collecting task data in the game, including task features such as resource requirements, unit movement paths, etc. Feature extraction and preprocessing of the data, such as numerical normalization and missing value processing, are performed.
[0070] Feature extraction is then performed to extract relevant features from the original data, such as the timestamp of the task, resource consumption, object interaction, etc. After feature extraction, a feature vector is formed for classification model input, thereby performing classification and recognition operations on the above data.
[0071] The feature vectors are trained using a random forest classifier, which consists of multiple decision trees that can handle high-dimensional data and reduce overfitting. The trained model is used to make predictions and classify tasks into different categories, such as resource management, unit movement, and combat simulation related information. The corresponding task processing flow is then executed based on the classification results. For example, after identifying a resource management task, the system will adjust the resource allocation strategy.
[0072] In one embodiment, in a strategy game, the system identifies the resource management, unit movement, and combat simulation tasks required by the player and classifies them through the Scikit-learn model.
[0073] As one implementation method, the specific steps of building a load prediction model are:
[0074] Obtain GPU load history data and task characteristic data, train a prediction model according to the GPU load history data and task characteristic data, and obtain a load prediction model.
[0075] Specifically, in the embodiment of the present application, historical data and current task characteristics are considered, and the model is trained based on the historical data and current task characteristics. The steps are: collecting historical GPU load data and current task characteristics, such as task type, resource consumption, etc.; removing outliers and noise, filling missing values, and improving the accuracy and completeness of data; extracting useful features from the original data, such as timestamps, load trends, task characteristics, etc., to enhance the prediction ability of the model; dividing the data set into a training set and a test set, or a validation set, for model training and evaluation; standardizing or normalizing the data to improve the stability and convergence speed of the model; further using the training set to train the selected prediction model, such as using LSTM, ARIMA, XGBoost to learn the patterns and trends in the data; using the test set to evaluate the prediction accuracy of the model, and adjusting the model parameters and feature selection as needed; finally, predicting the future GPU load based on the trained model, and optimizing the resource allocation strategy based on the prediction results. Thereby improving the prediction accuracy of the load prediction model.
[0076] As one implementation method, the specific steps of inputting the classified data information into the load prediction model to obtain the load prediction result information are as follows:
[0077] Input the classified data information into the long short-term memory network model for load forecasting to obtain peak forecast information;
[0078] Or input the classified data information into the autoregressive integrated moving average model for load forecasting to obtain load change forecast information;
[0079] Or input the classified data information into the XGBoost model for load prediction to obtain the scenario load information.
[0080] Reference Figure 2 Specifically, the embodiments of the present application predict the GPU load conditions for different machine learning models, including the long short-term memory network model LSTM, the long short-term memory network model ARIMA and the XGBoost model, which are used to predict the GPU load requirements for each type of task.
[0081] The process of using the long short-term memory network model for prediction is to first collect historical GPU load data, which is recorded in the form of time series, including timestamps and load values. The data is processed for missing values and outliers, and missing values are filled, such as using forward filling or backward filling, and outliers are removed or corrected. In order to improve the convergence speed and effect of the LSTM model, the data needs to be standardized or normalized, for example, using Min-Max normalization to scale the load data to the range of [0,1]. The time series data is divided into training sets and test sets, usually by dividing the data in chronological order, for example, the first 80% of the data is used for training and the last 20% of the data is used for testing.
[0082] In order to enable the LSTM model to capture patterns in time series, the sliding window technique is used to create input and target sequences. If the window size is n, each sample consists of data from n time steps, and the load value of the next time step is predicted. The time step of the model is determined according to actual needs, for example, hours or minutes.
[0083] Build and train the model. Specifically, use Keras to build the LSTM model, set appropriate network layers, such as LSTM layer, Dense layer, etc., and set hyperparameters, such as learning rate and batch size. Then use the training data for training, monitor the model's loss function and evaluation indicators, and adjust hyperparameters to optimize model performance. Then use the test set for prediction and evaluate the performance of the model. The evaluation indicators include mean square error (MSE) and root mean square error (RMSE).
[0084] Finally, the trained model is applied to the method of the embodiment of the present application to predict future loads, and the GPU resource allocation strategy is adjusted according to the prediction results.
[0085] The process of using the long short-term memory network model is to collect the time series data of the historical GPU load so that the time interval of the data is uniform and continuous. Missing values and outliers are processed to ensure data quality. After data cleaning, the ARIMA model requires that the time series data is stable. The ADF and Augmented Dickey-Fuller tests are used to check the stability of the data. If it is not stable, differential processing is performed. The non-stationary data is converted into stable data through differential operation. This embodiment performs one or more differentials until the data is stable.
[0086] Then the data is processed seasonally. If the data has seasonal components, the SARIMA and SeasonalARIMA models are used for seasonal adjustment.
[0087] Then select the model parameters, such as using the ACF autocorrelation function and PACF partial autocorrelation function graph to determine the order (p, d, q) of the ARIMA model, use the Statsmodels library to build the ARIMA model, and perform parameter estimation and model training.
[0088] Finally, we use data outside the training set to make predictions, evaluate the model performance, and check the autocorrelation of the residuals to ensure that the model fits well. We use the trained ARIMA model to predict future loads and adjust the GPU resource allocation strategy based on the prediction results.
[0089] The process of using the XGBoost model is to first collect historical GPU load data and related feature data, such as task type, timestamp, etc., and use interpolation methods or other filling methods to handle missing values and outliers. Then build a suitable feature set, for example, time features, such as hours, dates, task features, such as task types, etc., so as to perform feature selection, select features related to GPU load prediction, and remove redundant or irrelevant features.
[0090] Then the data set is divided into training set and test set in chronological order, and the regression model is constructed using the XGBoost library. Appropriate hyperparameters are selected, such as learning rate, tree depth, number of iterations, etc. Cross-validation techniques are used to adjust hyperparameters and improve the generalization ability of the model. The test set is used for prediction and the model performance is evaluated. The evaluation indicators include mean square error (MSE) and root mean square error (RMSE).
[0091] Finally, the trained XGBoost model is applied to the method of the embodiment of the present application to perform GPU load prediction, and the resource allocation strategy is adjusted according to the prediction results.
[0092] One specific embodiment is GPU load prediction based on LSTM model. First, historical GPU load data is collected from GPU monitoring system or game server log. The data includes timestamp, GPU load, task type, such as rendering, calculation, AI, etc., and resource consumption, such as memory usage, computing unit occupancy, etc. The sample data is hourly GPU load data, covering the records of the past 12 months. Then the data is cleaned, and the statistical method Z-score is used to identify and remove obvious abnormal data points. The missing data is filled by interpolation, specifically linear interpolation or forward filling, and sliding average or other smoothing techniques are applied to reduce data noise to obtain cleaned data. Feature extraction is performed on the processed data, and time features such as hours, days, weeks, holidays, etc. are extracted. The moving average and growth rate of GPU load are calculated, and different types of tasks are encoded to generate task category features, and additional features such as system temperature and network load that affect GPU load. Then the data is segmented, and the data is divided into training set and test set according to the time series. The training set is the data of the past 9 months, and the test set is the data of the most recent 3 months. K-fold cross validation is performed in the training set to evaluate the stability of the model. All numerical features are standardized to have a mean of 0 and a standard deviation of 1. The tool used is Scikit-learn to scale the features to a specific range, such as 0 to 1. Keras and TensorFlow are used to build an LSTM model, and the constructed model is evaluated. For example, the performance of the model on the test set is evaluated using indicators such as mean square error (MSE) and root mean square error (RMSE). The hyperparameters of the LSTM model, such as the number of LSTM units and the learning rate, are adjusted based on the evaluation results. The trained model is used to predict future GPU loads, for example, to predict changes in GPU loads within the next week. The GPU resource allocation strategy is adjusted based on the prediction results. For example, for predicted high-load periods, GPU resources can be increased in advance or load distribution can be optimized to ensure smooth operation of the system. This method significantly improves the prediction accuracy of GPU loads, thereby optimizing resource utilization and reducing the occurrence of performance bottlenecks.
[0093] As one implementation method, the load forecast result information is subjected to reinforcement learning processing, and the specific steps of obtaining the reinforced forecast result information are as follows:
[0094] The reinforcement learning algorithm model is used to optimize the load forecasting results to obtain enhanced forecasting result information.
[0095] The specific steps of optimizing the load forecast results by using the reinforcement learning algorithm model to obtain the enhanced forecast result information are as follows:
[0096] Perform reinforcement learning processing on the load forecast result information according to the deep Q network algorithm model to obtain reinforced forecast result information;
[0097] Or, the load forecast result information is subjected to reinforcement learning processing according to the proximal strategy optimization algorithm model to obtain reinforced forecast result information;
[0098] Or, reinforcement learning is performed on the load prediction result information according to the A3C model to obtain enhanced prediction result information.
[0099] Reference Figure 3 Specifically, the embodiment of the present application optimizes the load prediction results through a reinforcement learning algorithm model, thereby optimizing the GPU load distribution strategy. The reinforcement learning algorithm models are respectively a deep Q network algorithm DQN model, a proximal policy optimization algorithm PPO model and an A3C model.
[0100] The deep Q network algorithm model, namely the DQN model, is trained using TensorFlow and Keras. First, define the environment and set a simulation environment, such as a multiplayer shooting game, to test and train the load distribution. The environment includes observable state variables such as GPU load, frame rate, and latency, as well as load distribution strategies as actions. Then build a deep neural network DNN to approximate the Q value function. The network includes an input layer, multiple hidden layers, and an output layer. The state representation is used as the input layer, and the Q value of the action is used as the output layer. Collect training data from the environment, including the current state, the action taken, the reward obtained, and the next state. Use the playback buffer to store past state-action-reward-next state SARS' samples to break the time correlation and improve the training efficiency. Then regularly update the weights of the target Q network to make the training process stable, calculate the difference between the current Q value and the target Q value, use the Bellman equation to update the Q value, and finally iterate the training continuously to improve the GPU load distribution strategy by optimizing the Q network. During the training process, the strategy will gradually converge to the optimal strategy. For example, in a multiplayer shooter game, the system uses the DQN model to self-learn the optimal GPU load distribution strategy to ensure high frame rate and low latency.
[0101] The proximal policy optimization algorithm model, namely the PPO model, is trained using the Stable Baselines3 library. First, the environment is defined as a dynamic environment, such as a massively multiplayer online role-playing game, including a state space, an action space, and a reward function. A neural network is used to represent the strategy, including a network for generating action distribution and a value function network for evaluating actions. Data is collected by interacting with the environment to record states, actions, rewards, and next states. The PPO algorithm is used for policy optimization, with the goal of maximizing cumulative rewards. PPO ensures the stability of the strategy by limiting the magnitude of each update. Then the policy gradient is calculated and optimized using a truncated objective function. Each update step will fine-tune the strategy to obtain better performance in this embodiment. The performance of the updated strategy is evaluated to improve stability and adaptability in different game scenarios. For example, in a massively multiplayer online role-playing game, the system learns and adjusts the load distribution strategy through the PPO model, so that it can run smoothly even in large-scale group battles.
[0102] The A3C model, namely the Actor-Critic algorithm model, is distributedly trained using PyTorch and Ray RLlib, and the reinforcement learning model can quickly adapt to changing load conditions. First, define the environment as a real-time strategy game environment and set the state, action, and reward structure. Use two neural networks, one is the Actor network for selecting actions, and the other is the Critic network for evaluating the value of the current strategy. Collect data through multiple parallel environment instances, each of which generates a sequence of state, action, reward, and next state. Use the Actor-Critic method to calculate the policy gradient and update the Actor network, and the Critic network updates its estimated value function through the TD error. Then use Ray RLlib for distributed training, and multiple worker threads interact with the environment at the same time to accelerate the training process. Finally, synchronize the model parameters in each worker thread regularly and update the global network to improve the stability and convergence speed of the model.
[0103] The training methods of the three reinforcement learning models in the embodiments of the present application are selected according to different game running conditions. DQN optimizes the strategy through the approximation of the Q value function and experience replay, PPO uses the restrictions of the policy gradient and the objective function to ensure the stability of the strategy, and A3C combines the Actor-Critic method and parallel training to improve the training efficiency and strategy adaptability, corresponding to different situations. Specific reinforcement learning processing improves adaptability, thereby improving the optimization effect of GPU scheduling.
[0104] After reinforcement learning of the load prediction result information, the embodiment of the present application dynamically allocates GPU resources by executing the strategy output by the reinforcement learning model through a dynamic load distributor. At least one of the load distribution based on the ant colony algorithm, the load distribution based on the genetic algorithm, and the load distribution based on the particle swarm optimization is adopted, and each execution method corresponds to its pre-set scenario type and is selected.
[0105] Using the ant colony algorithm ACO for load distribution can simulate the process of ants looking for food to find the optimal task allocation strategy. For example, in a massively multiplayer online game, the system uses the ant colony algorithm to dynamically allocate GPU resources to different players in the scene to ensure balanced load.
[0106] Genetic algorithms are used, implemented through the DEAP library, to simulate natural selection and genetic variation to optimize task allocation strategies. For example, in an open world game, the system continuously evolves and optimizes GPU load allocation strategies through genetic algorithms to improve the overall performance of the game.
[0107] The particle swarm optimization algorithm PSO is used, implemented through the Pyswarm library, to simulate group intelligent behavior and optimize task allocation. For example, in a real-time combat game, the system uses the PSO algorithm to dynamically adjust the GPU resource allocation of each combat scene to ensure efficient processing.
[0108] The embodiment of the present application also includes a GPU execution unit for task allocation to the GPU, which efficiently executes the allocated tasks so that the tasks are carried out smoothly according to the priority and demand. The execution optimization methods adopted include CUDA-based execution optimization, OpenCL-based execution optimization and Vulkan-based execution optimization.
[0109] Among them, CUDA-based execution optimization uses the CUDA programming model to optimize the GPU kernel execution efficiency, thereby enabling efficient parallel computing. For example, in a game scene that requires a lot of physical simulation, the system uses CUDA to optimize the execution speed of physical computing tasks and improve the real-time performance of the game.
[0110] OpenCL-based execution optimization uses the OpenCL programming framework to optimize GPU execution efficiency across platforms and is compatible with a variety of hardware. For example, in a cross-platform game, the system uses OpenCL to optimize physical calculation tasks on different devices, thereby providing a consistent gaming experience.
[0111] Vulkan-based execution optimization uses the Vulkan API to directly control the GPU hardware, optimize the execution efficiency of rendering and computing tasks, and thus reduce overhead. For example, in a high-frame-rate shooting game, the system optimizes the rendering pipeline through Vulkan to minimize the rendering time of each frame and improve the player experience.
[0112] As one implementation mode, it also includes:
[0113] Obtain GPU operation status data, adjust the reinforcement learning algorithm model according to the GPU operation status data, optimize the reinforcement prediction result information, and obtain optimization strategy information;
[0114] Load distribution processing is performed according to the optimization strategy information, and dynamic adjustment information acting on the GPU is updated.
[0115] Reference Figure 4 Specifically, the embodiment of the present application obtains GPU operation status data in real time, and then feeds it back to the reinforcement learning model for adjustment and strategy optimization. The real-time feedback methods include monitoring and feedback based on Prometheus, log feedback based on Elastic Stack, and real-time data stream feedback based on Kafka.
[0116] Among them, Prometheus-based monitoring and feedback uses Prometheus for real-time monitoring, collects GPU load data, and visualizes it through Grafana, and feeds it back to the adjustment system. For example, in a large-scale multiplayer online game, the system monitors the GPU load of each server through Prometheus, adjusts resource allocation in real time, and ensures load balance.
[0117] Log feedback based on Elastic Stack uses Elastic Stack to collect and analyze GPU operation logs, and uses Kibana for real-time visualization to provide feedback data. For example, in an open world game, the system uses ElasticStack to analyze the GPU performance data in the game and adjust the task allocation strategy in real time to achieve performance optimization.
[0118] Real-time data stream feedback based on Kafka establishes real-time data streams through Kafka to collect and transmit GPU load information, ensuring low latency and high reliability of feedback data. For example, in a battle game that requires high real-time feedback, the system uses Kafka to transmit real-time GPU load data, quickly adjust task allocation, keep the game running smoothly, and reduce GPU load pressure.
[0119] Load optimization and adjustment methods include adaptive adjustment based on reinforcement learning models, load adjustment based on rule engines, and load adjustment based on hybrid optimization algorithms.
[0120] Among them, the adaptive adjustment based on the reinforcement learning model uses the reinforcement learning model combined with real-time feedback data to dynamically adjust the GPU load distribution strategy to ensure efficient operation of the system. For example, in a complex game scene, the system continuously adjusts and optimizes the GPU load distribution through the reinforcement learning model, reduces the GPU load pressure, and enables each task to obtain the best resource allocation.
[0121] Rule-based load adjustment uses the Drools rule engine to dynamically adjust GPU load distribution based on predefined rules and real-time feedback data. For example, in a multiplayer online role-playing game, the system uses the Drools rule engine to adjust GPU resource allocation in real time based on the current number of players and scene complexity, reducing GPU load pressure and optimizing game performance.
[0122] Load adjustment based on hybrid optimization algorithm uses hybrid optimization algorithm, combined with real-time feedback data, to perform global and local load adjustment to ensure optimal resource utilization. For example, in an open world game, the system dynamically adjusts the GPU load in different areas through hybrid optimization algorithm, so that players can enjoy a smooth gaming experience no matter which scene they are in, improving the fluency of the game scene.
[0123] This application achieves dynamic balancing of GPU load through the combination of deep learning models and reinforcement learning models, reduces core overload and idle phenomena, and improves overall computing efficiency.
[0124] This application utilizes an efficient feedback mechanism and adaptive adjustment algorithm, and the system can quickly respond to load changes, thereby improving the smoothness and stability of game operation.
[0125] This application uses a task allocation strategy based on big data analysis and reinforcement learning models, which fully utilizes the computing power of the GPU and significantly improves the processing efficiency of complex AI and physical simulation tasks.
[0126] Through the self-learning and optimization of the reinforcement learning model, the system can continuously improve its load distribution efficiency and accuracy in a dynamic environment.
[0127] Reference Figure 5 , a GPU intelligent scheduling system is provided for an embodiment of the present application, the system includes a recognition and classification module, a result prediction module, a reinforcement learning module and a dynamic adjustment module.
[0128] Identification and classification module 1, used to obtain game scene information, perform task identification and classification on the game scene information, and obtain classification data information;
[0129] Result prediction module 2, used to build a load prediction model, input classified data information into the load prediction model, and obtain load prediction result information;
[0130] A reinforcement learning module 3 is used to perform reinforcement learning processing on the load forecast result information to obtain reinforced forecast result information;
[0131] The dynamic adjustment module 4 is used to perform load distribution processing according to the enhanced prediction result information to obtain dynamic adjustment information acting on the GPU.
[0132] Specifically, the present application performs task identification and classification on the game scene information through the identification and classification module, determines the execution content included in the game scene information, and classifies it according to the execution content to obtain classified data information. The result prediction module is based on the classification result and the corresponding game scene information, that is, inputs the classified data information into a pre-built load prediction model for prediction to obtain load prediction result information. The load prediction result information is reinforced by the reinforcement learning module, and the GPU load distribution strategy is optimized to obtain reinforced prediction result information. The dynamic adjustment module processes the optimized reinforced prediction result information to obtain dynamic adjustment information. The GPU is dynamically adjusted through the dynamic adjustment information to achieve load balancing in highly complex scenarios and improve the efficiency of graphics data processing.
[0133] This application achieves dynamic balancing of GPU loads through the combination of deep learning models and reinforcement learning models, reduces core overload and idle phenomena, and improves overall computing efficiency. Utilizing efficient feedback mechanisms and adaptive adjustment algorithms, the system can quickly respond to load changes, thereby improving the smoothness and stability of game operation. The task allocation strategy based on big data analysis and reinforcement learning models fully utilizes the computing power of the GPU and significantly improves the processing efficiency of complex AI and physical simulation tasks. Through self-learning and optimization of the reinforcement learning model, the system can continuously improve its load distribution efficiency and accuracy in a dynamic environment.
[0134] As one implementation method, the reinforcement learning module is used to perform reinforcement learning processing on the load forecast result information, and the specific steps of obtaining the reinforcement forecast result information are:
[0135] The reinforcement learning algorithm model is used to optimize the load forecasting results to obtain enhanced forecasting result information.
[0136] As one implementation mode, it also includes:
[0137] The feedback optimization module is used to obtain GPU operation status data, adjust the reinforcement learning algorithm model according to the GPU operation status data, optimize the reinforcement prediction result information, and obtain the optimization strategy information;
[0138] Load distribution processing is performed according to the optimization strategy information, and dynamic adjustment information acting on the GPU is updated.
[0139] As one implementation method, the specific steps of the result prediction module for constructing the load prediction model are as follows:
[0140] Obtain GPU load history data and task characteristic data, train a prediction model according to the GPU load history data and task characteristic data, and obtain a load prediction model.
[0141] As one implementation method, the result prediction module is used to input the classified data information into the load prediction model, and the specific steps of obtaining the load prediction result information are:
[0142] Input the classified data information into the long short-term memory network model for load forecasting to obtain peak forecast information;
[0143] Or input the classified data information into the autoregressive integrated moving average model for load forecasting to obtain load change forecast information;
[0144] Or input the classified data information into the XGBoost model for load prediction to obtain the scenario load information.
[0145] As one implementation method, the reinforcement learning module is used to optimize the load forecasting results using the reinforcement learning algorithm model, and the specific steps for obtaining the reinforcement forecasting result information are:
[0146] Perform reinforcement learning processing on the load forecast result information according to the deep Q network algorithm model to obtain reinforced forecast result information;
[0147] Or, the load forecast result information is subjected to reinforcement learning processing according to the proximal strategy optimization algorithm model to obtain reinforced forecast result information;
[0148] Or, reinforcement learning is performed on the load prediction result information according to the A3C model to obtain enhanced prediction result information.
[0149] As one implementation method, the classification data information obtained in the identification classification module includes rendering task information, physical calculation task information and AI task information.
[0150] Reference Figure 6 An embodiment of the present application provides a GPU intelligent scheduling device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the GPU intelligent scheduling method as described above.
[0151] An embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the aforementioned GPU intelligent scheduling method when running.
[0152] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described device and product can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0153] In several embodiments provided in this application, it should be understood that the disclosed methods, systems, devices and program products may be implemented in other ways.
[0154] In addition, each functional unit in each embodiment of the present application 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. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0155] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A GPU intelligent scheduling method, characterized in that: include: Acquire game scene information, perform task identification and classification on the game scene information, and obtain classified data information; Construct a load prediction model, input the classified data information into the load prediction model, and obtain load prediction result information; Performing reinforcement learning processing on the load forecast result information to obtain reinforced forecast result information; Load distribution processing is performed according to the enhanced prediction result information to obtain dynamic adjustment information acting on the GPU.
2. The GPU intelligent scheduling method according to claim 1, characterized in that: The specific steps of performing reinforcement learning processing on the load forecast result information to obtain the reinforced forecast result information are: The reinforcement learning algorithm model is used to optimize the load forecasting results to obtain enhanced forecasting result information.
3. The GPU intelligent scheduling method according to claim 2, characterized in that: Also includes: Obtain GPU operation status data, adjust the reinforcement learning algorithm model according to the GPU operation status data, optimize the reinforcement prediction result information, and obtain optimization strategy information; Load distribution processing is performed according to the optimization strategy information, and dynamic adjustment information acting on the GPU is updated.
4. The GPU intelligent scheduling method according to claim 1, characterized in that: The specific steps of constructing the load prediction model are: Obtain GPU load history data and task characteristic data, train a prediction model according to the GPU load history data and task characteristic data, and obtain a load prediction model.
5. The GPU intelligent scheduling method according to claim 4, characterized in that: The specific steps of inputting the classified data information into the load prediction model to obtain the load prediction result information are: Input the classified data information into the long short-term memory network model for load forecasting to obtain peak forecast information; Or input the classified data information into the autoregressive integrated moving average model for load forecasting to obtain load change forecast information; Or input the classified data information into the XGBoost model for load prediction to obtain the scenario load information.
6. The GPU intelligent scheduling method according to claim 2, characterized in that: The specific steps of optimizing the load forecasting results by using the reinforcement learning algorithm model to obtain the enhanced forecasting result information are as follows: Perform reinforcement learning processing on the load forecast result information according to the deep Q network algorithm model to obtain reinforced forecast result information; Or, the load forecast result information is subjected to reinforcement learning processing according to the proximal strategy optimization algorithm model to obtain reinforced forecast result information; Or, reinforcement learning is performed on the load prediction result information according to the A3C model to obtain enhanced prediction result information.
7. The GPU intelligent scheduling method according to claim 1, characterized in that: The classified data information includes rendering task information, physical calculation task information and AI task information.
8. A GPU intelligent scheduling system, characterized in that: include: The identification and classification module is used to obtain game scene information, perform task identification and classification on the game scene information, and obtain classification data information; The result prediction module is used to build a load prediction model, input the classified data information into the load prediction model, and obtain the load prediction result information; A reinforcement learning module is used to perform reinforcement learning processing on the load forecast result information to obtain reinforced forecast result information; The dynamic adjustment module is used to perform load distribution processing according to the enhanced prediction result information to obtain dynamic adjustment information acting on the GPU.
9. A GPU intelligent scheduling device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the GPU intelligent scheduling method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the GPU intelligent scheduling method according to any one of claims 1 to 7 when running.
Citation Information
Cited By
Load scheduling method and system based on kubernetes
CN120407080A
A kubernetes-based load scheduling method and system
CN120407080B