A method for neural network model segmentation and resource allocation in a wireless power supply edge intelligence scenario
By combining reinforcement learning and MATLAB convex optimization functions in a wireless power edge intelligent system, the time resource allocation and DNN model segmentation are optimized, the impact of channel state changes on task completion rate is resolved, and the efficient completion of multi-user neural network tasks is achieved.
Patent Information
- Application Number
- CN202310530755.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-09
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2043-05-09
AI Technical Summary
In wirelessly powered edge intelligent systems, channel state changes affect time allocation decisions. The challenge is to jointly optimize offloading and time resource allocation to maximize the completion rate of DNN inference tasks, while also considering device energy capture and computing frequency allocation to ensure task completion under limited energy.
This paper proposes a neural network model segmentation and resource allocation method in a wireless power transmission environment. Combining reinforcement learning and MATLAB convex optimization functions, the method optimizes time resource allocation, DNN model segmentation, transmission power allocation, and computation rate allocation decisions to maximize task completion rate.
Under the constraints of time-varying wireless channel states and user latency, the completion rate of multi-user neural network inference computation tasks is significantly improved.
Smart Images

Figure CN116582893B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of 5G network edge intelligence technology, and particularly relates to a method for segmentation and resource allocation of a neural network (DNN) model in a wireless power supply edge intelligence system. This method is applicable to situations where the channel state is time-varying and the user equipment has time delay constraints, and formulates reasonable neural network model segmentation and resource allocation decisions to maximize the user task completion rate. Background Technology
[0002] In edge intelligence systems, the limited energy consumption of devices is a significant constraint in performing DNN inference tasks. Although edge servers assist in completing DNN model inference tasks, local computation and offloading still require substantial computational and transmission energy. Furthermore, the total energy consumption varies greatly depending on the DNN segmentation process at different network layers. Therefore, determining an optimal segmentation decision is crucial.
[0003] Furthermore, considering that wireless devices are typically battery-powered, requiring frequent battery replacements and being environmentally unfriendly, Wireless Power Transfer (WPT) technology can provide continuous power to the devices. In this wirelessly powered edge intelligence system, the wireless access point (AP) transmits energy to the devices while also receiving offloaded computational tasks. However, this system faces two challenges. One challenge is that in environments with fading wireless channels, changes in channel state significantly impact time allocation decisions; how to jointly optimize offload and time resource allocation is a critical issue. Another challenge is that the devices can only capture a limited amount of energy within each time slot; how to allocate the devices' transmit power and computation frequency to ensure that the devices can complete DNN inference with limited energy remains unresolved. Summary of the Invention
[0004] The present invention aims to overcome the above-mentioned shortcomings of the prior art and provide a method for segmentation and resource allocation of neural networks in a wireless power supply edge intelligent system.
[0005] First, to maximize the completion rate of DNN inference computation tasks, this invention proposes a neural network model segmentation and resource allocation model in a wireless power transmission environment. This model, based on the time-varying wireless channel state, further considers the latency constraints of multiple user devices. Second, this invention proposes an optimization algorithm based on reinforcement learning and MATLAB convex optimization functions to achieve effective time resource allocation decisions, DNN model segmentation decisions, transmit power allocation decisions, and computation rate allocation decisions, thereby maximizing the completion rate of DNN inference tasks.
[0006] To achieve the above process, the present invention provides the following technical solution:
[0007] A method for neural network model segmentation and resource allocation in a wireless power supply edge intelligence scenario includes the following steps:
[0008] Step 1: Place the edge server at the access point (AP) and connect it to the AP via a wired connection. The AP has a stable power supply. Place N user devices within the AP's communication range. Each device i has a separate antenna, which can be used for both energy capture and data offloading.
[0009] Step 2: The system is divided into T time slots. In each time slot, device i will generate a deep neural network (DNN) inference task r. i ={L i C i O i}, where L i C represents the number of layers in a DNN network. i ={c i,j |j∈{1,…L i}}, c i,j This represents the number of floating-point operations (FLOPs) required to compute the j-th layer of the DNN model i. i ={o i,j |j∈{1,…L i}}, o i,j This represents the size of the output data of the j-th layer. s = (s0, s1, ..., sj) N ) is the segmentation decision vector of the DNN model, s i This represents the splitting decision for the i-th task.
[0010] Step 3: Within time slot t, the channel state h t The energy remains unchanged. During the first αT time interval, the device simultaneously captures energy (α∈[0,1]), and then offloads data using time-division multiplexing communication during the subsequent (1-α)T time interval. The energy captured by device i is E. i =μPh i αT, where μ∈(0,1) is the energy capture efficiency coefficient, P is the transmit power of the AP, and h i It is the wireless channel gain of device i.
[0011] Step 4: Using the energy E of each user device i With time slot length T as a constraint, and time resource allocation decision α, DNN model segmentation decision s, transmission power allocation decision p, and computing rate allocation decision f as optimization variables, the optimization problem is established with the objective of maximizing the completion rate of user computing tasks.
[0012] Step 5: Train the time allocation decision using reinforcement learning algorithms to optimize the problem. Transform into a problem A traversal search method is used to search for the segmentation decision of the DNN model, thereby solving the problem. Transform into a convex optimization problem Solving convex optimization problems using the fmincon function in MATLAB Finally, the optimization problem is obtained. This leads to the optimal DNN network segmentation and resource allocation scheme.
[0013] Furthermore, in step 4, the optimization problem The expression is:
[0014]
[0015] Where I(X) is an indicator function, here f represents the latency required for the network layer to perform local computation. i This represents the computing speed of device i. r represents the transmission delay required to transmit intermediate parameters. i Indicates the device's transmission rate. f represents the latency required for the network layer to perform computations on the edge server. e It represents the server's computing speed; the optimization variable α represents the energy capture time ratio decision, s=(s0,s1,…,s N ) represents the segmentation decision vector of the DNN model; p = (p0, p1, ..., p N ) represents the power allocation decision vector; f = (f0, f1, ..., f N ) represents the computation rate allocation decision vector.
[0016] Furthermore, the optimization problem described in step 4... The constraint expression is:
[0017]
[0018]
[0019] 0≤α≤1 (4)
[0020]
[0021]
[0022]
[0023] Equation (2) indicates that the sum of the transmission delays of all user tasks cannot exceed the total computational offload time; Equation (3) indicates that the energy consumption required for computational offload of the user equipment cannot exceed the energy captured in the first αT time period. The energy consumption required for local computation is given by k, where k is the energy efficiency coefficient of the device chip. For transmission energy consumption, Idle energy consumption It is the power of the equipment when it is idling. Equation (4) represents the device idle time; Equation (5) indicates that the device energy capture time is limited to the time slot length; Equation (6) indicates that the DNN cut point is between 0 and the network layer number L. i Between; Equation (6) indicates that the device's computing speed is limited to 0 to Inside, Equation (7) indicates the maximum computing speed of the device; Equation (7) indicates that the device's transmission power is limited to 0 to... Inside, This indicates the device's maximum transmission power.
[0024] Furthermore, in step 5, the problem The expression is:
[0025]
[0026]
[0027] in The total completion delay of task i is represented by equation (9); Equation (9) indicates that the transmission delay of all user equipment i cannot exceed the offload delay allocated to it, where ρ i This represents the proportion of the total unloading latency due to the time resource constraint of task i. Additionally, regarding the aforementioned issues... Chinese equations (3), (5), (6), and (7) are also problems. The constraint expression.
[0028] question The expression is:
[0029]
[0030] The above issues Chinese equations (3), (6), (7) and the problem Chinese equation (9) is the problem The constraint expression.
[0031] Furthermore, in step 5, an algorithm combining reinforcement learning with traversal search and MATLAB functions is used to address the problem in step 4. The steps to solve the problem are as follows:
[0032] Step 5.1: Randomly initialize the parameters θ of the neural network in reinforcement learning, starting from time slot t=1 and iterating according to the channel state h at time t. t Output decision Generate a set containing K candidate values according to the exploration step size Δ, denoted as:
[0033] Step 5.2: Substitute all K candidate values obtained in Step 4.1 into the problem. To solve this, iterate through each user task and search for s using a traversal search method. i The problem is further transformed into a convex optimization problem. Each s i Substitution problem And solve the problem using the fmincon function. To obtain the optimal After the traversal is complete, we can further obtain... And task completion rate.
[0034] Step 5.3: Based on the results obtained in Step 4.2, select the optimal decision value from the candidate decision values that maximizes the task completion rate. and the corresponding state-action pair Add it to the experience replay pool. When the replay pool is full, the old state-action will be added to the new one. replace.
[0035] Step 5.4: Select state-action pairs in batches from the experience replay pool as samples to train the neural network, and adjust the neural network parameters from θ. t Updated to θ t+1 (The corresponding strategy also becomes) The latest strategy Used in the next time slot according to h t+1 To generate decision estimates
[0036] Step 5.5: Repeat the above process until convergence, and obtain the optimal strategy.
[0037] The beneficial effects of this invention are mainly reflected in: it is applicable to neural network task segmentation and related resource allocation decisions in wirelessly powered multi-user edge intelligence scenarios. Based on the wireless channel state and the latency constraints proposed by the user, it jointly optimizes the energy capture time allocation, neural network model segmentation, transmission power allocation and computing rate allocation decisions, and finally significantly improves the completion rate of multi-user neural network inference computing tasks. Attached Figure Description
[0038] Figure 1 This is a diagram of the DNN inference model for the wireless power supply edge intelligent system of the present invention.
[0039] Figure 2 This is a structural diagram of the neural network model of the present invention.
[0040] Figure 3 This is a flowchart of the algorithm of the present invention. Detailed Implementation
[0041] The invention will now be further described with reference to the accompanying drawings.
[0042] Combination Figure 1 , Figure 2 , Figure 3 A method for neural network model segmentation and resource allocation in a wireless power supply edge intelligence scenario, comprising the following steps:
[0043] Step 1: Place the edge server at the access point (AP) and connect it to the AP via a wired connection. The AP has a stable power supply. Place N user devices within the base station's communication range. The system is time-slotted, and the channel state between the devices and the AP is h within each time slot t. t Furthermore, each time-slot device generates a DNN inference task, and the device has a separate antenna that can be used to capture energy or offload the segmented DNN model.
[0044] Step 2: Each time slot device i will generate a DNN inference task, which is represented as r in this invention. i ={L i C i O i}, where L i C represents the number of layers in a DNN network. i ={c i,j |j∈{1,…L i}}, c i,j This represents the number of floating-point operations (FLOPs) required to compute the j-th layer of the DNN model i. i ={o i,j |j∈{1,…L i}}, o i,j This represents the size of the output data of the j-th layer. s = (s0, s1, ..., sj) N ) is the segmentation decision vector of the DNN model, s i This represents the splitting decision for the i-th task.
[0045] Step 3: Within time slot t, the channel state h t The energy capture time remains unchanged. During the first αT time period, the device simultaneously captures energy, and during the subsequent (1-α)T time period, it offloads data using time-division multiplexing communication. The energy captured by device i is E. i =μPh iαT, where μ∈(0,1) is the energy capture efficiency coefficient, P is the transmit power of the AP, and h i It is the wireless channel gain of device i.
[0046] Step 4: Using the energy E of each user device i Using time slot T as constraints, and time resource allocation decisions, DNN model segmentation decisions, transmission power allocation decisions, and computing rate allocation decisions as optimization variables, the optimization problem is established with the objective of maximizing the completion rate of user computing tasks.
[0047] Step 5: Train the time allocation decision using reinforcement learning algorithms to optimize the problem. Transform into a problem A traversal search method is used to search for the segmentation decision of the DNN model, thereby solving the problem. Transform into a convex optimization problem Solving convex optimization problems using the fmincon function in MATLAB Finally, the optimization problem is obtained. This leads to the optimal DNN network segmentation and resource allocation scheme.
[0048] Furthermore, in step 4, the optimization problem The expression is:
[0049]
[0050] Where I(X) is an indicator function, here f represents the latency required for the network layer to perform local computation. i This represents the computing speed of device i. r represents the transmission delay required to transmit intermediate parameters. i Indicates the device's transmission rate. f represents the latency required for the network layer to perform computations on the edge server. e It represents the server's computing speed; the optimization variable α represents the energy capture time ratio decision, s=(s0,s1,…,s N ) represents the segmentation decision vector of the DNN model; p = (p0, p1, ..., p N ) represents the power allocation decision vector; f = (f0, f1, ..., f N ) represents the computation rate allocation decision vector.
[0051] Going further, optimizing the problem The constraint expression is:
[0052]
[0053]
[0054] 0≤α≤1 (14)
[0055]
[0056]
[0057]
[0058] Equation (12) indicates that the sum of the transmission delays of all user tasks cannot exceed the total computational offload time; Equation (13) indicates that the energy consumption required for computational offload of the user equipment cannot exceed the energy captured in the first αT time period. The energy consumption required for local computation is given by k, where k is the energy efficiency coefficient of the device chip. For transmission energy consumption, Idle energy consumption It is the power of the equipment when it is idling. Equation (14) represents the device idle time; Equation (15) indicates that the device energy capture time is limited to the time slot length; Equation (16) indicates that the DNN cut point is between 0 and the network layer number L. i Between; Equation (16) indicates that the device's computing speed is limited to 0 to Inside, Equation (17) indicates the maximum computing speed of the device; Equation (17) indicates that the device's transmit power is limited to 0 to 1000 rpm. Inside, This indicates the device's maximum transmission power.
[0059] Furthermore, in step 5, the problem The expression is:
[0060]
[0061]
[0062] in Let ρ represent the total completion delay of task i; Equation (19) indicates that the transmission delay of all user equipment i cannot exceed the offload delay allocated to it, where ρ i This represents the proportion of the total unloading latency due to the time resource constraint of task i. Additionally, regarding the aforementioned issues... Chinese equations (13), (15), (16), and (17) are also problems. The constraint expression.
[0063] question The expression is:
[0064]
[0065] The above issues Chinese equations (13), (16), (17) and the problem Chinese equation (19) is the problem The constraint expression.
[0066] Furthermore, in step 5, an algorithm combining reinforcement learning with traversal search and MATLAB functions is used to address the problem in step 4. The steps to solve the problem are as follows:
[0067] Step 5.1: Randomly initialize the parameters θ of the neural network in reinforcement learning, starting from time slot t=1 and iterating according to the channel state h at time t. t Output decision Generate a set containing K candidate values according to the exploration step size Δ, denoted as:
[0068] Step 5.2: Substitute all K candidate values obtained in Step 4.1 into the problem. To solve this, iterate through each user task and search for s using a traversal search method. i The problem is further transformed into a convex optimization problem. Each s i Substitution problem And solve the problem using the fmincon function. To obtain the optimal After the traversal is complete, we can further obtain... And task completion rate.
[0069] Step 5.3: Based on the results obtained in Step 4.2, select the optimal decision value from the candidate decision values that maximizes the task completion rate. and the corresponding state-action pair Add it to the experience replay pool. When the replay pool is full, the old state-action will be added to the new one. replace.
[0070] Step 5.4: Select state-action pairs in batches from the experience replay pool as samples to train the neural network, and adjust the neural network parameters from θ. t Updated to θ t+1 (The corresponding strategy also becomes) The latest strategy Used in the next time slot according to h t+1 To generate decision estimates
[0071] Step 5.5: Repeat the above process until convergence, and obtain the optimal strategy.
[0072] For example Figure 1 The specific implementation scheme of the present invention is illustrated using the wireless-powered edge intelligent system DNN inference scenario shown.
[0073] First, the system has an edge server connected to the access point (AP). Within the communication range of the base station, there are N user devices. Each device has a neural network inference computing task and a separate antenna, which can be used to capture energy and offload data.
[0074] Secondly, with the energy E of each user device i Using time slot T as constraints, and time resource allocation decisions, DNN model segmentation decisions, transmission power allocation decisions, and computing rate allocation decisions as optimization variables, the optimization problem is established with the objective of maximizing the completion rate of user computing tasks.
[0075] Then, the optimization problem is solved using reinforcement learning algorithms and the fmincon function in MATLAB. This leads to the optimal DNN network segmentation and resource allocation scheme.
[0076] Finally, based on the optimal solution, the neural network model segmentation scheme and resource allocation scheme are applied to edge IoT devices.
[0077] This invention is applicable to wireless power supply multi-user edge intelligence scenarios with time-varying wireless channels and user latency constraints. It formulates appropriate energy capture time allocation, neural network model segmentation, transmission power allocation, and computing rate allocation decisions, which significantly improves the completion rate of multi-user neural network inference computing tasks.
[0078] The embodiments described in this specification are merely examples of implementations of the inventive concept and are for illustrative purposes only. The scope of protection of this invention should not be considered limited to the specific forms described in these embodiments; rather, it extends to equivalent technical means conceived by those skilled in the art based on the inventive concept.
Claims
1. A method for neural network model segmentation and resource allocation in a wireless power supply edge intelligence scenario, characterized in that, Includes the following steps: Step 1: Place the edge server at the access point (AP) and connect it to the AP via a wired connection. The AP has a stable power supply. Place N user devices within the communication range of the AP. Each device i has a separate antenna, which can be used to capture energy and offload data. Step 2: The system is divided into T time slots. In each time slot, device i will generate a deep neural network (DNN) inference task r. i ={L i C i O i }, where L i C represents the number of layers in a DNN network. i ={c i,j |j∈{1,…L i }}, c i,j This represents the number of floating-point operations (FLOPs) required to compute the j-th layer of the DNN model i. i ={o i,j |j∈{1,…L i }}, o i,j This represents the size of the output data of the j-th layer; s = (s0, s1, ..., sj) N ) is the segmentation decision vector of the DNN model, s i This represents the splitting decision for the i-th task; Step 3: Within time slot t, the channel state h t The device performs energy capture simultaneously during the first αT time period, where α∈[0,1], and then performs data offloading in time-division multiplexing communication during the subsequent (1-α)T time period. The energy captured by device i is E i =μPh i αT, where μ∈(0,1) is the energy capture efficiency coefficient, P is the transmit power of the AP, and h i It is the wireless channel gain of device i; Step 4: Using the energy E of each user device i With time slot length T as a constraint, and time resource allocation decision α, DNN model segmentation decision s, transmission power allocation decision p, and computing rate allocation decision f as optimization variables, the optimization problem is established with the objective of maximizing the completion rate of user computing tasks. Step 5: Train the time allocation decision using reinforcement learning algorithms to optimize the problem. Transform into a problem A traversal search method is used to search for the segmentation decision of the DNN model, thereby solving the problem. Transform into a convex optimization problem Solving convex optimization problems using the fmincon function in MATLAB Finally, the optimization problem is obtained. This leads to the optimal DNN network segmentation and resource allocation scheme.
2. The method for neural network model segmentation and resource allocation in a wireless power supply edge intelligence scenario as described in claim 1, characterized in that, The optimization problem described in step 4 The expression is: Where I(X) is an indicator function, here f represents the latency required for the network layer to perform local computation. i This represents the computing speed of device i. r represents the transmission delay required to transmit intermediate parameters. i Indicates the device's transmission rate. f represents the latency required for the network layer to perform computations on the edge server. e It represents the server's computing speed; the optimization variable α represents the energy capture time ratio decision, s=(s0, s1, ..., s N ) represents the segmentation decision vector of the DNN model; p = (p0, p1, ..., p N ) represents the power allocation decision vector; f = (f0, f1, ..., f N ) represents the computation rate allocation decision vector.
3. The method for neural network model segmentation and resource allocation in a wireless power supply edge intelligence scenario as described in claim 1, characterized in that, The optimization problem described in step 4 The constraint expression is: 0≤α≤1 (4) Equation (2) indicates that the sum of the transmission delays of all user tasks cannot exceed the total computational offload time; Equation (3) indicates that the energy consumption required for computational offload of the user equipment cannot exceed the energy captured in the first αT time period. The energy consumption required for local computation is given by k, where k is the energy efficiency coefficient of the device chip. For transmission energy consumption, Idle energy consumption It is the power of the equipment when it is idling. Equation (4) represents the device idle time; Equation (5) indicates that the device energy capture time is limited to the time slot length; Equation (6) indicates that the DNN cut point is between 0 and the network layer number L. i Between; Equation (6) indicates that the device's computing rate is limited to 0 to f i max Within, f i max Equation (7) indicates the maximum computing speed of the device; Equation (7) indicates that the device's transmission power is limited to 0 to... Inside, This indicates the device's maximum transmission power.
4. The method for neural network model segmentation and resource allocation in a wireless power supply edge intelligence scenario as described in claim 1, characterized in that, In step 5, the problem The expression is: in The total completion delay of task i is represented by equation (9); Equation (9) indicates that the transmission delay of all user equipment i cannot exceed the offload delay allocated to it, where ρ i This represents the proportion of the total unloading latency due to the time resource constraint of task i; additionally, the aforementioned issues... Chinese equations (3), (5), (6), and (7) are also problems. The constraint expression; question The expression is: The above issues Chinese equations (3), (6), (7) and the problem Chinese equation (9) is the problem The constraint expression.
5. The method for neural network model segmentation and resource allocation in a wireless power supply edge intelligence scenario as described in claim 1, characterized in that, In step 5, an algorithm combining reinforcement learning, traversal search, and MATLAB functions is used to address the optimization problem in step 4. The steps to solve the problem are as follows: Step 5.1: Randomly initialize the parameters θ of the neural network in reinforcement learning, starting from time slot t=1 and iterating according to the channel state h at time t. t Output decision Generate a set containing K candidate values according to the exploration step size Δ, denoted as: Step 5.2: Substitute all K candidate values obtained in Step 4.1 into the problem. To solve this, iterate through each user task and search for s using a traversal search method. i The problem is further transformed into a convex optimization problem. Each s i Substitution problem And solve the problem using the fmincon function. To obtain the optimal f i * , After the traversal is complete, we can further obtain... and task completion rate; Step 5.3: Based on the results obtained in Step 4.2, select the optimal decision value from the candidate decision values that maximizes the task completion rate. and the corresponding state-action pair Placed into the experience replay pool; when the replay pool is full, the old state-action will be replaced by the new one. replace; Step 5.4: Select state-action pairs in batches from the experience replay pool as samples to train the neural network, and adjust the neural network parameters from θ. t Updated to θ t+1 (The corresponding strategy also becomes) The latest strategy Used in the next time slot according to h t+1 To generate decision estimates Step 5.5: Repeat the above process until convergence, and obtain the optimal strategy.
Citation Information
Patent Citations
Neural network segmentation and unloading method in multi-user edge intelligent scene
CN114745386A
