Heterogeneous resource intelligent allocation scheduling method and system based on deep learning
By adopting a deep learning-based intelligent allocation scheduling method in hybrid heterogeneous server clusters, building a hybrid model of DeepFM and LSTM, and dynamically adjusting resource scheduling strategies, the problems of uneven computing power allocation and complex computing task scheduling in hybrid heterogeneous server clusters are solved, and efficient execution of computing tasks and improvement of resource utilization are achieved.
Patent Information
- Application Number
- CN202510355450.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-25
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-03-25
AI Technical Summary
In a hybrid heterogeneous server cluster, how to optimize the computing power allocation strategy, improve the execution efficiency and order of computing tasks, and solve the problems of uneven computing power allocation, complex computing task scheduling, and uneven execution efficiency.
Using a heterogeneous resource intelligent allocation and scheduling method based on deep learning, we use the task key features, importance values and calculation task sequence numbers of the historical computing task queue, build a hybrid model of DeepFM and LSTM, train an intelligent allocation and scheduling model, dynamically adjust resource scheduling strategies, and realize efficient execution of computing tasks on heterogeneous computing resource platforms such as CPU, GPU, and NPU.
It realizes the efficient execution of multiple concurrent computing tasks on heterogeneous computing resource platforms, improves overall computing efficiency and resource utilization, and solves the problems of uneven computing power allocation and complex computing task scheduling.
Smart Images

