A DNN partitioning method, an edge computing architecture adopting the method and a storage medium

By deploying shallow networks on edge devices and offloading deep networks to edge servers, combined with game theory modeling to optimize resource allocation, the problems of low computing efficiency and poor scalability in edge networks are solved, and efficient and scalable DRL training is achieved.

CN114281535BActive Publication Date: 2025-10-10SHENZHEN INST OF ADVANCED TECH CHINESE ACAD OF SCI
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111557066.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-18
Publication Date
2025-10-10
Estimated Expiration
2041-12-18

AI Technical Summary

Technical Problem

The existing DRL training framework suffers from low computational efficiency and poor scalability in edge networks. In particular, due to the computing power and communication bandwidth limitations of edge devices, the model converges slowly and bandwidth is severely wasted.

Method used

A DNN partitioning method is proposed, which deploys shallow networks on edge devices and offloads deep networks to edge servers. Game theory modeling is used to achieve collaborative computing between devices and edge servers. A dynamic and efficient jealousy-free partitioning algorithm is designed to optimize resource allocation to minimize the total device response time.

Benefits of technology

It achieves efficient and highly scalable computing on the edge network, dynamically adapts to resource changes, reduces device latency and bandwidth consumption, and improves the computing efficiency and scalability of DRL training.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114281535B_ABST
    Figure CN114281535B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of computer application, in particular to a DNN partition method, an edge computing architecture adopting the partition mechanism and a storage medium. Based on formal definition of a general DNN network, a corresponding optimization objective function is given to design a dynamic and efficient partition algorithm. Meanwhile, the application reduces edge computing network resource consumption based on DNN partition. The DNN partition divides the DNN into a suitable level, places a shallow network on an end device, and splits and unloads a deep network to an edge server. This is a layered unloading decision mechanism which effectively utilizes an edge server faster than a device to realize inference task acceleration. The edge computing architecture and the storage medium adopting the DNN partition mechanism also have the same technical effects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer application technology, and in particular to a DNN partitioning method and an edge computing architecture, storage medium, and terminal device that adopt the partitioning mechanism. Background Art

[0002] As an advanced artificial intelligence technology, deep reinforcement learning (DRL) has achieved great success in many challenging real-world problems. It has been widely deployed on different devices, such as smart cars, smartphones, wearable devices, smart cameras, and other smart objects in edge networks. DRL integrates deep neural networks (DNNs) and reinforcement learning algorithms to implement intelligent decision-making and control on edge devices. However, due to inherent constraints such as energy consumption, chip size, and computing capacity, edge networks are usually composed of embedded devices, and the communication bandwidth in edge networks is often limited. To address these problems, mobile edge computing (MEC) has been widely studied in recent years. Given the high computing power requirements for DNN training and inference, resource-efficient and scalable DRL based on MEC solutions is crucial.

[0003] Due to the performance gap between GPUs and CPUs, accelerating data through GPU-equipped edge servers is a promising approach. For example, executing the same DNN inference task on a GPU takes less than one-tenth the processing time compared to a CPU. Therefore, current mainstream frameworks often support large-scale distributed DRL through CPU-GPU collaboration, such as GA3C, DD-PPO, IMPALA, and Seed-RL. All of these frameworks accelerate the entire training and even the entire inference process on the GPU, while maintaining interaction with the environment on the CPU. Unfortunately, these frameworks are not designed for edge networks because they lack consideration for limited edge resources. While migrating all tasks to edge servers is feasible, it also incurs a huge communication cost, resulting in a waste of network bandwidth and device computing resources, making it difficult to scale to large-scale clusters.

[0004] Existing DRL training frameworks, such as IMPALA and Seed-RL, typically treat DNN training as a whole, performing computations either entirely on the end device (IMPALA) or entirely on an edge server (Seed-RL). However, due to computing power limitations, the all-on-end model significantly hinders rapid model convergence and results in low computational efficiency. Furthermore, because the DRL interaction environment must run on the end device, the all-on-edge model requires uploading all observation data from the end device. Limited by the bandwidth of the edge network, this results in redundant bandwidth waste, and the edge server becomes a computational bottleneck, making large-scale scalability difficult. Existing technologies have shortcomings. Summary of the Invention

