A distributed deep learning model resource elastic scheduling method based on embedded

By building a composite reward model with computational accuracy and delay and an unrestricted Markov decision-making process in embedded devices, combined with deep deterministic strategy algorithms, dynamic allocation and resource scheduling of deep learning tasks in embedded devices are realized, and the solution is to solve the problem of The real-time and computational accuracy problems of deep learning inference processes in embedded devices achieve rapid operation and delay minimization.

CN115016932BActive Publication Date: 2024-11-05UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210524307.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-13
Publication Date
2024-11-05
Estimated Expiration
2042-05-13

AI Technical Summary

Technical Problem

In the deep learning inference process, existing embedded image recognition platforms are difficult to ensure real-time performance due to insufficient computing resources, and the network latency stability of pure edge computing methods is difficult to guarantee, resulting in a reduction in computing accuracy.

Method used

Adopting the resource elastic scheduling method of distributed deep learning model based on embedded, the unrestricted Markov decision-making process is constructed by constructing a composite reward model with calculation accuracy and calculation delay, and using the deep deterministic strategy algorithm to dynamically solve the optimal elastic scheduling Strategy to realize dynamic adjustment of sampling rate, task offloading and edge computing resources.

Benefits of technology

It effectively solves the problem of difficult deployment of large-scale deep learning algorithms in a single embedded device, ensures the rapid operation of deep learning algorithms in embedded devices, and minimizes computational delay while ensuring computing accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure BDA0003643458410000026
    Figure BDA0003643458410000026
  • Figure BDA0003643458410000027
    Figure BDA0003643458410000027
  • Figure BDA0003643458410000028
    Figure BDA0003643458410000028
Patent Text Reader

Abstract

The present invention relates to the field of embedded model resource scheduling technology, and in particular to an embedded distributed deep learning model resource elastic scheduling method, including constructing a composite reward model of computing accuracy and computing delay, constructing an unconstrained Markov decision process, and using a deep deterministic policy algorithm to dynamically solve the optimal elastic scheduling strategy; the distributed deep learning technology completes the dynamic allocation of deep learning tasks, constructs parameters with computing service delay and model accuracy as the core, and uses a Markov decision process to model the problem. After converting it into an unconstrained Markov reward process using Lyapunov optimization, the deep deterministic policy gradient algorithm in reinforcement learning is used to realize the dynamic allocation process of deep learning tasks. Through this scheduling method, the problem of the difficulty of deploying large-scale deep learning algorithms in a single embedded device can be effectively solved, and the rapid operation of deep learning algorithms in embedded devices can be ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of embedded model resource scheduling, and in particular to an embedded distributed deep learning model resource elastic scheduling method. Background Art

[0002] Deep learning is a widely used technology in the field of machine learning. This technology enables computers to have or exceed human intelligence in certain aspects by imitating and extending human thinking and behavior, thereby helping humans complete complex tasks. With the development of deep learning technology in the field of image recognition, deep neural networks are widely deployed in embedded devices. Since deep learning reasoning requires a lot of computing resources, and it is difficult for a single embedded device to ensure real-time when performing inference tasks, it is often necessary to offload tasks to computing nodes with rich computing resources.

[0003] Existing embedded image recognition platforms often use pure edge computing methods to transmit large amounts of image data through the network to cloud servers with rich computing resources. The embedded platform is only used to obtain the raw data from the camera, while the reasoning process of the convolutional neural network is completed on the cloud server. However, due to the time-varying nature of the network channel, the latency stability of cloud computing solutions is usually difficult to guarantee.

[0004] The most ideal method is to perform all image recognition processes locally. The existing method is to perform lightweight compression on deep neural networks and deploy and run lightweight neural networks using deep learning frameworks on embedded platforms. However, these training frameworks are not specifically optimized for embedded platforms, resulting in low efficiency after deployment. Although compression can greatly reduce the computing tasks, it can also lead to reduced network computing accuracy. Summary of the invention

[0005] In order to solve the above technical problems, the present invention proposes an embedded distributed deep learning model resource elastic scheduling method, which can effectively solve the problem of difficulty in deploying large-scale deep learning algorithms in a single embedded device and ensure the rapid operation of deep learning algorithms in embedded devices.

[0006] The present invention is achieved by adopting the following technical solutions:

[0007] A distributed deep learning model resource elastic scheduling method based on embedded system, characterized by: including building a composite reward model of computing accuracy and computing delay, building an unrestricted Markov decision process, and using a deep deterministic strategy algorithm to dynamically solve the optimal elastic scheduling strategy;

[0008] Among them, constructing a composite reward model of computing accuracy and computing delay means: by building a model for the accuracy and delay parameters of local computing and task offloading, thereby constructing a reward function in the Markov decision process;

[0009] The construction of the unrestricted Markov decision process refers to: taking the sampling rate, task offloading and edge computing location as actions, taking the backlog of the local computing queue and the edge computing queue, the channel state and the original data size as states, taking minimizing the computing service delay as a reward, constructing a restricted Markov decision process, and using the Lyapunov optimization method for transformation, constructing an accuracy queue to describe the long-term performance of the computing service accuracy, guiding the deep reinforcement learning network to tend to meet the long-term accuracy constraints, and obtaining the transformed unrestricted Markov decision process, that is:

[0010] Action: includes the selection of sampling rate, task offloading and allocation of edge computing resources, described as:

[0011]

[0012] Status: including tasks backlogged in the queue during local computation Backlog of tasks in edge computing devices Channel Status Calculate the raw data size in the task Described as:

[0013]

[0014] Reward: Minimize the latency of the computation service, described as:

[0015]

[0016] Probability transfer function:

[0017]

[0018] The unrestricted Markov decision process P1 is:

[0019]

[0020] Among them, X t is the sampling rate decision matrix at time t, o t represents the task offloading decision vector at time t, c t Assign vectors to edge computing resources, is the state at time t, It is the precision value queue at time t; is the accuracy threshold of the mth computation service, A m (X t ,ot ) is the accuracy of the mth computing service at time t, D(X t ,o t ,c t ) is the computing service delay at time t;

[0021] The use of a deep deterministic policy algorithm to dynamically solve the optimal elastic scheduling strategy refers to: using a deep deterministic policy gradient algorithm to achieve dynamic adjustment of the sampling rate, task offloading, and edge computing location.

[0022] The computing service delay D(X) at time t t ,o t ,c t ) and the accuracy A of the mth computing service at time t m (X t ,o t ) is calculated as:

[0023] Suppose the distributed deep learning model has N edge computing devices and M server computing nodes. The system time is divided into time slots of length τ. Each time slot is represented by t∈{1,2,...,T}. At each moment, the image data received by the edge device is regarded as a single computing task, which can be offloaded to the remote computing node or directly processed locally. Let o t ∈R N×1 represents the unloading decision vector at time t, Indicates that the task at time t is offloaded to the nth edge computing device, It means that the computing task is executed locally; represents the amount of original data received by the nth device at time t, K = {θ1,θ2,...,θ K} represents the reference sampling rate, where θ K is the original sampling rate, and the remaining sampling rates are linearly distributed in proportion to the original sampling rate. k = kθ K / K,X t is the sampling rate decision matrix at time t, whose elements Indicates that at time t, n devices use θ k Sampling rate;

[0024] The computing service delay D(X t ,o t ,c t )for:

[0025]

[0026] The accuracy A of the mth computing service at time t m (X t ,o t)for:

[0027]

[0028] in, The latency of the device is the queuing delay and the task processing delay. The transmission delay of data in the network during the offloading process is is the task processing delay, To handle the queuing delay of tasks in the backlogged edge nodes, is the average waiting delay of all newly arrived tasks before the task of edge computing device n is completed; u(x) is a step function, ω p >0 is the penalty coefficient for queue overflow, For tasks abandoned for local computation in device n, Tasks abandoned by m edge computing devices; h m,c is the inference accuracy of the compressed neural network, h m,u is the uncompressed inferred precision.

[0029] When compressed data is processed locally, the device's latency queuing delay and task processing delay for:

[0030]

[0031] in, is the task volume of n devices at time t; f n is the CPU frequency of the nth edge computing device, η m,c It represents the computational intensity of the DNN after precision compression for the mth server. Indicates the backlog of computing tasks in the local computing queue, which is updated according to the following method:

[0032]

[0033] in, is the maximum value of the local computing queue. The computing tasks exceeding the limit will be directly discarded. The tasks discarded by local computing in device n for:

[0034]

[0035] When the task is offloaded to the server, is the network transmission rate when the nth edge computing device task is offloaded to the server at time t, and the transmission delay of data in the network during the offloading process is for:

[0036]

[0037] make represents the proportion of computing tasks offloaded to the mth server, then the task processing delay for:

[0038]

[0039] Among them, η m,u To handle the computational complexity of the offload task in the mth server;

[0040] When tasks are offloaded to edge nodes, the queuing delay consists of two parts: one is to process the backlog of tasks in the edge nodes. for:

[0041]

[0042] in, It is represented as the computing tasks accumulated in the queue of m edge computing devices at time t, and is updated according to the following method:

[0043]

[0044] mTasks abandoned by edge computing devices for:

[0045]

[0046] The average waiting delay of all newly arrived tasks before the task of edge computing device n is completed for:

[0047]

[0048] The restricted Markov decision process is constructed as:

[0049] Action: includes the selection of sampling rate, task offloading and allocation of edge computing resources, described as:

[0050]

[0051] Status: including tasks backlogged in the queue during local computation Backlog of tasks in edge computing devices Channel Status Calculate the raw data size in the task So described as:

[0052]

[0053] Reward: Minimize the latency of the computation service, described as:

[0054]

[0055] State transition probability:

[0056]

[0057] Find a strategy π: According to the state at time t To dynamically adjust the sampling rate decision matrix X t , task offloading decision vector o t and edge computing resource allocation vector c t , while ensuring that the calculation accuracy is stable and greater than the required accuracy threshold Under the condition of , the computing service delay is minimized; the following restricted Markov decision process is constructed:

[0058]

[0059] The conversion using Lyapunov optimization method specifically refers to:

[0060] Construct a precision value queue to guide the reinforcement learning network to tend to meet the long-term precision threshold constraint. The precision value queue can be dynamically updated by the following formula:

[0061]

[0062] Assuming that the queue weights are all 1, the queue backlog function is as follows. The smaller the value, the more it satisfies the long-term accuracy threshold constraint:

[0063]

[0064] Define a Lyapunov drift as Based on Lyapunov optimization theory, the restricted Markov decision process is transformed into an unrestricted Markov decision process:

[0065]

[0066] The parameter V>0 is used to balance the two tasks of minimizing computing service latency and long-term accuracy constraints.

[0067] The optimal elastic scheduling strategy is dynamically solved using the deep deterministic strategy algorithm as follows:

[0068] Let μ(s|φ μ ) and Q(s,a|φ Q ) represent the Actor network and the Critic network respectively, φ μ and φ Q Representing the network weights of the two networks, the loss function of the Critic network is as follows:

[0069]

[0070] The Actor network is trained using policy gradient as follows:

[0071]

[0072] The DDPG algorithm is used to dynamically update parameters, which includes the following steps:

[0073] S1: Initialize all neural network parameters, stored states and initial state s0;

[0074] S2: Use the DDRP algorithm to train the network and update the state.

[0075] The step S2 specifically includes the following steps:

[0076] S 21 : Through the Actor network according to the current state s t Get the sampling rate decision matrix X t and the task offloading decision vector o t ;

[0077] S 22 :Get edge computing resource allocation vector c t :

[0078]

[0079] in, Indicates the proportion of computing tasks assigned to the mth device;

[0080] S 23 :Let all edge computing devices perform action a t ={X t ,o t ,c t}, and get the reward r t and the new state s t+1 ;

[0081] S 24 :Write {s t ,a t ,r t ,s t+1}Send it to the Critic and Actor networks for training. The loss function of the Critic network and the policy gradient formula of the Actor network are as described above;

[0082] S 25 :Using the formula φ Q '=δφ Q +(1-δ)φ Q ',φ μ '=δφμ +(1-δ)φ μ 'Update network parameters and repeat S2 until the task is completed.

[0083] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0084] 1. The distributed deep learning technology in the present invention completes the dynamic allocation of deep learning tasks, constructs parameters with the calculation of service delay and model accuracy as the core, and uses the Markov decision process to model the problem. After using Lyapunov optimization to convert it into an unconstrained Markov reward process, the dynamic allocation process of deep learning tasks is realized through the deep deterministic policy gradient algorithm in reinforcement learning. It can solve the problem of the difficulty of deploying large-scale deep learning algorithms in a single embedded device and ensure the rapid operation of deep learning algorithms in embedded devices.

