Task scheduling method and device, equipment and storage medium

By determining priorities based on the computational task's consumption value and number of bytes, and allocating tasks in conjunction with the processing speed of the computing unit, the problem of low task scheduling efficiency in existing encryption systems is solved, achieving balanced utilization of computing resources and maximizing throughput.

CN121996366APending Publication Date: 2026-05-08RICHFIT INFORMATION TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
RICHFIT INFORMATION TECH
Filing Date
2024-11-07
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

The inefficiency of task scheduling in existing encryption systems leads to suboptimal resource utilization, increased latency, and potential bottlenecks.

Method used

Priorities are determined based on the computational task's consumption value and number of bytes, the sorting strategy is dynamically adjusted, and tasks are allocated according to the processing speed of the computing unit to achieve a balanced allocation of computing resources.

Benefits of technology

It improves the processing efficiency of computing tasks, reduces the risk of performance degradation, and maximizes the throughput of computing units.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121996366A_ABST
    Figure CN121996366A_ABST
Patent Text Reader

Abstract

The invention discloses a task scheduling method and device, equipment and a storage medium, and relates to the technical field of computers. The method comprises the steps of obtaining at least one calculation task; according to the consumption values of the calculation tasks and the byte number of the calculation tasks, the priorities of the calculation tasks are obtained, the consumption values are used for indicating program algorithms on which the calculation tasks depend, and different program algorithms correspond to different consumption values; sorting the at least one calculation task according to the priority from high to low to obtain a sorting sequence of the at least one calculation task; according to the sorting sequence of the at least one calculation task and the processing speed of the at least one calculation unit, the at least one calculation task is distributed in sequence, the calculation task corresponding to the at least one calculation unit is obtained, and each calculation unit is used for processing the calculation task corresponding to the calculation unit. According to the method, the use of the computing resources is optimized, the balanced allocation of the computing resources is realized, and the throughput of the computing unit is improved to the greatest extent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a task scheduling method, apparatus, device, and storage medium. Background Technology

[0002] Managing the efficiency of encryption operations is a major challenge in modern encryption systems, especially with increasing data volumes and ever-increasing security requirements.

[0003] In related technologies, many systems still rely on simple scheduling methods when handling encryption tasks, such as FIFO (First Input First Output), where the first instruction to enter is completed and exited before the second instruction is executed (instructions are the program code that the computer uses to respond to user operations, which is transparent to the user).

[0004] However, the above task scheduling methods can lead to inefficiency and underutilization of processing resources, resulting in increased latency and potential bottlenecks. Summary of the Invention

[0005] This application provides a task scheduling method, apparatus, device, and storage medium. The technical solutions provided by this application are as follows:

[0006] According to one aspect of the embodiments of this application, a task scheduling method is provided, the method comprising:

[0007] Obtain at least one computational task;

[0008] The priority of the computing task is obtained based on the consumption value and the number of bytes of the computing task. The consumption value is used to indicate the program algorithm on which the computing task depends. Different program algorithms have different consumption values.

[0009] The at least one computing task is sorted in descending order of priority to obtain a sorted sequence of the at least one computing task;

[0010] Based on the sorting sequence of the at least one computing task and the processing speed of the at least one computing unit, the at least one computing task is assigned sequentially to obtain the computing tasks corresponding to the at least one computing unit respectively, and each computing unit is used to process the computing task corresponding to the computing unit.

[0011] According to one aspect of the embodiments of this application, a task scheduling apparatus is provided, the apparatus comprising:

[0012] The task acquisition module is used to acquire at least one computing task;

[0013] The priority determination module is used to determine the priority of the computing task based on the consumption value and the number of bytes of the computing task. The consumption value is used to indicate the program algorithm on which the computing task depends, and different program algorithms have different consumption values.

[0014] The sorting module is used to sort the at least one computing task in descending order of priority to obtain a sorted sequence of the at least one computing task.

[0015] The task allocation module is used to allocate the at least one computing task sequentially according to the sorting sequence of the at least one computing task and the processing speed of the at least one computing unit, thereby obtaining the computing tasks corresponding to the at least one computing unit respectively, and each computing unit is used to process the computing task corresponding to the computing unit.

[0016] According to one aspect of the embodiments of this application, a server is provided, the server including a processor and a memory, the memory storing a computer program, the computer program being loaded and executed by the processor to implement the above-described task scheduling method.

