Task scheduling method and device, equipment, storage medium and program product
By building a third-order hypergraph between tasks, task data and computing platforms, the scheduling plan for each task is determined, and the problem of unbalanced task load in task scheduling is solved and the task completion efficiency is improved.
Patent Information
- Application Number
- CN202411463429.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-18
- Publication Date
- 2025-02-14
AI Technical Summary
In task scheduling, the prior art can easily lead to unbalanced task load between computing platforms, resulting in too long task queues and low completion efficiency.
By building a third-order hypergraph, connect tasks, task data and computing platforms, determine the task completion time of each hyper-edge, and select the scheduling plan in the order of completion time to avoid unbalanced task load.
It effectively avoids task load imbalance and improves task completion efficiency.
Smart Images

Figure CN119440755A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of cloud computing technology, and in particular, relates to a task scheduling method, device, equipment, storage medium and program product. Background Art
[0002] In the era of big data, the Internet has to process a large number of tasks every day. When there are multiple computing platforms, it is necessary to reasonably schedule which computing platform the task will be executed on.
[0003] In existing methods, the scheduling system collects data layout information and preferentially selects the computing platform closest to the data source as the scheduling target.
[0004] However, this method easily leads to unbalanced task loads among computing platforms, resulting in long task queuing time and low task completion efficiency. Summary of the invention
[0005] The embodiments of the present application provide a task scheduling method, apparatus, device, storage medium and program product, which can improve the efficiency of task completion.
[0006] In one aspect of an embodiment of the present application, a task scheduling method is provided, comprising:
[0007] Using the obtained task set, task data set and computing platform set, a third-order hypergraph is constructed. The third-order hypergraph includes a computing platform layer constructed with each computing platform in the computing platform set as a node, a task layer constructed with each task in the task set as a node, a data layer constructed with each task data in the task data set as a node, and hyperedges. The hyperedges are used to connect tasks, computing platforms and task data. The tasks, computing platforms and task data connected by the hyperedges constitute a scheduling plan for the tasks.
[0008] Determine the task completion time of the scheduling scheme corresponding to each hyperedge in the third-order hypergraph according to the time corresponding to the tasks, computing platforms and task data connected by each hyperedge;
[0009] According to the order of the task completion time of each hyperedge, the task scheduling scheme of each task in the third-order hypergraph is selected in turn to obtain the task scheduling scheme of the task set.
[0010] In one aspect of an embodiment of the present application, a task scheduling device is provided, comprising:
[0011] A hypergraph construction module is used to construct a third-order hypergraph using the acquired task set, task data set and computing platform set. The third-order hypergraph includes a computing platform layer constructed with each computing platform in the computing platform set as a node, a task layer constructed with each task in the task set as a node, a data layer constructed with each task data in the task data set as a node, and hyperedges. The hyperedges are used to connect tasks, computing platforms and task data. The tasks, computing platforms and task data connected by the hyperedges constitute a scheduling plan for the tasks.
[0012] A time determination module is used to determine the task completion time of the scheduling scheme corresponding to each hyperedge in the third-order hypergraph according to the time corresponding to the tasks, computing platforms and task data connected by each hyperedge;
[0013] The scheme determination module is used to select the task scheduling scheme for each task in the third-order hypergraph in sequence according to the order of the task completion time of each hyperedge, and obtain the task scheduling scheme for the task set.
[0014] In one aspect of an embodiment of the present application, an electronic device is provided, which includes: a memory and a program or instruction stored in the memory and executable on a processor, wherein when the program or instruction is executed by the processor, a task scheduling method as provided in any aspect of the above-mentioned embodiment of the present application is implemented.
[0015] In one aspect of an embodiment of the present application, a readable storage medium is provided, on which a program or instruction is stored. When the program or instruction is executed by a processor, a task scheduling method provided in any aspect of the above-mentioned embodiment of the present application is implemented.
[0016] In one aspect of an embodiment of the present application, a computer program product is provided. When instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes a task scheduling method provided in any aspect of the above-mentioned embodiment of the present application.
[0017] In the task scheduling method provided in the embodiment of the present application, a task set, a task data set and a computing platform set are used to construct a three-order hypergraph associated with the three of task, task data and computing platform, so that the correlation between the three can be more clearly described, so that the multiple scheduling schemes corresponding to each task can be intuitively seen according to the hyperedges in the three-order hypergraph. Then the task completion time of the scheduling scheme corresponding to each hyperedge in the three-order hypergraph is obtained. Finally, according to the order of the task completion time of each hyperedge in the three-order hypergraph, and according to the task load of each computing platform reflected by the three-order hypergraph, the task scheduling scheme of each task is generated in sequence. In this way, the embodiment of the present application describes the correlation between the three of task, task data and computing platform by constructing a three-order hypergraph, and according to the task completion time of each scheduling scheme and the task load of each computing platform, the task scheduling scheme of each task is generated in sequence, so that the problem of long task queuing time caused by the unbalanced task load between each computing platform can be avoided, and the completion efficiency of the task is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0019] Figure 1 It is a flowchart of a task scheduling method provided by an embodiment of the present application;
[0020] Figure 2 is a schematic diagram of a third-order hypergraph provided by an embodiment of the present application;
[0021] Figure 3 is a structural diagram of a task scheduling device provided by an embodiment of the present application;
[0022] Figure 4 It is a structural diagram of a task scheduling device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0023] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.
[0024] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0025] It should be noted that the acquisition, storage, use, and processing of data in the technical solution of this application are in compliance with the relevant provisions of national laws and regulations.
[0026] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0027] In the related art, the scheduling system collects data layout information and preferentially selects the computing platform closest to the data source as the scheduling target. However, this method easily leads to unbalanced task loads among computing platforms, resulting in long task queues and low task completion efficiency.
[0028] The purpose of the present application is to provide a task scheduling method, device, equipment, storage medium and program product. In the task scheduling method provided by the embodiment of the present application, a task set, a task data set and a computing platform set are used to construct a three-order hypergraph associated with the three of task, task data and computing platform, so that the correlation between the three can be more clearly described, so that the multiple scheduling schemes corresponding to each task can be intuitively seen according to the hyperedges in the three-order hypergraph. Then the task completion time of the scheduling scheme corresponding to each hyperedge in the three-order hypergraph is obtained. Finally, according to the order of the task completion time of each hyperedge in the three-order hypergraph, and according to the task load of each computing platform reflected by the three-order hypergraph, the task scheduling scheme of each task is generated in sequence. In this way, the embodiment of the present application describes the correlation between the three of task, task data and computing platform by constructing a three-order hypergraph, and according to the task completion time of each scheduling scheme and the task load of each computing platform, the task scheduling scheme of each task is generated in sequence, so that the problem of long task queuing time caused by the unbalanced task load between each computing platform can be avoided, and the completion efficiency of the task is improved.
[0029] The following describes specific embodiments of the task scheduling method, device, equipment, storage medium, and program product provided by the embodiments of the present application. First, the task scheduling method is introduced.
[0030] Figure 1 A flowchart of a task scheduling method is provided. The task scheduling method can be applied to a task scheduling system. The task scheduling method can include the following steps S101 to S103.
[0031] S101, using the acquired task set, task data set and computing platform set, construct a third-order hypergraph, the third-order hypergraph includes a computing platform layer constructed with each computing platform in the computing platform set as a node, a task layer constructed with each task in the task set as a node, a data layer constructed with each task data in the task data set as a node, and hyperedges, the hyperedges are used to connect tasks, computing platforms and task data, and the tasks, computing platforms and task data connected by the hyperedges constitute a scheduling plan for the tasks.
[0032] In this embodiment, the task set includes at least one task that needs to be calculated, the task data set includes at least one task data required for calculation, and the computing platform set includes at least one computing platform for the task to be calculated.
[0033] The third-order hypergraph consists of three layers: computing platform layer, task layer and data layer, which are used to represent the relationship between tasks, task data and computing platforms.
[0034] Each hyperedge connecting tasks, task data, and computing platforms represents a feasible scheduling plan for a task, indicating that the tasks connected by the hyperedge and their required task data are jointly scheduled to the corresponding computing platform in the hyperedge to perform calculations.
[0035] As an example, the task scheduling system constructs the task layer, data layer, and computing platform layer respectively according to the tasks in the current batch of task sets, the task data in the task data set, and the computing platforms in the computing platform set. Then, according to the association between tasks and computing platforms, each task is connected to the corresponding computing platform; according to the association between task data and computing platforms, each task data is connected to the corresponding computing platform, thereby obtaining a third-order hypergraph.
[0036] S102, determining the task completion time of the scheduling scheme corresponding to each hyperedge in the third-order hypergraph according to the tasks connected by each hyperedge, the computing platform, and the time corresponding to the task data.
[0037] In this embodiment, the task completion time of the scheduling scheme corresponding to the hyperedge includes three parts: the task calculation time of the task on the computing platform, the data migration time of the task data to the computing platform, and the maximum waiting time of the task on the computing platform.
[0038] As an example, after constructing a third-order hypergraph, the task scheduling system obtains hyperedges that simultaneously connect tasks, computing platforms, and task data based on the third-order hypergraph.
[0039] Then, according to the tasks, computing platforms and task data corresponding to each hyperedge, the corresponding task calculation time, data migration time and maximum waiting time are calculated respectively, and the task calculation time, data migration time and maximum waiting time corresponding to each hyperedge are accumulated respectively to obtain the task completion time of the scheduling scheme corresponding to each hyperedge in the third-order hypergraph.
[0040] S103 , selecting a task scheduling scheme for each task in the third-order hypergraph in order of the task completion time of each hyperedge, to obtain a task scheduling scheme for the task set.
[0041] In this embodiment, the time required for the task scheduling scheme corresponding to each hyperedge can be accurately obtained according to the task completion time of each hyperedge. In order to improve the overall efficiency of task scheduling, under the condition of ensuring the task load balance of each computing platform, the scheduling scheme with the shorter task completion time of each task is selected as much as possible.
[0042] As an example, the larger the task completion time is, the more time the corresponding task scheduling solution requires, and the larger the drop space is. Therefore, the task scheduling system can sort the hyperedges in descending order of task completion time.
[0043] According to the sorting results, the scheduling scheme corresponding to the task with the longest task completion time is selected first, and then the scheduling schemes corresponding to tasks with other task completion times are selected in turn according to the impact of the selected scheduling scheme on the task load of the computing platform, so as to obtain the task scheduling scheme corresponding to the task set.
[0044] As another example, when a task has only one corresponding scheduling solution, there is no need to select a scheduling solution for the task, and the only scheduling solution corresponding to the task is directly used as the final scheduling solution.
[0045] Through this embodiment, a third-order hypergraph associated with tasks, task data and computing platforms is constructed using a task set, a task data set and a computing platform set, so that the correlation between the three can be more clearly described, so that multiple scheduling schemes corresponding to each task can be intuitively seen according to the hyperedges in the third-order hypergraph. Then the task completion time of the scheduling scheme corresponding to each hyperedge in the third-order hypergraph is obtained. Finally, according to the order of the task completion time of each hyperedge in the third-order hypergraph, and according to the task load of each computing platform reflected by the third-order hypergraph, the task scheduling scheme of each task is generated in sequence. In this way, the embodiment of the present application describes the correlation between tasks, task data and computing platforms by constructing a third-order hypergraph, and according to the task completion time of each scheduling scheme and the task load of each computing platform, the task scheduling scheme of each task is generated in sequence, so that the problem of long task queuing time caused by the unbalanced task load between each computing platform can be avoided, and the completion efficiency of the task is improved.
[0046] As an optional embodiment, S101 may specifically include:
[0047] A task layer of a third-order hypergraph is constructed with each task in the task set as a node, a data layer of a third-order hypergraph is constructed with each task data in the task data set as a node, and a computing platform layer of a third-order hypergraph is constructed with each computing platform in the computing platform set as a node;
[0048] Using the computing resource requirements of each task in the task layer and the computing resource provision of each computing platform in the computing platform, each task is connected to a matching computing platform;
[0049] Using the storage resource requirements of each task data in the data layer and the storage resource provision of each computing platform in the computing platform, each task data is connected to a matching computing platform;
[0050] Using the connection relationship between tasks and computing platforms, and the connection relationship between task data and computing platforms, the hyperedges of the third-order hypergraph are determined;
[0051] A third-order hypergraph is constructed using the task layer, data layer, computing platform layer, and hyperedges.
[0052] In this embodiment, as an example, Figure 2 As shown, a schematic diagram of a third-order hypergraph is provided.
[0053] The task scheduling system first constructs three types of vertices in a third-order hypergraph based on tasks, computing platforms, and task data. Specifically, based on the acquired task set, the task layer of the third-order hypergraph is constructed, and each node in the task layer specifically includes tasks t1, t2, t3, t4, t5, and t6; based on the acquired computing platform set, the computing platform layer of the third-order hypergraph is constructed, and each node in the computing platform layer specifically includes computing platforms P1, P2, P3, P4, and P5; based on the acquired task data set, the data layer of the third-order hypergraph is constructed, and each node in the data layer specifically includes task data d1, d2, d3, d4, and d5. Then, the computing resource requirements of each task in the task layer are obtained. For example, the computing resource requirements of task t1 are 15 units; at the same time, the computing resource provision of each computing platform in the computing platform is obtained. For example, the computing resource provision of computing platform P1 is 70 units. According to the computing resource demand of each task and the computing resource provision of each computing platform, based on the two-way comprehensive matching degree and the resource dynamic matching method, the first scheduling platform set corresponding to each task is obtained.
[0054] Among them, the two-way comprehensive matching degree refers to a method of matching tasks and computing platforms by simultaneously considering the two dimensions of task demand information for resources and resource satisfaction for tasks. From the perspective of tasks, it is necessary to evaluate whether the demand for specific resources of tasks can be met; from the perspective of resources, it is necessary to evaluate whether the utilization of resources is maximized while meeting the demand of tasks. For example, suppose there is a task with a computing resource demand of 15 units and a task with a computing resource demand of 30 units in the task layer, and there is a computing platform with a computing resource supply of 40 units in the computing platform layer. At this time, the computing platform can meet the resource requirements of both tasks separately, but cannot meet the resource requirements of both tasks at the same time. When selecting a task with a computing resource demand of 30 units, its own utilization can be maximized. Therefore, at this time, the task with a computing resource demand of 30 units is connected to the computing platform.
[0055] The resource dynamic matching method refers to dynamically adjusting the resource allocation strategy according to the actual demand of the task and the real-time status of the resources. For example, the computing resource provided by computing platform P1 is 70 units, and after computing platform P1 is connected to task t1 with a computing resource demand of 15 units, the computing resource provided by computing platform P1 needs to be adjusted in time. At this time, the computing resource provided by computing platform P1 should be updated to 70-15=55 units.
[0056] The first scheduling platform set corresponding to the task includes multiple computing platforms, each of which is a computing platform to which the task can be connected. In this way, according to the first scheduling platform set corresponding to each task, each task is connected to each computing platform in the corresponding first scheduling platform set. Among them, the connection between the task and the computing platform means that the task and the computing platform meet the restriction conditions on each other, that is, the task can be scheduled to the computing platform for execution.
[0057] Then, the storage resource demand of each task data in the data layer is obtained. For example, the storage resource demand of task data d1 is 15 units; at the same time, the storage resource provision of each computing platform in the computing platform is obtained. For example, the computing resource provision of computing platform P1 is 160 units. According to the storage resource demand of each task data and the storage resource provision of each computing platform, based on the two-way comprehensive matching degree and resource dynamic matching method provided above, the second scheduling platform set corresponding to each task data is obtained in the same steps as the determination method of the first scheduling platform set corresponding to the task provided above.
[0058] The second scheduling platform set corresponding to the task data includes multiple computing platforms, and each computing platform is a computing platform to which the task data can be connected. In this way, according to the second scheduling platform set corresponding to each task data, each task data is connected to each computing platform in the corresponding second scheduling platform set. Among them, the connection between the task data and the computing platform means that the task data meets the storage capacity restriction condition of the computing platform, that is, the task data can be transmitted to the computing platform for storage.
[0059] Finally, according to the connection relationship between the task and the computing platform, and the connection relationship between the task data and the computing platform, the hyperedge of the third-order hypergraph is obtained, that is, the construction of the third-order hypergraph is completed. For example, the connection between task t1, computing platform P1 and task data d1 constitutes a hyperedge of the third-order hypergraph.
[0060] Through this embodiment, the obtained task set, task data set and computing platform set are used to construct the task layer, data layer, computing platform layer and hyperedge of the third-order hypergraph, thereby obtaining a third-order hypergraph. Therefore, the relationship between tasks, task data and computing platforms can be clearly described according to the third-order hypergraph, which is helpful for the subsequent use of the third-order hypergraph to reasonably determine the scheduling scheme corresponding to each task.
[0061] As an optional embodiment, after constructing a task layer of a third-order hypergraph with each task in a task set as a node, constructing a data layer of a third-order hypergraph with each task data in a task data set as a node, and constructing a computing platform layer of a third-order hypergraph with each computing platform in a computing platform set as a node, the task scheduling method may further include:
[0062] Set the computing resource requirement of each task as the weight of the corresponding task in the task layer;
[0063] The storage resource requirement of each task data is set as the weight of the corresponding task data in the data layer;
[0064] The computing resource provision and storage resource provision of each computing platform are set as the weight of the corresponding computing platform in the computing platform layer.
[0065] In this embodiment, corresponding weights are further set for each vertex in the third-order hypergraph. Among them, the weight of each task in the task layer is the computing resource demand of the corresponding task, which is used to characterize the degree of demand for computing resources by the task; the weight of each task data in the data layer is the storage resource demand of the corresponding task data, which is used to characterize the degree of demand for storage resources by the task data; the weight of each computing platform in the computing platform layer is the computing resource provision and storage resource provision of the corresponding computing platform, which is used to characterize the computing platform's supply capacity for computing resources and storage resources.
[0066] As an example, according to Figure 2 From the third-order hypergraph shown, we can see that the weight of task t1 is (15, -), the weight of task data d1 is (-, 15), and the weight of computing platform P1 is (70, 160).
[0067] Through this embodiment, the weights of tasks, task data, and computing platforms are set respectively by using the computing resource requirements of tasks, the storage resource requirements of task data, and the computing resource and storage resource provided by computing platforms. This helps to intuitively see the distribution of computing resources and storage resources using the third-order hypergraph, and can determine the computing platform that matches each task and the computing platform that matches each task data, thereby constructing the hyperedges of the third-order hypergraph.
[0068] As an optional embodiment, S102 may specifically include:
[0069] Obtain the target task, target computing platform, and target task data connected by the target hyperedge in the third-order hypergraph;
[0070] Compare the maximum waiting time corresponding to the target computing platform with the data migration time corresponding to the target task data, and determine the longer time as the target loss time;
[0071] The target loss time is added to the task calculation time corresponding to the target task to obtain the task completion time of the scheduling scheme corresponding to the target hyperedge.
[0072] In this embodiment, the target hyperedge is any hyperedge in the third-order hypergraph, and the target loss time is the longer time between the maximum waiting time of the target computing platform and the data migration time of the target task data.
[0073] As an example, the task scheduling system first obtains the target task, target computing platform and target task data connected to the target hyperedge, and then determines the task calculation time corresponding to the target task, the maximum waiting time corresponding to the target computing platform and the data migration time corresponding to the target task data.
[0074] For example, according to Figure 2 The third-order hypergraph shown in the figure has a target hyperedge of<t1,p1,d1> In this case, the task calculation time corresponding to the target task t1 is 22 unit time, the maximum waiting time of the target computing platform is 52 unit time, and the data migration time of the target task data is 3 unit time.
[0075] Then, since the data migration process and the task waiting process on the computing platform can be superimposed, we only need to select the longer time between the maximum waiting time of the target computing platform and the data migration time of the target task data as the target loss time. Finally, the cumulative value of the target loss time and the target task is determined as the task completion time of the scheduling scheme corresponding to the target hyperedge.
[0076] Specifically, the task completion time of the target hyperedge can be determined by the following formula 1:
[0077] T t,p,all =max(T d,p,tran ,T t,p,queue )+T t,p,exec Formula 1
[0078] Among them, T t,p,all represents the task completion time of the target hyperedge, T d,p,tran represents the data migration time from the target task data to the target computing platform, T t,p,queue represents the maximum waiting time of the target task on the target computing platform, T t,p,exec Indicates the task computing time of the target task on the target computing platform.
[0079] Through this embodiment, the maximum waiting time of the target computing platform, the data migration time of the target task data, and the task calculation time of the target task are used to obtain the task completion time of the target hyperedge, which is helpful to determine the task scheduling plan of each task according to the size relationship of the task completion time, thereby improving the task completion efficiency. As an optional embodiment, the maximum waiting time corresponding to the target computing platform is compared with the data migration time corresponding to the target task data, and the longer time is determined to be before the target loss time. The task scheduling method can also specifically include:
[0080] Obtaining a target migration data volume of target task data, a first local area network bandwidth of a target computing platform, a second local area network bandwidth of a target task data migration location, and a target wide area network bandwidth between the target computing platform and the target task data migration location;
[0081] Compare the target migration data volume with the first LAN bandwidth, the second LAN bandwidth and the target WAN bandwidth respectively, and determine the migration time of the target migration data volume in the first LAN bandwidth, the second LAN bandwidth and the target WAN bandwidth respectively;
[0082] The migration time of the target migration data volume in the first LAN bandwidth, the second LAN bandwidth and the target WAN bandwidth are accumulated respectively to obtain the data migration time of the target task data.
[0083] In this embodiment, the target task data migration location is used to represent the migration computing platform of the target task data.
[0084] When the target task data migration location is the same as the target computing platform, the data migration time is 0.
[0085] When the target task data migration location is different from the target computing platform, the data migration time overhead is proportional to the amount of data migrated and the bandwidth occupied by data migration. Among them, data migration includes two parts: data migration within the computing platform and data migration between computing platforms.
[0086] Therefore, the data migration time of the target task data to the target computing platform can be determined by the following formula 2:
[0087]
[0088] Among them, T d,p,tran represents the data migration time from the target task data to the target computing platform, S d represents the target migration data volume of the target task data, Indicates the bandwidth of the second LAN where the target task data is migrated from. Indicates the target WAN bandwidth between the target computing platform and the target task data migration location, BW d,p Indicates the first LAN bandwidth of the target computing platform.
[0089] As an example, the target task data corresponding to the target task may be multiple copies, and in the case of multiple copies of the target task data, each target task data may be migrated at the same time. Therefore, the data migration time corresponding to the target task may be the maximum value of the data migration times of each target task data corresponding to the target task.
[0090] Through this embodiment, the data migration time of the target task data can be accurately calculated by utilizing the target migration data volume of the target task data, the first local area network bandwidth of the target computing platform, the second local area network bandwidth of the target task data migration location, and the target wide area network bandwidth between the target computing platform and the target task data migration location, thereby facilitating the subsequent use of the data migration time to obtain the task completion time of the target hyperedge.
[0091] As an optional embodiment, the maximum waiting time corresponding to the target computing platform is compared with the data migration time corresponding to the target task data, and the longer time is determined to be before the target loss time. The task scheduling method may further specifically include:
[0092] Obtain the target waiting task quantity of the target computing platform, the target computing resource idle amount of the target computing platform, and the target computing resource demand amount of the target task;
[0093] In the case where the target computing platform satisfies the target platform condition, the maximum waiting time of the target computing platform is determined to be zero, and the target platform condition is that the number of target waiting tasks is zero and the idle amount of the target computing resources is greater than or equal to the required amount of the target computing resources;
[0094] When the target computing platform does not meet the target platform conditions, the maximum waiting time of the target computing platform is obtained by subtracting the task submission time of the target task from the maximum value of the task cumulative time corresponding to each task in the target computing platform. The task cumulative time is the sum of the task submission time and the task completion time of the task.
[0095] In this embodiment, the computing resources of the target computing platform are computing cores, the target computing resource idle amount is the idle amount of the computing cores, and the target computing resource demand amount is the demand amount of the computing cores.
[0096] When the number of target waiting tasks is zero and the idle amount of target computing resources is greater than or equal to the required amount of target computing resources, it means that the target task does not need to wait on the target computing platform and can be executed directly. At this time, the maximum waiting time of the target computing platform is determined to be zero.
[0097] When the number of target waiting tasks is not zero or the idle amount of target computing resources is less than the required amount of target computing resources, it indicates that the target task needs to wait on the target computing platform. At this time, the task with the largest sum of task submission time and task completion time on the target computing platform is determined as the bottleneck task of the target computing platform. When the bottleneck task is completed, the target task can be executed.
[0098] Specifically, the maximum waiting time of the target task on the target computing platform can be determined by the following formula 3:
[0099]
[0100] Among them, T t,p,queue represents the maximum waiting time of the target task on the target computing platform, N p Indicates the number of target waiting tasks, C p represents the total amount of target computing resources of the target computing platform, C p,run Indicates the target computing resources that the target computing platform is running, C t represents the target computing resource requirement, T m,p,sub represents the task submission time of the bottleneck task, T m,p,all represents the task completion time of the bottleneck task, T t,p,sub Indicates the task submission time of the target task.
[0101] Through this embodiment, the maximum waiting time of the target task on the target computing platform can be accurately calculated by utilizing the target waiting task number of the target computing platform, the target computing resource idle amount of the target computing platform, and the target computing resource demand of the target task, thereby facilitating the subsequent use of the maximum waiting time to obtain the task completion time of the target hyperedge.
[0102] As an optional embodiment, before adding the target loss time to the task calculation time corresponding to the target task to obtain the task completion time of the scheduling solution corresponding to the target hyperedge, the task scheduling method may further specifically include:
[0103] Obtain the task computing amount of the target task, the computing power of the computing resources in the target computing platform, the target computing resource demand of the target task, and the parallel efficiency of the computing resources;
[0104] Determine the task computing speed of the target task according to the computing power of the computing resources, the target computing resource demand, and the parallel efficiency of the computing resources;
[0105] Divide the task calculation amount of the target task by the task calculation speed to obtain the task calculation time of the target task.
[0106] In this embodiment, the computing power of the computing resources is the computing power of each computing core, and the parallel efficiency of the computing resources is the parallel efficiency of the computing cores.
[0107] As an example, the task computing time of the target task on the target computing platform can be determined by the following formula 4:
[0108]
[0109] Among them, T t,p,exec represents the task computing time of the target task on the target computing platform, W t,comp represents the task computation amount of the target task, F p represents the computing power of computing resources in the target computing platform, C t represents the target computing resource requirement of the target task, Indicates the parallel efficiency of computing resources.
[0110] Through this embodiment, the task calculation amount of the target task, the computing power of the computing resources in the target computing platform, the target computing resource demand of the target task and the parallel efficiency of the computing resources can be used to accurately calculate the task calculation time of the target task on the target computing platform, which will help to subsequently use the task calculation time to obtain the task completion time of the target hyperedge.
[0111] As an optional embodiment, S103 may specifically include:
[0112] Divide the computing platform of the third-order hypergraph into multiple hypergraph partitions;
[0113] Allocate each task to the corresponding first hypergraph partition in turn, obtain the hyperedge to be calculated of the task in the first hypergraph partition, and there is a connection relationship between the task and the first hypergraph partition;
[0114] The hyperedge benefit value of the hyperedge to be calculated is obtained by using the task completion time of the hyperedge to be calculated, the load weight of the hyperedge to be calculated, and the time weight of the hyperedge to be calculated. The hyperedge benefit value is used to represent the benefit that can be generated by reallocating the hypergraph partition to which the task corresponding to the hyperedge to be calculated belongs.
[0115] In the order of the hyperedge benefit value, each task is reallocated to the second hypergraph partition according to the target allocation rule until the allocation termination condition is met, and the task scheduling plan of the task set is obtained. The allocation termination condition is that all tasks cannot be reallocated or the preset number of allocations is reached.
[0116] In this embodiment, one computing platform may be divided into one hypergraph partition, or multiple computing platforms may be divided into one hypergraph partition.
[0117] The hyperedge to be calculated is a hyperedge belonging to the first hypergraph partition among multiple hyperedges corresponding to the task. Other hyperedges corresponding to the task except the hyperedge to be calculated will be hidden to indicate that the scheduling solutions corresponding to these hyperedges are abandoned.
[0118] The hyperedge benefit value is used to represent the benefit that can be generated by reallocating the partition to which the task corresponding to the hyperedge to be calculated belongs. The larger the benefit, the higher the priority of the optimization target.
[0119] The target allocation rule is used to represent the rules that should be followed when reallocating the partition to which the task belongs, wherein the target allocation rule may include a scheduling decision constraint rule and a super-edge migration constraint rule.
[0120] Specifically, the scheduling decision constraint rules may include the following:
[0121]
[0122] S t =∑S d ≤S p -S p,used Formula 8
[0123]
[0124] Where x in Formula 5 t,p Indicates the mapping status between task t and computing platform p, that is, whether task t will be assigned to computing platform p for execution. t,p =1 means that task t will be assigned to computing platform p for execution, and x t,p =0 means that task t will not be assigned to computing platform p. Formula 5 expresses that each task will only be assigned to one target computing platform during scheduling decision making.
[0125] y in Equation 6 d,ps,p The task data d required by task t is located at the task data migration location p s Migration status between computing platform p. d,ps,p =1 means the data migration exists, y d,ps,p =0 means that the data migration does not exist, and the task data d will be migrated from other task data migration locations to the computing platform p. Formula 6 expresses that the task data corresponding to each task will only be migrated from one task data migration location to the computing platform.
[0126] Formula 7 is the network bandwidth limit, where BW d,ps,p Indicates that the task data is migrated from p s The WAN bandwidth occupied by the migration of task data d between computing platform p, BW ps,p Indicates the location where the task data is migrated from sThe available WAN bandwidth between the task data migration location p and the computing platform p. Formula 7 expresses the s The total bandwidth occupied by performing data migration on the WAN link between the computing platform p should not be greater than the available WAN bandwidth between them.
[0127] Formula 8 is the storage capacity limit, that is, the storage resource requirement S of task t t Should not be greater than the available storage capacity S on the computing platform p p -S p,used .
[0128] Formula 9 restricts the mapping state x between task t and computing platform p t,p and task data d at the task data migration location p s Migration status y between computing platform p d,ps,p A collection of value ranges.
[0129] Specifically, the super-edge migration constraint rules may include the following items:
[0130] |ΔT max,p′,queue |<|Cost max |-|Cost p′,max | Formula 10
[0131] |ΔT max,p′,queue |<|ΔT max,p,queue | Formula 11
[0132] Formula 10 indicates that after the hyperedge is optimized and partitioned, the task completion time corresponding to the hyperedge that cannot make the maximum task completion time improved. max,p′,queue represents the maximum waiting time within the new computing platform p′ to which the task is assigned, Cost max Indicates the global maximum task completion time, Cost p′,max Represents the maximum task completion time within the new computing platform p′.
[0133] Formula 11 indicates that migration should generate positive returns. max,p,queue | represents the reduction in the maximum waiting time of the computing platform p in the original partition, |ΔT max,p′,queue | represents the increase in the maximum waiting time of the new computing platform p′.
[0134] As an example, the task scheduling system first divides the computing platform of the third-order hypergraph into multiple hypergraph partitions according to the preset division rules, and then initializes and assigns each task to the corresponding first hypergraph partition to obtain the hyperedge to be calculated. Then, the hyperedge benefit value of each hyperedge to be calculated is calculated in turn, and the partitions corresponding to each task are reallocated in order from large to small in terms of the hyperedge benefit value, and the task completion time and weight of each hyperedge in the third-order hypergraph are updated in a timely manner, thereby obtaining the task scheduling plan for each task in the task set.
[0135] Through this embodiment, the established third-order hypergraph is reasonably divided and scheduled according to the order of the hyperedge benefit values and the target allocation rule, thereby obtaining the task scheduling scheme for each task in the task set. By fully considering the load state of global computing resources, the increase in task completion time caused by unbalanced task allocation is avoided, and the task completion efficiency is improved.
[0136] As an optional embodiment, the hyperedge benefit value of the hyperedge to be calculated is obtained by using the task completion time of the hyperedge to be calculated, the load weight of the hyperedge to be calculated, and the time weight of the hyperedge to be calculated, which may specifically include:
[0137] Divide the first waiting computing resource of the computing platform of the target hyperedge to be calculated by the second waiting computing resource of the computing platform with the heaviest computing resource load to obtain the load weight of the target hyperedge to be calculated;
[0138] Divide the first task completion time of the target hyperedge to be calculated by the minimum value of the second task completion time of each hyperedge to be calculated to obtain the time weight of the target hyperedge to be calculated;
[0139] The first task completion time of the target hyperedge to be calculated, the load weight of the target hyperedge to be calculated, and the time weight of the target hyperedge to be calculated are multiplied to obtain the hyperedge benefit value of the target hyperedge to be calculated.
[0140] In this embodiment, the ratio of the first waiting computing resource of the computing platform of the target hyperedge to be calculated to the second waiting computing resource of the computing platform with the heaviest computing resource load is used as the load weight of the target hyperedge to be calculated. Specifically, the load weight of the target hyperedge to be calculated can be determined by the following formula 12:
[0141]
[0142] Among them, W h,load represents the load weight of the target hyperedge to be calculated, C p,wait represents the first waiting computing resource of the computing platform of the target hyperedge to be computed, C max,wait The second most wait computing resource of the computing platform representing the computing resource with the heaviest load.
[0143] The time weight of the target hyperedge to be calculated is determined by the ratio of the first task completion time of the target hyperedge to be calculated to the minimum value of the second task completion time of each hyperedge to be calculated. Specifically, the time weight of the target hyperedge to be calculated can be determined by the following formula 13:
[0144]
[0145] Among them, W h,cost Indicates the time weight of the target hyperedge to be calculated, Cost h Indicates the completion time of the first task of the target hyperedge to be calculated, Cost t,min Represents the minimum value of the second task completion time of each hyperedge to be calculated.
[0146] Finally, the first task completion time of the target hyperedge to be calculated, the load weight of the target hyperedge to be calculated, and the time weight of the target hyperedge to be calculated are multiplied to obtain the hyperedge benefit value of the target hyperedge to be calculated. Specifically, the hyperedge benefit value of the target hyperedge to be calculated can be determined by the following formula 14:
[0147] gain h =Cost h ×W h,load ×W h,cost Formula 14
[0148] Among them, gain h Indicates the hyperedge benefit value of the target hyperedge to be calculated, Cost h represents the completion time of the first task of the target hyperedge to be calculated, W h,load represents the load weight of the target hyperedge to be calculated, W h,cost Indicates the time weight of the target hyperedge to be calculated.
[0149] Through this embodiment, the hyperedge benefit value of the hyperedge to be calculated can be calculated by using the task completion time of the hyperedge to be calculated, the load weight of the hyperedge to be calculated, and the time weight of the hyperedge to be calculated. This helps to determine the optimization order of each task according to the size relationship of the hyperedge benefit value, thereby improving the completion efficiency of the task. Based on the task scheduling method. Accordingly, the present application also provides a specific embodiment of the task scheduling device.
[0150] like Figure 3 As shown, the task scheduling device provided in the embodiment of the present application includes a hypergraph construction module 310, a time determination module 320 and a solution determination module 330.
[0151] The hypergraph construction module 310 is used to construct a third-order hypergraph using the acquired task set, task data set and computing platform set. The third-order hypergraph includes a computing platform layer constructed with each computing platform in the computing platform set as a node, a task layer constructed with each task in the task set as a node, a data layer constructed with each task data in the task data set as a node, and hyperedges. The hyperedges are used to connect tasks, computing platforms and task data. The tasks, computing platforms and task data connected by the hyperedges constitute a scheduling plan for the tasks.
[0152] The time determination module 320 is used to determine the task completion time of the scheduling scheme corresponding to each hyperedge in the third-order hypergraph according to the time corresponding to the tasks, computing platforms and task data connected by each hyperedge.
[0153] The scheme determination module 330 is used to select the task scheduling scheme for each task in the third-order hypergraph in order of the task completion time of each hyperedge, so as to obtain the task scheduling scheme for the task set.
[0154] Through this embodiment, a third-order hypergraph associated with tasks, task data and computing platforms is constructed using a task set, a task data set and a computing platform set, so that the correlation between the three can be more clearly described, so that multiple scheduling schemes corresponding to each task can be intuitively seen according to the hyperedges in the third-order hypergraph. Then the task completion time of the scheduling scheme corresponding to each hyperedge in the third-order hypergraph is obtained. Finally, according to the order of the task completion time of each hyperedge in the third-order hypergraph, and according to the task load of each computing platform reflected by the third-order hypergraph, the task scheduling scheme of each task is generated in sequence. In this way, the embodiment of the present application describes the correlation between tasks, task data and computing platforms by constructing a third-order hypergraph, and according to the task completion time of each scheduling scheme and the task load of each computing platform, the task scheduling scheme of each task is generated in sequence, so that the problem of long task queuing time caused by the unbalanced task load between each computing platform can be avoided, and the completion efficiency of the task is improved.
[0155] As an optional embodiment, the hypergraph construction module 310 specifically includes the following units:
[0156] A hierarchical construction unit, for constructing a task layer of a third-order hypergraph with each task in a task set as a node, a data layer of a third-order hypergraph with each task data in a task data set as a node, and a computing platform layer of a third-order hypergraph with each computing platform in a computing platform set as a node;
[0157] The task connection unit is used to connect each task with a matching computing platform by utilizing the computing resource requirements of each task in the task layer and the computing resource provision of each computing platform in the computing platform;
[0158] A data connection unit, used to connect each task data with a matching computing platform by utilizing the storage resource requirements of each task data in the data layer and the storage resource provision of each computing platform in the computing platform;
[0159] A hyperedge determination unit, used to determine the hyperedge of the third-order hypergraph by using the connection relationship between the task and the computing platform, and the connection relationship between the task data and the computing platform;
[0160] The hypergraph construction unit is used to construct a third-order hypergraph using the task layer, data layer, computing platform layer and hyperedges.
[0161] As an optional embodiment, the hypergraph construction module 310 specifically further includes the following units:
[0162] A weight setting unit, used to set the computing resource requirement of each task as the weight of the corresponding task in the task layer;
[0163] The weight setting unit is further used to set the storage resource requirement of each task data as the weight of the corresponding task data in the data layer;
[0164] The weight setting unit is also used to set the computing resource provision amount and storage resource provision amount of each computing platform as the weight of the corresponding computing platform in the computing platform layer.
[0165] As an optional embodiment, the time determination module 320 specifically includes the following units:
[0166] A data acquisition unit, used to acquire target tasks, target computing platforms, and target task data connected by target hyperedges in a third-order hypergraph;
[0167] A time determination unit, used to compare the maximum waiting time corresponding to the target computing platform with the data migration time corresponding to the target task data, and determine the longer time as the target loss time;
[0168] The time accumulation unit is used to add the target loss time and the task calculation time corresponding to the target task to obtain the task completion time of the scheduling scheme corresponding to the target hyperedge.
[0169] As an optional embodiment, the time determination module 320 specifically further includes the following units:
[0170] The data acquisition unit is further used to acquire the target migration data volume of the target task data, the first local area network bandwidth of the target computing platform, the second local area network bandwidth of the target task data migration location, and the target wide area network bandwidth between the target computing platform and the target task data migration location;
[0171] The time determination unit is further used to compare the target migration data volume with the first LAN bandwidth, the second LAN bandwidth and the target WAN bandwidth respectively, and determine the migration time of the target migration data volume in the first LAN bandwidth, the second LAN bandwidth and the target WAN bandwidth respectively;
[0172] The time accumulation unit is further used to accumulate the migration time of the target migration data volume in the first LAN bandwidth, the second LAN bandwidth and the target WAN bandwidth respectively to obtain the data migration time of the target task data.
[0173] As an optional embodiment, the time determination module 320 specifically further includes the following units:
[0174] The data acquisition unit is further used to acquire the number of target waiting tasks of the target computing platform, the idle amount of target computing resources of the target computing platform, and the target computing resource demand of the target task;
[0175] a time calculation unit, for determining the maximum waiting time of the target computing platform to be zero when the target computing platform satisfies a target platform condition, wherein the target platform condition is that the number of target waiting tasks is zero and the idle amount of the target computing resources is greater than or equal to the required amount of the target computing resources;
[0176] The time calculation unit is also used to obtain the maximum waiting time of the target computing platform by subtracting the task submission time of the target task from the maximum value of the task cumulative time corresponding to each task in the target computing platform when the target computing platform does not meet the target platform conditions. The task cumulative time is the sum of the task submission time and the task completion time of the task.
[0177] As an optional embodiment, the time determination module 320 specifically further includes the following units:
[0178] The data acquisition unit is also used to obtain the task computing amount of the target task, the computing power of the computing resources in the target computing platform, the target computing resource demand of the target task, and the parallel efficiency of the computing resources;
[0179] The data computing unit is further used to determine the task computing speed of the target task according to the computing capacity of the computing resources, the target computing resource demand and the parallel efficiency of the computing resources;
[0180] The data calculation unit is also used to divide the task calculation amount of the target task by the task calculation speed to obtain the task calculation time of the target task.
[0181] As an optional embodiment, the solution determination module 330 specifically includes the following units:
[0182] A hypergraph partitioning unit, used for partitioning a computing platform of a third-order hypergraph into a plurality of hypergraph partitions;
[0183] A hypergraph determination unit, used to sequentially assign each task to a corresponding first hypergraph partition, obtain a hyperedge to be calculated for the task in the first hypergraph partition, and a connection relationship exists between the task and the first hypergraph partition;
[0184] a benefit value determination unit, for obtaining a hyperedge benefit value of the hyperedge to be calculated by using the task completion time of the hyperedge to be calculated, the load weight of the hyperedge to be calculated, and the time weight of the hyperedge to be calculated, wherein the hyperedge benefit value is used to represent the benefit that can be generated by reallocating the hypergraph partition to which the task corresponding to the hyperedge to be calculated belongs;
[0185] The task allocation unit is used to reallocate each task to the second hypergraph partition in accordance with the target allocation rule in the order of the hyperedge benefit value until the allocation termination condition is met, and obtain the task scheduling plan of the task set. The allocation termination condition is that all tasks cannot be reallocated or the preset number of allocations is reached.
[0186] As an optional embodiment, the benefit value determination unit specifically includes the following subunits:
[0187] A weight determination subunit, configured to divide the first waiting computing resource of the computing platform of the target hyperedge to be calculated by the second waiting computing resource of the computing platform with the heaviest computing resource load, to obtain a load weight of the target hyperedge to be calculated;
[0188] A weight determination subunit, configured to divide the first task completion time of the target hyperedge to be calculated by the minimum value of the second task completion time of each hyperedge to be calculated, to obtain a time weight of the target hyperedge to be calculated;
[0189] The benefit value determination subunit is used to multiply the first task completion time of the target hyperedge to be calculated, the load weight of the target hyperedge to be calculated, and the time weight of the target hyperedge to be calculated to obtain the hyperedge benefit value of the target hyperedge to be calculated.
[0190] Based on the task scheduling method, accordingly, the present application also provides a specific embodiment of the task scheduling device.
[0191] Figure 4 A schematic diagram of the hardware structure of a task scheduling device provided in an embodiment of the present application is shown.
[0192] The task scheduling device may include a processor 401 and a memory 402 storing computer program instructions.
[0193] Specifically, the processor 401 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0194] Memory 402 may include a large capacity memory for data or instructions. By way of example and not limitation, memory 402 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, memory 402 may include a removable or non-removable (or fixed) medium. In appropriate cases, memory 402 may be inside or outside of an integrated gateway disaster recovery device. In a specific embodiment, memory 402 is a non-volatile solid-state memory.
[0195] The memory may include read-only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical or other physical / tangible memory storage devices. Thus, typically, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.
[0196] The processor 401 implements any one of the task scheduling methods in the above embodiments by reading and executing computer program instructions stored in the memory 402 .
[0197] In one example, the task scheduling device may further include a communication interface 403 and a bus 410. Figure 4 As shown, the processor 401, the memory 402, and the communication interface 403 are connected via a bus 410 and communicate with each other.
[0198] The communication interface 403 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0199] Bus 410 includes hardware, software or both, and the parts of task scheduling equipment are coupled to each other.For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 410 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the application considers any suitable bus or interconnection.
[0200] In addition, in combination with the task scheduling method in the above embodiment, the embodiment of the present application can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any one of the task scheduling methods in the above embodiment is implemented.
[0201] In addition, in combination with the task scheduling method in the above embodiment, the embodiment of the present application can provide a computer program product to implement. When the instructions in the computer program product are executed by the processor of the electronic device, any one of the task scheduling methods in the above embodiment is implemented.
[0202] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0203] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0204] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0205] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0206] The above is only a specific implementation of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. A task scheduling method, characterized in that: The method comprises: Using the acquired task set, task data set and computing platform set, a third-order hypergraph is constructed, wherein the third-order hypergraph includes a computing platform layer constructed with each computing platform in the computing platform set as a node, a task layer constructed with each task in the task set as a node, a data layer constructed with each task data in the task data set as a node, and a hyperedge, wherein the hyperedge is used to connect the tasks, the computing platforms and the task data, and the tasks, the computing platforms and the task data connected by the hyperedge constitute a scheduling scheme for the tasks; Determine the task completion time of the scheduling scheme corresponding to each of the hyperedges in the third-order hypergraph according to the times corresponding to the tasks, the computing platforms, and the task data connected by each of the hyperedges; According to the order of the task completion time of each hyperedge, the task scheduling scheme of each task in the third-order hypergraph is selected in turn to obtain the task scheduling scheme of the task set.
2. The method according to claim 1, characterized in that The method of constructing a third-order hypergraph using the acquired task set, task data set, and computing platform set includes: The task layer of the third-order hypergraph is constructed with each task in the task set as a node, the data layer of the third-order hypergraph is constructed with each task data in the task data set as a node, and the computing platform layer of the third-order hypergraph is constructed with each computing platform in the computing platform set as a node; Using the computing resource requirements of each task in the task layer and the computing resource provision of each computing platform in the computing platform, each task is connected to a matching computing platform; Using the storage resource requirements of each task data in the data layer and the storage resource provision of each computing platform in the computing platform, each task data is connected to the matching computing platform; Determine the hyperedges of the third-order hypergraph by using the connection relationship between the task and the computing platform, and the connection relationship between the task data and the computing platform; The third-order hypergraph is constructed using the task layer, the data layer, the computing platform layer and the hyperedges.
3. The method according to claim 2, characterized in that After constructing the task layer of the third-order hypergraph with each task in the task set as a node, constructing the data layer of the third-order hypergraph with each task data in the task data set as a node, and constructing the computing platform layer of the third-order hypergraph with each computing platform in the computing platform set as a node, the method further includes: The computing resource requirement of each of the tasks is set as the weight of the corresponding task in the task layer; The storage resource requirement of each task data is set as the weight of the corresponding task data in the data layer; The amount of computing resources and the amount of storage resources provided by each of the computing platforms are set as the weight of the corresponding computing platform in the computing platform layer.
4. The method according to claim 1, characterized in that: Determining the task completion time of the scheduling scheme corresponding to each of the hyperedges in the third-order hypergraph according to the times corresponding to the tasks, the computing platforms, and the task data connected by each of the hyperedges, comprises: Obtain target tasks, target computing platforms, and target task data connected by target hyperedges in the third-order hypergraph; Compare the maximum waiting time corresponding to the target computing platform with the data migration time corresponding to the target task data, and determine the longer time as the target loss time; The target loss time is added to the task calculation time corresponding to the target task to obtain the task completion time of the scheduling scheme corresponding to the target hyperedge.
5. The method according to claim 4, characterized in that The maximum waiting time corresponding to the target computing platform is compared with the data migration time corresponding to the target task data, and the longer time is determined to be before the target loss time. The method further includes: Obtaining a target migration data volume of the target task data, a first local area network bandwidth of the target computing platform, a second local area network bandwidth of a target task data migration location, and a target wide area network bandwidth between the target computing platform and the target task data migration location; Comparing the target migration data volume with the first LAN bandwidth, the second LAN bandwidth, and the target WAN bandwidth, respectively, to determine the migration time of the target migration data volume in the first LAN bandwidth, the second LAN bandwidth, and the target WAN bandwidth, respectively; The migration time of the target migration data volume in the first local area network bandwidth, the second local area network bandwidth and the target wide area network bandwidth are accumulated respectively to obtain the data migration time of the target task data.
6. The method according to claim 4, characterized in that The maximum waiting time corresponding to the target computing platform is compared with the data migration time corresponding to the target task data, and the longer time is determined to be before the target loss time. The method further includes: Obtain the target waiting task quantity of the target computing platform, the target computing resource idle amount of the target computing platform, and the target computing resource demand amount of the target task; In the case where the target computing platform satisfies a target platform condition, determining the maximum waiting time of the target computing platform to be zero, wherein the target platform condition is that the number of target waiting tasks is zero and the idle amount of the target computing resources is greater than or equal to the required amount of the target computing resources; When the target computing platform does not meet the target platform conditions, the maximum waiting time of the target computing platform is obtained by subtracting the task submission time of the target task from the maximum value of the task accumulated time corresponding to each task in the target computing platform. The task accumulated time is the sum of the task submission time and the task completion time of the task.
7. The method according to claim 4, characterized in that Before adding the target loss time to the task calculation time corresponding to the target task to obtain the task completion time of the scheduling scheme corresponding to the target hyperedge, the method further includes: Obtaining the task computing amount of the target task, the computing power of the computing resources in the target computing platform, the target computing resource requirement of the target task, and the parallel efficiency of the computing resources; Determining a task computing speed of the target task according to the computing capacity of the computing resources, the target computing resource requirement, and the parallel efficiency of the computing resources; The task calculation amount of the target task is divided by the task calculation speed to obtain the task calculation time of the target task.
8. The method according to claim 1, characterized in that The task scheduling scheme of each task in the third-order hypergraph is selected in sequence according to the order of the task completion time of each hyperedge to obtain the task scheduling scheme of the task set, including: Dividing the computing platform of the third-order hypergraph into a plurality of hypergraph partitions; Allocate each of the tasks to the corresponding first hypergraph partition in sequence, obtain the hyperedge to be calculated of the task in the first hypergraph partition, and there is a connection relationship between the task and the first hypergraph partition; Using the task completion time of the hyperedge to be calculated, the load weight of the hyperedge to be calculated, and the time weight of the hyperedge to be calculated, a hyperedge benefit value of the hyperedge to be calculated is obtained, wherein the hyperedge benefit value is used to represent the benefit that can be generated by reallocating the hypergraph partition to which the task corresponding to the hyperedge to be calculated belongs; According to the order of the size of the hyperedge benefit value, each task is reallocated to the second hypergraph partition in turn according to the target allocation rule until the allocation termination condition is met, and the task scheduling plan of the task set is obtained. The allocation termination condition is that none of the tasks can be reallocated or the preset number of allocations is reached.
9. The method according to claim 8, characterized in that The obtaining the hyperedge benefit value of the hyperedge to be calculated by using the task completion time of the hyperedge to be calculated, the load weight of the hyperedge to be calculated, and the time weight of the hyperedge to be calculated includes: Divide the first waiting computing resource of the computing platform of the target hyperedge to be calculated by the second waiting computing resource of the computing platform with the heaviest computing resource load to obtain the load weight of the target hyperedge to be calculated; Divide the first task completion time of the target hyperedge to be calculated by the minimum value of the second task completion time of each hyperedge to be calculated to obtain the time weight of the target hyperedge to be calculated; The first task completion time of the target hyperedge to be calculated, the load weight of the target hyperedge to be calculated, and the time weight of the target hyperedge to be calculated are multiplied to obtain the hyperedge benefit value of the target hyperedge to be calculated.
10. A task scheduling device, characterized in that: The device comprises: A hyperedge construction module, used to construct a third-order hypergraph using the acquired task set, task data set and computing platform set, wherein the third-order hypergraph includes a computing platform layer constructed with each computing platform in the computing platform set as a node, a task layer constructed with each task in the task set as a node, a data layer constructed with each task data in the task data set as a node, and hyperedges, wherein the hyperedges are used to connect the tasks, the computing platforms and the task data, and the tasks, the computing platforms and the task data connected by the hyperedges constitute a scheduling scheme for the tasks; A time determination module, used to determine the task completion time of the scheduling scheme corresponding to each of the hyperedges in the third-order hypergraph according to the times corresponding to the tasks, the computing platforms and the task data connected by each of the hyperedges; The scheme determination module is used to select the task scheduling scheme for each task in the third-order hypergraph in order of the task completion time of each hyperedge, so as to obtain the task scheduling scheme for the task set.
11. An electronic device, characterized in that: The device comprises: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the task scheduling method according to any one of claims 1 to 9 is implemented.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the task scheduling method according to any one of claims 1 to 9 is implemented.
13. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the task scheduling method as described in any one of claims 1 to 9.