Service deployment and sequence task unloading method for cloud side-end cooperative computing and application of service deployment and sequence task unloading method

Through iterative adjustment of service deployment and convex optimization algorithm calculation task priority, the problem of resource supply and demand contradiction in cloud-edge collaborative computing system is solved, and the system benefits are maximized and task response quality is improved.

CN119225935APending Publication Date: 2024-12-31NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411385307.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

In the existing cloud edge collaborative computing system, there is a supply and demand contradiction between terminal application requests and system resources. Resource limitations and heterogeneity, task coupling and service dependence make it difficult to maximize system benefits by task offloading.

Method used

By obtaining system and task parameters, performing cyclical iterative adjustment of service deployment, using convex optimization algorithm to calculate task priorities, building a task offload hierarchical matrix, optimizing service deployment and task offloading, and maximizing system benefits.

Benefits of technology

It optimizes service deployment and task offloading, improves system efficiency, meets complex and diverse terminal application needs, solves resource supply and demand contradictions, and improves task response quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119225935A_ABST
    Figure CN119225935A_ABST
Patent Text Reader

Abstract

The invention discloses a service deployment and sequence task unloading method for cloud side-end cooperative computing and an application thereof. The method comprises the following steps: acquiring system parameters and task parameters; deploying all services in a cloud server to obtain an initial service deployment matrix; performing loop iteration on the initial service deployment matrix, and traversing service adjustment deployment nodes in each iteration to update the service deployment matrix; traversing the task, obtaining an execution layer, and obtaining an unloading hierarchical matrix; and constructing a task queue of the edge server, and calculating priorities of tasks in the queue through a convex optimization algorithm to obtain a task edge layer unloading matrix. According to the method, service adjustment deployment is performed through a loop iteration method, system benefits are calculated, optimization of service deployment is realized, an execution layer of each task is obtained through a breakpoint layering method, the priority of the tasks in the queue is calculated based on a convex optimization algorithm, a task edge layer unloading matrix is obtained, optimization of a sequence task unloading scheme is realized, and the task unloading efficiency is improved. And maximization of system benefits is facilitated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of cloud-edge-device collaborative computing, and specifically relates to a service deployment and sequence task offloading method for cloud-edge-device collaborative computing and its application. Background Art

[0002] With the development of the Internet of Things and artificial intelligence technologies, a large number of intelligent terminal devices have emerged. The applications of the terminals have generated a large amount of data waiting to be transmitted and processed, which not only causes network congestion, but also brings high latency response to requests. These applications have two significant characteristics: one is data-intensive applications, which need to process and transmit a large amount of data. Data-intensive applications require a large amount of communication resources and computing resources and need to run reliably; the other is delay-sensitive applications, which have extremely high requirements for response time and require low latency response.

[0003] Traditional cloud computing has powerful computing power and abundant computing resources, and can quickly process data-intensive applications. However, due to the long distance between the cloud data center and the terminal device, a large transmission rate is generated during data transmission, and the long transmission distance leads to unstable transmission data, which cannot meet the needs of data-intensive applications and delay-sensitive applications. Edge computing deploys edge servers close to the terminal and provides computing power close to the data source, solving the problems of long transmission time and unstable transmission caused by long-distance data transmission, and meeting the low-latency response requirements of delay-sensitive applications. However, due to the limited computing power of edge servers, complex applications generated by all terminal devices cannot be calculated. With the development of hardware technology, many terminal devices also have certain data processing capabilities, but compared with edge servers, their computing power is more limited and resources are limited. Therefore, the cloud-edge-end collaborative computing system can complement each other and better respond to applications with different needs.

[0004] At present, in the cloud-edge-end collaborative computing system, there is a contradiction between the complex and diverse terminal application requests and the supply and demand of cloud-edge-end system resources. The limited and heterogeneous nature of cloud-edge-end system resources, task coupling and service dependency increase the difficulty of solving the task offloading problem. How to maximize the system benefits by adjusting service deployment and task offloading is an urgent problem that needs to be solved. Summary of the invention

[0005] The purpose of this application is to provide a service deployment and serial task offloading method for cloud-edge collaborative computing and its application, so as to solve the technical problems in the existing cloud-edge collaborative computing system, such as the contradiction between the complex and diverse terminal application request demands and the supply and demand of cloud-edge system resources, the limited and heterogeneous nature of cloud-edge system resources, the task coupling and service dependency, which increase the difficulty of solving the task offloading problem.

[0006] In order to achieve the above-mentioned purpose, the first aspect of the present application provides a service deployment and sequence task offloading method for cloud-edge-device collaborative computing, including:

[0007] Obtain system parameters and task parameters, wherein the system parameters include the number, computing frequency, data transmission rate, and hardware type of terminals, edge servers, and cloud servers; the task parameters include the number, type, and upper limit of response time of Job requests issued by the terminals, the number of tasks included in the Job requests, the amount of computing resources, input data volume, and dependent services of the tasks, and the hardware requirements of the services;

[0008] Based on the task parameters, all services that the task depends on are deployed in the cloud server to obtain an initial service deployment matrix;

[0009] Based on the system parameters and the task parameters, the initial service deployment matrix is ​​iterated cyclically, and the service adjustment deployment node is traversed in each iteration to update the service deployment matrix in a direction of increasing system benefits, so as to obtain a target service deployment matrix;

[0010] Traversing the tasks, acquiring the execution layer of the traversed target tasks based on the target service deployment matrix and task parameters, and obtaining the offloading hierarchical matrix of the Job request, wherein the execution layer includes a terminal layer, an edge layer, and a cloud layer;

[0011] Based on the offloading hierarchical matrix, a task queue of the edge server is constructed, and the priorities of the tasks in the queue are calculated by a convex optimization algorithm to obtain a task edge layer offloading matrix.

[0012] In one or more embodiments, the step of traversing the service adjustment deployment nodes in each iteration to update the service deployment matrix in a direction of increasing system benefits to obtain the target service deployment matrix includes:

[0013] In each iteration, the services are traversed, and the traversed target services are deployed one by one on the nodes that meet their hardware requirements, and the system benefits are calculated, and the target services are deployed on the nodes with the largest system benefits;

[0014] After all services are traversed, the updated service deployment matrix is ​​obtained, and the next iteration begins until the service deployment matrices obtained from two iterations are the same, and the target service deployment matrix is ​​obtained.

[0015] In one or more embodiments, the method for calculating the system benefit includes:

[0016] Based on the current service deployment matrix and the task parameters, traverse the tasks, obtain the execution layer of the tasks, and obtain the current offloading layer matrix of the Job request;

[0017] Based on the current offloading hierarchical matrix, a task queue of the edge server is constructed, and the priorities of the tasks in the queue are calculated by a convex optimization algorithm to obtain a current task edge layer offloading matrix;

[0018] Calculate the execution time of the Job request based on the current offloading layer matrix and the current task edge layer offloading matrix;

[0019] Based on the execution time of the Job request, the system benefit is calculated.

