AI processor scheduling method and device based on job scheduling system, equipment and storage medium

By defining the state space and action space in the job scheduling system, designing reward functions that comprehensively consider multiple objectives, building a resource scheduling model, identifying the best scheduling strategy and continuously updating the model, the scheduling method in the existing technology is solved in handling large-scale processing. The problem of insufficient real-time and accuracy in concurrent tasks achieves efficient and intelligent resource scheduling.

CN119473540AInactive Publication Date: 2025-02-18WUXI NUOYI INTELLIGENT TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411510168.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-28
Publication Date
2025-02-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing machine learning-based job scheduling methods have problems of insufficient real-time and accuracy when dealing with large-scale concurrent tasks, especially when facing dynamically changing workloads, the static model has poor adaptability and insufficient multi-objective optimization capabilities.

Method used

A method of AI processor scheduling based on job scheduling system is proposed. By collecting historical data for preprocessing, defining the state space and action space of the scheduler, and designing a reward function that comprehensively considers delay, energy consumption and resource utilization, and constructs resources Scheduling models, identify the best scheduling strategies, and continuously update the model during execution to dynamically adjust task priorities.

Benefits of technology

It realizes more refined scheduling control, enhances the adaptability and robustness of the scheduling system, improves task response speed and resource utilization efficiency, and realizes intelligent and efficient scheduling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119473540A_ABST
    Figure CN119473540A_ABST
Patent Text Reader

Abstract

The invention discloses an AI processor scheduling method, device and equipment based on a job scheduling system and a storage medium, and relates to the technical field of computer science, and the method comprises the steps: collecting and preprocessing historical data, and defining a state space of a scheduler based on the historical data; according to the state space of the scheduler, defining an action space of the scheduler and designing a reward function; constructing a resource scheduling model based on the action space and the reward function, and identifying an optimal scheduling strategy; in the process of executing the optimal scheduling strategy, continuously collecting new data to update the resource scheduling model, and sorting task priorities in the resource scheduling process; and based on the sorting result and the optimal scheduling strategy, the scheduler performs resource scheduling on the tasks in sequence. According to the invention, the action space and the comprehensive reward function are defined to realize fine scheduling control; a resource scheduling model is constructed, an optimal strategy is identified, and system adaptability is enhanced; the model is continuously updated, the task priority is adjusted, and the resource utilization efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer science and technology, and in particular to an AI processor scheduling method, device, equipment and storage medium based on a job scheduling system. Background Art

[0002] With the rapid development of cloud computing and artificial intelligence technologies, task scheduling in data centers has become increasingly complex. Traditional job scheduling algorithms, such as FIFO (First In First Out) and SJF (Short Job First), have been unable to cope with the highly dynamic and heterogeneous computing environment in modern data centers. In recent years, advanced machine learning technologies such as deep learning and reinforcement learning have been gradually applied to the field of job scheduling, aiming to improve resource utilization and task response speed. For example, scheduling algorithms based on deep reinforcement learning can dynamically adjust the execution order of tasks to minimize overall latency or energy consumption. However, existing scheduling methods based on machine learning still face many challenges, especially in terms of real-time performance and accuracy when dealing with large-scale concurrent tasks.

[0003] At present, most scheduling methods based on machine learning rely on static models, which are no longer updated once training is completed, resulting in poor performance when facing changing workloads; in addition, most research work focuses on the optimization of a single dimension (such as minimizing latency or energy consumption), while insufficient exploration of multi-objective optimization (such as considering latency, energy consumption and resource utilization at the same time), which makes it difficult for existing technologies to achieve efficient scheduling in complex environments. Therefore, designing an intelligent scheduling method that can adapt to dynamic workloads and achieve multi-objective optimization has become an urgent problem to be solved. Summary of the invention

[0004] In view of the above existing problems, the present invention is proposed.

[0005] Therefore, the present invention provides an AI processor scheduling method, device, equipment and storage medium based on a job scheduling system to solve the problems of poor adaptability of static models and insufficient multi-objective optimization in the prior art.