[0085] More specifically, the present invention considers using the edge computing collaborative inference method to dynamically allocate the image recognition computing tasks in the embedded device to the local and edge computing nodes, and uses the data dynamic compression method to achieve dynamic computing delay balancing. For example, when the computing task is offloaded to other embedded devices, the data can be appropriately compressed to meet the computing resource limitations of the device, and when it is offloaded to the server, it can run at full precision without considering the computing complexity.

[0086] Taking into account the change of channel state, the present invention expresses this problem as a Markov decision process, optimizes the sampling rate, task offloading and edge computing resource allocation of the device, and minimizes the computing delay while ensuring the computing accuracy. The deep deterministic policy gradient algorithm is used to effectively solve the problem, ensuring that the algorithm meets the long-term accuracy stability and delay minimization.

[0087] 2. In the present invention, the deep deterministic policy gradient algorithm includes two networks, Actor and Critic. The Actor network outputs the next action to be taken according to the input state, action and reward. The Critic network evaluates the action taken by the Actor network through a single-step update method, thereby greatly improving the learning efficiency. DETAILED DESCRIPTION

[0088] Example 1

[0089] As a basic embodiment of the present invention, the present invention includes a flexible scheduling method for distributed edge collaborative computing based on Markov decision process and deep reinforcement learning, which effectively utilizes the performance of distributed edge computing devices by dynamically adjusting the computing accuracy and unloading strategy. The method mainly includes constructing a composite reward model of computing accuracy and computing delay, constructing an unrestricted Markov decision process, and dynamically solving the optimal elastic scheduling strategy through a deep deterministic strategy algorithm. The composite reward model for computing accuracy and computing delay is constructed by modeling the accuracy and delay parameters during local computing and task unloading, thereby constructing a reward function in the Markov decision process. The unrestricted Markov decision process includes constructing a restricted Markov decision process, and using Lyapunov optimization to obtain an unrestricted Markov decision process. Among them, the restricted Markov decision process takes the sampling rate, task unloading, and edge computing location as actions, the backlog of the local computing queue and the edge computing queue, the channel state, and the original data size as states, and minimizes the computing service delay as a reward. Lyapunov optimization is used to construct an accuracy queue to describe the long-term performance of computing service accuracy, guiding the deep reinforcement learning network to tend to meet long-term accuracy constraints. The deep reinforcement learning adopts a deep deterministic policy gradient algorithm to achieve dynamic adjustment of sampling rate, task offloading, and edge computing location.

[0090] Example 2

[0091] As the best embodiment of the present invention, the present invention includes a distributed deep learning model resource elastic scheduling method based on embedded, including constructing a composite reward model of computing accuracy and computing delay, constructing an unrestricted Markov decision process, and using a deep deterministic strategy algorithm to dynamically solve the optimal elastic scheduling strategy.

[0092] Among them, the compound reward model for calculation accuracy and calculation delay is constructed as follows:

[0093] Let the distributed deep learning system have N edge computing devices and M server computing nodes. The system time is divided into time slots of length τ, each time slot is represented by t∈{1,2,...,T}. The image data received by the edge device at each moment can be regarded as a single computing task, which can be selected to be offloaded to a remote computing node or directly processed locally. Let o t ∈R N×1 represents the unloading decision vector at time t, Indicates that the task at time t is offloaded to the nth edge computing device, This means that the computing task is executed locally.

[0094] make represents the amount of original data received by the nth device at time t, K = {θ1,θ2,...,θK} represents the reference sampling rate, where θ K is the original sampling rate, and the remaining sampling rates are linearly distributed in proportion to the original sampling rate. k = kθ K / K,X t is the sampling rate decision matrix at time t, whose elements Indicates that at time t, n devices use θ k Sampling rate. Then the task volume of n devices at time t can be expressed as

[0095] When this compressed data is processed locally, the device's latency queuing delay and task processing delay are expressed as follows:

[0096]

[0097] Among them, f n is the CPU frequency of the nth edge computing device, η m,c Represents the computational intensity of the DNN after precision compression for the mth server. Indicates the backlog of computing tasks in the local computing queue, which can be updated by the following methods:

[0098]

[0099] in, It is the maximum value of the local computing queue. The computing tasks exceeding the limit will be discarded directly.

[0100] The task of local computation abandonment in device n is expressed as:

[0101]

