Distributed task scheduling method

By selecting and evaluating computing nodes in the industrial IoT environment and allocating tasks to improve efficiency, the difficulty of task scheduling and resource constraints in the IoT environment is solved, and efficient task execution and energy consumption savings are achieved.

CN118656187APending Publication Date: 2024-09-17FURINA (NINGBO) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410788076.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-18
Publication Date
2024-09-17

AI Technical Summary

Technical Problem

Task scheduling in the industrial Internet of Things environment is difficult, and real-time and resource constraints need to be considered. Existing technology is difficult to effectively handle distributed task scheduling, especially when equipment processing capabilities and energy reserves are limited.

Method used

By selecting initial tasks and subtasks from the task set, evaluating the conditions of computing nodes, selecting suitable computing nodes for task allocation, and transferring tasks between nodes to improve efficiency, a distributed task scheduling method is adopted, including initial task selection, calculation Node selection, evaluation and task allocation to ensure tasks are processed according to deadlines.

Benefits of technology

It improves task execution efficiency, saves equipment energy consumption, adapts to the real-time needs of the industrial Internet of Things environment, optimizes task allocation and processing, and reduces ineffective processing and energy consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118656187A
    Figure CN118656187A
Patent Text Reader

Abstract

The invention provides a distributed task scheduling method, a distributed task scheduling device and a corresponding computer program product, which are based on an industrial internet-of-things environment and real-time requirements of the industrial internet-of-things environment on tasks and consider resource limitation conditions in distributed processing nodes at the same time. The task is divided into the initial task which does not depend on other tasks and the sub-task which depends on other tasks, and the execution efficiency of the task can be improved and the energy consumption of equipment can be saved by selecting a proper computing node or leader node and respectively scheduling the two tasks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The technical solution of the present invention relates to the computer field, and specifically to the technical field of distributed task scheduling. Background Art

[0002] The development of sensor technology and corresponding Internet of Things technology provides reliable and effective support for the Industrial Internet of Things. With the use of Industrial Internet of Things technology, the connection between each machine, each production line and each production stage in the factory is becoming closer and closer, which generates a large amount of data that needs to be processed, as well as various types of tasks that come with data processing. The Industrial Internet of Things has brought direct benefits to production-oriented enterprises. Through a variety of sensors, the equipment itself, production factors and real-time production conditions are monitored, which helps to ensure product quality, reduce the occurrence of production line failures, and speed up the response and processing speed when facing various emergencies. The Industrial Internet of Things has the characteristics of being distributed. Whether it is the distributed arrangement of sensors or the dispersion of processing nodes with computing and management capabilities, the task scheduling processing in the Industrial Internet of Things environment is more difficult than the traditional centralized task processing; at the same time, compared with other commercial data processing systems or ordinary distributed environments, the Industrial Internet of Things emphasizes the real-time nature of data processing in order to meet the needs of rapid response to events; in addition, it should be considered that compared with the traditional distributed architecture, the processing capacity and energy reserve status of a single device in the Industrial Internet of Things environment may be greatly restricted. Summary of the invention

[0003] The present invention provides a distributed task scheduling method, characterized in that it comprises the following steps:

[0004] Select an initial task from the task set and put the initial task into the task queue, wherein the initial task is a task that has no dependency relationship with other tasks;

[0005] Selecting a suitable computing node from available computing nodes for running the initial task;

[0006] The selected computing node evaluates whether its own conditions can accept the initial task;

[0007] If the evaluation result is acceptable for operation, the computing node accepts the initial task and processes and calculates the initial task; if the evaluation result is unacceptable for operation, the computing node refuses to accept the initial task, and the leading node continues to select a suitable computing node from the remaining available computing nodes for the initial task to run.

[0008] The distributed task scheduling method may further include the following steps:

[0009] Selecting a completed initial task from the task set, and obtaining the task with the earliest deadline among its dependent tasks according to the task graph as a subtask;

[0010] Find a suitable computing node for the subtask and run the subtask on it;

[0011] Repeat the above steps of this claim.

[0012] The following steps may also be included before the step of "selecting an initial task from the task set and placing the initial task into the task queue, wherein the initial task is a task that has no dependency relationship with other tasks":

[0013] The acquired task is added to the task set. If the task set is full at this time, the task is added to the task waiting list.