[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0007] In the first aspect, an embodiment of the present invention provides an AI processor scheduling method based on a job scheduling system, which includes collecting historical data and performing preprocessing, defining the state space of the scheduler based on the historical data; defining the action space of the scheduler and designing a reward function according to the state space of the scheduler; based on the action space and the reward function, constructing a resource scheduling model and identifying the optimal scheduling strategy; in the process of executing the optimal scheduling strategy, continuously collecting new data to update the resource scheduling model, and sorting the task priorities in the resource scheduling process; based on the sorting results and the optimal scheduling strategy, the scheduler performs resource scheduling for the tasks in turn.

[0008] As a preferred solution of the AI ​​processor scheduling method based on the job scheduling system of the present invention, wherein: the historical data is collected and preprocessed, and the specific steps are as follows:

[0009] Collect historical data from the job scheduling system through the API interface;

[0010] The collected data are processed to remove invalid and abnormal data and organized in chronological order.

[0011] As a preferred solution of the AI ​​processor scheduling method based on the job scheduling system of the present invention, wherein: the state space of the scheduler is defined based on historical data, and the specific steps are as follows:

[0012] Based on the collected historical data, the status of each AI processor at each time point is counted. Combined with the priority distribution of tasks in each time window and the distribution of the amount of resources required by the tasks, load quantitative indicators are defined and combined into the state space of the scheduler.

[0013] The counting of the state of each AI processor at each time point includes dividing the time axis into a plurality of time windows, and recording the state of each AI processor and the state of each task in each time window.

[0014] As a preferred solution of the AI ​​processor scheduling method based on the job scheduling system of the present invention, wherein: according to the state space of the scheduler, the action space of the scheduler is defined and the reward function is designed. The specific steps are as follows:

[0015] Based on the state space, define the actions in the action space A taken by the scheduler according to different states;

[0016] If there is an idle processor in the current state and the task requirements are met, resources are scheduled for the task;

[0017] If the current status indicates that the system load is too high to support new tasks, the task request is rejected;

[0018] Adjust the task priority according to the current task priority and system load;

[0019] Based on the state space, an action mapping table is designed to associate each action in the action space A with the corresponding operation instruction;

[0020] The reward function is defined based on the state space to evaluate the effect of the scheduling strategy. The expression is:

[0021]

[0022] Among them, s is the state feature, a is the action feature, T c Indicates the time required to complete the task, E e Indicates the electric energy consumed during the task execution, U r represents the effective utilization rate of system resources, and R(s,a) represents the effect score after taking action a in state s.

[0023] As a preferred solution of the AI ​​processor scheduling method based on the job scheduling system of the present invention, wherein: based on the action space and the reward function, a resource scheduling model is constructed to identify the optimal scheduling strategy, and the specific steps are as follows:

[0024] Based on the action space and reward function, DQN is used as the basic model to build a resource scheduling model, and the characteristics of the current state are received by defining the input layer;

[0025] Process state features through multiple fully connected hidden layers, extract high-level features, and calculate the cumulative reward value of each possible action a∈A through the output layer to build a resource scheduling model;

[0026] The resource scheduling model identifies the best action in the action space A according to the current state, expressed as:

[0027]

[0028] Among them, s t represents the state characteristics in the current time window t, θ is the parameter of the resource scheduling model, and a t represents the best action in time window t, γ is the discount factor, Q(s t+1 ,a ′ ; θ) is in the next state s t+1 Take action a ′ The expected cumulative reward value, a ′ is the action to be taken in the next state;

[0029] The best action a identified by the resource scheduling model t , as the optimal scheduling strategy;

[0030] The action mapping table designed based on the state space will identify the best scheduling strategy a t Convert it into specific operation instructions, obtain a list of tasks waiting to be executed from the current system, filter out tasks that meet resource requirements, check the available resources in the system, and schedule these resources to tasks that meet resource requirements.

[0031] As a preferred solution of the AI ​​processor scheduling method based on the job scheduling system described in the present invention, in which: in the process of executing the optimal scheduling strategy, new data is continuously collected to update the resource scheduling model, and the task priorities in the resource scheduling process are sorted. The specific steps are as follows:

[0032] In the process of executing the optimal scheduling strategy, the latest status data is continuously obtained from the job scheduling system. Based on the latest status data, the parameters of the resource scheduling model are optimized using the gradient descent method.

[0033] Based on the optimized resource scheduling model, the priority score of each type of task is calculated by considering the task's delay time, urgency score, execution time, and resource requirements. The expression is:

[0034]

[0035] Among them, p i (s t ,a t ) represents the priority score of task type i, d i represents the delay time of task type i, u i Indicates the urgency of task type i, e i represents the execution time of task type i, r i Indicates the resource requirement of task type i;

[0036] Score each task in the task list according to its priority level. i (s t ,a t ) are sorted from high to low, and resources are rescheduled according to the sorted task list, with resources being scheduled first for tasks with high priority scores.

[0037] As a preferred solution of the AI ​​processor scheduling method based on the job scheduling system of the present invention, wherein: based on the sorting results and the optimal scheduling strategy, the scheduler performs resource scheduling in sequence, and the specific steps are as follows:

[0038] Based on the sorting results and the best scheduling strategy, the status information of the AI ​​processors in the current system is initialized, and the processors in the idle state are recorded;

[0039] Traverse the sorted task list, starting with the highest priority task and processing them one by one, and at the same time, check whether there are enough resources to meet the needs of the current task;

[0040] If there are sufficient resources and idle AI processors, the most suitable processor is selected from the idle processors, and resources are scheduled for it according to the optimal scheduling strategy. After the scheduling is completed, the current task is executed and the working status of the current processor is updated to busy.

[0041] When the task is completed, the resources scheduled for the currently completed task are released and the state of the AI ​​processor is restored to idle.

[0042] In the second aspect, the present invention provides an AI processor scheduling system based on a job scheduling system, including a data collection and preprocessing module, an action space and reward function definition module, an optimal scheduling strategy identification module, a task priority sorting module and a resource scheduling module; the data collection and preprocessing module is used to collect historical data and perform preprocessing, and define the state space of the scheduler based on the historical data; the action space and reward function definition module is used to define the action space of the scheduler and design the reward function according to the state space of the scheduler; the optimal scheduling strategy identification module is used to construct a resource scheduling model based on the action space and the reward function, and identify the optimal scheduling strategy; the task priority sorting module is used to continuously collect new data to update the resource scheduling model in the process of executing the optimal scheduling strategy, and sort the task priorities in the resource scheduling process; the resource scheduling and task execution module is used for the scheduler to schedule resources for tasks in turn based on the sorting results and the optimal scheduling strategy.

[0043] In a third aspect, an embodiment of the present invention provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, any step of the AI ​​processor scheduling method based on the job scheduling system as described in the first aspect of the present invention is implemented.

[0044] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, any step of the AI ​​processor scheduling method based on the job scheduling system as described in the first aspect of the present invention is implemented.

[0045] The beneficial effects of the present invention are as follows: by defining the action space of the scheduler and designing a reward function that comprehensively considers delay, energy consumption and resource utilization, more refined scheduling control is achieved; then, a resource scheduling model is constructed based on the action space and the reward function to identify the optimal scheduling strategy, thereby enhancing the adaptability and robustness of the scheduling system; finally, in the process of executing the optimal scheduling strategy, new data is continuously collected to update the model and dynamically adjust task priorities to ensure that scheduling decisions reflect the actual situation of the system in real time, thereby improving task response speed and resource utilization efficiency, and ultimately achieving intelligent and efficient scheduling. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0047] Figure 1 This is a flowchart of the AI ​​processor scheduling method based on the job scheduling system in Example 1.

[0048] Figure 2 This is a flowchart of the AI ​​processor scheduling system based on the job scheduling system in Example 1. DETAILED DESCRIPTION

[0049] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.

[0050] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0051] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.

[0052] Example 1, reference Figure 1 and Figure 2 , which is the first embodiment of the present invention, and provides an AI processor scheduling method based on a job scheduling system, comprising the following steps:

[0053] S1, collect historical data and preprocess it, and define the state space of the scheduler based on the historical data;

[0054] Furthermore, historical data is collected from the job scheduling system through the API interface, including CPU usage, memory usage, task queue length, task priority distribution, and resource demand distribution;

[0055] Remove invalid and abnormal data from the collected data and organize the data in chronological order;

