Task scheduling method, device, electronic device and computer-readable storage medium

By building a hypergraph and using hypergraph neural networks and deep reinforcement learning to generate scheduling decisions, the problem of low task scheduling efficiency in distributed edge computing is solved, more efficient task scheduling is achieved, and latency and energy consumption are reduced.

CN119781924BActive Publication Date: 2025-10-03TIANJIN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411817533.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-10-03
Estimated Expiration
2044-12-11

AI Technical Summary

Technical Problem

In existing distributed edge computing, task scheduling decisions that rely on directed acyclic graph planning have shortcomings in parallel computing efficiency, especially when computing tasks increase significantly in generative artificial intelligence applications, it is difficult to meet the needs of efficient computing.

Method used

A hypergraph of task requests is constructed, and a hypergraph neural network is used to process the task graph embedding. Scheduling decisions are generated through deep reinforcement learning to reduce the delay and energy consumption of task scheduling. The hypergraph includes sequential hyperedge sets, attribute hyperedge sets, and distance hyperedge sets. Rewards are set based on task size, execution result size, and scheduling decisions.

Benefits of technology

It improves the parallel computing efficiency of task scheduling, reduces latency and energy consumption, and especially demonstrates higher computing performance in generative artificial intelligence applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119781924B_ABST
    Figure CN119781924B_ABST
Patent Text Reader

Abstract

The present application provides a task scheduling method, device, electronic device and computer-readable storage medium, which relate to the field of distributed edge computing technology. The method includes: obtaining at least one directed acyclic graph of L task requests generated by M UDs; constructing a hypergraph of L task requests based on at least one directed acyclic graph; processing the hypergraph through a hypergraph neural network to obtain a task graph embedding; taking the task size, execution result size, task graph embedding and scheduling decision of each task request as the state, taking the scheduling decision as the action of reinforcement learning, setting rewards with the goal of reducing the delay and energy consumption of task scheduling as the goal of reinforcement learning, performing deep reinforcement learning, and generating target scheduling decisions; performing task scheduling on L task requests on N RPs and M UDs based on the target scheduling decisions. The scheduling decisions generated in this way can have higher parallel computing efficiency when executed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of distributed edge computing technology, and in particular to a task scheduling method, device, electronic device, and computer-readable storage medium. Background Art

[0002] Distributed Edge Computing (DEC) enhances parallel processing across user devices (UDs), reducing computation time and overall energy consumption. For example, in autonomous driving applications, tasks such as vehicle motion analysis and image feature extraction can be distributed to nearby idle resource pools (RPs) to speed up the computation process while saving energy.

[0003] In related technologies, tasks in applications exhibit significant parallelism and sequential dependencies, so most studies use directed acyclic graphs (DAGs) to represent the task requests of applications and thus plan task scheduling.

[0004] However, with the rise of generative artificial intelligence applications, computing tasks have increased significantly, which has put higher requirements on the parallel computing efficiency of DEC. Scheduling decisions obtained by relying solely on one or more DAG plans have the problem of low parallel computing efficiency during execution. Summary of the Invention

[0005] The present application provides a task scheduling method, device, electronic device and computer-readable storage medium, which at least to some extent overcome the problem of low parallel computing efficiency when executing scheduling decisions obtained by relying on one or more DAG plans in related technologies.

[0006] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by practice of the present application.

[0007] According to one aspect of the present application, a task scheduling method is provided, which is applied to a task scheduling system, wherein the task scheduling system includes N RPs and M UDs, where N and M are both integers not less than 1, and includes: obtaining at least one directed acyclic graph of L task requests generated by the M UDs, where L is an integer greater than 1; constructing a hypergraph of the L task requests based on the at least one directed acyclic graph, wherein the vertex set of the hypergraph includes the L task requests, the hyperedge set of the hypergraph includes a sequential hyperedge set, and the sequential hyperedge set includes edges in the at least one directed acyclic graph; processing the hypergraph through a hypergraph neural network to obtain a task graph embedding; taking the task size, execution result size, task graph embedding and scheduling decision of each task request as states, taking the scheduling decision as an action of reinforcement learning, setting a reward with reducing the delay and energy consumption of task scheduling as the goal of reinforcement learning, performing deep reinforcement learning, and generating a target scheduling decision; and scheduling the L task requests on the N RPs and the M UDs based on the target scheduling decision.

[0008] In some embodiments, the superedge set also includes: the superedge set also includes: at least one of an attribute superedge set, a distance superedge set and a hypergraph partition superedge set; wherein, the attribute superedge set is obtained by clustering the L task requests according to the network properties of the M UDs, the distance superedge set includes a hyperedge composed of each vertex in the at least one directed acyclic graph and a vertex with a preset directed distance, and the hypergraph partition hyperedge set is obtained by performing hypergraph partitioning on the sequential hyperedge set, the distance hyperedge set and the attribute hyperedge.

[0009] In some embodiments, the reward is expressed as the following formula:

[0010]