[0014] The step "if the evaluation result is acceptable to run, the computing node accepts the initial task and processes and computes the initial task; if the evaluation result is unacceptable to run, the computing node refuses to accept the initial task, and the leader node continues to select a suitable computing node from the remaining available computing nodes for running the initial task" may also include the following steps:

[0015] When a suitable computing node cannot be selected from the remaining available computing nodes, or the initial task exceeds the deadline, the initial task is discarded and an exception log is recorded;

[0016] Or when a suitable computing node cannot be selected from the remaining available computing nodes within a preset number of times and the initial task has not exceeded the deadline, the initial task is added to the task waiting list;

[0017] Alternatively, when the difference between the earliest deadline of the initial task and the current time is less than or equal to a preset value, the initial task is added to the task waiting list.

[0018] The distributed task scheduling method may further include the following steps:

[0019] Obtain the task waiting list;

[0020] Sort the initial tasks in the task waiting list according to the earliest deadline;

[0021] Send at least one task with a higher ranking in the earliest deadline to another leader node, so that the other leader node processes the initial task according to the steps described in claim 1 and / or 2.

[0022] The step of "selecting a suitable computing node from available computing nodes for running the initial task" may also include the following steps:

[0023] Initialize the load index of all computing nodes to 0, where the load index indicates the number of tasks running on the computing node;

[0024] Counting the number of tasks running on each computing node, and assigning a value to the load index according to the number of tasks, where the load index of each computing node identifies the number of tasks being processed on the current computing node;

[0025] Counting the comprehensive utilization rate of each computing node, where the comprehensive utilization rate includes a weighted average of one or more of a node processor utilization rate, a memory utilization rate, and a network throughput utilization rate;

[0026] Pre-allocating the initial task to the computing node with the smallest load index and the lowest comprehensive utilization rate;

[0027] When there are multiple computing nodes with the smallest load index and the lowest comprehensive utilization rate, or when there are multiple computing nodes with load index and comprehensive utilization rate less than their respective thresholds, the computing node with the most routing paths is selected as the pre-allocated object of the initial task.

[0028] The step "the selected computing node evaluates whether its own conditions can accept the initial task" may also include the following steps:

[0029] Calculating the comprehensive utilization rate of the nodes after allocating the pre-allocated tasks to the computing nodes as the estimated comprehensive utilization rate;

[0030] evaluating whether the estimated comprehensive utilization rate is less than a comprehensive utilization rate threshold;

[0031] If the evaluation result is that the estimated comprehensive utilization rate is less than the comprehensive utilization rate threshold, accepting the allocation of the initial task to the computing node for processing;

[0032] If the evaluation result is that the estimated comprehensive utilization rate is greater than or equal to the comprehensive utilization rate threshold, the allocation of the initial task to the computing node for processing is rejected.

[0033] The step of "finding a suitable computing node for the subtask and running the subtask on it" may also include the following steps:

[0034] Pre-allocating the subtask to the same original computing node as the initial task on which it depends;

[0035] Evaluate whether the original computing node can accept the subtask;

[0036] If the evaluation result is acceptable for operation, the original computing node accepts the subtask and processes and calculates the subtask; if the evaluation result is unacceptable for operation, the original computing node refuses to accept the subtask, and the leader node continues to pre-allocate the subtask to a directly connected adjacent computing node with a communication distance hop count of 0 to the original computing node;

[0037] Evaluate whether the adjacent computing node can accept the subtask;

[0038] If the evaluation result is acceptable for operation, the neighboring computing node accepts the subtask and processes and calculates the subtask; if the evaluation result is unacceptable for operation, the neighboring computing node refuses to accept the subtask, and the leader node continues to pre-allocate the subtask to a computing node whose communication distance to the original computing node is N plus the number of hops (where N is an integer greater than or equal to 1);

[0039] Repeat the above steps of this claim until all subtasks are assigned, or are discarded due to exceeding the deadline and an exception log is recorded.

[0040] The step of "sending at least one task ranked higher in the earliest deadline to another leader node so that another leader node processes the initial task" may also include the following steps:

[0041] Periodically obtain tasks in the task set within each leader node domain, and calculate the urgency of each task, where the urgency of each task = r × (task deadline - current time) + (1 - r) × task execution frequency (where r is a constant between 0 and 1);

[0042] Calculate the average urgency of all tasks within each leader node.

[0043] The step of "sending at least one task ranked higher in the earliest deadline to another leader node so that another leader node processes the initial task" may also include the following steps:

[0044] Get the average value of task urgency in adjacent leader nodes;

[0045] The initial task is sent to the adjacent leader node with the largest average task urgency.

[0046] The present invention also provides a distributed task scheduling device, characterized in that it includes:

[0047] An initial task selection module is used to select an initial task from a task set and put the initial task into a task queue, wherein the initial task is a task that has no dependency relationship with other tasks;

[0048] A computing node selection module, used to select a suitable computing node from available computing nodes for running the initial task;

[0049] A computing node evaluation module is used to evaluate whether the selected computing node can accept the initial task;

[0050] The computing node execution module is used to make the computing node accept the initial task and process the calculation of the initial task when the evaluation result is acceptable for operation; when the evaluation result is unacceptable for operation, make the computing node refuse to accept the initial task, and the leader node continues to select a suitable computing node from the remaining available computing nodes for the initial task to run.

[0051] The present invention also provides a computer program product, characterized in that:

[0052] The computer program product is stored in a non-transitory computer-readable storage medium and includes machine-executable program instructions. When the machine-executable program instructions are executed in a device, the device is used to perform the task processing method described above.

[0053] The present invention is based on the industrial Internet of Things environment and its real-time requirements for tasks, and takes into account the resource limitations in distributed processing nodes. Tasks are divided into initial tasks that do not depend on other tasks and subtasks that depend on other tasks. By selecting suitable computing nodes or leader nodes and scheduling the two types of tasks separately, the execution efficiency of tasks can be improved and equipment energy consumption can be saved. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 The process of executing tasks for distributed task scheduling method. DETAILED DESCRIPTION

[0055] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the present embodiment will be fully and clearly described below in conjunction with the drawings in the embodiments of the present application.

[0056] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be described in detail and completely in conjunction with the accompanying drawings. Obviously, the described embodiments are some preferred embodiments of the technical solution of the present invention, rather than all embodiments. Based on the described embodiments of the technical solution of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work fall within the scope of the disclosure of the present invention.

[0057] Figure 1 The process of executing tasks in the distributed task scheduling method of the present invention includes steps S102 to S108:

[0058] S102: Selecting an initial task from a task set and placing the initial task into a task queue, wherein the initial task is a task that has no dependency relationship with other tasks, and the no dependency relationship means that the execution of a task does not need to be premised on the execution results of other tasks.

[0059] In one embodiment, when multiple tasks all meet the requirement of being independent and non-dependent tasks, the task with the earliest task deadline is selected as the initial task, where the task deadline refers to the latest time allowed for the task to be completed.

[0060] S104: Select a suitable computing node from available computing nodes for running the initial task.

[0061] S106: The selected computing node evaluates whether its own conditions can accept the initial task.

[0062] In one embodiment, the calculation of the evaluation operation can be performed at a computing node, but considering processing efficiency and resource constraints, it can also be performed at a leader node.

[0063] S108: If the evaluation result is acceptable for operation, the computing node accepts the initial task and processes and calculates the initial task; if the evaluation result is unacceptable for operation, the computing node refuses to accept the initial task, and the leading node continues to select a suitable computing node from the remaining available computing nodes for the initial task to run.

[0064] In one embodiment, the selection operation described in step S108 may be limited in number, that is, the selection operation should be less than or equal to a preset number of times. It is known to those skilled in the art that the computing node selection operation itself needs to occupy node resources. If the number of operations for selecting a suitable computing node for a task is not limited, too many node resources will be wasted on node selection rather than task processing itself.

[0065] Regarding the value of the preset number of times, those skilled in the art can set it dynamically or statically based on experience or in other ways, and the present invention does not make any specific limitations here; unless otherwise specified, the values ​​of the preset values ​​and thresholds of the present invention are not particularly limited, and the values ​​of the specific preset values ​​and thresholds cannot constitute a limitation on the technical solution of the present invention.

[0066] The above embodiment first considers how to allocate and run the initial task at the starting point in the task chain. After the initial task starts to execute, it is also necessary to consider the execution mode of the subtasks having dependencies thereon, which specifically includes the following steps:

[0067] S110: Selecting a completed initial task from the task set, and obtaining the task with the earliest deadline among its dependent tasks according to the task graph as a subtask.