[0056] According to the collected historical data, the state of each AI processor at each time point is counted, and combined with the priority distribution of tasks in each time window and the distribution of resources required by the tasks, the load condition quantitative indicators are defined, and the quantitative indicators are combined into the state space of the scheduler; the specific process is: first, the time axis is divided into several time windows (such as every minute or every hour), and the state of each AI processor (such as idle, busy and faulty) and the state of each task (such as waiting, executing and completing) are recorded in each time window. Then, various indicators in each time window are counted, including CPU usage, memory usage, task queue length, resource demand distribution and task priority distribution. Then, based on these statistical data, the load condition quantitative indicators are calculated, for example, by combining various indicators in a weighted average manner to form a quantitative value that can reflect the system load state. Finally, these quantitative indicators are combined into the state space of the scheduler to provide a basis for the subsequent action space definition and scheduling strategy formulation. This process ensures that the scheduler can fully and accurately reflect the current load situation of the system, so as to make more reasonable resource allocation decisions.

[0057] It should also be noted that the specific identification of invalid data is as follows: First, the collected raw data is checked to identify data items that are obviously illogical. For example, CPU usage exceeds 100% or is less than 0%, memory usage exceeds a reasonable range, etc. This type of data is usually generated due to sensor failure or data transmission errors.

[0058] Removing abnormal data specifically means further analyzing the data set and using statistical methods (such as mean, standard deviation) or machine learning methods (such as outlier detection algorithms) to identify and remove data points that significantly deviate from the normal range. For example, if it is found that the execution time of all tasks in a certain period of time suddenly increases significantly, it may be caused by system failure or other abnormal events, and such data also needs to be excluded.

[0059] Organizing data in chronological order specifically includes: Timestamp standardization: ensuring that the timestamp format of all data entries is consistent for subsequent processing. If there are different time formats (such as Unix timestamps, date strings, etc.), they need to be converted to a standard format.

[0060] Sorting: Arrange all data entries in ascending order according to timestamps to ensure that the data is arranged in the order in which it actually occurred. This step preserves the time dependency of the data.

[0061] Create time windows: Split continuous time series into time windows of fixed length (such as every minute, every hour) according to business needs. This helps to aggregate data in subsequent analysis to better understand system state changes at different time scales.

[0062] S2. Define the action space of the scheduler and design the reward function according to the state space of the scheduler.

[0063] Furthermore, based on the state space, the actions in the action space A taken by the scheduler according to different states are defined;

[0064] If there is an idle processor in the current state and the task requirements are met, resources are scheduled for the task;

[0065] If the current status indicates that the system load is too high to support new tasks, the task request is rejected;

[0066] Adjust the task priority according to the current task priority and system load;

[0067] Based on the state space, an action mapping table is designed to associate each action in the action space A with the corresponding operation instruction; for example, when the system is in a high-load state, the "reject task request" action is associated with the send rejection instruction;

[0068] The reward function is defined based on the state space to evaluate the effect of the scheduling strategy. The expression is:

[0069]

[0070] Among them, s is the state feature, a is the action feature, T c Indicates the time required to complete the task, E e Indicates the energy consumed during the task execution, U r represents the effective utilization rate of system resources, and R(s,a) represents the effect score after taking action a in state s.

[0071] It should be noted that the effective utilization rate of system resources U r It is an indicator obtained by comprehensively calculating the ratio of the actual usage of various resources (such as CPU, memory, etc.) in the system to the total available resources. It reflects the degree to which system resources are effectively utilized. The expression is:

[0072]

[0073] Where N represents the number of types of resources in the system, Use j Indicates the actual usage of the jth resource, Total j represents the total available amount of the jth resource, where j is the index variable of the resource; it should also be noted that the energy consumption E e It means that when the completion time is the same, the greater the energy consumption, the smaller the reward. Completion time T c It means that under the same resource utilization rate, the longer the completion time, the smaller the reward. r When the task completion time and energy consumption are the same, the higher the resource utilization rate, the greater the reward. This expression takes into account the task completion time, energy consumption and resource utilization rate to obtain the final reward function R(s,a) to evaluate the overall effect of taking action a in state s.

[0074] S3. Based on the action space and reward function, a resource scheduling model is constructed to identify the optimal scheduling strategy;

[0075] Furthermore, based on the action space and reward function, we use DQN as the basic model to build a resource scheduling model, which defines the input layer to receive the characteristics of the current state, including information such as system load, task priority, and resource requirements;

