Multi-node multi-task scheduling evaluation method and device
By creating a task queue and performing initialization, determining the pre-execution task set and predecessor task verification, the multi-node multi-task scheduling evaluation is optimized, which solves the shortcomings of existing algorithms in terms of computational efficiency and scalability, and achieves efficient task scheduling evaluation.
Patent Information
- Application Number
- CN202511164505.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-20
- Publication Date
- 2025-12-16
AI Technical Summary
The existing Floyd and Dijkstra algorithms suffer from low computational efficiency and insufficient scalability in multi-node, multi-task scheduling evaluation, making it difficult to meet the high-efficiency evaluation requirements in large-scale parallel computing and cloud computing environments.
By creating a task queue, performing initialization processing, determining the set of tasks to be executed, verifying the predecessor tasks, updating the task status values to generate an executable task set, and optimizing the task scheduling and evaluation process.
It improves the efficiency of task scheduling evaluation, solves the problem of low evaluation efficiency in task scheduling of heterogeneous computing units, and improves the efficiency of task scheduling space exploration.
Smart Images

Figure CN121144153A_ABST
Abstract
Description
Technical Field
[0001] The embodiments disclosed herein relate to the field of computer technology, specifically to a multi-node, multi-task scheduling and evaluation method and apparatus. Background Technology
[0002] Multi-node, multi-task scheduling evaluation is a technique for evaluating the scheduling of multiple nodes and multiple tasks. Currently, the common approach for scheduling multiple nodes and multiple tasks is to use the Floyd algorithm and the Dijkstra algorithm for multi-node, multi-task scheduling evaluation.
[0003] However, when using the above method to schedule and evaluate multiple nodes and multiple tasks, the following technical problems often arise:
[0004] The Floyd algorithm, being a sequential algorithm, has significant limitations in handling multi-task, multi-operator applications, such as large-scale parallel computing and task scheduling in cloud computing environments. It struggles to meet the demands for efficient evaluation. When processing multiple tasks, it requires evaluating each task sequentially, resulting in low computational efficiency and high time complexity, making it ill-suited for situations with increasing task numbers and complexity. While Dijkstra's algorithm excels at finding single-source shortest paths, it also suffers from insufficient computational efficiency and scalability for multi-source, multi-task scheduling and evaluation. Summary of the Invention
[0005] The summary portion of this disclosure is intended to provide a brief overview of the concepts, which will be described in detail in the detailed description portion. This summary portion is not intended to identify key or essential features of the claimed technical solutions, nor is it intended to limit the scope of the claimed technical solutions.
[0006] Some embodiments of this disclosure propose a multi-node, multi-task scheduling evaluation method and apparatus to solve the technical problems mentioned in the background section above.
[0007] In a first aspect, some embodiments of this disclosure provide a multi-node, multi-task scheduling evaluation method. The method includes: creating a task queue, the task queue including multiple computing units, each computing unit including a task and a task execution time; initializing the task queue to generate an initial task queue set; and for the initial task queue set, performing the following processing steps: determining a pre-execution task set based on the initial task queue set; generating a remaining pre-execution task set based on the pre-execution task set; performing a predecessor task check on the remaining pre-execution task set to generate a predecessor task check result, wherein the check result can characterize a predecessor task completion result and a predecessor task incomplete result; in response to determining that the predecessor task check result characterizes a predecessor task completion result, updating the state value of the remaining pre-execution task set to a preset first state value, and determining the remaining pre-execution task set as an executable task set, and continuing to perform the above processing steps.
[0008] Secondly, some embodiments of this disclosure provide a multi-node, multi-task scheduling and evaluation apparatus. The apparatus includes: a creation unit configured to create a task queue, the task queue including multiple computing units, each computing unit including a task and a task execution time; a processing unit configured to initialize the task queue to generate an initialized task queue set; and an execution unit configured to perform the following processing steps on the initialized task queue set: determining a pre-execution task set based on the initialized task queue set; generating a remaining pre-execution task set based on the pre-execution task set; performing a predecessor task check on the remaining pre-execution task set to generate a predecessor task check result, wherein the check result can characterize a predecessor task completion result and a predecessor task incomplete result; in response to determining that the predecessor task check result characterizes a predecessor task completion result, updating the state value of the remaining pre-execution task set to a preset first state value, and determining the remaining pre-execution task set as an executable task set, and continuing to execute the above processing steps.
[0009] Thirdly, some embodiments of this disclosure provide an electronic device, including: one or more processors; and a storage device having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation of the first aspect above.
[0010] Fourthly, some embodiments of this disclosure provide a computer-readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method described in any of the implementations of the first aspect above.
[0011] The above embodiments of this disclosure have the following beneficial effects: Specifically, the multi-node, multi-task scheduling evaluation method of some embodiments of this disclosure firstly creates a task queue, which includes multiple computing units, each computing unit including a task and a task execution time. Then, the task queue is initialized to generate an initialized task queue set. Afterwards, for the initialized task queue set, the following processing steps are performed: a pre-execution task set is determined based on the initialized task queue set; a remaining pre-execution task set is generated based on the pre-execution task set. A predecessor task check is performed on the remaining pre-execution task set to generate a predecessor task check result, wherein the check result can characterize the predecessor task completion result and the predecessor task incomplete result. Finally, in response to determining that the predecessor task check result characterizes the predecessor task completion result, the state value of the remaining pre-execution task set is updated to a preset first state value, and the remaining pre-execution task set is used as an executable task set, and the above processing steps continue to be executed. Therefore, the problem of low evaluation efficiency in heterogeneous computing unit task scheduling is solved, and the efficiency of task scheduling space exploration is improved. Attached Figure Description
[0012] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and elements are not necessarily drawn to scale.
[0013] Figure 1 This is a flowchart of some embodiments of the multi-node multi-task scheduling evaluation method according to the present disclosure;
[0014] Figure 2 These are schematic diagrams of the structure of some embodiments of the multi-node multi-task scheduling and evaluation device according to the present disclosure;
[0015] Figure 3 This is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure;
[0016] Figure 4 It is a task graph relationship data structure diagram of the multi-node multi-task scheduling and evaluation device according to the present disclosure. Detailed Implementation
[0017] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0018] It should also be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings. Unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other.
[0019] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0020] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0021] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0022] This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.
[0023] Figure 1 A flowchart 100 is shown, illustrating some embodiments of a multi-node, multi-task scheduling evaluation method according to the present disclosure. This multi-node, multi-task scheduling evaluation method includes the following steps:
[0024] Step 101: Create a task queue.
[0025] In some embodiments, the execution entity (e.g., a computing device) of the multi-node multi-task scheduling evaluation method can create a task queue, which includes multiple computing units, and the computing units among the multiple computing units include tasks and task execution times.
[0026] Here, the task queue mentioned above can refer to one created using a task dependency matrix, a task allocation scheme, and an execution time matrix. The task dependency matrix determines the order of tasks. The task allocation scheme determines which computing unit each task is assigned to. The execution time matrix determines the runtime of each task on different computing units. For example, the task queue might include 9 tasks and 3 computing units, numbered 0, 1, and 2. The task dependency matrix is... The above execution time matrix is as follows: The above task allocation scheme is as follows: The allocation scheme assigns tasks 1 through 9 to computing units 0, 1, 2, 0, 2, 1, 1, 1, 2, respectively. The task queue is: [Task 0 assigned to unit 0, execution time 10 seconds; Task 1 assigned to unit 1, execution time 10 seconds; Task 2 assigned to unit 2, execution time 6 seconds; Task 3 assigned to unit 0, execution time 40 seconds; Task 4 assigned to unit 2, execution time 5 seconds; Task 5 assigned to unit 1, execution time 20 seconds; Task 6 assigned to unit 1, execution time 30 seconds; Task 7 assigned to unit 1, execution time 40 seconds; Task 8 assigned to unit 2, execution time 10 seconds].
[0027] Step 102: Initialize the above task queue to generate an initial task queue set.
[0028] In some embodiments, the execution entity may initialize the task queue to generate an initialization task queue set.
[0029] Optionally, the aforementioned execution entity can initialize the task queue using the following steps to generate an initialization task queue set:
[0030] The first step is to initialize the queue for each of the multiple computing units included in the task queue according to the task allocation scheme, so as to generate an initial computing unit queue and obtain an initial computing unit queue set.
[0031] Here, the initialization unit queue set is Que=[[[0,10],[3,40]],[[1,10],[5,20],[6,30],[7,40]],[[2,6],[4,5],[8,10]]].
[0032] As an example, the aforementioned execution entity can merge identical computing units according to a task allocation scheme to obtain a merged unit set. Then, according to the merged unit set, each computing unit in the multiple computing units included in the task queue is rearranged to generate an initialization computing unit queue, resulting in an initialization computing unit queue set.
[0033] The second step is to initialize the task execution time of the above-mentioned initialization calculation unit queue set to generate a time-initialized task queue set.
[0034] As an example, the aforementioned execution entity can set the task execution time of the aforementioned initialization computation unit queue set to zero to generate an initial task execution time, which serves as the time-initialized task queue set. The time-initialized task queue set can be Ti = [0, 0, 0].
[0035] The third step is to initialize the task status of the above-mentioned time-initialized task queue set to generate an initialized task queue set.
[0036] As an example, the aforementioned executing entity can set the task status of the first task in the aforementioned time initialization task queue set to 1, and set the task status of all other time initialization task queues in the time initialization task queue set to 0, thus obtaining the initialization task queue set. The initialization task queue set can refer to Stat=[1,0,0,0,0,0,0,0,0,0].
[0037] Step 103: For the above-mentioned initialized task queue set, perform the following processing steps:
[0038] Step 1031: Determine the set of tasks to be executed based on the initial task queue set described above.
[0039] In some embodiments, the execution entity may determine the set of tasks to be executed based on the initial task queue set.
[0040] Optionally, the aforementioned execution entity can determine the set of tasks to be executed based on the aforementioned initialized task queue set through the following steps:
[0041] The first step is to identify at least one initialization task queue with a preset first state value as an executable task set.
[0042] Here, the aforementioned preset first state value is a pre-set value of 1. The aforementioned executable task set consists of executable tasks. The aforementioned executable task set has no logical preceding tasks.
[0043] The second step is to determine the heterogeneous execution units and the queue of tasks to be executed in the above-mentioned initial task queue set as the queue head task set.
[0044] Here, the queue head task set is the task currently ranked first in each execution unit, and the queue head task set is a task without a physical predecessor task.
[0045] As an example, the aforementioned execution entity can extract the head element of the queue of all heterogeneous execution units and tasks to be executed, as the queue head task set.
[0046] The third step is to determine the pre-execution task set by the intersection of the above executable task set and the above queue head task set.
[0047] Here, the aforementioned pre-execution task set refers to tasks that can be executed immediately.
[0048] Step 1032: Generate the remaining pre-task set based on the above pre-execution task set.
[0049] In some embodiments, the aforementioned execution entity may generate a remaining set of pre-execution tasks based on the aforementioned set of pre-execution tasks.
[0050] Optionally, the aforementioned executing entity can generate a remaining pre-task set based on the aforementioned pre-execution task set through the following steps:
[0051] The first step is to add up the running times of each pre-execution task in the above pre-execution task set to obtain the maximum running time.
[0052] The second step is to update the maximum runtime to the pre-execution task set to obtain the updated pre-execution task set.
[0053] As an example, the aforementioned execution entity can determine the maximum running time as the running time of each pre-execution task in the aforementioned pre-execution task set, thereby obtaining the updated pre-execution task set.
[0054] The third step is to update the state values of the pre-execution task set that were previously set to the first state value to the second state value, thereby obtaining the remaining pre-execution task set.
[0055] Here, the aforementioned preset second state value is a state value that is pre-set to be 2.
[0056] As an example, the aforementioned execution entity can replace the state value of the preset first state value in the updated pre-execution task set with a preset second state value to obtain the remaining pre-execution task set.
[0057] Step 1033: Perform a predecessor task check on the remaining pre-task set to generate the predecessor task check results.
[0058] In some embodiments, the execution entity may perform a predecessor task check on the remaining pre-task set to generate a predecessor task check result, wherein the check result may characterize the predecessor task completion result and the predecessor task incomplete result.
[0059] As an example, the aforementioned execution entity can utilize a task graph relational data structure to detect whether all preceding tasks of the subsequent tasks of the remaining pre-tasks in the remaining pre-task set have been executed. If all tasks have been executed, its task status value is updated to 1; otherwise, it remains unchanged. The task graph relational data structure is as follows: Figure 4 As shown.
[0060] Step 1034: In response to determining that the aforementioned precursor task verification result represents the precursor task completion result, the state value of the aforementioned remaining pre-task set is updated to a preset first state value, and the aforementioned remaining pre-task set is determined as an executable task set, and the aforementioned processing steps are continued.
[0061] In some embodiments, the execution entity may, in response to determining that the preceding task verification result represents the preceding task completion result, update the state value of the remaining pre-task set to a preset first state value, and determine the remaining pre-task set as an executable task set, and continue to execute the above processing steps.
[0062] As an example, the aforementioned executing entity may, in response to determining that the aforementioned predecessor task verification result represents the predecessor task completion result, replace the state value of the aforementioned remaining pre-task set with a preset first state value.
[0063] Following "step 1034" above, the method further includes:
[0064] In response to determining that the state value of each remaining pre-task in the aforementioned remaining pre-task set is a preset second state value, the task execution time of each remaining pre-task in the aforementioned remaining pre-task set is determined as the total execution time.
[0065] As an example, the aforementioned execution entity may, in response to determining that the state value of each remaining pre-task in the aforementioned remaining pre-task set is a preset second state value, add the task execution times of each remaining pre-task in the aforementioned remaining pre-task set to obtain the total execution time. For example, the total execution time could refer to 140 milliseconds. The total execution time characterizes the overall execution time of the scheduling scheme.
[0066] Further reference Figure 2 As an implementation of the methods shown in the above figures, this disclosure provides some embodiments of a multi-node, multi-task scheduling and evaluation device. These device embodiments are similar to... Figure 1 Corresponding to the method embodiments shown, this multi-node multi-task scheduling evaluation device can be specifically applied to various electronic devices.
[0067] like Figure 2As shown, a multi-node, multi-task scheduling and evaluation apparatus 200 in some embodiments includes: a creation unit 201, a processing unit 202, and an execution unit 203. The creation unit 201 is configured to create a task queue, which includes multiple computing units, each computing unit including a task and a task execution time. The processing unit 202 is configured to initialize the task queue to generate an initialized task queue set. The execution unit 203 is configured to perform the following processing steps on the initialized task queue set: determine a pre-execution task set based on the initialized task queue set; generate a remaining pre-execution task set based on the pre-execution task set; perform a predecessor task check on the remaining pre-execution task set to generate a predecessor task check result, wherein the check result can represent the predecessor task completion result or the predecessor task incomplete result; in response to determining that the predecessor task check result represents the predecessor task completion result, update the state value of the remaining pre-execution task set to a preset first state value, and determine the remaining pre-execution task set as an executable task set, and continue executing the above processing steps.
[0068] It is understandable that the units described in the multi-node multi-task scheduling and evaluation device 200 are related to the reference. Figure 1 The steps in the described method correspond accordingly. Therefore, the operations, features, and beneficial effects described above for the method also apply to the multi-node multi-task scheduling evaluation device 200 and the units contained therein, and will not be repeated here.
[0069] The following is for reference. Figure 3 It illustrates a schematic diagram of the structure of an electronic device (e.g., a computing device) suitable for implementing some embodiments of the present disclosure. Figure 3 The electronic device shown is merely an example and should not be construed as limiting the functionality or scope of the embodiments of this disclosure. Figure 3 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The memory may include a non-volatile storage medium and internal memory. The non-volatile storage medium may store an operating system and a computer program. The computer program includes program instructions that, when executed, cause the processor to perform any of the methods described above. The processor provides computational and control capabilities to support the operation of the entire computer device. The internal memory provides an environment for the execution of the computer program in the non-volatile storage medium; when executed by the processor, the computer program causes the processor to perform any of the methods described above. The network interface is used for network communication, such as sending assigned tasks. Those skilled in the art will understand that... Figure 3The structure shown is merely a block diagram of a portion of the structure related to the present disclosure and does not constitute a limitation on the computer device to which the present disclosure is applied. A specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0070] It should be understood that the processor can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among these, a general-purpose processor can be a microprocessor or any conventional processor.
[0071] In one embodiment, the processor is configured to run a computer program stored in a memory to perform the following steps: creating a task queue, the task queue including multiple computing units, each computing unit including a task and a task execution time; initializing the task queue to generate an initial task queue set; and for the initial task queue set, performing the following processing steps: determining a pre-execution task set based on the initial task queue set; generating a remaining pre-execution task set based on the pre-execution task set; performing a predecessor task check on the remaining pre-execution task set to generate a predecessor task check result, wherein the check result can characterize the predecessor task completion result and the predecessor task incomplete result; in response to determining that the predecessor task check result characterizes the predecessor task completion result, updating the state value of the remaining pre-execution task set to a preset first state value, and determining the remaining pre-execution task set as an executable task set, and continuing to perform the above processing steps.
[0072] This disclosure also provides a computer-readable storage medium storing a computer program, the computer program including program instructions, and the method implemented when the program instructions are executed can refer to the various embodiments of the multi-node multi-task scheduling and evaluation method of this disclosure.
[0073] The aforementioned computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiments, such as the hard disk or memory of the computer device. Alternatively, the aforementioned computer-readable storage medium may be an external storage device of the computer device, such as a plug-in hard disk, SmartMedia Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the computer device.
[0074] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0075] The above description is merely a selection of preferred embodiments of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in the embodiments of this disclosure.
Claims
1. A multi-node, multi-task scheduling and evaluation method, characterized in that, include: Create a task queue, which includes multiple computing units, and each computing unit includes a task and a task execution time. The task queue is initialized to generate an initial task queue set; For the initialization task queue set, the following processing steps are performed: Based on the initialized task queue set, determine the set of tasks to be executed; Based on the pre-execution task set, generate the remaining pre-execution task set; The remaining pre-task set is subjected to precursor task verification to generate precursor task verification results, wherein the verification results can characterize the result of precursor task completion and the result of precursor task failure. In response to determining that the predecessor task verification result represents the predecessor task completion result, the state value of the remaining pre-task set is updated to a preset first state value, and the remaining pre-task set is used as an executable task set to continue executing the processing steps.
2. The method according to claim 1, characterized in that, The method further includes: In response to determining that the state value of each remaining pre-task in the remaining pre-task set is a preset second state value, the task execution time of each remaining pre-task in the remaining pre-task set is determined as the total execution time.
3. The method according to claim 1, characterized in that, The initialization process for the task queue to generate an initialization task queue set includes: According to the task allocation scheme, each computing unit among the multiple computing units included in the task queue is initialized to generate an initial computing unit queue, thus obtaining an initial computing unit queue set. The initialization computing unit queue set is initialized with task execution time to generate a time-initialized task queue set; The time-initialized task queue set is initialized with task status to generate an initialized task queue set.
4. The method according to claim 1, characterized in that, The step of determining the pre-execution task set based on the initialized task queue set includes: At least one initialization task queue in the initialization task queue set whose state value is a preset first state value is determined as an executable task set; The heterogeneous execution units and queues of tasks to be executed in the initialization task queue set are defined as the queue head task set; The intersection of the executable task set and the queue head task set is determined as the pre-execution task set.
5. The method according to claim 1, characterized in that, The step of generating a remaining pre-task set based on the pre-execution task set includes: The running times of each pre-execution task in the pre-execution task set are added together to obtain the maximum running time; The maximum runtime is updated to the pre-execution task set to obtain the updated pre-execution task set; The state values of the updated pre-execution task set that are preset to the first state value are updated to preset to the second state value, thus obtaining the remaining pre-execution task set.
6. A multi-node, multi-task scheduling and evaluation device, characterized in that, include: A creation unit is configured to create a task queue, the task queue including multiple computing units, and the computing units among the multiple computing units include tasks and task execution times; The processing unit is configured to perform initialization processing on the task queue to generate an initialization task queue set; The execution unit is configured to perform the following processing steps for the initialization task queue set: determine a set of tasks to be executed based on the initialization task queue set; Based on the pre-execution task set, generate the remaining pre-execution task set; The remaining pre-task set is subjected to precursor task verification to generate precursor task verification results, wherein the verification results can characterize the result of precursor task completion and the result of precursor task failure. In response to determining that the predecessor task verification result represents the predecessor task completion result, the state value of the remaining pre-task set is updated to a preset first state value, and the remaining pre-task set is determined as an executable task set, and the processing steps continue to be executed.
7. An electronic device, characterized in that, include: One or more processors; A storage device on which one or more programs are stored; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1 to 5.
8. A computer-readable medium, characterized in that, It stores a computer program thereon, wherein the computer program, when executed by a processor, implements the method as described in any one of claims 1 to 5.