Task processing method, device, system and equipment for application program
By task partitioning and containerizing the application workflow, and deploying it according to the resource configuration strategy of the edge server, the problem of insufficient computing power of edge nodes and high communication overhead between containers is solved, achieving low communication overhead and high resource utilization. rate effect.
Patent Information
- Application Number
- CN202310361472.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-06
- Publication Date
- 2024-10-15
AI Technical Summary
The computing power of edge nodes is insufficient, and services such as cloud games and other real-time communication live broadcasts place higher requirements on latency. The communication overhead between containers in the existing technology is large and the resource utilization is unbalanced, which cannot meet actual needs.
By obtaining the workflow of the application, the tasks are partitioned and containerized according to the preset container configuration policy, and the task container is deployed to the edge server for processing according to the preset edge server configuration policy, optimizing the communication efficiency and resource utilization between containers, and reducing Communication costs and resource balancing costs.
It significantly reduces the communication cost between containers, balances the resource usage between servers, and achieves lower communication overhead and efficient and balanced resource utilization on the edge cloud system.
Smart Images

Figure CN118779059A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a method, device, system and equipment for processing a task of an application. Background Art
[0002] Edge computing refers to a computing model that uses an open platform that integrates network, computing, storage, and application core capabilities to provide the nearest service at the edge of the network. Its applications are initiated on the edge side, resulting in faster network service responses, meeting the basic needs of the industry in terms of real-time business, application intelligence, security, and privacy protection. Edge computing is between the physical entity and the industrial connection, or on top of the physical entity. Edge computing is computing provided close to the on-site application end. In essence, it can be regarded as an edge cloud, which is relative to traditional centralized cloud computing. Edge computing is also a logical abstraction of the basic common capabilities of various edge-side product forms such as edge gateways, edge controllers, and edge servers. These product forms have common capabilities such as real-time data analysis, local data storage, and real-time network connection on the edge side.
[0003] Containers are a virtualization technology that aims to create an "isolated environment" on edge computing platforms to limit and partition application resource usage and fine-grained scheduling of hardware resources. Container technology effectively virtualizes the operating system and is becoming increasingly popular in cloud computing. By encapsulating the runtime context of software components and services, containers significantly improve the portability and efficiency of cloud application deployment. Containers are essentially process-level resource isolation, with low startup time, high resource utilization, and small footprint.
[0004] Container scheduling allocates resources according to demand so that cluster resources are used efficiently.
[0005] Currently, edge nodes lack computing power, and services such as cloud gaming and other real-time communication and live broadcasting have put forward higher requirements on latency. In existing technologies, communication overhead between containers is large, resource utilization is unbalanced, and actual needs cannot be met. Summary of the invention
[0006] The present invention provides a task processing method, device, system and equipment for an application program, which can reduce the communication cost between containers and balance the resource usage between servers.
[0007] In order to solve the above technical problems, the technical solution of the present invention is as follows:
[0008] An embodiment of the present invention provides a task processing method of an application program, comprising:
[0009] Acquire a workflow of an application, wherein the workflow includes a plurality of tasks related to each other;
[0010] Partition and containerize multiple tasks in the workflow according to a preset container configuration strategy to obtain multiple task containers;
[0011] According to a preset edge server configuration strategy, the multiple task containers are deployed to the edge server for processing, wherein a system overhead of deploying the multiple task containers to the edge server for processing is less than a preset value.
[0012] Optionally, according to a preset container configuration strategy, multiple tasks in the workflow are partitioned and containerized to obtain multiple task containers, including:
[0013] According to a preset container configuration strategy, multiple tasks in the workflow are divided into C task partitions;
[0014] According to the C task partitions, C task containers are obtained; wherein each of the task partitions corresponds to a container, and C is a positive integer.
[0015] Optionally, multiple tasks in the workflow are divided into C task partitions, including:
[0016] Determine a directed acyclic graph of the multiple tasks according to the topological relationship between the multiple tasks in the workflow;
[0017] Determining C key tasks on a critical path of the directed acyclic graph;
[0018] Initialize each of the C key tasks as a task partition to obtain C initialized task partitions;
[0019] The remaining tasks of the multiple tasks except the C key tasks are placed in the initialization task partition according to the topological relationship with the key tasks, until all tasks are placed in the initialization task partition, thereby obtaining C task partitions.
[0020] Optionally, multiple tasks in the workflow are divided into C task partitions, including:
[0021] Randomly selecting C target tasks from multiple tasks in the workflow;
[0022] Initialize each of the C target tasks as a task partition to obtain C initialized task partitions;
[0023] The remaining tasks of the multiple tasks except the C target tasks are respectively placed in the initialization task partitions until all tasks are placed in the task partitions, thereby obtaining C task partitions.
[0024] Optionally, according to a preset edge server configuration strategy, deploying the multiple task containers to an edge server for processing includes:
[0025] According to the edge server cluster S and computing resources R in the preset edge server configuration strategy, the multiple task containers are deployed to the edge server for processing. Optionally, according to the edge server cluster S and computing resources R in the preset edge server configuration strategy, the multiple task containers are deployed to the edge server for processing, including:
[0026] According to the matching degree between the resources required by the multiple task containers and the resources that the edge server can provide, and in accordance with the edge server cluster S and computing resources R in the preset edge server configuration strategy, the multiple task containers are deployed to the edge server for processing.
[0027] Optionally, the matching degree between the resources required by the multiple task containers and the resources that can be provided by the edge server is:
[0028] Among them, s i For edge server cluster S = {s1, s2, ..., s S}, the i-th edge server, r k For computing resources R = {r1, r2, ..., r R}, For edge servers i Chinese Resources k Capacity;
[0029] The task container set C = {c1, c2, ..., c C} in container c j For resources k needs;
[0030] vector For task t i the need for resources;
[0031] Matrix D = [d ij ] T×C For task distribution:
[0032]
[0033] Matrix M = [m ij ] C×S For task distribution:
[0034]
[0035] Optionally, according to the edge server cluster S and computing resources R in the preset edge server configuration strategy, the multiple task containers are deployed to the edge server for processing, including:
[0036] sorting the multiple task containers according to the descending order of resources required by the multiple task containers;
[0037] According to the sequence of the sorted multiple task containers, the edge server cluster S is traversed in sequence, and the task container is placed on the first edge server that can meet the requirements for processing.
[0038] 9. The task processing method of an application according to claim 1, wherein the preset value is: min D,M μCC OH (D,M)+μ B B tot (D,M);
[0039] Among them, C OH (D,M) is the communication cost overhead of the edge server;
[0040] B tot (D,M) is the resource balancing cost overhead of the edge server;
[0041] μ C is the first weight coefficient, μ B is the second weight coefficient.
[0042] An embodiment of the present invention further provides a task processing device for an application program, comprising:
[0043] An acquisition module, used for acquiring a workflow of an application, wherein the workflow includes a plurality of tasks related to each other;
[0044] A first processing module is used to partition and containerize multiple tasks in the workflow according to a preset container configuration strategy to obtain multiple task containers;
[0045] The second processing module is used to deploy the multiple task containers to the edge server for processing according to the preset edge server configuration strategy; wherein the system overhead of deploying the multiple task containers to the edge server for processing is less than a preset value.
[0046] An embodiment of the present invention further provides a task processing system for an application program, comprising:
[0047] Multiple edge servers;
[0048] A base station connected to the plurality of edge servers; and
[0049] a task processing device for an application program in communication with the plurality of edge servers and the base station;
[0050] The base station receives the application sent by the client and sends it to the task processing device of the application;
[0051] The task processing device of the application obtains a workflow of the application, wherein the workflow includes a plurality of tasks that are interrelated with each other; partitions and containerizes the plurality of tasks in the workflow according to a preset container configuration strategy to obtain a plurality of task containers; and deploys the plurality of task containers to an edge server for processing according to a preset edge server configuration strategy to obtain processing results; wherein a system overhead of deploying the plurality of task containers to the edge server for processing is less than a preset value;
[0052] The base station returns the processing result of the edge server to the client.
[0053] An embodiment of the present invention further provides a communication device, comprising: a processor and a memory storing a computer program, wherein when the computer program is executed by the processor, the steps of the task processing method of the application program described above are executed.
[0054] An embodiment of the present invention further provides a computer-readable storage medium storing instructions, which, when executed on a computer, enable the computer to execute the steps of the task processing method of the application program as described above.
[0055] The above solution of the present invention includes at least the following beneficial effects:
[0056] The solution of the present invention partitions and containerizes the tasks of the workflow according to a preset container configuration strategy; determines a scheduling scheme for placing instantiated containers according to a preset edge server configuration strategy. The efficiency of communication between containers is lower than that of communication within a container. Frequently communicating tasks are divided into one task container, which can reduce data transmission between different containers and significantly reduce the communication cost between containers. At the same time, the instantiated container is placed in the server, and the optimal container placement position is found by matching the resources required by the container with the resources that the server can provide, thereby balancing the resource utilization of the server and balancing the resource usage between servers. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 is a flow chart of a task processing method of an application program provided by an embodiment of the present invention;
[0058] Figure 2 is a schematic diagram of the task processing system architecture of an application provided by an embodiment of the present invention;
[0059] Figure 3is a specific implementation flow chart of the task processing method of the application provided by the embodiment of the present invention;
[0060] Figure 4 is a schematic diagram of the module structure of a task processing device for an application program provided by an embodiment of the present invention;
[0061] Figure 5 It is a structural block diagram of a communication device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0062] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.
[0063] like Figure 1 As shown, an embodiment of the present invention provides a task processing method of an application program, comprising:
[0064] Step 11, obtaining a workflow of the application, wherein the workflow includes a plurality of tasks related to each other;
[0065] Step 12, partitioning and containerizing multiple tasks in the workflow according to a preset container configuration strategy to obtain multiple task containers;
[0066] Step 13: deploy the multiple task containers to the edge server for processing according to the preset edge server configuration strategy; wherein the system overhead of deploying the multiple task containers to the edge server for processing is less than a preset value.
[0067] In this embodiment of the present invention, the tasks of the workflow are partitioned and containerized according to a preset container configuration strategy; a scheduling scheme for placing instantiated containers is determined according to a preset edge server configuration strategy. The efficiency of communication between containers is lower than that of communication within a container. Frequently communicating tasks are divided into one task container, which can reduce data transmission between different containers and significantly reduce the communication cost between containers. At the same time, the instantiated container is placed in the server, and the optimal container placement location is found by matching the resources required by the container with the resources that the server can provide, thereby balancing the resource utilization of the server and the resource usage between servers, thereby achieving lower communication overhead and efficient and balanced resource utilization on the edge cloud system.
[0068] like Figure 2As shown in the figure, the task processing system of the application includes: user client, edge server and base station. The user client can be any device connected to the edge computing system, including but not limited to computers, mobile phones, smart tablets, etc. The edge server is a server deployed at the edge, including but not limited to computing servers, storage servers, etc. The services of the edge computing platform are mainly provided by the edge server, and the user client communicates and interacts with the edge server through the base station.
[0069] In edge cloud systems, there are two main costs, namely communication cost and resource balancing cost. The communication cost of edge cloud systems comes from communication between containers. The communication cost is measured by the amount of communication data or the number of communications between servers. The larger the amount of communication data between servers or the more times of communication, the greater the communication cost of the edge cloud system, the longer the user waits for the application running results, and the worse the user experience. Resource balancing cost refers to the waste of resources caused by the unbalanced use of various resources (such as CPU, memory, hard disk, etc.) on the server. Therefore, the problem of optimizing the edge cloud system is transformed into the problem of minimizing the weighted sum of communication cost and resource balancing cost, which is recorded as the MP problem. The MP problem has two main optimization objectives: 1) Minimize the communication cost, that is, minimize the amount of communication data and the number of communications between servers. 2) Minimize the resource balancing cost, that is, maximize the overall resource utilization of the edge server cluster.
[0070] In order to design the most appropriate allocation strategy, in edge computing systems, the edge node cluster is usually a collection of servers. The edge node consists of an edge server cluster S = {s1, s2, ..., s S}, where S = |S| is the number of edge servers.
[0071] In the entire cloud service process, resources are composed of computing resources R = {r1, r2, …, r R} means, where r1, r2, …, r R They represent different resources, such as CPU, memory, disk storage, and bandwidth.
[0072] For edge servers i ∈S, Indicates resource r k The capacity of k ∈R.
[0073] Consider an application consisting of multiple interrelated tasks, where the application consists of T = {t1, t2, …, t T}, and the number of tasks is represented by T=|T|.
[0074] In an optional embodiment of the present invention, step 12 may include:
[0075] According to a preset container configuration strategy, multiple tasks in the workflow are divided into C task partitions;
[0076] According to the C task partitions, C task containers are obtained; wherein each of the task partitions corresponds to a container, and C is a positive integer.
[0077] here, The task container set C = {c1, c2, ..., c C} in container c j For resources k needs;
[0078] vector For task t i the need for resources;
[0079] Matrix D = [d ij ] T×C For task distribution:
[0080]
[0081] In an optional embodiment of the present invention, according to a preset container configuration strategy, multiple tasks in the workflow are divided into C task partitions, which may include:
[0082] Determine a directed acyclic graph of the multiple tasks according to the topological relationship between the multiple tasks in the workflow;
[0083] Determining C key tasks on a critical path of the directed acyclic graph;
[0084] Initialize each of the C key tasks as a task partition to obtain C initialized task partitions;
[0085] The remaining tasks of the multiple tasks except the C key tasks are placed in the initialization task partition according to the topological relationship with the key tasks, until all tasks are placed in the initialization task partition, thereby obtaining C task partitions.
[0086] In this embodiment, in the task containerization stage, the tasks split from the application are topologically sorted, and the execution order of the tasks is determined. Then, the critical path algorithm is used to find the critical path of the directed acyclic graph, that is, the critical tasks in a set of tasks of the application. These critical tasks determine the shortest time to complete the entire application. In order to ensure that the container has a certain timing, the number of critical tasks is selected from the total number of partitions, each critical task is initialized as a partition, and the remaining tasks are placed in the corresponding initialized task partitions according to the topological relationship with the critical tasks, until all tasks are placed in the corresponding task partitions, each task partition corresponds to a container, and C task containers are obtained; in this way, tasks that communicate frequently can be divided into a partition and then containerized, which can reduce data transmission between different containers, thereby reducing communication time.
[0087] In an optional embodiment of the present invention, according to a preset container configuration strategy, multiple tasks in the workflow are divided into C task partitions, which may include:
[0088] Randomly selecting C target tasks from multiple tasks in the workflow;
[0089] Initialize each of the C target tasks as a task partition to obtain C initialized task partitions;
[0090] The remaining tasks of the multiple tasks except the C target tasks are respectively placed in the initialization task partitions until all tasks are placed in the task partitions, thereby obtaining C task partitions.
[0091] In this embodiment, tasks in the workflow are randomly selected, and the total number of selected tasks is used as the total number of partitions. Each task is initialized as a partition, and the remaining tasks are placed in the corresponding initialized task partitions until all tasks are placed in the corresponding task partitions. Each task partition corresponds to a container, and C task containers are obtained. In this embodiment, tasks that communicate frequently are also divided into a partition and then containerized, which can reduce data transmission between different containers, thereby reducing communication time.
[0092] In an optional embodiment of the present invention, step 13 may include:
[0093] According to the edge server cluster S and computing resources R in the preset edge server configuration strategy, the multiple task containers are deployed to the edge server for processing.
[0094] Here, the edge server cluster S formed by S edge servers is S = {s1, s2, ..., s S}, Edge Servers i ∈S; Indicates resource r in computing resource R k Capacity;
[0095] Place task container c i The edge server is denoted as S(c i );
[0096] Matrix M = [m ij ] C×S For task distribution:
[0097]
[0098] In an optional embodiment of the present invention, according to the edge server cluster S and computing resources R in the preset edge server configuration strategy, deploying the multiple task containers to the edge server for processing may include:
[0099] According to the matching degree between the resources required by the multiple task containers and the resources that the edge server can provide, and in accordance with the edge server cluster S and computing resources R in the preset edge server configuration strategy, the multiple task containers are deployed to the edge server for processing.
[0100] Specifically, according to the matching degree between the resources required by the multiple task containers and the resources that can be provided by the edge server: Deploy the multiple task containers to the edge server for processing; wherein, It is the dot product of the resources required by the task container and the resources available from the edge server.
[0101] In this embodiment, the requirements of the container and the resource capacity of the server are considered. If the servers have enough resources to place the container, they will be listed as candidate servers for the container. For each container and one of its candidate servers, the dot product of the resources required by the container and the resources that the server can provide is expressed as The larger the dot product, the more resources the server can provide to the container. In order to improve resource utilization, the container is placed on the server with the largest amount of resources, so the matching degree is defined as For non-candidate servers, the matching degree is set to 0.
[0102] Optionally, the matching degree between the resources required by the multiple task containers and the resources that can be provided by the edge server is:
[0103] in, For computing resources R = {r1, r2, ..., r R Resources k Capacity, s iFor edge server cluster S = {s1, s2, ..., s S} the i-th edge server in;
[0104] The task container set C = {c1, c2, ..., c C} in container c j For resources k needs;
[0105] vector For task t i the need for resources;
[0106] Matrix D = [d ij ] T×C For task distribution:
[0107]
[0108] Matrix M = [m ij ] C×S For task distribution:
[0109]
[0110] In an optional embodiment of the present invention, according to the edge server cluster S and computing resources R in the preset edge server configuration strategy, deploying the multiple task containers to the edge server for processing may include:
[0111] sorting the multiple task containers according to the descending order of resources required by the multiple task containers;
[0112] According to the sequence of the sorted multiple task containers, the edge server cluster S is traversed in sequence, and the task container is placed on the first edge server that can meet the requirements for processing.
[0113] This embodiment takes into account the needs of the containers. The containers are sorted in descending order according to the resources they require. Since the resources required by each container are multidimensional, the dimension definition in the multidimensional case determines the order in which the containers are placed. Applications have different resource requirements, and the resource type most required by the application is used as the basis for sorting. Therefore, the containers are sorted in descending order according to the size of the most required resource type, traversing the servers and placing the container on the first server that can meet its requirements.
[0114] In the above embodiment of the present invention, the preset value is: min D,M μ C C OH (D,M)+μ B B tot (D,M);
[0115] Among them, min is the minimum value;
[0116] Typically, the life cycle of a task consists of three stages: receiving data, running the algorithm, and sending output data. For example, task t i First, it receives the data and stores it in memory. It runs the algorithm after getting all the input information. When the run is completed, task t i Send output data to related tasks, the transmission time is τ ti .
[0117] The matrix E = [e ij ] T×T For the task dependency matrix:
[0118]
[0119] Matrix F = [f ij ] C×C For the container dependency matrix:
[0120]
[0121] Matrix G = [g ij ] S×S Dependency matrix for the server:
[0122]
[0123] C OH (D,M) is the communication cost of the edge server: B tot (D,M) is the resource balancing cost of the edge server:
[0124] is the average utilization of all resources;
[0125] Indicates resource r in computing resource R k Utilization rate:
[0126] For computing resources R = {r1, r2, ..., r R Resources k Capacity, s i For edge server cluster S = {s1, s2, ..., s S} the i-th edge server in;
[0127] For each edge server s i , the edge server s i Resources used onk These are the resources required by the corresponding container, specifically:
[0128] Matrix M = [m ij ] C×S Indicates the placement distribution of containers:
[0129]
[0130] The task container set C = {c1, c2, ..., c C} in container c j For resources k needs;
[0131] vector For task t i the need for resources;
[0132] Matrix D = [d ij ] T×C For task distribution:
[0133]
[0134] μ C is the first weight coefficient, μ B is the second weight coefficient. It can be set according to actual conditions;
[0135]
[0136] In this embodiment, the communication overhead of the edge cloud system comes from the communication between containers. The communication cost is expressed as the amount of data or the number of communications between servers. It is assumed that when two containers are located on one server, the communication cost is negligible. Then the communication cost overhead of the edge computing cloud is:
[0137]
[0138] Resource balancing cost: Resource waste comes from the unbalanced use of various resources on the server. i , resources used on the server k These are the resources required by the container:
[0139]
[0140] Therefore, on the server i superior, Indicates resource r k utilization rate.
[0141] Select Resource b Utilization rate As a standard, resource utilization and The ratio reflects the k and r b Differences in utilization between
[0142] Let B tot (D,M) represents the overall resource balancing cost of the edge platform:
[0143]
[0144] in, is the average utilization of all resources.
[0145] Therefore, the optimization objective is formulated as a weighted sum minimization problem:
[0146] MP: min D,M μ C C OH (D,M)+μ B B tot (D,M)
[0147] stD∈{0,1} T×C ,
[0148] M∈{0,1} C×S
[0149]
[0150]
[0151]
[0152] like Figure 3 As shown, it is a specific implementation flow chart of the above method of the present invention, which specifically includes:
[0153] The user accesses the service platform deployed on the edge server and runs the application. The system determines whether the application can be converted into a workflow. If the application can be converted into a workflow, the second step of partitioning begins. Otherwise, the system prompts the user that the application input does not meet the requirements.
[0154] The tasks in the workflow are partitioned according to the method in the above embodiment, and each zone is containerized into a container.
[0155] These containers will be deployed to the edge server cluster according to the method described in the above embodiment.
[0156] The workflow runs in the edge server cluster, and the execution results of the workflow are returned to the user from the edge server cluster.
[0157] In the above embodiment of the present invention, the application tasks are first divided. Since the efficiency of inter-container communication is lower than that of intra-container communication, tasks that frequently communicate are grouped into one group and then containerized. This can reduce data transmission between different containers, thereby reducing communication time.
[0158] When dividing tasks, we also consider the resource requirements of the tasks and try to make the resource requirements of each group of tasks similar. Secondly, we place the instantiated container on the server and find the optimal container placement by matching the resources required by the container with the resources that the server can provide, so as to balance the resource utilization of the server;
[0159] A method for modeling application workflows is provided for highly interdependent tasks, and a mathematical model of application workflows is proposed to reflect the interactions between tasks, the transmission time of inter-container communication, and the computing resources required for each task. Based on the mathematical model, a grouping algorithm is used to group frequently communicating tasks into containers to minimize data transmission between different containers. When splitting applications, the resource requirements of tasks are considered at the same time to achieve a balance of requirements for each container, ensuring that the resource requirements of each task group are as similar as possible.
[0160] like Figure 4 As shown, an embodiment of the present invention further provides a task processing device 40 for an application program, comprising:
[0161] An acquisition module 41 is used to acquire a workflow of an application program, wherein the workflow includes a plurality of tasks related to each other;
[0162] A first processing module 42 is used to partition and containerize multiple tasks in the workflow according to a preset container configuration strategy to obtain multiple task containers;
[0163] The second processing module 43 is used to deploy the multiple task containers to the edge server for processing according to the preset edge server configuration strategy; wherein the system overhead of deploying the multiple task containers to the edge server for processing is less than a preset value.
[0164] Optionally, the first processing module 42 includes:
[0165] A partitioning unit, used to divide the multiple tasks in the workflow into C task partitions according to a preset container configuration strategy;
[0166] The first processing unit is used to obtain C task containers according to the C task partitions; wherein each of the task partitions corresponds to a container, and C is a positive integer.
[0167] Optionally, the division unit is specifically used for:
[0168] Determine a directed acyclic graph of the multiple tasks according to the topological relationship between the multiple tasks in the workflow;
[0169] Determining C key tasks on a critical path of the directed acyclic graph;
[0170] Initialize each of the C key tasks as a task partition to obtain C initialized task partitions;
[0171] The remaining tasks of the multiple tasks except the C key tasks are placed in the initialization task partition according to the topological relationship with the key tasks, until all tasks are placed in the initialization task partition, thereby obtaining C task partitions.
[0172] Optionally, the division unit is specifically used for:
[0173] Randomly selecting C target tasks from multiple tasks in the workflow;
[0174] Initialize each of the C target tasks as a task partition to obtain C initialized task partitions;
[0175] The remaining tasks of the multiple tasks except the C target tasks are respectively placed in the initialization task partitions until all tasks are placed in the task partitions, thereby obtaining C task partitions.
[0176] Optionally, the second processing module 43 includes:
[0177] The second processing unit is used to deploy the multiple task containers to the edge server for processing according to the edge server cluster S and the computing resources R in the preset edge server configuration strategy.
[0178] Optionally, the second processing unit is specifically configured to:
[0179] According to the matching degree between the resources required by the multiple task containers and the resources that the edge server can provide, and in accordance with the edge server cluster S and computing resources R in the preset edge server configuration strategy, the multiple task containers are deployed to the edge server for processing.
[0180] Optionally, the degree of matching between the resources required by the multiple task containers and the resources that can be provided by the edge server is:
[0181] in, For computing resources R = {r1, r2, ..., r R Resources k Capacity, s i For edge server cluster S = {s1, s2, ..., sS} the i-th edge server in;
[0182] Task container set C = {c1, c2, ..., c C}, container c j For computing resources R = {r1, r2, ..., r R} in the resource k The demand is:
[0183]
[0184] Among them, the vector Represents task t i the need for resources;
[0185] Matrix D = [d ij ] T×C For task distribution:
[0186]
[0187] Matrix M = [m ij ] C×S For task distribution:
[0188]
[0189] Optionally, the second processing unit is specifically configured to:
[0190] sorting the multiple task containers according to the descending order of resources required by the multiple task containers;
[0191] According to the sequence of the sorted multiple task containers, the edge server cluster S is traversed in sequence, and the task container is placed on the first edge server that can meet the requirements for processing.
[0192] Optionally, the preset value is: min D,M μ C C OH (D,M)+μ B B tot (D,M);
[0193] Among them, C OH (D,M) is the communication cost overhead of the edge server;
[0194] B tot (D,M) is the resource balancing cost overhead of the edge server;
[0195] μ C is the first weight coefficient, μ B is the second weight coefficient.
[0196] It should be noted that the device is a device corresponding to the above method, and all implementation methods in the above method embodiment are applicable to this embodiment and can achieve the same technical effect.
[0197] If you continue to see Figure 2 , an embodiment of the present invention further provides a task processing system for an application, comprising:
[0198] Multiple edge servers;
[0199] A base station connected to the plurality of edge servers; and
[0200] a task processing device for an application program in communication with the plurality of edge servers and the base station;
[0201] The base station receives the application sent by the client and sends it to the task processing device of the application;
[0202] The task processing device of the application obtains a workflow of the application, wherein the workflow includes a plurality of tasks that are interrelated with each other; partitions and containerizes the plurality of tasks in the workflow according to a preset container configuration strategy to obtain a plurality of task containers; and deploys the plurality of task containers to an edge server for processing according to a preset edge server configuration strategy to obtain processing results; wherein a system overhead of deploying the plurality of task containers to the edge server for processing is less than a preset value;
[0203] The base station returns the processing result of the edge server to the client.
[0204] All implementations in the above method embodiments are applicable to this embodiment and can achieve the same technical effects.
[0205] like Figure 5 As shown, an embodiment of the present invention also provides a communication device, including a transceiver 510, a processor 500, a memory 520, and a program or instruction stored in the memory 520 and executable on the processor 500; when the processor 500 executes the program or instruction, the steps of the task processing method of the above-mentioned application are implemented, and all implementation methods in the above-mentioned method embodiment are applicable to this embodiment and can achieve the same technical effect.
[0206] The transceiver 510 is used to receive and send data under the control of the processor 500 .
[0207] Among them, Figure 5In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically linking various circuits of one or more processors represented by processor 500 and memory represented by memory 520. The bus architecture may also link various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface. The transceiver 510 may be a plurality of components, i.e., including a transmitter and a receiver, providing a unit for communicating with various other devices on a transmission medium. The processor 500 is responsible for managing the bus architecture and general processing, and the memory 520 may store data used by the processor 500 when performing operations.
[0208] An embodiment of the present invention also provides a computer-readable storage medium that stores instructions. When the instructions are executed on a computer, the computer executes the steps of the task processing method of the application as described above. All implementation methods in the above method embodiments are applicable to this embodiment and can achieve the same technical effect.
[0209] The processor is a processor in the communication device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0210] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0211] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0212] In the embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0213] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0214] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0215] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical disks.
[0216] In addition, it should be noted that in the apparatus and method of the present invention, it is obvious that each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present invention. Moreover, the steps of performing the above-mentioned series of processing can naturally be performed in chronological order according to the order of description, but it is not necessary to perform them in chronological order, and some steps can be performed in parallel or independently of each other. For those of ordinary skill in the art, it is understood that all or any steps or components of the method and apparatus of the present invention can be implemented in any computing device (including processors, storage media, etc.) or a network of computing devices in hardware, firmware, software or a combination thereof, which can be achieved by those of ordinary skill in the art using their basic programming skills after reading the description of the present invention.
[0217] Therefore, the purpose of the present invention can also be achieved by running a program or a group of programs on any computing device. The computing device can be a well-known general device. Therefore, the purpose of the present invention can also be achieved by simply providing a program product containing a program code that implements the method or device. That is to say, such a program product also constitutes the present invention, and the storage medium storing such a program product also constitutes the present invention. Obviously, the storage medium can be any well-known storage medium or any storage medium developed in the future. It should also be pointed out that in the device and method of the present invention, it is obvious that each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present invention. In addition, the steps of performing the above-mentioned series of processing can naturally be performed in chronological order according to the order of description, but it is not necessary to perform them in chronological order. Some steps can be performed in parallel or independently of each other.
[0218] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A task processing method for an application, characterized in that: include: Acquire a workflow of an application, wherein the workflow includes a plurality of tasks related to each other; Partition and containerize multiple tasks in the workflow according to a preset container configuration strategy to obtain multiple task containers; According to a preset edge server configuration strategy, the multiple task containers are deployed to the edge server for processing; wherein the system overhead of deploying the multiple task containers to the edge server for processing is less than a preset value.
2. The task processing method of the application according to claim 1, characterized in that: According to the preset container configuration strategy, multiple tasks in the workflow are partitioned and containerized to obtain multiple task containers, including: According to a preset container configuration strategy, multiple tasks in the workflow are divided into C task partitions; According to the C task partitions, C task containers are obtained; wherein each of the task partitions corresponds to a container, and C is a positive integer.
3. The task processing method of the application according to claim 2, characterized in that: The multiple tasks in the workflow are divided into C task partitions, including: Determine a directed acyclic graph of the multiple tasks according to the topological relationship between the multiple tasks in the workflow; Determining C key tasks on a critical path of the directed acyclic graph; Initialize each of the C key tasks as a task partition to obtain C initialized task partitions; The remaining tasks of the multiple tasks except the C key tasks are placed in the initialization task partition according to the topological relationship with the key tasks, until all tasks are placed in the initialization task partition, thereby obtaining C task partitions.
4. The task processing method of an application according to claim 2, characterized in that: The multiple tasks in the workflow are divided into C task partitions, including: Randomly selecting C target tasks from multiple tasks in the workflow; Initialize each of the C target tasks as a task partition to obtain C initialized task partitions; The remaining tasks of the multiple tasks except the C target tasks are respectively placed in the initialization task partitions until all tasks are placed in the task partitions, thereby obtaining C task partitions.
5. The task processing method of an application according to claim 1, characterized in that: According to the preset edge server configuration strategy, the multiple task containers are deployed to the edge server for processing, including: According to the edge server cluster S and computing resources R in the preset edge server configuration strategy, the multiple task containers are deployed to the edge server for processing.
6. The task processing method of the application according to claim 5, characterized in that: According to the edge server cluster S and computing resources R in the preset edge server configuration strategy, the multiple task containers are deployed to the edge server for processing, including: According to the matching degree between the resources required by the multiple task containers and the resources that the edge server can provide, and in accordance with the edge server cluster S and computing resources R in the preset edge server configuration strategy, the multiple task containers are deployed to the edge server for processing.
7. The task processing method of an application according to claim 6, characterized in that: The matching degree between the resources required by the multiple task containers and the resources that can be provided by the edge server is: Among them, s i For edge server cluster S = {s1, s2, ..., s S }, the i-th edge server, r k For computing resources R = {r1, r2, ..., r R }, For edge servers i Chinese Resources k Capacity; The task container set C = {c1, c2, ..., c C } in container c j For resources k needs; vector For task t i the need for resources; Matrix D = [d ij ] T×C For task distribution: Matrix M = [m ij ] C×S For task distribution:
8. The task processing method of an application according to claim 5, characterized in that: According to the edge server cluster S and computing resources R in the preset edge server configuration strategy, the multiple task containers are deployed to the edge server for processing, including: sorting the multiple task containers according to the descending order of resources required by the multiple task containers; According to the sequence of the sorted multiple task containers, the edge server cluster S is traversed in sequence, and the task container is placed on the first edge server that can meet the requirements for processing.
9. The task processing method of an application according to claim 1, characterized in that: The preset value is: min D,M μ C C OH (D,M)+μ B B tot (D,M); Among them, C OH (D,M) is the communication cost overhead of the edge server; B tot (D,M) is the resource balancing cost overhead of the edge server; μ C is the first weight coefficient, μ B is the second weight coefficient.
10. A task processing device for an application, characterized in that: include: An acquisition module, used for acquiring a workflow of an application, wherein the workflow includes a plurality of tasks related to each other; A first processing module is used to partition and containerize multiple tasks in the workflow according to a preset container configuration strategy to obtain multiple task containers; The second processing module is used to deploy the multiple task containers to the edge server for processing according to the preset edge server configuration strategy; wherein the system overhead of deploying the multiple task containers to the edge server for processing is less than a preset value.
11. A task processing system for an application, characterized in that: include: Multiple edge servers; a base station connected to the plurality of edge servers; as well as a task processing device for an application program in communication with the plurality of edge servers and the base station; The base station receives the application sent by the client and sends it to the task processing device of the application; The task processing device of the application obtains the workflow of the application; partitions and containerizes multiple tasks in the workflow according to a preset container configuration strategy to obtain multiple task containers; According to a preset edge server configuration strategy, the multiple task containers are deployed to the edge server for processing to obtain processing results; wherein the workflow includes multiple tasks that are related to each other; The base station returns the processing result of the edge server to the client.
12. A communication device, characterized in that: include: A processor and a memory storing a computer program, wherein when the computer program is executed by the processor, the method according to any one of claims 1 to 9 is performed.
13. A computer-readable storage medium, characterized in that: Instructions are stored, and when the instructions are executed on a computer, the computer is caused to execute the method according to any one of claims 1 to 9.