[0076] Process state features through multiple fully connected hidden layers, extract high-level features, and calculate the cumulative reward value of each possible action a∈A through the output layer to build a resource scheduling model;

[0077] The resource scheduling model identifies the best action in the action space A according to the current state, expressed as:

[0078]

[0079] Among them, s t represents the state characteristics in the current time window t, θ is the parameter of the resource scheduling model, and a t represents the best action in time window t, γ is the discount factor, Q(s t+1 ,a ′ ; θ) is in the next state s t+1 Take action a ′ The expected cumulative reward value, a ′ is the action to be taken in the next state;

[0080] The best action a identified by the resource scheduling model t , as the optimal scheduling strategy;

[0081] The action mapping table designed based on the state space will identify the best scheduling strategy a t Convert it into specific operation instructions, obtain the list of tasks waiting to be executed from the current system, filter out tasks that meet the resource requirements, check the available resources in the system, and schedule these resources to tasks that meet the resource requirements to ensure effective utilization of resources and load balancing.

[0082] It should be noted that the reason for choosing DQN as the basic model is that the advantage of DQN over other models is that it can handle high-dimensional state space and discrete action space, and realize complex nonlinear relationship learning through deep neural networks, which is more suitable for solving resource scheduling problems.

[0083] It should also be noted that by calculating the current state s t The immediate reward R(s,a) of each possible action a and the future state s t+1 The maximum expected cumulative reward under The sum of the two is then used to select the action a that maximizes the sum, thereby determining the best action a in the current state. t .

[0084] Q(s t+1 ,a ′ ; θ) is a function parameterized by a neural network, the goal of which is to approximate the true value function, that is, in state s t+1 Take action a ′ The expected cumulative reward that can be obtained after , is expressed as:

[0085] Q(s t+1 ,a ′ ;θ)=NN(s t+1 ,a ′ ;θ);

[0086] Among them, NN represents neural network;

[0087] S4. In the process of executing the optimal scheduling strategy, new data is continuously collected to update the resource scheduling model, and the task priorities in the resource scheduling process are sorted;

[0088] Furthermore, in the process of executing the optimal scheduling strategy, the latest status data is continuously obtained from the job scheduling system, including the current status, actions taken, and reward values. Based on the latest status data, the parameters of the resource scheduling model are optimized using the gradient descent method;

[0089] Based on the optimized resource scheduling model, the priority score of each type of task is calculated by considering the task's delay time, urgency score, execution time, and resource requirements. The expression is:

[0090]

[0091] Among them, p i (s t ,a t ) represents the priority score of task type i, d i represents the delay time of task type i, u i Indicates the urgency of task type i, e i represents the execution time of task type i, r i Indicates the resource requirement of task type i;

[0092] It should be noted that u i It represents the urgency of task type i, which can be calculated by comprehensively considering factors such as the task weight, the urgency of the deadline, and the impact factor of the task. The expression is:

[0093]

[0094] Among them, w i represents the task weight of task type i, t i represents the deadline countdown of task type i, f i represents the task impact factor of task type i, α is the task weight coefficient, β is the deadline countdown weight coefficient, and γ is the task impact factor weight coefficient; r i The resource requirement of task type i is determined by calculating the amount of CPU resources, memory resources, and other necessary resources (such as storage space, network bandwidth, etc.) required by the task. The expression is:

[0095] r i =δ·CPU i +∈·M i ;

[0096] Among them, CPU i Indicates the amount of CPU resources required for task type i, M i represents the amount of memory resources for task type i, δ is the CPU demand weight coefficient, ∈ is the memory demand weight coefficient;

[0097] It should also be noted that the delay time d i and execution time e i The longer the time, the lower the priority; the urgency i and resource requirements i The higher the urgency and resource requirements, the higher the priority. Finally, the priority score p of the task is obtained by weighted summation. i (s t ,a t ).

[0098] It should also be noted that in the process of executing the optimal scheduling strategy, the real-time updating and accuracy of the model are ensured by continuously collecting new data and using the gradient descent method to optimize the parameters of the resource scheduling model; based on the optimized model, by calculating the priority scores of the tasks and sorting the tasks from high to low according to the scores, dynamic adjustment of task priorities is achieved, thereby improving the efficiency of resource scheduling and the response speed of the system.