[0020] In one or more embodiments, the step of calculating the execution time of the Job request based on the current offloading layer matrix and the current task edge layer offloading matrix includes:

[0021] Traversing the tasks in the target Job request in order, and acquiring the execution layer of the traversed target task based on the current offloading layer matrix;

[0022] Based on the execution layer and preparation time of the target task, as well as the system parameters and task parameters, the completion time of the target task is obtained, wherein the preparation time is the completion time of a predecessor task of the target task, and the predecessor task is a task that is one step above the target task in the target Job request;

[0023] After all tasks of the target Job request are traversed, the completion time of the last task in the target Job request is used as the execution time of the target Job request.

[0024] In one or more embodiments, the step of obtaining the completion time of the target task based on the execution layer and preparation time of the target task, and the system parameters and task parameters includes:

[0025] Obtaining the computing resource amount of the target task and the computing frequency of the node to which the target task is offloaded, and calculating the computing time of the target task;

[0026] If the execution layer of the target task is the terminal layer, obtaining the completion time of the target task based on the calculation time and preparation time of the target task; and / or,

[0027] If the execution layer of the target task is the edge layer, the completion time of the previous task of the target task in the task queue and the preparation time of the target task are obtained, and the waiting execution time of the target task is calculated;

[0028] Determining whether the execution layer of the predecessor task is a terminal layer;

[0029] If yes, obtain the computing resource amount of the target task and the data transmission rate of the local terminal, and calculate the wireless transmission time of the target task;

[0030] Obtaining the transmission rates of the local edge server and the offloading edge server, as well as the computing resource amount of the target task, and calculating the edge layer transmission time of the target task;

[0031] Obtaining the completion time of the target task based on the wireless transmission time, waiting execution time, edge layer transmission time and calculation time of the target task; and / or,

[0032] If the execution layer of the target task is the cloud layer, determining whether the execution layer of the predecessor task is the terminal layer;

[0033] If yes, obtain the computing resource amount of the target task and the data transmission rate of the local terminal, and calculate the wireless transmission time of the target task;

[0034] Obtaining the transmission rates of the local edge server and the cloud server, as well as the computing resource amount of the target task, and calculating the cloud transmission time of the target task;

[0035] The completion time of the target task is obtained based on the preparation time, wireless transmission time, cloud transmission time and calculation time of the target task.

[0036] In one or more implementations, if the execution layers of the target task and the predecessor task are both edge layers, the method further includes:

[0037] Obtaining the transmission rate between the target task and the offloading edge server of the predecessor task, and the computing resource amount of the target task, and calculating the edge layer transmission time of the target task;

[0038] Obtaining the completion time of the target task based on the preparation time, waiting execution time, edge layer transmission time and calculation time of the target task; and / or,

[0039] If the execution layer of the target task is the edge layer, and the execution layer of the predecessor task is the cloud layer, the method further includes:

[0040] Obtaining the transmission rate between the target task and the offloading edge server of the predecessor task, and the computing resource amount of the target task, and calculating the edge layer transmission time of the target task;

[0041] Obtaining the completion time of the target task based on the preparation time, waiting execution time and calculation time of the target task; and / or,

[0042] If the execution layer of the target task is the cloud layer, and the execution layer of the predecessor task is the edge layer, the method further includes:

[0043] Obtaining the transmission rates of the offloading edge server and the cloud server of the predecessor task and the computing resource amount of the target task, and calculating the cloud transmission time of the target task;

[0044] Obtaining the completion time of the target task based on the preparation time, cloud transmission time and calculation time of the target task; and / or,

[0045] If the execution layers of the target task and the predecessor task are both cloud layers, the method further includes:

[0046] Based on the preparation time and calculation time of the target task, the completion time of the target task is obtained.

[0047] In one or more embodiments, the step of calculating the system benefit based on the execution time of the Job request includes:

[0048] Obtaining the benefit of the Job request based on the upper limit of the response time and the execution time of the Job request;

[0049] Based on the benefits of all the Job requests, the system benefit is obtained.

[0050] In one or more embodiments, the step of traversing the tasks, acquiring the execution layer of the traversed target tasks based on the target service deployment matrix and task parameters, and obtaining the offloading hierarchical matrix of the Job request includes:

[0051] Traversing the tasks requested by the Job, and for the traversed target tasks, determining whether the local terminal has deployed the services it depends on based on the target service deployment matrix and task parameters;

[0052] If not, determine whether the edge server is deployed with the services it depends on;

[0053] If not, the cloud layer is used as the execution layer of the target task;

[0054] After the traversal is completed, the offloading hierarchical matrix of the Job request is obtained.

[0055] In one or more embodiments, if the local terminal is deployed with a service that the target task depends on, the terminal layer is used as the execution layer of the target task; and / or,

[0056] If the local terminal is not deployed with the service required by the target task, the edge server is deployed with the service that the target task depends on, and the edge layer is used as the execution layer of the target task.

[0057] In one or more embodiments, the step of constructing a task queue of the edge server based on the offloading hierarchical matrix, and calculating the priority of the tasks in the queue by a convex optimization algorithm to obtain the task edge layer offloading matrix includes:

[0058] Build a task queue for edge servers where services are deployed;

[0059] Based on the offloading hierarchical matrix, tasks whose execution layer is the edge layer are collected into a job-task pool;

[0060] Calculate the marginal offloading slack variables of the tasks in the job-task pool based on a convex optimization algorithm;

[0061] Poll to obtain the preparation time of tasks in the job-task pool, and collect the tasks that can obtain the preparation time into the job-task-advance pool, and collect the remaining tasks into the job-task-secondary pool. The preparation time is the completion time of the predecessor task of the task, and the predecessor task is the task that ranks one above the target task in the target Job request;

[0062] Poll and calculate the idle time of all the task queues, and select the task queue with the shortest space time as the target task queue, where the idle time is the completion time of the last task in the task queue;

[0063] Selecting a target task that depends on the service of the target task queue from the job-task-advance pool, and calculating the priority of the target task based on the waiting execution time of the target task, the type of the Job request to which it belongs, and the edge offloading slack variable;

[0064] Unloading the target task with the highest priority into the target task queue, and updating the space time of the target task queue;

[0065] After all tasks in the job-task pool are unloaded, the task edge layer unloading matrix is ​​obtained.

[0066] In one or more embodiments, the step of calculating the marginal offloading slack variables of the tasks in the job-task pool based on the convex optimization algorithm includes:

[0067] The following constraints are constructed for the tasks in the job-task pool: the edge server to which the task is offloaded must deploy the service on which the task depends, the task can only be offloaded to one edge server, and the value range of the edge offloading slack variable of the task is 0 to 1;

[0068] The above constraints are solved in the direction of minimizing the computation time of all tasks in the job-task pool to obtain the marginal offloading slack variables of the tasks in the job-task pool.

[0069] In order to achieve the above-mentioned purpose, the second aspect of the present application provides a service deployment and sequence task offloading device for cloud-edge-device collaborative computing, including:

[0070] An acquisition module, used to acquire system parameters and task parameters, wherein the system parameters include the number, computing frequency, data transmission rate, and hardware type of terminals, edge servers, and cloud servers; the task parameters include the number, type, and upper limit of response time of Job requests issued by the terminals, the number of tasks included in the Job requests, the amount of computing resources, input data volume, and dependent services of the tasks, and the hardware requirements of the services;

[0071] An initial deployment module, used to deploy all services that the task depends on in the cloud server based on the task parameters, to obtain an initial service deployment matrix;

[0072] A loop iteration module, used for looping and iterating the initial service deployment matrix based on the system parameters and the task parameters, traversing the service adjustment deployment nodes in each iteration, so as to update the service deployment matrix in a direction of increasing system benefits, and obtain a target service deployment matrix;

[0073] A traversal module, used to traverse the tasks, obtain the execution layer of the traversed target tasks based on the target service deployment matrix and task parameters, and obtain the offloading hierarchical matrix of the Job request, wherein the execution layer includes a terminal layer, an edge layer, and a cloud layer;

[0074] The convex optimization module is used to construct a task queue of the edge server based on the offloading hierarchical matrix, and calculate the priority of the tasks in the queue through a convex optimization algorithm to obtain a task edge layer offloading matrix.

[0075] In order to achieve the above-mentioned object, the third aspect of the present application provides an electronic device, including:

[0076] at least one processor; and

[0077] A memory storing instructions, which, when executed by the at least one processor, enables the at least one processor to execute the service deployment and sequence task offloading method for cloud-edge-end collaborative computing as described in any of the above embodiments.

[0078] In order to achieve the above-mentioned objectives, the fourth aspect of the present application provides a machine-readable storage medium, which stores executable instructions. When the instructions are executed, the machine executes the service deployment and sequence task offloading method for cloud-edge collaborative computing as described in any of the above embodiments.

[0079] Different from the prior art, the beneficial effects of this application are:

[0080] This application uses a cyclic iterative method to adjust and deploy services, calculate system benefits, and update the service deployment matrix in the direction of increasing system benefits, thereby optimizing service deployment and maximizing system benefits.

[0081] This application obtains the execution layer of each task through the breakpoint stratification method, and calculates the task queue of tasks whose execution layer is the edge layer based on the convex optimization algorithm, obtains the task edge layer unloading matrix, realizes the optimization of the sequence task unloading scheme, and helps to maximize the system benefits. BRIEF DESCRIPTION OF THE DRAWINGS

[0082] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0083] Figure 1 It is a flowchart of an implementation method of a service deployment and sequence task offloading method for cloud-edge-device collaborative computing of the present application;

[0084] Figure 2 It is a flow chart of an implementation method of a cyclic iteration method of the service deployment matrix of the present application;

[0085] Figure 3 It is a flowchart of an implementation method of a calculation method of an unloading hierarchical matrix in the present application;

[0086] Figure 4 It is a flowchart of an implementation method of a method for calculating an edge layer offloading matrix of the task of this application;

[0087] Figure 5 It is a flowchart of an implementation method of a method for calculating the benefits of the system of the present application;

[0088] Figure 6 yes Figure 5 A schematic diagram of a flow chart of an implementation method corresponding to S603;

[0089] Figure 7 This is the task execution cycle diagram of this application;

[0090] Figure 8 It is a structural diagram of an implementation method of a service deployment and sequence task offloading device of the present application;

[0091] Fig. 9 It is a schematic structural diagram of an embodiment of an electronic device of the present application. DETAILED DESCRIPTION

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

[0093] The present application provides a joint optimization method for service deployment and serial task offloading for cloud-edge-end collaborative computing. The method can optimize the service deployment and offloading nodes of the task based on the system and task parameters, thereby maximizing the overall benefit of the cloud-edge-end system, improving the response quality of the task, and resolving the contradiction between the supply and demand of complex and diverse terminal application requests and the cloud-edge-end system resources.

[0094] Specifically, see Figure 1 , Figure 1 It is a flow chart of an implementation method of service deployment and serial task offloading for cloud-edge-device collaborative computing in the present application.

[0095] like Figure 1 As shown, the method includes:

[0096] S100: Obtain system parameters and task parameters.

[0097] Among them, system parameters include the number of terminals, edge servers and cloud servers in the system, computing frequency, data transmission rate and hardware type.

[0098] For example, in the system parameters, the terminal set can be represented by V = {v1, v2, ..., v d}, the number is d = |V|, for any terminal v∈V, its characteristics are set to P v ={C v ,F v ,r v ,H v}, where C v represents the processing capacity of terminal v, including storage capacity and computing capacity, F v represents the calculation frequency of terminal v, r vrepresents the data transmission rate between terminal v and edge layer server, H v Indicates the hardware type of terminal v. If H v = 0, indicating that terminal v has only one CPU processor. If H v =1, indicating that terminal v has a GPU processor.

[0099] The edge server set is N = {n1,n2,...,n e} indicates that the number of edge servers is e = |N|. For any edge server n,n1∈N, its characteristics are set to Among them C v represents the processing capacity of edge server n, F n represents the computation frequency of edge server n, represents the data transmission rate between edge server n and edge server n1, H n represents the hardware type of edge server n. If H n = 0, indicating that the edge server n has only one CPU processor. If H n =1, indicating that the edge server n contains a GPU processor;

[0100] The cloud server is represented by the symbol Cloud. The processing capacity of the cloud server CloudC is very large, assuming it is infinite. CloudF represents the computing frequency of the cloud server, and CloudR n Represents the data transmission rate between edge server n and cloud server.

[0101] Task parameters include the number, type, and upper limit of response time of the Job requests issued by the terminal, the number of tasks included in the Job request, the computing resources of the task, the amount of input data and dependent services, and the hardware requirements of the service.

[0102] For example, the set of Job requests issued by all terminals can be represented by J = {j1, j2, ..., j |J|} means that the number of job requests in the system is |J|, and the job request issued by terminal v∈V is marked as j v ∈J, for any job request, its attribute is set to P j ={JKind j ,UL j}, where JKind j ={0,1} indicates the type of job. If JKind j =1, indicating that job j is a delay-sensitive job. If JKind j =0, indicating that job j is a delay-tolerant job; UL j Indicates the upper limit of jobj's response time.

[0103] A job request consists of one or more tasks. The task model is a collection of ST j =(T j ,W j ) indicates that T j represents the task set of job j, W j represents the set of data volumes transferred between the tasks of job j. For any task t i ∈T j , whose properties are set to in Represents task t i The amount of computing resources required, Represents task t i The size of the input data.

[0104] The successful execution of each task depends on services, and the service set is S = {s1, s2, ..., s |S|} indicates that the number of services in the system is |S|. For each task t i ∈T j The dependent service is set to For any service s∈S, the hardware conditions required for service execution are set to H s , if H s = 0, indicating that service s is executed under the CPU processor. If H s =1, indicating that service s is executed under the GPU processor.

[0105] S200: Based on the task parameters, deploy all services that the task depends on in the cloud server to obtain an initial service deployment matrix.

[0106] After obtaining the above task parameters, you can perform initial deployment of all dependent services.

[0107] The service deployment matrix defined in this application can be as follows: X = {x1, x2, ..., x s ,...,x |S|}, where x s represents the deployment matrix of service s, x s ={x s1 ,x s2 ,...,x sm ,...,x s|M|}, for any x sm ={0,1}, if x sm = 0, indicating that service s is not deployed on computing node m; if x sm =1, indicating that service s is deployed at computing node m.

[0108] It is understandable that in other implementations, other service deployment schemes may also be adopted in the initial state, and the effects of this implementation can be achieved.

[0109] S300: Based on the system parameters and the task parameters, the initial service deployment matrix is ​​iterated cyclically.

[0110] Specifically, in each iteration of the loop iteration, the service adjustment deployment node is traversed to update the service deployment matrix in the direction of increasing system benefit to obtain the target service deployment matrix. Through the loop iteration method, the system benefit is maximized.

[0111] The following is a detailed description of the iterative loop method of this application. Figure 2 , Figure 2 It is a flow chart of an implementation method of a cyclic iteration method of the service deployment matrix of the present application.

[0112] like Figure 2 As shown, the loop iteration method includes:

[0113] S301. Traverse the services in each iteration, deploy the traversed target services one by one to the nodes that meet their hardware requirements, calculate the system benefits, and deploy the target services to the nodes with the largest system benefits.

[0114] First, each service is traversed in each iteration, and the deployment node of the traversed target service is adjusted. After each adjustment of the deployment node of the target service, the real-time system benefit is calculated to select a node that can maximize the system benefit from the nodes where the target service can be deployed to deploy the target service.

[0115] S302: After all services are traversed, an updated service deployment matrix is ​​obtained, and the next iteration is started until the service deployment matrices obtained from two iterations are the same, thereby obtaining a target service deployment matrix.

[0116] After all services are traversed in each iteration, the service deployment matrix output by this iteration can be obtained.

[0117] Until the service deployment matrix obtained in the kth iteration is the same as the service deployment matrix obtained in the k-1th iteration, that is, X k =X k-1 , then the loop ends and the target service deployment matrix is ​​obtained, which can maximize the system benefit.

[0118] In this application, the system benefit is inversely proportional to the execution time of the job request, that is, the longer the execution time of all job requests, the lower the system benefit. Since the specific calculation method of the system benefit in this application is related to the sequence task offloading optimization step, it is introduced in detail at the end, and the calculation process of the system benefit in this step is omitted.

[0119] S400, traverse the tasks, obtain the execution layer of the traversed target tasks based on the target service deployment matrix and task parameters, and obtain the offloading layer matrix of the Job request.

[0120] Based on S100~S300, system parameters and task parameters are obtained, and the target service deployment matrix is ​​given. At this time, the breakpoint layering method can be executed to obtain the unloading layering matrix of the Job request, that is, the execution layer of each task in the Job request. The execution layer includes the terminal layer, edge layer and cloud layer corresponding to the system node, among which the execution layer is the terminal layer, which means that the task is executed between terminals, the execution layer is the edge layer, which means that the task is executed by the edge server, and the execution layer is the cloud layer, which means that the task is executed by the cloud server.

[0121] Specifically, see Figure 3 , Figure 3 It is a flowchart of an implementation method of a calculation method for an unloading hierarchical matrix in the present application.

[0122] like Figure 3 As shown, the calculation method of the unloading hierarchical matrix includes:

[0123] S401, traverse the tasks requested by the Job, and for the traversed target task, determine whether the local terminal has deployed its dependent services based on the target service deployment matrix and task parameters.

[0124] First, the tasks included in the Job request can be traversed. When a target task is traversed, it can be determined whether the local terminal has deployed the service that the target task depends on.

[0125] Since the target service deployment matrix and task parameters are known, the services that the target task depends on and the nodes where the services are deployed are known, and corresponding judgments can be made.

[0126] If the local terminal has deployed services that the target task depends on, the execution layer of the target task is set to the terminal layer.

[0127] In one embodiment, for the i-th task of Job j, if the local terminal v satisfies And the calculation frequency F of terminal v v >0, then the unloading layer variable of the i-th task That is, the execution layer is the terminal layer.

[0128] If the local terminal does not deploy the service that the target task depends on, It also includes:

[0129] S402: Determine whether the edge server has deployed its dependent services.

[0130] If the edge server has a service that the target task depends on, the execution layer of the target task is set to the edge layer.

[0131] In one embodiment, for the i-th task of Job j, if there is an edge server n that satisfies And the computation frequency F of edge server n n >0, then the unloading layer variable of the i-th task That is, the execution layer is the edge layer.

[0132] If the edge server does not deploy the services that the target task depends on, It also includes:

[0133] S403: Use the cloud layer as the execution layer of the target task.

[0134] If neither the terminal nor the edge server has deployed the services that the target task depends on, the execution layer of the target task is set to the cloud layer. In one embodiment, for the i-th task of Jobj, let its unloading layer variable That is, the execution layer is the cloud layer.

[0135] S404: After the traversal is completed, the offloading hierarchical matrix of the Job request is obtained.

[0136] According to the above steps, the execution layers of all tasks can be obtained, and the offloading layer matrix set can be obtained. The matrix Represents job v requested by terminal v j The uninstallation hierarchy matrix, For any task offloading layer variables set up in Indicates that terminal v requests job v j Medium Task i Offload to the terminal layer and execute by the local terminal device; Indicates that terminal v requests job v j Medium Task i Offload to the edge layer and execute by the edge server; Indicates that terminal v requests job v j Medium Task i Offload to the cloud layer and execute by the cloud server.

[0137] Based on the above S400, we have obtained the execution layer of all tasks. For tasks whose execution layer is the terminal layer and cloud layer, the task can be directly unloaded to the corresponding location. However, for tasks whose execution layer is the edge layer, since the tasks in the edge server have different priorities, different priorities will affect the execution time of the task and the system benefits, it is necessary to build a queue and prioritize the tasks in the edge layer. Specifically, it also includes:

[0138] S500: Based on the offloading hierarchical matrix, a task queue of the edge server is constructed, and the priority of the tasks in the queue is calculated by a convex optimization algorithm to obtain a task edge layer offloading matrix.

[0139] The edge offloading method of convex optimization is used to optimize the task offloading nodes and queue sorting of the edge layer, thereby obtaining the task edge layer offloading matrix.

[0140] The task edge layer unloading matrix includes a task queue of the edge server, and the task queue includes a plurality of tasks sorted by priority, so as to obtain the unloading nodes and unloading order of the tasks at the edge layer.

[0141] Specifically, the task edge layer offloading matrix defined in this application is in Indicates that terminal v requests job v j Offloading matrix at the edge layer, Indicates job v j Medium Task i Offloading matrix at the edge layer, For any edge unloading variable set up in Indicates that terminal v requests job v j Medium Task i No offloading to edge server n; Indicates that terminal v requests job v j Medium Task i Offload to edge server n.

