Artificial intelligence resource allocation system and method
By employing a dynamic resource scheduling mechanism and a multi-objective optimization strategy, the problem of low resource utilization in artificial intelligence resource allocation systems has been solved, enabling efficient execution of AI tasks and intelligent management of hardware resources, thus adapting to ever-changing business needs.
Patent Information
- Application Number
- CN202611251527.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-18
- Publication Date
- 2026-11-27
AI Technical Summary
In existing technologies, artificial intelligence resource allocation systems struggle to cope with the dynamic changes of multiple AI tasks in heterogeneous computing environments, resulting in uneven resource allocation and low utilization. In particular, resource isolation and priority scheduling are complex in multi-tenant environments, making it difficult to guarantee service quality.
Through a dynamic and precise resource scheduling mechanism, using modules for task reception and metadata management, usage prediction, resource scheduling and task allocation, combined with multi-objective optimization strategies and online iteratively trained multi-output regression models, dynamic mapping and scheduling of tasks to the optimal hardware nodes are achieved.
It significantly improves the efficiency of AI task execution and hardware resource utilization in heterogeneous computing environments, reduces task latency and increases system throughput, and realizes intelligent and adaptive resource management to adapt to complex and ever-changing business scenarios.
Smart Images

Figure CN123178060A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to an artificial intelligence resource allocation system and method, belonging to the field of artificial intelligence technology. Background Technology
[0002] With the rapid development of artificial intelligence technology, the demand for computing resources in various artificial intelligence (AI) applications has exploded, especially in the training and inference of deep learning models, where the demand for hardware resources such as GPUs, memory, and storage is particularly prominent.
[0003] In current AI application environments, there is often a need to run multiple different types of AI models and tasks simultaneously. These models cover multiple fields such as natural language processing, computer vision, speech recognition, and AI-generated content, and each model has different requirements for system resources. For example, large language models require a large amount of GPU memory and computing cores, while real-time inference tasks have strict requirements on latency and throughput. In actual deployments, multiple AI tasks often compete for limited hardware resources, leading to problems such as uneven resource allocation and low utilization.
[0004] In existing technologies, traditional static resource configuration methods struggle to cope with dynamically changing workloads, often resulting in some resources being overloaded while others remain idle. This is especially true in multi-tenant environments, where resource isolation and priority scheduling between different users or applications become even more complex.
[0005] Most existing resource management solutions are based on simple rules or static quotas, lacking a deep understanding of the characteristics of AI workloads and failing to achieve intelligent and elastic resource allocation. This results in low overall system resource utilization, inconsistent user experience, and difficulty in guaranteeing service quality for critical tasks.
[0006] Therefore, there is an urgent need for an intelligent resource allocation system that can dynamically optimize resource allocation strategies based on the characteristics of AI tasks and real-time system status, thereby improving overall resource utilization while ensuring the service quality requirements of various applications. Summary of the Invention
[0007] In view of this, the present invention provides an artificial intelligence resource allocation system and method. The embodiments of the present invention aim to significantly improve the execution efficiency and hardware resource utilization of AI tasks in heterogeneous computing environments through a dynamic and precise resource scheduling mechanism. This system analyzes task characteristics and historical resource usage data, and combines this with real-time hardware status monitoring to achieve dynamic mapping and scheduling of tasks to optimal hardware nodes.
[0008] The first objective of this invention is to provide an artificial intelligence resource allocation system.
[0009] The second objective of this invention is to provide a method for allocating artificial intelligence resources.
[0010] The first objective of this invention can be achieved by adopting the following technical solution: An artificial intelligence resource allocation system, the system comprising a central node and multiple hardware nodes, the central node being communicatively connected to each of the hardware nodes, the system further comprising: The task receiving and metadata management module, deployed at the central node, is used to receive AI task requests and extract task feature information, which includes task static features, dynamic configuration features, and historical performance features. The usage prediction module is deployed at the central node and is used to predict various resource estimation results of the AI task request based on the trained multi-output regression model, the task's static features, the dynamic configuration features, and the historical performance features. The resource scheduling and task allocation module, deployed at the central node, is used to obtain real-time resource information of each hardware node, make scheduling decisions based on a multi-objective optimization strategy and combined with the various resource prediction results, and allocate target hardware nodes to the AI task. The multi-objective optimization strategy includes hard condition filtering, multi-dimensional quantitative scoring and weighted comprehensive decision-making. The device agent and resource monitoring module is deployed one by one on each of the hardware nodes. It is used to execute the AI task in response to the allocation instruction and periodically feed back the actual resource consumption data of the completed AI task to the usage prediction module. The usage prediction module performs online iterative training on the multi-output regression model based on the actual resource consumption data.
[0011] Furthermore, the multi-output regression model is constructed using the LightGBM algorithm; The various resource estimates include peak video memory, expected execution time, and chip requirements.
[0012] Furthermore, the static characteristics of the task include task type, model architecture identifier, model size parameter, input data specification, and output data specification; The dynamic configuration features include batch size and precision mode; The historical performance characteristics include at least one of the following: historical average resource consumption, historical average execution time, historical standard deviation of resource consumption, and historical execution count.
[0013] Furthermore, the hard condition filtering includes: Hardware type matching check: Filter out hardware nodes that support the hardware architecture required for the AI task; Resource sufficiency check: Based on the peak video memory among the various resource estimation results, hardware nodes with current free video memory less than the peak video memory are eliminated; Among them, the hardware nodes remaining after filtering by the hard criteria constitute the candidate device set.
[0014] Furthermore, the hard condition filtering also includes: Constraint check: Based on the expected execution time in the various resource estimation results and the current task queue of each hardware node, determine the expected total completion time of the AI task on each hardware node. If the expected total completion time is later than the preset expected deadline, the corresponding hardware node is removed.
[0015] Furthermore, determining the estimated total completion time of the AI task on each hardware node based on the expected execution time from the various resource estimation results and the current task queue of each hardware node includes: Based on the priority order information of the AI tasks, the hypothetical insertion position of the AI task in the current task queue of each hardware node is determined. The estimated completion times of all AI tasks preceding the hypothetical insertion position are summed and added to the expected execution time to obtain the total expected completion time. It is understood that each AI task in this embodiment has priority information.
[0016] Furthermore, the multi-dimensional quantitative score is calculated for each hardware node in the candidate device set, including: Based on each hardware node, a resource utilization score is determined according to the current idle video memory and the peak video memory. The higher the resource utilization score, the fewer resource fragments are generated after the AI task is allocated. For each hardware node, a load balancing score is determined based on the current average GPU utilization and the task queue length. The higher the load balancing score, the lower the real-time load of the hardware node. Based on each hardware node, an estimated completion time score is determined according to the estimated completion time of each AI task preceding it in the current task queue and the expected execution time of the AI task. The higher the estimated completion time score, the shorter the expected total completion time of the AI task.
[0017] Furthermore, the weighted comprehensive decision-making includes: Set a first weight for the resource utilization score, a second weight for the load balancing score, and a third weight for the estimated completion time score, and calculate the total score for each hardware node based on the scores and their weights; select the hardware node with the highest total score as the target hardware node.
[0018] Furthermore, the online iterative training includes: The actual resource consumption data is stored in the sample library as a new training sample. When the number of newly added training samples in the sample library reaches a preset sample threshold, the multi-output regression model is incrementally trained based on the newly added training samples. The deviation between the various resource estimation results and the actual resource consumption data is continuously monitored. When the deviation exceeds a preset threshold within a continuous preset time window, the retraining of the multi-output regression model based on the newly added training samples is triggered. The trained model is hot-loaded into the inference service to replace the old model, thus achieving uninterrupted updates.
[0019] The second objective of this invention can be achieved by adopting the following technical solution: An artificial intelligence resource allocation method, the method comprising: Receive AI task requests and extract task feature information, which includes static task features, dynamic configuration features, and historical performance features; Based on the trained multi-output regression model and the task's static features, dynamic configuration features, and historical performance features, the AI task request's various resource estimation results are predicted and encapsulated into a standard descriptor. The system acquires real-time resource information of each hardware node, makes scheduling decisions based on a multi-objective optimization strategy and the encapsulated multi-resource prediction results, and allocates target hardware nodes to the AI task. The multi-objective optimization strategy includes hard condition filtering, multi-dimensional quantitative scoring, and weighted comprehensive decision-making. The system executes the AI task in response to the allocation instruction and periodically feeds back the actual resource consumption data of the completed AI task to the usage prediction module. The usage prediction module performs online iterative training of the multi-output regression model based on the actual resource consumption data.
[0020] The present invention has the following advantages over the prior art: (1) Improve cluster resource utilization: By using a usage prediction module based on machine learning methods to accurately predict the resource consumption of AI tasks, the problem of excessive or insufficient resource reservation caused by the traditional fixed quota allocation method is overcome, and resources are allocated on demand. This solution effectively reduces the degree of resource fragmentation within hardware nodes, thereby significantly improving the overall resource utilization of the cluster.
[0021] (2) Reduce task latency and improve system throughput: The resource scheduling and task allocation module performs dynamic scheduling based on a multi-objective optimization algorithm, taking into account the real-time load of hardware nodes, multi-dimensional resource prediction results, and service quality requirements, and intelligently allocates AI tasks to the optimal hardware nodes. This solution minimizes task queuing time and execution time, thereby effectively reducing task execution latency and improving the system's task throughput and response speed.
[0022] (3) Achieve intelligent and adaptive management of heterogeneous resources: Through the collaborative cooperation between task reception, resource prediction, scheduling decision and device agent, it can automatically sense and adapt to the dynamically changing AI workload and heterogeneous hardware environment, and complete resource configuration and performance optimization without manual intervention, which greatly improves the system's automation management level and operation and maintenance efficiency.
[0023] (4) Constructing a sustainable and optimized prediction closed loop: Through an online learning mechanism of prediction-execution-feedback, the multi-output regression model is continuously iterated and optimized using historical execution data. This approach enables the accuracy of resource prediction to continuously improve over time, enhancing the system's long-term adaptability and generalization ability in the face of complex and ever-changing business scenarios.
[0024] (5) The core function of the priority-based estimated total completion time calculation mechanism described in this invention is to perform exclusive screening of candidate hardware nodes. Unlike traditional scheduling algorithms that simply sort task completion times, this invention introduces time constraints in advance during the hard condition filtering stage: only when a hardware node can guarantee that the estimated total completion time of the current task is earlier than the preset deadline, while satisfying the high-priority task queue-jumping requirements, will the node be retained for the subsequent multi-dimensional quantitative scoring stage. This mechanism of first excluding and then selecting the best avoids the service quality breach problem caused by task queue congestion from the source, and is especially suitable for latency-sensitive real-time inference tasks. Attached Figure Description
[0025] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.
[0026] Figure 1 This is a working architecture diagram of an artificial intelligence resource allocation system according to an embodiment of the present invention.
[0027] Figure 2 This is a flowchart illustrating the workflow of a usage prediction module according to an embodiment of the present invention.
[0028] Figure 3 This is a flowchart illustrating the workflow of a resource scheduling and task allocation module according to an embodiment of the present invention. Detailed Implementation
[0029] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0030] Example 1: like Figure 1 As shown, the artificial intelligence resource allocation system provided by the present invention includes a central node and multiple hardware nodes, and the central node is communicatively connected to each hardware node.
[0031] System Architecture: The central node is equipped with a task receiving and metadata management module (API Server), a usage prediction module (Prediction Service), a resource scheduling and task allocation module (Central Scheduler), as well as a metadata database (MySQL), a real-time status database (Redis), and an administration backend (Admin Dashboard). The hardware nodes are equipped with a device agent and resource monitoring module (Agent) and corresponding hardware resources (GPU Node1, 2, ...).
[0032] Task processing flow: When a user submits an AI task request, it is authenticated by the authentication system and then enters the task receiving and metadata management module. This module parses the request and extracts task feature information; it also stores task metadata and actual usage data.
[0033] Subsequently, the task receiving and metadata management module calls the usage prediction module. The usage prediction module predicts the multi-dimensional resource estimation results of the AI task based on the input task characteristics and returns the results (resource requirement descriptors). During this process, the usage prediction module reads and writes training data in the metadata database to perform model inference.
[0034] Next, the task receiving and metadata management module sends the task and resource estimation results to the resource scheduling and task allocation module. The resource scheduling and task allocation module reads the real-time resource status of each hardware node from the real-time status database, makes scheduling decisions based on a multi-objective optimization strategy, and selects the target hardware node.
[0035] Subsequently, the resource scheduling and task allocation module sends task execution instructions to the device agent and resource monitoring module on the target hardware node. The device agent and resource monitoring module responds to the instructions and utilizes hardware resources to execute the AI task.
[0036] During task execution, the device agent and resource monitoring module collects the resource usage indicators of this node in real time and writes them into the real-time status database for query by the resource scheduling and task allocation module.
[0037] After the task is completed, the device agent and resource monitoring module feeds back the actual resource consumption data (actual usage data) of the AI task to the task receiving and metadata management module. The task receiving and metadata management module stores this data in the metadata database as incremental training samples for the usage prediction module, enabling online iterative fine-tuning of the prediction model. In addition, the device agent and resource monitoring module feeds back the task results of the AI task to the task receiving and metadata management module.
[0038] The aforementioned task receiving and metadata management module is deployed on the central node, serving as the unified service entry point for the system. It provides a highly available and scalable RESTful API service to receive submission requests for various AI inference and training tasks. This module extracts and persists task metadata (including task type, user identifier, submission source, and historical resource consumption records), calls the machine learning inference service to infer the computing resources required for the task (such as GPU memory, computing unit usage, and inference time), and encapsulates the resource requirements into standard descriptors before forwarding them to the resource scheduling and task allocation module.
[0039] The aforementioned resource usage prediction module is a standalone microservice that builds a resource usage prediction model based on historical task execution data. This module uses regression models, time series prediction, or deep learning algorithms to model the resource consumption of different types of AI tasks (such as NLP, CV, speech processing, etc.), provides an inference interface to output resource prediction results in real time (including peak memory usage, expected execution time, and computational complexity metrics), and supports online model updates and reinforcement learning mechanisms to continuously optimize prediction accuracy as the system runs.
[0040] The resource scheduling and task allocation module described above is deployed on the central node, serving as the core of the system's scheduling decision-making. This module receives tasks to be scheduled and their resource requirements from the API Server, maintains real-time resource status reported by each hardware node (including GPU utilization, memory usage, and network bandwidth), and allocates target devices to tasks based on resource matching algorithms (such as best fit based on cost models, load balancing strategies, and priority scheduling). Furthermore, this module supports preemptive scheduling and elastic resource allocation to handle high-priority tasks or sudden workloads.
[0041] The aforementioned device agent and resource monitoring module is deployed on each physical or virtual hardware device, acting as a local agent for device management. This module collects hardware resource usage metrics of the device in real time and reports them periodically to the central scheduler via a heartbeat mechanism. Upon receiving task allocation instructions, it instantiates the corresponding AI task execution environment on the device. It monitors the task's running status and collects runtime metrics, reporting the execution results and actual resource consumption data to the central node upon task completion. This module also supports resource isolation strategies to ensure that the performance of multiple tasks running concurrently does not affect each other.
[0042] It is worth noting that, through the collaborative work of the above modules, this invention constructs an intelligent resource management system that integrates resource prediction, dynamic scheduling and real-time monitoring. This system can not only significantly improve the utilization rate of cluster resources, but also reduce task queuing delays and enhance the support for large-scale AI workloads and system scalability.
[0043] Example 2: like Figure 2 As shown, the resource usage prediction module employs an integrated prediction method based on multi-feature fusion and multi-output regression to achieve high-precision, fine-grained prediction of AI task resource usage. The core idea of this method is to model AI task resource prediction as a supervised regression problem, and its process mainly includes three stages: feature engineering, model training, and model updating.
[0044] During the feature engineering phase, the model's input is a high-dimensional feature vector derived from task metadata and its historical data, specifically covering the following three dimensions: First, there are static features of the task, including the task type as a classification variable (such as natural language processing, image classification, object detection, speech recognition, AIGC, etc.) and model architecture identifiers (such as ResNet-50, BERT-base, YOLOv5s, etc.), among which the model architecture identifiers have a decisive impact on the computation graph and memory usage. In addition, there are model size parameters (such as the number of parameters, model file size), input data specifications (such as the image width, height, and number of channels for CV tasks, or the length of the input text sequence for NLP tasks), and output data specifications (such as the target resolution for super-resolution tasks, the length of the generated sequence for text generation, and the number of categories for detection tasks, etc.).
[0045] Secondly, there are dynamic configuration features, including batch size (which is approximately linearly positively correlated with memory consumption and is a key indicator) and precision mode as a classification variable (such as FP32, AMP, FP16, INT8, different precision modes have a significant impact on memory usage and computing speed).
[0046] Finally, there are historical performance characteristics, including the user's or model's historical average resource consumption (such as video memory and moving average over time) under the same configuration, the standard deviation of historical resource consumption (used to reflect the stability of resource consumption), and the number of historical executions (the more executions, the higher the statistical reliability of historical data).
[0047] During the model training phase, LightGBM, a family of gradient boosting decision trees, is selected as the base model. This model can efficiently process mixed tabular data containing numerical and categorical data, automatically learning complex nonlinear relationships and interaction effects between features (such as the nonlinear relationship between batch size and memory usage, or the interaction effect between model type and computation time), thereby achieving high prediction accuracy. Specifically, the usage prediction module adopts a multi-output regressor architecture, rather than training a separate model for each resource (such as video memory, system memory, GPU utilization, CPU usage, and execution time). This architecture leverages the shared input features and inherent correlations of multiple resource consumptions generated by the same task on the same hardware, allowing a single model to predict multiple resource variables simultaneously. This joint prediction mechanism not only improves the logical consistency of the prediction results (e.g., ensuring that the predicted high video memory usage matches the long computation time), but also significantly improves the overall accuracy of the prediction compared to individual modeling.
[0048] During the model update phase, the module is designed with a continuous learning mechanism to maintain long-term prediction accuracy. On one hand, the system executes an online learning strategy, automatically labeling the actual resource consumption data from each completed task as new training samples, and periodically (e.g., every 100 new samples) fine-tuning the model using online learning algorithms to adapt to changes in the new model or data distribution. On the other hand, the system executes a performance monitoring and drift detection strategy, continuously monitoring prediction error metrics. When the error exceeds a preset threshold within a continuous time window, the system automatically triggers a model retraining process, fully training a new version of the model using the latest data, and seamlessly switching the old model through a hot-swap mechanism, achieving uninterrupted updates to the prediction service.
[0049] Example 3: like Figure 3 As shown, the resource scheduling and task allocation module continuously receives real-time hardware resource data reported by the device agent module, and combines it with the resource descriptors required by the task received module to execute a multi-objective, phased hybrid scheduling algorithm to achieve efficient scheduling and allocation of AI tasks. The core process of this algorithm specifically includes the following three stages: The first phase, hard-condition filtering, begins by screening the hardware devices in the cluster to eliminate those that do not meet the hard constraints, thus forming a candidate device set. This phase specifically includes the following checks: Hardware type matching check: checking whether the device supports the specific hardware type required by the task (e.g., a specific model of GPU, FPGA, etc.); Resource sufficiency check: checking whether the device's real-time idle resources exceed the resource amount required in the task's predicted resource requirement descriptor; Constraint check (QoS check): checking whether running the task on the device can meet the task's priority requirements and expected deadlines, and other quality of service constraints. Only devices that pass these hard-condition checks can proceed to the next round of refined decision-making.
[0050] The second stage involves multi-objective optimization scoring: For each device in the selected candidate device set, a quantitative score is performed from multiple dimensions to determine the optimal allocation scheme. Specific scoring dimensions include: a best-fit strategy based on a cost model: calculating the resource fragmentation rate and prioritizing the device with the least remaining resources after subtracting task requirements from idle resources to maximize resource utilization; this strategy is scored as Score_utilization. A load balancing strategy: calculating the current load rate of candidate devices (e.g., average GPU utilization, task queue length) and selecting the device with the lightest current load; this strategy is scored as Score_load_balance. A greedy strategy based on predicted completion time: estimating the expected start time and total completion time of a new task on the device based on the predicted completion time of all tasks in the device's current task queue and the predicted execution time of the new task; selecting the device with the earliest predicted completion time; this strategy is scored as Score_makespan.
[0051] The third stage is weighted comprehensive decision-making: Each of the above scoring dimensions is assigned a corresponding weight coefficient (W1, W2, W3). These weights can be dynamically adjusted based on the system administrator's strategy or the current system load status (e.g., focusing on resource utilization during off-peak hours and task completion time during peak hours). The formula for calculating the device's overall total score is: Total_Score = W1 × Score_utilization + W2 × Score_load_balance + W3 × Score_makespan. Finally, the module selects the device with the highest Total_Score as the target device and issues task execution instructions to the device agent on that device, completing the scheduling process.
[0052] Example 4: This invention provides a specific application scenario for an artificial intelligence resource allocation system, namely, an image super-resolution inference task. A user requests to use the ESPCN model to upscale a 1080p image to 4K resolution, setting the batch size to 8 and the precision mode to FP16. The complete processing flow of the system for this task is as follows: S1: Task reception and feature extraction.
[0053] S11: Users submit task requests in JSON format through the RESTful API provided by the system. The request body contains key parameters such as task type (image_super_resolution), model name (espcn), input image size (1920x1080), target output size (3840x2160), batch size (batch_size=8), and computational precision (precision='fp16').
[0054] For example, a task request in JSON format is as follows: { "task_type": "image_super_resolution", "model_name": "espcn", "input_width": 1920, "input_height": 1080, "target_width": 3840, "target_height": 2160, "batch_size": 8, "precision": "fp16" } S12: The task receiving and metadata management module receives the request, parses the parameters, and generates a globally unique task identifier task_id=task_00001.
[0055] S13: The task receiving and metadata management module extracts features from the request, queries the database, supplements historical features, and constructs a feature vector for prediction. This vector includes: Static features: task_type='image_super_resolution', model_name='espcn', input_pixels=1920 1080, target_pixels=3840 2160; Dynamic configuration features: batch_size=8, precision='fp16'; Historical performance characteristics: By querying the metadata database, we can obtain the average GPU memory consumption (rolling_gpu_mem=2.0GB) and average execution time (rolling_duration=7.5s) of this user's historical ESPCN model.
[0056] S2: Resource demand forecast.
[0057] The task receiving module calls the `predict` interface of the usage prediction module, passing in the aforementioned feature vector. The usage prediction module loads the pre-trained multi-output LightGBM regression model (version lgbm_multi_v2), performs inference calculations on the feature vector, and simultaneously outputs multi-dimensional resource prediction results. This result is encapsulated into a standard resource requirement descriptor and returned to the task receiving module, specifically including: peak VRAM requirement of 2.2GB, expected execution time of 8.2 seconds, and required number of CPU cores of 2.
[0058] For example, the resource requirement descriptor is as follows: { "task_id": "task_00001", "predictions": { "gpu_mem_peak": 2.2, / / Unit: GB (peak video memory) "estimated_duration": 8.2, / / Unit: seconds "cpu_cores_required": 2 / / Number of CPU cores required }, "model_version": "lgbm_multi_v2" } S3: Resource scheduling.
[0059] The resource scheduling and task allocation module obtains the above resource requirement descriptors and, in conjunction with the real-time collected hardware node status, executes a multi-stage hybrid scheduling algorithm: S31: Hard-condition filtering: The system queries Redis to obtain the real-time cluster status. Assume there are currently Node_A (4.0GB free GPU memory, load rate 0.3, queue length 2), Node_B (3.0GB free GPU memory, load rate 0.6, queue length 5), and Node_C (1.5GB free GPU memory, load rate 0.9, queue length 8). Based on resource sufficiency checks (requires 2.2GB of GPU memory), Node_C is removed, leaving the candidate set: {Node_A, Node_B}.
[0060] S32: Multi-objective optimization scoring: Set the weighting coefficients as resource utilization W1=0.4, load balancing W2=0.3, and completion time W3=0.3. Calculate the scores for each item separately: For Node_A: Score_utilication = -(4.0-2.2) =-1.8 / / Best fit: The one with the least remaining resources is better; Score_load_balance = 1 / (0.3+0.01) ≈ 3.23 / / Load balancing: the lower the load, the higher the score; • ETA = 15s + 8.2s = 23.2s / / Estimated total completion time; Score_makespan=-23.2 / / Completion time: the shorter the time, the higher the score; Total_Score_A = (0.4) -1.8) + (0.3 3.23) + (0.3 -23.2) ≈-6.45.
[0061] For Node_B: ·Score_ utilization =-(3.0-2.2) =-0.8 ·Score_ load_balance =1 / (0.6+0.01) ≈1.64 ETA = 40s + 8.2s = 48.2s Score_makespan=-48.2 Total_Score_B = (0.4) -0.8)+(0.3 1.64)+(0.3 -48.2) ≈-14.99.
[0062] In this embodiment, the task queue of the current system is not set with priority sorting, and all new tasks are arranged at the end of the queue. Therefore, the expected total completion time is the sum of the expected execution time of each AI task of this node, plus the expected execution time of the current task.
[0063] S33: Decision and Allocation: Total_Score_A > Total_Score_B, therefore Node_A is selected as the target device. The scheduler sends task execution instructions, including task parameters and resource constraints, to the device agent module of Node_A.
[0064] S4: Task execution and feedback closed loop.
[0065] The device agent module on Node_A responds to commands, calls the open-source containerization platform (Docker) runtime interface to start a container, loads the ESPCN model, and executes inference tasks. During execution, the agent module monitors GPU memory usage and CPU utilization in real time.
[0066] After the task is completed, the agent module collects actual runtime data: actual peak video memory usage of 2.3GB (slightly higher than the predicted value), actual execution time of 8.5 seconds, and CPU usage of 2 cores. This data is then transmitted back to the usage prediction module via the task receiving module and stored in the database as new training samples. The system uses this data for online incremental learning, continuously optimizing the accuracy of the prediction model and forming a closed-loop optimization process of prediction-execution-feedback.
[0067] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope disclosed in the present invention, based on the technical solution and inventive concept of the present invention, shall fall within the scope of protection of the present invention.
Claims
1. An artificial intelligence resource allocation system, characterized in that, It includes a central node and multiple hardware nodes, wherein the central node is communicatively connected to each of the hardware nodes, and further includes: The task receiving and metadata management module, deployed at the central node, is used to receive AI task requests and extract task feature information, which includes task static features, dynamic configuration features, and historical performance features. The usage prediction module is deployed at the central node and is used to predict various resource estimation results of the AI task request based on the trained multi-output regression model, the task's static features, the dynamic configuration features, and the historical performance features. The resource scheduling and task allocation module, deployed at the central node, is used to obtain real-time resource information of each hardware node, make scheduling decisions based on a multi-objective optimization strategy and combined with the various resource prediction results, and allocate target hardware nodes to the AI task. The multi-objective optimization strategy includes hard condition filtering, multi-dimensional quantitative scoring and weighted comprehensive decision-making. The device agent and resource monitoring module is deployed one by one on each of the hardware nodes. It is used to execute the AI task in response to the allocation instruction and periodically feed back the actual resource consumption data of the completed AI task to the usage prediction module. The usage prediction module performs online iterative training on the multi-output regression model based on the actual resource consumption data.
2. The artificial intelligence resource allocation system according to claim 1, characterized in that, The multi-output regression model is constructed using the LightGBM algorithm; The various resource estimates include peak video memory, expected execution time, and chip requirements.
3. The artificial intelligence resource allocation system according to claim 2, characterized in that, The static characteristics of the task include task type, model architecture identifier, model size parameters, input data specifications, and output data specifications; The dynamic configuration features include batch size and precision mode; The historical performance characteristics include at least one of the following: historical average resource consumption, historical average execution time, historical standard deviation of resource consumption, and historical execution count.
4. The artificial intelligence resource allocation system according to claim 1, characterized in that, The hard condition filtering includes: Hardware type matching check: Filter out hardware nodes that support the hardware architecture required for the AI task; Resource sufficiency check: Based on the peak video memory among the various resource estimation results, hardware nodes with current free video memory less than the peak video memory are eliminated; Among them, the hardware nodes remaining after filtering by the hard criteria constitute the candidate device set.
5. The artificial intelligence resource allocation system according to claim 4, characterized in that, The hard condition filtering also includes: Constraint check: Based on the expected execution time in the various resource estimation results and the current task queue of each hardware node, determine the expected total completion time of the AI task on each hardware node. If the expected total completion time is later than the preset expected deadline, the corresponding hardware node is removed.
6. The artificial intelligence resource allocation system according to claim 5, characterized in that, The process of determining the estimated total completion time of the AI task on each hardware node based on the expected execution time from the various resource estimation results and the current task queue of each hardware node includes: Based on the priority order information of the AI tasks, the hypothetical insertion position of the AI task in the current task queue of each hardware node is determined. The estimated completion time of each AI task located before the hypothetical insertion position is calculated and added to the expected execution time to obtain the expected total completion time.
7. The artificial intelligence resource allocation system according to any one of claims 4 to 6, characterized in that, The multi-dimensional quantitative score is calculated for each hardware node in the candidate device set, including: Based on each hardware node, a resource utilization score is determined according to the current idle video memory and the peak video memory. The higher the resource utilization score, the fewer resource fragments are generated after the AI task is allocated. For each hardware node, a load balancing score is determined based on the current average GPU utilization and the task queue length. The higher the load balancing score, the lower the real-time load of the hardware node. Based on each hardware node, an estimated completion time score is determined according to the estimated completion time of each AI task preceding it in the current task queue and the expected execution time of the AI task. The higher the estimated completion time score, the shorter the expected total completion time of the AI task.
8. The artificial intelligence resource allocation system according to claim 7, characterized in that, The weighted comprehensive decision includes: Set a first weight for the resource utilization score, a second weight for the load balancing score, and a third weight for the estimated completion time score, and calculate the total score for each hardware node based on the scores and their weights; select the hardware node with the highest total score as the target hardware node.
9. The artificial intelligence resource allocation system according to claim 1, characterized in that, The online iterative training includes: The actual resource consumption data is stored in the sample library as a new training sample. When the number of newly added training samples in the sample library reaches a preset sample threshold, the multi-output regression model is incrementally trained based on the newly added training samples. The deviation between the various resource estimation results and the actual resource consumption data is continuously monitored. When the deviation exceeds a preset threshold within a continuous preset time window, the retraining of the multi-output regression model based on the newly added training samples is triggered. The trained model is hot-loaded into the inference service to replace the old model, thus achieving uninterrupted updates.
10. A method for allocating artificial intelligence resources, characterized in that, include: Receive AI task requests and extract task feature information, which includes static task features, dynamic configuration features, and historical performance features; Based on the trained multi-output regression model and the task's static features, dynamic configuration features, and historical performance features, the AI task request's various resource estimation results are predicted and encapsulated into a standard descriptor. The system acquires real-time resource information of each hardware node, makes scheduling decisions based on a multi-objective optimization strategy and the encapsulated multi-resource prediction results, and allocates target hardware nodes to the AI task. The multi-objective optimization strategy includes hard condition filtering, multi-dimensional quantitative scoring, and weighted comprehensive decision-making. The system executes the AI task in response to the allocation instruction and periodically feeds back the actual resource consumption data of the completed AI task to the usage prediction module. The usage prediction module performs online iterative training of the multi-output regression model based on the actual resource consumption data.