[0068] Here, the completed initial tasks are selected in the task set. This can be achieved by directly marking the initial tasks as completed in the task set after each initial task is completed, and the completed initial task information can also be obtained through logs. It is known to those skilled in the art that the dependent tasks of the initial tasks obtained here, in addition to meeting the earliest deadline condition for the purpose of priority processing, must also meet the condition that all other tasks on which the dependent tasks depend have been completed; obviously, before the completion of other dependent tasks, the dependent tasks cannot obtain the data and other resources required for operation.

[0069] S112: Find a suitable computing node for the subtask, and run the subtask on the node.

[0070] S114: Repeat steps S110 to S112.

[0071] Those skilled in the art will appreciate that the above steps S110 to S114 perform task scheduling for subtasks with dependencies, and the task scheduling process for the subtasks can be executed in parallel with the task scheduling process for the initial task in steps S102 to S108.

[0072] Before step S102, the following steps may also be included:

[0073] S101: adding the acquired task to the task set; if the task set is full at this time, adding the task to a task waiting list.

[0074] In one embodiment, the task set and the task queue can be set at the leader node; if resource conditions permit, they can also be set at the computing node, and in other cases, they can also be set on a storage device that can communicate with the leader node and / or computing node separately. Since the overall resources of the equipment are relatively limited in the industrial Internet of Things environment, the size of the task set is also limited; however, the number of real-time tasks generated by the system is huge, so the task set with limited space may not be able to carry all the generated tasks to be processed. These tasks that cannot be stored in the task set will be stored in the task waiting list for subsequent process processing.

[0075] In one embodiment, considering that in the actual application process, all computing nodes may be busy and thus unable to accept tasks, or the task has exceeded the deadline during the scheduling process, the above-mentioned distributed task scheduling method may further include the following steps after step S108:

[0076] S1091: When a suitable computing node cannot be selected from the remaining available computing nodes, or the initial task exceeds the deadline, the initial task is discarded and an exception log is recorded.

[0077] In one embodiment, when a suitable computing node cannot be assigned to the subtask for execution, the subtask may be discarded due to exceeding the deadline; in this case, other subtasks that depend on the execution result of the subtask will be discarded in cascade due to failure to obtain running data or failure to meet other running conditions. Before finding a suitable computing node for the subtask, it is possible to evaluate in advance whether the task on which the subtask depends is completed, that is, whether the subtask meets the running conditions; in this way, invalid computing node selection steps can be avoided, the system operation efficiency can be accelerated, and the energy consumption of invalid processing can be reduced.

[0078] In one embodiment, as a subsequent improvement to step S108 and a partial replacement for step S1091, the following steps may also be included:

[0079] S1092: When a suitable computing node cannot be selected from the remaining available computing nodes within a preset number of times and the initial task has not exceeded the deadline, the initial task is added to the task waiting list.

[0080] Meanwhile, if it is considered that the passage of time will lead to the approach of the deadline of each task, a partial replacement of the step S1092 may further include the following steps:

[0081] S1093: When the difference between the earliest deadline of the initial task and the current time is less than or equal to a preset value, the initial task is added to the task waiting list. For the value of the preset value, those skilled in the art can dynamically or statically set it based on experience or in other ways, and the present invention does not make any specific limitation here.

[0082] In this embodiment, the function of the task waiting list is further expanded to carry tasks that still cannot be effectively assigned to computing nodes after multiple selection operations, and also to carry tasks that are about to expire.

[0083] For tasks stored in the task waiting list, since the leader node or its subordinate computing nodes cannot meet the processing requirements of the initial tasks at this time, it is considered to transfer the initial tasks in the waiting list to different domains for processing. While the leader node is processing steps S102 to S114, the initial tasks that cannot be processed in time in the leader node domain are evacuated to the domains of other leader nodes. In this embodiment, the domain refers to the network structure composed of a leader node and its subordinate computing nodes, which specifically includes the following steps:

[0084] S202: Obtain the task waiting list.

[0085] S204: sorting the initial tasks in the task waiting list according to the earliest deadline, wherein sorting according to the earliest deadline refers to sorting according to the deadline from early to late.

[0086] S206: Send at least one task with a higher ranking in the earliest deadline to another leader node, so that the other leader node processes the initial task according to steps S102 to S114.

[0087] In one embodiment, the step S104 may further include the following steps:

[0088] S1041: Initialize the load index of all computing nodes to 0, where the load index indicates the number of tasks running on the computing node.