[0099] S5. Based on the sorting results and the optimal scheduling strategy, the scheduler schedules resources for the tasks in turn.

[0100] Furthermore, based on the sorting results and the best scheduling strategy, the status information of the AI ​​processors in the current system is initialized, and the processors in the idle state are recorded;

[0101] Traverse the sorted task list and process them one by one starting from the task with the highest priority. At the same time, check whether there are enough resources to meet the needs of the current task, including but not limited to CPU, memory and other specific hardware resources;

[0102] If there are sufficient resources and idle AI processors, the most suitable processor is selected from the idle processors, and resources are scheduled for it according to the optimal scheduling strategy. After the scheduling is completed, the current task is executed and the working status of the current processor is updated to busy.

[0103] When the task is completed, the resources scheduled for the currently completed task are released and the state of the AI ​​processor is restored to idle.

[0104] This process is repeated until all tasks have been scheduled or the system reaches its current maximum load and can no longer accept new tasks.

[0105] It should be noted that based on the sorting results and the best scheduling strategy, by initializing the status information of the AI ​​processor and recording the idle processors, the tasks are processed one by one starting from the highest priority task, ensuring that the most suitable idle processor is selected for resource scheduling each time, thereby improving resource utilization efficiency and task processing speed, and ultimately achieving efficient operation and load balancing of the system.

[0106] This embodiment also provides an AI processor scheduling system based on a job scheduling system, including: a data collection and preprocessing module, an action space and reward function definition module, an optimal scheduling strategy identification module, a task priority sorting module and a resource scheduling module;

[0107] Data collection and preprocessing module, used to collect historical data and preprocess it, and define the state space of the scheduler based on the historical data;

[0108] The action space and reward function definition module is used to define the action space of the scheduler and design the reward function according to the state space of the scheduler;

[0109] The optimal scheduling strategy identification module is used to build a resource scheduling model based on the action space and reward function and identify the optimal scheduling strategy;

[0110] The task priority sorting module is used to continuously collect new data to update the resource scheduling model and sort the task priorities in the resource scheduling process during the execution of the optimal scheduling strategy;

[0111] The resource scheduling and task execution module is used to schedule resources for tasks in turn based on the sorting results and the best scheduling strategy.

[0112] This embodiment also provides a computer device, which is suitable for the AI ​​processor scheduling method based on the job scheduling system, including: a memory and a processor; the memory is used to store computer executable instructions, and the processor is used to execute computer executable instructions to implement the AI ​​processor scheduling method based on the job scheduling system proposed in the above embodiment.

[0113] The computer device may be a terminal, and the computer device includes a processor, a memory, a communication interface, a display screen and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covering the display screen, or a key, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.

[0114] This embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, the AI ​​processor scheduling method based on the job scheduling system proposed in the above embodiment is implemented; the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, referred to as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM), erasable programmable read-only memory (Erasable Programmable Read Only Memory, referred to as EPROM), programmable read-only memory (Programmable Red-Only Memory, referred to as PROM), read-only memory (Read-Only Memory, referred to as ROM), magnetic storage, flash memory, disk or optical disk.

[0115] In summary, the present invention achieves more sophisticated scheduling control by: defining the action space of the scheduler and designing a reward function that comprehensively considers delay, energy consumption and resource utilization; then, constructing a resource scheduling model based on the action space and the reward function, identifying the optimal scheduling strategy, and enhancing the adaptability and robustness of the scheduling system; finally, in the process of executing the optimal scheduling strategy, continuously collecting new data to update the model and dynamically adjusting task priorities to ensure that scheduling decisions reflect the actual situation of the system in real time, improving task response speed and resource utilization efficiency, and ultimately achieving intelligent and efficient scheduling.

[0116] Example 2, referring to Table 1, is the second example of the present invention. To further verify the technical solution of the present invention, experimental simulation data of an AI processor scheduling method based on a job scheduling system is provided.

[0117] The experiment set up a cluster consisting of 10 AI processors to simulate a typical high-performance computing environment. In the experiment, two sets of data sets were used: one set used the traditional static scheduling method (existing technology), and the other set used the dynamic scheduling method of the present invention. Each set of data sets contained 1,000 tasks, each with different priorities, required resources, and execution times.