[0017] According to one aspect of the embodiments of this application, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and the computer program is loaded and executed by a processor to implement the above-described task scheduling method.

[0018] According to one aspect of the embodiments of this application, a computer program product is provided, the computer program product including a computer program, the computer program being loaded and executed by a processor to implement the above-described task scheduling method.

[0019] The technical solution provided in this application can bring the following beneficial effects:

[0020] By prioritizing computational tasks based on their computational cost and number of bytes, and considering the specific costs of different algorithms, task priorities effectively represent computational costs. This priority-based task allocation dynamically adapts to changes in workload and computing resource performance. Whether handling large volumes of computational tasks or considering the complexity of different algorithms, the prioritization strategy can be continuously adjusted based on real-time feedback to maintain optimal processing performance and reduce the risk of performance degradation. Furthermore, allocating computational tasks based on the processing speed of computing units further optimizes the use of computing resources, achieving a balanced allocation of resources and maximizing the throughput of computing units. Attached Figure Description

[0021] Figure 1This is a schematic diagram of the implementation environment of a solution provided in one embodiment of this application;

[0022] Figure 2 This is a flowchart of a task scheduling method provided in one embodiment of this application;

[0023] Figure 3 This is a schematic diagram illustrating the implementation process of task scheduling provided in one embodiment of this application;

[0024] Figure 4 This is a block diagram of a task scheduling apparatus provided in one embodiment of this application;

[0025] Figure 5 This is a structural block diagram of a server provided in one embodiment of this application. Detailed Implementation

[0026] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0027] Please refer to Figure 1 This diagram illustrates an implementation environment for a solution provided in one embodiment of this application. This implementation environment can be implemented as a task scheduling system. The implementation environment may include: server 10.

[0028] Server 10 refers to an electronic device with data computing, processing, and storage functions. Server 10 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.

[0029] Server 10 is configured with n computing units, where n is a positive integer. Server 10 uses a scheduling system to allocate at least one computing task to each of the n computing units, and then the n computing units process the at least one computing task. Each computing unit is used to process the computing task allocated to it. Figure 1 As shown, computing unit 1 is assigned computing tasks a, b, ..., and is used to process computing tasks a, b, etc. Computing unit 2 is assigned computing tasks c, d, ..., and is used to process computing tasks c, d, etc. Computing unit n is assigned computing tasks e, f, ..., and is used to process computing tasks e, f, etc.

[0030] Optionally, each computing unit may have the same or different processing speeds for the computing task.

[0031] In this embodiment, the server first obtains at least one computing task, then determines the priority of the computing task based on its consumption value and the number of bytes. The at least one computing task is then sorted in descending order of priority to obtain a sorted sequence of at least one computing task. Finally, based on the sorted sequence and the processing speed of at least one computing unit, the at least one computing task is allocated sequentially to obtain computing tasks corresponding to each computing unit, so that each computing unit can process the computing task corresponding to it.

[0032] Please refer to Figure 2 The diagram illustrates a flowchart of a task scheduling method provided in one embodiment of this application. The execution entity for each step of the method can be a server. The method may include at least one of the following steps 210 to 240:

[0033] Step 210: Obtain at least one computing task.

[0034] A computational task is a process generated based on a program algorithm that requires data computation, processing, and storage. A program algorithm describes the solution process for a specific problem, indicating the specific, finite steps taken to solve it. A computational task is a set of operational steps generated based on a program algorithm to solve a specific problem.

[0035] Optionally, different computational tasks may rely on the same or different program algorithms. Therefore, at least one computational task may rely on different program algorithms, or two computational tasks may rely on the same program algorithm.

[0036] In some embodiments, the computational task involved in this application refers to a task whose processing time is affected by the processor's computational consumption. For example, the program algorithm can be an encryption algorithm, including AES (Advanced Encryption Standard), SM4 block cipher, GOST (Gosudarstvennyi Standard), Camellia encryption, etc. The computational task is an encryption task generated based on the encryption algorithm, and the encryption tasks obtained based on different encryption algorithms are different. For example, the computational task generated based on the AES encryption algorithm is different from the computational task generated based on the SM4 block cipher. For example, the program algorithm can also be an algorithm for video stream processing, in which case the computational task is a task for video stream processing.