[0005] To achieve compatibility between high computational efficiency and high scalability, the present invention analyzes the network structure of DNNs and finds that the output of the intermediate layers is much smaller than the original input. At the same time, large-scale calculations often occur in the deep network. Therefore, the present invention proposes a new DRL training framework. By placing the shallow network on the end device and offloading the deep network to the edge server, the efficient and scalable edge network is achieved, and it can dynamically adapt to resource changes. This solves at least one of the above technical problems.

[0006] An embodiment of the present invention provides a DNN partitioning method, comprising the following steps:

[0007] S1. Abstract the computation type and scale of each layer of the DNN to obtain the DNN's hierarchical architecture and total number of layers.

[0008] S2. Use floating-point operations per second to characterize the floating-point computational capacity and computational time of devices and edge servers, and combine this with the number of DNN layers to mathematically model the DNN partitioning game between devices and edge servers.

[0009] S3. Design an optimization objective function to minimize the total response time of all devices;

[0010] S4. Designing a utility function for the device based on the segmentation layer of the DNN;

[0011] S5. Based on the modeling method of game theory, each device is regarded as an independent intelligent agent, and the goal of each intelligent agent is to maximize its own utility function by selecting the location of the segmentation layer.

[0012] The present invention also provides an edge computing architecture using the above-mentioned DNN partitioning method, comprising a device and an edge server connected to the device; the device is configured as an executor; the edge server is configured as a learner; after the DNN is partitioned, it is deployed on the executor and the learner respectively, and the reasoning task is completed by the two in collaboration;

[0013] The learner is used to run a deep network to achieve acceleration;

[0014] The executor is used to execute a portion of the DNN after segmentation, and the obtained output tensor is output to the learner.

[0015] The present invention also provides a computer-readable storage medium, which stores one or more programs. The one or more programs can be executed by one or more processors to implement the steps in the above-mentioned DNN partitioning method.

[0016] The present invention also provides a terminal device, which includes at least one processor, a display screen, and a memory, and also includes a communication interface and a bus; wherein the processor, the display screen, the memory and the communication interface communicate with each other through the bus; the display screen is configured to display a user guide interface preset in the initial setting mode; the communication interface transmits information; the processor calls the logic instructions in the memory to execute the above-mentioned DNN partitioning method.

[0017] The present invention formally defines a generalized DNN network and provides a corresponding optimization objective function to design a dynamic and efficient partitioning algorithm. At the same time, the present invention reduces edge computing network resource consumption based on DNN partitioning. The present invention partitions the DNN network at an appropriate level, placing the shallow network on the end device and offloading the deep network to the edge server. This is a hierarchical offloading decision-making mechanism, which places part of the inference task on the device and part on the edge server. This mechanism effectively utilizes edge servers that are faster than the device to accelerate inference tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0019] Figure 1 Flow chart of the DNN partitioning method of the present invention;

[0020] Figure 2 This is a schematic diagram of the edge network architecture;

[0021] Figure 3 This is a schematic diagram of the architecture of the Coknight framework of the present invention;

[0022] Figure 4 Schematic diagram of the DNN structure of the present invention, and a schematic diagram of the segmentation of the DNN partition;

[0023] Figure 5 Flowchart of the dynamic efficient jealousy-free partitioning (DEFP) algorithm for DNN partitioning according to the present invention;

[0024] Figure 6 It is a structural diagram of the terminal device of the present invention;

[0025] Figure 7 A comparison chart of the convergence rate (computational efficiency) of the present invention and the prior art;

[0026] Figure 8 This is a comparison chart of the scalability of the present invention and the prior art. DETAILED DESCRIPTION

[0027] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0028] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0029] For a typical edge computing architecture, see the attached Figure 2 The system on the left is composed of a cloud center, edge servers, access points, and edge devices. Figure 2The system on the right shows an edge server with N devices connected to it via Wi-Fi, 5G, or a wired network. The edge server has limited computing power and bandwidth resources, represented by Rc and Rb, respectively. Coknight deploys reinforcement learning actors on edge devices and learners on edge servers. Actors perform real-time reasoning based on device data and execute actions to interact with the environment, while learners train models based on historical interaction trajectory data.

[0030] Due to the limited computing power and communication bandwidth of edge devices, placing all neural network calculations on edge devices is very inefficient. Uploading all calculations to the server requires a large amount of communication bandwidth and is also affected by communication delays. Therefore, after analyzing the structure of the neural network, this paper proposes a partitioning method to segment the neural network to accelerate the reasoning process of the neural network.

[0031] See attached Figure 1 According to an embodiment of the present invention, a DNN partitioning method is provided, comprising the following steps:

[0032] S1. Based on the computation type and scale of each layer of the DNN, we abstract the hierarchical architecture and the total number of layers of the DNN.

[0033] As attached Figure 4 As shown in the figure, part a is an example of an image classification neural network, which consists of a total of 11 layers. The calculation type and scale of each layer are marked in the figure, including 9 3×3 CNN and 2 FC layers.

[0034] In fact, all DNNs can be abstracted into a similar architecture, where each layer performs corresponding tensor calculations and outputs the results to the next layer of the network.

[0035] Since the essence of DNN inference is matrix calculations on the input tensor, the computations at each layer are related to the size of the input tensor. We can use floating-point operations (FLOPs) to measure the computational complexity of each layer. We can define a K-layer DNN as a sequence L = (l1, l2, …, lk), where lk represents the k-th layer of the neural network. Let ck denote the FLOPs size of the k-th layer, and lk is a function related to the size of the input tensor. In short, for a given DNN, the computational cost C under the same input size can be calculated as follows:

[0036]

[0037] S2. Use floating-point operations per second to characterize the floating-point computing capacity and computing time of devices and edge servers, and combine the number of DNN layers to complete the mathematical modeling of the DNN partition game between devices and edge servers.

[0038] We assume a K-layer DNN and use a variable yi (0≤yi≤K) to indicate that the DNN is partitioned at the yi-th layer of device di (i.e., actor i). Let yi = 0 to indicate that the entire DNN model will be executed on the edge server, and let yi = K to indicate that the entire DNN model will be computed independently on the device. Furthermore, let Cd(yi) and Ce(yi) represent the throughput of computing on the device and edge server, respectively, to select the partitioning layer yi. They can be expressed as:

[0039]

[0040]

[0041] Where k is the kth layer of the neural network, and K is the total number of layers in the neural network. ck is the computational overhead (FLOPs) of the kth layer of the neural network. cd(yi) represents the total computational overhead from layer 1 to layer yi, running on the device; ce(yi) represents the total computational overhead from layer yi+1 to layer K, running on the edge server.

[0042] When yi=K, it means that cd(yi) is the total amount of calculation from the first layer to the last layer (K ​​layers), all of which are calculated on the device, that is, independently calculated.

[0043] We use floating-point operations per second (FLOPS) to characterize the computing performance of devices and edge servers. We denote the FLOPS of the edge server as fe. Since devices are usually diverse, we use fdi to denote the FLOPS of device di. Therefore, the computing time of the partitioned task on device di and the edge server is represented by tid(yi) and tie(yi), respectively:

[0044]

[0045]

[0046] Here, fdi represents the floating-point computation per second of the device, and fe represents the floating-point computation per second of the edge server. Therefore, cd(yi) / fdi is the computation time on the device, tdi(yi). Similarly, ce(yi) / fe represents the computation time on the server, tei(yi). Therefore, the computation time of the entire neural network is tdi + tei.

[0047] These two expressions are used to quantify the computation time of a neural network.

[0048] In addition to computational time, we also need to consider data transmission time, which is related to the output tensor size of each layer. Let bk (0≤k≤K) be the output tensor size of each layer, where b0 is the input tensor size and bK is the output tensor size. Assuming that the transmission cost of each unit tensor in each communication network is the same, denoted as tr, then the transmission time is the ratio of bk to tr. In summary, the total response time Ti(yi) of the task partitioned on di can be calculated as:

[0049]

[0050] Similarly, this expression incorporates the time it takes to transfer tensors. Therefore, Ti(yi) represents the splitting of the neural network at layer yi. Layers 1 through yi are computed on the device, and the results are transmitted to the edge server. The remaining layers yi+1 through K are then computed on the edge server. The total computation time includes the computation time between these two parts, the transmission time in between, and the time it takes to send the final output back to the device. This essentially completes the mathematical modeling process.

[0051] S3. Design an optimization objective function with the goal of minimizing the total response time of all devices.

[0052] To ensure the quality of service for tasks, we assume that the resources allocated by the edge server to devices are exclusive. Once these resources are allocated to di, they will not be shared or conflict with other devices. Our goal is to minimize the latency of tasks on all devices, that is, to minimize the total response time Ti(yi) of all devices. This problem can be modeled as a constrained optimization problem (COP) as follows:

[0053]

[0054] subjectto

[0055]

[0056]

[0057]

[0058] where δ is the scaling factor between the size of a tensor and the bandwidth it consumes.

