A resource mapping and resource allocation method for multi-point cooperative calculation
Patent Information
- Application Number
- CN202311403384.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-26
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2043-10-26
AI Technical Summary
现有基于单一维度资源优化的资源配置方法,无法有效综合考虑各种资源的可用情况
[0052]本发明实施例提出的面向多点协同计算的资源映射和资源分配方法,将一个给定的多点协同计算工作的多个计算任务优化映射到物理网络的不同计算节点,并通过优化分配节点计算资源和链路传输资源,最小化计算工作的完成时间,较现有基于单一维度资源优化的资源分配方法优势明显,有广泛的实施前景。
Smart Images

Figure CN117459531B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of optical communication networks and distributed computing technology. Background Technology
[0002] With the rapid increase in demand for efficient data processing and low-latency services, centralized cloud storage and computing resources, originally belonging to large data centers, will inevitably move closer to the network edge, giving rise to a new computing paradigm called fog computing. Fog computing processes user data locally, exhibiting the characteristic of "service near the edge," and has shown significant advantages in latency, reliability, and flexibility.
[0003] As network computing shifts from "cloud" to "fog," point-to-point communication services in telecommunications networks are gradually evolving towards distributed computing tasks, highlighting the importance of coordinated control of computing, storage, and transmission resources. Compared to the abundant computing and storage resources in large data centers, fog computing nodes offer relatively limited resources, often experiencing resource shortages during peak traffic periods. A single computing node's resources are insufficient to support the entire computing workload, necessitating the decomposition of computation into multiple interconnected tasks and their deployment across multiple distributed fog computing nodes. This process faces several challenges: First, there are strong interrelationships between distributed computing tasks; subsequent tasks can only begin execution after all preceding tasks have completed and their results have been transmitted to the fog node carrying the subsequent task. For some tasks, fog computing nodes also require specific raw data before computation. Second, distributed computing involves the allocation of multi-dimensional storage, computing, and transmission resources simultaneously. Existing resource allocation methods based on single-dimensional resource optimization cannot effectively consider the availability of various resources. Furthermore, any shortage of any resource during resource allocation introduces latency, increasing the overall computation time. Summary of the Invention
[0004] The present invention aims to at least partially solve one of the technical problems in the related art.
[0005] Therefore, the purpose of this invention is to propose a resource mapping and resource allocation method for multi-point collaborative computing, which minimizes the completion time of computing tasks.
[0006] To achieve the above objectives, a first aspect of the present invention proposes a resource mapping and resource allocation method for multi-point collaborative computing, comprising:
[0007] Calculate the optimal mapping relationship from the distributed computing task H(A,K) represented by a directed acyclic graph (DAG) to the physical topology G(N,E), transmission resources R, and computing resources C, so as to minimize the completion time of the computing task H(A,K). The calculation includes:
[0008] Computational task mapping C a,n :A→N C ;
[0009] Transmission Task Mapping T k,r :K→R K ;
[0010] Where A is the set of computing task nodes for H, K is the set of transmission tasks for H, and N is the set of nodes for the physical topology G. C Let N be a subset of nodes with computing capabilities, E be the set of links in the physical topology G, C be the set of computing time slot resources occupied by A on the node set N, and R be... K This refers to the set of time-frequency resources of the links on the link set E that are occupied by K.
[0011] In addition, a resource mapping and resource allocation method for multi-point collaborative computing according to the above embodiments of the present invention may also have the following additional technical features:
[0012] Furthermore, in one embodiment of the present invention, it further includes:
[0013] By solving the following integer linear programming equation, the sum of the link delays occupied by all transmission tasks on K is obtained. Minimize, thereby minimizing the completion time of the computational task H(A,K):
[0014]
[0015]
[0016]
[0017] Among them, decision variables This indicates the occupancy status of link (i,j) in the physical topology G(N,E) by the DAG transmission task k: 1 indicates occupied, 0 indicates unoccupied; decision variable M a,n Indicates whether the computation task of task node a is executed on node n of the physical topology G(N,E): 1 for yes, 0 for no; s k The preceding task node of the DAG transmission task k is represented by t. k This indicates the successor task node of the DAG transmission task k.
[0018] Furthermore, in one embodiment of the present invention, the calculation of the optimal mapping relationship between the distributed computing job H(A,K) represented by a directed acyclic graph (DAG) and the physical topology G(N,E), transmission resources R, and computing resources C includes:
[0019] The computational task mapping is completed using a three-step heuristic algorithm;
[0020] The transmission task mapping is completed using a two-step heuristic algorithm.
[0021] Furthermore, in one embodiment of the present invention, the step of completing the computational task mapping through a three-step heuristic algorithm includes:
[0022] In a directed acyclic graph (DAG), a virtual initial task node is set as the predecessor node of all task nodes with an in-degree of 0.
[0023] Construct a topology mapping queue to map all computing task nodes in the DAG to the topology mapping queue;
[0024] All computing task nodes in the topology mapping queue are sequentially mapped to computing nodes in the physical topology.
[0025] Furthermore, in one embodiment of the present invention, mapping all computational task nodes in the DAG to the topology mapping queue includes:
[0026] S101: Calculate the minimum number of hops from all task nodes in the DAG to the virtual initial task node;
[0027] S102: Construct an empty topology mapping queue and copy the DAG as a backup DAG;
[0028] S103: If there is only one task node with an in-degree of 0 in the backup DAG, add the task node to the topology mapping queue and delete the task node from the backup DAG;
[0029] S104: If there are two or more task nodes with an in-degree of 0 in the backup DAG, these task nodes are arranged in ascending order according to their minimum hop count, added to the topology mapping queue in sequence, and these task nodes are deleted from the backup DAG.
[0030] S105: Repeat S103 and S104 until all task nodes have been added to the topology mapping queue.
[0031] Further, in one embodiment of the present invention, the step of sequentially mapping all computing task nodes in the topology mapping queue to computing nodes in the physical topology includes:
[0032] Randomly select a computing node S' in the physical topology, map the virtual initial task node in the topology mapping queue to node S', and delete the virtual initial task node from the topology mapping queue;
[0033] Using the computing node S' as the root node, a breadth-first search algorithm is used to obtain a sequence of physical topology computing nodes with the same number of task nodes, and the task nodes in the topology mapping queue are sequentially mapped to the sequence of physical topology computing nodes.
[0034] Further, in one embodiment of the present invention, the step of sequentially mapping all computing task nodes in the topology mapping queue to computing nodes in the physical topology includes:
[0035] S201: Randomly select a computing node S' in the physical topology, map the virtual initial task node in the topology mapping queue to node S', and delete the virtual initial task node from the topology mapping queue;
[0036] S202: Read the first remaining task node P in the topology mapping queue. n+1 The mapping nodes of the n preceding task nodes in the DAG in the physical topology are respectively denoted as P1', P2', ..., P... n '; Calculate P1' to P n The sum of the shortest path delays to all unmapped compute nodes in the physical topology is taken, and a randomly selected unmapped compute node with the smallest sum of the shortest path delays is denoted as P. n+1 '; The task node P n+1 Mapped to compute node P n+1 Then, remove the task node Pn+1 from the topology mapping queue; repeat S202 until the topology mapping queue is empty.
[0037] Furthermore, in one embodiment of the present invention, the step of completing the transmission task mapping through a two-step heuristic algorithm includes:
[0038] Give a computation task mapping C a,n For each transmission task k∈K in the transmission task set, compute the preceding task node s from k. k Mapping nodes s in the physical topology k 'The subsequent task node t to k k Mapping node t in physical topology k The route p with the minimum propagation delay on the physical topology G(N,E) k ;
[0039] For route p k Each link Allocate time-frequency resources so that p k The time delay is minimized, where h k For p k The number of jumps.
[0040] Furthermore, in one embodiment of the present invention, it further includes:
[0041] Let the time slot period of the time-division multiplexing transmission system be T, and the number of time slots be N. O For cases where the physical network containing the physical topology G has no wavelength continuity constraint, the route p is... k Each link Allocate time and frequency resources To minimize the latency, where and They are respectively for Assigned wavelengths and time slot numbers:
[0042] S301: In Select the slot with the smallest number from all available time slots across all wavelength links. The wavelengths are assigned, and the assigned wavelengths are denoted as follows: If multiple wavelength links If all wavelengths are idle, then any wavelength is randomly selected for allocation, denoted as .
[0043] S302: For p k The remaining links In order of number To N O and 1 to The time slot order is searched, where For link The transmission delay; for each time slot, search all wavelength links in that time slot. If there is a wavelength link whose time slot is idle, select that time slot for allocation, denoted as . The corresponding assigned wavelength is denoted as Where, N O If the next time slot is 1, then continue searching for the next time slot.
[0044] S303: If If none of the values are empty, then the time-frequency resource allocation is successful; otherwise, the time-frequency resource allocation fails.
[0045] Furthermore, in one embodiment of the present invention, it further includes:
[0046] Let the time slot period of the time-division multiplexing transmission system be T, and the number of time slots be N. O The number of wavelengths is W. For the case where the physical network containing the physical topology G has wavelength continuity constraints, the route p is... k Each link Allocate time and frequency resources in This is for The assigned time slot number is used, and all links are assigned the same wavelength w. k :
[0047] S401: Select wavelengths {j|j=1,...,W} sequentially according to their wavelength numbers, and search using the following method:
[0048] S501: In From all available time slots of the wavelength link with wavelength number j, select the time slot with the smallest number.
[0049] S502: For p k The remaining links Inspection number is and numbered The time slot occupancy status, among which For link The sum of transmission delays. If these two time slots are idle, then these two time slots are selected for allocation, and the first time slot is denoted as...
[0050] S503: If If none of them are empty, then j is denoted as the assigned wavelength w. k Time and frequency resources were successfully allocated.
[0051] S402: If w k Empty, remove all Repeat A until w k Not empty or All wavelength links have no idle time slots, and the latter's time-frequency resource allocation has failed.
[0052] The resource mapping and allocation method for multi-point collaborative computing proposed in this invention optimizes the mapping of multiple computing tasks of a given multi-point collaborative computing job to different computing nodes in a physical network. By optimizing the allocation of node computing resources and link transmission resources, the completion time of the computing job is minimized. This method has significant advantages over existing resource allocation methods based on single-dimensional resource optimization and has broad implementation prospects. Attached Figure Description
[0053] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:
[0054] Figure 1 This is a schematic diagram of a distributed computing operation represented by a directed acyclic graph (DAG) provided in an embodiment of the present invention;
[0055] Figure 2 This is a schematic diagram of a DAG to topology mapping queue provided in an embodiment of the present invention;
[0056] Figure 3 This is a schematic diagram illustrating the mapping of distributed computing tasks to computing and transmission tasks in the physical topology provided by an embodiment of the present invention.
[0057] Figure 4 This is a schematic diagram of time-frequency resource allocation during transmission task mapping provided in an embodiment of the present invention. Detailed Implementation
[0058] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.
[0059] The resource mapping and resource allocation method for multi-point collaborative computing according to embodiments of the present invention is described below with reference to the accompanying drawings.
[0060] Example 1
[0061] Figure 1 This is a schematic diagram of a distributed computing operation represented by a directed acyclic graph (DAG) provided in an embodiment of the present invention.
[0062] like Figure 1 As shown, this resource mapping and allocation method for multi-point collaborative computing includes the following steps:
[0063] Calculate the optimal mapping relationship from the distributed computing task H(A,K) represented by a directed acyclic graph (DAG) to the physical topology G(N,E), transmission resources R, and computing resources C, so as to minimize the completion time of computing task H(A,K). The calculation includes:
[0064] Computational task mapping C a,n :A→N C ;
[0065] Transmission Task Mapping T k,r :K→R K ;
[0066] Where A is the set of computing task nodes for H, K is the set of transmission tasks for H, and N is the set of nodes for the physical topology G. C Let N be a subset of nodes with computing power, E be the set of links in the physical topology G, C be the set of computing time slots occupied by A on node set N, and R be... K This is the set of time-frequency resources of the links on link set E that are occupied by K.
[0067] Furthermore, in one embodiment of the present invention, it further includes:
[0068] By solving the following integer linear programming equation, the sum of the link delays occupied by all transmission tasks on K is obtained. Minimize, thus minimizing the completion time of computation H(A,K):
[0069]
[0070]
[0071]
[0072] Among them, decision variables The status of link (i,j) in physical topology G(N,E) occupied by DAG transmission task k: 1 for occupied, 0 for unoccupied; decision variable M a,n Indicates whether the computation task of task node a is executed on node n of the physical topology G(N,E): 1 for yes, 0 for no; s k The t represents the preceding task node of DAG transmission task k; k This indicates the successor task node of DAG transmission task k.
[0073] Furthermore, in one embodiment of the present invention, calculating the optimal mapping relationship between the distributed computing job H(A,K) represented by a directed acyclic graph (DAG) and the physical topology G(N,E), transmission resources R, and computing resources C includes:
[0074] The computational task mapping is completed through a three-step heuristic algorithm;
[0075] The transmission task mapping is completed using a two-step heuristic algorithm.
[0076] Furthermore, in one embodiment of the present invention, the computational task mapping is completed through a three-step heuristic algorithm, including:
[0077] In a directed acyclic graph (DAG), a virtual initial task node is set as the predecessor node of all task nodes with an in-degree of 0.
[0078] Construct a topology mapping queue to map all computation task nodes in the DAG to the topology mapping queue;
[0079] Map all computation task nodes in the topology mapping queue to computation nodes in the physical topology in sequence.
[0080] Furthermore, in one embodiment of the present invention, mapping all computational task nodes in the DAG to a topology mapping queue includes:
[0081] S101: Calculate the minimum number of hops from all task nodes in the DAG to the virtual initial task node;
[0082] S102: Construct an empty topology mapping queue and copy the DAG as a backup DAG;
[0083] S103: If there is only one task node with an in-degree of 0 in the backup DAG, add the task node to the topology mapping queue and delete the task node from the backup DAG;
[0084] S104: If there are two or more task nodes with an in-degree of 0 in the backup DAG, sort these task nodes in ascending order of their minimum hop count, add them to the topology mapping queue in turn, and delete these task nodes from the backup DAG.
[0085] S105: Repeat S103 and S104 until all task nodes are added to the topology mapping queue.
[0086] Furthermore, in one embodiment of the present invention, mapping all computation task nodes in the topology mapping queue to computation nodes in the physical topology sequentially includes:
[0087] Randomly select a computing node S' in the physical topology, map the virtual initial task node in the topology mapping queue to node S', and delete the virtual initial task node from the topology mapping queue;
[0088] Using computing node S' as the root node, a breadth-first search algorithm is used to obtain a sequence of physical topology computing nodes with the same number of task nodes, and then the task nodes in the topology mapping queue are mapped to the physical topology computing node sequence in turn.
[0089] Furthermore, in one embodiment of the present invention, mapping all computation task nodes in the topology mapping queue to computation nodes in the physical topology sequentially includes:
[0090] S201: Randomly select a computing node S' in the physical topology, map the virtual initial task node in the topology mapping queue to node S', and delete the virtual initial task node from the topology mapping queue;
[0091] S202: Read the first remaining task node P in the topology mapping queue. n+1 The mapping nodes of its n predecessor task nodes in the DAG in the physical topology are denoted as P1', P2', ..., P... n '; Calculate P1' to P n 'The sum of the shortest path delays to all unmapped compute nodes in the physical topology is taken, and the unmapped compute node with the smallest sum of shortest path delays is randomly selected and denoted as P.' n+1 '; Set task node P n+1 Mapped to compute node P n+1', and remove task node Pn+1 from the topology mapping queue; repeat S202 until the topology mapping queue is empty.
[0092] Furthermore, in one embodiment of the present invention, the transmission task mapping is completed through a two-step heuristic algorithm, including:
[0093] Give a computation task mapping C a,n For each transmission task k∈K in the transmission task set, compute the preceding task node s from k. k Mapping nodes s in the physical topology k 'The subsequent task node t to k k Mapping node t in physical topology k The route p with the minimum propagation delay on the physical topology G(N,E) k ;
[0094] For route p k Each link Allocate time-frequency resources so that p k The time delay is minimized, where h k For p k The number of jumps.
[0095] Furthermore, in one embodiment of the present invention, it further includes:
[0096] Let the time slot period of the time-division multiplexing transmission system be T, and the number of time slots be N. O For the case where the physical network containing the physical topology G has no wavelength continuity constraint, the route p k Each link Allocate time and frequency resources To minimize the latency, where and They are respectively for Assigned wavelengths and time slot numbers:
[0097] S301: In Select the slot with the smallest number from all available time slots across all wavelength links. The wavelengths are assigned, and the assigned wavelengths are denoted as follows: If multiple wavelength links If all wavelengths are idle, then any wavelength is randomly selected for allocation, denoted as .
[0098] S302: For p k The remaining links In order of number To N O and 1 to The time slot order is searched, where For link The transmission delay; for each time slot, search all wavelength links in that time slot. If there is a wavelength link whose time slot is idle, select that time slot for allocation, denoted as . The corresponding assigned wavelength is denoted as Where, N O If the next time slot is 1, then continue searching for the next time slot.
[0099] S303: If If none of the values are empty, then the time-frequency resource allocation is successful; otherwise, the time-frequency resource allocation fails.
[0100] Furthermore, in one embodiment of the present invention, it further includes:
[0101] Let the time slot period of the time-division multiplexing transmission system be T, and the number of time slots be N. O The number of wavelengths is W. For a physical network containing a physical topology G, where wavelength continuity is limited, the route is p. k Each link Allocate time and frequency resources in This is for The assigned time slot number is used, and all links are assigned the same wavelength w. k :
[0102] S401: Select wavelengths {j|j=1,...,W} sequentially according to their wavelength numbers, and search using the following method:
[0103] S501: In From all available time slots of the wavelength link with wavelength number j, select the time slot with the smallest number.
[0104] S502: For p k The remaining links Inspection number is and numbered The time slot occupancy status, among which For link The sum of transmission delays. If these two time slots are idle, then these two time slots are selected for allocation, and the first time slot is denoted as...
[0105] S503: If If none of them are empty, then j is denoted as the assigned wavelength w. k Time and frequency resources were successfully allocated.
[0106] S402: If w k Empty, remove all Repeat A until w k Not empty or All wavelength links have no idle time slots, and the latter's time-frequency resource allocation has failed.
[0107] Example 2
[0108] The following example illustrates the process by which this invention maps computational tasks to physical topology.
[0109] Figure 2 The DAG shown contains two computation task nodes A1 and A2 with an in-degree of 0. The mapping is completed according to the following steps:
[0110] S601: First, set up a virtual task node, namely task node 0, as the predecessor task node of task nodes A1 and A2;
[0111] S602: Calculate the shortest number of hops from all DAG task nodes to task node 0;
[0112] S603: Establish a one-dimensional topology mapping queue and put all computing task nodes into the queue in ascending order of the above hop count;
[0113] S604: Select one such as Figure 3 The physical topology G(N,E) shown has at least as many nodes as the number of computation tasks. Assuming that the latency of each link in the physical topology is 1, the computation tasks in the topology mapping queue are mapped to this physical topology in sequence:
[0114] S701: Randomly select a node in the physical topology ( Figure 3 N2 in the topology mapping queue, and map the first node (node 0) in the topology mapping queue to that node;
[0115] S702: Starting from N2 as the root node, a breadth-first search algorithm is used to sequentially obtain 6 nodes (N1, N3, N4, s) in the physical topology, which are the same as the actual number of computational tasks. k '、t k '、N5), and map the remaining nodes in the topology mapping queue to these 6 nodes in sequence. Alternatively, the following method can be used to complete the mapping of the remaining nodes:
[0116] Read the first remaining task node P in the topology mapping queue n+1 The mapping nodes of its n preceding task nodes in the physical topology are denoted as P1', P2', ..., P... n '; Calculate P1' to P n 'The sum of the shortest path delays to all unmapped compute nodes in the physical topology is taken, and the unmapped compute node with the smallest sum of shortest path delays is randomly selected and denoted as P.' n+1 '; Set task node P n+1 Mapped to compute node Pn+1 ', and will task node P n+1 Remove from the topology mapping queue; repeat operation B until the topology mapping queue is empty.
[0117] Taking the 4th task node A3 in the topology mapping queue as an example, it has two preceding task nodes: node 0 and node A1, which are mapped to nodes N2 and N1 respectively in the physical topology. Calculate the mapping from N2 and N1 to all unmapped nodes (nodes N4, s...). k '、t k The sum of the shortest path delays for nodes N4 and N5 are 3, 3, 5, and 4 respectively, with the minimum value corresponding to nodes N4 and s. k ', Randomly select one (N4) as the mapping node for task node A3.
[0118] S605: Maps all transport tasks in the DAG to the physical topology, so as to Figure 3 Taking transmission task k in the example:
[0119] S801: Calculate the preceding task node s from k. k Mapping nodes s in the physical topology k 'The subsequent task node t to k k Mapping node t in physical topology k The route p with the minimum propagation delay on the physical topology G(N,E) k The calculated p k The hop count is 2, and it contains two links, l1 and l2.
[0120] S802: Allocate time-frequency resources for l1 and l2, such that p k The total latency is minimized. For example... Figure 4 As shown, assuming the number of wavelengths is 2 and the number of time slots N0 is 7, the occupied time slots are indicated by red diagonal lines; each transmission task occupies the duration of 1 time slot; the following examples illustrate two scenarios: no wavelength continuity constraint and wavelength continuity constraint.
[0121] Scenarios without wavelength continuity constraints:
[0122] 1) Search the time slot status databases of wavelengths 1 and 2 for the smallest available time slots, which are time slot 3 and time slot 2 respectively. Select time slot 2, which has the smaller number, and denote it as... Corresponding wavelength
[0123] 2) Search for idle time slots in L2: The result is 5. Following the order 5->7 and 1->4, we search the time slot status database for the smallest available time slot across all wavelengths. The result is time slot 5, denoted as... Corresponding wavelength
[0124] 3) Time and frequency resources for l1 and l2 were successfully allocated.
[0125] Scenarios with wavelength continuity constraints:
[0126] 1) Search for the smallest available time slot in the time slot status databases of wavelength 1 and wavelength 2 of l1 respectively. Wavelength 1 is time slot 3, denoted as l1. Wavelength 2 is time slot 2, denoted as
[0127] 2) Search for idle time slots in L2:
[0128] For wavelength 1, The calculation is 5. Time slots 5 and 6 are idle for this wavelength. These two time slots are selected for allocation, denoted as...
[0129] For wavelength 2, The calculation is 4. For this wavelength, time slots 4 and 5 are not entirely idle and are not allocated time slots.
[0130] 3) and If none of the values are empty, the assigned wavelength is denoted as w. k =1, time and frequency resources allocated successfully.
[0131] The resource mapping and allocation method for multi-point collaborative computing proposed in this invention optimizes the mapping of multiple computing tasks of a given multi-point collaborative computing job to different computing nodes in a physical network. By optimizing the allocation of node computing resources and link transmission resources, the completion time of the computing job is minimized. This method has significant advantages over existing resource allocation methods based on single-dimensional resource optimization and has broad implementation prospects.
[0132] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0133] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0134] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A resource mapping and allocation method for multi-point collaborative computing, characterized in that, Includes the following steps: Calculate the optimal mapping relationship from the distributed computing task H(A,K) represented by a directed acyclic graph (DAG) to the physical topology G(N,E), transmission resources R, and computing resources C, so as to minimize the completion time of the computing task H(A,K). The calculation includes: Computational task mapping A→N C ; Transmission Task Mapping : K→R K ; Where A is the set of computing task nodes of H, K is the set of transmission tasks of H, and N is the set of nodes of the physical topology G. C Let N be a subset of nodes with computing capabilities, E be the set of links in the physical topology G, C be the set of computing time slot resources occupied by A on the node set N, and R be... K The set of time-frequency resources of the links occupied by K on the link set E; The calculation of the optimal mapping relationship between the distributed computing job H(A,K) represented by the directed acyclic graph (DAG) and the physical topology G(N,E), transmission resources R, and computing resources C includes: The computational task mapping is completed using a three-step heuristic algorithm, including: In a directed acyclic graph (DAG), a virtual initial task node is set as the predecessor node of all task nodes with an in-degree of 0. Construct a topology mapping queue to map all computing task nodes in the DAG to the topology mapping queue; Map all computing task nodes in the topology mapping queue to computing nodes in the physical topology in sequence; The transmission task mapping is completed using a two-step heuristic algorithm, including: Give a computation task mapping For each set of transmission tasks Calculate from k Preceding task nodes s k Mapping nodes in physical topology s k 'arrive k Subsequent task nodes t k Mapping nodes in physical topology t k The route with the minimum propagation delay on the physical topology G(N,E) p k ; For routing p k Each link Allocating time-frequency resources makes p k The latency is minimized, among which, h k for p k The number of jumps.
2. The method according to claim 1, characterized in that, Also includes: By solving the following integer linear programming equation, the sum of the link delays occupied by all transmission tasks on K is obtained. Minimize, thereby minimizing the completion time of the computational task H(A,K): , , , Among them, decision variables This indicates the occupancy status of link (i,j) in the physical topology G(N,E) by the DAG transmission task k: 1 indicates occupied, 0 indicates unoccupied; decision variable Indicates whether the computation task of task node a is executed on node n of the physical topology G(N,E): 1 for yes, 0 for no; s k The preceding task node of the DAG transmission task k is represented by t. k This indicates the successor task node of the DAG transmission task k.
3. The method according to claim 1, characterized in that, The step of mapping all computing task nodes in the DAG to the topology mapping queue includes: S101: Calculate the minimum number of hops from all task nodes in the DAG to the virtual initial task node; S102: Construct an empty topology mapping queue and copy the DAG as a backup DAG; S103: If there is only one task node with an in-degree of 0 in the backup DAG, add the task node to the topology mapping queue and delete the task node from the backup DAG; S104: If there are two or more task nodes with an in-degree of 0 in the backup DAG, these task nodes are arranged in ascending order according to their minimum hop count, added to the topology mapping queue in sequence, and these task nodes are deleted from the backup DAG. S105: Repeat S103 and S104 until all task nodes have been added to the topology mapping queue.
4. The method according to claim 1, characterized in that, The step of sequentially mapping all computing task nodes in the topology mapping queue to computing nodes in the physical topology includes: Randomly select a computing node S' in the physical topology, map the virtual initial task node in the topology mapping queue to node S', and delete the virtual initial task node from the topology mapping queue; Using the computing node S' as the root node, a breadth-first search algorithm is used to obtain a sequence of physical topology computing nodes with the same number of task nodes, and the task nodes in the topology mapping queue are sequentially mapped to the sequence of physical topology computing nodes.
5. The method according to claim 1, characterized in that, The step of sequentially mapping all computing task nodes in the topology mapping queue to computing nodes in the physical topology includes: S201: Randomly select a computing node S' in the physical topology, map the virtual initial task node in the topology mapping queue to node S', and delete the virtual initial task node from the topology mapping queue; S202: Read the first remaining task node P in the topology mapping queue. n+1 The mapping nodes of the n preceding task nodes in the DAG in the physical topology are respectively denoted as P1', P2', ..., P... n ';Calculate P1'~P n The sum of the shortest path delays to all unmapped compute nodes in the physical topology is taken, and a randomly selected unmapped compute node with the smallest sum of the shortest path delays is denoted as P. n+1 '; The task node P n+1 Mapped to compute node P n+1 Then, remove the task node Pn+1 from the topology mapping queue; repeat S202 until the topology mapping queue is empty.
6. The method according to claim 1, characterized in that, Also includes: The time slot period of the time division multiplexing transmission system is T The number of time slots is N O For cases where the physical network containing physical topology G has no wavelength continuity constraint, the route is... p k Each link Allocate time and frequency resources ={ , } minimizes the delay, where and They are respectively for Assigned wavelengths and time slot numbers: S301: In Select the slot with the smallest number from all available time slots across all wavelength links. The wavelengths are assigned, and the assigned wavelengths are denoted as follows: If multiple wavelength links If all wavelengths are idle, then any wavelength is randomly selected for allocation, denoted as . ; S302: For p k The remaining links According to the numbering arrive N O and 1 to The search is performed using the time slot order of -1, where For link The transmission delay; for each time slot, search all wavelength links in that time slot. If there is a wavelength link whose time slot is idle, select that time slot for allocation, denoted as . The corresponding assigned wavelength is denoted as ;in, N O If the next time slot is 1, then continue searching for the next time slot. S303: If If none of them are empty, then the time-frequency resource allocation is successful; Otherwise, time-frequency resource allocation will fail.
7. The method according to claim 6, characterized in that, Also includes: The time slot period of the time division multiplexing transmission system is T The number of time slots is N O The number of wavelengths is W For cases where the physical network containing the physical topology G has wavelength continuity constraints, the route is... p k Each link Allocate time and frequency resources ={ , },in This is for All allocated time slot numbers, with all links assigned the same wavelength. : S401: Select wavelengths sequentially according to wavelength numbers. And search using the following methods: S501: In Wavelength number is j Select the time slot with the smallest number from all available time slots of the wavelength link. ; S502: For p k The remaining links Inspection number is and numbered The occupancy status of the +1 time slot, where For link The sum of transmission delays. If these two time slots are idle, then these two time slots are selected for allocation, and the first time slot is denoted as... ; S503: If If none of them are empty, then... j denoted as the assigned wavelength Time and frequency resources were successfully allocated. S402: If Empty, remove all Repeat execution A until... Not empty or All wavelength links have no idle time slots, and the latter's time-frequency resource allocation has failed.