[0037] Step 220: Based on the computational task's consumption value and the number of bytes in the computational task, the priority of the computational task is obtained. The consumption value is used to indicate the program algorithm that the computational task depends on, and different program algorithms have different consumption values.

[0038] Because different program algorithms have different computational costs, different computational tasks generated based on different algorithms also have different computational costs. The computational cost can be used to indicate the program algorithm upon which the computational task depends. The computational cost refers to the number of cycles required to process each byte of data in a computational task; it quantifies the computational cost required to process each byte of data using different program algorithms.

[0039] The number of bytes in a computation task indicates the data size of the task. The priority of a computation task is determined based on its computational cost and the number of bytes. The priority of a computation task indicates its processing order; a higher priority task is processed earlier, and a lower priority task is processed later.

[0040] In some embodiments, the total number of cycles of a computing task is obtained based on the consumption value and the number of bytes of the computing task; the priority of the computing task is obtained based on the reciprocal of the total number of cycles of the computing task.

[0041] The total number of cycles for a computation task refers to the total number of cycles required to process the task. The priority of a computation task is derived from the reciprocal of the total number of cycles. Therefore, the priority of a computation task is negatively correlated with the total number of cycles; the higher the total number of cycles, the higher the priority, and vice versa.

[0042] For example, the priority of a computing task can be expressed as: priority = 1 / (Ci × Di), where Ci represents the consumption value of the computing task and Di represents the number of bytes of the computing task.

[0043] By considering the computational cost and number of bytes, the priority of computational tasks can be determined, allowing tasks with fewer total cycles to be processed first, thereby speeding up the processing speed and improving the efficiency of computational tasks.

[0044] Step 230: Sort at least one computing task in descending order of priority to obtain a sorted sequence of at least one computing task.

[0045] In some embodiments, a second computing task is obtained, which is a computing task received after obtaining a sorted sequence of at least one computing task; the priority of the second computing task is obtained according to the consumption value of the second computing task and the number of bytes of the second computing task; according to the priority of the second computing task, the at least one computing task and the second computing task are sorted in descending order of priority to obtain a sorted sequence of at least one computing task and the second computing task.

[0046] In practice, the server continuously calculates the priority of each incoming computation task and dynamically adjusts the sorting position of each computation task in the sorting sequence to prioritize the execution of the highest priority computation task.

[0047] The second computation task is a newly received computation task after at least one computation task has been sorted. When the second computation task is received, its priority needs to be calculated. Then, according to the priority of the second computation task, the second computation task is inserted into the sorted sequence of at least one computation task to obtain the sorted sequence of at least one computation task and the second computation task.

[0048] In some embodiments, for a first computing task, if the waiting time of the first computing task in the sorting sequence is greater than or equal to a time threshold, the updated priority of the first computing task is obtained based on the reciprocal of the total number of cycles of the first computing task and the ratio of the waiting time to the time threshold. The first computing task is a computing task whose consumption value is greater than or equal to a first threshold among at least one computing task. Based on the updated priority of the first computing task, the sorting sequence of at least one computing task is updated to obtain an updated sorting sequence.

[0049] For sorting sequences, the server will comprehensively consider the waiting time of computationally intensive tasks in the sorting sequence to ensure that computationally intensive tasks can obtain higher priority after waiting for a long time. This will allow the computationally intensive tasks to be processed first, avoiding the situation where computationally intensive tasks cannot be processed indefinitely due to high computational cost, which would increase latency and affect business processes.

[0050] For computational tasks that are deemed to have high computational consumption, for example, computational tasks whose computational consumption value is greater than or equal to a first threshold are identified as computationally intensive tasks. The aforementioned first computational task is thus identified as a computationally intensive task.

[0051] For example, the updated priority of the first computing task can be expressed as: Priority = 1 / (Ci×Di) + Wi / W, where Ci represents the consumption value of the first computing task, Di represents the number of bytes of the first computing task, Wi represents the waiting time of the first computing task, and W represents the time threshold. Then, if Wi / W (the ratio of waiting time to time threshold) is greater than or equal to 1, the priority of the first computing task is updated.

[0052] The specific values ​​of the time threshold and the first threshold are to be set by the administrators themselves, and this application does not impose any restrictions.

[0053] In some embodiments, if the waiting time of the first computing task in the sorting sequence is obtained every first time period, then the priority of the first computing task and its position in the sorting sequence are updated every first time period. This application does not limit the specific value of the first time period.