[0089] S1042: Count the number of tasks running on each computing node, and assign a value to the load index according to the number of tasks. At this time, the load index of each computing node identifies the number of tasks being processed on the current computing node.

[0090] S1043: Count the comprehensive utilization rate of each computing node, where the comprehensive utilization rate includes a weighted average of one or more of a node processor utilization rate, a memory utilization rate, and a network throughput utilization rate.

[0091] S1044: pre-allocate the initial task to the computing node with the smallest load index and the lowest comprehensive utilization rate.

[0092] In one embodiment, the node with the smallest weighted average value of the load index and the comprehensive utilization rate among each computing node may be selected as the pre-allocation object of the initial task.

[0093] The master-slave architecture formed by the management node and the computing node in the traditional design is generally tree-shaped and unidirectional, that is, the computing node can only communicate with its directly subordinate leader node, but cannot communicate with other computing nodes at the same level. In this embodiment, the computing nodes are designed as a flat architecture, which allows the computing nodes to communicate with each other. Through such an architectural design, task data can be transmitted more smoothly between nodes, which not only facilitates communication and reduces energy consumption, but also the intermediate calculation results of the task can be reused by different computing nodes, further improving the efficiency of task execution. This architectural design can also improve the overall scalability of the system. For example, the computing nodes can be heterogeneous to call different types of heterogeneous computing nodes for processing according to different task feature details; specifically, one of the computing nodes can be FPGA and the other computing node can be CPLD.

[0094] Based on the above architecture, further consideration is given to the fact that there may be multiple idle computing nodes in the real environment, and at this time, their load index and comprehensive utilization rate are both the lowest. Or when the load index and comprehensive utilization rate of the computing node are less than their respective thresholds, it can be considered that it has the candidate qualification to run the current initial task. At this time, the selection of computing nodes specifically includes the following steps:

[0095] S1045: When there are multiple computing nodes with the lowest load index and the lowest comprehensive utilization rate, or when there are multiple computing nodes with load index and comprehensive utilization rate less than their respective thresholds, select the computing node with the most routing paths as the pre-allocation object of the initial task.

[0096] The more routing paths a computing node has, the more paths any node can use to access the computing node, which can provide more available paths for routing data between nodes. In this way, while increasing the possibility of successful data transmission between nodes, it can also effectively reduce the communication overhead between nodes and save device energy consumption, which is particularly important in the industrial Internet of Things environment where device resource conditions and energy reserves are limited.

[0097] In one embodiment, the step S106 may further include the following steps:

[0098] S1061: Calculate the comprehensive utilization rate of the node after allocating the pre-allocated tasks to the computing node, as the estimated comprehensive utilization rate.

[0099] In one embodiment, the estimated comprehensive utilization rate is specifically: comprehensive utilization rate of the current computing node + estimated task processing time / (task deadline - current time). As can be seen from the above formula, the longer the estimated task processing time is, the greater the amount of computation required for the task; as the deadline approaches, more resources are needed to process the task, which also results in more and more resources being occupied, and vice versa.

[0100] In one embodiment, the task may be a periodic task, which is quite common in the industrial Internet of Things environment. In this case, the task execution cycle time can be used instead of the task deadline to calculate the comprehensive utilization rate. In this embodiment, the estimated comprehensive utilization rate is specifically: the comprehensive utilization rate of the current computing node + the estimated task processing time ÷ the task execution cycle time.

[0101] Those skilled in the art will appreciate that other methods may be used to calculate and estimate the resource usage of a computing node after a task is assigned to the computing node, and the present invention does not specifically limit this.

[0102] S1062: Evaluate whether the estimated comprehensive usage rate is less than a comprehensive usage rate threshold.

[0103] S1063: If the evaluation result is that the estimated comprehensive utilization rate is less than the comprehensive utilization rate threshold, the initial task is assigned to the computing node for processing.

[0104] S1064: If the evaluation result is that the estimated comprehensive utilization rate is greater than or equal to the comprehensive utilization rate threshold, then refuse to accept the allocation of the initial task to the computing node for processing.

[0105] The step S112 may further include the following steps:

[0106] S1121: pre-allocate the subtask to the same original computing node as the initial task on which it depends.

[0107] S1122: Evaluate whether the original computing node can accept the subtask.

[0108] In this embodiment, step S1122 can be performed with reference to step S106.