[0118] First, we collected historical data from the job scheduling system for the past month through the API interface, preprocessed it, removed invalid and abnormal data, and organized the data in chronological order. Based on this historical data, we defined the state space of the scheduler, and defined load quantitative indicators in combination with task priority and resource requirements.

[0119] Next, based on the defined state space, the action space and reward function were designed, and the DQN algorithm was used to build a resource scheduling model and identify the optimal scheduling strategy. During the execution process, the model parameters were continuously updated, and the priority scores of the tasks were calculated based on the optimized model to sort the tasks.

[0120] Finally, based on the sorting results and the best scheduling strategy, the processor status information is initialized, and tasks are scheduled one by one according to priority to ensure the effective use of resources. When the task execution is completed, the resources are released and the processor status is restored to idle.

[0121] The details are shown in Table 1 below:

[0122] Table 1 Scheduling method performance comparison table

[0123]

[0124] Through the data analysis of the above table, it can be clearly seen that compared with the traditional scheduling method, the present invention has significant improvements in task completion time, energy consumption, resource utilization and task delay through the dynamically updated resource scheduling model and the method of comprehensive consideration of multi-objective optimization; for example, in the first experimental object, the task completion time of the prior art is 300.5 seconds, the energy consumption is 2.5 kWh, the resource utilization is 75%, and the task delay is 150.2 seconds, while the method of the present invention only takes 215.3 seconds to complete the task, the energy consumption is reduced to 1.8 kWh, the resource utilization is increased to 88%, and the task delay is reduced to 85.7 seconds.

[0125] The AI ​​processor scheduling method of the present invention not only shortens the task completion time, reduces energy consumption, and improves resource utilization, but also effectively reduces task delays. By continuously collecting new data and optimizing the resource scheduling model, the method of the present invention can better adapt to dynamically changing workloads and realize intelligent and efficient resource scheduling.

[0126] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should be included in the scope of the claims of the present invention.

Claims

1. An AI processor scheduling method based on a job scheduling system, characterized in that: include, Collect historical data and preprocess it, and define the state space of the scheduler based on the historical data; Based on the state space of the scheduler, define the action space of the scheduler and design the reward function; Based on the action space and reward function, a resource scheduling model is constructed to identify the optimal scheduling strategy; In the process of executing the best scheduling strategy, new data is continuously collected to update the resource scheduling model and sort the task priorities in the resource scheduling process; Based on the sorting results and the best scheduling strategy, the scheduler schedules resources for the tasks in turn.

2. The AI ​​processor scheduling method based on the job scheduling system according to claim 1, characterized in that: The specific steps of collecting historical data and preprocessing are as follows: Collect historical data from the job scheduling system through the API interface; The collected data are processed to remove invalid and abnormal data and organized in chronological order.

3. The AI ​​processor scheduling method based on the job scheduling system according to claim 2, characterized in that: The specific steps of defining the state space of the scheduler based on historical data are as follows: Based on the collected historical data, the status of each AI processor at each time point is counted. Combined with the priority distribution of tasks in each time window and the distribution of the amount of resources required by the tasks, load quantitative indicators are defined and combined into the state space of the scheduler. The counting of the state of each AI processor at each time point includes dividing the time axis into a plurality of time windows, and recording the state of each AI processor and the state of each task in each time window.

4. The AI ​​processor scheduling method based on the job scheduling system according to claim 3, characterized in that: According to the state space of the scheduler, the action space of the scheduler is defined and the reward function is designed. The specific steps are as follows: Based on the state space, define the actions in the action space A taken by the scheduler according to different states; If there is an idle processor in the current state and the task requirements are met, resources are scheduled for the task; If the current status indicates that the system load is too high to support new tasks, the task request is rejected; Adjust the task priority according to the current task priority and system load; Based on the state space, an action mapping table is designed to associate each action in the action space A with the corresponding operation instruction; The reward function is defined based on the state space to evaluate the effect of the scheduling strategy. The expression is: Among them, s is the state feature, a is the action feature, T c Indicates the time required to complete the task, E e Indicates the electric energy consumed during the task execution, U r represents the effective utilization rate of system resources, and R(s,a) represents the effect score after taking action a in state s.