Figure CN119883648A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of intelligent software development for heterogeneous resources, and specifically relates to a method and system for intelligent allocation and scheduling of heterogeneous resources based on deep learning. Background Art
[0002] With the continuous progress and profound changes in artificial intelligence technology, a series of cutting-edge intelligent computing tasks have emerged, covering multiple key areas such as speech recognition, image recognition, intelligent control systems, intelligent monitoring, autonomous driving technology, and natural language processing. These complex and diverse computing tasks are inseparable from the powerful support of the hardware platform to perform efficient and accurate data processing and analysis.
[0003] In the current technology ecosystem, the hardware cornerstones for executing deep learning computing tasks mainly include CPU, GPU and the emerging NPU. As a general-purpose processor, CPU is capable of various types of computing tasks, but its efficiency is relatively low when processing large-scale parallel data operations; GPU, with its powerful parallel processing capabilities, has shown significant advantages in graphics rendering and specific types of computing acceleration; while NPU is specially designed for neural network operations such as deep learning, and can provide more efficient and professional computing capabilities.
[0004] In the actual deployment process, due to cost control factors and the inherent dependence of some specific computing tasks on GPUs, server clusters often present hybrid heterogeneity characteristics, that is, equipped with both GPUs and NPUs. Although this hybrid architecture improves the flexibility and compatibility of the system to a certain extent, when faced with large-scale and diverse computing tasks, it also brings problems such as uneven computing power distribution, complex computing task scheduling, and uneven execution efficiency. Therefore, how to optimize the computing power allocation strategy of hybrid heterogeneous server clusters and improve the execution efficiency and orderliness of computing tasks has become a key technical problem that needs to be solved urgently. Summary of the invention
[0005] In view of this, the present invention provides a method and system for intelligent allocation and scheduling of heterogeneous resources based on deep learning, which realizes the efficient execution of multiple concurrent computing tasks on heterogeneous computing resource platforms such as CPU, GPU, and NPU.
[0006] The present invention provides a method for intelligent allocation and scheduling of heterogeneous resources based on deep learning, which specifically includes the following steps: Step 1: Obtain the historical computing task queue, collect the key features of the task, the importance value and the computing task sequence number, calculate the total execution time of the task queue and the remaining resources of the platform to construct a feature data set; the key features of the task include the priority of the execution calculation, the task execution time, the execution calculation platform and the computing resource occupancy; Step 2: Build an intelligent allocation and scheduling model based on DeepFM and LSTM. The input of the intelligent allocation and scheduling model is the key features of the task queue, the total execution time and the remaining resources of the platform, and the output is the computing task sequence. Use the feature data set built in step 1 to complete the training of the intelligent allocation and scheduling model. Step 3: In actual use, obtain the key features of the pending computing tasks, divide the pending computing tasks into multiple computing task queues according to the execution computing platform, and calculate the total resource occupancy of the computing task queues required to execute on each computing platform; if the total resource occupancy is not greater than the remaining resources of the platform, schedule the execution of the computing task queues; otherwise, input the key features of the tasks, the total execution time and the remaining resources of the platform into the intelligent allocation scheduling model obtained in step 2 to obtain the computing task sequence, and then complete the execution of the computing task queues on the computing platform according to the computing task sequence.
[0007] Furthermore, the intelligent allocation and scheduling model is formed by a cascade of a DeepFM layer, an LSTM layer and an output layer, wherein the input of the DeepFM layer is the key task features of the computing tasks in the computing task queue, and the output is the importance value of each computing task; the input of the LSTM layer is the importance value and key features of the computing tasks in the computing task queue, the total execution time of the computing task queue and the remaining platform resources, and the output is the timing features of the computing tasks; the input of the output layer is the timing features of the computing tasks, and the output is the computing task sequence.
[0008] Furthermore, the GAUC evaluation method is used to evaluate the training results of the intelligent allocation and scheduling model.
[0009] Furthermore, a resource scheduling strategy is dynamically adjusted according to the computing task sequence to complete the execution of the computing task queue on the computing platform.
[0010] Furthermore, the dynamic resource scheduling strategy is to dynamically schedule computing tasks using an immediate preemptive priority scheduling algorithm and a fast switching scheduling algorithm.
[0011] Furthermore, the method of scheduling the execution of the computing task queue in step 3 is: scheduling the execution according to the priority of the computing task.
[0012] The present invention provides a heterogeneous resource intelligent allocation and scheduling system based on deep learning, including a model training module, an input module, a parsing module, a heterogeneous computing module, a log module, a data management module and a resource monitoring module; The model training module is responsible for training the intelligent allocation and scheduling model, and includes a training submodule and an evaluation submodule; the input module is responsible for receiving the basic information of the computing task and organizing it into a computing task queue configuration file, and sending the computing task queue configuration file to the parsing module; the parsing module is used to interpret the computing task queue configuration file to obtain the key features of the task, and send the key features of the task to the heterogeneous computing module; the heterogeneous computing module is used to analyze and derive the computing task sequence based on the key features of the task using the intelligent allocation and scheduling model; the log module is used to record the log information and abnormal events during the execution of the computing task in real time; the data management module is used to record the key features of the computing task and provide data modification and query functions; the resource monitoring module allows users to obtain the computing resource occupancy of the computing task, the remaining platform resources and the execution progress of the computing task.
[0013] Furthermore, Docker containerization is used for deployment and operation.
[0014] Furthermore, the input module uses the command line tool Curl to send a POST input request to the parsing module to complete the transfer of the computing task queue configuration file.
[0015] Furthermore, the parsing module performs standardization processing on the acquired mission-critical features. Beneficial Effects
[0016] The present invention establishes a feature data set by analyzing the optimal allocation scheme of historical computing task resources, builds an intelligent allocation scheduling model based on DeepFM and LSTM and uses the feature data set to complete training, obtains the task key features of the computing tasks to be processed in actual use, and divides the computing tasks to be processed into computing task queues, obtains the total resource occupancy of each computing platform required to execute the computing task queues, determines the scheduling execution mode of the computing task queues according to the relationship between the total resource occupancy and the remaining resources of the platform, and makes full use of heterogeneous computing resources such as CPU, GPU, NPU, etc., thereby realizing the rapid completion of batch computing tasks and greatly improving the overall computing efficiency and resource utilization. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 A flowchart of a method for intelligent allocation and scheduling of heterogeneous resources based on deep learning provided by the present invention.
[0018] Figure 2 A schematic diagram of the structure of an intelligent allocation and scheduling model constructed in a deep learning-based intelligent allocation and scheduling method for heterogeneous resources provided by the present invention.
[0019] Figure 3A flowchart of an immediate preemptive priority scheduling algorithm adopted in a heterogeneous resource intelligent allocation and scheduling method based on deep learning provided by the present invention.
[0020] Figure 4 A structural schematic diagram of a heterogeneous resource intelligent allocation and scheduling system based on deep learning provided by the present invention. DETAILED DESCRIPTION
[0021] The present invention is described in detail below with reference to the accompanying drawings and with reference to the embodiments.
[0022] The present invention provides a heterogeneous resource intelligent allocation and scheduling method and system based on deep learning, whose core idea is: establishing a feature data set by analyzing the optimal allocation plan of historical computing task resources, building an intelligent allocation and scheduling model based on DeepFM and LSTM and using the feature data set to complete training, obtaining the key task features of the computing tasks to be processed during actual use, and dividing the computing tasks to be processed into computing task queues, obtaining the total resource occupancy of each computing platform required to execute the computing task queues, and determining the scheduling execution mode of the computing task queues according to the relationship between the total resource occupancy and the remaining resources of the platform.
[0023] The present invention provides a method for intelligent allocation and scheduling of heterogeneous resources based on deep learning, and the specific process is as follows: Figure 1 As shown, the specific steps include: Step 1: Define the key features of computing tasks in the optimal allocation plan of historical computing task resources. When users use heterogeneous resource CPU, GPU, NPU hardware platforms to perform training, deployment, or debugging computing tasks, collect the key features, importance values, and computing task sequence numbers of each computing task, as well as the total execution time of all computing tasks in the computing task queue and the amount of remaining platform resources of the computing platform before the computing task queue is executed, to form the computing task queue features and establish a feature data set.
[0024] The computing task queue features in the present invention include the key features of the computing task, the total execution time of all computing tasks in the computing task queue, and the amount of platform resources remaining before the computing task queue is executed. Among them, the key features of the computing task include the computing task ID, the computing task type, the priority of the execution calculation, the computing task execution time, the execution calculation platform and the computing resource occupancy.
[0025] The computing task ID is automatically assigned by the system and is a unique identifier of the computing task. For example, it increases automatically starting from 1.
[0026] Computing task types include training, deployment, and debugging.
[0027] The priority of executing calculations is the urgency of the calculation task, which indicates the priority of multiple calculation tasks when they are executed. The calculation tasks with high priority are given priority to obtain computing resources, and the calculation tasks with low priority need to wait for idle computing resources to be executed, including: P1 (urgent), P2 (high), P3 (medium) and P4 (low).
[0028] The computing task execution time is the time from the start to the end of the computing task, in milliseconds.
[0029] The execution computing platform refers to the execution computing hardware platform used for computing tasks, including: CPU, NPU, GPU.
[0030] The computing resource usage indicates the maximum size of computing resources required on different heterogeneous hardware platforms when executing computing tasks, in MB.
[0031] The importance value indicates the importance of the computing task execution. It is a weight value ranging from 0 to 1. The closer it is to 1, the more important the computing task is.
[0032] The computing task sequence number indicates the ranking sequence number of the computing task in the optimal allocation plan of historical computing task resources.
[0033] The total execution time of all computing tasks in the computing task queue, in seconds.
[0034] The remaining platform resources before the task queue is executed are the remaining heterogeneous resources before the task queue is executed, in MB.
[0035] Taking a computing task queue containing two computing tasks as an example, the computing task queue characteristics are shown in Table 1: Table 1 Computational task queue characteristics
[0036] Step 2: Preprocess the computing task queue features in the feature data set to form a feature data set.
[0037] The data preprocessing process for calculating the task queue characteristics in the present invention includes the following steps: Step 2.1: Perform data identification processing on the computing task type, computing execution priority, and computing execution platform, and assign a unique ID value.
[0038] The computing task type is assigned an ID value. Training is represented by a value of 1, deployment is represented by a value of 2, and debugging is represented by a value of 3.
[0039] The priority of executing the calculation is assigned an ID value, P1 (urgent), represented by the value 1; P2 (high), represented by the value 2; P3 (medium), represented by the value 3; P4 (low), represented by the value 4.
[0040] The execution computing platform is assigned an ID value. The CPU is represented by a value of 1, the NPU is represented by a value of 2, and the GPU is represented by a value of 3.
[0041] Taking a computing task queue containing two computing tasks as an example, the characteristics of the computing task queue after data identification processing are shown in Table 2: Table 2 Data identification calculation task queue characteristics table
[0042] Step 2.2: Use the StandardScaler() function based on the machine learning tool Sklearn (Scikit-learn) in Python language to standardize the computing task queue characteristics after data identification processing.
[0043] Step 2.3: Use Pandas, a data analysis tool in Python, to write the feature set standardized in step 2.2 into a character separated value file format (CSV) to form a feature data set.
[0044] Step 3: Split the feature data set formed in step 2 into two CSV files: training set and evaluation set.
[0045] First, use Python's open file function, that is, open() function, to read the CSV file of the feature data set; then, use the train_test_split() function of Sklearn (Scikit-learn), a machine learning tool based on Python language, to split the read data, such as randomly sampling 70% of the data to build a training set, 15% of the data to build a training set, and the rest of the data as an evaluation set to form a computing task queue feature training set.
[0046] Step 4: Build an intelligent allocation and scheduling model based on the DeepFM and LSTM hybrid model, and use the computing task queue feature training set formed in step 3 to complete the training of the intelligent allocation and scheduling model.
[0047] In order to realize intelligent allocation and scheduling of heterogeneous resources, that is, intelligently allocate heterogeneous resources and schedule them to maximize resource utilization, the present invention uses DeepFM and LSTM in machine learning to establish a hybrid model, wherein DeepFM is good at capturing high-order interactions and low-order linear relationships between features, and is suitable for processing structured data, such as computing task features, resource features, etc.; LSTM is good at capturing timing dependencies, and is suitable for processing dynamically changing computing tasks and resource states. The present invention establishes an intelligent allocation and scheduling model based on the DeepFM and LSTM hybrid model, which can simultaneously model static feature interactions and dynamic timing dependencies, thereby optimizing resource allocation more comprehensively.
[0048] The intelligent allocation and scheduling model constructed by the present invention has a structure as follows: Figure 2 As shown in FIG. 1 , it is formed by the cascade of the DeepFM layer, the LSTM layer and the output layer, wherein the input of DeepFM is the computing task ID, computing task type, priority of computing execution, computing task execution time, computing platform and computing resource occupancy in the computing task queue characteristics, and the output is the importance value of each computing task in the computing task queue; the input of LSTM is the importance value of each computing task output by DeepFM and the computing task ID, computing task type, priority of computing execution, computing task execution time, computing platform, computing resource occupancy, total execution time of all computing tasks in the computing task queue and the remaining platform resources before the computing task queue is executed in the computing task queue characteristics, and the output is the timing characteristics of the computing tasks; the input of the output layer is the timing characteristics of the computing tasks, and the output is the sorted computing task sequence, which is the optimal resource allocation combination solution.
[0049] The optimal resource allocation combination scheme refers to a queue formed by load balancing and optimal resource allocation of all computing tasks on various heterogeneous hardware platforms. It is mainly based on its execution platform, execution time, computing power requirements and importance. After reorganization and sorting, a new computing task sequence is formed. The computing tasks are scheduled according to this computing task execution sequence to achieve load balancing and reasonable scheduling of heterogeneous resources. In the new computing task queue, the resource allocation of computing tasks follows the order from front to back.
[0050] In practical applications, computing power requirements, computing task execution time and importance are often interrelated. A computing task may have high computing power requirements, long execution time and high importance at the same time. In this case, the system needs to comprehensively consider these three factors, and the present invention adopts an intelligent allocation scheduling model to make trade-offs. By sorting according to time, computing power and importance, the order and priority of computing task execution can be adjusted more flexibly, thereby ensuring the balance between resource requirements and computing task execution. Specifically, the present invention gives priority to the execution of computing tasks with short execution time, moderate computing power requirements and high importance to ensure that key computing tasks can be processed in a timely and effective manner. Taking GPU resource allocation as an example, assuming that the current GPU platform remaining resources are 24GB, and in the computing task queue that needs to be executed on the GPU, the resource requirements of each computing task are different, and the total demand is 36GB. In this case, the computing task queue will first be analyzed and calculated by the intelligent allocation scheduling model to obtain an optimized computing task sequence, and then, resources will be allocated according to the computing task sequence, and computing tasks will be executed until the platform remaining resources of the GPU are fully occupied.
[0051] Step 5: Use the evaluation set formed in step 3 to evaluate the intelligent allocation and scheduling model trained in step 4. The process of using the evaluation set to evaluate the trained intelligent allocation and scheduling model is the process of evaluating whether the model fits the evaluation set.
[0052] The present invention uses GAUC to calculate the score of the intelligent allocation and scheduling model, evaluates the training effect of the intelligent allocation and scheduling model according to the score, and outputs the evaluation result. The specific evaluation process is as follows: Step 5.1: Input the data in the evaluation set into the trained intelligent allocation and scheduling model to obtain the prediction results.
[0053] Step 5.2: Calculate the True Positive Rate (TPR) and False Positive Rate (FPR) based on the predicted results and the actual results in the evaluation set. The calculation process is:
[0054] Among them, TP (True Positive) means that the actual example is positive and the prediction is also positive. FP (False Positive) means that the actual example is negative but the prediction is positive. FN (False Negative) means that the actual example is positive but the prediction is negative. TN (True Negative) means that the actual example is negative and the prediction is also negative.
[0055] Step 5.3: Draw the ROC curve based on the TPR value and the FPR value, with TPR as the vertical axis and FPR as the horizontal axis.
[0056] Step 5.4: Calculate the AUC value, that is, the area under the ROC curve, according to the ROC curve. The calculation process is:
[0057] Step 5.5: Calculate GAUC based on the AUC value. GAUC actually calculates the AUC of each computing task queue, then takes the weighted average, and finally obtains groupAUC, i.e. GAUC. The calculation process is:
[0058] Step 5.6: Determine whether the intelligent allocation and scheduling model meets the use requirements by setting the threshold of GAUC. For example, the threshold is set to 0.7, that is, when GAUC is greater than or equal to 0.7, it is determined that the current intelligent allocation and scheduling model can be used for intelligent allocation and scheduling of heterogeneous resources; otherwise, adjust the parameters in training to retrain the intelligent allocation and scheduling model until GAUC is greater than 0.7 to obtain the optimal intelligent allocation and scheduling model, where adjusting the parameters in training includes adjusting the parameters in DeepFM and LSTM and adjusting the parameters in the training process.
[0059] Among them, DeepFM contains the following parameters: k, the dimension of the hidden vector of the factorization machine, that is, the dimension of the hidden vector corresponding to each feature, which determines the complexity of the feature interaction learned by the intelligent allocation scheduling model; embedding_size, the embedding dimension of the feature in the embedding layer, each feature is first converted into a high-dimensional vector through an embedding layer before being input into the DNN, and this dimension is embedding_size; hidden_units, the number of hidden layer units in the DNN is a list that specifies the number of neurons in each hidden layer. For example, [128,64] means there are two hidden layers, the first layer has 128 neurons, and the second layer has 64 neurons. The LSTM algorithm contains the following parameters: hidden_size, the dimension of the hidden state, that is, the dimension of the LSTM unit output; num_layers, the number of LSTM layers; time_steps, the time step.
[0060] Adjust the training process parameters, including the following parameters: learning_rate, learning rate, which controls the step size of weight update; epochs, the number of training cycles, that is, the number of times the entire training set is used for training; batch_size, the size of each batch, that is, the number of samples used for each gradient update; optimizer, optimization algorithm, such as Adam, SGD, etc., used to update the weights of the intelligent allocation scheduling model.
[0061] Step 6. In actual use, obtain the basic information of multiple deep learning computing tasks to be processed to form a computing task queue. The basic information of the computing tasks includes the computing task name, computing task path, Python interpreter path, parameter details, input and output format of the computing task, priority of execution, execution mode, computing task execution time, execution computing platform, computing resource occupancy, etc., and check the correctness of the input as required.
[0062] Among them, the computing task name is a name customized for the computing task. The computing task path indicates the absolute path address of the executable program or py program of the computing task. The Python interpreter path indicates the interpreter path address specified by the user to execute the py program when the computing task path is the py program. The parameter details indicate the parameter details that need to be passed in when the executable program or py program of the computing task is executed. The input and output format of the computing task indicates the data format that needs to be input for the computing task, including the format of passing parameters and the data format of the output after the calculation is completed, so that the execution of the calculation is saved to the specified location according to the specified data format after the calculation is completed. The priority of executing the calculation indicates the priority when multiple computing tasks are executed. The execution mode indicates the type of execution mode of the computing task, including: one-time computing task, cyclic computing task and timed computing task. The execution time of the computing task is the time from the start to the end of the execution of the computing task, in milliseconds. The execution computing platform indicates the computing task execution computing platform device. The system determines that the computing task can support the computing hardware to automatically allocate the execution computing platform for the computing task, so that the computing task is pushed to the allocated hardware platform during resource scheduling and the calculation is performed. The computing resource occupancy indicates the maximum computing resource size required on different heterogeneous hardware platforms when executing the computing task.
[0063] The computing task queue configuration file contains the basic information of all computing tasks and is stored in the Json file format. For example, the Json format of a computing task configuration file is as follows: { "tasks":[ { "task_name":"readconfig", "task_path":" / home / xx / project / readconfig.bin", "python":null, "args":"-c / home / xx / project / config.json", "remote_output":null, "priority":3, "trigger_type":1 }, ] } Step 7: Obtain usage data of all computing resources (CPU, GPU, NPU and other heterogeneous computing resources) and the remaining computing resources.
[0064] For example, users can use the input interface to input the computing task queue configuration file, where the input interface is implemented by Curl, and a POST input request is sent through Curl. The request parameter structure is in Json format, and the data content is the absolute path address of the computing task queue configuration file, for example: curl-H"Content-Type:application / json"-XPOST-d'{"config_path":" / root / config.json"}'http: / / 192.168.1.198:19891 / postTaskQueue. If a success message is returned, it means that the computing task queue configuration file has been received. Otherwise, try to resend the request.
[0065] Step 8: parse the computing task queue configuration file, obtain the basic information of each computing task in the computing task queue configuration file, parse the computing task to obtain the key features of the computing task, and record the basic information of the computing task into the database for persistent storage.
[0066] Step 9: All computing tasks are initially divided according to the execution computing platform in the basic information of the computing tasks according to heterogeneous resources. For example, NPU computing tasks are divided into the same computing task queue, and GPU computing tasks are divided into another same computing task queue.
[0067] Step 10: Calculate the total amount of computing task resources to be scheduled for execution on each computing platform. If the total amount of computing task resources does not exceed the remaining resources of the computing platform, schedule and execute these computing tasks according to the priority of the computing tasks. Otherwise, analyze and calculate the key features of the computing task queue tasks through the intelligent allocation scheduling model. The specific analysis and calculation are as follows: Step 10.1, standardizing the key features of the computing tasks in the computing task queue; Step 10.2, initialize and load the intelligent allocation and scheduling model trained in step 4; Step 10.3: Then input the key features of the computing task processed in step 10.1 and the remaining platform resources of the computing platform into the intelligent allocation and scheduling model for analysis and calculation, and output the optimal resource allocation combination plan.
[0068] Step 11: Use a dynamic resource scheduling strategy to schedule computing tasks on a heterogeneous computing hardware platform according to an optimal resource allocation combination scheme. The dynamic resource scheduling strategy uses an immediate preemptive priority scheduling algorithm and a fast switching scheduling algorithm to dynamically schedule computing tasks.
[0069] The priority scheduling algorithm for immediate preemption has the following processing flow: Figure 3 As shown, the scheduling process includes: A time slice is specified in advance, and a priority queue is used to store all computing task processes, and the processes are sorted from high to low according to the priority of the computing tasks. Whenever a computing task process is completed or preempted, the next computing task process with the highest priority is taken out of the queue for execution. If there are multiple computing task processes with the same priority, these processes are executed in turn using a time slice rotation method.
[0070] Among them, the time slice round-robin algorithm divides the time on the computing resources into several time slices. Each process executes for a certain period of time in a time slice, and then is paused and put back to the ready queue to wait for the next scheduling. If a process does not complete execution in a time slice, it will be paused and put back to the end of the ready queue to wait for the next scheduling. When implementing the time slice round-robin algorithm: The length of the time slice should be set according to the actual situation, usually between 10ms and 100ms; The ready queue should be implemented using a data structure such as a queue or linked list to facilitate fast insertion and deletion of processes; Each process needs to record its own execution time and remaining time so that it can determine whether to continue execution at the end of the time slice; At the end of each time slice, the current process needs to be put back at the end of the ready queue and the next process is selected from the queue for execution.
[0071] The scheduling process of the fast switching scheduling algorithm is as follows: under the condition of real-time monitoring of computing resources, when the previous computing task in execution is in the completion critical area or an external interrupt occurs, the system prepares the next computing task process in advance. Once completed or interrupted, the system immediately switches the computing task to reduce the waiting time of real-time computing tasks.
[0072] Step 12: During the execution of the computing task, the running log of the computing task is recorded to form a computing task log file.
[0073] Step 13: After the computing task is executed, the output result of the computing task is sorted into the target format specified in the computing task queue configuration file and saved in the specified directory location.
[0074] Step 14: After all computing tasks in the computing task queue are completed, collect and record all information of the computing task queue into the feature data set. After the feature data set is updated, repeat steps 2, 3, 4, and 5 to iteratively train the intelligent allocation scheduling model.
[0075] The present invention provides a heterogeneous resource intelligent allocation and scheduling system based on deep learning, and its structure is as follows: Figure 4 As shown in the figure, it includes model training module, input module, parsing module, heterogeneous computing module, log module, data management module and resource monitoring module. The system is deployed and operated in Docker containerization mode, which can improve the system deployment efficiency and adapt to various server cluster environment scenarios. It can also provide a completely isolated operating environment for each module, reduce the impact of interference from other libraries or packages in the complex environment of the server cluster, and improve the reliability of the system.
[0076] Among them, the model training module is responsible for training the intelligent allocation and scheduling model. This module includes a training submodule and an evaluation submodule. The training submodule is used to build an intelligent allocation and scheduling model based on machine learning, and extract feature data from the feature data set for preprocessing to form a data set to train the intelligent allocation and scheduling model. The evaluation submodule is used to evaluate the intelligent allocation and scheduling model using the GAUC indicator. If the evaluation passes, the optimal model is obtained. Otherwise, the parameters in training are adjusted and retrained until the requirements are met.
[0077] The input module is responsible for receiving the basic information of computing tasks provided by users. This information is organized into a computing task queue configuration file, and a POST input request is sent to the system through Curl to input the computing task queue configuration file into the system, and the computing task queue configuration file is passed to the parsing module.
[0078] The parsing module is used to interpret the computing task queue configuration file and the contents of each computing task, and extract the key features of the task, including the computing task ID, computing task type, computing priority, execution time, execution computing platform, computing resource occupancy, etc.; these key features of the task are then standardized, and the processed data will be input into the heterogeneous computing module and synchronized to the data management module to realize data management.
[0079] The heterogeneous computing module uses the intelligent allocation and scheduling model to analyze the optimal resource allocation combination plan based on the standardized data transmitted by the analysis module. The module is equipped with an analysis submodule and a resource scheduling submodule. The analysis submodule is mainly responsible for calculating the resource requirements of the task queue and the remaining platform resources of the heterogeneous system, and calculates the optimal resource combination plan through the intelligent model. Based on this plan, the resource scheduling submodule uses a dynamic adjustment resource scheduling strategy to reasonably allocate computing tasks to heterogeneous hardware platforms for execution, so as to achieve the optimal configuration of resources and the rapid completion of the computing task queue. At the same time, the resource scheduling submodule is also connected to the resource monitoring module to monitor the execution of computing tasks.
[0080] The log module is used to record the log information during the execution of computing tasks in real time, and to capture and record abnormal events in time to facilitate subsequent maintenance and computing task troubleshooting.
[0081] The data management module is used to record the detailed information of computing tasks and their execution process, such as execution status, execution time, etc., and provides data addition, deletion, modification and query functions to achieve comprehensive management of computing task data, as well as record the key features of computing tasks and manage feature data sets.
[0082] The resource monitoring module is responsible for continuously monitoring the computing resource usage of all online computing tasks, the remaining platform resources, and the execution progress of computing tasks during system operation to ensure the effective use of system resources and the smooth execution of computing tasks.
[0083] Specifically, when users operate heterogeneous resource hardware platforms (including CPU, GPU, NPU, etc.) to perform various computing tasks such as training, deployment, and debugging, the system will implement a series of steps to optimize computing task management and resource allocation. The system will first monitor and record the optimal allocation plan of historical computing task resources, which includes the computing task queue characteristics, the task key characteristics of each computing task, and summarize the overall execution time of the computing task queue. These detailed features are then stored in the feature data set. The system retrieves these feature data from the feature data set, exports the data into CSV file format after standardization, and constitutes the data set required for the intelligent allocation scheduling model. The data set is further divided into a test set and an evaluation set for the training and evaluation verification of the intelligent allocation scheduling model. The construction of the intelligent allocation scheduling model is based on machine learning technology, and the training process depends on the training set data. Users submit basic information of deep learning computing tasks through the login interface, and the basic information is used to generate a computing task queue configuration file. After the user imports the computing task queue configuration file into the system, the system will retrieve and summarize the usage status and remaining capacity of all available heterogeneous computing resources (CPU, GPU, NPU, etc.) in real time. The system parses the computing task queue configuration file, extracts the specific requirements of each computing task, and preliminarily classifies the computing tasks according to the computing task characteristics (especially the specified hardware platform type). On this basis, the system calculates the total amount of resources required for the computing tasks to be scheduled on each computing platform. If the total amount does not exceed the platform's remaining resources, the scheduling is performed directly; otherwise, the intelligent allocation scheduling model is enabled to conduct in-depth analysis based on the key characteristics of the computing task queue to determine the optimal resource allocation plan, aiming to complete all computing tasks in the shortest time. Based on the optimal resource allocation plan obtained, the system adopts a dynamic adjustment resource scheduling strategy to accurately schedule computing tasks to suitable heterogeneous hardware platforms to achieve efficient computing power allocation and scheduling. During the computing task execution phase, the system will continuously record the running logs of the computing tasks to ensure that the process is traceable. After the computing task is completed, the system will organize and save the output results in the format and storage path specified in the configuration file. In this process, the key characteristics of each computing task are collected and recorded again, the total execution time of all computing tasks in the computing task queue and the remaining platform resources during execution are calculated, and these characteristics are written into the feature data set to update the intelligent allocation scheduling model.
[0084] In summary, the above are only preferred embodiments of the present invention and are not intended to limit the protection scope of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for intelligent allocation and scheduling of heterogeneous resources based on deep learning, characterized in that: The specific steps include: Step 1: Obtain the historical computing task queue, collect the key features of the task, the importance value and the computing task sequence number, calculate the total execution time of the task queue and the remaining resources of the platform to construct a feature data set; the key features of the task include the priority of the execution calculation, the task execution time, the execution calculation platform and the computing resource occupancy; Step 2: Build an intelligent allocation and scheduling model based on DeepFM and LSTM. The input of the intelligent allocation and scheduling model is the key features of the task queue, the total execution time and the remaining resources of the platform, and the output is the computing task sequence. Use the feature data set built in step 1 to complete the training of the intelligent allocation and scheduling model. Step 3: In actual use, obtain the key features of the pending computing tasks, divide the pending computing tasks into multiple computing task queues according to the execution computing platform, and calculate the total resource occupancy of the computing task queues required to execute on each computing platform; if the total resource occupancy is not greater than the remaining resources of the platform, schedule the execution of the computing task queues; otherwise, input the key features of the tasks, the total execution time and the remaining resources of the platform into the intelligent allocation scheduling model obtained in step 2 to obtain the computing task sequence, and then complete the execution of the computing task queues on the computing platform according to the computing task sequence.
2. The method for intelligent allocation and scheduling of heterogeneous resources according to claim 1, characterized in that: The intelligent allocation and scheduling model is formed by cascading a DeepFM layer, an LSTM layer and an output layer, wherein the input of the DeepFM layer is the key task features of the computing tasks in the computing task queue, and the output is the importance value of each computing task; the input of the LSTM layer is the importance value and key features of the computing tasks in the computing task queue, the total execution time of the computing task queue and the remaining platform resources, and the output is the timing features of the computing tasks; the input of the output layer is the timing features of the computing tasks, and the output is the computing task sequence.
3. The method for intelligent allocation and scheduling of heterogeneous resources according to claim 1, characterized in that: The GAUC evaluation method is used to evaluate the training results of the intelligent allocation and scheduling model.
4. The method for intelligent allocation and scheduling of heterogeneous resources according to claim 1, characterized in that: The resource scheduling strategy is dynamically adjusted according to the computing task sequence to complete the execution of the computing task queue on the computing platform.
5. The method for intelligent allocation and scheduling of heterogeneous resources according to claim 4, characterized in that: The dynamic resource adjustment scheduling strategy is to use an immediate preemptive priority scheduling algorithm and a fast switching scheduling algorithm to dynamically schedule computing tasks.
6. The method for intelligent allocation and scheduling of heterogeneous resources according to claim 1, characterized in that: The method of scheduling the execution of the computing task queue in step 3 is: scheduling the execution according to the priority of the computing task.
7. A heterogeneous resource intelligent allocation and scheduling system based on deep learning, characterized in that: It includes model training module, input module, parsing module, heterogeneous computing module, log module, data management module and resource monitoring module; The model training module is responsible for training the intelligent allocation and scheduling model, and includes a training submodule and an evaluation submodule; the input module is responsible for receiving the basic information of the computing task and arranging it into a computing task queue configuration file, and sending the computing task queue configuration file to the parsing module; The parsing module is used to interpret the computing task queue configuration file to obtain the key features of the task, and send the key features of the task to the heterogeneous computing module; the heterogeneous computing module is used to analyze and obtain the computing task sequence based on the key features of the task using the intelligent allocation and scheduling model; the log module is used to record the log information and abnormal events during the execution of the computing task in real time; The data management module is used to record the key features of the computing tasks and provide data modification and query functions; the resource monitoring module allows users to obtain the computing resource usage of the computing tasks, the remaining platform resources and the execution progress of the computing tasks.
8. The heterogeneous resource intelligent allocation and scheduling system according to claim 7 is characterized in that: Deploy and run using Docker containerization.
9. The heterogeneous resource intelligent allocation and scheduling system according to claim 7, characterized in that: The input module uses the command line tool Curl to send a POST input request to the parsing module to complete the transfer of the computing task queue configuration file.
10. The heterogeneous resource intelligent allocation and scheduling system according to claim 7, characterized in that: The parsing module performs standardization processing on the acquired mission-critical features.
Citation Information
Patent Citations
Dynamic matching algorithm, system and device based on GPU resource occupation characteristics
CN112559147A
Computing power flexible combination method and system based on embedded platform
CN116737397A
Computing power scheduling method based on deep learning
CN116974768A
Cross-domain cloud platform neural network training task scheduling method based on reinforcement learning
CN118550667A
Method and system for improving computing power efficiency
CN118550711A
Cited By
AI-based pension treatment dynamic multi-thread generation method, equipment and medium
CN121210145A
An AI-based pension treatment dynamic multi-thread generation method, device and medium
CN121210145B