[0109] S1123: If the evaluation result is acceptable for operation, the original computing node accepts the subtask and processes and calculates the subtask; if the evaluation result is unacceptable for operation, the original computing node refuses to accept the subtask, and the leading node continues to pre-allocate the subtask to a directly connected adjacent computing node with a communication distance hop count of 0 to the original computing node.

[0110] S1124: Evaluate whether the adjacent computing node can accept the subtask.

[0111] S1125: If the evaluation result is acceptable for execution, the neighboring computing node accepts the subtask and processes and calculates the subtask; if the evaluation result is unacceptable for execution, the neighboring computing node refuses to accept the subtask, and the leading node continues to pre-allocate the subtask to a computing node that has a communication distance hop number with the original computing node plus N (where N is an integer greater than or equal to 1).

[0112] S1126: Repeat steps S1121 to S1125 until all subtasks are assigned or discarded due to exceeding the deadline and an exception log is recorded.

[0113] In this embodiment, by allocating subtasks with dependencies to computing nodes that are closer to or even the same as their initial tasks, the process and result data of the initial tasks can be obtained more quickly, while significantly reducing communication overhead and energy consumption on the device.

[0114] In one embodiment, the following steps may be further included before step S206:

[0115] S2051: Periodically obtain tasks from the task set in each leader node domain, and calculate the urgency of each task.

[0116] S2052: Calculate the average urgency of all tasks in each leader node.

[0117] The urgency of each task = r × (task deadline - current time) + (1 - r) × task execution frequency, where r is a constant between 0 and 1. For periodic tasks, the task execution frequency is the inverse of the period; while for non-periodic tasks, the task execution frequency is 0. From the above definition, it can be seen that the higher the task execution frequency and the earlier the task deadline, the smaller the value of the task urgency, indicating that the task urgency is higher. It is known to those skilled in the art that, for the task deadline, the smaller the value, the less time is left for the task execution; for the task execution frequency, the higher the task execution frequency, the more frequently the task is executed, so it can be considered to use the task execution results of the next cycle to replace the task execution results of the current cycle, and the impact of not completing the frequently executed tasks is relatively small; while for non-recurring tasks and non-periodic special tasks, missing an execution will cost more than missing a regular task, resulting in more serious losses.

[0118] In one embodiment, the task may be a product information recording task for a factory production line, or a production adaptability assessment task for production environment conditions based on the reported data of a temperature sensor or a specific gas concentration sensor; the product information recording task may include the quality and accuracy of the product, and the production adaptability assessment task may include that the production speed should be slowed down to ensure safety when the temperature of the production line is too high. In other embodiments, the task may also be a production adjustment task to adjust the types of products produced by the production line. Obviously, the product information recording task and the production adaptability assessment task have a short execution cycle and a high execution frequency. Even if a product information recording task is missed, the product information can still be found and recorded from other subsequent links; the production adaptability assessment task is similar to the product information recording task. Even if the production adaptability assessment task is missed in one cycle, it can be compensated by the results of the production adaptability assessment task in the next cycle. For tasks with extremely low execution frequency such as production adjustment tasks, missing this task will result in the inability to adjust the types of products produced by the production line and the inability to produce new types of products, and the impact and loss caused are relatively greater.

[0119] In one embodiment, step S206 may further include the following steps:

[0120] S2061: Obtain an average value of task urgency in adjacent leader nodes.

[0121] S2062: Send the initial task to the adjacent leader node with the largest average task urgency level.

[0122] In this embodiment, according to the definition of task urgency described above, the larger the value is, the lower the urgency of all tasks in the domain of the leadership node is, and thus it is more likely to have idle resources and processing time, and is more likely to process new tasks it receives in a timely and effective manner.

[0123] The embodiment of the present invention further provides a distributed task scheduling device, comprising:

[0124] An initial task selection module is used to select an initial task from a task set and put the initial task into a task queue, wherein the initial task is a task that has no dependency relationship with other tasks;

[0125] A computing node selection module, used to select a suitable computing node from available computing nodes for running the initial task;

[0126] A computing node evaluation module is used to evaluate whether the selected computing node can accept the initial task;

[0127] The computing node execution module is used to make the computing node accept the initial task and process the calculation of the initial task when the evaluation result is acceptable for operation; when the evaluation result is unacceptable for operation, make the computing node refuse to accept the initial task, and the leader node continues to select a suitable computing node from the remaining available computing nodes for the initial task to run.

