CN-121979659-A - Task processing method, device, terminal equipment and computer program product
Abstract
The application is applicable to the technical field of computers and provides a task processing method, a device, terminal equipment and a computer program product, wherein the method comprises the steps of acquiring task priority information of a current period; the method comprises the steps of determining the number of instances corresponding to each task in a current period based on task priority information, obtaining total energy consumption data corresponding to target tasks when the target tasks run in the corresponding target instances, wherein the target tasks refer to at least one running task in each task, determining computing power demand information of the tasks to be executed in the next period based on the total energy consumption data, and executing the tasks to be executed based on the computing power demand information. The application can allocate the instance resources according to the need in real time through the closed loop logic of priority, instance resource allocation, energy consumption feedback and dynamic adjustment of calculation force, and also realize task-level energy consumption tracking capability, thereby adjusting the calculation force requirement in a targeted manner and further achieving the purpose of dynamically balancing the energy consumption/time delay/precision.
Inventors
- LU YING
- YAN XI
Assignees
- 优地机器人(无锡)股份有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20251212
Claims (10)
- 1. A method of task processing, comprising: Acquiring task priority information of a current period; Determining the number of instances corresponding to each task in the current period based on the task priority information; when a target task runs in a corresponding target instance, acquiring total energy consumption data corresponding to the target task, wherein the target task refers to at least one running task in the tasks; Determining calculation force demand information of a task to be executed in the next period based on the total energy consumption data; And executing the task to be executed based on the calculation force demand information.
- 2. The task processing method according to claim 1, wherein the acquiring task priority information of the current cycle includes: Generating a task priority matrix based on the service quality indexes of the tasks; acquiring hardware index data corresponding to each task; And obtaining the task priority information based on the task priority matrix and the hardware index data corresponding to each task.
- 3. The task processing method according to claim 1, further comprising, after said determining the number of instances corresponding to the respective tasks of the current cycle based on the task priority information: And if the service quality index of the first priority task is detected to be larger than the set threshold, executing the instance capacity expansion operation on the first priority task, wherein the first priority task is used for representing the high priority task.
- 4. A task processing method according to any one of claims 1 to 3, wherein the determining the computational power demand information of the task to be executed for the next cycle based on the total energy consumption data includes: determining initial calculation force information required by each task based on model features of a processing model corresponding to each task; acquiring hardware index data corresponding to the target task; and obtaining the calculation power demand information based on the hardware index data, the total energy consumption data and the initial calculation power information corresponding to the target task.
- 5. The task processing method according to claim 4, wherein the obtaining the power demand information based on the hardware index data, the total energy consumption data, and the initial power information corresponding to the target task includes: Determining a task queue length based on the task priority information and the target task; Inputting the task queue length, the hardware index data corresponding to the target task and the total energy consumption data into a load prediction model for processing to obtain a load prediction value; and obtaining the calculation power demand information based on the load predicted value, the hardware index data corresponding to the target task, the total energy consumption data and the initial calculation power information.
- 6. The task processing method according to claim 5, wherein the obtaining the power demand information based on the load predicted value, the hardware index data corresponding to the target task, the total energy consumption data, and the initial power information includes: Constructing a multi-objective function based on the load predicted value, hardware index data corresponding to the objective task and the total energy consumption data; solving the multi-objective function based on a multi-objective genetic algorithm and the initial computational power information to obtain an optimal solution set; and obtaining the calculation force demand information based on the optimal solution set.
- 7. The task processing method according to claim 6, wherein the obtaining the computing force demand information based on the optimal solution set includes: generating a precision-energy consumption tradeoff curve based on the optimal solution set; Determining a load state based on the precision-energy consumption tradeoff curve; the power demand information is determined based on the load state.
- 8. A task processing device, comprising: The first information acquisition unit is used for acquiring task priority information of the current period; The number determining unit is used for determining the number of instances corresponding to each task in the current period based on the task priority information; The second information acquisition unit is used for acquiring total energy consumption data corresponding to a target task when the target task runs in a corresponding target instance, wherein the target task refers to at least one running task in the tasks; a first information determining unit configured to determine calculation power demand information of a task to be executed in a next cycle based on the total energy consumption data; And the execution unit is used for executing the task to be executed based on the calculation force demand information.
- 9. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the task processing method according to any of claims 1 to 7 when executing the computer program.
- 10. A computer program product comprising a computer program which, when run, implements the task processing method as claimed in any one of claims 1 to 7.
Description
Task processing method, device, terminal equipment and computer program product Technical Field The present application relates to the field of computer technologies, and in particular, to a task processing method, a task processing device, a terminal device, and a computer program product. Background Heterogeneous computing refers to a computing system constructed by integrating computing units (e.g., CPU, GPU, FPGA, ASIC, etc.) of different instruction sets, architectures, or functions to work cooperatively, and core logic dynamically allocates computing resources according to task characteristics. Among them, multi-Instance GPU (Multi-Instance GPU) technology is one of core technologies for realizing efficient use of GPU resources in heterogeneous computing systems, which supports multitasking parallel execution by dividing a physical GPU into multiple independent instances. However, the existing GPU MIG partitioning considerations are not comprehensive enough to meet practical needs. Disclosure of Invention The embodiment of the application provides a task processing method, a device, terminal equipment and a computer program product, which are used for solving the problems that the consideration of a GPU MIG partition is not comprehensive enough and the actual requirement is difficult to meet in the prior art. In a first aspect, an embodiment of the present application provides a task processing method, including: Acquiring task priority information of a current period; Determining the number of instances corresponding to each task in the current period based on the task priority information; when a target task runs in a corresponding target instance, acquiring total energy consumption data corresponding to the target task, wherein the target task refers to at least one running task in the tasks; Determining calculation force demand information of a task to be executed in the next period based on the total energy consumption data; And executing the task to be executed based on the calculation force demand information. In some implementations of the first aspect, the acquiring task priority information of the current period includes: Generating a task priority matrix based on the service quality indexes of the tasks; acquiring hardware index data corresponding to each task; And obtaining the task priority information based on the task priority matrix and the hardware index data corresponding to each task. In some implementations of the first aspect, after the determining, based on the task priority information, the number of instances corresponding to each task of the current period further includes: And if the service quality index of the first priority task is detected to be larger than the set threshold, executing the instance capacity expansion operation on the first priority task, wherein the first priority task is used for representing the high priority task. In some implementations of the first aspect, the determining the computational power demand information of the task to be performed for the next cycle based on the total energy consumption data includes: determining initial calculation force information required by each task based on model features of a processing model corresponding to each task; acquiring hardware index data corresponding to the target task; and obtaining the calculation power demand information based on the hardware index data, the total energy consumption data and the initial calculation power information corresponding to the target task. In some implementations of the first aspect, the obtaining the power demand information based on the hardware index data corresponding to the target task, the total energy consumption data, and the initial power information includes: Determining a task queue length based on the task priority information and the target task; Inputting the task queue length, the hardware index data corresponding to the target task and the total energy consumption data into a load prediction model for processing to obtain a load prediction value; and obtaining the calculation power demand information based on the load predicted value, the hardware index data corresponding to the target task, the total energy consumption data and the initial calculation power information. In some implementations of the first aspect, the obtaining the power demand information based on the load prediction value, the hardware index data corresponding to the target task, the total energy consumption data, and the initial power information includes: Constructing a multi-objective function based on the load predicted value, hardware index data corresponding to the objective task and the total energy consumption data; solving the multi-objective function based on a multi-objective genetic algorithm and the initial computational power information to obtain an optimal solution set; and obtaining the calculation force demand information based on the optimal solution set. In some imple