Search

CN-121996366-A - Task scheduling method, device, equipment and storage medium

CN121996366ACN 121996366 ACN121996366 ACN 121996366ACN-121996366-A

Abstract

The application discloses a task scheduling method, device, equipment and storage medium, and relates to the technical field of computers. The method comprises the steps of obtaining at least one calculation task, obtaining the priority of the calculation task according to the consumption value of the calculation task and the byte number of the calculation task, wherein the consumption value is used for indicating a program algorithm on which the calculation task depends, consumption values corresponding to different program algorithms are different, sequencing the at least one calculation task according to the priority from high to low to obtain a sequencing sequence of the at least one calculation task, and sequentially distributing the at least one calculation task according to the sequencing sequence of the at least one calculation task and the processing speed of the at least one calculation unit to obtain calculation tasks corresponding to the at least one calculation unit respectively, wherein each calculation unit is used for processing the calculation tasks corresponding to the calculation unit. The application optimizes the use of the computing resources, realizes the balanced distribution of the computing resources and improves the throughput of the computing unit to the maximum extent.

Inventors

  • GAO CHEN
  • HUANG FANG
  • DING YAN
  • LIU YAWEI
  • YANG SHAOPENG
  • ZHAO XIN
  • CAI SIYU
  • ZHANG WENHAI
  • GU JIANBO
  • ZHAO PENG

Assignees

  • 昆仑数智科技有限责任公司
  • 中国石油天然气集团有限公司

Dates

Publication Date
20260508
Application Date
20241107

Claims (10)

  1. 1. A method of task scheduling, the method comprising: Acquiring at least one computing task; Obtaining the priority of the computing task according to the consumption value of the computing task and the byte number of the computing task, wherein the consumption value is used for indicating the program algorithm on which the computing task depends, and the consumption values corresponding to different program algorithms are different; Sequencing the at least one computing task according to the sequence from high priority to low priority to obtain a sequencing sequence of the at least one computing task; And sequentially distributing the at least one computing task according to the sequencing sequence of the at least one computing task and the processing speed of the at least one computing unit to obtain computing tasks respectively corresponding to the at least one computing unit, wherein each computing unit is used for processing the computing task corresponding to the computing unit.
  2. 2. The method according to claim 1, wherein the obtaining the priority of the computing task according to the consumption value of the computing task and the byte count of the computing task includes: Obtaining the total cycle number of the computing task according to the consumption value of the computing task and the byte number of the computing task, wherein the consumption value refers to the cycle number required to be consumed for processing each byte of the computing task; and obtaining the priority of the computing task according to the reciprocal of the total cycle number of the computing task.
  3. 3. The method according to claim 2, wherein the method further comprises: For a first computing task, under the condition that the waiting time of the first computing task in the sequencing sequence is greater than or equal to a time threshold, obtaining updated priority of the first computing task according to the reciprocal of the total cycle number of the first computing task and the ratio of the waiting time to the time threshold, wherein the first computing task is a computing task with the consumption value greater than or equal to the first threshold in the at least one computing task; And updating the sequencing sequence of the at least one computing task according to the updated priority of the first computing task to obtain an updated sequencing sequence.
  4. 4. The method according to claim 1, wherein the method further comprises: Acquiring a second computing task, wherein the second computing task is a computing task received after the sequencing sequence of the at least one computing task is obtained; Obtaining the priority of the second computing task according to the consumption value of the second computing task and the byte number of the second computing task; And sequencing the at least one computing task and the second computing task according to the priority of the second computing task from high to low to obtain a sequencing sequence of the at least one computing task and the second computing task.
  5. 5. The method of claim 1, wherein a processing speed of the computing unit is in positive correlation with a number of computing tasks corresponding to the computing unit.
  6. 6. The method according to claim 1, wherein the method further comprises: And obtaining an ordering sequence of the computing units according to the respective allocation time of the computing tasks corresponding to the computing units, wherein the computing units are used for sequentially processing the computing tasks corresponding to the computing units according to the ordering sequence of the computing units.
  7. 7. A task scheduling device, the device comprising: The task acquisition module is used for acquiring at least one computing task; The priority determining module is used for obtaining the priority of the computing task according to the consumption value of the computing task and the byte number of the computing task, wherein the consumption value is used for indicating the program algorithm on which the computing task depends, and the consumption values corresponding to different program algorithms are different; The sequencing module is used for sequencing the at least one computing task according to the sequence from high priority to low priority to obtain a sequencing sequence of the at least one computing task; The task allocation module is used for allocating the at least one computing task in sequence according to the ordering sequence of the at least one computing task and the processing speed of the at least one computing unit to obtain the computing task corresponding to the at least one computing unit respectively, and each computing unit is used for processing the computing task corresponding to the computing unit.
  8. 8. A server comprising a processor and a memory, wherein the memory has stored therein a computer program that is loaded and executed by the processor to implement the task scheduling method of any one of claims 1 to 6.
  9. 9. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program, which is loaded and executed by a processor to implement the task scheduling method according to any one of claims 1 to 6.
  10. 10. A computer program product, characterized in that the computer program product comprises a computer program that is loaded and executed by a processor to implement the task scheduling method according to any one of claims 1 to 6.