[0128] The distributed task scheduling device also includes:

[0129] A subtask selection module is used to select a completed initial task from the task set, and obtain a task with the earliest deadline among its dependent tasks according to the task graph as a subtask;

[0130] The computing node selection module is also used to find a suitable computing node for the subtask;

[0131] The computing node execution module is further used to run the subtask on a suitable computing node;

[0132] A task acquisition and waiting module, used to add the acquired task to the task set, and if the task set is full at this time, add the task to the task waiting list;

[0133] The task acquisition and waiting module is also used to discard the initial task and record an exception log when a suitable computing node cannot be selected from the remaining available computing nodes, or the initial task exceeds the deadline; or, when the difference between the earliest deadline of the initial task and the current time is less than or equal to a preset value, add the initial task to the task waiting list.

[0134] An embodiment of the present invention further provides a computer program product, which is stored in a non-transitory computer-readable storage medium and includes machine-executable program instructions.

[0135] When the machine executable program instructions are run in a device, the device is used to execute the processes of each method of task scheduling in the above-mentioned embodiments, and the same technical effect can be achieved; the computer program is distributed on multiple computer devices or processors connected by a network, so that the computer program is stored, accessed and executed in a distributed form by one or more computer devices or processors; a single method step / operation, or two or more method steps / operations, can be executed by a single computer device or processor, or by two or more computer devices or processors; the non-temporary computer-readable storage medium includes a magnetic tape, a hard disk, a mobile hard disk, a U disk, an optical data storage device, a read-only memory ROM, a programmable ROM (PROM), a random access memory RAM, etc.

[0136] The specific implementation methods described above are preferred specific application examples of the present invention, and various technical features can be arbitrarily combined without violating the principles, but the protection scope of the present disclosure is not limited to this; the above description is exemplary rather than exhaustive, and does not constitute a limitation on the principles of the embodiments themselves; without departing from the scope and spirit of the disclosed embodiments, obvious simple changes and substitutions made by those skilled in the art without creative work all fall within the scope of the disclosure of the above embodiments.

Claims

1. A distributed task scheduling method, characterized in that: The steps include: Select an initial task from the task set and put the initial task into the task queue, wherein the initial task is a task that has no dependency relationship with other tasks; Selecting a suitable computing node from available computing nodes for running the initial task; The selected computing node evaluates whether its own conditions can accept the initial task; If the evaluation result is acceptable for operation, the computing node accepts the initial task and processes and calculates the initial task; If the evaluation result is that the operation is unacceptable, the computing node refuses to accept the initial task, and the leading node continues to select a suitable computing node from the remaining available computing nodes for the initial task to run.

2. The distributed task scheduling method according to claim 1, characterized in that: The following steps are also included: Selecting a completed initial task from the task set, and obtaining the task with the earliest deadline among its dependent tasks according to the task graph as a subtask; Find a suitable computing node for the subtask and run the subtask on it; Repeat the above steps of this claim.

3. The distributed task scheduling method according to claim 1 or 2, characterized in that: The step of "selecting an initial task from the task set and placing the initial task into the task queue, wherein the initial task is a task that has no dependency relationship with other tasks" also includes the following steps: Add the acquired task to the task set, and if the task set is full at this time, add the task to the task waiting list; Step "If the evaluation result is acceptable for operation, the computing node accepts the initial task and processes and calculates the initial task; If the evaluation result is that the operation is unacceptable, the computing node refuses to accept the initial task, and the leader node continues to select a suitable computing node from the remaining available computing nodes for the initial task to run. The following steps are also included: When a suitable computing node cannot be selected from the remaining available computing nodes, or the initial task exceeds the deadline, the initial task is discarded and an abnormal log is recorded; Or when a suitable computing node cannot be selected from the remaining available computing nodes within a preset number of times and the initial task has not exceeded the deadline, the initial task is added to the task waiting list; Alternatively, when the difference between the earliest deadline of the initial task and the current time is less than or equal to a preset value, the initial task is added to the task waiting list.

4. The distributed task scheduling method according to claim 3, characterized in that: The following steps are also included: Obtain the task waiting list; Sort the initial tasks in the task waiting list according to the earliest deadline; Send at least one task with a higher ranking in the earliest deadline to another leader node, so that the other leader node processes the initial task according to the steps described in claim 1 and / or 2.