[0054] By adjusting the order of the first computational task in the sorting sequence based on the waiting time, we can ensure that less computationally intensive tasks are processed as early as possible while also ensuring the timely processing of more computationally intensive tasks. This optimizes overall throughput, minimizes latency, and balances workload and computing resources.

[0055] In some embodiments, it is not necessary to specifically target computationally intensive tasks. For any computational task in the sorting sequence with a long waiting time, its priority can be updated, thereby adjusting the position of the computational task in the sorting sequence according to the updated priority. For example, if the waiting time of a third computational task in the sorting sequence is greater than or equal to a time threshold, the updated priority of the third computational task is obtained based on the reciprocal of the total number of cycles of the third computational task and the ratio of the waiting time to the time threshold. The third computational task is one of at least one computational task. Based on the updated priority of the third computational task, the sorting sequence of at least one computational task is updated to obtain the updated sorting sequence.

[0056] Step 240: Based on the sorting sequence of at least one computing task and the processing speed of at least one computing unit, at least one computing task is assigned sequentially to obtain computing tasks corresponding to at least one computing unit. Each computing unit is used to process the computing task corresponding to the computing unit.

[0057] At least one computational task is assigned to at least one computational unit in sequence according to its ranking. The number of computational tasks corresponding to a computational unit is related to the processing speed of the computational unit. The processing speed of a computational unit indicates the number of periodic operations that the computational unit can perform per second.

[0058] In some embodiments, the processing speed of a computing unit is positively correlated with the number of computing tasks corresponding to the computing unit.

[0059] The faster the processing speed of a computing unit, the more computing tasks it can handle; the slower the processing speed of a computing unit, the fewer computing tasks it can handle.

[0060] By allocating more computing tasks to faster computing units and fewer computing tasks to slower computing units, the system avoids situations where slower computing units are overloaded while faster computing units are idle. It can intelligently allocate computing tasks based on the processing capacity of computing units, thereby optimizing the use of computing resources, achieving continuous and balanced utilization of computing resources, preventing bottlenecks, and maximizing overall throughput.

[0061] In some embodiments, a sorting sequence of computing units is obtained based on the allocation time of each computing task corresponding to the computing unit, and the computing unit is used to process the computing tasks corresponding to the computing unit in sequence according to the sorting sequence of the computing units.

[0062] For each computing unit, the computing tasks corresponding to that unit are sorted according to their respective allocated times, resulting in a sorted sequence for the computing unit. The computing unit then processes the computing tasks sequentially according to this sorted sequence. In other words, the computing unit processes the computing tasks in order of their allocated times, from earliest to latest.

[0063] By processing the assigned computing tasks sequentially according to time order, the computing units can be processed in sequence, thus ensuring their processing performance.

[0064] The technical solution provided in this application determines the priority of computing tasks based on their consumption value and number of bytes, taking into account the specific costs of different algorithms. This ensures that the priority of computing tasks fully represents their computational cost. Task allocation based on priority dynamically adapts to changes in workload and computing resource performance. Whether handling a large number of computing tasks or considering the complexity of different algorithms, the sorting strategy can be continuously adjusted based on real-time feedback to maintain optimal processing performance and reduce the risk of performance degradation. Furthermore, allocating computing tasks based on the processing speed of computing units further optimizes the use of computing resources, achieving a balanced allocation of computing resources and maximizing the throughput of the computing unit cluster.

[0065] Figure 3The diagram illustrates the task scheduling process. After receiving a computation task, the scheduling system in the server calculates the task's priority based on its computational cost and number of bytes. The task is then inserted into a sorting sequence according to its priority, and finally, each task in the sorting sequence is assigned to a computational unit for processing. Figure 3 As shown, the sorted sequence contains computation tasks 1, 2, 3, etc. Since the ratio of the waiting time of computation task 3 to the time threshold reaches 101%, its sorting position needs to be adjusted. After recalculating the priority of computation task 3, it is placed before computation task 1. The updated sorted sequence then contains computation tasks 3, 1, 2, etc. The scheduling system records the waiting time of each computation task in the sorted sequence and increases the priority of computation tasks that reach the threshold based on their waiting time, ensuring that the waiting time of computation tasks does not become excessively long.