Description

Task scheduling method, device, equipment and storage medium Technical Field The present application relates to the field of computer technologies, and in particular, to a task scheduling method, device, apparatus, and storage medium. Background In modern encryption systems, managing the efficiency of encryption operations is a significant challenge, especially in cases where the amount of data is expanding and security requirements are continually increasing. In the related art, many systems still rely on simple scheduling methods, such as FIFO (First Input First Output, first in first out queue), when processing encrypted tasks, where first in instructions are completed and retired before executing second instructions (instructions are program code that the computer responds to user operations, transparent to the user). However, the task scheduling method described above may result in inefficiency, and the processing resources may not be optimally utilized, resulting in increased latency and potential bottlenecks. Disclosure of Invention The embodiment of the application provides a task scheduling method, device, equipment and storage medium. The technical scheme provided by the embodiment of the application is as follows: according to an aspect of an embodiment of the present application, there is provided a task scheduling method, including: Acquiring at least one computing task; Obtaining the priority of the computing task according to the consumption value of the computing task and the byte number of the computing task, wherein the consumption value is used for indicating the program algorithm on which the computing task depends, and the consumption values corresponding to different program algorithms are different; Sequencing the at least one computing task according to the sequence from high priority to low priority to obtain a sequencing sequence of the at least one computing task; And sequentially distributing the at least one computing task according to the sequencing sequence of the at least one computing task and the processing speed of the at least one computing unit to obtain computing tasks respectively corresponding to the at least one computing unit, wherein each computing unit is used for processing the computing task corresponding to the computing unit. According to an aspect of an embodiment of the present application, there is provided a task scheduling device, including: The task acquisition module is used for acquiring at least one computing task; The priority determining module is used for obtaining the priority of the computing task according to the consumption value of the computing task and the byte number of the computing task, wherein the consumption value is used for indicating the program algorithm on which the computing task depends, and the consumption values corresponding to different program algorithms are different; The sequencing module is used for sequencing the at least one computing task according to the sequence from high priority to low priority to obtain a sequencing sequence of the at least one computing task; The task allocation module is used for allocating the at least one computing task in sequence according to the ordering sequence of the at least one computing task and the processing speed of the at least one computing unit to obtain the computing task corresponding to the at least one computing unit respectively, and each computing unit is used for processing the computing task corresponding to the computing unit. According to an aspect of an embodiment of the present application, there is provided a server including a processor and a memory, in which a computer program is stored, the computer program being loaded and executed by the processor to implement the task scheduling method described above. According to an aspect of an embodiment of the present application, there is provided a computer-readable storage medium having stored therein a computer program loaded and executed by a processor to implement the task scheduling method described above. According to an aspect of an embodiment of the present application, there is provided a computer program product comprising a computer program loaded and executed by a processor to implement the task scheduling method described above. The technical scheme provided by the embodiment of the application can bring the following beneficial effects: By determining the priority of the calculation tasks according to the consumption value of the calculation tasks and the byte number of the calculation tasks, the specific cost of different program algorithms is considered, so that the priority of the calculation tasks can fully represent the calculation cost of the calculation tasks, the task allocation is performed according to the priority of the calculation tasks, the change of the workload and the calculation resource performance can be dynamically adapted, and the sequencing strategy can be continuously adjusted acco