5. The distributed task scheduling method according to claim 1, characterized in that: The step of "selecting a suitable computing node from available computing nodes for running the initial task" also includes the following steps: Initialize the load index of all computing nodes to 0, where the load index indicates the number of tasks running on the computing node; Counting the number of tasks running on each computing node, and assigning a value to the load index according to the number of tasks, where the load index of each computing node identifies the number of tasks being processed on the current computing node; Counting the comprehensive utilization rate of each computing node, where the comprehensive utilization rate includes a weighted average of one or more of a node processor utilization rate, a memory utilization rate, and a network throughput utilization rate; Pre-allocating the initial task to the computing node with the smallest load index and the lowest comprehensive utilization rate; When there are multiple computing nodes with the smallest load index and the lowest comprehensive utilization rate, or when there are multiple computing nodes with load index and comprehensive utilization rate less than their respective thresholds, the computing node with the most routing paths is selected as the pre-allocated object of the initial task.

6. The distributed task scheduling method according to claim 1, characterized in that: The step "the selected computing node evaluates whether its own conditions can accept the initial task" also includes the following steps: Calculating the comprehensive utilization rate of the nodes after allocating the pre-allocated tasks to the computing nodes as the estimated comprehensive utilization rate; evaluating whether the estimated comprehensive utilization rate is less than a comprehensive utilization rate threshold; If the evaluation result is that the estimated comprehensive utilization rate is less than the comprehensive utilization rate threshold, accepting the allocation of the initial task to the computing node for processing; If the evaluation result is that the estimated comprehensive utilization rate is greater than or equal to the comprehensive utilization rate threshold, the allocation of the initial task to the computing node for processing is rejected.

7. The distributed task scheduling method according to claim 2, characterized in that: The step of "finding a suitable computing node for the subtask and running the subtask on it" also includes the following steps: Pre-allocating the subtask to the same original computing node as the initial task on which it depends; Evaluate whether the original computing node can accept the subtask; If the evaluation result is acceptable for operation, the original computing node accepts the subtask and processes and calculates the subtask; If the evaluation result is that the operation is unacceptable, the original computing node refuses to accept the subtask, and the leader node continues to pre-allocate the subtask to a directly connected adjacent computing node with a communication distance hop count of 0 from the original computing node; Evaluate whether the adjacent computing node can accept the subtask; If the evaluation result is acceptable for operation, the neighboring computing node accepts the subtask and processes and calculates the subtask; if the evaluation result is unacceptable for operation, the neighboring computing node refuses to accept the subtask, and the leader node continues to pre-allocate the subtask to a computing node whose communication distance to the original computing node is N plus the number of hops (where N is an integer greater than or equal to 1); Repeat the above steps of this claim until all subtasks are assigned, or are discarded due to exceeding the deadline and an exception log is recorded.

8. The distributed task scheduling method according to claim 4, characterized in that: The step of "sending at least one task ranked higher in the earliest deadline to another leader node so that another leader node processes the initial task" also includes the following steps: Periodically obtain tasks in the task set within each leader node domain, and calculate the urgency of each task, where the urgency of each task = r × (task deadline - current time) + (1 - r) × task execution frequency (where r is a constant between 0 and 1); Calculate the average urgency of all tasks in each leader node; The step of "sending at least one task ranked higher in the earliest deadline to another leader node so that another leader node processes the initial task" also includes the following steps: Get the average value of task urgency in adjacent leader nodes; The initial task is sent to the adjacent leader node with the largest average task urgency.

9. A distributed task scheduling device, characterized in that: include: An initial task selection module is used to select an initial task from a task set and put the initial task into a task queue, wherein the initial task is a task that has no dependency relationship with other tasks; A computing node selection module, used to select a suitable computing node from available computing nodes for running the initial task; A computing node evaluation module is used to evaluate whether the selected computing node can accept the initial task; A computing node execution module, used for causing the computing node to accept the initial task and process and calculate the initial task when the evaluation result is acceptable for operation; When the evaluation result is that the operation is unacceptable, the computing node refuses to accept the initial task, and the leader node continues to select a suitable computing node from the remaining available computing nodes for the initial task to run.

10. A computer program product, characterized in that: The computer program product is stored in a non-transitory computer-readable storage medium and comprises machine-executable program instructions, which, when executed in a device, perform the method of any one of claims 1 to 8 using the device.