[0066] This application develops a relatively accurate cost estimation mechanism that considers factors such as the cost of the program algorithm, the data size of the computing task, and the processing performance of the computing unit. This allows the scheduling system to decide which computing task to process next, which program algorithm to use, and other operational steps, ensuring that all computing tasks are effectively advanced while maximizing the throughput of the computing unit cluster.

[0067] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.

[0068] Please refer to Figure 4 This diagram illustrates a block diagram of a task scheduling apparatus according to an embodiment of this application. The apparatus has the function of implementing the above-described task scheduling method; this function can be implemented in hardware or by hardware executing corresponding software. The apparatus can be the server described above, or it can be located within a server. Figure 4 As shown, the device 400 may include: a task acquisition module 410, a priority determination module 420, a sorting module 430, and a task allocation module 440.

[0069] The task acquisition module 410 is used to acquire at least one computing task.

[0070] The priority determination module 420 is used to determine the priority of the computing task based on the consumption value and the number of bytes of the computing task. The consumption value is used to indicate the program algorithm on which the computing task depends, and different program algorithms have different consumption values.

[0071] The sorting module 430 is used to sort the at least one computing task in descending order of priority to obtain a sorted sequence of the at least one computing task.

[0072] The task allocation module 440 is used to allocate the at least one computing task sequentially according to the sorting sequence of the at least one computing task and the processing speed of the at least one computing unit, so as to obtain the computing tasks corresponding to the at least one computing unit respectively, and each computing unit is used to process the computing task corresponding to the computing unit.

[0073] In some embodiments, the priority determination module 420 is configured to:

[0074] The total number of cycles for the computing task is obtained based on the consumption value of the computing task and the number of bytes of the computing task. The consumption value refers to the number of cycles required to process each byte of the computing task.

[0075] The priority of the computation task is obtained by taking the reciprocal of the total number of cycles of the computation task.

[0076] In some embodiments, the sorting module 430 is configured to:

[0077] For the first computing task, if the waiting time of the first computing task in the sorting sequence is greater than or equal to a time threshold, the updated priority of the first computing task is obtained based on the reciprocal of the total number of cycles of the first computing task and the ratio of the waiting time to the time threshold. The first computing task is the computing task whose consumption value is greater than or equal to the first threshold among the at least one computing task.

[0078] Based on the updated priority of the first computing task, the sorting sequence of the at least one computing task is updated to obtain the updated sorting sequence.

[0079] In some embodiments, the sorting module 430 is configured to:

[0080] Obtain a second computing task, which is a computing task received after obtaining the sorted sequence of the at least one computing task;

[0081] The priority of the second computing task is obtained based on the consumption value and the number of bytes of the second computing task.

[0082] Based on the priority of the second computing task, the at least one computing task and the second computing task are sorted in descending order of priority to obtain a sorting sequence of the at least one computing task and the second computing task.

[0083] In some embodiments, the processing speed of the computing unit is positively correlated with the number of computing tasks corresponding to the computing unit.

[0084] In some embodiments, the task allocation module 440 is configured to:

[0085] Based on the allocation time of each computing task corresponding to the computing unit, a sorting sequence of computing units is obtained, and the computing unit is used to process the computing tasks corresponding to the computing unit in sequence according to the sorting sequence of computing units.

[0086] It should be noted that the apparatus provided in the above embodiments is only illustrated by the division of the above functional modules when implementing its functions. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the content structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.

[0087] Please refer to Figure 5 The diagram illustrates a structural block diagram of a server 500 provided in one embodiment of this application. The server 500 can be any electronic device capable of data computation, processing, and storage. The server 500 can be used to implement the task scheduling method provided in the above embodiments.

[0088] Typically, server 500 includes a processor 501 and memory 502.

[0089] Processor 501 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 501 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), and PLA (Programmable Logic Array). Processor 501 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 501 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 501 may also include an AI processor for handling computational operations related to machine learning.

[0090] The memory 502 may include one or more computer-readable storage media, which may be non-transitory. The memory 502 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 502 are used to store a computer program configured to be executed by one or more processors to implement the task scheduling method described above.

[0091] Those skilled in the art will understand that Figure 5 The structure shown does not constitute a limitation on server 500 and may include more or fewer components than shown, or combine certain components, or use different component arrangements.