[0011] Where t represents the time step, R t is the reward for scheduling the i-th task request according to the scheduling decision at time t; Δ(.) indicates that the content in (.) is a negative increment; when the i-th task request belongs to the task request on the critical path, σ m =1, when the i-th task request is not a task request on the critical path σ m =0; is the discriminator, To judge σ m Is it equal to 1? If σ m =1 The value of is equal to 1, if σ m ≠1 The value of is equal to 0; To judge σ m Is it equal to 0? If σ m =0 The value of is equal to 1, if σ m ≠0 The value of is equal to 0; is the execution location from the 1st task request to the i-th task request, is the execution position of task i at time step t When , the time when the i-th task request is completed; w h 、w l are weight coefficients, and w h >w l ; is the total energy consumption of completing the 1st to i-th task requests at time step t; is the total energy consumption of completing the 1st to i-1th task requests when the time step is t; the critical path is the path with the longest time required to complete all task requests among the paths included in the at least one directed acyclic graph.

[0012] In some embodiments, the total delay for completing the scheduling of the L task requests is calculated using the following formula:

[0013]

[0014] in, The total delay for completing scheduling for the L task requests; The execution location of the 1st task request to the Lth task request; is a set of task requests that have no subsequent task requests among the L task requests; The requested completion time for the i-th task; is the available time of the execution location where the i-th task request is located; AL(i) is the set of parent tasks that have been executed before the i-th task request; is the requested completion time for the jth task, represents the latest completion time among the completion times corresponding to AL(i); The computation delay requested for the i-th task; The transmission delay requested by the i-th task; z i is the execution location requested by the i-th task, z k The execution location requested for the kth task; In z i =z k The value is 1 at z i ≠z k The value is 0 when f m is the CPU frequency of the mth UD, f n is the CPU frequency of the nth RP; D i The task size requested for the i-th task; is the delay of uploading the i-th task request to RP, The delay in downloading the execution result of the i-th task request; The transmission rate of data uploaded from UD to RP. R is the download rate of data transmitted from UD to RP; i The size of the execution result requested for the i-th task; The wireless bandwidth when UD downloads data from RP; Wireless bandwidth for UD to upload data to RP; represents the variance of white noise in a complex Gaussian channel; represents the forward transmission power; represents the forward channel gain; represents the backward transmission power; represents the backward channel gain.

[0015] In some embodiments, the total energy consumption for completing the i-th task request is expressed as follows:

[0016]

[0017] Among them, E i The total energy consumption required to complete the i-th task; The computing energy consumption required to complete the i-th task request; The transmission energy consumption required to complete the i-th task request; z i is the execution location requested by the i-th task, z i = 0 means that the i-th task request is executed locally on UD, z i =n means that the i-th task is requested to be executed on the n-th RP; is the energy consumption requested to be uploaded to RP for the i-th task, The energy consumption of downloading the execution result of the i-th task request; The time used to download the execution result of the i-th task request, is the time taken to upload the i-th task request to the RP; q is the execution location of the i-th task request, which is one of the N RPs or the UD that generates the i-th task request; ρ q is the power coefficient q; f n,m (q) is the CPU frequency of q; α q is the dynamic power index of q; The time taken to execute the i-th task request.

[0018] In some embodiments, both the encoder and decoder used in deep reinforcement learning are gated recurrent units (GRU).

[0019] According to another aspect of the present application, a task scheduling device is also provided, which is applied to a task scheduling system, wherein the task scheduling system includes N RPs and M UDs, where N and M are both integers not less than 1, and includes: an acquisition module for acquiring at least one directed acyclic graph of L task requests generated by the M UDs, where L is an integer greater than 1; a hypergraph construction module for constructing a hypergraph of the L task requests based on the at least one directed acyclic graph, wherein the vertex set of the hypergraph includes the L task requests, the hyperedge set of the hypergraph includes a sequential hyperedge set, and the sequential hyperedge set includes all an edge in the at least one directed acyclic graph; a processing module for processing the hypergraph through a hypergraph neural network to obtain a task graph embedding; a generation module for taking the task size, execution result size, the task graph embedding and scheduling decision of each task request as states, taking the scheduling decision as an action of reinforcement learning, setting a reward with reducing the delay and energy consumption of task scheduling as the goal of reinforcement learning, performing deep reinforcement learning, and generating a target scheduling decision; a scheduling module for scheduling the L task requests on the N RPs and the M UDs according to the target scheduling decision.

[0020] According to another aspect of the present application, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any one of the above-described task scheduling methods by executing the executable instructions.

[0021] According to another aspect of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, it implements any one of the task scheduling methods described above.

[0022] According to another aspect of the present application, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the computer program implements any one of the above-mentioned task scheduling methods.

[0023] The technical solutions provided in the embodiments of the present application include at least the following beneficial effects:

[0024] The technical solution provided in the embodiments of the present application uses at least one directed acyclic graph corresponding to L task requests to construct a hypergraph including a sequential hyperedge set. When at least one directed acyclic graph is a plurality of directed acyclic graphs, the multiple dependencies between the L task requests can be better described, and the sequential relationship between the tasks can be better represented by the sequential hyperedge set. By processing the hypergraph using a hypergraph neural network, the high-order attribute correlation in the multiple dependencies of the task requests can be captured, thereby providing richer contextual information for the subsequent generation of scheduling decisions through reinforcement learning, so that the generated scheduling decisions can have higher parallel computing efficiency when executed compared to the scheduling decisions obtained by relying solely on at least one directed acyclic graph planning. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] The accompanying drawings are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and those skilled in the art can derive other drawings based on these drawings without inventive effort.

[0026] Figure 1 A schematic diagram showing a task scheduling system in one embodiment of the present application is shown;