[0102] When the task is offloaded to the server, is the network transmission rate when the nth edge computing device task is offloaded to the server at time t, then the data transmission delay in the network during the offloading process is expressed as:

[0103]

[0104] The amount of computing on the server is much larger than that on the edge computing device, and there is no need to consider issues such as power consumption, so there is no need for downsampling. Generally speaking, there is no queuing delay on the server, only task processing delay. represents the proportion of computing tasks offloaded to the mth server, then the task processing delay can be expressed as:

[0105]

[0106] Among them, η m,uis the computational complexity of processing the offload task in the mth server.

[0107] When tasks are offloaded to edge nodes, the queuing delay consists of two parts. One is to process the backlogged tasks in the edge nodes, which can be expressed as:

[0108]

[0109] in, It is represented as the computing tasks accumulated in the queue of m edge computing devices at time t, and is updated according to the following method:

[0110]

[0111] Similarly, the tasks abandoned by m edge computing devices are expressed as:

[0112]

[0113] Before the task of edge computing device n is completed, the average waiting delay of all newly arrived tasks is expressed as:

[0114]

[0115] Taking into account the local execution and offloading of tasks, the computing service delay at time t can be expressed as:

[0116]

[0117] Where u(x) is a step function, ω p >0 is the penalty coefficient for queue overflow.

[0118] Let h m,c and h m,u Represent the compressed neural network inference accuracy and the uncompressed inference accuracy respectively. The accuracy of the mth computing service at time t is expressed as:

[0119]

[0120] Among them, constructing an unrestricted Markov decision process specifically includes:

[0121] Construct a Markov decision process, specifically:

[0122] DNN collaborative inference service not only needs to minimize service latency, but also needs to ensure that the calculation accuracy meets long-term requirements, and adopts Markov decision process for modeling.

[0123] Action: includes the selection of sampling rate, task offloading and allocation of edge computing resources, described as:

[0124]

[0125] Status: including tasks backlogged in the queue during local computation Backlog of tasks in edge computing devices Channel Status Calculate the raw data size in the task It can therefore be described as:

[0126]

[0127] Reward: Minimize the latency of the computation service, which can be described as:

[0128]

[0129] State transition probability:

[0130]

[0131] Find a strategy π: According to the state at time t To dynamically adjust the sampling rate decision matrix X t , task offloading decision vector o t , edge computing resource allocation vector c t , thereby ensuring that the calculation accuracy is stable and greater than the required accuracy threshold The following restricted Markov decision process is constructed:

[0132]

[0133] The Lyapunov optimization method is used to transform the problem. A precision value queue is constructed to guide the reinforcement learning network to tend to meet the long-term precision threshold constraint. The precision value queue can be dynamically updated by the following formula:

[0134]

[0135] Assuming that the queue weights are all 1, the queue backlog function is expressed as follows. The smaller the value, the more it satisfies the long-term accuracy threshold constraint:

[0136]

[0137] Define a Lyapunov drift as Based on Lyapunov optimization theory, the aforementioned restricted Markov decision process can be transformed into an unrestricted Markov decision process that minimizes “accuracy drift + cost”, as shown below:

[0138]

[0139] The parameter V>0 is used to balance the two tasks of minimizing computing service latency and long-term accuracy constraints.

[0140] The following is the Markov decision process after transformation:

[0141] action:

[0142] state:

[0143] award:

[0144] Probability transfer function:

[0145] The aforementioned restricted Markov decision process P0 is transformed into the unrestricted Markov decision process P1 as shown below:

[0146]

[0147] For tasks offloaded to the server, they are managed by common application container engines such as Dockers and Kubernetes. For tasks offloaded to edge computing devices, if the sampling rate decision matrix X at time t is t and the task offloading decision vector o t It is known that the edge computing resource allocation vector c t It can be obtained by the following method:

[0148]

[0149] Among them, the edge computing resource allocation vector c t Each value in represents the proportion of the entire computing task allocated to the device, that is, Indicates the proportion of computing tasks assigned to the mth device.

[0150] Among them, the optimal elastic scheduling strategy dynamically solved by using the deep deterministic strategy algorithm is:

[0151] Let μ(s|φ μ ) and Q(s,a|φ Q ) represent the Actor network and the Critic network respectively, φ μ and φ Q Representing the network weights of the two networks, the loss function of the Critic network is as follows:

[0152]

