Task scheduling methods and related equipment
By constructing a task graph and using the MVCF scheduling algorithm, the resource contention problem in task scheduling in optical circuit-switched networks is solved, improving the network's cluster output capacity and overall value. This method is applicable to task scheduling in optical circuit-switched networks.
Patent Information
- Application Number
- CN202411916020.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2044-12-24
AI Technical Summary
Existing optical circuit-switched networks face resource contention issues in task scheduling, which limits network flexibility and efficiency. Existing task scheduling optimization schemes are mainly designed for pure electric switching networks and are not suitable for optical circuit-switched networks.
By constructing a task graph to show the competitive relationships and cluster contribution values between tasks, the task set is divided and the task with the highest cluster contribution value is executed first. A network configuration is generated for scheduling, and the Maximum Value Contribution First (MVCF) scheduling algorithm is adopted to ensure that there is no competition between each group of tasks.
It improves the cluster output capability of optical circuit switching networks, maximizes overall value, solves the resource competition problem of task scheduling in optical circuit switching networks, and enhances the flexibility and efficiency of the network.
Smart Images

Figure CN119946467B_ABST
Abstract
Description
Technical Field
[0001] One or more embodiments of this application relate to the field of communication technology, and in particular to a task scheduling method and related equipment. Background Technology
[0002] Optical Circuit Switching (OCS) technology, as a highly efficient optical switching technology, aims to establish end-to-end optical circuits directly through optical switches, bypassing traditional electronic switching processes and providing low-latency and high-bandwidth data transmission. With the development of fiber optic communication technology, OCS technology has been widely used in large-scale data centers, long-distance communications, and private networks, especially suitable for scenarios requiring stable and efficient transmission. Its main advantages include significantly reduced transmission latency, full utilization of fiber optic bandwidth, reduced energy consumption, and avoidance of network congestion.
[0003] However, OCS technology faces two major hardware limitations: first, each port can only establish a unique circuit connection with another port at a time; second, when the switching matrix is reconfigured, the ports involved will be temporarily unavailable. These hardware constraints lead to resource contention issues in OCS communication schemes, limiting the flexibility and efficiency of the network.
[0004] In related technologies, task scheduling problems in communication networks typically focus on pure electronic circuit switching (EBS) scenarios. However, EBS and optical circuit switching (OSS) differ significantly in their task scheduling processes, and task scheduling solutions designed for EBS are not applicable to OSS. Specifically, in EBS, task processing and forwarding rely on the computing power of electronic devices and network bandwidth. Therefore, scheduling strategies usually prioritize reducing latency and accelerating task completion to improve overall system efficiency. However, OSS transmits optical signals, avoiding the bottleneck of electronic processing. Therefore, optimization scheduling strategies aimed at reducing latency and accelerating task completion are no longer suitable for OSS. Summary of the Invention
[0005] In view of this, the purpose of one or more embodiments of this application is to provide a task scheduling method and related equipment to solve the problems raised in the background art.
[0006] To achieve the aforementioned objective, one or more embodiments of this application provide a task scheduling method, including:
[0007] A task graph is generated based on the task information and network topology information of the tasks to be assigned. The nodes in the task graph represent the tasks to be assigned, the node values are the cluster contribution values of the tasks to be assigned, and the edges in the task graph represent the resource competition relationships between connected nodes.
[0008] According to the task graph, the tasks to be assigned are divided into multiple sets of tasks to be assigned; the scheduling priority of each set of tasks to be assigned is determined according to the cluster value of the set of tasks to be assigned, and the cluster value is the sum of the cluster contribution values of all tasks to be assigned in the set of tasks to be assigned. There is no resource competition relationship between the tasks in each set of tasks to be assigned.
[0009] Based on the scheduling priority of the set of tasks to be assigned and the task information of the tasks to be assigned in the set of tasks to be assigned, a network configuration for the tasks to be assigned is generated to schedule the tasks to be assigned.
[0010] Optionally, the cluster contribution value of the task to be assigned is used to quantify the contribution of the scheduling of the task to the improvement of cluster performance.
[0011] The cluster contribution value of any pending task is obtained by performing the following steps:
[0012] Identify competing tasks that have resource competition with the task to be assigned;
[0013] Evaluate the value gain of completing the assigned task, which represents the positive impact of completing the assigned task on cluster performance improvement;
[0014] Assess the value loss of waiting for the competing task, which represents the negative impact on cluster performance due to the waiting of the competing task caused by executing the assigned task;
[0015] The cluster contribution value of the task to be assigned is obtained based on the value gain and the value loss.
[0016] Optionally, the formula for calculating the cluster contribution value is:
[0017]
[0018] Among them, C j The cluster contribution value (CV) represents the task to be assigned. j The value rate of the task to be assigned is determined by dividing the value of the task to be assigned by the time cost of completing the task. (CV) k The value rate of the competitive task is determined by dividing the value of the competitive task by the time cost of completing it. M j This represents the set of competing tasks for the task to be assigned.
[0019] Optionally, based on the task graph, the tasks to be assigned are divided into multiple sets of tasks to be assigned, including iteratively executing the following steps:
[0020] Iterate through all unassigned tasks;
[0021] Based on the task graph, determine the first task to be assigned with the largest cluster contribution value among all tasks to be assigned, and all second tasks to be assigned that do not have resource competition with the first task to be assigned.
[0022] Based on the first task to be assigned and the second task to be assigned, construct a set of tasks to be assigned;
[0023] The first and second tasks to be assigned are marked as already assigned.
[0024] Optionally, in the task graph, each node is assigned a corresponding weight, which represents the scheduling priority of the task to be assigned to the node.
[0025] Based on the task graph, the tasks to be assigned are divided into multiple sets of tasks to be assigned, and the process further includes iteratively executing the following steps:
[0026] Iterate through all unassigned tasks;
[0027] Based on the task graph, determine the first task to be assigned with the largest product of cluster contribution value and corresponding node weight among all tasks to be assigned, and all second tasks to be assigned that do not have resource competition with the first task to be assigned.
[0028] Based on the first task to be assigned and the second task to be assigned, construct a set of tasks to be assigned;
[0029] The first and second tasks to be assigned are marked as already assigned.
[0030] Optionally, a task graph is generated based on the task information and network topology information of the tasks to be assigned, including:
[0031] Based on the task information of the task to be assigned, nodes are constructed in the task graph, with each node corresponding to one task to be assigned.
[0032] Based on the network topology information, the location of each computing node in the network is determined and a network topology map is generated;
[0033] Based on the task information of the task to be assigned, determine the communication route of the task to be assigned and mark it in the network topology diagram;
[0034] In response to the determination that the communication routes of any two tasks to be assigned intersect, the nodes corresponding to the two tasks to be assigned in the task graph are connected.
[0035] Optionally, based on the scheduling priority of the set of tasks to be assigned and the task information of the tasks to be assigned in the set of tasks to be assigned, a network configuration for the tasks to be assigned is generated, including:
[0036] Based on the scheduling priority of the set of tasks to be assigned, the server controller modifies the differential service code point field of the message corresponding to the task to be assigned in the set of tasks to be assigned, so as to adjust the priority of the task to be assigned.
[0037] Based on the task information of the tasks to be assigned in the set of tasks to be assigned, determine the maximum iteration time of each set of tasks to be assigned and the cross-matching model of the optical circuit switch;
[0038] The optical circuit switch is configured through the optical circuit switch controller based on the scheduling priority, maximum iteration duration, and cross-matching model of the set of tasks to be assigned.
[0039] Based on the same inventive concept, one or more embodiments of this application also provide a task scheduling device, including:
[0040] The first calculation module is configured to generate a task graph based on the task information and network topology information of the tasks to be assigned; the nodes in the task graph represent the tasks to be assigned, the node values are the cluster contribution values of the tasks to be assigned, and the edges in the task graph represent the resource competition relationship between connected nodes.
[0041] The second calculation module is configured to divide the tasks to be assigned into multiple sets of tasks to be assigned according to the task graph; the scheduling priority of the sets of tasks to be assigned is determined according to the cluster value of the sets of tasks to be assigned, the cluster value is the sum of the cluster contribution values of all tasks to be assigned in the sets of tasks to be assigned, and there is no resource competition relationship between the tasks in each set of tasks to be assigned.
[0042] The configuration module is configured to generate network configurations for the tasks to be assigned based on the scheduling priority of the task set and the task information of the tasks to be assigned in the task set, so as to schedule the tasks to be assigned.
[0043] Based on the same inventive concept, one or more embodiments of this application also provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the task scheduling method as described in any one of the claims.
[0044] Based on the same inventive concept, one or more embodiments of this application also provide a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute any of the described task scheduling methods.
[0045] As can be seen from the above, one or more embodiments of this application provide a method for generating a task graph based on the task information and network topology information of the tasks to be assigned. Nodes in the task graph represent tasks to be assigned, node values are the cluster contribution values of the tasks to be assigned, and edges in the task graph represent resource contention relationships between connected nodes. Based on the task graph, the tasks to be assigned are divided into multiple sets of tasks to be assigned. The scheduling priority of each set of tasks to be assigned is determined based on the cluster value of the set, where the set value is the sum of the cluster contribution values of all tasks to be assigned in the set, and there is no resource contention relationship among the tasks in each set. Based on the scheduling priority of each set of tasks to be assigned and the task information of the tasks to be assigned in the set, a network configuration for the tasks to be assigned is generated to schedule the tasks to be assigned.
[0046] In the technical solution of this application, a task graph is constructed to clearly show the competitive relationships between tasks and their contribution to the cluster. Based on this task graph, the task set is divided with the cluster contribution value as the objective, and tasks with high cluster contribution values are executed first, which effectively improves the cluster output capacity and maximizes the overall value.
[0047] The task scheduling device, electronic device, and computer-readable storage medium provided in this application can all implement the steps of the task scheduling method, and therefore also have the beneficial effects of the task scheduling method. Attached Figure Description
[0048] To more clearly illustrate the technical solutions in one or more embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only one or more embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0049] Figure 1 This is a flowchart illustrating a task scheduling method according to one or more embodiments of this application;
[0050] Figure 2 This is a schematic diagram of the structure of a task scheduling device according to one or more embodiments of this application;
[0051] Figure 3 This is a schematic diagram of inter-task contention in an optoelectronic hybrid switching network according to one or more embodiments of this application;
[0052] Figure 4 This is a schematic diagram illustrating the effect of the task scheduling strategy in one or more embodiments of this application;
[0053] Figure 5(a) is a schematic diagram of the working process of the analyzer according to one or more embodiments of this application;
[0054] Figure 5(b) is a schematic diagram of the working process of the analyzer according to one or more embodiments of this application;
[0055] Figure 6 This is a schematic diagram of the hardware structure of an electronic device according to one or more embodiments of this application. Detailed Implementation
[0056] To make the objectives, technical solutions, and advantages of this disclosure clearer, the following detailed description is provided in conjunction with specific embodiments and the accompanying drawings.
[0057] It should be noted that, unless otherwise defined, the technical or scientific terms used in one or more embodiments of this application should have the ordinary meaning understood by one of ordinary skill in the art to which this disclosure pertains. The terms "first," "second," and similar terms used in one or more embodiments of this application do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0058] As described in the background section, in related technologies, the task scheduling problem of communication networks usually focuses on pure electronic circuit switching scenarios.
[0059] However, with the development of science and technology, the internal traffic of communication network data centers is experiencing explosive growth. Adopting a 10GigE switching architecture at the access layer and a 40G / 100GigE switching architecture at the core layer has become the future development trend of data center networks. In this context, data center electrical interconnect architecture will face technical requirements of high bandwidth, large capacity, low overhead, and low energy consumption.
[0060] Taking one application scenario of this application as an example, Distributed Machine Learning (DML) is a method that utilizes multiple computing devices to collaboratively execute machine learning tasks. Considering the ever-increasing volume of data and the growing complexity of artificial intelligence models, traditional single-accelerator learning methods are insufficient. Related technologies address these issues by distributing computing tasks across multiple accelerators to accelerate model training and process large-scale datasets. To further adapt to the frequent communication requirements of DML technology, related technologies optimize parallelization strategies and ensemble communication algorithms.
[0061] The parallelization strategies described above can be categorized into data parallelism, model parallelism, and hybrid parallelism, depending on the partitioning and distribution of the task. Data parallelism divides large-scale datasets into multiple subsets, each assigned to a different computing node for parallel processing, thereby improving computational performance. In this framework, all nodes independently execute the same operation or algorithm on their respective data subsets. The final output is then obtained by aggregating the computational results from each node. Model parallelism is a technique for distributing components of a neural network model across multiple nodes to accelerate the training process. It primarily involves two methods: tensor parallelism and pipeline parallelism. Tensor parallelism involves partitioning the model's tensors (such as weight matrices) along specific dimensions and distributing these partitions across multiple nodes for parallel computation. Pipeline parallelism, on the other hand, divides the model into different layers, with each node responsible for executing a different subset of the model layer. By distributing the computational load, model parallelism reduces the resource requirements of individual nodes, thus facilitating the training of large-scale models. Hybrid parallelism combines the aforementioned parallelization strategies, supporting the processing of even larger datasets and models. However, the complex parallel strategies and large-scale distributed computing mean that DML tasks require a large number of nodes to participate in a complex parameter synchronization process to ensure the consistency of the calculation results, which increases the difficulty of implementing communication between workers.
[0062] Aggregate communication (such as AllReduce, AllGather, Broadcast, and All-to-All) is typically used to facilitate parameter synchronization among DML workers. These operators exhibit characteristics of synchronous communication, where all workers must complete data transmission, reception, and processing before proceeding to the next communication stage. Represented by Ring-AllReduce, this method organizes compute nodes into a ring topology, allowing for the sequential delivery and aggregation of data blocks. During each iteration of data transmission and aggregation, all workers must synchronize and wait for each other to ensure the consistency of the aggregation results. The synchronization requirements of these aggregate communication operators necessitate a stable physical topology and sufficient bandwidth resources in the network infrastructure, which is crucial for mitigating the impact of tail latency, as tail latency significantly degrades aggregate communication performance.
[0063] In addition, the network performance of the training cluster is a key factor affecting the speed of distributed training. With the improvement of computing power of hardware accelerators such as GPUs and TPUs, and the continuous expansion of cluster size, network bandwidth has gradually become a bottleneck factor restricting end-to-end training performance.
[0064] At this point, considering the low latency, low power consumption, and rate transparency of OCS network optical circuit switches, the deployment of OCS networks can significantly reduce the construction cost of data center networks. The reconfigurability of OCS networks allows the network to dynamically adjust its physical topology according to AI workloads, making it ideal for DML tasks. Related technologies have also proposed introducing OCS networks into training clusters to compensate for the bandwidth and latency disadvantages of electrical packet switches, while reconfigurable optical interconnects enhance the dynamic nature of the network topology to cope with changing communication needs. Optical circuit switching technology can effectively address these challenges. Optical circuit switching technology, through space division, time division, or wavelength division, directly switches input signals to different outputs in the optical domain without any optical / electrical conversion. Compared to electrical packet switching, optical switching does not require optical / electrical or electrical / optical conversion between fiber optic transmission lines and switches, and during the switching process, it can fully utilize the advantages of high speed, wide bandwidth, and no electromagnetic induction of optical signals. Since optical switching does not involve electrical signals, it is not limited by the processing speed of electronic devices, can be matched with high-speed fiber optic transmission rates, and is independent of the communication protocol, data format, and transmission rate, enabling transparent data transmission.
[0065] Optical switching architecture ensures that resources are dedicated to specific DML tasks, with each task independently occupying the required optical circuit connections, thus avoiding mutual interference. This is because OCS networks can only establish one-to-one circuit connections concurrently, and due to reconfiguration latency limitations, static slicing resource allocation guarantees DML task performance. However, this resource allocation strategy leads to significant bandwidth waste. Considering the existing traffic patterns of AI workloads, the periodic bursts of traffic generated by DML tasks cannot continuously utilize link bandwidth, resulting in a large amount of idle link bandwidth due to dedicated resource allocation. Sharing link resource allocation among multiple tasks can alleviate the bandwidth idleness problem, enabling the cluster to accommodate more compute nodes and tasks, thus enhancing cluster scalability.
[0066] However, due to port limitations in OCS networks, traffic from different tasks cannot simultaneously share the same port. For example, in practical applications, given that DML tasks require frequent synchronous communication, it is advantageous to group physically close hardware into a set of compute nodes when deploying new DML tasks. However, the dynamic arrival and departure of tasks often leads to the dispersion of computing resources within the DML cluster. Utilization of these dispersed resources can result in a situation where a single DML task is distributed across multiple racks, and multiple tasks are deployed on the same rack. In this case, multiple tasks sharing the same rack cannot simultaneously establish the required optical path connections because the Top of Rack (ToR) can only establish an optical path connection with one unique ToR at any given time. This limitation leads to communication contention between tasks. Figure 3 For example, Task 3 shares a ToR switch with Task 1 and Task 2 respectively. Specifically, the target ToR for task traffic differs from the target ToRs of Task 1 and Task 2. Therefore, the OCS network cannot simultaneously meet the communication needs of all three tasks, leading to optical path connection contention between Task 3 and the other two tasks. Communication scheduling is a critical issue that optical DML clusters must address.
[0067] However, as mentioned in the background section, current task scheduling optimization schemes are mainly geared towards pure electric switching network scenarios. The optimization methods proposed in these studies may not be applicable to optical switching networks.
[0068] Specifically, in purely electrical switching networks, task processing and forwarding rely on the computing power of electronic devices and the bandwidth of the network. Therefore, scheduling strategies typically prioritize reducing latency and accelerating task completion to improve overall system efficiency. However, optical circuit-switched networks transmit optical signals, avoiding the bottleneck of electronic processing. Consequently, optimization scheduling strategies aimed at reducing latency and accelerating task completion are no longer suitable for optical circuit-switched networks.
[0069] From another perspective, existing traffic scheduling methods tailored for optical switching networks do not fully capture the unique characteristics of DML tasks. While these methods are generally designed to optimize Job Completion Time (JCT), prioritizing only JCT can compromise the overall value generated by the DML cluster. In commercial DML clusters, the value hierarchy among tasks significantly impacts scheduling efficiency.
[0070] Therefore, this application proposes a task scheduling method to solve the aforementioned technical problems. In the technical solution of this application, a task graph is constructed to clearly show the competitive relationships between tasks and their contribution to the cluster. Based on this task graph, the task set is divided according to the cluster contribution value, and tasks with higher cluster contribution values are executed first, effectively improving the cluster's output capacity and maximizing overall value.
[0071] like Figure 4 The figure shows a test experiment of the technical solution of this application. The three tasks in the figure represent different types of artificial intelligence model training tasks: Task 1, representing a large-scale language model training task, has the highest value; Task 2, corresponding to a traditional artificial intelligence model, has the next highest value; and Task 3, used for experimental testing, has the lowest value (i.e., in order of value, Task 1 > Task 2 > Task 3). When Task 3 is prioritized, it will block the optical path connection required by Task 1 and Task 2, causing them to experience delays while waiting for resource availability. However, since Task 1 and Task 2 are deployed on different racks, they will not compete for the same optical path connection. Therefore, prioritizing the concurrent scheduling of Task 1 and Task 2 can maximize the output of the cluster and enhance the overall value generation, thus highlighting the necessity of customizing optimization strategies according to the specific needs of DML task load in the optical network.
[0072] The technical solution of this application is described in detail below. (Reference) Figure 1 The task scheduling method of one or more embodiments of this application includes the following steps:
[0073] Step S101: Generate a task graph based on the task information and network topology information of the tasks to be assigned; the nodes in the task graph represent the tasks to be assigned, the node value is the cluster contribution value of the tasks to be assigned, and the edges in the task graph represent the resource competition relationship between connected nodes.
[0074] Step S102: According to the task graph, the tasks to be assigned are divided into multiple sets of tasks to be assigned; the scheduling priority of the sets of tasks to be assigned is determined according to the cluster value of the sets of tasks to be assigned. The cluster value is the sum of the cluster contribution values of all tasks to be assigned in the sets of tasks to be assigned. There is no resource competition relationship between the tasks in each set of tasks to be assigned.
[0075] Step S103: Generate the network configuration of the tasks to be assigned based on the scheduling priority of the task set to be assigned and the task information of the tasks to be assigned in the task set to be assigned, so as to schedule the tasks to be assigned.
[0076] To maximize cluster value, this application creatively proposes a "Maximum Value Contribution First (MVCF)" scheduling algorithm. The core principle of the MVCF algorithm is to divide all tasks into several groups, ensuring no competition within each group; to calculate the cluster contribution value of each group as a whole, and to determine the scheduling priority based on its cluster contribution value. Considering the enormous search space for group partitioning and the complex relationships between tasks, step S101 of this application first constructs a task graph of the tasks to be assigned based on the above principles to address the aforementioned problem.
[0077] In other words, in the technical solution of this application, the determination of the priority of the tasks to be assigned mainly depends on the cluster contribution value of the tasks to be assigned and the resource conflict relationship between the tasks and other tasks to be assigned. The task graph in step S101 aims to show the resource competition relationship of all tasks to be assigned and the cluster contribution value of the tasks, thereby serving as the basis for assigning task priorities.
[0078] In embodiments of this application, the method for constructing a task graph may include: constructing nodes in the task graph based on the task information of the tasks to be assigned, with each node corresponding to one task to be assigned; determining the location of each computing node in the network and generating a network topology graph based on the network topology information; determining the communication route of the tasks to be assigned based on the task information of the tasks to be assigned, and marking it in the network topology graph; and connecting the nodes corresponding to the two tasks to be assigned in the task graph in response to determining that the communication routes of any two tasks to be assigned intersect.
[0079] In addition to constructing the topology of the task graph, this application also uses node values to represent the contribution value of the task to be assigned to the cluster. Specifically, in the embodiments of this application, the contribution value of the task to be assigned can be obtained through the following steps: identifying competing tasks that have resource competition with the task to be assigned; evaluating the value gain of completing the task to be assigned, where the value gain represents the positive impact of completing the task to be assigned on improving cluster performance; evaluating the value loss of waiting for the competing task, where the value loss represents the negative impact of waiting for the competing task due to executing the task to be assigned on improving cluster performance; and obtaining the cluster contribution value of the task to be assigned based on the value gain and the value loss.
[0080] Furthermore, in the embodiments of this application, the formula for calculating the cluster contribution value can be:
[0081]
[0082] Among them, C j The cluster contribution value (CV) represents the task to be assigned. j The value rate of the task to be assigned is determined by dividing the value of the task to be assigned by the time cost of completing the task. (CV) k The value rate of the competitive task is determined by dividing the value of the competitive task by the time cost of completing it. M j This represents the set of competing tasks for the task to be assigned.
[0083] It can be seen that when calculating the cluster contribution value of the task to be assigned, this application needs to consider not only the value that the task can bring, but also the blocking effect of the task on other tasks.
[0084] In the embodiments of this application, a preset profiler can be used to construct the task graph.
[0085] As mentioned above, the cluster contribution value of a task to be assigned reflects its own value and its blocking effect on other tasks. Therefore, tasks with higher cluster value contributions are more likely to appear in groups with higher total value. In the embodiments of this application, the set of tasks to be assigned can be divided based on this principle.
[0086] In step S102, the tasks to be assigned are divided into multiple sets of tasks to be assigned, including iteratively executing the following steps: traversing all undivided tasks to be assigned; determining, according to the task graph, the first task to be assigned with the largest cluster contribution value among all tasks to be assigned, and all second tasks to be assigned that do not have resource competition with the first task to be assigned; constructing a set of tasks to be assigned based on the first task to be assigned and the second task to be assigned; and marking the first task to be assigned and the second task to be assigned as divided.
[0087] Furthermore, embodiments of this application may also comprehensively consider the weight of nodes, which represents the scheduling priority of the task to be assigned corresponding to the node. Thus, according to the task graph, dividing the task to be assigned into multiple sets of task to be assigned further includes iteratively executing the following steps: traversing all undivided task to be assigned; determining, according to the task graph, the first task to be assigned with the largest product of cluster contribution value and corresponding node weight, and all second tasks to be assigned that do not have resource contention with the first task to be assigned; constructing a set of task to be assigned based on the first task to be assigned and the second task to be assigned; and marking the first task to be assigned and the second task to be assigned as divided.
[0088] The above operations aim to treat each group as a whole, calculate its value, and determine the scheduling priority based on its value. By dividing all tasks into several groups in this way, ensuring no competition within each group, the set of compatible tasks with the highest total value is identified.
[0089] The scheduling queue obtained in steps S101-S102 represents the highest-level decision result, but does not generate the final network configuration. Therefore, in the embodiments of this application, a controller is designed to automatically generate the corresponding network device configuration. This controller can consist of two parts: a server controller managing the electrical network and an optical circuit switch controller managing the optical network. The server controller assigns priorities to the traffic of each task according to the scheduling queue. Specifically, each set in the scheduling queue is assigned a corresponding priority, which is then shared by all task flows within that set. The optical circuit switch controller can first calculate the required optical path connections for each set in the scheduling queue, representing the optical circuit switch cross-matching of any set of tasks to be assigned as an optical circuit switch cross-matching model; then, the optical circuit switch controller sets the duration of each optical circuit switch cross-matching model based on the maximum iteration duration in each set. This method reduces the frequency of optical circuit switch reconfiguration, minimizing throughput loss caused by reconfiguration latency.
[0090] In other words, based on the scheduling priority of the set of tasks to be assigned and the task information of the tasks to be assigned in the set of tasks to be assigned, the network configuration of the tasks to be assigned is generated, including: modifying the differential service code point field of the corresponding packets of the tasks to be assigned in the set of tasks to be assigned through the server controller according to the scheduling priority of the set of tasks to be assigned, so as to adjust the priority of the tasks to be assigned; determining the maximum iteration duration and optical circuit switch cross-matching model of each set of tasks to be assigned based on the task information of the tasks to be assigned in the set of tasks to be assigned; and configuring the optical circuit switch through the optical circuit switch controller according to the scheduling priority, maximum iteration duration and cross-matching model of the set of tasks to be assigned.
[0091] The following describes this application in further detail using a specific embodiment. As shown in Figure 5(a), the cluster in this embodiment has 6 tasks deployed, and the task deployment and network topology are shown in the figure. Based on the task deployment, it can be analyzed that task 1 has resource competition with tasks 4 and 2; task 2 has resource competition with tasks 1, 3, and 5; task 3 has resource competition with tasks 2, 5, and 6; task 4 has resource competition with tasks 1 and 2; task 5 has resource competition with tasks 2 and 3; and task 6 has resource competition with task 3.
[0092] In the embodiments of this application, the node positions in the task can be determined first based on the task deployment location, and then the nodes in the task graph can be connected according to the resource competition relationship between tasks to obtain the task graph topology structure shown in Figure 5(b). In this embodiment, the cluster contribution value relationship of each node is known after calculation: C6>C3>C5>C4>C2>C1.
[0093] Then, the MVCF scheduling algorithm proposed in this application can be executed to divide the set of tasks to be assigned. In this embodiment, firstly, by traversing the system, it is determined that task 6 has the largest cluster contribution value, and task 6 is added to the first set of tasks to be assigned. Among tasks 1, 2, 4, and 5 that are compatible with task 6, task 5 has the largest cluster contribution value, and task 5 is added to the first set of tasks to be assigned. Tasks 1 and 4 are compatible with both task 6 and task 5, and task 4, which has a larger cluster contribution value, is added to the first set of tasks to be assigned. Since task 1 is not compatible with task 4, task 1 cannot be added to the first set of tasks to be assigned. Other sets of tasks to be assigned are divided based on the same principle. In this embodiment, three sets of tasks to be assigned are finally obtained: S1{task 4, task 5, task 6}, S2{task 3, task 1}, and S3{task 2}.
[0094] In the embodiments of this application, tasks 6, 3, and 2 are the tasks with the longest iteration cycles in their respective sets. The OCS controller can calculate the required OCS optical circuit switch cross-matching models M1, M2, and M3 for these three task sets. Then, M1 and its configuration time (iteration duration of task 6), M2 and its configuration time (iteration duration of task 3), and M3 and its configuration time (iteration duration of task 2) are configured in the OCS, causing them to be periodically reconfigured. Finally, the server controller assigns different priorities to the traffic of S1, S2, and S3 respectively, achieving priority allocation by modifying the dscp field of the corresponding packets.
[0095] It is understandable that this method can be executed by any device, equipment, platform, or cluster of devices with computing and processing capabilities.
[0096] It should be noted that the methods of one or more embodiments of this application can be executed by a single device, such as a computer or server. The methods of this embodiment can also be applied in a distributed scenario, where multiple devices cooperate to complete the process. In such a distributed scenario, one of these devices may execute only one or more steps of the methods of one or more embodiments of this application, and the multiple devices will interact with each other to complete the method described.
[0097] It should be noted that the description focuses on specific embodiments of this application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims may be performed in a different order than those shown in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0098] Based on the same inventive concept, and corresponding to the methods of any of the described embodiments, this application also provides a task scheduling device. For example... Figure 2 As shown, the device includes:
[0099] The first calculation module 11 is configured to generate a task graph based on the task information and network topology information of the task to be assigned; the nodes in the task graph represent the task to be assigned, the node value is the cluster contribution value of the task to be assigned, and the edges in the task graph represent the resource competition relationship between connected nodes.
[0100] The second calculation module 12 is configured to divide the tasks to be assigned into multiple sets of tasks to be assigned according to the task graph; the scheduling priority of the sets of tasks to be assigned is determined according to the cluster value of the sets of tasks to be assigned, the set value is the sum of the cluster contribution values of all tasks to be assigned in the sets of tasks to be assigned, and there is no resource competition relationship between the tasks in each set of tasks to be assigned.
[0101] The configuration module 13 is configured to generate a network configuration for the tasks to be assigned based on the scheduling priority of the task set and the task information of the tasks to be assigned in the task set, so as to schedule the tasks to be assigned.
[0102] For ease of description, the above apparatus is described in terms of its functions, divided into various modules. Of course, when implementing one or more embodiments of this application, the functions of each module can be implemented in one or more software and / or hardware.
[0103] The apparatus described in this embodiment is used to implement the corresponding methods in the foregoing embodiments and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0104] Figure 6 This embodiment illustrates a more specific hardware structure of an electronic device, which may include a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, memory 1020, input / output interface 1030, and communication interface 1040 are interconnected internally via the bus 1050.
[0105] The processor 1010 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application.
[0106] The memory 1020 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 can store the operating system and other applications. When the technical solutions provided in the embodiments of this application are implemented by software or firmware, the relevant program code is stored in the memory 1020 and is called and executed by the processor 1010.
[0107] The input / output interface 1030 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components within the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touchscreens, microphones, various sensors, etc., while output devices may include displays, speakers, vibrators, indicator lights, etc.
[0108] The communication interface 1040 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0109] Bus 1050 includes a pathway for transmitting information between various components of the device, such as processor 1010, memory 1020, input / output interface 1030, and communication interface 1040.
[0110] It should be noted that although the device only shows the processor 1010, memory 1020, input / output interface 1030, communication interface 1040, and bus 1050, in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the device may only include the components necessary for implementing the embodiments of this application, and not necessarily all the components shown in the figures.
[0111] The electronic device described in this embodiment is used to implement the corresponding methods in the foregoing embodiments and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0112] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.
[0113] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of this disclosure (including the claims) is limited to these examples; within the framework of this disclosure, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of one or more embodiments of this application as described above, which are not provided in detail for the sake of brevity.
[0114] Additionally, to simplify the description and discussion, and to avoid obscuring one or more embodiments of this application, the well-known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided drawings. Furthermore, the apparatus may be illustrated in block diagram form to avoid obscuring one or more embodiments of this application, and this also takes into account the fact that the details of implementation of these block diagram apparatuses are highly dependent on the platform on which one or more embodiments of this application will be implemented (i.e., these details should be fully understood by those skilled in the art). While specific details (e.g., circuits) have been set forth to describe exemplary embodiments of this disclosure, it will be apparent to those skilled in the art that one or more embodiments of this application may be implemented without these specific details or with variations thereof. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0115] Although this disclosure has been described in conjunction with specific embodiments thereof, many substitutions, modifications, and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may be used with the embodiments discussed.
[0116] One or more embodiments of this application are intended to cover all such substitutions, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of one or more embodiments of this application should be included within the protection scope of this disclosure.
Claims
1. A task scheduling method, characterized in that, include: A task graph is generated based on the task information and network topology information of the tasks to be assigned. Nodes in the task graph represent tasks to be assigned, and node values are the cluster contribution values of those tasks. Edges in the task graph represent resource contention relationships between connected nodes. The cluster contribution value of a task to be assigned quantifies the contribution of scheduling that task to improving cluster performance. The cluster contribution value is determined based on the value gain of the task to be assigned and the value loss of waiting for competing tasks that have resource contention with it. The value gain represents the positive impact of completing the task to be assigned on improving cluster performance, and the value loss represents the negative impact of waiting for competing tasks caused by executing the task to be assigned on improving cluster performance. The formula for calculating the cluster contribution value is: Among them, C j The cluster contribution value (CV) represents the task to be assigned. j The value rate of the task to be assigned is determined by dividing the value of the task to be assigned by the time cost of completing the task. (CV) k The value rate of the competitive task is determined by dividing the value of the competitive task by the time cost of completing it. M j This represents the set of competing tasks for the task to be assigned; According to the task graph, the tasks to be assigned are divided into multiple sets of tasks to be assigned; the scheduling priority of each set of tasks to be assigned is determined according to the cluster value of the set of tasks to be assigned, and the cluster value is the sum of the cluster contribution values of all tasks to be assigned in the set of tasks to be assigned. There is no resource competition relationship between the tasks in each set of tasks to be assigned. Based on the scheduling priority of the set of tasks to be assigned and the task information of the tasks to be assigned in the set of tasks to be assigned, a network configuration for the tasks to be assigned is generated to schedule the tasks to be assigned.
2. The method according to claim 1, characterized in that, Based on the task graph, the tasks to be assigned are divided into multiple sets of tasks to be assigned, including iteratively executing the following steps: Iterate through all unassigned tasks; Based on the task graph, determine the first task to be assigned with the largest cluster contribution value among all tasks to be assigned, and all second tasks to be assigned that do not have resource competition with the first task to be assigned. Based on the first task to be assigned and the second task to be assigned, construct a set of tasks to be assigned; The first and second tasks to be assigned are marked as already assigned.
3. The method according to claim 1, characterized in that, In the task graph, each node is assigned a corresponding weight, which represents the scheduling priority of the task to be assigned to the node. Based on the task graph, the tasks to be assigned are divided into multiple sets of tasks to be assigned, and the process further includes iteratively executing the following steps: Iterate through all unassigned tasks; Based on the task graph, determine the first task to be assigned with the largest product of cluster contribution value and corresponding node weight among all tasks to be assigned, and all second tasks to be assigned that do not have resource competition with the first task to be assigned. Based on the first task to be assigned and the second task to be assigned, construct a set of tasks to be assigned; The first and second tasks to be assigned are marked as already assigned.
4. The method according to claim 1, characterized in that, Based on the task information and network topology information of the tasks to be assigned, a task graph is generated, including: Based on the task information of the task to be assigned, nodes are constructed in the task graph, with each node corresponding to one task to be assigned. Based on the network topology information, the location of each computing node in the network is determined and a network topology map is generated; Based on the task information of the task to be assigned, determine the communication route of the task to be assigned and mark it in the network topology diagram; In response to the determination that the communication routes of any two tasks to be assigned intersect, the nodes corresponding to the two tasks to be assigned in the task graph are connected.
5. The method according to claim 1, characterized in that, Based on the scheduling priority of the set of tasks to be assigned and the task information of the tasks to be assigned in the set of tasks to be assigned, the network configuration of the tasks to be assigned is generated, including: Based on the scheduling priority of the set of tasks to be assigned, the server controller modifies the differential service code point field of the message corresponding to the task to be assigned in the set of tasks to be assigned, so as to adjust the priority of the task to be assigned. Based on the task information of the tasks to be assigned in the set of tasks to be assigned, determine the maximum iteration time of each set of tasks to be assigned and the cross-matching model of the optical circuit switch; The optical circuit switch is configured through the optical circuit switch controller based on the scheduling priority, maximum iteration duration, and cross-matching model of the set of tasks to be assigned.
6. A task scheduling device, characterized in that, include: The first calculation module is configured to generate a task graph based on the task information and network topology information of the tasks to be assigned. Nodes in the task graph represent tasks to be assigned, and node values are the cluster contribution values of those tasks. Edges in the task graph represent resource contention relationships between connected nodes. The cluster contribution value of a task to be assigned quantifies the contribution of scheduling that task to improving cluster performance. The cluster contribution value is determined based on the value gain of the task to be assigned and the value loss of waiting for competing tasks that have resource contention with it. The value gain represents the positive impact of completing the task to be assigned on improving cluster performance, and the value loss represents the negative impact of waiting for competing tasks caused by executing the task to be assigned on improving cluster performance. The formula for calculating the cluster contribution value is: Among them, C j The cluster contribution value (CV) represents the task to be assigned. j The value rate of the task to be assigned is determined by dividing the value of the task to be assigned by the time cost of completing the task. (CV) k The value rate of the competitive task is determined by dividing the value of the competitive task by the time cost of completing it. M j This represents the set of competing tasks for the task to be assigned; The second calculation module is configured to divide the tasks to be assigned into multiple sets of tasks to be assigned according to the task graph; the scheduling priority of the sets of tasks to be assigned is determined according to the cluster value of the sets of tasks to be assigned, the cluster value is the sum of the cluster contribution values of all tasks to be assigned in the sets of tasks to be assigned, and there is no resource competition relationship between the tasks in each set of tasks to be assigned. The configuration module is configured to generate network configurations for the tasks to be assigned based on the scheduling priority of the task set and the task information of the tasks to be assigned in the task set, so as to schedule the tasks to be assigned.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 5.
8. A non-transitory computer-readable storage medium, characterized in that, The non-transitory computer-readable storage medium stores computer instructions for causing the computer to perform the method of any one of claims 1 to 5.
Citation Information
Patent Citations
Method and system for realizing resource scheduling based on cloud computing
CN118819870A
Task allocation method, device and equipment based on distributed cluster
CN119127415A