[0142] The following is a detailed description of the calculation method of the task edge layer offloading matrix. Figure 4 , Figure 4 It is a flow chart of an implementation method of a method for calculating an edge layer offloading matrix for a task in this application.

[0143] like Figure 4 As shown, the calculation method of the task edge layer offloading matrix includes:

[0144] S501: Build a task queue for the edge server where the service is deployed.

[0145] First, we can build the initial task queue. If service s is deployed at edge node n (x s,n =1), then set a task queue (n,s), set the idle time of the task queue to iTime(n,s), and the space time is the time for all task requests to be executed; initially, the idle time of the task queue (n,s) is iTime(n,s)=0.

[0146] S502 : Based on the offloading hierarchical matrix, tasks whose execution layer is the edge layer are collected into a job-task pool.

[0147] All tasks whose execution layer is the edge layer are identified from the offloading layer matrix and collected into the job-task pool.

[0148] S503 , calculating the marginal offloading slack variables of the tasks in the job-task pool based on the convex optimization algorithm.

[0149] Among them, the convex optimization algorithm is an efficient method for solving convex optimization problems. It uses the convexity of the objective function and the convexity of the constraint set to seek the global optimal solution. In this application, the convex optimization algorithm is used to minimize the calculation time of all tasks in the edge layer as the optimization goal to calculate the relaxed solution of the convex optimization problem P1 Get the edge offloading slack variables for all tasks.

[0150] Of course, in other implementations, other feasible optimization algorithms in the art may also be used to implement corresponding optimization operations.

[0151] Specifically, in one embodiment, the SDPT3 solver in MATLAB can be used to calculate the relaxed solution of the convex optimization problem P1: The following constraint formula eq1 is constructed for all tasks in the job-task pool, and the following constraint formulas eq1.1 to 1.3 are constructed for tasks in the job-task pool. Among them, eq1 represents minimizing the computing time of all tasks in the edge layer. Represents task t i The amount of computing resources, F n represents the computation frequency of edge node n, Representation Task <j,t i >Computation time at edge node n; eq1.1 indicates that the node to which the task is offloaded must deploy the services that the task depends on; eq1.2 indicates that the task can only be offloaded to one edge node for execution; eq1.3 indicates that the value range of the edge offloading slack variable is [0, 1].

[0152]

[0153] Based on the above constraint formula, the edge unloading slack variable of each task is obtained

[0154] S504 , polling to obtain the preparation time of tasks in the job-task pool, and collecting the tasks that can obtain the preparation time into the job-task-advance pool, and collecting the remaining tasks into the job-task-secondary pool.

[0155] The preparation time is the completion time of the predecessor task of the task, and the predecessor task is the task that ranks above the target task in the target Job request.

[0156] S505 , poll and calculate the idle time of all task queues, and select the task queue with the shortest idle time as the target task queue.

[0157] As in S501, the idle time is the completion time of the last task in the task queue. In the initial state, the idle time of all task queues is 0, and a task queue can be randomly selected as the target task queue. As tasks are unloaded to the task queue, the idle time of the task queue is updated.

[0158] S506 , selecting a target task that depends on the service of the target task queue from the job-task-advance pool, and calculating the priority of the target task based on the waiting execution time of the target task, the type of the Job request to which it belongs, and the edge offloading slack variable.

[0159] It can be understood that the task queue corresponds to the service deployed by an edge server. After determining the target task queue, the service s provided by the target task queue can be obtained, and all tasks that depend on service s can be selected from the task-task-advance pool. <j,t i >, that is

[0160] The priority of each task is determined by the waiting execution time of the task, the type of job request and the edge offloading slack variable. For example, it can be composed of the weighted combination of the above three parameters, as shown in the following formula:

[0161]

[0162] In the formula, That is, the waiting execution time of the target task. The waiting execution time is determined by the execution queue of the task at the edge layer. In one embodiment, the definition of the waiting execution time can be In the formula, is the idle time of the target task queue, It is the preparation time of the target task, that is, the completion time of the predecessor task of the target task;

[0163] When calculating the priority of the target task to unload the target task, the current idle time of the target task queue can be obtained in real time, and the preparation time of the target task can be subtracted to obtain the waiting execution time of the target task. j ={0,1} indicates the job type, as set in S100. If JKind j =1, indicating that job j is a delay-sensitive job. If JKind j =0, indicating that job j is a delay-tolerant job;

[0164] That is, the marginal offloading slack variable of the target task calculated in S503; k1, k2 and k3 represent the weight coefficients of the above three factors respectively.

[0165] S507: Unload the target task with the highest priority to the target task queue, and update the space time of the target task queue.

[0166] In S506 , the priorities of all tasks that depend on the services of the target task queue are calculated, so as to select the target task with the highest priority and unload it into the target task queue. At this time, the idle time of the target task queue is the completion time of the target task.

[0167] S508 , after all tasks in the job-task pool are unloaded, a task edge layer unloading matrix is ​​obtained.

[0168] The next round of polling operation is performed again, and S504 to S507 are repeated until all tasks are unloaded, and the task edge layer unloading matrix is ​​obtained.

[0169] The target service deployment matrix obtained based on S300 can optimize service deployment, and the task offloading optimization can be achieved based on S400 and S500, thereby maximizing system benefits.

[0170] The following is a detailed description of the calculation method of the system benefits in S301 above. Figure 5 , Figure 5 It is a flowchart of an implementation method of a method for calculating the benefits of the system of the present application.

[0171] like Figure 5 As shown, the calculation method of system benefits includes:

[0172] S601. Based on the current service deployment matrix and task parameters, traverse the tasks, obtain the execution layer of the tasks, and obtain the current offloading layer matrix of the Job request.

[0173] Each time the target service is adjusted to a new node that meets its hardware requirements in S301 , the current service deployment matrix can be obtained.

[0174] Based on the current service deployment matrix and task parameters, the current offloading hierarchical matrix of each Job request can be obtained. The specific method can refer to S400 and will not be described in detail here.

[0175] S602: Based on the current offloading hierarchical matrix, a task queue of the edge server is constructed, and the priorities of the tasks in the queue are calculated by a convex optimization algorithm to obtain a current task edge layer offloading matrix.

[0176] Based on the current offloading hierarchical matrix, the current task edge layer offloading matrix can be calculated by a convex optimization algorithm. The specific method can refer to S500 and will not be described in detail here.

[0177] S603: Calculate the execution time of the Job request based on the current offloading layer matrix and the current task edge layer offloading matrix.

[0178] The execution time of a job request is the completion time of the last task of the job request. The completion time of a task is related to the execution layer of the task and the predecessor task, the completion time of the predecessor task, and the calculation time of the task.

[0179] Exemplarily, when the execution layers of the target task and its predecessor task are both edge layers, the target task can be sent to the edge layer together with the predecessor task. In this case, the time it takes for the target task to be transmitted from the terminal to the edge layer is 0.

[0180] For detailed description, please refer to Figure 6 , Figure 6 yes Figure 5 A flow chart of an implementation method corresponding to S603.

[0181] like Figure 6 As shown, the calculation method of the execution time of a Job request includes:

[0182] S6031. Traverse the tasks in the target Job request in order, and obtain the execution layer of the traversed target task based on the current offloading layer matrix.

[0183] S6032. Based on the execution layer and preparation time of the target task, as well as the system parameters and task parameters, obtain the completion time of the target task.

[0184] The preparation time is the completion time of the predecessor task of the target task, and the predecessor task is the task that ranks above the target task in the target Job request.

[0185] Specifically, see Figure 7 , Figure 7 It is the task execution cycle diagram of this application; first, the calculation time of the target task can be calculated, and the calculation resource amount of the target task and the calculation frequency of the node where the target task is unloaded are obtained based on the system parameters and task parameters, and the calculation time of the target task is calculated. The calculation formula is as follows:

[0186] Then calculate according to the situation:

[0187] (1) The execution layer of the target task is the terminal layer, and the completion time of the target task is the sum of the calculation time and the preparation time, that is,

[0188] (2) The execution layer of the target task is the edge layer. Since the task queue in the edge layer has a priority, the target task needs to wait in the task queue. The waiting execution time needs to be calculated. The calculation formula in S506 can be referred to to calculate the waiting execution time.

[0189] Further, determine whether the execution layer of the predecessor task is the terminal layer. If so, it is necessary to obtain the computing resources of the target task and the data transmission rate of the local terminal, and calculate the wireless transmission time of the target task. The wireless transmission time indicates the time it takes for a task to be transmitted from the terminal layer to the edge layer. If not, it means that the predecessor task also has a process of being transmitted from the terminal layer to the edge layer, and the wireless transmission time of the target task can be 0, as shown in the following formula:

[0190]

[0191] Furthermore, the target task needs to be transmitted in the edge layer. In a scenario, when the execution layer of the predecessor task is also the edge layer, the transmission of the target task in the edge layer is specifically transmitted from the unloading node n1 of the predecessor task to the unloading node n2 of the target task. The edge layer transmission time is Where, as defined in S100, w i is the input data volume of the target task, R n1,n2 is the transmission rate between the offloading node n1 and the offloading node n2. Of course, if the offloading node n1 and the offloading node n2 are the same, the edge layer transmission time is 0. In addition, it should be noted that when the execution layer of the predecessor task is the cloud layer, the offloading node n1 in the edge layer is the local edge server of the predecessor task;

[0192] In another scenario, when the execution layer of the previous task is the terminal layer, the transmission of the target task at the edge layer is specifically performed by the local edge server n v Transmitted to the offloading node n2, the edge layer transmission time is The calculation formula of the above edge layer transmission time can be summarized as follows:

[0193]

[0194] Based on the waiting execution time, wireless transmission time, edge layer transmission time, preparation time and calculation time of the target task calculated above, the completion time of the target task can be calculated:

[0195] (3) The execution layer of the target task is the cloud layer. First, the wireless transmission time of the target task is calculated in the same way as (2).

[0196] Furthermore, the target task needs to be transmitted from the edge layer to the cloud layer, and the cloud transmission time needs to be calculated. In a scenario, when the execution layer of the predecessor task is the terminal layer, the cloud transmission is specifically the target task from the local edge server n v Transmitted to the cloud server, the calculation formula for cloud transmission time is: See definition in S100, Represents the local edge node n v The transmission rate to and from the cloud;

[0197] In another scenario, the execution layer of the predecessor task is the edge layer, and the cloud transmission is specifically the transmission of the offloading node n of the predecessor task to the cloud server. The calculation formula of the cloud transmission time is:

[0198] In another scenario, when the execution layer of the predecessor task is the cloud layer, the cloud transmission time of the target task is 0; the calculation formula of the above cloud transmission time can be summarized as follows:

[0199]

[0200] Based on the wireless transmission time, cloud transmission time, preparation time, and calculation time of the target task calculated above, the completion time of the target task can be calculated:

[0201] Based on the above formulas, the completion time of the task can be calculated.

[0202] S6033: After all tasks of the target Job request are traversed, the completion time of the last task in the target Job request is used as the execution time of the target Job request.

[0203] S604: Calculate the system benefit based on the execution time of the Job request.

[0204] Specifically, after obtaining the execution time of the Job request, the benefit of the Job request can be obtained based on the upper limit of the response time of the Job request and the execution time, wherein the upper limit of the response time is limited by the task parameters in S100. Specifically, in one embodiment, the benefit calculation formula of the Job request is as follows: U j =UT j -ET j , where UT j Indicates the upper limit of jobj’s response time; ET j Indicates the execution time of jobj.

[0205] By adding up the benefits of all job requests, we can get the system benefit, as follows:

[0206] Based on the above steps, the system benefit of the service deployment matrix can be calculated, which helps to update the service deployment matrix in the direction of increasing the system benefit and obtain the target service deployment matrix.

[0207] This application also provides a service deployment and sequence task offloading device for cloud-edge collaborative computing. Figure 8 , Figure 8 It is a structural diagram of an implementation method of the service deployment and sequence task unloading device of the present application.

[0208] like Figure 8 As shown, the service deployment and sequence task unloading device for cloud-edge collaborative computing includes an acquisition module 21, an initial deployment module 22, a loop iteration module 23, a traversal module 24 and a convex optimization module 25.

[0209] The acquisition module 21 is used to acquire system parameters and task parameters. The system parameters include the number, computing frequency, data transmission rate and hardware type of terminals, edge servers and cloud servers. The task parameters include the number, type and upper limit of response time of Job requests issued by the terminal, the number of tasks included in the Job request, the computing resource amount, input data amount and dependent services of the task, and the hardware requirements of the service.

[0210] The initial deployment module 22 is used to deploy all services that the task depends on in the cloud server based on the task parameters to obtain an initial service deployment matrix;

[0211] The loop iteration module 23 is used to loop iterate the initial service deployment matrix based on the system parameters and the task parameters, traverse the service adjustment deployment nodes in each iteration, and update the service deployment matrix in the direction of increasing the system benefit to obtain the target service deployment matrix;

[0212] The traversal module 24 is used to traverse the tasks, obtain the execution layer of the traversed target task based on the target service deployment matrix and the task parameters, and obtain the offloading layer matrix of the Job request, where the execution layer includes the terminal layer, the edge layer and the cloud layer;

[0213] The convex optimization module 25 is used to construct a task queue of the edge server based on the offloading hierarchical matrix, and calculate the priority of the tasks in the queue through a convex optimization algorithm to obtain a task edge layer offloading matrix.

[0214] This application also provides an electronic device, see Fig. 9 , Fig. 9 Schematic diagram of the structure of an electronic device of the present application. Fig. 9 As shown, the electronic device 30 may include at least one processor 31, a memory 32 (e.g., a non-volatile memory), a memory 33, and a communication interface 34, and the at least one processor 31, the memory 32, the memory 33, and the communication interface 34 are connected together via a bus 35. At least one processor 31 executes at least one computer-readable instruction stored or encoded in the memory 32.

[0215] It should be understood that the computer executable instructions stored in the memory 32, when executed, cause at least one processor 31 to perform the above combined operations in various embodiments of the present specification. Figure 1-Figure 8 Describes the various operations and functions.

[0216] In the embodiments of the present specification, the electronic device 30 may include, but is not limited to, personal computers, server computers, workstations, desktop computers, laptop computers, notebook computers, mobile electronic devices, smart phones, tablet computers, cellular phones, personal digital assistants (PDAs), handheld devices, messaging devices, wearable electronic devices, consumer electronic devices, and the like.

[0217] According to one embodiment, a program product such as a machine-readable medium is provided. The machine-readable medium may have instructions (i.e., the above-mentioned elements implemented in the form of software), which, when executed by a machine, causes the machine to perform the above-mentioned combination of various embodiments of this specification. Figure 1-Figure 5 Specifically, a system or device equipped with a readable storage medium may be provided, on which a software program code implementing the functions of any of the above-mentioned embodiments is stored, and a computer or processor of the system or device reads and executes the instructions stored in the readable storage medium.

[0218] In this case, the program code itself read from the machine-readable medium can realize the function of any one of the above embodiments, and thus the machine-readable code and the machine-readable storage medium storing the machine-readable code constitute part of this specification.

[0219] Examples of readable storage media include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD-RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, the program code may be downloaded from a server computer or a cloud via a communication network.

[0220] Those skilled in the art should understand that the various embodiments disclosed above can be modified and altered in various ways without departing from the essence of the invention. Therefore, the protection scope of this specification should be defined by the appended claims.

[0221] It should be noted that not all steps and units in the above-mentioned processes and system structure diagrams are necessary, and some steps or units can be ignored according to actual needs. The execution order of each step is not fixed and can be determined as needed. The device structure described in the above-mentioned embodiments can be a physical structure or a logical structure, that is, some units may be implemented by the same physical client, or some units may be implemented by multiple physical clients, or some components in multiple independent devices may be implemented together.

[0222] In the above embodiments, the hardware unit or module can be realized by mechanical or electrical means. For example, a hardware unit, module or processor can include permanent dedicated circuit or logic (such as special processor, FPGA or ASIC) to complete the corresponding operation. The hardware unit or processor can also include programmable logic or circuit (such as general-purpose processor or other programmable processor), which can be temporarily set by software to complete the corresponding operation. Specific implementation (mechanical method or dedicated permanent circuit or temporary circuit) can be determined based on cost and time consideration.

[0223] The specific embodiments described above in conjunction with the accompanying drawings describe exemplary embodiments, but do not represent all embodiments that can be implemented or fall within the scope of protection of the claims. The term "exemplary" used throughout this specification means "used as an example, instance or illustration" and does not mean "preferred" or "having advantages" over other embodiments. For the purpose of providing an understanding of the described technology, the specific embodiments include specific details. However, these technologies can be implemented without these specific details. In some instances, in order to avoid making the concepts of the described embodiments difficult to understand, well-known structures and devices are shown in block diagram form.

[0224] The above description of the present disclosure is provided to enable any person of ordinary skill in the art to implement or use the present disclosure. Various modifications to the present disclosure will be apparent to those of ordinary skill in the art, and the general principles corresponding to the present disclosure may be applied to other variations without departing from the scope of protection of the present disclosure. Therefore, the present disclosure is not limited to the examples and designs described herein, but is consistent with the widest range of principles and novel features disclosed herein.

Claims

1. A method for service deployment and sequence task offloading of cloud-edge-device collaborative computing, characterized in that: include: Obtain system parameters and task parameters, wherein the system parameters include the number, computing frequency, data transmission rate, and hardware type of terminals, edge servers, and cloud servers; the task parameters include the number, type, and upper limit of response time of Job requests issued by the terminals, the number of tasks included in the Job requests, the amount of computing resources, input data volume, and dependent services of the tasks, and the hardware requirements of the services; Based on the task parameters, all services that the task depends on are deployed in the cloud server to obtain an initial service deployment matrix; Based on the system parameters and the task parameters, the initial service deployment matrix is ​​iterated cyclically, and the service adjustment deployment node is traversed in each iteration to update the service deployment matrix in a direction of increasing system benefits, so as to obtain a target service deployment matrix; Traversing the tasks, acquiring the execution layer of the traversed target tasks based on the target service deployment matrix and task parameters, and obtaining the offloading hierarchical matrix of the Job request, wherein the execution layer includes a terminal layer, an edge layer, and a cloud layer; Based on the offloading hierarchical matrix, a task queue of the edge server is constructed, and the priorities of the tasks in the queue are calculated by a convex optimization algorithm to obtain a task edge layer offloading matrix.

2. The service deployment and sequence task offloading method according to claim 1, characterized in that: The step of traversing the service adjustment deployment nodes in each iteration to update the service deployment matrix in the direction of increasing system benefits to obtain the target service deployment matrix includes: In each iteration, the services are traversed, and the traversed target services are deployed one by one on nodes that meet their hardware requirements, and the system benefits are calculated, and the target services are deployed on the nodes with the largest system benefits; After all services are traversed, the updated service deployment matrix is ​​obtained, and the next iteration begins until the service deployment matrices obtained from two iterations are the same, and the target service deployment matrix is ​​obtained.

3. The service deployment and sequence task offloading method according to claim 2, characterized in that: The calculation method of the system benefit includes: Based on the current service deployment matrix and the task parameters, traverse the tasks, obtain the execution layer of the tasks, and obtain the current offloading layer matrix of the Job request; Based on the current unloading hierarchical matrix, a task queue of the edge server is constructed, and the priorities of the tasks in the queue are calculated by a convex optimization algorithm to obtain a current task edge layer unloading matrix; Calculating the execution time of the Job request based on the current offloading layer matrix and the current task edge layer offloading matrix; Calculate the system benefit based on the execution time of the Job request; Preferably, the step of calculating the system benefit based on the execution time of the Job request includes: Obtaining the benefit of the Job request based on the upper limit of the response time and the execution time of the Job request; Based on the benefits of all the Job requests, the system benefit is obtained.

4. The service deployment and sequence task offloading method according to claim 3, characterized in that: The step of calculating the execution time of the Job request based on the current offloading layer matrix and the current task edge layer offloading matrix comprises: Traversing the tasks in the target Job request in order, and acquiring the execution layer of the traversed target task based on the current offloading layer matrix; Based on the execution layer and preparation time of the target task, as well as the system parameters and task parameters, the completion time of the target task is obtained, wherein the preparation time is the completion time of a predecessor task of the target task, and the predecessor task is a task that is one step above the target task in the target Job request; After all tasks of the target Job request are traversed, the completion time of the last task in the target Job request is used as the execution time of the target Job request.