[0153] The Actor network is trained using policy gradient as follows:

[0154]

[0155] The DDPG algorithm is used to dynamically update parameters, which includes the following steps:

[0156] S1: Initialize all neural network parameters, stored states, initial state s0

[0157] S2: Use the DDRP algorithm to train the network and update the state.

[0158] The step S2 specifically includes the following steps:

[0159] S 21 : Through the Actor network according to the current state s t Get the sampling rate decision matrix X t and the task offloading decision vector o t ;

[0160] S 22 : Through the formula Get edge computing resource allocation vector c t ;

[0161] S 23 :Let all edge computing devices perform action a t ={X t ,o t ,c t}, and get the reward r t and the new state s t+1 ;

[0162] S 24 :Write {s t ,a t ,r t ,s t+1}Send it to the Critic and Actor networks for training. The loss function of the Critic network and the policy gradient formula of the Actor network are as described above;

[0163] S 25 :Using the formula φ Q '=δφ Q +(1-δ)φ Q ',φ μ '=δφ μ +(1-δ)φ μ 'Update network parameters and repeat S2 until the task is completed.

[0164] In summary, after reading the present invention document, ordinary technicians in this field can make various other corresponding transformation schemes based on the technical scheme and technical concept of the present invention without creative mental labor, which all fall within the scope of protection of the present invention.

Claims

1. A distributed deep learning model resource elastic scheduling method based on embedded system, characterized by: This includes building a compound reward model for computational accuracy and computational latency, building an unrestricted Markov decision process, and using a deep deterministic strategy algorithm to dynamically solve the optimal elastic scheduling strategy; Among them, constructing a composite reward model of computing accuracy and computing delay means: by building a model for the accuracy and delay parameters of local computing and task offloading, thereby constructing a reward function in the Markov decision process; The construction of the unrestricted Markov decision process refers to: taking the sampling rate, task offloading and edge computing location as actions, taking the backlog of the local computing queue and the edge computing queue, the channel state and the original data size as states, taking minimizing the computing service delay as a reward, constructing a restricted Markov decision process, and using the Lyapunov optimization method for transformation, constructing an accuracy queue to describe the long-term performance of the computing service accuracy, guiding the deep reinforcement learning network to tend to meet the long-term accuracy constraints, and obtaining the transformed unrestricted Markov decision process, that is: Action: includes the selection of sampling rate, task offloading and allocation of edge computing resources, described as: Status: including tasks backlogged in the queue during local computation Backlog of tasks in edge computing devices Channel Status Calculate the raw data size in the task Described as: Reward: Minimize the latency of the computation service, described as: Probability transfer function: The unrestricted Markov decision process P1 is: Among them, X t is the sampling rate decision matrix at time t, o t represents the task offloading decision vector at time t, c t Assign vectors to edge computing resources, is the state at time t, It is the precision value queue at time t; is the accuracy threshold of the mth computation service, A m (X t ,o t ) is the accuracy of the mth computing service at time t, D(X t ,o t ,c t ) is the computing service delay at time t; The method of dynamically solving the optimal elastic scheduling strategy using a deep deterministic policy algorithm refers to: using a deep deterministic policy gradient algorithm to achieve dynamic adjustment of sampling rate, task offloading and edge computing location; Among them, the restricted Markov decision process is constructed as: Action: includes the selection of sampling rate, task offloading and allocation of edge computing resources, described as: Status: including tasks backlogged in the queue during local computation Backlog of tasks in edge computing devices Channel Status Calculate the raw data size in the task So described as: Reward: Minimize the latency of the computation service, described as: State transition probability: Find a strategy π: According to the state at time t To dynamically adjust the sampling rate decision matrix X t , task offloading decision vector o t and edge computing resource allocation vector c t , while ensuring that the calculation accuracy is stable and greater than the required accuracy threshold Under the condition of , the computing service delay is minimized; the following restricted Markov decision process is constructed: Among them, the conversion using the Lyapunov optimization method specifically refers to: Construct a precision value queue to guide the reinforcement learning network to tend to meet the long-term precision threshold constraint. The precision value queue can be dynamically updated by the following formula: Assuming that the queue weights are all 1, the queue backlog function is as follows. The smaller the value, the more it satisfies the long-term accuracy threshold constraint: Define a Lyapunov drift as Based on Lyapunov optimization theory, the restricted Markov decision process is transformed into an unrestricted Markov decision process: The parameter V>0 is used to balance the two tasks of minimizing computing service delay and long-term accuracy constraints. The optimal elastic scheduling strategy is dynamically solved using the deep deterministic strategy algorithm. Specifically: Let μ(s|φ μ ) and Q(s,a|φ Q ) represent the Actor network and the Critic network respectively, φ μ and φ Q Representing the network weights of the two networks, the loss function of the Critic network is as follows: The Actor network is trained using policy gradient as follows: The DDPG algorithm is used to dynamically update parameters, which includes the following steps: S1: Initialize all neural network parameters, stored states and initial state s0; S2: Use the DDRP algorithm to train the network and update the state; The step S2 specifically includes the following steps: S 21 : Through the Actor network according to the current state s t Get the sampling rate decision matrix X t and the task offloading decision vector o t ; S 22 :Get edge computing resource allocation vector c t : S 23 :Let all edge computing devices perform action a t ={X t ,o t ,c t }, and get the reward r t and the new state s t+1 ; S 24 :Write {s t ,a t ,r t ,s t+1 }Send it to the Critic and Actor networks for training. The loss function of the Critic network and the policy gradient formula of the Actor network are as described above; S 25 :Using the formula φ Q '=δφ Q +(1-δ)φ Q ',φ μ '=δφ μ +(1-δ)φ μ 'Update network parameters and repeat S2 until the task is completed.

