A distributed model reasoning acceleration method and system under edge computing network
By building a DNN inference task division model in an edge computing network and applying the asynchronous advantageous actor-criticist algorithm for multi-task learning, the DNN model division strategy is optimized, and the problems of edge device resource heterogeneity and network bandwidth delay are solved, and efficient distributed model inference and low-latency inference services are realized.
Patent Information
- Application Number
- CN202311688354.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-11
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2043-12-11
AI Technical Summary
Under edge computing networks, traditional distributed model inference methods face challenges due to network bandwidth and latency limitations, such as heterogeneity of edge device resources, making it difficult to meet high real-time requirements.
A distributed model inference acceleration method under edge computing network is adopted to optimize the DNN model division strategy by constructing a DNN inference task division model and leveraging the asynchronous advantage of multi-task learning to optimize the DNN model division strategy to minimize the inference delay of DNN task.
It realizes efficient distributed model inference under edge computing networks, accelerates the processing speed of DNN tasks, reduces network data transmission load, and improves the overall performance of the system.
Smart Images

Figure CN117933388B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of edge computing, and in particular to a distributed model reasoning acceleration method and system in an edge computing network. Background Art
[0002] With the widespread deployment of deep learning applications and the rise of edge computing technology, the number of various artificial intelligence applications (such as face recognition, image classification, etc.) is showing an explosive growth trend. There is an increasing demand for efficient model reasoning on resource-constrained edge devices. The traditional centralized model reasoning method may not meet the high real-time requirements because it may cause high latency and excessive network bandwidth load. Edge computing is a new computing model that moves computing and storage resources to the edge of the network (such as base stations) to meet low latency and bandwidth requirements. Edge devices are usually located close to data sources and end users, which can respond to requests faster and reduce the cost of data transmission. However, due to the limited computing power and storage capacity of edge devices, the execution of complex deep neural network (DNN) reasoning tasks may still be limited.
[0003] Distributed model reasoning is a method that uses multiple computing nodes to collaboratively perform DNN reasoning tasks. By splitting the model into multiple sub-models and assigning them to different computing nodes, the processing speed of DNN reasoning tasks can be improved. However, under edge computing networks, due to the limitations of network bandwidth and latency, traditional distributed model reasoning methods may face some challenges, such as heterogeneous edge device resources. Summary of the invention
[0004] The purpose of the present invention is to provide a distributed model reasoning acceleration method and system in an edge computing network.
[0005] The technical solution adopted to achieve the purpose of the present invention is as follows: a distributed model reasoning acceleration method under an edge computing network comprises the following steps:
[0006] 1) Establish an edge computing system.
[0007] 2) Obtain information data of all edge servers, mobile devices, and DNN inference tasks in the edge computing system.
[0008] 3) Construct a DNN reasoning task partitioning model and initialize the DNN reasoning task partitioning model.
[0009] 4) Establish DNN inference delay model and DNN inference energy consumption model.
[0010] The DNN inference delay model is used to describe the delay in processing DNN inference tasks.
[0011] The DNN reasoning energy consumption model is used to describe the energy consumption of the DNN reasoning task.
[0012] 5) Construct state space, action space and reward function.
[0013] The state space is used to store the state information of the DNN reasoning task.
[0014] The action space is used to describe the actions taken by the DNN reasoning task partitioning model at time t in the edge computing system.
[0015] The reward function is used to guide the actions taken by the DNN reasoning task partitioning model at time t.
[0016] 6) The asynchronous advantage actor-critic algorithm based on multi-task learning solves the DNN reasoning task division model and obtains the divided DNN reasoning tasks.
[0017] Furthermore, the edge computing system includes M edge base stations, N mobile devices and a model partitioning controller.
[0018] Among them, each edge base station is equipped with an edge server.
[0019] The mobile device is used to generate a DNN reasoning task.
[0020] The model partitioning controller is used to divide the DNN reasoning task into several subtasks and transmit the subtasks to the edge server.
[0021] The edge server receives the subtasks and performs distributed DNN reasoning services on the subtasks.
[0022] Furthermore, the information data of all edge servers, mobile devices and DNN inference tasks in the edge computing system include: the computing power of the edge server, the device transmission rate between edge servers, the transmission rate between the edge server and the mobile device, the local computing power of the mobile device, the bandwidth allocated to the mobile device, the power of the mobile device, the size of each DNN subtask, and the computing power required for each DNN subtask.
[0023] Furthermore, the DNN reasoning task partitioning model X n (t) is as follows:
[0024]
[0025] Where t represents time. n is the number of the mobile device, n = 1, 2, ..., N, and N is the total number of mobile devices. Denotes DNN subtask I n(t) Whether it is processed in edge server m, where m = 1, 2, ..., M, and M is the total number of edge servers. Denotes DNN subtask I n (t) Whether to process locally.
[0026] Furthermore, the DNN inference delay model includes local processing delay and edge processing delay of the DNN task.
[0027] The DNN reasoning energy consumption model includes the local reasoning energy consumption of the DNN task and the intermediate DNN feature map uploading energy consumption.
[0028] Furthermore, the DNN inference delay model D n (t) is as follows:
[0029]
[0030] Where t represents time and l(·) is the judgment function. Denotes DNN subtask I n (t) whether it is processed locally, Denotes DNN subtask I n (t) Whether it is processed in the edge server m.
[0031] Among them, local processing delay As shown below:
[0032]
[0033] In the formula, is the computing power required for each DNN subtask, and μ is the local computing power of the mobile device.
[0034] Edge processing latency As shown below:
[0035]
[0036] Among them, the transmission delay of the intermediate feature graphs of adjacent DNN subtasks is As shown below:
[0037]
[0038] In the formula, It means that one of the two adjacent DNN subtasks is processed locally and the other is processed in the edge server. Indicates that two adjacent DNN subtasks are processed in different edge servers. 0 indicates that two adjacent DNN subtasks are processed in the same edge server or locally at the same time.
[0039] DNN Subtask In (t) Calculate the delay in edge server m As shown below:
[0040]
[0041] In the formula, C m is the computing capacity of edge server m.
[0042] Local inference energy consumption of the DNN task As shown below:
[0043]
[0044] Where, t represents time and τ represents energy coefficient. is the computing power required for each DNN subtask, and μ is the local computing power of the mobile device.
[0045] The energy consumption of uploading the intermediate DNN feature map As shown below:
[0046]
[0047] In the formula, p n Indicates the transmission power of the device.
[0048] Furthermore, the state space As shown below:
[0049]
[0050] Wherein, t represents time. Denotes DNN subtask I n (t) state, n = 1, 2, ..., N, N is the total number of mobile devices. Denotes DNN subtask I n The size of (t), Denotes DNN subtask I n (t) Required computing power, ν n,m (t) represents the transmission rate between edge server m and mobile device n. r (t) represents the remaining available energy of the mobile device at time t.
[0051] In the action space, the action A(t) taken by the DNN reasoning task partitioning model at time t is as follows:
[0052] A(t)={X1(t),X2(t),...,X N (t)} (10)
[0053] In the formula, Xn (t) represents the DNN reasoning task division model.
[0054] The reward function R(t) is as follows:
[0055]
[0056] In the formula, β represents the weight coefficient, D n (t) represents the DNN inference latency model.
[0057] Among them, the penalty As shown below:
[0058]
[0059] In the formula, ρ n (t) represents DNN subtask I n (t) is the maximum tolerated delay.
[0060] Furthermore, the asynchronous advantage actor-critic algorithm based on multi-task learning solves the DNN reasoning task division model, and the steps of obtaining the divided DNN reasoning tasks include:
[0061] 6.1) Computing the Asynchronous Advantage Actor-Critic Algorithm State Value Function As shown below:
[0062]
[0063] In the formula, Represents the state space. represents the cumulative discounted reward, k represents the iteration index, γ represents the discount factor, and E(·) represents the expectation function.
[0064] 6.2) Update the reward function R(t) as follows:
[0065]
[0066] 6.3) The loss function f(θ) of the asynchronous advantage actor-critic algorithm based on multi-task learning is as follows:
[0067]
[0068] Among them, the actor network loss function f π (θ I ) is as follows:
[0069]
[0070] Where A(t) is the action taken by the DNN reasoning task partitioning model at time t. δ is the trade-off coefficient. H(π(A(t); θ I )) is an entropy-encouraging exploration based on a multi-task learning asynchronous advantage actor-critic algorithm.
[0071] Critic network loss function f v (θ v ) is as follows:
[0072]
[0073] The system based on the above method includes: M edge base stations, N mobile devices and a model partitioning controller.
[0074] Among them, each edge base station is equipped with an edge server.
[0075] The mobile device is used to generate a DNN reasoning task.
[0076] The model partitioning controller is used to divide the DNN reasoning task into several subtasks and transmit the subtasks to the edge server.
[0077] The edge server receives the subtasks and performs distributed DNN reasoning services on the subtasks.
[0078] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the above-mentioned distributed model reasoning acceleration method under the edge computing network.
[0079] The technical effect of the present invention is unquestionable. The present invention designs an edge computing system model including M different edge base stations and several mobile devices. The present invention comprehensively considers the design of the DNN model partitioning strategy in the distributed model reasoning process, and proposes an optimization objective function that minimizes the DNN task reasoning delay. The present invention minimizes system overhead by comprehensively considering the distributed DNN reasoning delay in the edge computing network.
[0080] The present invention proposes an asynchronous dominant actor-critic algorithm based on multi-task learning to perform DNN model partitioning. This method uses information data of edge servers, mobile devices and DNN reasoning tasks to model, and calculates the DNN model partitioning strategy through an asynchronous dominant actor-critic algorithm based on multi-task learning. Compared with other distributed DNN model partitioning methods, it has better convergence efficiency and accuracy, and provides an efficient solution for the distributed model reasoning acceleration process in the field of edge computing.
[0081] The present invention comprehensively considers the design of DNN model partitioning strategy in the distributed model reasoning process, and has a wider range of applications compared to other edge computing systems. The present invention comprehensively considers comprehensive factors such as the maximum tolerable delay of DNN reasoning tasks and the remaining available energy of mobile devices, and gives the optimal DNN model partitioning strategy. At the same time, the DNN model partitioning strategy is determined by the asynchronous advantage actor-critic algorithm based on multi-task learning, which greatly reduces the reasoning delay of the edge computing system.
[0082] The present invention provides a DNN model partitioning method in an edge computing network. The method minimizes the DNN task reasoning delay by optimizing the DNN model partitioning strategy while ensuring that the maximum tolerable delay of the DNN reasoning task and the remaining available energy requirements of the mobile device are met.
[0083] The present invention improves the efficiency and performance of model reasoning tasks. The present invention takes into account the limitations of edge device resources and reduces the load of network data transmission by reasonably allocating computing tasks and data. The present invention adopts appropriate scheduling and coordination strategies to ensure efficient communication and collaboration between computing nodes to accelerate the entire DNN model reasoning process. The present invention can achieve efficient distributed model reasoning under the edge computing network, provide low-latency reasoning services and save network bandwidth resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0084] Figure 1 It is the system model diagram;
[0085] Figure 2 The figure is a flowchart of a distributed model reasoning acceleration method in an edge computing network. DETAILED DESCRIPTION
[0086] The present invention is further described below in conjunction with the embodiments, but it should not be understood that the above subject matter of the present invention is limited to the following embodiments. Without departing from the above technical ideas of the present invention, various substitutions and changes are made according to the common technical knowledge and customary means in the art, which should all be included in the protection scope of the present invention.
[0087] Embodiment 1:
[0088] See also Figure 1 to Figure 2 , a distributed model reasoning acceleration method under an edge computing network, comprising the following steps:
[0089] 1) Establish an edge computing system.
[0090] 2) Obtain information data of all edge servers, mobile devices, and DNN inference tasks in the edge computing system.
[0091] 3) Construct a DNN reasoning task partitioning model and initialize the DNN reasoning task partitioning model.
[0092] Initialization processing means that all DNN reasoning subtask initialization stages are processed locally.
[0093] 4) Establish DNN inference delay model and DNN inference energy consumption model.
[0094] The DNN inference delay model is used to describe the delay in processing DNN inference tasks.
[0095] The DNN reasoning energy consumption model is used to describe the energy consumption of the DNN reasoning task.
[0096] 5) Construct state space, action space and reward function.
[0097] The state space is used to store the state information of the DNN reasoning task.
[0098] The action space is used to describe the actions taken by the DNN reasoning task partitioning model at time t in the edge computing system.
[0099] The reward function is used to guide the actions taken by the DNN reasoning task partitioning model at time t.
[0100] 6) The asynchronous advantage actor-critic algorithm based on multi-task learning solves the DNN reasoning task division model and obtains the divided DNN reasoning tasks.
[0101] Embodiment 2:
[0102] A distributed model reasoning acceleration method under an edge computing network. The main technical content is shown in Example 1. Furthermore, the edge computing system includes M edge base stations, N mobile devices and a model partitioning controller.
[0103] Among them, each edge base station is equipped with an edge server.
[0104] The mobile device is used to generate a DNN reasoning task.
[0105] The model partitioning controller is used to divide the DNN reasoning task into several subtasks and transmit the subtasks to the edge server.
[0106] The edge server receives the subtasks and performs distributed DNN reasoning services on the subtasks.
[0107] Embodiment 3:
[0108] A distributed model reasoning acceleration method under an edge computing network, the main technical content of which is shown in any one of Examples 1 to 2. Furthermore, the information data of all edge servers, mobile devices and DNN reasoning tasks in the edge computing system include: the computing power of the edge server, the device transmission rate between edge servers, the transmission rate between the edge server and the mobile device, the local computing power of the mobile device, the bandwidth allocated to the mobile device, the power of the mobile device, the size of each DNN subtask, and the computing power required for each DNN subtask.
[0109] Embodiment 4:
[0110] A distributed model reasoning acceleration method under an edge computing network, the main technical content of which is shown in any one of embodiments 1 to 3, further, the DNN reasoning task division model X n (t) is as follows:
[0111]
[0112] Where t represents time. n is the number of the mobile device, n = 1, 2, ..., N, and N is the total number of mobile devices. Denotes DNN subtask I n (t) Whether it is processed in edge server m, where m = 1, 2, ..., M, and M is the total number of edge servers. Denotes DNN subtask I n (t) Whether to process locally.
[0113] Embodiment 5:
[0114] A distributed model reasoning acceleration method under an edge computing network, the main technical content of which is shown in any one of Examples 1 to 4. Furthermore, the DNN reasoning delay model includes the local processing delay and edge processing delay of the DNN task.
[0115] The DNN reasoning energy consumption model includes the local reasoning energy consumption of the DNN task and the intermediate DNN feature map uploading energy consumption.
[0116] Embodiment 6:
[0117] A distributed model reasoning acceleration method under an edge computing network, the main technical content of which is shown in any one of embodiments 1 to 5, further, the DNN reasoning delay model D n (t) is as follows:
[0118]
[0119] Where t represents time and l(·) is the judgment function. Denotes DNN subtask I n (t) whether it is processed locally, Denotes DNN subtask I n (t) Whether it is processed in the edge server m.
[0120] Among them, local processing delay As shown below:
[0121]
[0122] In the formula, is the computing power required for each DNN subtask, and μ is the local computing power of the mobile device.
[0123] Edge processing latency As shown below:
[0124]
[0125] Among them, the transmission delay of the intermediate feature graphs of adjacent DNN subtasks is As shown below:
[0126]
[0127] In the formula, It means that one of the two adjacent DNN subtasks is processed locally and the other is processed in the edge server. Indicates that two adjacent DNN subtasks are processed in different edge servers. 0 indicates that two adjacent DNN subtasks are processed in the same edge server or locally at the same time.
[0128] DNN Subtask I n (t) Calculate the delay in edge server m As shown below:
[0129]
[0130] In the formula, C m is the computing capacity of edge server m.
[0131] Local inference energy consumption of the DNN task As shown below:
[0132]
[0133] Where, t represents time and τ represents energy coefficient. is the computing power required for each DNN subtask, and μ is the local computing power of the mobile device.
[0134] The energy consumption of uploading the intermediate DNN feature map As shown below:
[0135]
[0136] In the formula, p n Indicates the transmission power of the device.
[0137] Embodiment 7:
[0138] A distributed model reasoning acceleration method under an edge computing network, the main technical content of which is shown in any one of embodiments 1 to 6, further, the state space As shown below:
[0139]
[0140] Wherein, t represents time. Denotes DNN subtask I n (t) state, n = 1, 2, ..., N, N is the total number of mobile devices. Denotes DNN subtask I n The size of (t), Denotes DNN subtask I n (t) Required computing power, v n,m (t) represents the transmission rate between edge server m and mobile device n. r (t) represents the remaining available energy of the mobile device at time t.
[0141] In the action space, the action A(t) taken by the DNN reasoning task partitioning model at time t is as follows:
[0142] A(t)={X1(t),X2(t),...,X N (t)} (10)
[0143] In the formula, X n (t) represents the DNN reasoning task division model.
[0144] The reward function R(t) is as follows:
[0145]
[0146] In the formula, β represents the weight coefficient, D n (t) represents the DNN inference latency model.
[0147] Among them, the penalty As shown below:
[0148]
[0149] In the formula, ρ n (t) represents DNN subtask I n (t) is the maximum tolerated delay.
[0150] Embodiment 8:
[0151] A distributed model reasoning acceleration method under an edge computing network, the main technical content of which is shown in any one of embodiments 1 to 7. Further, the asynchronous advantage actor-critic algorithm based on multi-task learning solves the DNN reasoning task division model, and the steps of obtaining the divided DNN reasoning tasks include:
[0152] 6.1) Computing the Asynchronous Advantage Actor-Critic Algorithm State Value Function As shown below:
[0153]
[0154] In the formula, Represents the state space. represents the cumulative discounted reward, k represents the iteration index, γ represents the discount factor, and E(·) represents the expectation function.
[0155] 6.2) Update the reward function R(t) as follows:
[0156]
[0157] 6.3) The loss function f(θ) of the asynchronous advantage actor-critic algorithm based on multi-task learning is as follows:
[0158]
[0159] Among them, the actor network loss function f π (θ I ) is as follows:
[0160]
[0161] Where A(t) is the action taken by the DNN reasoning task partitioning model at time t. δ is the trade-off coefficient. H(π(A(t); θ I )) is an entropy-encouraging exploration based on a multi-task learning asynchronous advantage actor-critic algorithm.
[0162] Critic network loss function f v (θ v ) is as follows:
[0163]
[0164] Embodiment 9:
[0165] A system based on the method described in any one of Examples 1-8 includes: M edge base stations, N mobile devices and a model partitioning controller.
[0166] Among them, each edge base station is equipped with an edge server.
[0167] The mobile device is used to generate a DNN reasoning task.
[0168] The model partitioning controller is used to divide the DNN reasoning task into several subtasks and transmit the subtasks to the edge server.
[0169] The edge server receives the subtasks and performs distributed DNN reasoning services on the subtasks.
[0170] Embodiment 10:
[0171] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the distributed model reasoning acceleration method under an edge computing network described in any one of Examples 1 to 8.
[0172] Embodiment 11:
[0173] See also Figure 1 to Figure 2 , a distributed model reasoning acceleration method under an edge computing network, comprising the following steps:
[0174] 1) Establish an edge computing system.
[0175] 2) Obtain information data of all edge servers, mobile devices, and DNN inference tasks in the edge computing system.
[0176] 3) Construct a DNN reasoning task partitioning model and initialize the DNN reasoning task partitioning model.
[0177] 4) Establish DNN inference delay model and DNN inference energy consumption model.
[0178] The DNN inference delay model is used to describe the delay in processing DNN inference tasks.
[0179] The DNN reasoning energy consumption model is used to describe the energy consumption of the DNN reasoning task.
[0180] 5) Construct state space, action space and reward function.
[0181] The state space is used to store the state information of the DNN reasoning task.
[0182] The action space is used to describe the actions taken by the DNN reasoning task partitioning model at time t in the edge computing system.
[0183] The reward function is used to guide the actions taken by the DNN reasoning task partitioning model at time t.
[0184] 6) The asynchronous advantage actor-critic algorithm based on multi-task learning solves the DNN reasoning task division model and obtains the divided DNN reasoning tasks.
[0185] Embodiment 12:
[0186] A distributed model reasoning acceleration method under an edge computing network. The main technical content is shown in Example 11. Furthermore, the edge computing system includes M edge base stations, N mobile devices and a model partitioning controller.
[0187] Among them, each edge base station is equipped with an edge server.
[0188] The mobile device is used to generate a DNN reasoning task.
[0189] The model partitioning controller is used to divide the DNN reasoning task into several subtasks and transmit the subtasks to the edge server.
[0190] The edge server receives the subtasks and performs distributed DNN reasoning services on the subtasks.
[0191] Embodiment 13:
[0192] A distributed model reasoning acceleration method under an edge computing network, the main technical content of which is shown in any one of embodiments 11 to 12, further, the information data of all edge servers, mobile devices and DNN reasoning tasks in the edge computing network includes: the computing capacity C of the edge server m , device transmission rate between edge servers v max , the transmission rate between the edge server and the mobile device v n,m (t), the local computing power μ of the mobile device, the bandwidth λ allocated to the mobile device, and the power p of the mobile device m , each DNN subtask I n (t) size Each DNN subtask I n (t) Required computing power
[0193] Embodiment 14:
[0194] A distributed model reasoning acceleration method under an edge computing network, the main technical content of which is shown in any one of embodiments 11 to 13, further, the DNN reasoning task division model X n (t) is as follows:
[0195]
[0196] Wherein, t represents time, n represents the number of the mobile device, n=1, 2, ..., N, and N represents the total number of mobile devices. Denotes DNN subtask I n (t) Whether it is processed in edge server m, where m=1, 2, ..., M, and M is the total number of edge servers. Denotes DNN subtask I n (t) Whether to process locally.
[0197] Embodiment 15:
[0198] A distributed model reasoning acceleration method under an edge computing network, the main technical content of which is shown in any one of Examples 11 to 14. Furthermore, the DNN reasoning delay model includes the local processing delay and edge processing delay of the DNN task.
[0199] The DNN reasoning energy consumption model includes the local reasoning energy consumption of the DNN task and the intermediate DNN feature map uploading energy consumption.
[0200] Embodiment 16:
[0201] A distributed model reasoning acceleration method under an edge computing network, the main technical content of which is shown in any one of embodiments 11 to 15, further, the DNN reasoning delay model D n (t) is as follows:
[0202]
[0203] Where t represents time. l(·) is a judgment function that outputs 1 when the internal condition is true, otherwise, it outputs 0. Denotes DNN subtask I n (t) whether it is processed locally, Denotes DNN subtask I n (t) Whether it is processed in the edge server m.
[0204] Among them, local processing delay As shown below:
[0205]
[0206] In the formula, is the computing power required for each DNN subtask, and μ is the local computing power of the mobile device.
[0207] Edge processing latency As shown below:
[0208]
[0209] Among them, the transmission delay of the intermediate feature graphs of adjacent DNN subtasks is As shown below:
[0210]
[0211] In the formula, It means that one of the two adjacent DNN subtasks is processed locally and the other is processed in the edge server. Indicates that two adjacent DNN subtasks are processed in different edge servers. 0 indicates that two adjacent DNN subtasks are processed in the same edge server or locally at the same time, and no transmission delay occurs.
[0212] DNN Subtask I n (t) Calculate the delay in edge server m As shown below:
[0213]
[0214] In the formula, C m is the computing capacity of edge server m.
[0215] Local inference energy consumption of the DNN task As shown below:
[0216]
[0217] Where t represents time. τ=10 -26 Represents the energy coefficient. is the computing power required for each DNN subtask, and μ is the local computing power of the mobile device.
[0218] The energy consumption of uploading the intermediate DNN feature map As shown below:
[0219]
[0220] In the formula, p n Indicates the transmission power of the device.
[0221] The system objective function is to minimize the delay of all DNN subtasks, and its calculation formula is as follows:
[0222]
[0223] Embodiment 17:
[0224] A distributed model reasoning acceleration method under an edge computing network, the main technical content of which is shown in any one of embodiments 11 to 16, further, the state space is obtained by a state space set Characterization is as follows:
[0225]
[0226] Wherein, t represents time. Denotes DNN subtask I n (t), n = 1, 2, ..., N, N is the total number of mobile devices. Denotes DNN subtask I n The size of (t), Denotes DNN subtask I n (t) Required computing power, v n,m (t) represents the transmission rate between edge server m and mobile device n. r (t) represents the remaining available energy of the mobile device at time t.
[0227] The action space is used to describe the actions taken by the distributed DNN reasoning task partitioning strategy in the edge computing system. In the action space, the action A(t) taken by the DNN reasoning task partitioning model at time t is as follows:
[0228] A(t)={X1(t),X2(t),...,X N (t)} (10)
[0229] In the formula, X n (t) represents the DNN reasoning task division model.
[0230] The reward function R(t) is as follows:
[0231]
[0232] In the formula, β represents the weight coefficient, which is used to balance the DNN task reasoning delay and penalty factor. n (t) represents the DNN inference latency model.
[0233] Among them, the penalty As shown below:
[0234]
[0235] In the formula, ρ n (t) represents DNN subtask I n (t) is the maximum tolerated delay.
[0236] Embodiment 18:
[0237] A distributed model reasoning acceleration method under an edge computing network, the main technical content of which is shown in any one of embodiments 11 to 17. Further, the asynchronous advantage actor-critic algorithm based on multi-task learning solves the DNN reasoning task division model, and the steps of obtaining the divided DNN reasoning tasks include:
[0238] 6.1) Computing the Asynchronous Advantage Actor-Critic Algorithm State Value Function As shown below:
[0239]
[0240] In the formula, Represents the state space. represents the cumulative discounted reward, k represents the iteration index, γ represents the discount factor, and E(·) represents the expectation function.
[0241] 6.2) The asynchronous advantage actor-critic algorithm uses the k-step method to update its reward function. The reward function R(t) is updated as follows:
[0242]
[0243] 6.3) The loss function f(θ) of the asynchronous advantage actor-critic algorithm based on multi-task learning is as follows:
[0244]
[0245] Among them, the actor network loss function f π (θ I ) is as follows:
[0246]
[0247] Where A(t) is the action taken by the DNN reasoning task partitioning model at time t. δ is a coefficient used to control the strength of the entropy regularization term and promote the trade-off between development and exploration. H(π(A(t); θ I )) is an entropy-encouraging exploration based on a multi-task learning asynchronous advantage actor-critic algorithm.
[0248] Critic network loss function f v (θ v ) is as follows:
[0249]
[0250] Embodiment 19:
[0251] A system based on the method described in any one of Examples 11-18 includes: M edge base stations, N mobile devices and a model partitioning controller.
[0252] Among them, each edge base station is equipped with an edge server.
[0253] The mobile device is used to generate a DNN reasoning task.
[0254] The model partitioning controller is used to divide the DNN reasoning task into several subtasks and transmit the subtasks to the edge server.
[0255] The edge server receives the subtasks and performs distributed DNN reasoning services on the subtasks.
[0256] Each base station has an edge server that can provide distributed DNN inference services for mobile devices. Mobile devices in the edge computing system can generate DNN inference tasks. Each DNN inference task I(t) = {I1(t), I2(t), ..., I M (t)} consists of M DNN subtasks.
[0257] Embodiment 20:
[0258] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the distributed model reasoning acceleration method under an edge computing network described in any one of Examples 11 to 18.
[0259] Embodiment 21:
[0260] See also Figure 1 to Figure 2 , a distributed model reasoning acceleration method and system under an edge computing network, comprising the following steps:
[0261] 1) Establish an edge computing system that supports distributed model reasoning acceleration. The edge computing system includes M different edge base stations and several mobile devices. Each base station has an edge server that can provide distributed DNN reasoning services for mobile devices. The mobile devices in the edge computing system can generate DNN reasoning tasks. Each DNN reasoning task I(t) = {I1(t), I2(t), ..., I M (t)} consists of M DNN subtasks.
[0262] 2) Obtain information data of all edge servers, mobile devices, and DNN reasoning tasks in the edge computing network. The information data of edge servers, mobile devices, and DNN reasoning tasks includes the computing capacity C of the edge servers. m , the device transmission rate between edge servers v max , the transmission rate between the edge server and the mobile device v n,m (t), the local computing power μ of the mobile device, the bandwidth λ allocated to the mobile device, and the power p of the mobile device m , each DNN subtask I n (t) size and the computing power required
[0263] 3) Initialize the DNN model partitioning strategy. The DNN model partitioning strategy set in the edge computing system can be expressed as in Denotes DNN reasoning task I n (t) whether it is processed locally, Denotes DNN subtask I n (t) Whether it is processed in the edge server m.
[0264] 4) Establish a DNN inference delay model and energy consumption model. The DNN inference delay model includes the local processing delay and edge processing delay of the DNN task. The DNN inference energy consumption model includes the local inference energy consumption of the DNN task and the intermediate DNN feature map upload energy consumption.
[0265] For DNN reasoning task I n (t), the DNN inference delay is calculated as follows:
[0266]
[0267] In the formula, represents the local processing delay of the DNN task, represents edge processing delay. l(·) represents a judgment function, which outputs 1 when the internal condition is true, otherwise, it outputs 0.
[0268] Local processing delay The calculation is as follows:
[0269]
[0270] Edge processing latency The calculation formula is as follows:
[0271]
[0272] In the formula, represents the transmission delay of the intermediate feature maps of adjacent DNN subtasks, Denotes DNN subtask I n (t) The delay is calculated in edge server m.
[0273] Transmission delay The calculation formula is as follows:
[0274]
[0275] In the formula, “0” means that adjacent DNN subtasks are processed locally or offloaded to the same edge server at the same time, and no transmission delay occurs; Indicates that one of the adjacent DNN subtasks is processed locally and the other is processed in the edge server; Indicates that adjacent DNN subtasks are processed in different edge servers.
[0276] Calculating Delay The calculation formula is as follows:
[0277]
[0278] The local inference energy consumption calculation formula is as follows:
[0279]
[0280] Where τ = 10 -26 Represents the energy coefficient. The system objective function is to minimize the delay of all DNN subtasks, and its calculation formula is as follows:
[0281]
[0282] 5) Construct state space, action space and reward function.
[0283] The state space is defined by the state space set Characterization, that is:
[0284]
[0285] In the formula, Denotes DNN subtask I n (t) state; W r (t) represents the remaining available energy of the mobile device at time t.
[0286] The action space is used to describe the actions taken by the distributed DNN reasoning task partitioning strategy in the edge computing system;
[0287] The action A(t) taken at a given time t is as follows:
[0288] A(t)={X1(t),X2(t),...,X N (t)} (9)
[0289] The reward function calculation is as follows:
[0290]
[0291] Where β represents the weight coefficient, which is used to balance the DNN task reasoning delay and penalty factor; represents the penalty term, The calculation formula is as follows:
[0292]
[0293] In the formula, ρ n (t) represents DNN subtask I n (t) is the maximum tolerated delay.
[0294] 6) Use the asynchronous advantage actor-critic algorithm based on multi-task learning to solve the DNN model partitioning strategy. Among them, the asynchronous advantage actor-critic algorithm state value function is calculated as follows:
[0295]
[0296] In the formula, represents the cumulative discounted reward, γ∈[0,1] represents the discount factor; the asynchronous advantage actor-critic algorithm uses the k-step method to update its reward function. The update calculation formula of the reward function is as follows:
[0297]
[0298] Based on the advantage function, the actor network loss function is calculated as follows:
[0299]
[0300] Where the coefficient δ is used to control the strength of the entropy regularization term and promote the trade-off between development and exploration. Similarly, the critic network loss function is calculated as follows:
[0301]
[0302] Therefore, the loss function calculation formula of the asynchronous advantage actor-critic algorithm based on multi-task learning is as follows:
[0303]
[0304] 7) Output the DNN model partitioning strategy using an asynchronous advantage actor-critic algorithm based on multi-task learning.
[0305] It is worth noting that the present invention designs an edge computing system model including M different edge base stations and several mobile devices. The present invention comprehensively considers the design of DNN model partitioning strategy in the distributed model reasoning process and proposes an optimization objective function to minimize the DNN task reasoning delay.
[0306] At the same time, for the objective function and its constraints, the present invention proposes an asynchronous advantage actor-critic algorithm based on multi-task learning to perform DNN model partitioning. This method uses information data of edge servers, mobile devices and DNN reasoning tasks to model, and calculates the DNN model partitioning strategy through an asynchronous advantage actor-critic algorithm based on multi-task learning. Compared with other distributed DNN model partitioning methods, it has better convergence efficiency and accuracy, and provides an efficient solution for the distributed model reasoning acceleration process in the field of edge computing.
Claims
1. A distributed model reasoning acceleration method in an edge computing network, characterized in that: The following steps are involved: 1) Establish edge computing system; 2) Obtain information data of all edge servers, mobile devices, and DNN inference tasks in the edge computing system; 3) Construct a DNN reasoning task partitioning model and initialize the DNN reasoning task partitioning model; 4) Establish DNN inference delay model and DNN inference energy consumption model; The DNN inference delay model is used to describe the delay in processing DNN inference tasks; The DNN inference latency model includes local processing latency and edge processing latency of DNN tasks; The DNN inference latency model D n (t) is as follows: In the formula, t represents time; l(·) is the judgment function; Denotes DNN subtask I n (t) whether it is processed locally, Denotes DNN subtask I n (t) whether it is processed in the edge server m; Among them, local processing delay As shown below: In the formula, is the computing power required for each DNN subtask, μ is the local computing power of the mobile device; Edge processing latency As shown below: Among them, the transmission delay of the intermediate feature graphs of adjacent DNN subtasks is As shown below: In the formula, Indicates that one of the two adjacent DNN subtasks is processed locally and the other is processed in the edge server; Indicates that two adjacent DNN subtasks are processed in different edge servers; 0 indicates that two adjacent DNN subtasks are processed in the same edge server or locally at the same time; DNN Subtask I n (t) Calculate the delay in edge server m As shown below: In the formula, C m is the computing capacity of edge server m; The DNN reasoning energy consumption model is used to describe the energy consumption of the DNN reasoning task; The DNN reasoning energy consumption model includes the local reasoning energy consumption of the DNN task and the intermediate DNN feature map uploading energy consumption; Local inference energy consumption of the DNN task As shown below: In the formula, t represents time; τ represents energy coefficient; is the computing power required for each DNN subtask, μ is the local computing power of the mobile device; The energy consumption of uploading the intermediate DNN feature map As shown below: In the formula, p n Indicates the transmission power of the device; 5) Construct state space, action space and reward function; The state space is used to store state information of the DNN reasoning task; The action space is used to describe the actions taken by the DNN reasoning task partitioning model at time t in the edge computing system; The reward function is used to guide the actions taken by the DNN reasoning task partitioning model at time t; 6) The asynchronous advantage actor-critic algorithm based on multi-task learning solves the DNN reasoning task division model and obtains the divided DNN reasoning tasks.
2. According to a distributed model reasoning acceleration method in an edge computing network according to claim 1, it is characterized in that: The edge computing system includes M edge base stations, N mobile devices and a model partitioning controller; Among them, each edge base station is equipped with an edge server; The mobile device is used to generate a DNN reasoning task; The model partitioning controller is used to divide the DNN reasoning task into a plurality of subtasks and transmit the subtasks to the edge server; The edge server receives the subtasks and performs distributed DNN reasoning services on the subtasks.
3. The distributed model reasoning acceleration method under the edge computing network according to claim 1 is characterized in that: The information data of all edge servers, mobile devices and DNN reasoning tasks in the edge computing system include: the computing power of the edge server, the device transmission rate between edge servers, the transmission rate between edge servers and mobile devices, the local computing power of the mobile device, the bandwidth allocated to the mobile device, the power of the mobile device, the size of each DNN subtask, and the computing power required for each DNN subtask.
4. The distributed model reasoning acceleration method under the edge computing network according to claim 1 is characterized in that: The DNN reasoning task partitioning model X n (t) is as follows: In the formula, t represents time; n is the mobile device number, n=1,2,...,N, N is the total number of mobile devices; Denotes DNN subtask I n (t) Whether it is processed in edge server m, where m = 1, 2, ..., M, and M is the total number of edge servers; Denotes DNN subtask I n (t) Whether to process locally.
5. The distributed model reasoning acceleration method under the edge computing network according to claim 1 is characterized in that: The state space As shown below: In the formula, t represents time; Denotes DNN subtask I n (t) state, n = 1, 2, ..., N, N is the total number of mobile devices; Denotes DNN subtask I n The size of (t), Denotes DNN subtask I n (t) Required computing power, ν n,m (t) represents the transmission rate between edge server m and mobile device n; W r (t) represents the remaining available energy of the mobile device at time t; In the action space, the action A(t) taken by the DNN reasoning task partitioning model at time t is as follows: A(t)={X1(t),X2(t),…,X N (t)} (10) Where, X n (t) represents the DNN reasoning task partitioning model; The reward function R(t) is as follows: In the formula, β represents the weight coefficient, D n (t) represents the DNN inference latency model; Among them, the penalty As shown below: In the formula, ρ n (t) represents DNN subtask I n (t) is the maximum tolerated delay.
6. The distributed model reasoning acceleration method in an edge computing network according to claim 1, characterized in that: The asynchronous advantage actor-critic algorithm based on multi-task learning solves the DNN reasoning task division model, and the steps of obtaining the divided DNN reasoning tasks include: 6.1) Computing the Asynchronous Advantage Actor-Critic Algorithm State Value Function As shown below: In the formula, represents the state space; represents the cumulative discounted reward, k represents the iteration index, γ represents the discount factor; E(·) represents the expectation function; 6.2) Update the reward function R(t) as follows: 6.3) The loss function f(θ) of the asynchronous advantage actor-critic algorithm based on multi-task learning is as follows: Among them, the actor network loss function f π (θ I ) is as follows: Where A(t) is the action taken by the DNN reasoning task partitioning model at time t; δ is the trade-off coefficient; H(π(A(t); θ I )) is based on the multi-task learning asynchronous advantage actor-critic algorithm to encourage exploration entropy; Critic network loss function f v (θ v ) is as follows:
7. A system based on the method according to any one of claims 1 to 6, characterized in that: include: M edge base stations, N mobile devices, and a model partitioning controller; Among them, each edge base station is equipped with an edge server; The mobile device is used to generate a DNN reasoning task; The model partitioning controller is used to divide the DNN reasoning task into a plurality of subtasks and transmit the subtasks to the edge server; The edge server receives the subtasks and performs distributed DNN reasoning services on the subtasks.
8. A computer-readable storage medium, characterized in that: A computer program is stored thereon, which, when executed by a processor, implements the steps of the distributed model reasoning acceleration method under the edge computing network described in any one of claims 1-6.