[0059] S4. Design a utility function for the device based on the segmentation layer of the DNN.

[0060] By observing the above mathematical model, we can find that when the task is executed locally on the device, it does not consume the constrained server computing capacity and bandwidth. Therefore, we design a utility function ui for device di based on yi = K, specifically:

[0061]

[0062] S5. Based on the modeling method of game theory, each device is regarded as an independent intelligent agent, and the goal of each intelligent agent is to maximize its own utility function by selecting the location of the segmentation layer.

[0063] We define each device di as a player i, and each slice yi as the player's strategy si. Each player is selfish and wants to maximize their utility function ui. Therefore, the problem becomes how each player maximizes their personal benefit by choosing their own optimal strategy (slice).

[0064] We designed an algorithm called Dynamic Efficient Non-Envy Partitioning (DEFP) as shown in the attached Figure 5 As shown in the figure, this algorithm differs from existing technologies that deploy the entire DNN service on devices or edge servers. Instead, it uses game theory modeling methods to treat each device as an independent intelligent agent. The goal of each intelligent agent is to maximize its own utility function ui by selecting a hierarchical position yi. This eliminates the need for a central server to calculate the hierarchical yi for all devices. Instead, each device automatically divides the DNN into layers according to the algorithm, partitioning the shallow network and deploying it on the device, and the deep network and deploying it on the edge server.

[0065] Furthermore, the DNN portion above the split layer is executed on the device; and the DNN portion below the split layer is executed on the edge server.

[0066] Furthermore, in step S2, the resources allocated to the device by the edge server are exclusive.

[0067] Furthermore, in step S5, a dynamic and efficient jealousy-free partitioning algorithm is used through a game theory modeling method to regard each of the devices as an independent intelligent agent, so that the goal of each intelligent agent is to maximize its own utility function by selecting a hierarchical position.

[0068] Furthermore, the dynamic, efficient, jealousy-free partitioning algorithm is a distributed and incremental algorithm.

[0069] As attached Figure 3As shown, the present invention also provides an edge computing architecture using any of the above-mentioned DNN partitioning methods, including a device and an edge server connected to the device; the device is configured as an executor; the edge server is configured as a learner: after the DNN is partitioned, it is deployed on the executor and the learner respectively, and the reasoning task is completed by the two in collaboration;

[0070] The learner is used to run a deep network to achieve acceleration;

[0071] The executor is used to execute a portion of the DNN after segmentation, and the obtained output tensor is output to the learner.

[0072] Compared with traditional algorithms, after adopting the DNN partitioning algorithm, the edge computing architecture is distributed, in which each device runs independently; at the same time, this architecture is also incremental. When a new device joins, the edge server does not need to recalculate and allocate resources, as long as the new device calculates by itself.

[0073] The DNN partitioning method of this edge computing architecture uses a game theory modeling method to regard each device as an independent intelligent agent. The goal of each intelligent agent is to maximize its own utility function ui by selecting the hierarchical position yi. In this way, there is no need for a central server to calculate the hierarchical yi of all devices. Instead, each device automatically performs stratification according to the algorithm.

[0074] Furthermore, the executor includes: an environment module, a model module and a storage module.

[0075] Furthermore, the learner includes: a model module and a queue module.

[0076] The present invention uses a layered approach to perform reinforcement learning training. Compared to traditional DRL training frameworks that place the complete neural network on a device or edge server for independent calculation, the present invention divides the neural network into two parts, one on the edge server and the other on the device. This minimizes the latency of tasks on all devices. At the same time, the present invention uses game theory to design this distributed dynamic algorithm. Compared to traditional optimization algorithms, it can achieve distributed computing and dynamically increase or decrease devices without the need to recalculate and allocate resources for all devices after adding new devices.

[0077] In the invented Coknight framework, each device joining the training network will automatically select the partitioning layer that suits it according to this algorithm, and use the partitioned DNN to perform inference tasks, thereby accelerating training and computing.

[0078] Based on the above DNN partitioning method, the embodiment provides a computer readable storage medium, the computer readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps in the DNN partitioning method of the above embodiment.

[0079] Based on the above DNN partitioning method, the present application also provides a terminal device, as shown in the accompanying drawings, which comprises at least one processor 20, a display screen 21, and a memory 22, and can further comprise a communications interface 23 and a bus 24. The processor 20, the display screen 21, the memory 22, and the communications interface 23 can communicate with each other through the bus 24. The display screen 21 is configured to display a user guide interface preset in an initial setting mode. The communications interface 23 can transmit information. The processor 20 can call the logical instructions in the memory 22 to execute the DNN partitioning method in the above embodiment. Figure 6