2. According to claim 1, a method for elastic scheduling of embedded distributed deep learning model resources is characterized in that: The computing service delay D(X) at time t t ,o t ,c t ) and the accuracy A of the mth computing service at time t m (X t ,o t ) is calculated as: Suppose the distributed deep learning model has N edge computing devices and M server computing nodes. The system time is divided into time slots of length τ. Each time slot is represented by t∈{1,2,...,T}. At each moment, the image data received by the edge device is regarded as a single computing task, which can be offloaded to the remote computing node or directly processed locally. Let o t ∈R N×1 represents the unloading decision vector at time t, Indicates that the task at time t is offloaded to the nth edge computing device, It means that the computing task is executed locally; represents the amount of original data received by the nth device at time t, K = {θ1,θ2,...,θ K } represents the reference sampling rate, where θ K is the original sampling rate, and the remaining sampling rates are linearly distributed in proportion to the original sampling rate. k = kθ K / K,X t is the sampling rate decision matrix at time t, whose elements Indicates that at time t, n devices use θ k Sampling rate; computing service delay D(X t ,o t ,c t )for: The accuracy A of the mth computing service at time t m (X t ,o t )for: in, The latency of the device is the queuing delay and task processing delay. The transmission delay of data in the network during the offloading process is is the task processing delay, To handle the queuing delay of tasks in the backlogged edge nodes, is the average waiting delay of all newly arrived tasks before the task of edge computing device n is completed; u(x) is a step function, ω p >0 is the penalty coefficient for queue overflow, For tasks abandoned for local computation in device n, Tasks abandoned by m edge computing devices; h m,c is the inference accuracy of the compressed neural network, h m,u is the uncompressed inferred precision.

3. According to claim 2, a method for elastic scheduling of resources of an embedded distributed deep learning model is characterized in that: When compressed data is processed locally, the device’s latency queuing delay and task processing delay for: in, is the task volume of n devices at time t; f n is the CPU frequency of the nth edge computing device, η m,c represents the computational intensity of the DNN after precision compression for the mth server, B n t Indicates the backlog of computing tasks in the local computing queue, which is updated according to the following method: in, is the maximum value of the local computing queue. The computing tasks exceeding the limit will be directly discarded. The tasks discarded by local computing in device n for: When the task is offloaded to the server, is the network transmission rate when the nth edge computing device task is offloaded to the server at time t, and the transmission delay of data in the network during the offloading process is for: make represents the proportion of computing tasks offloaded to the mth server, then the task processing delay for: Among them, η m,u To handle the computational complexity of the offload task in the mth server; When tasks are offloaded to edge nodes, the queuing delay consists of two parts: one is to process the backlog of tasks in the edge nodes. for: in, It is represented as the computing tasks accumulated in the queue of m edge computing devices at time t, and is updated according to the following method: mTasks abandoned by edge computing devices for: The average waiting delay of all newly arrived tasks before the task of edge computing device n is completed for: