Multi-task-oriented edge computing resource allocation method and device, equipment and medium
By constructing a network flow diagram and using the shortest-circuit fast algorithm to optimize the task execution strategy, the problem of failure to effectively guarantee delay-sensitive tasks in the existing technology is solved, and the resource utilization rate is improved and task execution time is reduced.
Patent Information
- Application Number
- CN202510679447.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-26
- Publication Date
- 2025-07-29
AI Technical Summary
The existing mobile edge computing resource allocation technology fails to fully consider the differences in the delay requirements of different services, making it difficult to effectively ensure the timeliness requirements of critical tasks under limited computing resources.
A network flow diagram with subchannels as the first type of nodes and user terminals as the second type of nodes is constructed, a composite cost calculation formula for transmission and calculation delay is designed, and a task execution strategy with the smallest total cost is dynamically searched using the shortest-circuit fast algorithm, and local execution is selected or offloaded to the target MEC server through the specified subchannel.
It significantly improves resource utilization in multiple business scenarios, reduces the overall task execution time, and the dynamic adjustment mechanism can respond to network status changes in real time, ensuring priority processing of high-delay sensitive tasks.
Smart Images

Figure CN120390259A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular, to a method, device, equipment and medium for multi-task oriented edge computing resource allocation. Background Art
[0002] With the rapid popularization of mobile intelligent terminals and the sharp increase in the user scale, higher demands are placed on network resources and computing capabilities. Although mobile edge computing can significantly improve network performance and response speed, with the continuous increase in data volume, how to efficiently utilize network channel resources and computing resources has become crucial.
[0003] When the existing mobile edge computing resource allocation technology matches channel resources with user terminals, it usually adopts simple matching strategies based on distance priority or latency optimization. The distance priority strategy matches user terminals to the nearest edge server, and the latency optimization strategy selects the channel with the minimum current transmission latency to improve the task completion rate.
[0004] The inventors found in the process of implementing the present invention that: the existing technology mainly focuses on minimizing the overall task latency overhead and fails to fully consider the differences in latency requirements for different services, resulting in difficulty in effectively guaranteeing the timeliness requirements of critical tasks under limited computing resources. Summary of the Invention
[0005] Embodiments of the present invention provide a method, device, equipment and medium for multi-task oriented edge computing resource allocation, which can significantly improve the resource utilization efficiency in multi-service scenarios.
[0006] According to one aspect of the embodiments of the present invention, there is provided a method for multi-task oriented edge computing resource allocation, the method including:
[0007] Obtain a set of user terminals, a set of MEC (Multi-Access Edge Computing) servers, a set of tasks to be calculated for each user terminal, and a set of sub-channels for each MEC server that match the edge computing network to be optimized;
[0008] According to the set of user terminals and the set of sub-channels of each MEC server, construct a network flow graph with each sub-channel as the first type of node, each user terminal as the second type of node, and the connection between the first type of node and the second type of node as the edge;
[0009] Construct a cost calculation formula corresponding to the edges in the network flow graph, where the cost calculation formula includes a transmission delay cost calculation sub-formula for transmitting all the tasks to be calculated of a set user terminal to a set MEC server through a set sub-channel, and a server calculation delay cost calculation sub-formula for offloading all the tasks to be calculated of the set user terminal to the set MEC server;
[0010] According to the calculation data volume of each task to be calculated, the number of computing resource cycles required for the calculation, the task delay requirement, and the total computing resources of each MEC server, the shortest path fast algorithm is used to dynamically search for the task execution strategy with the minimum total cost in the network flow graph with the cost calculation formula of the edges attached;
[0011] According to the task execution strategy, select to perform the calculation of each task to be calculated of each user terminal locally on the user terminal, or unload it to a specified MEC server through a specified sub-channel for calculation.
[0012] According to another aspect of the embodiments of the present invention, a multi-task oriented edge computing resource allocation device is provided, and the device includes:
[0013] A resource acquisition module, configured to acquire a user terminal set, an MEC server set, a set of tasks to be calculated for each user terminal, and a set of sub-channels for each MEC server that match the edge computing network to be optimized;
[0014] A network flow graph construction module, configured to construct a network flow graph with each sub-channel as the first type of node, each user terminal as the second type of node, and the connection between the first type of node and the second type of node as the edge according to the user terminal set and the set of sub-channels of each MEC server;
[0015] A cost calculation module, configured to construct a cost calculation formula corresponding to the edges in the network flow graph, where the cost calculation formula includes a transmission delay cost calculation sub-formula when all tasks to be calculated of a set user terminal are transmitted to a set MEC server through a set sub-channel, and a server calculation delay cost calculation sub-formula after all tasks to be calculated of a set user terminal are unloaded to a set MEC server;
[0016] An optimal strategy search module, configured to dynamically search for the task execution strategy with the minimum total cost in the network flow graph with the cost calculation formula of the edges attached according to the calculation data volume of each task to be calculated, the number of computing resource cycles required for the calculation, the task delay requirement, and the total computing resources of each MEC server;
[0017] A task execution module, configured to select to perform the calculation of each task to be calculated of each user terminal locally on the user terminal, or unload it to a specified MEC server through a specified sub-channel for calculation according to the task execution strategy.
[0018] According to another aspect of the embodiments of the present invention, an electronic device is provided, and the electronic device includes:
[0019] At least one processor; and
[0020] A memory communicatively connected to the at least one processor; wherein,
[0021] The memory stores a computer program executable by the at least one processor, and when the computer program is executed by the at least one processor, the at least one processor is enabled to execute a multi-task oriented edge computing resource allocation method according to any embodiment of the present invention.
[0022] According to another aspect of the embodiments of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to implement a multi-task oriented edge computing resource allocation method according to any embodiment of the present invention when executed.
[0023] According to another aspect of the embodiments of the present invention, there is also provided a computer program product including computer instructions that implement the steps of the method according to any embodiment of the present invention when executed by a processor.
[0024] The technical solution of the embodiments of the present invention obtains a set of user terminals, a set of MEC servers, a set of tasks to be calculated for each terminal, and a set of sub-channels for each server in an edge computing network to be optimized, constructs a network flow graph with sub-channels as the first type of nodes and user terminals as the second type of nodes, and designs a composite cost calculation formula for the edges in the graph, including transmission delay cost and server computing delay cost. The transmission delay cost is determined by the task data volume and the channel transmission rate, and the computing delay cost depends on the task computing resource requirements and the remaining resource volume of the server. Based on this network flow graph, the shortest path fast algorithm is used to dynamically search for a task execution strategy with the minimum total cost. Finally, according to the optimization strategy, each task is intelligently selected to be executed locally or offloaded to a target MEC server through a specified sub-channel. This new type of edge computing allocation scheme can effectively improve resource utilization, significantly reduce the overall task execution time through the joint optimization of transmission delay and computing delay, and the dynamic adjustment mechanism can respond to network state changes in real time to ensure the priority processing of high-delay sensitive tasks, providing strong support for low-latency and high-reliability edge computing services.
[0025] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. Description of the Drawings
[0026] To more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0027] Figure 1 is a flowchart of a multi-task-oriented edge computing resource allocation method provided in Embodiment 1 of the present invention;
[0028] Figure 2 is a flowchart of another multi-task-oriented edge computing resource allocation method provided in Embodiment 2 of the present invention;
[0029] Figure 3 is a flowchart of another multi-task-oriented edge computing resource allocation method provided in Embodiment 3 of the present invention;
[0030] Figure 4 is a structural schematic diagram of a multi-task-oriented edge computing resource allocation device provided in Embodiment 4 of the present invention;
[0031] Figure 5 is a structural schematic diagram of an electronic device for implementing a multi-task-oriented edge computing resource allocation method according to the embodiments of the present invention. Detailed implementation manners
[0032] In order to enable those skilled in the art to better understand the solutions of the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0033] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above drawings are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described here can be implemented in an order other than those illustrated or described here. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not necessarily have to be limited to those clearly listed steps or units, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.
[0034] Example 1
[0035] Figure 1 FIG. is a flowchart of a multi-task-oriented edge computing resource allocation method provided in the first embodiment of the present invention. This embodiment is applicable to the resource scheduling situation of concurrent requests for edge computing services by multiple user terminals. This method can be executed by a multi-task-oriented edge computing resource allocation method device, which can be implemented in the form of hardware and / or software and is generally configurable in an electronic device.
[0036] Correspondingly, as Figure 1 shown, the method includes:
[0037] S110. Obtain a set of user terminals, a set of MEC servers, a set of computing tasks to be calculated for each user terminal, and a set of sub-channels for each MEC server that match the edge computing network to be optimized.
[0038] Among them, the set of user terminals can be understood as the set of all mobile terminal devices in the network that need computing services, including smart phones, Internet of Things devices, vehicle-mounted terminals, etc. These terminal devices generate computing tasks that need to be processed. However, due to their limited computing power, they often need to offload the tasks to the edge server for processing. When modeling, it is usually represented by U = {u1, u2,..., u N}, where u u , u ∈ [1, N] represents a specific terminal device u. The set of MEC servers can be understood as computing nodes deployed at the edge of the network, usually located at base stations, access points, or edge data centers of the network. These MEC servers can provide computing services for different types of terminal devices through various wireless access technologies. When modeling, it is usually represented by E = {e1, e2,..., e M} to represent e e , e ∈ [1, M] represents a specific MEC server e, and each MEC server has specific computing capabilities and storage resources.
[0039] The set of computing tasks to be calculated can be understood that each user terminal may generate multiple computing tasks that need to be processed, and these tasks form the set of computing tasks to be calculated for the user terminal. Among them, the computing task set TS u of the user terminal u can be expressed as: Where represents the kth computing task to be calculated on the user terminal u, and each computing task is represented by a triple, that is Among them, represents the total amount of data that needs to be calculated for the kth computing task to be calculated on the user terminal u, denotes the number of CPU (Central Processing Unit) cycles required to compute the k-th task to be computed on the user terminal u. denotes the latency requirement of the k-th task to be computed on the user terminal u. The sub-channel set can be understood as in a wireless communication environment, each MEC server is equipped with a set of sub-channel resources S, S = {s1, s2,..., s I}, which is used to communicate with user terminals. Among them, s s , s ∈ [1, I] represents a specific sub-channel s. These sub-channels are the division units of wireless spectrum resources and use technologies such as OFDMA (Orthogonal Frequency Division Multiple Access) to achieve multi-user parallel access. The allocation of sub-channels directly affects the transmission rate and latency performance of task offloading.
[0040] In this embodiment, the MEC server and the base station are located at the same position, and data transmission of terminal devices is realized through a wireless communication channel. Terminal devices can flexibly select execution strategies according to task characteristics: for tasks with small computing volume and insensitive latency, the local execution mode is adopted, while for tasks with large computing requirements or latency-sensitive tasks, the edge offloading mode is adopted. Each MEC server can provide computing resources for multiple users.
[0041] S120. According to the user terminal set and the sub-channel sets of each MEC server, construct a network flow graph with each sub-channel as the first type of node, each user terminal as the second type of node, and the connection lines between the first type of node and the second type of node as edges.
[0042] In this embodiment, the first type of node represents the sub-channel resources available to each MEC server, and each sub-channel is modeled as an independent network node; the second type of node corresponds to all user terminal devices that need to be served. The connection relationship between these two types of nodes is established through directed edges. Specifically, when a certain sub-channel can provide services for a specific user terminal, a directed edge is established between the corresponding first type of node and the second type of node. This modeling method transforms the actual wireless communication resource allocation problem into the minimum cost maximum flow problem in graph theory, providing a mathematical basis for subsequent optimization calculations.
[0043] Among them, the minimum-cost maximum-flow problem can be understood as an optimization problem of finding the maximum flow from the source node to the sink node in a given network flow graph while minimizing the total transmission cost. In the embodiment of this solution, the source node corresponds to the available sub-channel resources, the sink node corresponds to the user terminal device, the capacity of the edge represents the channel transmission capacity, and the cost of the edge comprehensively considers key performance indicators such as transmission delay and computing delay. By solving this problem, the maximization of the system resource utilization rate and the minimization of the total task processing delay can be achieved simultaneously.
[0044] S130. Construct a cost calculation formula corresponding to the edges in the network flow graph. Among them, the cost calculation formula includes a transmission delay cost calculation sub-formula when all the tasks to be calculated of a set user terminal are transmitted to a set MEC server through a set sub-channel, and a server computing delay cost calculation sub-formula after all the tasks to be calculated of the set user terminal are offloaded to the set MEC server.
[0045] Among them, the cost of the edge can be understood as the total cost required to complete a specific task offloading path in the edge computing network. This comprehensive indicator quantifies the overall performance loss of connecting from the user terminal to the target MEC server through a specific sub-channel, including both the communication resource consumption in the wireless transmission process and the computing resource overhead on the server side. Specifically, it reflects the comprehensive cost in multiple dimensions such as delay, bandwidth, and computing power when selecting this task offloading path, providing a unified quantitative benchmark for subsequent optimal path selection. The higher the cost value of each edge, the greater the overall cost of executing task offloading through this path. Therefore, paths with lower costs will be preferentially selected during resource allocation decisions.
[0046] In this embodiment, the cost calculation formula of the edges in the network flow graph consists of two parts: transmission delay and computing delay. The transmission delay cost comprehensively considers factors such as channel quality, transmission distance, and network congestion degree. The better the channel condition, the lower the cost; the computing delay cost is based on the current load status of the server and the computing complexity of the task. The lighter the server load, the lower the cost.
[0047] S140. According to the calculation data volume of each task to be calculated, the number of computing resource cycles required for the calculation, the task delay requirement, and the total computing resources of each MEC server, use the shortest path fast algorithm to dynamically search for the task execution strategy with the minimum total cost in the network flow graph with the attached cost calculation formula of the edges.
[0048] Among them, the Shortest Path Faster Algorithm (SPFA) can be understood as a graph search method for finding the optimal path from the user terminal node to the MEC server node in a network flow graph. This algorithm is based on the constructed network flow graph model, where nodes represent terminal devices or sub-channel resources, and the edge weights are determined by the comprehensive cost composed of transmission delay and computing delay. When the algorithm runs, it will traverse all possible task offloading paths (including options of local execution and offloading to different servers through each sub-channel), and finally select the execution strategy that minimizes the total cost by dynamically comparing the total cost values of each path. During the search process, the algorithm will consider the current network state in real time, including dynamic factors such as channel quality changes and server load fluctuations, to ensure that the decision result always reflects the optimal resource allocation scheme of the system.
[0049] In this embodiment, by collecting the key parameters of each task to be calculated, including the task data volume size, the number of required CPU cycles, and the delay sensitivity requirement, and simultaneously monitoring the total available computing resources of each MEC server in real time. These parameters will be mapped to the nodes and edge weights of the network flow graph, where the task data volume affects the cost weight of the transmission edge, the CPU cycle requirement affects the cost weight of the computing edge, and the delay requirement participates in path screening as a constraint condition. Through this mapping relationship, the complex resource allocation problem is transformed into an optimization path search problem in graph theory.
[0050] Specifically, the search process comprehensively considers the channel quality, server load status on the transmission path, and the characteristic requirements of the task itself, and dynamically calculates the best task execution strategy with the minimum total cost as the objective function. This strategy will clearly indicate whether each task should be executed locally on the user terminal or offloaded to a specific MEC server for execution. If offloading is selected, it will also specify the optimal sub-channel transmission path.
[0051] S150. According to the task execution strategy, select to execute the calculation of each task to be calculated of each user terminal locally on the user terminal or offload it to a specified MEC server through a specified sub-channel for execution.
[0052] In this embodiment, according to the optimal path scheme given by SPFA, a binary decision is made for each task to be processed: when the path shows that the scheme with the lowest total cost is local execution, the task will directly start the calculation on the user terminal device; when the path points to a certain MEC server node, extract the specified sub-channel information on this path and establish a dedicated transmission link between the terminal and the target server. This decision-making process needs to interact with the terminal computing resource management module and the radio access control module in real time to ensure that the computing tasks can be accurately executed according to the predetermined scheme.
[0053] The technical solution of the embodiment of the present invention constructs a network flow graph with sub-channels as the first type of nodes and user terminals as the second type of nodes by obtaining the user terminal set, MEC server set, the set of tasks to be calculated for each terminal, and the sub-channel set of each server in the edge computing network to be optimized, and designs a composite cost calculation formula for the edges in the graph, including transmission delay cost and server computing delay cost. The transmission delay cost is determined by the task data volume and the channel transmission rate, and the computing delay cost depends on the task computing resource requirements and the remaining resources of the server. Based on this network flow graph, the shortest path fast algorithm is used to dynamically search for the task execution strategy with the minimum total cost. Finally, according to the optimization strategy, each task is intelligently selected to be executed locally or offloaded to the target MEC server through the specified sub-channel. This new edge computing allocation scheme can effectively improve resource utilization, significantly reduce the overall task execution time by comprehensively considering the joint optimization of transmission delay and computing delay, and the dynamic adjustment mechanism can respond to network state changes in real time to ensure the priority processing of high-delay sensitive tasks, providing strong support for low-latency and high-reliability edge computing services.
[0054] Embodiment 2
[0055] Figure 2 FIG. is a flowchart of another edge computing resource allocation method for multi-tasks provided by the second embodiment of the present invention. This embodiment is optimized based on the above embodiments. In this embodiment, the operation of "constructing a network flow graph with each sub-channel as the first type of node, each user terminal as the second type of node, and the connection between the first type of node and the second type of node as the edge according to the user terminal set and the sub-channel set of each MEC server" is specifically refined, and the "cost calculation formula" is described.
[0056] Correspondingly, as Figure 2 shown, the method includes:
[0057] S210. Obtain a user terminal set, an MEC server set, a set of tasks to be calculated for each user terminal, and a sub-channel set of each MEC server that match the edge computing network to be optimized.
[0058] S220. According to the MEC server set including M MEC servers and the sub-channel sets each including I sub-channels, construct M*I first type of nodes, and label the MEC servers to which each first type of node belongs.
[0059] In this embodiment, first, for the MEC server set E = {e1, e2,..., e M}, all available M MEC servers are identified. For each MEC server, the set S = {s1, s2,..., s II sub-channel resources in the set of sub-channels are independently modeled. Each sub-channel is created as an independent first-class node, so a total of M×I first-class nodes are generated. During the creation of the first-class nodes, the identification information of the MEC server to which each first-class node belongs is added. This identification information usually includes data such as server ID, geographical location, and basic configuration parameters. This modeling method ensures that each sub-channel resource has a unique node representation in the graph, and at the same time maintains the ownership relationship between the sub-channel and the server to which it belongs through the server identification.
[0060] Furthermore, although different sub-channel nodes under the same MEC server share the same server identification, they exist as independent nodes in the network flow graph to support subsequent refined resource allocation decisions. The node construction completed in this step lays the foundation for establishing the connection relationship between the terminal and the channel.
[0061] S230. Construct N second-class nodes according to the set of user terminals containing N user terminals.
[0062] In this embodiment, for the set of user terminals U = {u1, u2,..., u N}, a total of N user terminals can be identified. The N user terminals are respectively modeled as independent second-class nodes, and each second-class node records the key feature parameters of the terminal, including attributes such as device ID, computing power, and location coordinates. This modeling method not only maintains the independence between terminals but also retains the necessary differential features, laying the foundation for establishing the connection relationship between the terminal and the sub-channel.
[0063] It should be noted that each user terminal is assigned a sub-channel of an MEC server for computing task offloading. Therefore, when modeling, set to identify the user offloading decision set. indicates that user terminal u offloads all tasks in the computing task group to MEC server e for execution through sub-channel s, that is, satisfies:
[0064]
[0065] where |E| represents the total number of MEC servers in the MEC server set, and |S| represents the total number of sub-channels in the sub-channel set.
[0066] Each channel on all MEC servers can only be assigned to one user terminal, that is, satisfies:
[0067]
[0068] Among them, |U| represents the total number of user terminals included in the set of user terminals.
[0069] In addition, the number of associated user terminals on each MEC server cannot exceed the number of sub-channels, that is while satisfying:
[0070]
[0071] Among them, l e represents the number of sub-channels on server e. Users can only select MEC servers with idle channels for task offloading.
[0072] S240. After creating the virtual source point and the virtual sink point, establish the logical connections between the virtual source point and each first-type node, and establish the logical connections between each second-type node and the virtual sink point.
[0073] Among them, creating the virtual source point and the virtual sink point can be understood as the key control nodes of the network flow graph, mainly responsible for the functions of traffic scheduling and path integration. The virtual source point, as the starting point of the traffic of the entire network, realizes the unified management and control of the MEC server resources by connecting all first-type nodes (sub-channel nodes); the virtual sink point, on the other hand, serves as the traffic convergence end point, and centrally receives various computing task requests by connecting all second-type nodes (user terminal nodes). This design constructs a standard network flow model of "centralized resource supply - unified task scheduling", where the virtual source point is equivalent to the abstract entrance of the resource pool, and the virtual sink point is equivalent to the abstract exit of the task demand. The two together ensure that the network flow graph conforms to the classical network flow graph theory framework, providing a standardized mathematical model basis for the subsequent graph theory-based optimization algorithms. It should be noted that these two virtual nodes do not directly correspond to physical entities, but are logical construction elements specially designed for algorithm implementation.
[0074] The logical connection can be understood as an abstract connection relationship specially designed for algorithm optimization. The unidirectional connection established between the virtual source point and all first-type nodes represents the allocatability of all available sub-channel resources; while the unidirectional connection between all second-type nodes and the virtual sink point represents the reachability of all terminal tasks. These logical connections have clear flow characteristics, starting from the virtual source point, passing through the sub-channel nodes and user terminal nodes, and finally converging to the virtual sink point, forming a standardized network flow topology structure.
[0075] In this embodiment, a unique virtual source point is created as the traffic starting point of the entire network, and one-way connections are established between it and all first-class nodes; at the same time, a unique virtual sink point is created as the traffic end point, and one-way connections are established between it and all second-class nodes. The virtual source point uniformly manages all sub-channel resources, and the virtual sink point centrally receives all terminal task requests, providing a standardized calculation framework for subsequent optimal path search based on network flow theory.
[0076] S250. After establishing the connections between each first-class node and each second-class node as edges, a network flow graph is obtained.
[0077] In this embodiment, when a certain sub-channel can physically provide services for a specific user terminal (considering actual constraints such as signal coverage range and access permissions), a directed edge is established between the corresponding first-class node and second-class node. The capacities of these edges are set to the maximum data transmission capabilities of the corresponding sub-channels. At the same time, each edge is associated with a specific cost calculation formula, which comprehensively considers two key factors: transmission delay and computing delay. Through this connection method, the actual wireless communication resource allocation problem is transformed into a standard network flow graph model, providing a complete graph structure basis for subsequent optimal path search algorithms. It should be noted that the establishment rules of these edges ensure that the network flow graph is consistent with the actual connection relationship of the physical network, reflecting both real communication constraints and providing the necessary abstraction for algorithm optimization.
[0078] S260. Construct a cost calculation formula corresponding to the edges in the network flow graph, where the cost calculation formula includes a transmission delay cost calculation sub-formula for transmitting all the tasks to be calculated of a set user terminal to a set MEC server through a set sub-channel, and a server computing delay cost calculation sub-formula for offloading all the tasks to be calculated of the set user terminal to the set MEC server.
[0079] S270. According to the calculation data volume of each task to be calculated, the number of computing resource cycles required for the calculation, the task delay requirements, and the total computing resources of each MEC server, use the shortest path fast algorithm to dynamically search for the task execution strategy with the minimum total cost in the network flow graph with the cost calculation formula attached to the edges.
[0080] S280. According to the task execution strategy, select to execute the calculation of each task to be calculated of each user terminal locally on the user terminal, or offload it to a specified MEC server through a specified sub-channel for execution.
[0081] In the technical solution of the embodiment of the present invention, by obtaining a set of user terminals, a set of MEC servers, a set of tasks to be calculated for each user terminal, and a set of sub-channels for each MEC server that match the edge computing network to be optimized, M×S first-class nodes are constructed based on the set of M MEC servers and their S sub-channels, and the belonging servers are marked. At the same time, U second-class nodes are constructed based on U user terminals. After creating a virtual source point and a virtual sink point, logical connections are established between the virtual source point and each first-class node, and between each second-class node and the virtual sink point. A complete network flow graph is formed by establishing edges between the first-class nodes and the second-class nodes. A cost calculation formula including transmission delay and server computing delay is constructed. According to the task calculation data volume, resource requirements, and the total resources of each server, the shortest path fast algorithm is used to search for the task execution strategy with the minimum total cost. Finally, according to the strategy selection, each task is executed locally at the terminal or offloaded to the specified MEC server through the specified sub-channel. This solution innovatively transforms the wireless transmission resource allocation problem in edge computing into a network flow graph model. Through sub-channel node processing and the introduction of virtual nodes, standardized modeling of transmission resource allocation is achieved, which can accurately describe transmission characteristics such as channel quality and bandwidth allocation, while maintaining consistency with the actual physical network.
[0082] Optionally, based on the above embodiments, constructing a cost calculation formula corresponding to the edges in the network flow graph may include:
[0083] Construct the following formula to construct the second-class node v representing the user terminal u u , and the cost calculation formula corresponding to the edge formed by the first-class node representing the sub-channel s on the MEC server e
[0084]
[0085] Wherein, is the transmission delay cost calculation sub-formula, is the server computing delay cost calculation sub-formula; ω1 is a preset transmission cost coefficient, and ω2 is a preset computing cost coefficient;
[0086] |TS u | is the total number of tasks to be calculated included in the set of tasks to be calculated TS u of the user terminal u, is the calculation data volume of the task k to be calculated in TS u , and is the uplink transmission rate when the user terminal u offloads all the tasks to be calculated in TS u through the sub-channel s on the MEC server e;
[0087] For TS u is the number of computing resource cycles required for the calculation of the task k to be calculated in is the expected maximum remaining computing resource amount of the MEC server e.
[0088] Generally speaking, in the edge computing resource allocation scheme, the cost calculation formula The design of is the core optimization link, which quantifies the comprehensive cost of the user terminal u to execute the task offloading through the sub-channel s of the MEC server e. This calculation formula consists of two key parts, and unifies and quantifies the performance indicators in the two dimensions of transmission and calculation through weighted summation.
[0089] Transmission delay cost calculation sub-formula reflects the data communication cost. This sub-formula essentially calculates the total time required to transmit all task data through the specified sub-channel. The lower the transmission rate or the larger the data volume, the higher the transmission cost. In practical applications, The value of will change dynamically according to real-time network conditions such as channel quality and interference conditions.
[0090] Server computing delay cost sub-formula evaluates the computing and processing cost. This sub-formula calculates the total computing time required for all tasks to be executed on the target server. The less remaining resources of the server or the greater the computing demand of the task, the higher the computing cost. Here, the expected maximum remaining resources rather than the current resources are used to avoid decision jitter caused by instantaneous load fluctuations.
[0091] The setting of the two weight coefficients ω1 and ω2 reflects the system's preference for different indicators. When ω1 is larger, the algorithm will tend to select a path with good transmission performance; when ω2 is larger, it will give priority to considering a server with sufficient computing resources. By adjusting these two coefficients, the balance between transmission delay and computing delay can be achieved to meet the quality of service requirements in different scenarios. The entire cost calculation formula finally provides a comparable quantitative index for each possible offloading path, providing a basis for the optimal decision.
[0092] Optionally, on the basis of the above embodiments, the cost calculation formula may include:
[0093] The uplink transmission rate when the user terminal u offloads all the tasks to be calculated in TS through the sub-channel s on the MEC server e is calculated by the following formula u in
[0094]
[0095] where W is the channel bandwidth, and p u is the uplink transmission power of the user terminal u, is the channel gain when the user terminal u and the MEC server e transmit on the sub-channel s, and σ 2 represents the noise power of additive white noise. u' is other user terminals, N is the total number of user terminals included in the user terminal set, and M is the total number of MEC servers included in the MEC server set. indicates whether the other user terminal u' occupies the sub-channel s on the MEC server e. takes values as a binary variable, P u′ is the transmission power of the other user terminal u'. is the channel gain when the user terminal u' and the MEC server e transmit on the sub-channel s;
[0096] And, the expected maximum remaining computing resource amount of the MEC server e is calculated through the following formula
[0097]
[0098] where, f e is the total computing resource of the MEC server e, and |U‘ e | represents the total number of user terminals included in the set U' of user terminals that have been matched with the MEC server e e ; is for TS u the task delay requirement of the task k to be calculated in it.
[0099] Generally speaking, the uplink transmission rate is calculated based on Shannon's theorem, which fully depicts the actual transmission capacity in the wireless communication environment. In this formula, W represents the physical bandwidth of the sub-channel, reflects the effective signal power of the target terminal, and the interference term in the denominator quantifies the interference impact caused by other terminals in the same frequency band. Among them, the binary variable accurately describes the occupancy status of the sub-channel (1 means occupied, and 0 means idle). This design enables the formula to dynamically reflect the real-time interference situation in the network. It is particularly worth noting that the interference calculation range covers all possible terminal and server combinations that may generate co-channel interference to ensure the accuracy of rate estimation.
[0100] Generally speaking, when calculating the remaining resources of the MEC server , the formula adopts a conservative estimation strategy to ensure the reliability of resource allocation. f e represents the total computing resource of the server, and calculates the minimum guarantee amount of the allocated resources. Here, the task computing requirement is divided by its delay requirement , it is actually converted into the minimum computing resource occupancy required to maintain the quality of service. This calculation method has two advantages: on the one hand, through the introduction of delay requirements , differential resource guarantee for tasks with different priorities is achieved; on the other hand, considering all task requirements of the matched terminal set, it is ensured that the actual carrying capacity of the server will not be exceeded when new tasks are allocated.
[0101] These two formulas together constitute the core of the dynamic resource evaluation system. The transmission rate formula accurately reflects the time-varying characteristics of the wireless channel through real-time interference calculation; the remaining resource formula reliably evaluates the true load status of the server by back-calculating the quality of service. This quantitative evaluation mechanism provides accurate input parameters for subsequent optimization decisions based on the network flow graph, and can make optimal resource allocation decisions in complex edge environments.
[0102] Embodiment III
[0103] Figure 3 FIG. is a flowchart of another multi-task-oriented edge computing resource allocation method provided by Embodiment III of the present invention. This embodiment is optimized based on the above embodiments. In this embodiment, the operation of "dynamically searching for a task execution strategy with the minimum total cost in a network flow graph with an attached edge cost calculation formula according to the calculation data volume, the number of computing resource cycles required for calculation, and the task delay requirements of each to-be-calculated task, and the total computing resources of each MEC server" is specifically refined.
[0104] Correspondingly, as Figure 3 shown, the method includes:
[0105] S310. Obtain a user terminal set, an MEC server set, a to-be-calculated task group of each user terminal, and a sub-channel set of each MEC server that match the edge computing network to be optimized.
[0106] S320. According to the user terminal set and the sub-channel sets of each MEC server, construct a network flow graph with each sub-channel as the first type of node, each user terminal as the second type of node, and the connection between the first type of node and the second type of node as the edge.
[0107] S330. Construct a cost calculation formula corresponding to the edge in the network flow graph, where the cost calculation formula includes a transmission delay cost calculation sub-formula when all to-be-calculated tasks of a set user terminal are transmitted to a set MEC server through a set sub-channel, and a server calculation delay cost calculation sub-formula after all to-be-calculated tasks of the set user terminal are offloaded to the set MEC server.
[0108] S340. Initialize by setting the capacity of each edge in the network flow graph D to 1, the flow and cost to 0, and constructing the residual network D' of D. Among them, the cost of each edge in D' is the same as that of D during initialization.
[0109] Among them, the residual network can be understood as a dynamic auxiliary structure in the network flow algorithm, which consists of nodes in the original network and two types of special edges: forward edges represent the remaining available flow that can be increased, and backward edges represent the allocated flow that can be revoked. Each forward edge retains the difference between the original capacity and cost, and the backward edge has an opposite negative cost value, jointly forming an optimizable space that can be adjusted reversely. The residual network provides the ability to dynamically correct the flow allocation for the algorithm by updating the remaining capacity and cost parameters of the edges in real time, and is the core computing framework for finding the optimal solution.
[0110] In this embodiment, the capacities of all edges in the network flow graph D are initialized to 1 (ensuring the exclusivity of sub-channel resources), the flow and cost are set to 0, and at the same time, a residual network D' including backward edges is constructed. Among them, D' retains the cost parameters of D and adds a backward edge mechanism for rollback flow; this initialization strategy of "capacity 1 + flow 0" not only conforms to the physical constraints of exclusive use of sub-channels in wireless communication, but also provides the ability to dynamically adjust the flow allocation for the subsequent minimum-cost flow algorithm through the two-way edge structure of the residual network, establishing an accurate initial computing environment for iterative optimization based on the augmenting path.
[0111] S350. Use the shortest path fast algorithm to perform the operation of finding an augmenting path with the minimum cost on the residual network D'.
[0112] Among them, the augmenting path can be understood as a feasible transmission path connecting the source point and the sink point in the network flow graph. Its core feature is that all edges on this path must have remaining capacity (that is, the flow does not reach the upper limit).
[0113] In the embodiment of the present invention, based on the current network state, all feasible paths are traversed, the total cost values of each path are calculated, and the path with the minimum cost is selected as the augmenting path for this iteration. During the search process, the remaining capacity of each edge and the cost parameters updated in real time, including indicators such as transmission delay and calculation delay, will be dynamically considered. After each search is completed, the determined augmenting path is used for subsequent flow adjustment operations.
[0114] S360. Determine whether the augmenting path is successfully found? If yes, execute S370; if not, execute S390.
[0115] In this embodiment, by detecting whether there is an augmenting path that meets the conditions in the residual network D' (i.e., a feasible path from the virtual source point to the virtual sink point and the remaining capacity of each edge is greater than 0), if it exists, perform flow adjustment, and if not, terminate the calculation. This judgment process will synchronously verify two necessary conditions: 1) whether the connectivity of the path is complete; 2) whether the remaining capacity of all edges on the path meets the transmission requirements, so as to ensure the effectiveness of the subsequent steps of the operation.
[0116] S370. Increase the flow value along the augmenting path in D, where the increased flow value is the minimum value of the capacities of the edges on the augmenting path in the residual network.
[0117] In this embodiment, by determining the minimum value Δf of the remaining capacities of the edges on the augmenting path (in this solution, since the edge capacity is initialized to 1, so Δf is always 1), and then increasing the flow value of Δf for all the edges on this path in the original network flow graph D. Synchronously, perform two-way updates in the residual network D': 1) reduce the remaining capacity of the forward edge to reflect the resource occupation situation; 2) increase the rollback capacity of the reverse edge to reserve operation space for possible subsequent flow adjustments. This process strictly follows the conservation characteristics of the network flow to ensure the flow balance of each node.
[0118] S380. After updating the state of D' according to the current state of D, for each edge in D whose flow value has increased to 1, update the cost of each edge in D' according to the cost calculation formula, and then return to execute the operation of finding an augmenting path with the minimum cost on the residual network D' using the shortest path fast algorithm, and return to S360.
[0119] In this embodiment, by synchronously updating the topological structure of the residual network D' according to the latest flow value in D, including adjusting the remaining capacity of each edge and the reverse edge setting; then for all the edges whose flow values have increased to 1 (i.e., the sub-channels that have been allocated), recalculate their cost parameters in D', comprehensively considering dynamic factors such as the current channel quality change and the server load fluctuation. This process reconstructs the searchable space of the residual network to provide an updated network state for the next round of minimum cost path search, and at the same time maintains the cost compensation of the reverse edge to ensure that the algorithm continuously converges to the global optimal solution.
[0120] S390. If the augmenting path is not successfully found, it is determined that an approximate optimal solution of the minimum cost maximum flow problem with dynamically changing costs has been successfully iteratively obtained.
[0121] In this embodiment, when no new augmented path can be found in the residual network D', it is determined that the current traffic allocation has reached the optimal state. At this time, all the edges with a traffic value of 1 in the network flow graph D constitute the final task offloading scheme. This step traverses all the edges in D, filters out the valid connections with a traffic value of 1, and converts them into specific resource allocation decisions - each eligible edge corresponds to an execution policy of offloading the task group of the user terminal u to the MEC server e through the sub-channel s.
[0122] S3100. Generate a task execution policy according to each edge with a traffic value of 1 in the current D;
[0123] Among them, if the traffic value of the edge from the second type of node v of the user terminal u in the current D u to the first type of node representing the sub-channel s on the MEC server e is 1, then in the task execution policy, define a sub-policy of offloading all the to-be-computed tasks in the to-be-computed task group of the user terminal u through the sub-channel s on the MEC server e. In this embodiment, by scanning all the edges from the user terminal nodes v in the network flow graph D
[0124] to the sub-channel nodes u when the traffic value of the detected edge is 1, a corresponding sub-policy is generated - offloading all the to-be-computed tasks of the terminal u through the sub-channel s of the server e. This conversion process establishes a one-to-one mapping relationship, and each activated traffic edge precisely corresponds to a triple allocation scheme of "terminal - sub-channel - server", and finally summarizes to form a complete task execution policy matrix. In this embodiment, by scanning all the edges from the user terminal nodes v in the network flow graph D to the sub-channel nodes, when the traffic value of the detected edge is 1, a corresponding sub-policy is generated - offloading all the to-be-computed tasks of the terminal u through the sub-channel s of the server e. This conversion process establishes a one-to-one mapping relationship, and each activated traffic edge precisely corresponds to a triple allocation scheme of "terminal - sub-channel - server", and finally summarizes to form a complete task execution policy matrix.
[0125] S3110. According to the task execution policy, select to perform the calculation of each to-be-computed task of each user terminal locally at the user terminal, or offload it to a specified MEC server through a specified sub-channel for execution.
[0126] The technical solution of the embodiment of the present invention constructs a network flow graph with sub-channels as the first type of nodes and user terminals as the second type of nodes by obtaining the user terminal set, MEC server set and its sub-channel set of the edge computing network, then establishes a cost calculation formula including transmission delay and computing delay, initializes the capacity of each edge in the network flow graph D to 1 and constructs the residual network D', then iteratively searches for the minimum-cost augmenting path on D', increases the flow along the path and updates the network state after finding the path, terminates the iteration if no path is found, and finally generates a task execution strategy according to the edges with a flow of 1 to determine whether each task is executed locally or offloaded to a specified MEC server through a specified sub-channel. This solution ensures the exclusive allocation of sub-channel resources by initializing the edge capacity to 1, realizes the dynamic optimization and adjustment of the task offloading scheme by using the residual network, ensures the economy of network resource allocation based on the minimum-cost maximum-flow algorithm, and finally realizes the seamless connection from the theoretical solution to the actual scheduling through the conversion from flow to strategy. This design not only meets the real-time requirements of the edge computing scenario, but also ensures the fairness and efficiency of resource allocation, and at the same time enables the system to adapt to network environment changes through the dynamic cost adjustment mechanism.
[0127] Optionally, based on the above embodiments, according to the task execution strategy, selecting to execute the calculation of each pending calculation task of each user terminal locally on the user terminal or offloading it to a specified MEC server through a specified sub-channel may include:
[0128] If it is determined that the task execution strategy includes a target sub-strategy corresponding to the first user terminal, then select to offload the pending calculation tasks of the first user terminal to the target MEC server through the target sub-channel defined in the target sub-strategy for execution;
[0129] If it is determined that the task execution strategy does not include a sub-strategy corresponding to the second user terminal, then select to execute the calculation of each pending calculation task of the second user terminal locally on the second user terminal.
[0130] Generally speaking, when the task execution strategy includes a target sub-strategy corresponding to a certain user terminal, the task is offloaded to the target MEC server for execution through the specified target sub-channel; if the sub-strategy of a certain terminal is not included in the strategy, it is default to execute the calculation task locally on the terminal. This design not only ensures that important tasks can obtain the optimal cloud computing resources, but also avoids unnecessary network transmission overhead.
[0131] Specifically, the task offloading scheme determined by the network flow optimization will be preferentially executed to ensure that high-value tasks can use the best sub-channel and server resources. For terminals that have not been allocated cloud resources, the local computing mode will be automatically enabled.
[0132] Generally, users can choose to execute terminal computing tasks locally or offload them to the MEC server for execution. When the task is executed locally, the computing delay only takes the task computing time. If the offloading strategy is adopted, the delay overhead includes two parts: offloading transmission delay and computing delay. The task delay overhead The calculation formula is:
[0133]
[0134] where, f u represents the local operation speed of user terminal u, represents the k-th task allocated by the MEC server e to user terminal u, that is the computing resource of. represents that the user selects to execute the task locally, represents that the user selects to offload and execute the task to a certain MEC server.
[0135] Under the constraint of meeting the delay requirements of computing tasks, with the goal of executing more computing tasks and minimizing the total delay overhead of network user computing tasks, the task computing benefit is defined as:
[0136]
[0137] It means that the actual execution time of the task exceeds the user's delay requirement. At this time, it is regarded that the task execution is unsuccessful, that is, there is no computing benefit. When the actual execution time of the task meets the user's delay requirement, the task execution benefit is set as the difference from the delay requirement. According to the network model and problem constraints, the objective function for the multi-task offloading and resource allocation problem with different delay requirements is defined as:
[0138]
[0139] In the above formula, α represents the binary decision variable of task offloading, and f represents the continuous variable of the computing resource allocation of each MEC server. The objective function quantifies the execution benefit
[0140] of each computing task, directly associates the delay satisfaction degree with the performance, and transforms the complex multi-objective optimization problem into a solvable single-objective maximization problem. This function comprehensively considers the execution effects of all user terminals and their tasks to be computed through a double summation structure, and with the help of the collaborative optimization of the offloading decision and resource allocation variables, while ensuring that the actual delay of each task meets the requirements Under the premise of achieving the triple optimization goals: giving priority to ensuring the execution of tasks that can meet the latency requirements, serving as many user tasks as possible under limited resources, and minimizing the total latency overhead, thereby achieving the optimal allocation of edge computing resources.
[0141] Furthermore, based on the above embodiments, according to the task execution strategy, the calculation of each to-be-calculated task of each user terminal is selected to be performed locally on the user terminal, or to be offloaded to a designated MEC server through a designated subchannel for calculation, which may also include:
[0142] Obtain the set of pending tasks corresponding to the target MEC server;
[0143] Allocate the minimum amount of computing resources required to each task in the set of tasks to be executed based on the number of computing resource cycles and task latency requirements required for the calculation of each task in the set of tasks to be executed;
[0144] Obtain the remaining computing resources of the target MEC server based on the total computing resources of the target MEC server and the allocated minimum computing resources;
[0145] After allocating the remaining computing resources to each task in the to-be-executed task set for a second time according to a preset proportional relationship, computing is performed on each task in the to-be-executed task set.
[0146] Generally speaking, according to the generated offloading decision set, the task set to be executed by each MEC server is generated. At this time, the user terminal set assigned to server e is U' e , then the set of tasks to be executed TSe on server e is U' e In order to complete the execution of each computing task within the delay requirement, firstly, TS e The minimum computing resources allocated to each task can meet the delay requirements At this time, the remaining computing resources of server e are Afterwards, for each Based on the computing resources that have been allocated in the early stage, the remaining resources will be allocated according to a certain ratio. The specific allocation method is as follows:
[0147]
[0148] The first item represents the minimum computing resources required to meet the task's latency requirement, and the second item represents the proportional allocation of the server's remaining resources. The higher the number of CPU cycles required for a task, the greater the potential for improvement in its actual execution latency. Furthermore, the greater the task's latency requirement, the fewer minimum computing resources are allocated, and the greater the potential for latency improvement. Therefore, the greater the product of the task's CPU cycles and its latency requirement, the higher the proportion of remaining computing resources allocated to it.
[0149] Embodiment 4
[0150] Figure 4 The following is a schematic structural diagram of an edge computing resource allocation device for multi - tasks provided in Embodiment 4 of the present invention. As Figure 4 shown, the device includes:
[0151] A resource acquisition module 410, configured to acquire a set of user terminals, a set of MEC servers, a set of to - be - calculated tasks of each user terminal, and a set of sub - channels of each MEC server that match the edge computing network to be optimized;
[0152] A network flow graph construction module 420, configured to construct a network flow graph with each sub - channel as the first - type node, each user terminal as the second - type node, and the connection between the first - type node and the second - type node as the edge, according to the set of user terminals and the set of sub - channels of each MEC server;
[0153] A cost calculation module 430, configured to construct a cost calculation formula corresponding to the edges in the network flow graph. The cost calculation formula includes a transmission delay cost calculation sub - formula when all the to - be - calculated tasks of a set user terminal are transmitted to a set MEC server through a set sub - channel, and a server calculation delay cost calculation sub - formula after all the to - be - calculated tasks of a set user terminal are offloaded to a set MEC server;
[0154] An optimal strategy search module 440, configured to dynamically search for a task execution strategy with the minimum total cost in the network flow graph with the attached cost calculation formula of the edges, according to the calculation data volume of each to - be - calculated task, the number of calculation resource cycles required for calculation, the task delay requirement, and the total amount of calculation resources of each MEC server;
[0155] A task execution module 450, configured to select to execute the calculation of each to - be - calculated task of each user terminal locally on the user terminal or to offload it to a specified MEC server through a specified sub - channel for execution according to the task execution strategy.
[0156] The technical solution of the embodiment of the present invention constructs a network flow graph with sub-channels as the first type of nodes and user terminals as the second type of nodes by obtaining the user terminal set, MEC server set, the set of tasks to be calculated for each terminal, and the set of sub-channels for each server in the edge computing network to be optimized, and designs a composite cost calculation formula for the edges in the graph, including transmission delay cost and server computing delay cost. Among them, the transmission delay cost is determined by the task data volume and the channel transmission rate, and the computing delay cost depends on the task computing resource requirements and the remaining resources of the server. Based on this network flow graph, the shortest path fast algorithm is used to dynamically search for the task execution strategy with the minimum total cost. Finally, according to the optimization strategy, each task is intelligently selected to be executed locally or offloaded to the target MEC server through the specified sub-channel. This new edge computing allocation scheme can effectively improve resource utilization, significantly reduce the overall task execution time through the joint optimization of transmission delay and computing delay, and the dynamic adjustment mechanism can respond to network state changes in real time to ensure the priority processing of high-delay sensitive tasks, providing strong support for low-latency and high-reliability edge computing services.
[0157] Based on the above embodiments, the network flow graph construction module 420 is specifically configured to:
[0158] According to the MEC server set including M MEC servers and the sub-channel sets each including I sub-channels, construct M*I first type of nodes, and label the MEC servers to which each first type of node belongs;
[0159] According to the user terminal set including N user terminals, construct N second type of nodes;
[0160] After creating a virtual source point and a virtual sink point, establish logical connections between the virtual source point and each first type of node, and establish logical connections between each second type of node and the virtual sink point;
[0161] After establishing the connections between each first type of node and each second type of node as edges, obtain the network flow graph.
[0162] Based on the above embodiments, the cost calculation module 430 is specifically configured to:
[0163] Construct the following formula to construct the second type of node v representing the user terminal u u , and the first type of node representing the sub-channel s on the MEC server e The cost calculation formula corresponding to the edge formed
[0164]
[0165] Where Is the sub-formula for calculating the transmission delay cost, It is the sub - formula for calculating the server computing delay cost; ω1 is the preset transmission cost coefficient, and ω2 is the preset computing cost coefficient;
[0166] |TS u | is the total number of tasks to be calculated included in the task group TS to be calculated of the user terminal u u in, For TS u the amount of calculation data of the task k to be calculated in it, is the uplink transmission rate when the user terminal u offloads all the tasks to be calculated in TS u through the sub - channel s on the MEC server e;
[0167] For TS u the number of computing resource cycles required for the calculation of the task k to be calculated in it, is the expected maximum remaining computing resource amount of the MEC server e.
[0168] Furthermore, on the basis of the above - mentioned embodiments, an edge computing resource allocation device for multi - tasks may further include a transmission rate calculation module, specifically used for:
[0169] Calculating the uplink transmission rate when the user terminal u offloads all the tasks to be calculated in TS u through the sub - channel s on the MEC server e
[0170]
[0171] where, W is the channel bandwidth, p u is the uplink transmission power of the user terminal u, is the channel gain when the user terminal u and the MEC server e transmit on the sub - channel s, σ 2 represents the noise power of additive white noise.
[0172] u′ is other user terminals, N is the total number of user terminals included in the user terminal set, M is the total number of MEC servers included in the MEC server set, represents whether the other user terminal u′ occupies the sub - channel s on the MEC server e, the value of is a binary variable, p u′ is the transmission power of the other user terminal u′, is the channel gain when the user terminal u′ and the MEC server e transmit on the sub - channel s;
[0173] And, calculating the expected maximum remaining computing resource amount of the MEC server e through the following formula
[0174]
[0175] Among them, f e is the total computing resource of MEC server e, and |U‘ e | represents the total number of user terminals contained in the set U‘ of user terminals that have been matched to MEC server e e ; is the task delay requirement of task k in TS u .
[0176] Based on the above embodiments, the optimal policy search module 440 is specifically configured to:
[0177] Initialize by setting the capacity of each edge in the network flow graph D to 1, the flow and cost to 0, and construct the residual network D’ of D, where the cost of each edge in D’ is the same as that of D during initialization;
[0178] Use the shortest path fast algorithm to perform the operation of finding an augmenting path with the minimum cost on the residual network D’;
[0179] If the augmenting path is successfully found, increase the flow value along the augmenting path in D, where the increased flow value is the minimum value of the capacities of the edges on the augmenting path in the residual network;
[0180] After updating the state of D’ according to the current state of D, for each edge in D whose flow value has been increased to 1, update the cost of each edge in D’ according to the cost calculation formula, and then return to execute the operation of using the shortest path fast algorithm to find an augmenting path with the minimum cost on the residual network D’;
[0181] If the augmenting path is not successfully found, it is determined that an approximate optimal solution of the minimum cost maximum flow problem with dynamically changing cost has been successfully iterated;
[0182] Generate a task execution policy according to each edge in D with a flow value of 1 currently;
[0183] Among them, if in the current D, the edge from the second - type node v of user terminal u u to the first - type node representing sub - channel s on MEC server e has a flow value of 1, then in the task execution policy, define a sub - policy of offloading all the to - be - calculated tasks in the to - be - calculated task group of user terminal u through sub - channel s on MEC server e.
[0184] Based on the above embodiments, the task execution module 450 is specifically configured to:
[0185] If it is determined that the task execution policy includes a target sub-policy corresponding to the first user terminal, then it is selected to offload each task to be calculated of the first user terminal to the target MEC server for execution through the target sub-channel defined in the target sub-policy;
[0186] If it is determined that the task execution policy does not include a sub-policy corresponding to the second user terminal, then it is selected to perform the calculation of each task to be calculated of the second user terminal locally on the second user terminal.
[0187] Furthermore, based on the above embodiments, an edge computing resource allocation device for multi-tasks may further include: a task set acquisition module, a minimum resource allocation module, a remaining resource calculation module, and a dynamic resource allocation module, where:
[0188] The task set acquisition module is configured to obtain a set of tasks to be executed corresponding to the target MEC server after, according to the task execution policy, selecting to perform the calculation of each task to be calculated of each user terminal locally on the user terminal or offloading it to the specified MEC server for execution through the specified sub-channel;
[0189] The minimum resource allocation module is configured to allocate the required minimum amount of computing resources to each task in the set of tasks to be executed respectively according to the number of computing resource cycles required for the calculation of each task in the set of tasks to be executed and the task delay requirement;
[0190] The remaining resource calculation module is configured to obtain the remaining computing resources of the target MEC server according to the total amount of computing resources of the target MEC server and the allocated minimum amounts of computing resources;
[0191] The dynamic resource allocation module is configured to re-allocate the remaining computing resources to each task in the set of tasks to be executed according to a preset proportional relationship, and then perform the calculation of each task in the set of tasks to be executed.
[0192] In the technical solution of the present disclosure, the processing of collection, storage, use, processing, transmission, provision, and disclosure of the user's personal information involved all comply with the provisions of relevant laws and regulations and do not violate public order and good customs.
[0193] Embodiment 5
[0194] Figure 5FIG. 0 shows a schematic structural diagram of an electronic device 10 that can be used to implement an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0195] As Figure 5 shown, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc. The memory stores a computer program executable by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0196] Multiple components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0197] The processor 11 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a multi-task-oriented edge computing resource allocation method, that is:
[0198] Obtain a set of user terminals, a set of MEC servers, a set of tasks to be calculated for each user terminal, and a set of sub-channels for each MEC server that match the edge computing network to be optimized;
[0199] According to the set of user terminals and the set of sub-channels of each MEC server, construct a network flow graph with each sub-channel as the first type of node, each user terminal as the second type of node, and the connection between the first type of node and the second type of node as the edge;
[0200] Construct a cost calculation formula corresponding to the edges in the network flow graph. The cost calculation formula includes a transmission delay cost calculation sub-formula for transmitting all the tasks to be calculated of a set user terminal to a set MEC server through a set sub-channel, and a server calculation delay cost calculation sub-formula after offloading all the tasks to be calculated of the set user terminal to the set MEC server;
[0201] According to the calculation data volume of each task to be calculated, the number of computing resource cycles required for the calculation and the task delay requirement, as well as the total computing resources of each MEC server, use the shortest path fast algorithm to dynamically search for the task execution strategy with the minimum total cost in the network flow graph with the attached edge cost calculation formula;
[0202] According to the task execution strategy, select to execute the calculation of each task to be calculated of each user terminal locally on the user terminal, or offload it to a specified MEC server through a specified sub-channel for execution.
[0203] In some embodiments, a multi-task oriented edge computing resource allocation method can be implemented as a computer program, which is tangibly included in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by the processor 11, one or more steps of the multi-task oriented edge computing resource allocation method described above can be executed. Alternatively, in other embodiments, the processor 11 can be configured to execute a multi-task oriented edge computing resource allocation method in any other suitable way (for example, by means of firmware).
[0204] The various embodiments of the systems and techniques described above in this specification can be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGA), application specific integrated circuits (ASIC), application specific standard products (ASSP), systems on a chip (SOC), complex programmable logic devices (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be a special-purpose or general-purpose programmable processor that receives data and instructions from, and transmits data and instructions to, a storage system, at least one input device, and at least one output device.
[0205] The computer programs for implementing the methods of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions / operations specified in the flowchart and / or block diagram to be implemented. The computer programs can be executed entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
[0206] In the context of the present invention, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0207] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0208] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), blockchain network, and the Internet.
[0209] A computing system can include a client and a server. The client and the server are generally far from each other and usually interact through a communication network. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system and solves the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.
[0210] It should be understood that various forms of the processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in the present invention can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved, and no limitation is made herein.
[0211] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A multi-task-oriented edge computing resource allocation method, characterized in that, Including: Obtain a set of user terminals, a set of multi-access edge computing (MEC) servers, a set of tasks to be calculated for each user terminal, and a set of sub-channels for each MEC server that match the edge computing network to be optimized; According to the set of user terminals and the set of sub-channels of each MEC server, construct a network flow graph with each sub-channel as the first type of node, each user terminal as the second type of node, and the connection between the first type of node and the second type of node as the edge; Construct a cost calculation formula corresponding to the edges in the network flow graph. Among them, the cost calculation formula includes a transmission delay cost calculation sub-formula when all tasks to be calculated of a set user terminal are transmitted to a set MEC server through a set sub-channel, and a server calculation delay cost calculation sub-formula after all tasks to be calculated of a set user terminal are offloaded to a set MEC server; According to the calculation data volume, the number of computing resource cycles required for calculation, and the task delay requirements of each task to be calculated, as well as the total computing resources of each MEC server, use the shortest path fast algorithm to dynamically search for the task execution strategy with the minimum total cost in the network flow graph with the attached edge cost calculation formula; According to the task execution strategy, select to execute the calculation of each task to be calculated of each user terminal locally on the user terminal, or offload it to a specified MEC server through a specified sub-channel for calculation.
2. The method according to claim 1, characterized in that: According to the set of user terminals and the set of sub-channels of each MEC server, construct a network flow graph with each sub-channel as the first type of node, each user terminal as the second type of node, and the connection between the first type of node and the second type of node as the edge, including: According to the set of MEC servers including M MEC servers and the set of sub-channels each including I sub-channels, construct M*I first type of nodes, and label the MEC servers to which each first type of node belongs; According to the set of user terminals including N user terminals, construct N second type of nodes; After creating a virtual source point and a virtual sink point, establish a logical connection between the virtual source point and each first type of node, and establish a logical connection between each second type of node and the virtual sink point; After establishing the connection between each first type of node and each second type of node as the edge, obtain the network flow graph.
3. The method according to claim 1, wherein Construct a cost calculation formula corresponding to the edges in the network flow graph, including: Construct the following formula to construct the second type of node v representing the user terminal u u , and the first type of node representing the subchannel s on the MEC server e The cost calculation formula corresponding to the edges Among them, is the sub-expression for calculating the transmission delay cost, is the sub-expression for calculating the server computing delay cost; ω1 is the preset transmission cost coefficient, and ω2 is the preset computing cost coefficient; |TS u | is the total number of tasks to be calculated contained in the task group TSu of user terminal u, For TS u The amount of computational data for task k to be computed, Unload TS for user terminal u through subchannel s on MEC server e u The uplink transmission rate when all tasks to be calculated are in the For TS u The number of computing resource cycles required for the calculation of task k to be calculated, Estimated maximum remaining computing resources for MEC server e.
4. The method according to claim 3, characterized in that The method further includes: Calculate the uplink transmission rate when the user terminal u offloads all the tasks to be calculated in TS through the sub-channel s on the MEC server e by the following formula u in Where W is the channel bandwidth, p u is the uplink transmission power of user terminal u, is the channel gain when the user terminal u and the MEC server e transmit on the subchannel s, σ 2 Represents the noise power of additive white noise. u' is other user terminal, N is the total number of user terminals included in the user terminal set, and M is the total number of MEC servers included in the MEC server set. Indicates whether the other user terminal u' occupies the sub-channel s on the MEC server e. The value of is a binary variable, p u′ is the transmit power of the other user terminal u'. is the channel gain when the user terminal u' and the MEC server e transmit on the sub-channel s. And, the estimated maximum remaining computing resources of MEC server e are calculated by the following formula: Among them, f e is the total computing resource of MEC server e, and |U‘ e | represents the total number of user terminals included in the set U‘ of user terminals that have been matched to MEC server e e , is the task latency requirement of task k in TS u .
5. The method according to claim 1, characterized in that According to the calculation data volume, the number of computing resource cycles required for calculation, and the task delay requirements of each task to be calculated, as well as the total computing resources of each MEC server, use the shortest path fast algorithm to dynamically search for the task execution strategy with the minimum total cost in the network flow graph with the attached edge cost calculation formula, including: Initialize the capacity of each edge in the network flow graph D to 1, the flow and cost to 0, and construct the residual network D' of D, where the cost of each edge in D' is the same as that of D during initialization; Use the shortest path fast algorithm to perform an operation of finding an augmented path with the minimum cost on the residual network D'; If the augmented path is successfully found, increase the flow value along the augmented path in D, where the increased flow value is the minimum value of the capacities of the edges on the augmented path in the residual network; After updating the state of D' according to the current state of D, for each edge in D whose traffic value is increased to 1, after updating the costs of each edge in D' according to the cost calculation formula, return and execute the operation of using the shortest path fast algorithm to find an augmenting path with the minimum cost on the residual network D'. If the augmenting path is not successfully found, it is determined that an approximate optimal solution to the minimum cost maximum flow problem with dynamically changing costs has been successfully iteratively obtained. Generate a task execution strategy according to each edge in the current D with a traffic value of 1. Among them, if the second type node v of user terminal u in the current D u To the first type of node representing the subchannel s on the MEC server e Edge If the traffic value is 1, a sub-strategy is defined in the task execution strategy to offload all the tasks to be calculated in the task group to be calculated of the user terminal u through the sub-channel s on the MEC server e.
6. The method according to claim 5, characterized in that, According to the task execution strategy, select to execute the calculation of each task to be calculated of each user terminal locally on the user terminal, or unload it to a specified MEC server through a specified sub-channel for execution, including: If it is determined that the task execution strategy includes a target sub-strategy corresponding to the first user terminal, select to unload each task to be calculated of the first user terminal to the target MEC server through the target sub-channel defined in the target sub-strategy for execution. If it is determined that the task execution strategy does not include a sub-strategy corresponding to the second user terminal, select to execute the calculation of each task to be calculated of the second user terminal locally on the second user terminal.
7. The method according to any one of claims 1 to 5, characterized in that After selecting to execute the calculation of each task to be calculated of each user terminal locally on the user terminal or unload it to a specified MEC server through a specified sub-channel according to the task execution strategy, it further includes: Obtain a set of tasks to be executed corresponding to the target MEC server. According to the number of computing resource cycles required for the calculation of each task in the set of tasks to be executed and the task delay requirements, allocate the minimum amount of computing resources required for each task in the set of tasks to be executed respectively. According to the total computing resources of the target MEC server and the minimum amounts of computing resources already allocated, obtain the remaining computing resources of the target MEC server. After reallocating the remaining computing resources to each task in the set of tasks to be executed according to a preset proportional relationship, execute the calculation of each task in the set of tasks to be executed.
8. A multi-task oriented edge computing resource allocation device, characterized in that: The device includes: A resource acquisition module, configured to acquire a set of user terminals, a set of multi-access edge computing (MEC) servers, a set of tasks to be calculated for each user terminal, and a set of sub-channels for each MEC server that match the edge computing network to be optimized. A network flow graph construction module, configured to construct a network flow graph with each sub-channel as the first type of node, each user terminal as the second type of node, and the connection between the first type of node and the second type of node as an edge according to the set of user terminals and the set of sub-channels of each MEC server. A cost calculation module, configured to construct a cost calculation formula corresponding to the edge in the network flow graph, where the cost calculation formula includes a transmission delay cost calculation sub-formula for transmitting all tasks to be calculated of a set user terminal to a set MEC server through a set sub-channel, and a server calculation delay cost calculation sub-formula for unloading all tasks to be calculated of a set user terminal to a set MEC server. The optimal strategy search module is used to dynamically search for the task execution strategy with the minimum total cost in the network flow graph with the cost calculation formula of the edge based on the amount of computing data of each task to be calculated, the number of computing resource cycles required for calculation, the task latency requirement, and the total computing resources of each MEC server. The task execution module is used to select each pending computing task of each user terminal to be executed locally on the user terminal according to the task execution strategy, or to offload it to the designated MEC server through the designated sub-channel for execution.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute a multi-task oriented edge computing resource allocation method described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement a multi-task-oriented edge computing resource allocation method according to any one of claims 1 to 7 when executed.
Citation Information
Cited By
Solder ball distribution method and device and storage medium
CN120805515A