Task allocation method and task allocation device
By configuring the software intermediate layer and task queue in the artificial intelligence system, the computing tasks are dynamically allocated to achieve load balancing, the problem of improper task scheduling and management between the computing model and hardware equipment is solved, and the operating efficiency of the system is significantly improved.
Patent Information
- Application Number
- CN202410430777.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-11
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2044-04-11
AI Technical Summary
In artificial intelligence systems, improper task scheduling and management between the computing model and hardware devices has led to a drag on the overall computing efficiency of the system.
By configuring the software intermediate layer and multiple task queues, we obtain information about the computing tasks and task queues, and dynamically allocate the computing tasks to relatively idle task queues to achieve load balancing between task queues.
It effectively improves the overall operation efficiency of the system. By optimizing task allocation, the load imbalance problem of task queues is reduced and the overall performance of the system is improved.
Smart Images

Figure CN118170521B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and more particularly to a task management technology, and more particularly to a task allocation method and a task allocation device. Background Art
[0002] As artificial intelligence technology becomes more popular, the performance requirements for the computing models used as the brain of artificial intelligence and the hardware devices that actually perform the calculations continue to increase in order to provide users with a better operating experience. However, the problem that may be encountered in practice is that even if the computing models used as the brain of artificial intelligence are continuously optimized and the performance of the hardware devices that actually perform the calculations is continuously improved, if the scheduling and management of the computing tasks between the computing models and the hardware devices are not properly managed, the overall computing performance of the system may be seriously dragged down. Summary of the invention
[0003] The present invention provides a task allocation method and a task allocation device, which can optimize the allocation method of computing tasks to improve the above-mentioned problems and enhance the overall operating performance of the system.
[0004] An embodiment of the present invention provides a task allocation method, which includes: configuring a software middle layer and multiple task queues; obtaining multiple computing tasks and caching the multiple computing tasks in the software middle layer; obtaining task information related to the multiple computing tasks, wherein the task information reflects the types of the multiple computing tasks; obtaining queue information related to the multiple task queues, wherein the queue information reflects the usage status of the multiple task queues; and according to the task information and the queue information, allocating at least one target computing task cached in the software middle layer to at least one target task queue among the multiple task queues.
[0005] The embodiment of the present invention further provides a task allocation device, which includes a storage circuit and a processor. The processor is connected to the storage circuit and is used to: configure a software middle layer and multiple task queues; obtain multiple computing tasks and cache the multiple computing tasks in the software middle layer; obtain task information related to the multiple computing tasks, wherein the task information reflects the types of the multiple computing tasks; obtain queue information related to the multiple task queues, wherein the queue information reflects the usage status of the multiple task queues; and according to the task information and the queue information, allocate at least one target computing task cached in the software middle layer to at least one target task queue among the multiple task queues.
[0006] Based on the above, after configuring the software middle layer and multiple task queues, multiple computing tasks can be cached in the software middle layer. Task information related to the multiple computing tasks and queue information related to the multiple task queues can be obtained. The task information reflects the types of the multiple computing tasks. The queue information reflects the usage status of the multiple task queues. Then, based on the task information and the queue information, at least one target computing task cached in the software middle layer can be dynamically allocated to at least one target task queue in the multiple task queues. In other words, by optimizing the allocation method of computing tasks, the task allocation method and task allocation device proposed in the embodiments of the present invention can effectively improve the overall operating efficiency of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] Figure 1 is a schematic diagram of a task allocation device according to an embodiment of the present invention;
[0008] Figure 2 is a schematic diagram of task allocation according to an embodiment of the present invention;
[0009] Figure 3 is a schematic diagram of allocating tasks to a relatively idle task queue according to an embodiment of the present invention;
[0010] Figure 4 is a schematic diagram of a first management table and a second management table according to an embodiment of the present invention;
[0011] Figure 5 is a flowchart of a task allocation method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0012] Reference will now be made in detail to exemplary embodiments of the present invention, examples of which are illustrated in the accompanying drawings. Whenever possible, the same reference numerals are used in the drawings and the description to refer to the same or like parts.
[0013] Figure 1 is a schematic diagram of a task allocation device according to an embodiment of the present invention. Figure 1 The device (also referred to as the task allocation device) 10 can be a smart phone, a tablet computer, a notebook computer, a desktop computer, an industrial computer, a server or a vehicle-mounted computer, and other electronic devices with computing and information processing functions, and the type of the task allocation device 10 is not limited thereto.
[0014] The task allocation device 10 includes a processor 11, a storage circuit 12, and a hardware device 13. The processor 11 is connected to the storage circuit 12 and the hardware device 13. The processor 11 can be used to be responsible for the overall or partial operation of the task allocation device 10. For example, the processor 11 may include a central processing unit (CPU), a graphics processing unit (GPU), or other programmable general-purpose or special-purpose microprocessors, digital signal processors (DSP), programmable controllers, application-specific integrated circuits (ASIC), programmable logic devices (PLD), or other similar devices or combinations of these devices.
[0015] The storage circuit 12 may be used to store data. For example, the storage circuit 12 may include a volatile storage circuit and a non-volatile storage circuit. The volatile storage circuit is used to store data volatilely. For example, the volatile storage circuit may include a random access memory (RAM) or a similar volatile storage medium. The non-volatile storage circuit is used to store data non-volatilely. For example, the non-volatile storage circuit may include a read-only memory (ROM), a solid state disk (SSD), a traditional hard disk drive (HDD) or a similar non-volatile storage medium.
[0016] The hardware device 13 can be used to provide physical computing and information processing functions. For example, the hardware device 13 may include a graphics processor, a general-purpose graphics processor (GPGPU), a video processing unit (VPU), a neural-network processing unit (NPU), a tensor processing unit (TPU) or other hardware devices with computing and information processing functions, and the type of the hardware device 13 is not limited thereto. In addition, the number of the hardware device 13 may be one or more, and the present invention is not limited thereto. In one embodiment, the hardware device 13 may also be arranged outside the task allocation device 10 and may be connected to the task allocation device 10 by wire or wirelessly, and the present invention is not limited thereto.
[0017] In one embodiment, the storage circuit 12 can be used to store the computing model 101. The computing model 101 may include at least one computing model of a machine learning model, a deep learning model, a neural network model, various decision models, various mathematical models, and various algorithm models, and the type of the computing model 101 is not limited thereto. The computing model 101 can be implemented by at least one of a function, a library, a program code, an instruction code, and a machine code, or other types of various functional description languages. In addition, the number of the computing model 101 can be one or more, and the present invention is not limited thereto.
[0018] In one embodiment, the hardware device 13 can be used in conjunction with the computing model 101. For example, the computing model 101 can provide instructions related to one or more operations. The internal circuit of the hardware device 13 can be used to perform the operations indicated by the computing model 101 and return the operation results to the computing model 101.
[0019] Figure 2 is a schematic diagram of task allocation according to an embodiment of the present invention. Figure 2 In one embodiment, the processor 11 can configure the software middle layer 21 and the task queues (queues) 22 (1) ~ 22 (m). m can be any integer greater than 1. The software middle layer 21 includes one or more management modules implemented in software form. The task queues 22 (1) ~ 22 (m) can be used to store one or more tasks (also called computing tasks) respectively. After configuring the software middle layer 21 and the task queues 22 (1) ~ 22 (m), the processor 11 can receive computing tasks 201 (1) ~ 201 (n) and cache the computing tasks 201 (1) ~ 201 (n) in the software middle layer 21. n can be any integer greater than 1.
[0020] In one embodiment, the processor 11 can obtain in real time information related to the computing tasks 201(1)~201(n) currently cached in the software middle layer 21 (also referred to as task information). For example, this task information can reflect the type of computing tasks 201(1)~201(n). Taking computing task 201(i) as an example, the processor 11 can analyze computing task 201(i) (for example, analyze at least part of the information content of computing task 201(i)) through the software middle layer 21 to obtain task information corresponding to computing task 201(i). This task information can reflect the type of computing task 201(i). i is an integer between 1 and n. In addition, this task information can also reflect any useful information related to at least one of computing tasks 201(1)~201(n), which is not limited by the present invention.
[0021] In one embodiment, the processor 11 can obtain information related to the task queues 22 (1) ~ 22 (m) (also referred to as queue information) in real time. This queue information can reflect the usage status of the task queues 22 (1) ~ 22 (m). For example, the usage status of each task queue can be related to the total number of tasks (also referred to as tasks to be executed) stored in the task queue. For example, the usage status corresponding to the task queue 22 (j) can reflect the total number of tasks to be executed stored in the current task queue 22 (j). j is an integer between 1 and m. In addition, this queue information can also reflect any useful information related to at least one of the task queues 22 (1) ~ 22 (m), and the present invention is not limited thereto.
[0022] In one embodiment, the processor 11 may allocate at least one of the computing tasks 201(1)~201(n) currently cached in the software middle layer 21 (also referred to as the target computing task) to at least one of the task queues 22(1)~22(m) (also referred to as the target task queue) based on the obtained task information and queue information. For example, based on the obtained task information and queue information, the processor 11 may determine the computing task 201(i) as the target computing task and the task queue 22(j) as the target task queue. Then, the processor 11 may allocate (e.g., add) the computing task 201(i) to the task queue 22(j). After the computing task 201(i) is allocated to the task queue 22(j), the computing task 201(i) may become a new task to be executed in the task queue 22(j). For example, the computing task 201(i) may be allocated to the task queue 22(j) based on a First In, First Out (FIFO) configuration.
[0023] In one embodiment, the processor 11 may preferentially assign the target computing task to a relatively idle task queue (i.e., the target task queue) among the task queues 22(1)-22(m). It should be noted that a relatively idle task queue refers to a task queue among the task queues 22(1)-22(m) that currently stores relatively few computing tasks. In this way, load balancing between the task queues 22(1)-22(m) can be effectively performed.
[0024] Figure 3 is a schematic diagram of allocating tasks to relatively idle task queues according to an embodiment of the present invention. Figure 3 In one embodiment, after receiving the computing task 301 , the processor 11 may cache the computing task 301 in the software middle layer 21 .
[0025] In one embodiment, it is assumed that the queue information corresponding to task queues 22(1), 22(2) and 22(3) reflects that the total number of pending tasks currently stored in task queues 22(1), 22(2) and 22(3) is "3", "1" and "5" respectively (i.e., task queue 22(1) currently stores 3 pending tasks, task queue 22(2) currently stores 1 pending task, and task queue 22(3) currently stores 5 pending tasks). Based on this queue information, processor 11 can determine that among task queues 22(1) to 22(3), task queue 22(2) stores relatively fewer (or the least) computing tasks. In other words, based on this queue information, processor 11 can determine that among task queues 22(1) to 22(3), the relatively idle task queue is task queue 22(2). Therefore, processor 11 can determine task queue 22(2) as the target task queue and preferentially assign computing task 301 (i.e., the target computing task) to task queue 22(2).
[0026] In one embodiment, the processor 11 may compare the current usage status of the task queues 22(1)-22(m) according to the obtained queue information. Then, the processor 11 may determine the target task queue from the task queues 22(1)-22(m) according to the comparison result of the usage status. Figure 3 For example, the comparison result of the usage status of task queues 22(1)-22(3) can reflect that task queue 22(2) is relatively idle among task queues 22(1)-22(3) (i.e., compared with task queues 22(1) and 22(3), task queue 22(2) stores relatively fewer computing tasks). Therefore, processor 11 can determine task queue 22(2) as the target task queue.
[0027] In one embodiment, the processor 11 may also obtain the execution time information of a target computing task (also referred to as the first target computing task) currently cached in the software middle layer 21 according to the task information. This execution time information may reflect the time required for the first target computing task to be fully executed. For example, the processor 11 may obtain the execution time information corresponding to the first target computing task by looking up a table or the like according to the type of the first target computing task. In addition, different types of computing tasks may require different times to be fully executed. Then, the processor 11 may assign the first target computing task to a target task queue (also referred to as the first target task queue) according to this execution time information and the queue information. In one embodiment, by assigning the target computing task to the target task queue taking into account the task information and the queue information, the load balancing of each configured task queue may be further performed.
[0028] In one embodiment, assuming that the time required for the first target computing task to be fully executed is relatively long (i.e., the execution speed of the first target computing task is relatively slow), the processor 11 can not only preferentially assign the first target computing task to a relatively idle task queue (i.e., the first target task queue), but can also further perform at least one of reducing the total number of computing tasks subsequently assigned to the first target task queue, reducing the probability of computing tasks subsequently assigned to the first target task queue, and controlling the computing tasks subsequently assigned to the first target task queue to be computing tasks with a shorter time required for complete execution (i.e., computing tasks with a faster execution speed). In this way, the beneficial technical effect of load balancing computing tasks between each other in the first target task queue can be achieved.
[0029] In one embodiment, assuming that the time required for the first target computing task to be fully executed is shorter (i.e., the execution speed of the first target computing task is faster), the processor 11 can not only preferentially assign the first target computing task to a relatively idle task queue (i.e., the first target task queue), but can also further perform at least one of increasing the total number of computing tasks subsequently assigned to the first target task queue, increasing the probability of computing tasks subsequently assigned to the first target task queue, and controlling the computing tasks subsequently assigned to the first target task queue to be computing tasks that take a longer time to be fully executed (i.e., computing tasks that execute at a slower speed). In this way, the beneficial technical effect of load balancing computing tasks between each other in the first target task queue can also be achieved.
[0030] In other words, by considering the task information and the queue information to allocate the target computing task to a relatively idle target task queue, load balancing between multiple task queues can be promoted. In addition, by considering the task information and the queue information to control or filter the target computing task allocated to the target task queue, load balancing between computing tasks can be further promoted.
[0031] In one embodiment, the processor 11 can execute the aforementioned computing tasks and the selection of task queues by using the software middle layer 21 in combination with specific rules or algorithms. The relevant operation details have been described above and will not be repeated here.
[0032] In one embodiment, the processor 11 can record the task information, the queue information and the execution results of each computing task (i.e., the target computing task) through a management table. For example, the processor 11 can establish a first management table and a second management table. The processor 11 can record the task information and the queue information in the first management table. In addition, the processor 11 can record the execution results of each computing task (i.e., the target computing task) in the second management table. Thereby, during the period of allocating the target computing task, the processor 11 can query at least one of the first management table and the second management table to obtain the various required information. In addition, in one embodiment, the processor 11 can also update the information in the first management table based on the information in the second management table to update the latest usage status of each task queue to the first management table.
[0033] Figure 4 is a schematic diagram of a first management table and a second management table according to an embodiment of the present invention. Figure 4 , assuming that management table 41 is the first management table, and management table 42 is the second management table. Management table 41 can be used to record task information related to multiple computing tasks currently cached in the software middle layer 21. For example, for computing tasks 001, 002, and 003 currently cached in the software middle layer 21, management table 41 can record that the type of computing task 001 is "A", the type of computing task 002 is "B", and the type of computing task 003 is "C", and so on. In one embodiment, management table 41 can also record the time T(A) required for computing task 001 of type "A" to be executed, the time T(B) required for computing task 002 of type "B" to be executed, and the time T(C) required for computing task 003 of type "C" to be executed, and so on.
[0034] In addition, the management table 41 can also be used to record queue information related to multiple task queues currently configured. For example, the management table 41 can record that the total number of tasks to be executed stored in the task queue Q(1) is S(1), the total number of tasks to be executed stored in the task queue Q(2) is S(2), and the total number of tasks to be executed stored in the task queue Q(3) is S(3), and so on.
[0035] On the other hand, the management table 42 can be used to record the execution results of each assigned computing task. For example, after computing tasks 001, 002, and 003 are assigned to the target task queue, the information in the management table 42 can reflect that the current execution results of computing tasks 001, 002, and 003 are "completed", "executing", and "scheduled (i.e., not yet executed)", respectively.
[0036] In one embodiment, the first management table is also called a unified task queue table. In one embodiment, the second management table is also called a unified task execution structure table. In one embodiment, the information recording form of the first management table and the second management table and the type of information recorded can be adjusted according to practical needs (for example, increasing or decreasing the type of information recorded), and the present invention is not limited thereto, as long as it is conducive to the execution of the aforementioned allocation of computing tasks.
[0037] Please go back Figure 2 In one embodiment, the computing tasks 201(1)-201(n) may be provided by the computing model 101 to complete the computing indicated by the computing model 101. For example, the computing model 101 may generate a computing task 201(i) for a specific computing to be performed. Therefore, the computing task 201(i) may be used to complete the specific computing indicated by the computing model 101. In one embodiment, the processor 11 may cache the computing tasks 201(1)-201(n) provided by the computing model 101 sequentially or in parallel to the software middle layer 21 to wait for being assigned to the task queues 22(1)-22(m).
[0038] In one embodiment, the processor 11 can also establish a mapping relationship between the task queues 22 (1) ~ 22 (m) and the hardware queues 23 (1) ~ 23 (p) through the software middle layer 21. p can be any integer greater than 1. For example, this mapping relationship includes the mapping relationship between the task queue 22 (1) and the hardware queue 23 (1), the mapping relationship between the task queue 22 (j) and the hardware queue 23 (k), and the mapping relationship between the task queue 22 (m) and the hardware queue 23 (p), and so on. k is an integer between 1 and p. It should be noted that the total number of task queues 22 (1) ~ 22 (m) (i.e., m) may be the same as or different from the total number of hardware queues 23 (1) ~ 23 (p) (i.e., p), and the present invention is not limited thereto.
[0039] In one embodiment, the processor 11 can sequentially transmit the tasks to be executed in each task queue to the corresponding hardware queues in the hardware queues 23(1)-23(p) according to the mapping relationship, so as to wait for being executed. Figure 1 From another perspective, after allocating the target computing task to the target task queue, according to the mapping relationship, the processor 11 can further transmit the target computing task in the target task queue to at least one of the hardware queues 23(1)-23(p) (also referred to as the target hardware queue) to wait for being executed. Figure 1 In one embodiment, the behavior of sequentially transmitting the tasks to be executed in each task queue to the corresponding hardware queue in the hardware queues 23 (1) to 23 (p) may also be automatically executed without being controlled by the processor 11.
[0040] In one embodiment, Figure 1 The hardware device includes hardware execution units 24(1)~24(t). t can be any positive integer greater than 1. The hardware queues 23(1)~23(p) can be connected to the hardware execution units 24(1)~24(t) through a predetermined plurality of transmission channels. For example, the hardware queue 23(1) is connected to the hardware execution unit 24(1), the hardware queue 23(k) is connected to the hardware execution unit 24(s), and the hardware queue 23(p) is connected to the hardware execution unit 24(t), and so on. s is an integer between 1 and t.
[0041] In one embodiment, it is assumed that the computing task 201 (i) is assigned to the task queue 22 (j) through the software middle layer 21. In the task queue 22 (j), based on the first-in-first-out (FIFO) rule, the computing task 201 (i) can be further transmitted to the hardware queue 23 (k). Then, the hardware execution unit 24 (s) can execute the computing task 201 (i) in the hardware queue 23 (k) based on the first-in-first-out (FIFO) rule. In one embodiment, after the hardware execution unit 24 (s) completes the computing task 201 (i), the processor 11 can return the execution result of the hardware execution unit 24 (s) on the computing task 201 (i) to the computing model 101, so that the computing model 101 can perform subsequent operations.
[0042] Figure 5 is a flowchart of a task allocation method according to an embodiment of the present invention. Figure 5 In step S501, configure a software middle layer and multiple task queues. In step S502, obtain multiple computing tasks and cache the multiple computing tasks in the software middle layer. In step S503, obtain task information related to the multiple computing tasks, wherein the task information reflects the types of the multiple computing tasks. In step S504, obtain queue information related to the multiple task queues, wherein the queue information reflects the usage status of the multiple task queues. In step S505, according to the task information and the queue information, allocate at least one target computing task cached in the software middle layer to at least one target task queue among the multiple task queues.
[0043] In one embodiment, the usage status of the plurality of task queues may be related to the total number of tasks to be executed in each of the plurality of task queues.
[0044] In one embodiment, step S505 includes: preferentially allocating the at least one target computing task to the at least one target task queue that is relatively idle among the plurality of task queues.
[0045] In one embodiment, step S505 includes: comparing the usage status of the plurality of task queues according to the queue information; and determining the at least one target task queue from the plurality of task queues according to the comparison result of the usage status.
[0046] In one embodiment, step S505 includes: obtaining execution time information of a first target computing task among the at least one target computing task based on the task information, wherein the execution time information reflects the time required for the first target computing task to be fully executed; and allocating the first target computing task to a first target task queue among the at least one target task queue based on the execution time information and the queue information.
[0047] In one embodiment, the plurality of computing tasks are provided by a computing model to complete the computing indicated by the computing model.
[0048] In one embodiment, the task allocation method also includes: establishing a mapping relationship between the multiple task queues and the multiple hardware queues through the software middle layer; and according to the mapping relationship, transmitting the at least one target computing task located in the at least one target task queue to at least one target hardware queue in the multiple hardware queues to wait for execution by the hardware device.
[0049] In one embodiment, the task allocation method also includes: establishing a first management table and a second management table; recording the task information and the queue information in the first management table; and after the at least one target computing task is executed, recording the execution result of the at least one target computing task in the second management table.
[0050] In summary, the task allocation method and task allocation device proposed in the embodiment of the present invention can properly allocate computing tasks to multiple task queues through an additionally set software middle layer to solve the technical problem that users (or front-end applications) are unable to schedule and manage the back-end hardware queues (or hardware execution units) in the traditional way. In addition, by executing load balancing between multiple task pairs separately, executing load balancing between multiple computing tasks separately, or executing load balancing between task pairs and load balancing between computing tasks simultaneously, the overall operating performance of the system can also be significantly improved.
[0051] However, Figure 5 The steps in the above are described in detail, so I will not repeat them here. It is worth noting that Figure 5 Each step in the above process can be implemented as multiple program codes or circuits, and the present invention is not limited thereto. Figure 5 The method can be used in conjunction with the above exemplary embodiments or can be used alone, and the present invention is not limited thereto.
[0052] Finally, 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 aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A task allocation method, characterized in that: include: Configure the software middle layer and multiple task queues; Acquire multiple computing tasks and cache the multiple computing tasks in the software middle layer; Acquire task information related to the plurality of computing tasks, wherein the task information reflects types of the plurality of computing tasks; Acquire queue information related to the multiple task queues, wherein the queue information reflects usage status of the multiple task queues; Allocating at least one target computing task cached in the software middle layer to at least one target task queue among the plurality of task queues according to the task information and the queue information; Establishing a mapping relationship between the plurality of task queues and the plurality of hardware queues through the software middle layer; According to the mapping relationship, the at least one target computing task in the at least one target task queue is transmitted to at least one target hardware queue in the plurality of hardware queues to wait for execution by a hardware device; and In response to the hardware execution unit of the hardware device completing the at least one target computing task, transmitting the execution result of the at least one target computing task by the hardware execution unit back to the computing model; Wherein, the software middle layer includes a management module, and the configuration software middle layer and multiple task queues include: Configuring the software middle layer and the plurality of task queues by a processor; The step of caching the plurality of computing tasks in the software middle layer includes: caching the plurality of computing tasks in the software middle layer through the processor; The acquiring of task information related to the plurality of computing tasks includes: The plurality of computing tasks are analyzed by the software middle layer to obtain task information related to the plurality of computing tasks. 2 . The task allocation method according to claim 1 , wherein the usage status of the plurality of task queues is related to the total number of tasks to be executed in each of the plurality of task queues.
3. The task allocation method according to claim 1, wherein the step of allocating the at least one target computing task cached in the software middle layer to the at least one target task queue among the plurality of task queues according to the task information and the queue information comprises: The at least one target computing task is preferentially allocated to the at least one target task queue that is relatively idle among the plurality of task queues.
4. The task allocation method according to claim 1, wherein the step of allocating the at least one target computing task cached in the software middle layer to the at least one target task queue among the plurality of task queues according to the task information and the queue information comprises: Comparing the usage status of the multiple task queues according to the queue information; as well as The at least one target task queue is determined from the plurality of task queues according to the comparison result of the usage status.
5. The task allocation method according to claim 1, wherein the step of allocating the at least one target computing task cached in the software middle layer to the at least one target task queue among the plurality of task queues according to the task information and the queue information comprises: Acquire execution time information of a first target computing task in the at least one target computing task according to the task information, wherein the execution time information reflects the time required for the first target computing task to be completely executed; as well as The first target computing task is allocated to a first target task queue of the at least one target task queue according to the execution time information and the queue information. 6 . The task allocation method according to claim 1 , wherein the plurality of computing tasks are provided by a computing model to complete the computing indicated by the computing model.
7. The task allocation method according to claim 1, further comprising: Establishing a first management table and a second management table; Recording the task information and the queue information in the first management table; as well as After the at least one target computing task is executed, the execution result of the at least one target computing task is recorded in the second management table.
8. A task allocation device, characterized in that: include: Storage circuit; as well as A processor connected to the storage circuit and configured to: Configure the software middle layer and multiple task queues; Acquire multiple computing tasks and cache the multiple computing tasks in the software middle layer; Acquire task information related to the plurality of computing tasks, wherein the task information reflects types of the plurality of computing tasks; Acquire queue information related to the plurality of task queues, wherein the queue information reflects usage status of the plurality of task queues; and Allocating at least one target computing task cached in the software middle layer to at least one target task queue among the plurality of task queues according to the task information and the queue information; The task allocation device also includes: a hardware device connected to the processor, and The processor is also used to: Establishing a mapping relationship between the plurality of task queues and the plurality of hardware queues through the software middle layer; According to the mapping relationship, the at least one target computing task in the at least one target task queue is transmitted to at least one target hardware queue in the plurality of hardware queues to wait for execution by the hardware device; and In response to the hardware execution unit of the hardware device completing the at least one target computing task, transmitting the execution result of the at least one target computing task by the hardware execution unit back to the computing model; Wherein, the software middle layer includes a management module, and the configuration software middle layer and multiple task queues include: Configuring the software middle layer and the plurality of task queues by the processor; The step of caching the plurality of computing tasks in the software middle layer includes: caching the plurality of computing tasks in the software middle layer through the processor; The acquiring of task information related to the plurality of computing tasks includes: The plurality of computing tasks are analyzed by the software middle layer to obtain task information related to the plurality of computing tasks. 9 . The task allocation device according to claim 8 , wherein the usage status of the plurality of task queues is related to the total number of tasks to be executed in each of the plurality of task queues.
10. The task allocation device according to claim 8, wherein the step of allocating the at least one target computing task cached in the software middle layer to the at least one target task queue among the plurality of task queues according to the task information and the queue information comprises: The at least one target computing task is preferentially allocated to the at least one target task queue that is relatively idle among the plurality of task queues.
11. The task allocation device according to claim 8, wherein the step of allocating the at least one target computing task cached in the software middle layer to the at least one target task queue among the plurality of task queues according to the task information and the queue information comprises: Comparing the usage status of the multiple task queues according to the queue information; as well as The at least one target task queue is determined from the plurality of task queues according to the comparison result of the usage status.
12. The task allocation device according to claim 8, wherein the step of allocating the at least one target computing task cached in the software middle layer to the at least one target task queue among the plurality of task queues according to the task information and the queue information comprises: Acquire execution time information of a first target computing task in the at least one target computing task according to the task information, wherein the execution time information reflects the time required for the first target computing task to be completely executed; as well as The first target computing task is allocated to a first target task queue of the at least one target task queue according to the execution time information and the queue information. 13 . The task allocation device according to claim 8 , wherein the storage circuit is used to store a computing model, and the plurality of computing tasks are provided by the computing model to complete the computing indicated by the computing model.
14. The task allocation device according to claim 8, wherein the processor is further configured to: Establishing a first management table and a second management table; recording the task information and the queue information in the first management table; and After the at least one target computing task is executed, the execution result of the at least one target computing task is recorded in the second management table.
Citation Information
Patent Citations
Task processing method and device
CN113327053A
Task management method and related device
CN113986511A
Artificial intelligence-based task scheduling method and related equipment
CN115292016A
Performance bottleneck detection method and device of hardware storage equipment and computing equipment
CN117421167A
Cited By
Open source platform task matching method based on developer behavior map and double-layer filtering
CN121658534A
Open source platform task matching method based on developer behavior graph and double-layer filtering
CN121658534B