5. The service deployment and sequence task offloading method according to claim 4, characterized in that: The step of obtaining the completion time of the target task based on the execution layer and preparation time of the target task, as well as the system parameters and task parameters comprises: Obtaining the computing resource amount of the target task and the computing frequency of the node to which the target task is offloaded, and calculating the computing time of the target task; If the execution layer of the target task is the terminal layer, obtaining the completion time of the target task based on the calculation time and preparation time of the target task; and / or, If the execution layer of the target task is the edge layer, the completion time of the previous task of the target task in the task queue and the preparation time of the target task are obtained, and the waiting execution time of the target task is calculated; Determining whether the execution layer of the predecessor task is a terminal layer; If yes, obtain the computing resource amount of the target task and the data transmission rate of the local terminal, and calculate the wireless transmission time of the target task; Obtaining the transmission rates of the local edge server and the offloading edge server, as well as the computing resource amount of the target task, and calculating the edge layer transmission time of the target task; Obtaining the completion time of the target task based on the wireless transmission time, waiting execution time, edge layer transmission time and calculation time of the target task; and / or, If the execution layer of the target task is the cloud layer, determining whether the execution layer of the predecessor task is the terminal layer; If yes, obtain the computing resource amount of the target task and the data transmission rate of the local terminal, and calculate the wireless transmission time of the target task; Obtaining the transmission rates of the local edge server and the cloud server, as well as the computing resource amount of the target task, and calculating the cloud transmission time of the target task; Obtaining the completion time of the target task based on the preparation time, wireless transmission time, cloud transmission time and computing time of the target task; and / or, If the execution layers of the target task and the predecessor task are both edge layers, obtain the transmission rate between the target task and the offloading edge server of the predecessor task, as well as the computing resource amount of the target task, and calculate the edge layer transmission time of the target task; Obtaining the completion time of the target task based on the preparation time, waiting execution time, edge layer transmission time and calculation time of the target task; and / or, If the execution layer of the target task is the edge layer, and the execution layer of the predecessor task is the cloud layer, the transmission rate between the target task and the unloading edge server of the predecessor task, and the computing resource amount of the target task are obtained, and the edge layer transmission time of the target task is calculated; Obtaining the completion time of the target task based on the preparation time, waiting execution time and calculation time of the target task; and / or, If the execution layer of the target task is the cloud layer, and the execution layer of the predecessor task is the edge layer, the transmission rates of the offloading edge server and the cloud server of the predecessor task, and the computing resource amount of the target task are obtained, and the cloud transmission time of the target task is calculated; Obtaining the completion time of the target task based on the preparation time, cloud transmission time and calculation time of the target task; and / or, If the execution layers of the target task and the predecessor task are both cloud layers, the completion time of the target task is obtained based on the preparation time and calculation time of the target task.

6. The service deployment and sequence task offloading method according to claim 1, characterized in that: The step of traversing the tasks, acquiring the execution layer of the traversed target tasks based on the target service deployment matrix and task parameters, and obtaining the offloading hierarchical matrix of the Job request includes: Traversing the tasks requested by the Job, and for the traversed target tasks, determining whether the local terminal has deployed the services it depends on based on the target service deployment matrix and task parameters; If not, determine whether the edge server is deployed with the services it depends on; If not, the cloud layer is used as the execution layer of the target task; After the traversal is completed, the offloading hierarchical matrix of the Job request is obtained; and / or, If the local terminal is deployed with a service that the target task depends on, the terminal layer is used as the execution layer of the target task; and / or, If the local terminal is not deployed with the service required by the target task, the edge server is deployed with the service that the target task depends on, and the edge layer is used as the execution layer of the target task.

7. The service deployment and sequence task offloading method according to claim 1, characterized in that: The step of constructing a task queue of the edge server based on the offloading hierarchical matrix, and calculating the priority of the tasks in the queue by a convex optimization algorithm to obtain the task edge layer offloading matrix comprises: Build a task queue for edge servers where services are deployed; Based on the offloading hierarchical matrix, tasks whose execution layer is the edge layer are collected into a job-task pool; Calculate the marginal offloading slack variables of the tasks in the job-task pool based on a convex optimization algorithm; Poll to obtain the preparation time of tasks in the job-task pool, and collect the tasks that can obtain the preparation time into the job-task-advance pool, and collect the remaining tasks into the job-task-secondary pool. The preparation time is the completion time of the predecessor task of the task, and the predecessor task is the task that ranks one above the target task in the target Job request; Poll and calculate the idle time of all the task queues, and select the task queue with the shortest space time as the target task queue, where the idle time is the completion time of the last task in the task queue; Selecting a target task that depends on the service of the target task queue from the job-task-advance pool, and calculating the priority of the target task based on the waiting execution time of the target task, the type of the Job request to which it belongs, and the edge offloading slack variable; Unloading the target task with the highest priority into the target task queue, and updating the space time of the target task queue; After all tasks in the job-task pool are unloaded, the task edge layer unloading matrix is ​​obtained; Preferably, the step of calculating the marginal offloading slack variables of the tasks in the job-task pool based on the convex optimization algorithm comprises: The following constraints are constructed for the tasks in the job-task pool: the edge server to which the task is offloaded must deploy the service on which the task depends, the task can only be offloaded to one edge server, and the value range of the edge offloading slack variable of the task is 0 to 1; The above constraints are solved in the direction of minimizing the computation time of all tasks in the job-task pool to obtain the marginal offloading slack variables of the tasks in the job-task pool.

8. A service deployment and sequence task offloading device for cloud-edge-device collaborative computing, characterized in that: include: An acquisition module, used to acquire system parameters and task parameters, wherein the system parameters include the number, computing frequency, data transmission rate, and hardware type of terminals, edge servers, and cloud servers; the task parameters include the number, type, and upper limit of response time of Job requests issued by the terminals, the number of tasks included in the Job requests, the amount of computing resources, input data volume, and dependent services of the tasks, and the hardware requirements of the services; An initial deployment module, used to deploy all services that the task depends on in the cloud server based on the task parameters, to obtain an initial service deployment matrix; A loop iteration module, used for looping and iterating the initial service deployment matrix based on the system parameters and the task parameters, traversing the service adjustment deployment nodes in each iteration, so as to update the service deployment matrix in a direction of increasing system benefits, and obtain a target service deployment matrix; A traversal module, used to traverse the tasks, obtain the execution layer of the traversed target tasks based on the target service deployment matrix and task parameters, and obtain the offloading hierarchical matrix of the Job request, wherein the execution layer includes a terminal layer, an edge layer, and a cloud layer; The convex optimization module is used to construct a task queue of the edge server based on the offloading hierarchical matrix, and calculate the priority of the tasks in the queue through a convex optimization algorithm to obtain a task edge layer offloading matrix.

9. An electronic device, comprising: at least one processor; as well as A memory storing instructions, which, when executed by the at least one processor, enables the at least one processor to execute the service deployment and sequence task offloading method for cloud-edge-end collaborative computing as described in any one of claims 1 to 7.

10. A machine-readable storage medium storing executable instructions, which, when executed, enable the machine to execute the service deployment and sequence task offloading method for cloud-edge-end collaborative computing as described in any one of claims 1 to 7.