A cloud-edge-end multiple offloading method and system for deep neural network tasks
By generating and optimizing multiple task stages of deep neural network tasks in the cloud edge multi-unloading system, the problem of inability to effectively weigh system resources, execution time and energy consumption in the existing technology is solved, and more efficient resource utilization and performance optimization are achieved.
Patent Information
- Application Number
- CN202411558288.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-11-04
AI Technical Summary
When facing deep neural network tasks, the prior art cannot effectively weigh system resources, execution time and energy consumption, resulting in insufficient system performance optimization.
A cloud edge multi-unloading method is proposed. By acquiring deep neural network tasks, multiple tasks at different task stages are generated, and tasks are substituted into the task unloading optimization module, generating and dynamically optimizing the unloading strategy to achieve multi-stage unloading.
By flexibly allocating resources, optimizing the offload performance in multi-task scenarios, improving time efficiency, energy consumption management and resource utilization, it is suitable for edge computing environments in complex multi-task scenarios.
Smart Images

Figure CN119071164B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of digital information transmission, and in particular to a cloud-edge-terminal multiple offloading method and system for deep neural network tasks. Background Art
[0002] With the development of science and technology, computing plays an increasingly important role in various fields. Deep Neural Networks (DNN) can solve a large number of complex computing problems, but at the same time, deep neural networks have high requirements for running devices. Flexibly allocating DNN tasks to cloud, edge, and end devices to make full use of computing resources at all levels has become a research topic that has attracted much attention. By coordinating the use of cloud devices, edge servers, and terminal devices, the computing speed can be increased while reducing energy consumption, but renting cloud devices and edge servers will bring additional economic costs.
[0003] However, the offloading solutions in the prior art adopt a single offloading strategy, which is difficult to meet the complex and diverse application requirements, especially the offloading requirements in multi-task offloading and hybrid cloud-edge environments. In particular, when facing DNN tasks, the offloading solutions in the prior art cannot effectively balance system resources, execution time and energy consumption, which can easily lead to insufficient system performance optimization.
[0004] Accordingly, the art needs a new cloud-edge-device multiple offloading solution for deep neural network tasks to solve the above problems. Summary of the invention
[0005] In order to overcome the above-mentioned defects, the present invention provides a cloud-edge-terminal multiple offloading method and system for deep neural network tasks, so as to provide a solution or at least partially solve the technical problem that when facing DNN tasks, the offloading solutions in the prior art cannot effectively balance system resources, execution time and energy consumption, which easily leads to insufficient system performance optimization.
[0006] In a first aspect, the present invention provides a cloud-edge-device multiple offloading method for deep neural network tasks, the method is applied to a cloud-edge-device multiple offloading system, the system includes multiple different types of processing devices, and the method includes the following steps:
[0007] Get a deep neural network task;
[0008] Based on the deep neural network task, generating tasks of a plurality of different task stages corresponding to the deep neural network task, wherein the different task stages include at least a lightweight task stage and a computationally intensive task stage;
[0009] Substituting the deep neural network task and the tasks of the multiple different task stages into a task offloading optimization module, generating an offloading strategy for the tasks of each task stage, wherein the offloading strategy at least includes a task offloading path, a type of task execution processing device, and an offloading priority of tasks of each task stage;
[0010] Selectively dynamically optimize the unloading strategy of the tasks in each task stage to obtain a dynamic unloading strategy for the tasks in each task stage;
[0011] Based on the dynamic offloading strategy for tasks in each task stage, multi-stage offloading of deep neural network tasks is performed.
[0012] In a technical solution of the cloud-edge-terminal multiple offloading method for the above-mentioned deep neural network task, the generating of tasks of multiple different task stages corresponding to the deep neural network task based on the deep neural network task includes:
[0013] Based on the deep neural network task, split each task stage in the deep neural network task to obtain tasks of multiple task stages after splitting;
[0014] The tasks of the multiple task stages after the splitting are identified to obtain tasks of multiple different task stages corresponding to the deep neural network tasks.
[0015] In a technical solution of the cloud-edge-terminal multiple offloading method for the above-mentioned deep neural network task, the deep neural network task and the tasks of the multiple different task stages are substituted into the task offloading optimization module to generate an offloading strategy for the tasks of each task stage, including:
[0016] Based on the deep neural network task, obtaining an evaluation index of the deep neural network task;
[0017] Based on the evaluation index of the deep neural network task, the tasks of multiple different task stages and the PSO algorithm, an initial unloading strategy for the tasks of multiple different task stages is generated, wherein the initial unloading strategy includes an initial unloading path for the tasks of multiple different task stages, an initial processing device type corresponding to each task and an unloading priority of the tasks of each task stage;
[0018] Execute simulated annealing algorithm processing on the initial unloading strategy to obtain a primary optimized unloading strategy;
[0019] Execute Q-learning algorithm processing on the primary optimized unloading strategy to obtain the optimized unloading strategy;
[0020] The optimized offloading strategy is output as the offloading strategy for the tasks in each task stage.
[0021] In a technical solution of the cloud-edge-device multiple offloading method for the above-mentioned deep neural network task, the evaluation index of the deep neural network task obtained based on the deep neural network task includes:
[0022] Performing time calculation on the deep neural network task to obtain a total unloading time of the deep neural network task;
[0023] Calculating the energy consumption of the deep neural network task to obtain the total energy consumption of the device running the deep neural network task;
[0024] Calculate the cost of the deep neural network task to obtain the total cost of the equipment required to run the deep neural network task;
[0025] Based on the total unloading time of the deep neural network task, the total energy consumption of the equipment running the deep neural network task and the total cost required for the equipment running the deep neural network task, an evaluation index of the deep neural network task is obtained.
[0026] In a technical solution of the cloud-edge-device multiple offloading method for the above-mentioned deep neural network task, the initial offloading strategy for tasks in multiple different task stages is generated based on the evaluation index of the deep neural network task, the tasks in multiple different task stages, and the PSO algorithm, including:
[0027] By using the evaluation index of the deep neural network task and executing the PSO algorithm on the tasks at multiple different task stages, an initial offloading path for the tasks at multiple different task stages and an offloading priority for the tasks at each task stage are generated;
[0028] Based on tasks at multiple different task stages, determine the type of initial processing equipment corresponding to each task;
[0029] Based on the initial processing device type corresponding to each task, the initial offloading paths for tasks at multiple different task stages, and the offloading priorities of tasks at each task stage, an initial offloading strategy for tasks at multiple different task stages is generated.
[0030] In a technical solution of the cloud-edge-device multiple offloading method for deep neural network tasks, the initial offloading strategy is processed by a simulated annealing algorithm to obtain a primary optimized offloading strategy, including:
[0031] Executing a simulated annealing algorithm on the initial unloading strategy to obtain a dynamically adjusted temperature;
[0032] According to the dynamically adjusted temperature, the initial unloading strategy is selectively adjusted to obtain a primary optimized unloading strategy.
[0033] In a technical solution of the cloud-edge-device multiple offloading method for deep neural network tasks, the offloading strategy of tasks in each task stage is selectively dynamically optimized to obtain a dynamic offloading strategy for tasks in each task stage, including:
[0034] Obtain resource data of edge servers and cloud servers in real time, and build a virtual dynamic resource pool based on the resource data of edge servers and cloud servers;
[0035] Based on the virtual dynamic resource pool, the unloading strategy of the tasks in each task stage is selectively and dynamically adjusted to obtain the dynamic unloading strategy of the tasks in each task stage.
[0036] In a technical solution of the above-mentioned cloud-edge-device multiple offloading method for deep neural network tasks, the method further includes:
[0037] The PSO algorithm, simulated annealing algorithm and Q-learning algorithm are tested for global convergence through Lyapunov function, and the PSO algorithm, simulated annealing algorithm and Q-learning algorithm are selectively adjusted based on the test results.
[0038] In a second aspect, the present invention provides a cloud-edge-terminal multiple offloading system for deep neural network tasks, the cloud-edge-terminal multiple offloading system comprising multiple different types of processing devices, task offloading optimization modules and control devices, the different types of processing devices comprising at least terminal servers, edge servers and cloud servers, the different types of processing devices being used to execute deep neural network tasks, the task offloading optimization module comprising a time model, an energy consumption model and a cost model, for performing time calculation, energy consumption calculation and cost calculation on deep neural network tasks respectively, the control device comprising a processor and a memory, the memory being suitable for storing multiple program codes, the program codes being suitable for being loaded and run by the processor to execute the cloud-edge-terminal multiple offloading method for deep neural network tasks described in any one of the technical solutions of the above-mentioned cloud-edge-terminal multiple offloading method for deep neural network tasks.
[0039] In a technical solution of the above-mentioned cloud-edge multi-offloading system for deep neural network tasks, the system also includes a communication module, which is used for information interaction between different types of processing devices, systems and users.
[0040] The above one or more technical solutions of the present invention have at least one or more of the following beneficial effects:
[0041] By acquiring deep neural network tasks, corresponding tasks of multiple different task stages are generated, and then the deep neural network tasks and tasks of multiple different task stages are substituted into the task offloading optimization module to generate an offloading strategy for tasks of each task stage, and the offloading strategy of tasks of each task stage is selectively dynamically optimized to obtain a dynamic offloading strategy for tasks of each task stage; and multi-stage offloading of deep neural network tasks is performed, resources are flexibly allocated, and offloading performance in multi-task scenarios is optimized, thereby improving time efficiency, energy consumption management and resource utilization, and being suitable for edge computing environments in complex multi-task scenarios; and when facing DNN tasks, the offloading schemes in the prior art are avoided, which easily leads to technical problems such as insufficient system performance optimization due to the inability to effectively balance system resources, execution time and energy consumption.
[0042] In the technical solution of the present invention, the initial unloading path is quickly determined by the PSO algorithm, and the initial unloading path is automatically optimized, thereby improving the global search capability, and achieving the best balance between time, energy consumption and cost by adaptively adjusting the inertia weight and dynamically adjusting the particle search behavior; a dynamic cooling coefficient adjustment mechanism is introduced by the simulated annealing algorithm to avoid local optimality, while improving the global search capability and reducing the energy consumption and time cost of execution; the parameters of the PSO algorithm are adjusted by the Q-learning algorithm to optimize the unloading strategy and enhance the adaptability, thereby ensuring efficient execution of each stage of the deep neural network task; and the continuous position value of the particle is mapped to a discrete unloading strategy, and the conversion rules are set by the partition mapping method, so as to achieve effective resource allocation in different task stages. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The disclosure of the present invention will become more easily understood with reference to the accompanying drawings. It is easy for those skilled in the art to understand that these drawings are only for illustrative purposes and are not intended to limit the scope of protection of the present invention. In addition, similar numbers in the figures are used to represent similar components, among which:
[0044] Figure 1 It is a flowchart of the main steps of a cloud-edge-terminal multiple offloading method for deep neural network tasks according to an embodiment of the present invention;
[0045] Figure 2 is a schematic diagram of the architecture of a cloud-edge-terminal multiple offloading system for deep neural network tasks according to an embodiment of the present invention;
[0046] Figure 3 It is a schematic diagram of the architecture of a cloud-edge-terminal multiple offloading system for deep neural network tasks according to an embodiment of the present invention, and a main structural block diagram.
[0047] Description of Reference Numerals :
[0048] 300: cloud-edge-terminal multiple offloading system; 301: control device; 3011: processor; 3012: memory; 3013: program code; 302: processing device; 303: task offloading optimization module; 304: communication module. DETAILED DESCRIPTION
[0049] Some embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the protection scope of the present invention.
[0050] In the description of the present invention, "module" and "processor" may include hardware, software or a combination of the two. A module may include hardware circuits, various suitable sensors, communication ports, and memories, and may also include software parts, such as program codes, or a combination of software and hardware. The processor may be a central processing unit, a microprocessor, an image processor, a digital signal processor, or any other suitable processor. The processor has data and / or signal processing functions. The processor may be implemented in software, hardware, or a combination of the two. Non-temporary computer-readable storage media include any suitable medium that can store program codes, such as a magnetic disk, a hard disk, an optical disk, a flash memory, a read-only memory, a random access memory, and the like. The term "A and / or B" means all possible combinations of A and B, such as only A, only B, or A and B. The term "at least one A or B" or "at least one of A and B" has a similar meaning to "A and / or B", and may include only A, only B, or A and B. The singular terms "one" and "the" may also include plural forms.
[0051] Here we first explain some terms involved in the present invention.
[0052] PSO algorithm, Particle Swarm Optimization algorithm (PSO, Particle Swarm Optimization);
[0053] Simulated annealing algorithm, simulated annealing algorithm (SA, Simulated Annealing);
[0054] Q-learning algorithm, reinforcement learning algorithm;
[0055] Lyapunov function, Lyapunov function (Lyapunov function).
[0056] See attached Figure 1 , Figure 1 1 is a flow chart of the main steps of a cloud-edge-terminal multiple offloading method for deep neural network tasks according to an embodiment of the present invention. Figure 1 As shown, the cloud-edge-terminal multiple offloading method for deep neural network tasks in an embodiment of the present invention is applied to a cloud-edge-terminal multiple offloading system, the system includes multiple different types of processing devices, and the method mainly includes the following steps S101-step S105.
[0057] Step S101: Obtain a deep neural network task;
[0058] Step S102: Based on the deep neural network task, generating tasks of a plurality of different task stages corresponding to the deep neural network task, wherein the different task stages include at least a lightweight task stage and a computationally intensive task stage;
[0059] Specifically, the generating, based on the deep neural network task, a plurality of tasks of different task stages corresponding to the deep neural network task includes:
[0060] Based on the deep neural network task, split each task stage in the deep neural network task to obtain tasks of multiple task stages after splitting;
[0061] The tasks of the multiple task stages after the splitting are identified to obtain tasks of multiple different task stages corresponding to the deep neural network tasks.
[0062] Step S103: Substituting the deep neural network task and the tasks of the multiple different task stages into a task offloading optimization module, generating an offloading strategy for the tasks of each task stage, wherein the offloading strategy at least includes a task offloading path, a type of task execution processing device, and an offloading priority of tasks of each task stage;
[0063] Specifically, the step of substituting the deep neural network task and the tasks of the multiple different task stages into the task offloading optimization module to generate an offloading strategy for the tasks of each task stage includes:
[0064] Based on the deep neural network task, obtaining an evaluation index of the deep neural network task;
[0065] Based on the evaluation index of the deep neural network task, the tasks of multiple different task stages and the PSO algorithm, an initial unloading strategy for the tasks of multiple different task stages is generated, wherein the initial unloading strategy includes an initial unloading path for the tasks of multiple different task stages, an initial processing device type corresponding to each task and an unloading priority of the tasks of each task stage;
[0066] Execute simulated annealing algorithm processing on the initial unloading strategy to obtain a primary optimized unloading strategy;
[0067] Execute Q-learning algorithm processing on the primary optimized unloading strategy to obtain the optimized unloading strategy;
[0068] The optimized offloading strategy is output as the offloading strategy for the tasks in each task stage.
[0069] Specifically, the evaluation index of the deep neural network task obtained based on the deep neural network task includes:
[0070] Performing time calculation on the deep neural network task to obtain a total unloading time of the deep neural network task;
[0071] Calculating the energy consumption of the deep neural network task to obtain the total energy consumption of the device running the deep neural network task;
[0072] Calculate the cost of the deep neural network task to obtain the total cost of the equipment required to run the deep neural network task;
[0073] Based on the total unloading time of the deep neural network task, the total energy consumption of the equipment running the deep neural network task and the total cost required for the equipment running the deep neural network task, an evaluation index of the deep neural network task is obtained.
[0074] Specifically, performing time calculation on the deep neural network task to obtain the total unloading time of the deep neural network task includes:
[0075] The calculation of the deep neural network is mainly concentrated in the convolutional layer and the fully connected layer:
[0076] In the convolution layer, the input feature map and the convolution kernel are convolved, where the computational load of the convolution layer is determined by the number of floating-point operations required to apply each convolution kernel to the input feature map;
[0077] Specifically, the calculation formula of the convolutional layer is as follows:
[0078] ;
[0079] in, Representative The computational workload of the layer tasks;
[0080] The calculation formula of the fully connected layer is as follows:
[0081] ;
[0082] in, Respectively represent the width and height of the output feature map, K represents the height and width of the convolution kernel, and here it is set to be the same height and width. represents the number of channels of the input and output feature maps, represent the number of input and output neurons respectively.
[0083] The “multiply by 2” operation is because each convolution operation includes one multiplication and one addition.
[0084] When calculating the task unloading time, set the time when the task just started , considering the computational processing time of the task and the data transmission time between different levels. The layer task is Processing time on each device The calculation formula is as follows:
[0085] ;
[0086] in, It is The computational workload of the layer task, It is The computing speed of a device, expressed here as the number of floating-point operations that can be performed per second.
[0087] If there is The output of the layer task comes from The input of the layer task is Layer to Data transfer time of layer tasks Obtained by the following formula:
[0088] ;
[0089] in, Indicates The size of the output data of the layer task, in MB. Respectively represent the transmission rates of LAN and WAN, Indicates Layer and The device number where the layer task is executed. Represents the set of IDs of all cloud server devices.
[0090] The transmission time of the final result of the deep neural network back to the terminal server The calculation formula is as follows:
[0091] ;
[0092] in, Indicates the size of the data that is finally output to the terminal, in MB. Indicates the device number where the last task was executed. Indicates the terminal device number. Represents the set of all IDs belonging to edge server devices.
[0093] No. The data arrival time required by the layer task The calculation formula is as follows:
[0094] ;
[0095] in, are all direct predecessor tasks (i.e. The completion time of the layer task).
[0096] No. The data completion time required for the layer task The calculation formula is as follows:
[0097] ;
[0098] Total offloading time for the entire deep neural network task Obtained by the following formula:
[0099] .
[0100] Specifically, the energy consumption of the deep neural network task is calculated to obtain the total energy consumption of the device running the deep neural network task, including:
[0101] equipment Total usage time The calculation formula is as follows:
[0102] ;
[0103] in: Indicates the device is assigned A collection of tasks.
[0104] equipment Energy consumption The calculation formula is as follows:
[0105] ;
[0106] in, Indicates Energy consumption rate per unit time of each device (J / h);
[0107] Total energy consumption of the device running the deep neural network task Obtained by the following formula:
[0108] ;
[0109] in: It is the total number of devices actually participating in the task calculation.
[0110] Specifically, the subscription types of the deep neural network for renting servers include on-demand subscription and time-based subscription, wherein the fee for on-demand subscription is to calculate the rental cost of the server based on the actual usage time of each server; the fee for time-based subscription is to consider not only the actual usage time of the server, but also the time-based cost of the server;
[0111] The cost of the deep neural network task is calculated to obtain the total cost of the device required to run the deep neural network task, including:
[0112] equipment Cost of using on-demand subscription The calculation formula is as follows:
[0113] ;
[0114] equipment Cost of using the package The calculation formula is as follows:
[0115] ;
[0116] in, For equipment The unit time usage cost of on-demand subscription, For equipment The unit time usage cost of the package is ordered, The ordering cost for the package of device i.
[0117] The total cost of the equipment required to run the deep neural network task Obtained by the following formula:
[0118] ;
[0119] in, Indicates the device The usage cost is calculated based on the subscription type (on-demand subscription or time-based subscription).
[0120] Specifically, based on the total unloading time of the deep neural network task, the total energy consumption of the device running the deep neural network task, and the total cost of the device running the deep neural network task, the evaluation index of the deep neural network task includes:
[0121] Based on the total unloading time of the deep neural network task, the total energy consumption of the device running the deep neural network task, and the total cost of the device running the deep neural network task, obtaining a preset weight value corresponding to each data;
[0122] Based on the total unloading time of the deep neural network task, the total energy consumption of the equipment running the deep neural network task, the total cost required for the equipment running the deep neural network task, and the preset weight value corresponding to each data, the evaluation index of the deep neural network task is obtained.
[0123] Specifically, based on the total unloading time of the deep neural network task, the total energy consumption of the device running the deep neural network task, the total cost of the device running the deep neural network task, and the preset weight value corresponding to each data, the evaluation index of the deep neural network task is obtained, including:
[0124] Total offloading time for the entire deep neural network task The corresponding weight value is , the total cost of the equipment required to run the deep neural network task The corresponding weight value is And the total energy consumption of the device running the deep neural network task The corresponding weight value is ;
[0125] Evaluation metrics for the deep neural network tasks Obtained by the following formula:
[0126] ;
[0127] in, is the deadline for task completion;
[0128] Deadline for task completion Obtained by the following formula:
[0129] ;
[0130] in, is an adjustment factor used to ensure that the task is completed in a reasonable amount of time. Here, The value can be between 1 and 1.5. The value can be adjusted by those skilled in the art according to actual conditions, that is, a reasonable deadline is calculated by considering two factors: the computational complexity of the task and the computing power of the device.
[0131] Specifically, the generating of the initial offloading strategy for the tasks at the multiple different task stages based on the evaluation index of the deep neural network task, the tasks at the multiple different task stages and the PSO algorithm includes:
[0132] By using the evaluation index of the deep neural network task and executing the PSO algorithm on the tasks at multiple different task stages, an initial offloading path for the tasks at multiple different task stages and an offloading priority for the tasks at each task stage are generated;
[0133] Based on tasks at multiple different task stages, determine the type of initial processing equipment corresponding to each task;
[0134] Based on the initial processing device type corresponding to each task, the initial offloading paths for tasks at multiple different task stages, and the offloading priorities of tasks at each task stage, an initial offloading strategy for tasks at multiple different task stages is generated.
[0135] Specifically, the different types of processing devices include at least edge servers, cloud servers, and terminal devices; As the number of tasks in multiple different task stages, As the number of edge servers in the system, As an example, the number of cloud servers in the system:
[0136] Assumptions is the size of the particle group, each particle can be between 1 and The dimension of the particle code is the same as the number of task sets. Each particle will provide an allocation scheme for all tasks to be offloaded to edge servers and cloud servers.
[0137] Particle unloading decision vector It is expressed by the following formula:
[0138] ;
[0139] in, Yes The value between Value An integer between .
[0140] The speed of the particle indicates the speed at which tasks are assigned to edge servers or cloud servers.
[0141] The optimal position of each particle in each iteration It is expressed by the following formula:
[0142] ;
[0143] The best position for all particles It is expressed by the following formula:
[0144] ;
[0145] The fitness value of each particle's new position The calculation formula is as follows:
[0146] ;
[0147] Determine the optimal fitness value through the following steps:
[0148] Randomly initialize the particle swarm, that is, randomly generate the initial position and velocity of each particle;
[0149] Calculate the initial fitness value of each particle , initial personal best position and the global optimal position ;
[0150] Update the position and velocity of each particle;
[0151] Calculate the fitness value of each particle's new position , the new position of the particle is the personal best position and the global optimal position ;
[0152] If the fitness value of the new position of the particle is higher than the initial fitness value of the particle, updating the personal best position of the particle with the personal best position of the new position of the particle;
[0153] Compare the global best positions of all particles and select the best value as the global best position;
[0154] If the preset maximum number of iterations is reached, or the change in the global optimal position is lower than the preset iterative change threshold, the minimum fitness value is output. and the global optimal position The corresponding particle position;
[0155] Based on the output particle positions, the initial offloading strategies for tasks in multiple different task phases are generated.
[0156] Specifically, the position of each particle is updated by the following formula:
[0157] ;
[0158] in, Indicates The updated position of each particle, Indicates The initial position of a particle, Indicates The update speed of each particle;
[0159] The velocity of each particle is updated by the following formula:
[0160] ;
[0161] in, Indicates The update speed of particles, represents the inertia weight, where , represents the personal learning factor, where , represents the global learning factor, where , and represents a random number, and All take [0,1], Representative The individual optimal solution of each particle is Representative The global optimal solution for each particle.
[0162] Specifically, the performing of simulated annealing algorithm processing on the initial unloading strategy to obtain a primary optimized unloading strategy includes:
[0163] Executing a simulated annealing algorithm on the initial unloading strategy to obtain a dynamically adjusted temperature;
[0164] According to the dynamically adjusted temperature, the initial unloading strategy is selectively adjusted to obtain a primary optimized unloading strategy.
[0165] Specifically, dynamically adjust the temperature Obtained by the following formula:
[0166] ;
[0167] in, Indicates the adjusted temperature, is the preset temperature reduction coefficient, Indicates the temperature before adjustment.
[0168] As the number of iterations increases, the temperature gradually decreases, thereby reducing the probability of accepting an inferior solution.
[0169] Selectively adjusting the initial unloading strategy according to the dynamically adjusted temperature includes:
[0170] Optionally accept new particle positions using the following formula:
[0171] ;
[0172] ;
[0173] From the above formula, the acceptance probability formula of simulated annealing is as follows:
[0174] ;
[0175] This allows the algorithm to accept a solution that is worse than the current one with a certain probability, thereby avoiding premature convergence and enhancing the global convergence ability.
[0176] Specifically, the performing of Q-learning algorithm processing on the primary optimized unloading strategy to obtain the optimized unloading strategy includes:
[0177] Set initialization parameters, preset Greedy strategy Value, learning rate and discount factor ,These parameters are used to control the balance between exploration and exploitation.
[0178] Based on the initialization parameters, determine the current Q value corresponding to each particle;
[0179] The particle updates the Q value matrix after each iteration;
[0180] Based on the updated Q-values of the particles, the optimized unloading strategy is obtained.
[0181] Based on the initialization parameters, the current Q value corresponding to each particle is determined by:
[0182] The current Q value corresponding to the particle is obtained by the following formula:
[0183] ;
[0184] in, Represents the current Q value corresponding to the particle, represents the discount factor, The value is [0,1], here =0.95.
[0185] The Q value update formula is as follows:
[0186] ;
[0187] in, It is a particle The fitness value of It is a particle The above update formula helps particle technicians adjust their search strategies based on historical experience, thereby improving search efficiency.
[0188] At the beginning of each iteration, the inertia weight of the PSO algorithm is dynamically adjusted through the Q-learning algorithm and learning factor , and adjust the temperature parameters of the simulated annealing algorithm ;
[0189] Weight for inertia The adjustment is done by the following formula:
[0190] ;
[0191] Temperature parameters The adjustment is done by the following formula:
[0192] ;
[0193] When updating particle velocities, use The greedy strategy decides whether to take random exploration or choose the best action based on the current Q value. Specifically, the algorithm uses probability Make random selections (exploration) with probability Select the action with the largest current Q value. This strategy helps to maintain sufficient exploration during the search process to avoid falling into the local optimum.
[0194] Specifically, the particle velocity evolution equation of the PSO algorithm is as follows:
[0195] ;
[0196] in, , , All are dynamically adjusted through the Q-learning algorithm; It represents the difference between the expected sum of rewards for each action in the current state and the current particle position, guiding the particle to adjust its speed in a more optimal direction.
[0197] Step S104: selectively dynamically optimizing the unloading strategy of the tasks in each task stage to obtain a dynamic unloading strategy for the tasks in each task stage;
[0198] Specifically, the selective dynamic optimization of the unloading strategy of the tasks in each task stage to obtain the dynamic unloading strategy for the tasks in each task stage includes:
[0199] Obtain resource data of edge servers and cloud servers in real time, and build a virtual dynamic resource pool based on the resource data of edge servers and cloud servers;
[0200] Based on the virtual dynamic resource pool, the unloading strategy of the tasks in each task stage is selectively and dynamically adjusted to obtain the dynamic unloading strategy of the tasks in each task stage.
[0201] Specifically, the state matrix of the virtual dynamic resource pool is obtained by the following formula:
[0202] ;
[0203] in, Indicates The resource status of each node includes information about memory, energy consumption, and time delay.
[0204] Among them, each particle in the PSO algorithm is represented by a position vector. Assuming that the system has available offloading nodes (taking terminal devices, edge servers, and cloud servers as examples), the position vector of each particle is obtained by the following formula:
[0205] ;
[0206] in, is the number of tasks. Each Corresponding tasks The unloading decision variable represents the particle To the task Potential scenarios for the selected offloading node. The value of is a continuous real number, that is, these position vectors are randomly generated when the particle swarm algorithm is initialized.
[0207] Map the continuous position value of the particle to a discrete unloading strategy, that is, set the following conversion rules according to the partition mapping method:
[0208] The continuous interval [0, 1] is divided into three parts, corresponding to the terminal device, edge server and cloud server respectively.
[0209] The following intervals are preset to match each processing device:
[0210] Corresponding terminal devices (numbered 0 to L-1).
[0211] Corresponding edge servers (numbered L to L+M-1).
[0212] Corresponding cloud servers (numbered L+M to L+M+C-1).
[0213] Then, the specific conversion formula is as follows:
[0214] ;
[0215] in, is the final offloading node number of task j, Represents a floor operation to ensure that the result is an integer.
[0216] when When the value of falls within the interval of the terminal device, the task will be assigned to one of the terminal devices.
[0217] when When the value of falls within the range of edge servers, the task will be assigned to one of the edge servers.
[0218] when When the value of falls within the interval of cloud servers, the task will be assigned to one of the cloud servers.
[0219] The status of all resource nodes is updated in real time through the monitoring system, thereby updating the dynamic resource pool in real time;
[0220] Resource Status Matrix Obtained by the following formula:
[0221] ;
[0222] in: Indicates Memory usage at all times; Indicates Energy consumption at each moment; Indicates The task execution time at moment.
[0223] If the resource usage (such as memory usage) of any node exceeds the preset resource usage threshold, the system will dynamically adjust the position of the particles and offload the tasks to nodes with lighter loads through task migration strategies.
[0224] If the resource load of any node exceeds the preset resource load threshold, the estimated completion time of the task is obtained ,
[0225] If the estimated completion time of the task is If the preset acceptable time threshold is exceeded, the system will start the task migration mechanism to migrate the task from the current node to other nodes with lower resource utilization.
[0226] The key to representing the particle position in the algorithm as an unloading strategy is to discretize each element in the particle position vector and map it to a specific unloading decision. By defining the mapping rules between particle positions and unloading strategies and applying these rules in each iteration, the unloading strategy generation based on QSPSO can be achieved.
[0227] In the above embodiment, the initial unloading path is quickly determined by the PSO algorithm, and the initial unloading path is automatically optimized, thereby improving the global search capability, and achieving the optimal balance between time, energy consumption and cost by adaptively adjusting the inertia weight and dynamically adjusting the particle search behavior; a dynamic cooling coefficient adjustment mechanism is introduced by the simulated annealing algorithm to avoid local optimality, while improving the global search capability and reducing the energy consumption and time cost of execution; the parameters of the PSO algorithm are adjusted by the Q-learning algorithm to optimize the unloading strategy and enhance adaptability, thereby ensuring efficient execution of each stage of the deep neural network task; and the continuous position value of the particle is mapped to a discrete unloading strategy, and the conversion rules are set by the partition mapping method to achieve effective resource allocation in different task stages.
[0228] Step S105: Based on the dynamic offloading strategy for tasks in each task stage, perform multi-stage offloading of the deep neural network task.
[0229] Specifically, the method further includes:
[0230] The PSO algorithm, simulated annealing algorithm and Q-learning algorithm are tested for global convergence through Lyapunov function, and the PSO algorithm, simulated annealing algorithm and Q-learning algorithm are selectively adjusted based on the test results.
[0231] Specifically, the global convergence test of each algorithm is performed through the Lyapunov function:
[0232] Among them, the speed update formula of the Lyapunov function in the PSO algorithm is:
[0233] ;
[0234] in, is the objective function in the particle The value of the position.
[0235] The change in the objective function value and the update formula for the particle position are as follows:
[0236] ;
[0237] According to Taylor expansion, we can get:
[0238] ;
[0239] in, is the objective function at position The gradient at is its Hessian matrix.
[0240] From the above formula, we can know that:
[0241] ;
[0242] Through randomness and expected value analysis, the following formula can be obtained:
[0243] ;
[0244] in, is a constant, so we know that the change in the expected objective function value is negative. Therefore, we know that:
[0245] ;
[0246] Therefore, the PSO algorithm meets the convergence requirement.
[0247] Specifically, the simulated annealing algorithm helps the algorithm escape from the local optimum by probabilistically accepting a poor solution. , as the iteration progresses, the temperature As , ,is gradually reduced, the probability of accepting a worse solution also decreases.
[0248] Through the Lyapunov function to test the convergence of the simulated annealing algorithm, we can know that the Lyapunov function The expected value is non-increasing, that is:
[0249] ;
[0250] Therefore, the simulated annealing algorithm meets convergence requirements.
[0251] Specifically, if both the PSO algorithm and the simulated annealing algorithm meet convergence requirements:
[0252] The learning rate Satisfies the Robbins-Monro condition, that is, and , in order to ensure the convergence of strategy updates.
[0253] Specifically, the state space of Q-learning must be fully explored, so it is necessary to set a suitable value to maintain appropriate exploration. For later exploitation strategies, gradually reduce value, and relies more on existing knowledge to make decisions. Similarly, its state space is connected, that is, through a series of actions, it can reach other states from any state to ensure the comprehensiveness and convergence of the strategy.
[0254] Therefore, the strategy update of Q-learning will gradually approach the optimal strategy, making the adjustment of PSO parameters in the PSO algorithm and SA temperature parameters in the simulated annealing algorithm more inclined to optimize the global performance.
[0255] Based on the above steps S101-S105, by acquiring the deep neural network task, the corresponding tasks of multiple different task stages are generated, and then the deep neural network task and the tasks of multiple different task stages are substituted into the task offloading optimization module to generate an offloading strategy for the tasks of each task stage, and the offloading strategy of the tasks of each task stage is selectively dynamically optimized to obtain a dynamic offloading strategy for the tasks of each task stage; and multi-stage offloading of deep neural network tasks is performed, resources are flexibly allocated, and the offloading performance in multi-task scenarios is optimized, thereby improving time efficiency, energy consumption management and resource utilization, and is suitable for edge computing environments with complex multi-task scenarios.
[0256] It should be pointed out that although the various steps in the above embodiments are described in a specific order, those skilled in the art can understand that in order to achieve the effects of the present invention, different steps do not have to be performed in such an order, and they can be performed simultaneously (in parallel) or in other orders. These changes are within the scope of protection of the present invention.
[0257] Furthermore, the present invention also provides a cloud-edge-end multiple offloading system for deep neural network tasks.
[0258] See attached Figure 3 , Figure 3 1 is a main structural block diagram of a cloud-edge-end multiple offloading system for deep neural network tasks according to an embodiment of the present invention. Figure 2-Figure 3As shown, the cloud-edge-terminal multiple unloading system 300 for deep neural network tasks in the embodiment of the present invention mainly includes a plurality of different types of processing devices 302, a task unloading optimization module 303 and a control device 301, wherein the different types of processing devices 302 include at least a terminal server, an edge server and a cloud server, and the different types of processing devices 302 are used to perform deep neural network tasks. The task unloading optimization module 303 includes a time model, an energy consumption model and a cost model, which are used to perform time calculation, energy consumption calculation and cost calculation on deep neural network tasks respectively. The control device 301 includes a processor 3011 and a memory 3012, and the memory 3012 can be configured to store a program code 3013 for executing the cloud-edge-terminal multiple unloading method for deep neural network tasks in the above method embodiment, and the processor 3011 can be configured to execute the program code 3013 in the memory 3012, which includes but is not limited to executing the program code 3013 for the cloud-edge-terminal multiple unloading method for deep neural network tasks in the above method embodiment. For the convenience of explanation, only the part related to the embodiment of the present invention is shown. For specific technical details not disclosed, please refer to the method part of the embodiment of the present invention. The control device 301 may be a control device 301 device including various electronic devices.
[0259] Specifically, the system further includes a communication module, which is used for information interaction between different types of processing devices, systems and users.
[0260] Specifically, the communication module 304 is not restrictive in terms of the specific communication connection method between different types of processing devices, systems and users. Technicians can set it according to actual usage requirements as long as the communication connection can be achieved. For example, it can be connected via WiFi or Bluetooth, etc. Technicians can set it according to actual usage requirements.
[0261] Specifically, the communication module 304 can be a wireless communication device in the prior art, or it can be a wired communication device. The selection of the communication module 304 here is only an exemplary description. In actual testing, technical personnel in this field can make a selection according to actual needs. As long as the communication module 304 can be used to realize information interaction between different types of processing devices, systems and users, it will not be repeated here.
[0262] In one implementation, the description of the specific implementation functions may refer to steps S101 to S105.
[0263] The above cloud-edge multi-offloading system for deep neural network tasks is used to execute Figure 1The embodiment of the cloud-edge multiple offloading method for deep neural network tasks shown in the figure has similar technical principles, technical problems solved and technical effects produced. Those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working process and related instructions of the cloud-edge multiple offloading system for deep neural network tasks can refer to the contents described in the embodiment of the cloud-edge multiple offloading method for deep neural network tasks, and will not be repeated here.
[0264] It is understood by those skilled in the art that the present invention implements all or part of the processes in the method of the above embodiment, and can also be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium may include: any entity or device, medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory, random access memory, electric carrier signal, telecommunication signal and software distribution medium that can carry the computer program code. It should be noted that the content contained in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable storage media do not include electric carrier signals and telecommunication signals.
[0265] Furthermore, the cloud-edge-terminal multiple unloading system 300 of the present invention also includes a computer-readable storage medium. In a computer-readable storage medium embodiment according to the present invention, the computer-readable storage medium can be configured to store a program code 3013 for executing the cloud-edge-terminal multiple unloading method for deep neural network tasks in the above-mentioned method embodiment. The program code 3013 can be loaded and run by the processor 3011 to implement the above-mentioned cloud-edge-terminal multiple unloading method for deep neural network tasks. For ease of explanation, only the parts related to the embodiment of the present invention are shown. For specific technical details not disclosed, please refer to the method part of the embodiment of the present invention. The computer-readable storage medium can be a memory 3012 device formed by various electronic devices. Optionally, the computer-readable storage medium in the embodiment of the present invention is a non-temporary computer-readable storage medium.
[0266] Further, it should be understood that since the setting of each module is only for illustrating the functional units of the device of the present invention, the physical devices corresponding to these modules may be the processor 3011 itself, or a part of the software, a part of the hardware, or a part of the combination of software and hardware in the processor 3011. Therefore, the number of each module in the figure is only schematic.
[0267] Those skilled in the art will appreciate that the modules in the device can be adaptively split or merged. Such splitting or merging of specific modules will not cause the technical solution to deviate from the principle of the present invention, and therefore, the technical solutions after splitting or merging will fall within the protection scope of the present invention.
[0268] So far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.
Claims
1. A cloud-edge-device multiple offloading method for deep neural network tasks, characterized in that: The method is applied to a cloud-edge-end multiple unloading system, the system including multiple different types of processing devices, and the method includes the following steps: Get a deep neural network task; Based on the deep neural network task, generating tasks of a plurality of different task stages corresponding to the deep neural network task, wherein the different task stages include at least a lightweight task stage and a computationally intensive task stage; Substituting the deep neural network task and the tasks of the multiple different task stages into a task offloading optimization module, generating an offloading strategy for the tasks of each task stage, wherein the offloading strategy at least includes a task offloading path, a type of task execution processing device, and an offloading priority of tasks of each task stage; Selectively dynamically optimize the unloading strategy of the tasks in each task stage to obtain a dynamic unloading strategy for the tasks in each task stage; Perform multi-stage offloading of deep neural network tasks based on a dynamic offloading strategy for each task stage; The generating of a plurality of tasks of different task stages corresponding to the deep neural network task based on the deep neural network task comprises: Based on the deep neural network task, split each task stage in the deep neural network task to obtain tasks of multiple task stages after splitting; Identify the tasks of the multiple task stages after the splitting to obtain tasks of multiple different task stages corresponding to the deep neural network task; Substituting the deep neural network task and the tasks of the multiple different task stages into the task offloading optimization module to generate an offloading strategy for the tasks of each task stage includes: Based on the deep neural network task, obtaining an evaluation index of the deep neural network task; Based on the evaluation index of the deep neural network task, the tasks of multiple different task stages and the PSO algorithm, an initial unloading strategy for the tasks of multiple different task stages is generated, wherein the initial unloading strategy includes an initial unloading path for the tasks of multiple different task stages, an initial processing device type corresponding to each task and an unloading priority of the tasks of each task stage; Execute simulated annealing algorithm processing on the initial unloading strategy to obtain a primary optimized unloading strategy; Execute Q-learning algorithm processing on the primary optimized unloading strategy to obtain the optimized unloading strategy; Outputting the optimized offloading strategy as the offloading strategy for tasks in each task stage; The evaluation index of the deep neural network task obtained based on the deep neural network task includes: Performing time calculation on the deep neural network task to obtain a total unloading time of the deep neural network task; Calculating the energy consumption of the deep neural network task to obtain the total energy consumption of the device running the deep neural network task; Calculate the cost of the deep neural network task to obtain the total cost of the equipment required to run the deep neural network task; Based on the total unloading time of the deep neural network task, the total energy consumption of the equipment running the deep neural network task, and the total cost required for the equipment running the deep neural network task, an evaluation index of the deep neural network task is obtained; Calculating the time of the deep neural network task to obtain the total unloading time of the deep neural network task includes: The calculation of the deep neural network is mainly concentrated in the convolutional layer and the fully connected layer: In the convolution layer, the input feature map and the convolution kernel are convolved, where the computational load of the convolution layer is determined by the number of floating-point operations required to apply each convolution kernel to the input feature map; The calculation formula of the convolutional layer is as follows: ; in, Representative The computational workload of the layer tasks; The calculation formula of the fully connected layer is as follows: ; in, Respectively represent the width and height of the output feature map, K represents the height and width of the convolution kernel, and here it is set to be the same height and width. represents the number of channels of the input and output feature maps, Represent the number of input and output neurons respectively; The "multiply by 2" operation is because each convolution operation includes one multiplication and one addition; When calculating the task unloading time, set the time when the task just started , considering the computational processing time of the task and the data transmission time between different levels; The layer task is Processing time on each device The calculation formula is as follows: ; in, It is The computational workload of the layer task, It is The computing speed of the device, expressed here as the number of floating-point operations that can be performed per second; If there is The output of the layer task comes from The input of the layer task is Layer to Data transfer time of layer tasks Obtained by the following formula: ; in, Indicates The size of the output data of the layer task, in MB. Respectively represent the transmission rates of LAN and WAN, Indicates Layer and The device number where the layer task is executed. Represents the set of all numbers belonging to cloud server devices; The transmission time of the final result of the deep neural network back to the terminal server The calculation formula is as follows: ; in, Indicates the size of the data that is finally output to the terminal, in MB. Indicates the device number where the last task was executed. Indicates the terminal device number. Represents the set of numbers of all edge server devices; No. The data arrival time required by the layer task The calculation formula is as follows: ; in, are all direct predecessor tasks, i.e. Completion time of layer tasks; No. The data completion time required for the layer task The calculation formula is as follows: ; Total offloading time for the entire deep neural network task Obtained by the following formula: ; The energy consumption of the deep neural network task is calculated to obtain the total energy consumption of the device running the deep neural network task, including: equipment Total usage time The calculation formula is as follows: ; in: Indicates the device is assigned A collection of tasks; equipment Energy consumption The calculation formula is as follows: ; in, Indicates Energy consumption rate per unit time of each device (J / h) Total energy consumption of the device running the deep neural network task Obtained by the following formula: ; in: is the total number of devices actually participating in the task calculation; The subscription type of the deep neural network in the rental server includes on-demand subscription and package subscription; The cost of the deep neural network task is calculated to obtain the total cost of the device required to run the deep neural network task, including: equipment Cost of using on-demand subscription The calculation formula is as follows: ; equipment Cost of using the package The calculation formula is as follows: ; in, For equipment The unit time usage cost of on-demand subscription, For equipment The unit time usage cost of the package is ordered, is the package-time ordering cost for device i; The total cost of the equipment required to run the deep neural network task Obtained by the following formula: ; in, Indicates the device The usage cost is calculated based on the subscription type, i.e. on-demand subscription or time-based subscription.
2. The cloud-edge-end multiple offloading method for deep neural network tasks according to claim 1 is characterized in that: Based on the total unloading time of the deep neural network task, the total energy consumption of the equipment running the deep neural network task, and the total cost of the equipment running the deep neural network task, the evaluation index of the deep neural network task includes: Based on the total unloading time of the deep neural network task, the total energy consumption of the device running the deep neural network task, and the total cost of the device running the deep neural network task, obtaining a preset weight value corresponding to each data; Based on the total unloading time of the deep neural network task, the total energy consumption of the equipment running the deep neural network task, the total cost of the equipment running the deep neural network task, and the preset weight value corresponding to each data, an evaluation index of the deep neural network task is obtained; Among them, based on the total unloading time of the deep neural network task, the total energy consumption of the equipment running the deep neural network task, the total cost required for the equipment running the deep neural network task, and the preset weight value corresponding to each data, the evaluation index of the deep neural network task includes: Total offloading time for the entire deep neural network task The corresponding weight value is , the total cost of the equipment required to run the deep neural network task The corresponding weight value is And the total energy consumption of the device running the deep neural network task The corresponding weight value is ; Evaluation metrics for the deep neural network tasks Obtained by the following formula: ; in, is the deadline for task completion; Deadline for task completion Obtained by the following formula: ; in, is the adjustment factor, where The value is between 1 and 1.
5.
3. The cloud-edge-end multiple offloading method for deep neural network tasks according to claim 2 is characterized in that: The generating of the initial offloading strategy for the tasks at the multiple different task stages based on the evaluation index of the deep neural network task, the tasks at the multiple different task stages and the PSO algorithm comprises: By using the evaluation index of the deep neural network task and executing the PSO algorithm on the tasks at multiple different task stages, an initial offloading path for the tasks at multiple different task stages and an offloading priority for the tasks at each task stage are generated; Based on tasks at multiple different task stages, determine the type of initial processing equipment corresponding to each task; Based on the initial processing device type corresponding to each task, the initial offloading paths for tasks at multiple different task stages, and the offloading priorities of tasks at each task stage, an initial offloading strategy for tasks at multiple different task stages is generated.
4. The cloud-edge-end multiple offloading method for deep neural network tasks according to claim 3 is characterized in that: The performing of simulated annealing algorithm processing on the initial unloading strategy to obtain the primary optimized unloading strategy comprises: Executing a simulated annealing algorithm on the initial unloading strategy to obtain a dynamically adjusted temperature; According to the dynamically adjusted temperature, the initial unloading strategy is selectively adjusted to obtain a primary optimized unloading strategy.
5. The cloud-edge-end multiple offloading method for deep neural network tasks according to claim 4 is characterized in that: The selective dynamic optimization of the unloading strategy of the tasks in each task stage to obtain the dynamic unloading strategy of the tasks in each task stage includes: Obtain resource data of edge servers and cloud servers in real time, and build a virtual dynamic resource pool based on the resource data of edge servers and cloud servers; Based on the virtual dynamic resource pool, the offloading strategy of the tasks in each task stage is selectively and dynamically adjusted to obtain the dynamic offloading strategy of the tasks in each task stage; The state matrix of the virtual dynamic resource pool is obtained by the following formula: ; in, Indicates The resource status of each node includes information about memory, energy consumption, and time delay; Among them, each particle in the PSO algorithm is represented by a position vector. Assuming that the system has Available offloading nodes, among which, taking terminal devices, edge servers, and cloud servers as examples, the position vector of each particle is obtained by the following formula: ; in, is the number of tasks; each Corresponding tasks The unloading decision variable represents the particle To the task Potential solutions for the selected offloading nodes; Map the continuous position value of the particle to a discrete unloading strategy, that is, set the following conversion rules according to the partition mapping method: The continuous interval [0, 1] is divided into three parts, corresponding to the terminal device, edge server and cloud server respectively; The following intervals are preset to match each processing device: Corresponding to terminal devices, where the numbers are 0 to L-1; corresponding to edge servers, where they are numbered from L to L+M-1; Corresponding to cloud servers, where the numbers are L+M to L+M+C-1; Then, the specific conversion formula is as follows: ; in, is the final offloading node number of task j, Represents a round-down operation to ensure that the result is an integer; when When the value of falls within the interval of the terminal device, the task will be assigned to one of the terminal devices; when When the value of falls within the interval of edge servers, the task will be assigned to one of the edge servers; when When the value of falls within the interval of cloud servers, the task will be assigned to one of the cloud servers; The status of all resource nodes is updated in real time through the monitoring system, thereby updating the dynamic resource pool in real time; Resource Status Matrix Obtained by the following formula: ; in: Indicates Memory usage at all times; Indicates Energy consumption at each moment; Indicates The task execution time at each moment; If the resource utilization rate of any node, such as memory usage, exceeds the preset resource utilization rate threshold, the system will dynamically adjust the position of the particle and unload the task to the node with lighter load through the task migration strategy; If the resource load of any node exceeds the preset resource load threshold, the estimated completion time of the task is obtained : If the estimated completion time of the task is If the preset acceptable time threshold is exceeded, the system will start the task migration mechanism to migrate the task from the current node to other nodes with lower resource utilization.
6. The cloud-edge-end multiple offloading method for deep neural network tasks according to claim 5 is characterized in that: The method further comprises: The PSO algorithm, simulated annealing algorithm and Q-learning algorithm are tested for global convergence through Lyapunov function, and the PSO algorithm, simulated annealing algorithm and Q-learning algorithm are selectively adjusted based on the test results.
7. A cloud-edge-device multi-offloading system for deep neural network tasks, characterized in that: The cloud-edge-terminal multiple unloading system includes multiple different types of processing devices, task unloading optimization modules and control devices. The different types of processing devices include at least terminal servers, edge servers and cloud servers. The different types of processing devices are used to execute deep neural network tasks. The task unloading optimization module includes a time model, an energy consumption model and a cost model, which are used to perform time calculation, energy consumption calculation and cost calculation on deep neural network tasks respectively. The control device includes a processor and a memory. The memory is suitable for storing multiple program codes. The program codes are suitable for being loaded and run by the processor to execute the cloud-edge-terminal multiple unloading method for deep neural network tasks described in any one of claims 1 to 6.
8. The cloud-edge-end multiple offloading system for deep neural network tasks according to claim 7, characterized in that: The system further comprises a communication module, which is used for information exchange between different types of processing devices, systems and users.