[0027] Figure 2 A schematic diagram showing a task scheduling system in another embodiment of the present application is shown;

[0028] Figure 3 A flowchart of a task scheduling method according to an embodiment of the present application is shown;

[0029] Figure 4 A schematic diagram showing two directed acyclic graphs in one embodiment of the present application is shown;

[0030] Figure 5 A schematic diagram of a task scheduling device in one embodiment of the present application is shown;

[0031] Figure 6 A structural block diagram of an electronic device in one embodiment of the present application is shown. DETAILED DESCRIPTION

[0032] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete and will fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0033] In addition, the accompanying drawings are merely schematic illustrations of the present application and are not necessarily drawn to scale. Identical reference numerals in the figures denote identical or similar parts, and thus repetitive descriptions thereof will be omitted. Some of the blocks shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0034] It should be noted that the acquisition, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.

[0035] The specific implementation of the embodiment of the present application is described in detail below with reference to the accompanying drawings.

[0036] Figure 1 FIG. 1 shows a schematic diagram of a task scheduling system in one embodiment of the present application. Figure 1 As shown, the system may include: N RPs 11 and M UDs 12 .

[0037] Among them, N RP 11 constitutes a set Index n represents the nth RP 11. M UDs 12 form a set of The index m represents the m-th UD 12 .

[0038] Each UD 12 has a set of task requests The task request of M UD 12 is Among them, the i-th task can be represented as a tuple {D i ,R i}, where D i and R i Indicates the task size and execution result size.

[0039] The computing node consists of N RPs 11 and M UDs 12. The CPU frequency of the computing node is Among them, f n is the CPU frequency of the nth BP 11, f m is the CPU frequency of the mth UD 12,

[0040] The execution location of each task in can be expressed as Here, 0 indicates that the task request is executed locally on the UD 12 .

[0041] It should be noted that, in each implementation of the present application, the example in which each UD is unable to execute a task request generated by another UD is used for description.

[0042] In one embodiment, Figure 2 As shown, the task scheduling system includes, in addition to N RPs 11 and M UDs 12 , a scheduling decision device 13 .

[0043] Each of the M UDs 12 may send task request information to the scheduling decision device 13 , where the information may include a task size and an execution result size of the task request.

[0044] The scheduling decision device 13 can receive the task request information generated by the M UDs 12. The scheduling decision device 13 also stores Alternatively, the task request information sent by the UD 12 to the scheduling decision device 13 includes the CPU frequency of the UD 12 .

[0045] There are some task requests that can only be executed after their parent task requests are completed. Therefore, the scheduling decision device 13 can schedule the task requests based on the dependency relationship between the task requests. The task requests included in the graph are used as vertices, and the dependency relationships between parent and child task requests are used as directed edges to construct at least one directed acyclic graph.

[0046] Afterwards, the scheduling decision device 13 may construct a hypergraph based on the at least one directed acyclic graph, wherein the vertex set of the hypergraph includes The task request in the hypergraph includes the sequential hyperedge set ε DAG , distance hyperedge set Attributed hyperedge set One or more hyperedge sets in ; or including: ε DAG 、 and At least one of them, and by DAG 、 and The hypergraph partition hyperedge set ε obtained by hypergraph partitioning pt .

[0047] The scheduling decision device 13 may process the constructed hypergraph using a hypergraph neural network (HGNN) to obtain a task graph embedding.

[0048] And according to The task size, execution result size, and task graph embedding of each task request and scheduling decisions Build Status Collection The execution position of the first task request to the i-th task request is represented by . And, the scheduling decision is used as the action of reinforcement learning in In addition, we set rewards for the reinforcement learning goal to reduce the delay and energy consumption of task scheduling, conduct deep reinforcement learning, and generate target scheduling decisions.

[0049] Afterwards, the scheduling decision device 13 makes a scheduling decision on N RPs 11 and M UDs 12 according to the target scheduling decision. Get the task request and perform task scheduling.

[0050] The network is used as a medium for providing a communication link between the N RPs 11, the M UDs 12, and the scheduling decision device 13, and may be a wired network or a wireless network.

[0051] Optionally, the above-mentioned wireless network or wired network uses standard communication technologies and / or protocols. The network is typically the Internet, but can also be any network, including but not limited to a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), a mobile, wired or wireless network, a private network or any combination of a virtual private network). In some embodiments, technologies and / or formats including Hypertext Markup Language (HTML), Extensible Markup Language (XML), etc. are used to represent data exchanged over the network. In addition, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPSec), etc. can be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technologies can also be used to replace or supplement the above-mentioned data communication technologies.

[0052] The UD 12 may be any electronic device, including but not limited to a smartphone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, a wearable device, an augmented reality device, a virtual reality device, and the like.

[0053] Optionally, the client of the application installed in different UDs 12 is the same, or the client of the same type of application based on different operating systems. Based on different terminal platforms, the specific form of the client of the application can also be different, for example, the application client can be a mobile client, a PC client, etc.

[0054] RP 11 can be a server that provides various services, such as a background management server that provides support for devices operated by users using terminal device 101. The background management server can analyze and process received request data and feed back the processing results to the terminal device.

[0055] Optionally, the server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.

[0056] RP 11 can also be an edge computing node.

[0057] The scheduling decision device 13 can be a server or a terminal, and this application does not impose any restrictions on this.

[0058] Those skilled in the art will know that Figure 1 The number of UDs and RPs in the example is merely illustrative, and any number of UDs and RPs may be used according to actual needs, which is not limited in the present embodiment.

[0059] Under the above system architecture, an embodiment of the present application provides a task scheduling method, which can be executed by any electronic device with computing and processing capabilities. For example, the electronic device is a scheduling decision device.

[0060] Figure 3 A flowchart of a task scheduling method according to an embodiment of the present application is shown as follows: Figure 3 As shown, the task scheduling method provided in the embodiment of the present application includes the following S301 to S305. The task scheduling method is applied to a task scheduling system, which includes N RPs and MUDs, where N and M are both integers not less than 1.

[0061] S301 : Obtain at least one directed acyclic graph of L task requests generated by M UDs, where L is an integer greater than 1.

[0062] In one embodiment, the execution of some task requests depends on the completion of the execution of their parent task requests. Therefore, the scheduling decision device can construct at least one directed acyclic graph based on the dependency relationship between the task requests, with L task requests as vertices and the dependency relationship between the parent and child task requests as directed edges.

[0063] After constructing the at least one directed acyclic graph, obtaining the at least one directed acyclic graph is completed.

[0064] The embodiments of the present application do not limit how the scheduling decision device obtains the dependency relationship of the sequential execution of the L task requests. For example, each UD can send task request information to the scheduling decision device, and the task request dependency relationship is recorded in the information.

[0065] The embodiment of the present application does not limit the specific number of task requests as to the number of task requests L. Figure 4 As shown, L is 7, and the L task requests are A1, A2, A3, A4, B1, B2, and B3, respectively. A1 is the parent task request of A2 and A3, A2 is the parent task request of A4, B1 is the parent task request of B2, and B2 is the parent task request of B3. These seven task requests can form two directed acyclic graphs. One directed acyclic graph has vertices {A1, A2, A3, A4} and edges {(A1, A2), (A1, A3), (A2, A4)}; the other directed acyclic graph has vertices {B1, B2, B3} and edges {(B1, B2), (B2, B3)}.

[0066] The embodiment of the present application does not limit the specific number of directed acyclic graphs of at least one directed acyclic graph, and the directed acyclic graphs may be determined based on the dependency relationship between the L task requests.

[0067] S302: Construct a hypergraph of L task requests based on the at least one directed acyclic graph, wherein the vertex set of the hypergraph includes the L task requests, the hyperedge set of the hypergraph includes a sequential hyperedge set, and the sequential hyperedge set includes edges in the directed acyclic graph.

[0068] At least one directed acyclic graph is two directed acyclic graphs, and the two directed acyclic graphs are directed acyclic graphs with a vertex set of {A1, A2, A3, A4} and an edge set of {(A1, A2), (A1, A3), (A2, A4)} as shown in the figure, and a directed acyclic graph with a vertex set of {B1, B2, B3} and an edge set of {(B1, B2), (B2, B3)} as shown in the figure.

[0069] In the hypergraph constructed based on the two directed acyclic graphs, the vertex set includes {A1, A2, A3, A4, B1, B2, B3}, and the sequential hyperedge set includes {(A1, A2), (A1, A3), (A2, A4), (B1, B2), (B2, B3)}.

[0070] In one embodiment, in addition to the sequential hyperedge set, the superedge set also includes: at least one of an attribute hyperedge set, a distance hyperedge set, and a hypergraph partition hyperedge set; wherein the attribute hyperedge set is obtained by clustering L task requests according to network attributes of M UDs.

[0071] In one embodiment, L task requests are clustered according to network attributes of M UDs, including: clustering the UDs according to the network attributes of the M UDs to obtain multiple clusters, taking the task requests generated by the UDs included in each cluster as a hyperedge, multiple clusters corresponding to multiple hyperedges, and the multiple hyperedges corresponding to the multiple clusters forming an attribute hyperedge set.

[0072] The embodiments of the present application do not limit the specific network attributes of the UD, for example, network attributes include bandwidth, bit rate, operating system, mobility, etc.

[0073] The embodiments of the present application do not limit the clustering method used to cluster the M UDs. For example, K-means clustering, hierarchical clustering, DBSCAN (Density-Based Spatial Clustering of Applications with Noise), grid clustering, etc. can be used.

[0074] By adding attribute hyperedge sets to the hypergraph's hyperedge set, the dependencies between network attributes of individual task requests can be reflected, further enhancing the description of the dependencies between task requests. This facilitates the mining of more complex high-order attribute correlations through the hypergraph neural network, and further facilitates embedding the task graph after processing the hypergraph using the hypergraph neural network, generating scheduling strategies with better parallel computing efficiency during execution.

[0075] The distance hyperedge set includes hyperedges consisting of each vertex in at least one directed acyclic graph and vertices with directed distances being preset values.

[0076] The directed distance refers to the distance between any vertex and the direction of the directed edge in the directed acyclic graph. The specific value of the preset value is not limited by the embodiments of this application. For example, the preset value is 2, or the preset value is 3, etc.

[0077] If there is no other vertex at a position where the directed distance of any vertex is a preset value, then the vertex will not be used as a hyperedge.

[0078] At least one directed acyclic graph such as Figure 4 As shown, with the preset value being 2, the distance hyperedge set is {(A1, A4), (B1, B3)}.

[0079] The hypergraph partitioned hyperedge set is obtained by partitioning the hypergraph into sequential hyperedge sets, distance hyperedge sets and attribute hyperedges.

[0080] S303, processing the hypergraph through the hypergraph neural network to obtain the task graph embedding.

[0081] S304, taking the task size, execution result size, task graph embedding and scheduling decision of each task request as the state, taking the scheduling decision as the action of reinforcement learning, setting the reward with reducing the delay and energy consumption of task scheduling as the goal of reinforcement learning, performing deep reinforcement learning, and generating the target scheduling decision.

[0082] Among them, the task size, execution result size, task graph embedding and scheduling decision of each task request are taken as states, which can be expressed as The execution position from the 1st task request to the ith task request, D i represents the task size requested by the i-th task, R i Indicates the execution result size of the i-th task request, Embed the task graph. The i-th task corresponds to

[0083] Taking scheduling decision as reinforcement learning action, it can be expressed as in Indicates that at time step t, the i-th task request is executed locally.

[0084] In setting rewards for reinforcement learning with the goal of reducing delays and energy consumption in task scheduling, the embodiments of this application do not limit how the rewards are set.

[0085] In one embodiment, the reward is expressed as follows:

[0086]

[0087] Where t represents the time step, R t is the reward for scheduling the i-th task request according to the scheduling decision at time t; Δ(.) indicates that the content in (.) is a negative increment; when the i-th task request belongs to the task request on the critical path, σm =1, when the i-th task request is not a task request on the critical path σ m =0; is the discriminator, To judge σ m Is it equal to 1? If σ m =1 The value of is equal to 1, if σ m ≠1 The value of is equal to 0; To judge σ m Is it equal to 0? If σ m =0 The value of is equal to 1, if σ m ≠0 The value of is equal to 0; is the execution location from the 1st task request to the i-th task request, is the execution position of task i at time step t When , the time when the i-th task request is completed; w h 、w l are weight coefficients, and w h >w l ; is the total energy consumption of completing the 1st to i-th task requests at time step t; is the total energy consumption of completing the 1st to i-1th task requests at time step t.

[0088] The critical path is a path including the at least one directed acyclic graph and having the longest time required to complete all task requests.

[0089] About w h 、w l The specific value is not limited in the embodiments of this application. h =10w l .

[0090] The time for the i-th task to be completed, The calculation of can refer to the following calculation method for the total delay of L task requests to complete scheduling.

[0091] In one embodiment, the total delay for completing the scheduling of L task requests is calculated using the following formulas 2 to 10.

[0092]

[0093]

[0094] In formula 2, The total delay to complete scheduling for L task requests; The execution location of the 1st task request to the Lth task request; It is a set of task requests that do not have subsequent task requests among L task requests; The requested completion time for the i-th task.

[0095] In formula 3, is the available time of the execution location where the i-th task request is located; AL(i) is the set of parent tasks that have been executed before the i-th task request; is the requested completion time for the jth task, represents the latest completion time among the completion times corresponding to AL(i); The computation delay requested for the i-th task; The requested transmission delay for the i-th task.

[0096] In formula 4, z i is the execution location requested by the i-th task, z k The execution location requested for the kth task; In z i =z k The value is 1 at z i ≠z k The value is 0.

[0097] In formula 5, f m is the CPU frequency of the mth UD, f n is the CPU frequency of the nth RP; D i The requested task size for the i-th task.

[0098] Formula 6-Formula 8, is the delay of uploading the i-th task request to RP, The delay in downloading the execution result of the i-th task request; The transmission rate of data uploaded from UD to RP. R is the download rate of data transmitted from UD to RP; i The requested execution result size for the i-th task.

[0099] Formula 9-Formula 10, The wireless bandwidth when UD downloads data from RP; Wireless bandwidth for UD to upload data to RP; represents the variance of white noise in a complex Gaussian channel; represents the forward transmission power; represents the forward channel gain; represents the backward transmission power; represents the backward channel gain.

[0100] In formula 1, The energy consumption of completing the i-th task request is obtained. In one embodiment, the total energy consumption of completing the i-th task request is expressed as follows:

[0101] Formula 15.

[0102]

[0103] Among them, E i The total energy consumption required to complete the i-th task; The computing energy consumption required to complete the i-th task request; The transmission energy consumption required to complete the i-th task request; z i is the execution location requested by the i-th task, z i = 0 means that the i-th task request is executed locally on UD, z i =n means that the i-th task request is executed on the n-th RP.

[0104] is the energy consumption requested to be uploaded to RP for the i-th task, The energy consumption of downloading the execution result of the i-th task request; The time used to download the execution result of the i-th task request, The time taken to upload the i-th task request to the RP.

[0105] q is the execution location of the i-th task request, which is one of the N RPs or the UD that generates the i-th task request; ρ q is the power coefficient q; f n,m (q) is the CPU frequency of q; α q is the dynamic power index of q; The time taken to execute the i-th task request.

[0106] The embodiments of this application do not limit the specific model used in the process of generating target scheduling decisions through deep reinforcement learning.

[0107] In one embodiment, both the encoder and decoder used in deep reinforcement learning are GRUs. Using GRUs allows both the encoder and decoder to process sequences of arbitrary lengths. The number of task requests that need to be scheduled varies at different times, and using GRUs allows the encoder and decoder of deep reinforcement learning to better handle scheduling decisions when there are varying numbers of task requests.

[0108] S305 : According to the target scheduling decision, perform task scheduling on the L task requests on the N RPs and the M UDs.

[0109] The technical solution provided in the embodiments of the present application uses at least one directed acyclic graph corresponding to L task requests to construct a hypergraph including a sequential hyperedge set. When at least one directed acyclic graph is a plurality of directed acyclic graphs, the multiple dependencies between the L task requests can be better described, and the sequential relationship between the tasks can be better represented by the sequential hyperedge set. By processing the hypergraph using a hypergraph neural network, the high-order attribute correlation in the multiple dependencies of the task requests can be captured, thereby providing richer contextual information for the subsequent generation of scheduling decisions through reinforcement learning, so that the generated scheduling decisions can have higher parallel computing efficiency when executed compared to the scheduling decisions obtained by relying solely on at least one directed acyclic graph planning.

[0110] In order to demonstrate the progressiveness of the technical solution provided by the embodiments of the present application, the following will illustrate the results of the comparison between the task scheduling method in the embodiments of the present application and other scheduling methods.

[0111] The experimental data of the task scheduling method in the embodiment of the present application, as well as DTODRL (a task scheduling method), GT-SAC (a task scheduling method), E-HEFT (a task scheduling method), greedy, random, local and remote scheduling methods, a total of 7 other scheduling methods, are shown in Table 1 below.

[0112] DTODRL: This method uses pre-trained graph neural networks to capture the information of traditional directed acyclic graphs;

[0113] GT-SAC: This method uses a soft actor-critic algorithm to minimize the weighted sum of latency and energy consumption;

[0114] E-HEFT: Enhanced Heterogeneous Earliest Finish Time Heuristic is to schedule tasks to the earliest available RP;

[0115] Greedy: Schedule tasks to the RP with the best performance while taking load balancing into consideration;

[0116] Random: Tasks are randomly dispatched to RPs;

[0117] Local: All tasks are executed locally;

[0118] Remote: All tasks are scheduled to a random RP.

[0119] Table 1

[0120]

[0121] As can be seen from Table 1, the task scheduling method in the embodiment of the present application shows better latency and energy consumption reduction compared with seven other models with different numbers of tasks. Specifically, compared with GTODRL, the average latency of the task scheduling method in the embodiment of the present application is reduced by 28.76%, 41.06%, 42.39%, 32.79% and 35.61% in the case of 20-60 task requests, respectively, and the completion time is shortened more as the number of task requests increases. In addition, the energy efficiency of the task scheduling method in the embodiment of the present application is better than the seven other models, with reductions of 10.49%, 22.08%, 18.12%, 12.81% and 15.12% respectively. This dual advantage highlights the ability of the task scheduling method in the embodiment of the application to handle increased task dependencies more effectively than GTODRL and GT-SAC. By utilizing the hyperedge set of task attributes, the task scheduling method in the embodiment of the present application can more effectively represent and capture high-order data dependencies compared to traditional GNN (Graph Neural Network). E-HEFT focuses on completion time by selecting RPs with more powerful functions but higher energy consumption, while the task scheduling method in the embodiment of the present application optimizes the trade-off between delay and energy consumption.

[0122] Based on the same inventive concept, the present application also provides a task scheduling device, as described in the following embodiment. Since the principle of solving the problem in the device embodiment is similar to that in the above method embodiment, the implementation of the device embodiment can refer to the implementation of the above method embodiment, and the repeated parts will not be repeated.

[0123] Figure 5 A schematic diagram of a task scheduling device according to an embodiment of the present application is shown in FIG. Figure 5 As shown, the device is applied to a task scheduling system, which includes N RPs and M UDs, where N and M are both integers not less than 1, and includes: an acquisition module 51, used to obtain at least one directed acyclic graph of L task requests generated by the M UDs, where L is an integer greater than 1; a hypergraph construction module 52, used to construct a hypergraph of the L task requests based on at least one directed acyclic graph, wherein the vertex set of the hypergraph includes the L task requests, the hyperedge set of the hypergraph includes a sequential hyperedge set, and the sequential hyperedge set includes an edge in at least one directed acyclic graph; a processing module 53, used to process the hypergraph through a hypergraph neural network to obtain a task graph embedding; a generation module 54, used to take the task size, execution result size, task graph embedding and scheduling decision of each task request as states, take the scheduling decision as an action of reinforcement learning, set a reward with reducing the delay and energy consumption of task scheduling as the goal of reinforcement learning, perform deep reinforcement learning, and generate a target scheduling decision; a scheduling module 55, used to schedule the L task requests on the N RPs and M UDs according to the target scheduling decision.

[0124] The technical solution provided in the embodiments of the present application uses at least one directed acyclic graph corresponding to L task requests to construct a hypergraph including a sequential hyperedge set. When at least one directed acyclic graph is a plurality of directed acyclic graphs, the multiple dependencies between the L task requests can be better described, and the sequential relationship between the tasks can be better represented by the sequential hyperedge set. By processing the hypergraph using a hypergraph neural network, the high-order attribute correlation in the multiple dependencies of the task requests can be captured, thereby providing richer contextual information for the subsequent generation of scheduling decisions through reinforcement learning, so that the generated scheduling decisions can have higher parallel computing efficiency when executed compared to the scheduling decisions obtained by relying solely on at least one directed acyclic graph planning.