[0080] In addition, the logical instructions in the above memory 22 can be implemented in the form of a software functional unit and sold or used as an independent product, and can be stored in a computer readable storage medium.

[0081] The memory 22, as a computer readable storage medium, can be configured to store software programs, computer executable programs, such as program instructions or modules corresponding to the method in the embodiment of the present disclosure. The processor 20 executes the functions of the application and data processing by running the software programs, instructions or modules stored in the memory 22, that is, implements the method in the above embodiment.

[0082] The memory 22 can include a program storage area and a data storage area, wherein the program storage area can store an operating system and at least one application required by a function; and the data storage area can store data created according to the use of the terminal device and the like.

[0083] In addition, the memory 22 can include a high-speed random access memory and can also include a non-volatile memory. For example, a variety of media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, can also be a transitory storage medium.

[0084] In addition, the specific processes of the above storage medium and the terminal device in which the plurality of instructions are loaded and executed have been described in detail in the above method, and will not be repeated here.

[0085] ​The present invention has been proven to be feasible through sufficient experiments. The widely used Atari game was used for testing. The results are shown in the attached figure. Figure 7 As shown in Figure 3, the convergence rate (computational efficiency) of DRL is higher than that of the other two methods.

[0086] In addition, in terms of scalability, Figure 8 It can be seen that as the number of actors added to the Coknight framework increases, the scalability of the present invention is better than that of the Seed-RL framework.

[0087] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.

Claims

1. A DNN partitioning method, characterized in that: The following steps are involved: S1. Abstract the computation type and scale of each layer of the DNN to obtain the DNN's hierarchical architecture and total number of layers. S2. Use floating-point operations per second to characterize the floating-point computational capacity and computational time of devices and edge servers, and combine this with the number of DNN layers to mathematically model the DNN partitioning game between devices and edge servers. S3. Design an optimization objective function to minimize the total response time of all devices; S4. Designing a utility function for the device based on the segmentation layer of the DNN; S5. A modeling method based on game theory considers each device as an independent intelligent agent. The goal of each intelligent agent is to maximize its own utility function by selecting the location of the segmentation layer. In step S5, a dynamic and efficient jealousy-free partitioning algorithm is used to perform modeling through game theory; The total response time includes the computing time on the device and the edge server plus the intermediate transmission time, and the time it takes to send the final output result back to the device.

2. The DNN partitioning method according to claim 1, wherein: The DNN part above the split layer is executed on the device; the DNN part below the split layer is executed on the edge server.

3. The DNN partitioning method according to claim 1, wherein: In step S2, the resources allocated by the edge server to the device are exclusive.

4. The DNN partitioning method according to claim 1, wherein: The dynamic efficient jealousy-free partitioning algorithm is a distributed and incremental algorithm.

5. An edge computing architecture using the DNN partitioning method according to any one of claims 1 to 4, comprising a device and an edge server connected to the device; characterized in that: The device is configured as an executor; the edge server is configured as a learner: the DNN is segmented and deployed on the executor and the learner respectively, and the reasoning task is completed through the collaboration of the two; The learner is used to run a deep network to achieve acceleration; The executor is used to execute a portion of the DNN after segmentation, and the obtained output tensor is output to the learner.

6. The edge computing architecture according to claim 5, characterized in that: The executor includes: an environment module, a model module and a storage module.

7. The edge computing architecture according to claim 6, characterized in that: The learner includes: a model module and a queue module.

8. A computer-readable storage medium storing one or more programs, wherein the one or more programs can be executed by one or more processors to implement the steps in the DNN partitioning method as described in any one of claims 1 to 4 above.

9. Based on the DNN partitioning method according to any one of claims 1 to 4 above, the present application further provides a terminal device, characterized in that: It includes at least one processor, a display screen, and a memory, as well as a communication interface and a bus; wherein the processor, the display screen, the memory and the communication interface communicate with each other through the bus; the display screen is configured to display a user guide interface preset in the initial setting mode; the communication interface transmits information; the processor calls the logic instructions in the memory to execute the DNN partitioning method described in any one of claims 1-5 above.

Citation Information

Patent Citations

  • Deep learning model reasoning acceleration method based on cooperation of edge server and mobile terminal equipment

    CN110309914A