[0092] In an illustrative embodiment, a computer-readable storage medium is also provided, wherein a computer program is stored in the storage medium, and the computer program implements the above-described task scheduling method when executed by the processor of a server. Optionally, the above-described computer-readable storage medium may be ROM (Read-Only Memory), RAM (Random Access Memory), CD-ROM (Compact Disc Read-Only Memory), magnetic tape, floppy disk, and optical data storage device, etc.

[0093] In an exemplary embodiment, a computer program product is also provided, comprising a computer program stored in a computer-readable storage medium. A server processor reads the computer program from the computer-readable storage medium and executes the computer program, causing the server to perform the task scheduling method described above.

[0094] It should be understood that "multiple" as used herein refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. Furthermore, the step numbers described herein are merely illustrative of one possible execution order. In some other embodiments, the steps may not be executed in numerical order, such as two steps with different numbers being executed simultaneously, or two steps with different numbers being executed in the reverse order of the illustration. This application does not limit this.

[0095] The above description is merely an exemplary embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A task scheduling method, characterized in that, The method includes: Obtain at least one computational task; The priority of the computing task is obtained based on the consumption value and the number of bytes of the computing task. The consumption value is used to indicate the program algorithm on which the computing task depends. Different program algorithms have different consumption values. The at least one computing task is sorted in descending order of priority to obtain a sorted sequence of the at least one computing task; Based on the sorting sequence of the at least one computing task and the processing speed of the at least one computing unit, the at least one computing task is assigned sequentially to obtain the computing tasks corresponding to the at least one computing unit respectively, and each computing unit is used to process the computing task corresponding to the computing unit.

2. The method according to claim 1, characterized in that, The step of determining the priority of the computing task based on its consumption value and the number of bytes is as follows: The total number of cycles for the computing task is obtained based on the consumption value of the computing task and the number of bytes of the computing task. The consumption value refers to the number of cycles required to process each byte of the computing task. The priority of the computation task is obtained by taking the reciprocal of the total number of cycles of the computation task.

3. The method according to claim 2, characterized in that, The method further includes: For the first computing task, if the waiting time of the first computing task in the sorting sequence is greater than or equal to a time threshold, the updated priority of the first computing task is obtained based on the reciprocal of the total number of cycles of the first computing task and the ratio of the waiting time to the time threshold. The first computing task is the computing task whose consumption value is greater than or equal to the first threshold among the at least one computing task. Based on the updated priority of the first computing task, the sorting sequence of the at least one computing task is updated to obtain the updated sorting sequence.

4. The method according to claim 1, characterized in that, The method further includes: Obtain a second computing task, which is a computing task received after obtaining the sorted sequence of the at least one computing task; The priority of the second computing task is obtained based on the consumption value and the number of bytes of the second computing task. Based on the priority of the second computing task, the at least one computing task and the second computing task are sorted in descending order of priority to obtain a sorting sequence of the at least one computing task and the second computing task.

5. The method according to claim 1, characterized in that, The processing speed of the computing unit is positively correlated with the number of computing tasks corresponding to the computing unit.

6. The method according to claim 1, characterized in that, The method further includes: Based on the allocation time of each computing task corresponding to the computing unit, a sorting sequence of computing units is obtained, and the computing unit is used to process the computing tasks corresponding to the computing unit in sequence according to the sorting sequence of computing units.

7. A task scheduling device, characterized in that, The device includes: The task acquisition module is used to acquire at least one computing task; The priority determination module is used to determine the priority of the computing task based on the consumption value and the number of bytes of the computing task. The consumption value is used to indicate the program algorithm on which the computing task depends, and different program algorithms have different consumption values. The sorting module is used to sort the at least one computing task in descending order of priority to obtain a sorted sequence of the at least one computing task. The task allocation module is used to allocate the at least one computing task sequentially according to the sorting sequence of the at least one computing task and the processing speed of the at least one computing unit, thereby obtaining the computing tasks corresponding to the at least one computing unit respectively, and each computing unit is used to process the computing task corresponding to the computing unit.

8. A server, characterized in that, The server includes a processor and a memory, the memory storing a computer program that is loaded and executed by the processor to implement the task scheduling method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which is loaded and executed by a processor to implement the task scheduling method as described in any one of claims 1 to 6.

10. A computer program product, characterized in that, The computer program product includes a computer program that is loaded and executed by a processor to implement the task scheduling method as described in any one of claims 1 to 6.