[0125] It should be noted that the acquisition module 51, hypergraph construction module 52, processing module 53, generation module 54, and scheduling module 55 described above correspond to S301 to S305 in the method embodiment. The examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above method embodiment. It should be noted that the above modules, as part of the apparatus, can be executed in a computer system, such as a set of computer-executable instructions.

[0126] Those skilled in the art will appreciate that various aspects of the present application can be implemented as systems, methods, or program products. Therefore, various aspects of the present application can be specifically implemented in the following forms: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation that combines hardware and software aspects, which may be collectively referred to herein as a "circuit," "module," or "system."

[0127] Refer to the following Figure 6 hereinafter, an electronic device 600 according to this embodiment of the present application is described. Figure 6 The electronic device 600 shown is merely an example and should not limit the functions and scope of use of the embodiments of the present application.

[0128] like Figure 6 As shown, electronic device 600 is implemented as a general-purpose computing device. Components of electronic device 600 may include, but are not limited to, the aforementioned at least one processing unit 610, the aforementioned at least one storage unit 620, and a bus 630 connecting different system components (including storage unit 620 and processing unit 610).

[0129] The storage unit stores program code that can be executed by the processing unit 610, causing the processing unit 610 to perform the steps of various exemplary embodiments of the present application described in the "Exemplary Method" section above. For example, the processing unit 610 can perform the following steps of the above method embodiment: S301 to S305.

[0130] The storage unit 620 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 6201 and / or a cache memory unit 6202 , and may further include a read-only memory unit (ROM) 6203 .

[0131] The storage unit 620 may also include a program / utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0132] Bus 630 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0133] The electronic device 600 can also communicate with one or more external devices 640 (e.g., a keyboard, a pointing device, a Bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 600, and / or any device that enables the electronic device 600 to communicate with one or more other computing devices (e.g., a router, a modem, etc.). Such communication can occur via an input / output (I / O) interface 650. Furthermore, the electronic device 600 can communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network such as the Internet) via a network adapter 660. As shown, the network adapter 660 communicates with other modules of the electronic device 600 via a bus 630. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the electronic device 600, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0134] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present application.

[0135] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart may be implemented as a computer program product, which includes: a computer program, which implements the above-mentioned task scheduling method when executed by a processor.

[0136] In an exemplary embodiment of the present application, a computer-readable storage medium is further provided, which may be a readable signal medium or a readable storage medium. The computer-readable storage medium stores a program product capable of implementing the above-mentioned method of the present application.

[0137] In some possible implementations, various aspects of the present application may also be implemented in the form of a program product, which includes program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps of various exemplary implementations of the present application described in the above "Exemplary Method" section of this specification.

[0138] More specific examples of computer-readable storage media in the present application may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0139] In this application, a computer-readable storage medium may include a data signal transmitted in baseband or as part of a carrier wave, which carries readable program code. Such a transmitted data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0140] Alternatively, the program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination thereof.

[0141] In a specific implementation, the program code for performing the operations of the present application can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect via the Internet).

[0142] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiment of the application, the features and functions of two or more modules or units described above can be concretized in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be concretized.

[0143] Furthermore, although the steps of the method of the present application are described in a particular order in the accompanying drawings, this does not require or imply that the steps must be performed in this particular order, or that all steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.

[0144] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiments of the present application.

[0145] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered merely as exemplary, and the true scope and spirit of the present application are indicated by the appended claims.

Claims

1. A task scheduling method, characterized in that: Applied to a task scheduling system, the task scheduling system includes N resource pools RP and M user devices UD, where N and M are both integers not less than 1, including: Obtain at least one directed acyclic graph of L task requests generated by M UDs, where L is an integer greater than 1; Constructing a hypergraph of the L task requests according to the at least one directed acyclic graph, wherein a vertex set of the hypergraph includes the L task requests, a hyperedge set of the hypergraph includes a sequential hyperedge set, and the sequential hyperedge set includes edges in the at least one directed acyclic graph; Processing the hypergraph through a hypergraph neural network to obtain a task graph embedding; Taking the task size of each task request, the execution result size, the task graph embedding and the scheduling decision as the state, the scheduling decision as the action of reinforcement learning, and the reduction of task scheduling delay and energy consumption as the reinforcement learning goal, the reward is set, deep reinforcement learning is performed, and the target scheduling decision is generated; Performing task scheduling on the L task requests on the N RPs and the M UDs according to the target scheduling decision; The reward is expressed as the following formula: ; in, t represents the time step, Based on t Scheduling decision at time i Rewards for each task request; (.) indicates that the content in (.) is a negative increment; i When a task request belongs to a task request on the critical path , in i When a task request does not belong to a task request on the critical path ; is the discriminator, For judgment Is it equal to 1? but The value of is equal to 1, if but The value of is equal to 0; For judgment Is it equal to 0? but The value of is equal to 1, if but The value of is equal to 0; Request for the first task to i The execution location of the task request, For the time step t ,and i The execution location of each task When, i The time it takes for a task request to be completed; 、 are weight coefficients, and > ; The time step is t Completed the 1st~ i The total energy consumption of each task request; The time step is t Completed the 1st~ i -Total energy consumption of 1 task request; The critical path is a path including the at least one directed acyclic graph and having the longest time required to complete all task requests.