5. The AI ​​processor scheduling method based on the job scheduling system according to claim 4, characterized in that: Based on the action space and reward function, the resource scheduling model is constructed to identify the optimal scheduling strategy. The specific steps are as follows: Based on the action space and reward function, DQN is used as the basic model to build a resource scheduling model, and the characteristics of the current state are received by defining the input layer; Process state features through multiple fully connected hidden layers, extract high-level features, and calculate the cumulative reward value of each possible action a∈A through the output layer to build a resource scheduling model; The resource scheduling model identifies the best action in the action space A according to the current state, expressed as: Among them, s t represents the state characteristics in the current time window t, θ is the parameter of the resource scheduling model, and a t represents the best action in time window t, γ is the discount factor, Q(s t+1 ,a ′ ; θ) is in the next state s t+1 Take action a ′ The expected cumulative reward value, a ′ is the action to be taken in the next state; The best action a identified by the resource scheduling model t , as the optimal scheduling strategy; The action mapping table designed based on the state space will identify the best scheduling strategy a t Convert it into specific operation instructions, obtain a list of tasks waiting to be executed from the current system, filter out tasks that meet resource requirements, check the available resources in the system, and schedule these resources to tasks that meet resource requirements.

6. The AI ​​processor scheduling method based on the job scheduling system according to claim 5, characterized in that: In the process of executing the optimal scheduling strategy, new data is continuously collected to update the resource scheduling model, and the task priorities in the resource scheduling process are sorted. The specific steps are as follows: In the process of executing the optimal scheduling strategy, the latest status data is continuously obtained from the job scheduling system. Based on the latest status data, the parameters of the resource scheduling model are optimized using the gradient descent method. Based on the optimized resource scheduling model, the priority score of each type of task is calculated by considering the task's delay time, urgency score, execution time, and resource requirements. The expression is: Among them, p i (s t ,a t ) represents the priority score of task type i, d i represents the delay time of task type i, u i Indicates the urgency of task type i, e i represents the execution time of task type i, r i Indicates the resource requirement of task type i; Score each task in the task list according to its priority level. i (s t ,a t ) are sorted from high to low, and resources are rescheduled according to the sorted task list, with resources being scheduled first for tasks with high priority scores.

7. The AI ​​processor scheduling method based on the job scheduling system according to claim 6, characterized in that: Based on the sorting results and the best scheduling strategy, the scheduler performs resource scheduling in sequence. The specific steps are as follows: Based on the sorting results and the best scheduling strategy, the status information of the AI ​​processors in the current system is initialized, and the processors in the idle state are recorded; Traverse the sorted task list, starting with the highest priority task and processing them one by one, and at the same time, check whether there are enough resources to meet the needs of the current task; If there are sufficient resources and idle AI processors, the most suitable processor is selected from the idle processors, and resources are scheduled for it according to the optimal scheduling strategy. After the scheduling is completed, the current task is executed and the working status of the current processor is updated to busy. When the task is completed, the resources scheduled for the currently completed task are released and the state of the AI ​​processor is restored to idle.

8. An AI processor scheduling system based on a job scheduling system, based on the AI ​​processor scheduling method based on a job scheduling system according to any one of claims 1 to 7, characterized in that: It includes data collection and preprocessing module, action space and reward function definition module, optimal scheduling strategy identification module, task priority sorting module and resource scheduling module; Data collection and preprocessing module, used to collect historical data and preprocess it, and define the state space of the scheduler based on the historical data; The action space and reward function definition module is used to define the action space of the scheduler and design the reward function according to the state space of the scheduler; The optimal scheduling strategy identification module is used to build a resource scheduling model based on the action space and reward function and identify the optimal scheduling strategy; The task priority sorting module is used to continuously collect new data to update the resource scheduling model and sort the task priorities in the resource scheduling process during the execution of the optimal scheduling strategy; The resource scheduling and task execution module is used to schedule resources for tasks in turn based on the sorting results and the optimal scheduling strategy.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the AI ​​processor scheduling method based on the job scheduling system according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the AI ​​processor scheduling method based on a job scheduling system according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • OpenHarmony-based task scheduling method with earliest deadline priority

    CN120973486A

  • Multi-mode resource awareness task scheduling method and system oriented to medical computing environment

    CN121433845A