2. The method according to claim 1, characterized in that The superedge set further includes: at least one of an attribute superedge set, a distance superedge set, and a hypergraph partition superedge set; Among them, the attribute hyperedge set is obtained by clustering the L task requests according to the network attributes of the M UDs, the distance hyperedge set includes the hyperedges composed of each vertex in the at least one directed acyclic graph and the vertices with directed distances of preset values, and the hypergraph partitioned hyperedge set is obtained by hypergraph partitioning the sequential hyperedge set, the distance hyperedge set and the attribute hyperedge.

3. The method according to claim 1, characterized in that The total delay for the L task requests to complete the scheduling is calculated by the following formula: ; ; ; ; ; ; ; ; ; in, The total delay for completing scheduling for the L task requests; The execution location of the 1st task request to the Lth task request; is a set of task requests that have no subsequent task requests among the L task requests; For the i The completion time of each task request; For the i The available time of the execution location where the task request is located; For the i The parent task set that has been executed before the task request; For the j The completion time of a task request, Indicates The latest completion time among the corresponding completion times; For the i The computational delay of each task request; For the i The transmission delay of each task request; For the i The execution location of the task request, For the k The execution location of each task request; exist The value is 1 when The value is 0 when is the CPU frequency of the mth UD, is the CPU frequency of the nth RP; For the i The task size of each task request; For the i The delay of uploading a task request to RP, To download i The delay in the execution result of a task request; The transmission rate of data uploaded from UD to RP. The download rate of data transmitted by UD from RP; For the i The execution result size of each task request; The wireless bandwidth when UD downloads data from RP; Wireless bandwidth for UD to upload data to RP; represents the variance of white noise in a complex Gaussian channel; represents the forward transmission power; represents the forward channel gain; represents the backward transmission power; represents the backward channel gain.

4. The method according to claim 1 or 3, characterized in that Complete the i The total energy consumption of a task request is expressed as follows: ; ; ; ; ; in, To complete the i The total energy consumption of each task request; To complete the i The computing energy consumption of each task request; To complete the i The transmission energy consumption of each task request; For the i The execution location of the task request, Indicates the i The task request is executed locally on the UD. Indicates the i The task request is in Execute on each RP; For the first i The energy consumption of each task request uploaded to RP, To download i The energy consumption of the execution result of each task request; To download i The time used to execute the result of a task request, To upload the first i The time used by each task request; For the i The execution location of the task request is one of the N RPs or the one that generates the i UD of task requests; for Power factor; for CPU frequency; is the dynamic power index of q; To implement the i The time used by each task request; represents the forward transmission power; Represents the backward transmission power.

5. The method according to claim 1, wherein Both the encoder and decoder used in deep reinforcement learning are gated recurrent units (GRUs).

6. A task scheduling device, characterized in that: Applied to a task scheduling system, the task scheduling system includes N resource pools RP and M user devices UD, where N and M are both integers not less than 1, including: an acquisition module, configured to acquire at least one directed acyclic graph of L task requests generated by M UDs, where L is an integer greater than 1; a hypergraph construction module, configured to construct a hypergraph of the L task requests based on the at least one directed acyclic graph, wherein a vertex set of the hypergraph includes the L task requests, a hyperedge set of the hypergraph includes a sequential hyperedge set, and the sequential hyperedge set includes edges in the at least one directed acyclic graph; A processing module, configured to process the hypergraph through a hypergraph neural network to obtain a task graph embedding; A generation module is configured to perform deep reinforcement learning using the task size of each task request, the execution result size, the task graph embedding, and the scheduling decision as states, using the scheduling decision as a reinforcement learning action, setting a reward with reducing task scheduling delay and energy consumption as a reinforcement learning goal, and generating a target scheduling decision; a scheduling module, configured to schedule the L task requests on the N RPs and the M UDs according to the target scheduling decision; The reward is expressed as the following formula: ; in, t represents the time step, Based on t Scheduling decision at time i Rewards for each task request; (.) indicates that the content in (.) is a negative increment; i When a task request belongs to a task request on the critical path , in i When a task request does not belong to a task request on the critical path ; is the discriminator, For judgment Is it equal to 1? but The value of is equal to 1, if but The value of is equal to 0; For judgment Is it equal to 0? but The value of is equal to 1, if but The value of is equal to 0; Request for the first task to i The execution location of the task request, For the time step t ,and i The execution location of each task When, i The time it takes for a task request to be completed; 、 are weight coefficients, and > ; The time step is t Completed the 1st~ i The total energy consumption of each task request; The time step is t Completed the 1st~ i -Total energy consumption of 1 task request; The critical path is a path including the at least one directed acyclic graph and having the longest time required to complete all task requests.

7. An electronic device, characterized in that: include: processor; as well as a memory for storing executable instructions of the processor; The processor is configured to execute the task scheduling method according to any one of claims 1 to 5 by executing the executable instructions.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the task scheduling method according to any one of claims 1 to 5 is implemented.

9. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the task scheduling method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Hypergraph partition-based computing power network task unloading method

    CN118113367A

  • System and method for designing integrated circuits based on deep reinforcement learning using partitioning

    KR102454202B1