A task offloading method, device, and medium based on sequence diagrams and graph matching theory

Through a task unloading method based on timing chart and graph matching theory, the appropriate unloading node is dynamically selected, which solves the delay problem of computing-intensive applications in mobile scenarios in 6G networks, and achieves more efficient computing resource utilization.

CN116321199BActive Publication Date: 2025-06-27NANJING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310371249.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-10
Publication Date
2025-06-27
Estimated Expiration
2043-04-10

AI Technical Summary

Technical Problem

In 6G network, in mobile scenarios such as immersive XR applications, how to dynamically provide users with appropriate computing power services to reduce the actual computing delay of the application.

Method used

The task unloading method based on timing chart and graph matching theory is adopted, and the base station collection that changes dynamically during user movement is represented through the timing chart model, the task unloading problem is abstracted into graph homomorphic problems, and the task unloading strategy is solved using the A* algorithm to optimize the unloading node selection of subtasks.

Benefits of technology

It significantly reduces the actual completion delay of the application, optimizes the utilization of computing resources, and adapts to user mobility and subtask dependence.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116321199B_ABST
    Figure CN116321199B_ABST
Patent Text Reader

Abstract

The present invention discloses a task offloading method, device and medium based on a timing diagram and graph matching theory. Aiming at the problem of offloading tasks that depend on each other in a mobile scenario, a timing diagram model is adopted to represent the dynamically changing set of base stations during the user's movement from the time dimension. The one-to-many mapping relationship between the offloading nodes to be solved and the subtasks in the task offloading problem is abstracted into a graph homomorphism problem, and the task offloading strategy is solved based on the A* algorithm in graph matching theory. The task offloading method, device and medium based on a timing diagram and graph matching theory provided by the present invention, based on the timing diagram model, comprehensively considers the two restrictive factors of the dependence between subtasks and the mobility of the user, models the task offloading problem as a graph homomorphism problem from the graph matching theory, and proposes a reasonable solution for the offloading problem of dependent tasks in a mobile scenario based on the A* algorithm. This solution significantly reduces the actual completion delay of the application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a task offloading method, device and medium based on a timing diagram and graph matching theory, and belongs to the technical field of wireless communication. Background Art

[0002] With the smooth deployment of 5G networks, in-depth research on 6G has been carried out at home and abroad. From a typical scenario perspective, there is basically a consensus on five major scenarios globally, namely immersive communication / ultra-wideband, ultra-massive connection, extreme / critical communication / extremely reliable communication, communication perception integration, and the integration of artificial intelligence and communication. From the perspective of business use cases, digital twins and immersive applications will become one of the core services of 6G.

[0003] Many applications in the 6G era, such as XR (Extended Reality), AI, etc., are computationally intensive, and the requirements for terminals are also getting higher and higher. However, the capabilities of terminals in terms of computing power, power, etc. are limited. Therefore, it is necessary to provide additional computing power for users on the network side, such as through edge computing.

[0004] In the case of edge computing, the network not only needs to provide real-time computing services but also needs to ensure the QoS (such as latency) of computing tasks. In this regard, existing domestic manufacturers have proposed that the future 6G network functional architecture will be user-centric. In a user-centric network architecture, the network will dynamically provide computing power services for the network according to the user's behavior (such as service requirements and user mobility, etc.).

[0005] Taking immersive XR applications as an example, how the network side dynamically provides computing power services for users according to the user's mobility characteristics and the computing resources required by the application, that is, how to select appropriate offloading nodes for each subtask in a single application during the user's movement in the two computing offloading methods of local processing and edge offloading to reduce the actual computing latency of the application is a problem that needs to be studied. Summary of the Invention

[0006] Objective: In order to overcome the deficiencies in the prior art, the present invention provides a task offloading method, device and medium based on a timing diagram and graph matching theory.

[0007] Technical Solution: To solve the above technical problems, the technical solution adopted by the present invention is as follows:

[0008] In a first aspect, a task offloading method based on a timing diagram and graph matching theory includes the following steps:

[0009] Step S1: Obtain the set of subtasks in the application graph And sort all subtasks in ascending order according to the delay tolerance value of each subtask to determine the ranking of each subtask. The ranking of subtask v j is denoted as Rank(v j ).

[0010] Step S2: Determine the position of subtask v j in the application graph topology. If subtask v j is the entry subtask v0 of the application, then jump to Step S3. If subtask v j is the exit subtask v I of the application, then jump to Step S4. Otherwise, if subtask v j is an intermediate subtask of the application, then jump to Step S5.

[0011] Step S3: Determine the offloading node of subtask v0 as the user terminal, i.e., x 0,n = BS0. Delete subtask v0 from OpenList, put the matching pair (v0, BS0) into CloseList, and add the direct successor subtasks of subtask v0 to OpenList. OpenList is used to store the set of ready subtasks whose offloading methods need to be determined, and its initial value is the starting subtask v0 of the application. CloseList is used to store the determined matching pairs, and its initial value is an empty set. BS0 is the user terminal.

[0012] Step S4: Determine the offloading node of subtask v I as the user terminal, i.e., x I,n = BS0. Delete subtask v I from OpenList and put the matching pair (v I , BS0) into CloseList.

[0013] Step S5: Determine the corresponding offloading node for the intermediate subtask v j and form a matching pair (v j , BS n ), and put the matching pair into CloseList, including the following substeps:

[0014] Step S5-1: Determine the offloading node set CandidateSet and the set of ready subtasks OpenList at timestamp ts.

[0015] Step S5-2: Mark each subtask in OpenList to determine the subtasks for delayed offloading, the subtasks for serial processing, and the subtasks for normal offloading.

[0016] Step S5-3: Update the candidate offloading node sets for each subtask in the OpenList. At timestamp ts, if the tag of subtask v j is status(v j ) = 1, i.e., delayed offloading, then its candidate offloading node set is expanded to the union of the offloading node sets at the current timestamp and the next timestamp, i.e., If the tag of subtask v j is status(v j ) = 2, i.e., serial processing, then its candidate node set is expanded to the set of candidate nodes at the current timestamp and the offloading nodes of its predecessor subtasks, i.e., where subtask v i is the direct predecessor subtask of subtask v j ; If the tag of subtask v j is status(v j ) = 0, i.e., normal offloading, then the candidate node set is not updated and the initial value is used, i.e., is the base station node at timestamp ts, is the base station node at timestamp ts+1. x i,m is the offloading node determined by subtask v i at timestamp ts-1.

[0017] Step S5-4: According to the ranking order Rank(v j ) of each subtask in the OpenList, calculate the heuristic function value of each offloading node in the CandidateSet for each subtask in turn, take the offloading node with the smallest heuristic function value f(n) as the offloading node of the subtask, form a matching pair, and put the matching pair into the CloseList.

[0018] Step S6: Trace the previous matching pairs of the CloseList step by step from the last matching pair (v I , BS0) until the starting matching pair (v0, BS0), return the found result path, and the algorithm ends. Each determined matching pair is each point in the result path, then applying utility maximization (i.e., minimizing the completion delay) is transformed into a shortest path problem.

[0019] As an optimal solution, when the delay tolerance value of subtask v j is greater than the next timestamp, i.e., LST(v j ) > ts+1, subtask v j is determined to be delayed offloading and its tag is set to status(v j ) = 1.

[0020] As a preferred solution, subtask v j 's immediate predecessor subtask is v i . When subtask v i has multiple immediate successor subtasks v j , that is, succ(v i ) > 2, subtask v j is determined to be serially processed and marked as status(v j ) = 2. succ(·) is used to represent the set of immediate successor subtasks of a subtask.

[0021] As a preferred solution, when subtask v j does not meet the conditions for delayed unloading and serial processing, subtask v j is determined to be a normal unloading and marked as status(v j ) = 0.

[0022] As a preferred solution, the heuristic function value f(n) is calculated as follows:

[0023] f(n) = g(n) + h(n)

[0024] where: g(n) is the cost of the current matching pair (v j , BS n ) from the starting matching pair (v0, BS0), and h(n) is the estimated cost of the current matching pair (v j , BS n ) to the last matching pair (v I , BS0). That is, g(n) represents the time already used to complete the application, and h(n) represents the time still required to complete the application.

[0025] As a preferred solution, the formula for g(n) is as follows:

[0026]

[0027] where: VertexTrans(v j ) represents the cost of the conversion node operation, that is, the cost of mapping subtask v j to the offloading node BS n . EdgeTrans(v i , v j ) represents the cost of the conversion edge operation, that is, the cost of mapping the edge between subtask nodes (v i , v j ) ∈ ε A to the edge between offloading nodes (BS m , BS n ) ∈ ε S .

[0028] As a preferred solution, VertexTrans(v j ) is calculated as follows:

[0029] VertexTrans(v j ) = μ j / f n

[0030] VertexTrans(v j ) is the ratio of the computing resources required for task v j to the computing resources provided by the offloading node. μ j is the computing resources required for task v j , and f n is the computing resources provided by the offloading node for task v j .

[0031] As a preferred solution, EdgeTrans(v i , v j ) is calculated as follows:

[0032]

[0033] where: pred(v j ) represents the set of direct pre - sub - tasks of sub - task v j , ∈ i,j is the amount of data to be transferred between sub - task v i and sub - task v j , Λ m,n is the communication rate between offloading node BS m and offloading node BS n . BS n represents the candidate offloading node at timestamp ts, and BS m represents the candidate offloading node at timestamp ts - 1.

[0034] As a preferred solution, the formula for h(n) is as follows:

[0035] h(n) = (s m,n - a m′,m )-(a m,n - s m,n )

[0036] where: s m,n represents the start time of the edge between offloading node BS m and offloading node BS n , a m,n represents the start time of the edge between offloading node BS m and offloading node BS nThe end time of the edge connection between them, a m′,m represents the offloading node BS m′ and the offloading node BS m The end time of the edge connection between them, then (s m,n -a m′,m ) represents the duration that the user waits to access, (a m,n -s m,n ) represents the available duration after the user accesses. BS m′ represents the candidate offloading node at time stamp ts - 2, and BS m represents the candidate offloading node at time stamp ts - 1.

[0037] In a second aspect, a computer-readable storage medium stores a computer program thereon. When the computer program is executed by a processor, it implements a task offloading method based on a timing diagram and graph matching theory as described in any one of the first aspects.

[0038] In a third aspect, a computer device includes:

[0039] A memory for storing instructions.

[0040] A processor for executing the instructions, enabling the computer device to perform operations of a task offloading method based on a timing diagram and graph matching theory as described in any one of the first aspects.

[0041] Advantageous effects: A task offloading method, device, and medium based on a timing diagram and graph matching theory provided by the present invention address the offloading problem of dependent tasks in a mobile scenario. The timing diagram model is used to represent the dynamically changing set of base stations during the user's movement from the time dimension. The one-to-many mapping relationship between the offloading nodes to be solved and the subtasks in the task offloading problem is abstracted into a graph homomorphism problem, and the task offloading strategy is solved based on the A* algorithm in graph matching theory.

[0042] To further optimize the utility of the application, the timing information in the timing diagram model is incorporated into the design process of the task offloading strategy solving algorithm. Therefore, to solve the offloading problem of dependent tasks in a mobile scenario, the present invention is based on the timing diagram model, comprehensively considers the two restrictive factors of the dependence between subtasks and the mobility of the user, models the task offloading problem as a graph homomorphism problem starting from graph matching theory, and proposes a reasonable solution for the offloading problem of dependent tasks in a mobile scenario based on the A* algorithm. This solution significantly reduces the actual completion delay of the application. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 is an example diagram of the task offloading system provided by the present invention.

[0044] Figure 2It is the base station graph based on the timing diagram model provided by the present invention.

[0045] Figure 3 It is the application graph provided by the present invention that describes the dependency relationship between subtasks. Detailed implementation manners

[0046] The present invention will be further described below in conjunction with specific embodiments.

[0047] The first embodiment is a task offloading method based on the timing diagram and graph matching theory, including the following steps:

[0048] Step 1: Define the relevant parameters of the algorithm as follows:

[0049] Define OpenList, which is used to store the set of ready subtasks whose offloading methods need to be determined. Its initial value is the starting subtask v0 of the application. There are two offloading methods, namely local offloading of subtasks at the user terminal and edge offloading of subtasks to the edge server connected to the base station. For the sake of concise expression, the edge server connected to the base station is referred to as the base station node, and the user node and the base station node are collectively referred to as offloading nodes.

[0050] Define StatusList, which is used to store the set of subtasks that are not ready. Its initial value is the set of all subtasks in the application that need to determine the offloading strategy. The meaning of not being ready is that not all of the prerequisite subtasks of this subtask have been processed. Assume that there is a dependency relationship between subtask v i and subtask v j , then the calculation result v i of the subtask will be used as the input data of subtask v j . Therefore, when the prerequisite subtask v j of subtask v i has not been completed, it is impossible to start processing subtask v j . In addition, there may be multiple prerequisite subtasks for subtask v j .

[0051] Define CloseList, which is used to store the determined matching pairs. Its initial value is an empty set. The determined matching pair is (v j , x j,n ). The first element v j represents the subtask, and the second element x j,n represents the offloading node determined for subtask v j , and x j,nThe value of is the serial number of the offloading node. Specifically, the serial number of the offloading node being 0 indicates the user's terminal device. When all the matching pairs of subtasks are determined, the offloading strategies for all the subtasks in this application are thereby determined, i.e., the solution to the problem is achieved.

[0052] Define CandidateSet, which is used to store the set of candidate offloading nodes for each subtask, and its initial value is the set of base station nodes covering the user and the user's terminal at time 0, i.e., Since the user is performing task offloading in a moving state, as the user's location changes, the base station nodes covering the user are dynamically changing. Therefore, when offloading subtasks at different times, the available base station nodes for the subtasks are also different.

[0053] Define succ(·), which is used to represent the set of direct successor subtasks of a subtask. Subtask v i may have multiple direct successor subtasks (for example, the direct successor of subtask v i is subtask v j1 and subtask v j2 ), and there is a dependency relationship between subtasks, that is, there is a certain amount of data to be transferred between two related subtasks. If subtask v j1 and subtask v j2 select the same offloading node, then the amount of data that subtask v i originally needed to be transferred twice becomes transferred once, which reduces the completion delay of the application to a certain extent.

[0054] Step 2: Define the optimization objective of the OASA algorithm as follows:

[0055] In the case where both local processing and edge offloading coexist, how to design a reasonable task offloading strategy for each subtask in the application to minimize the actual completion delay of the application. Considering that the computing power of the edge server is much stronger than that of the user terminal, then choosing the edge offloading method instead of the local processing method for the same subtask will result in less application delay. Therefore, in order to minimize the completion delay of the application as much as possible, the subtask utility u j is defined to measure how much improvement the task offloading strategy can bring to the subtask in terms of delay. The definition formula of the subtask utility is as follows:

[0056]

[0057] where: represents the estimated completion time of subtask v j under the local processing method, and t j represents subtask v jThe actual completion time after selecting a reasonable offloading node. Since an application consists of multiple subtasks, the application utility u I is defined as the sum of the subtask utilities, i.e.:

[0058]

[0059] where: I represents the number of subtasks included in the application.

[0060] The overall optimization goal of the task offloading problem is to maximize the application utility, that is, to select a suitable task offloading strategy to minimize the completion delay of the application as much as possible. The formula for the optimization goal is as follows:

[0061]

[0062] where: x represents the offloading strategies of all subtasks in the application, and the offloading strategy of subtask v j is represented as x j,n .

[0063] In the process of solving this problem, the following two main challenges are faced.

[0064] One of the challenges lies in the mobility of users. Since users are in a mobile state and their geographical locations are changing, the base stations covering users are different at different times, that is, the edge servers that users can offload to are dynamically changing, and the computing resources that different edge servers can provide are also different. When users offload tasks during movement, the adverse impact brought by mobility is that users may cause the service base station to fail to return the calculation results of the subtasks being processed to the users in time before they leave the coverage area due to switching base stations, resulting in the interruption or even failure of task offloading. Considering this adverse factor, the accessible duration of the base station node is taken as one of the considerations when designing the task offloading strategy.

[0065] The second challenge lies in the dependence between subtasks. An application consists of multiple subtasks, and there is a dependence between subtasks, that is, a subtask needs the calculation results of its previous subtasks as the input during its execution process at the offloading node. Therefore, a subtask needs to wait for all its previous subtasks to be processed before it can start offloading. This shows that the completion delay of a subtask includes both the execution delay of its own operation at the offloading node and the transfer delay of transmitting the calculation results of the previous subtasks to the corresponding offloading node. Considering this adverse factor, in order to reduce the completion delay of subtasks, in addition to selecting an offloading node with more computing resources to reduce the execution delay, it is also necessary to consider whether to offload two dependent subtasks to the same offloading node according to the dependence relationship between subtasks to reduce the transfer delay.

[0066] To solve this problem, we transform the task offloading problem into a graph homomorphism problem, so that solving the maximum application utility, that is, solving the minimum completion delay of the application, is transformed into solving the shortest path. Since there are dependencies between subtasks, the completion time of the previous subtask is the start time of its direct successor subtask. Therefore, subtasks with dependencies will select appropriate offloading nodes and perform offloading at different times, and the set of candidate nodes at different times is dynamically changing due to the mobility of users. In this regard, the matching pairs formed by subtasks selecting appropriate offloading nodes from different sets of candidate offloading nodes at different times will be used as the nodes on the shortest path. Therefore, the shortest path finally output by the algorithm is each subtask in the application and its actual offloading node.

[0067] Step 3: Determine the input data and output results of the OASA algorithm, which are described as follows:

[0068] Input data: Application graph Base station graph

[0069] Output result: The matching relationship CloseList between subtasks and offloading nodes.

[0070] The meanings of the above parameters are explained as follows. is the set of subtasks in the application, represents the dependency relationship between subtasks, and the label L of the edge A is the amount of data to be transferred between two subtasks; is the set of offloading nodes (offloading nodes include base station nodes for edge offloading and user nodes for local processing), is the set of edges, and each edge represents a 2-hop link of base station-user-base station, and the label L S represents the available time period of the base station for the user, and the available time period parameter is given by the smooth-turn mobility model.

[0071] Step 4: Design the OASA (Optimized A_star Algorithm) algorithm, which is described as follows:

[0072] Step S1: Obtain the set of subtasks in the application graph and sort all subtasks in ascending order according to the delay tolerance value of each subtask to determine the ranking of each subtask. The ranking of subtask v j is denoted as Rank(v j ).

[0073] Step S2: Determine subtask v j in the application graph Position in the topology. If subtask v j is the entry subtask v0 of the application, jump to step S3. If subtask v j is the exit subtask v I of the application, jump to step S4. Otherwise, subtask v j is an intermediate subtask of the application, jump to step S5.

[0074] Step S3: Determine the offloading node of subtask v0 as the user terminal, i.e., x 0,n = BS0, delete subtask v0 from OpenList, put the matching pair (v0, BS0) into CloseList, and add the direct successor subtasks of subtask v0 to OpenList.

[0075] An application usually has only one entry subtask. This entry subtask needs to receive the application type specified by the user (such as XR, AI) and other related parameters. Therefore, this subtask is called the entry subtask as the entry of the entire application. The entry subtask is usually processed locally at the user terminal.

[0076] Step S4: Determine the offloading node of subtask v I as the user terminal, i.e., x I,n = BS0, delete subtask v I from OpenList, put the matching pair (v I , BS0) into CloseList. Trace the previous matching pairs step by step from the last matching pair in CloseList until the starting matching pair (v0, BS0), return the found result path, and the algorithm ends.

[0077] Subtask v I is the exit of the entire application, and its calculation result is the calculation result of the entire application. Usually, the exit subtask is placed at the user terminal for local processing to ensure that the user can receive the calculation result of the application in a timely manner.

[0078] Step S5: Determine the corresponding offloading node for the intermediate subtask v j , including the following substeps:

[0079] Step S5-1: Determine the offloading node set CandidateSet at timestamp ts and the ready subtask set OpenList.

[0080] Step S5-2: Mark each subtask in OpenList to determine the subtasks for delayed offloading, the subtasks for serial processing, and the subtasks for normal offloading.

[0081] When the latency tolerance value of a subtask is greater than the next timestamp, i.e., LST(v j ) > ts + 1, the subtask v j is determined to be delayed offloaded and marked as status(v j ) = 1; the direct predecessor subtask of subtask v j is v i . When subtask v i has multiple direct successor subtasks v j , i.e., succ(v i ) > 2, the subtask v j is determined to be processed serially and marked as status(v j ) = 2; when subtask v j does not meet the above two conditions, the subtask v j is determined to be normally offloaded and marked as status(v j ) = 0.

[0082] Subtasks that are delayed offloaded will have the opportunity to connect to a base station node with better offloading conditions (offloading conditions include the computing resources provided by the base station and the available duration after the user connects to the base station). This fully utilizes the favorable impact brought by user mobility. Since user mobility makes the base stations covering the user dynamically change, if the base station covering the user at the current moment has poor offloading conditions (for example, the available duration for the user to connect is short and the user will quickly switch after connecting), the user can choose to connect to the base station at the next moment in order to connect to a base station node with better offloading conditions, enabling subtasks that might originally be processed locally to be edge offloaded;

[0083] Subtasks that are processed serially will have the possibility to choose the same offloading node as other successor subtasks of its predecessor subtask, reducing the transfer latency of subtasks by reducing the number of transfers;

[0084] Subtasks that are normally offloaded are subtasks that do not adopt the above two methods of delayed offloading and serial processing. This type of subtask will select the offloading node with the best offloading conditions from the set of base stations covering the user at the current moment.

[0085] Step S5-3: Update the candidate offloading node set according to the mark of each subtask in OpenList. At timestamp ts, if the mark of subtask v j is status(v j ) = 1, i.e., delayed offloading, its candidate offloading node set is expanded to the union of the offloading node sets at the current timestamp and the next timestamp, i.e., If the mark of subtask v j is status(vj ) = 2, that is, serial processing, then its candidate node set expands to the set of candidate nodes at the current timestamp and the offloading nodes of its previous subtasks, that is where the subtask v i is the direct previous subtask of subtask v j ; if the flag of subtask v j is status(v j ) = 0, that is, ordinary offloading, then the candidate node set is not updated and the initial value is used, that is

[0086] Step S5-4: According to the ranking order Rank(v j ) of each subtask in the OpenList, determine a suitable offloading node for each subtask in turn. The way to determine the offloading node is to calculate the heuristic function value of each offloading node in the CandidateSet set, and use the offloading node with the smallest heuristic function value f(n) as the offloading node of the subtask.

[0087] The heuristic function value f(n) is composed of two terms, that is, f(n) = g(n) + h(n), where g(n) is the cost of the current matching pair (v j , BS n ) from the starting matching pair (v0, BS0), and h(n) is the estimated cost of the current matching pair (v j , BS n ) to the last matching pair (v I , BS0), that is, g(n) represents the time taken to complete the application, and h(n) represents the time still required to complete the application. Apply the heuristic function to the task offloading problem to be solved, and use the completion time of subtask v j on the offloading node BS n , that is, the matching cost cost(v j,n ) of the subtask, as g(n), and use the sum of the available duration provided by the offloading node BS n to the user and the waiting access duration as h(n). The formula of the heuristic function is as follows:

[0088] f(n) = g(n) + h(n)

[0089]

[0090] where: VertexTrans(v j ) represents the cost of the conversion node operation, that is, the cost of mapping subtask v j to the offloading node BS n , and its cost value is subtask v j on the offloading node BSn The execution time on it is calculated by the formula:

[0091] VertexTrans(v j ) = μ j / f n

[0092] VertexTrans(v j ) is the ratio of the computing resources required for task v j to the computing resources provided by the offloading node. μ j is the computing resources required for task v j , and f n is the computing resources provided by the offloading node for task v j .

[0093] EdgeTrans(v i , v j ) represents the cost of converting the edge operation, that is, mapping the edge (v i , v j ) ∈ ε A into the edge (BS m , BS n ) ∈ ε S between offloading nodes. The cost value is the data transfer time brought by task v i transferring the calculation result to task v j . The calculation formula is:

[0094]

[0095] where: pred(v j ) represents the set of direct predecessor subtasks of subtask v j , ∈ i,j is the amount of data to be transferred between subtask v i and subtask v j , Λ m,n is the communication rate between offloading nodes BS m and offloading node BS n . BS n represents the candidate offloading node at timestamp ts, and BS m represents the candidate offloading node at timestamp ts - 1. x j,m represents the offloading node determined by subtask v j at timestamp ts - 1.

[0096] h(n) = (s m,n - a m′,m ) - (a m,n - s m,n )

[0097] Where: s m,n represents the start time of the edge between the offloading node BS m and the offloading node BS n , a m,n represents the end time of the edge between the offloading node BS m and the offloading node BS n . a m′,m represents the end time of the edge between the offloading node BS m ' and the offloading node BS m . Then (s m,n - a m′,m ) represents the duration that the user waits for access, and (a m,n - s m,n ) represents the available duration after the user accesses. BSm' represents the candidate offloading node at timestamp ts - 2, and BS m represents the candidate offloading node at timestamp ts - 1.

[0098] The second embodiment: A computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements a task offloading method based on a timing diagram and graph matching theory as described in any one of the first embodiments.

[0099] The third embodiment: A computer device, comprising:

[0100] A memory for storing instructions.

[0101] A processor for executing the instructions, such that the computer device performs the operations of a task offloading method based on a timing diagram and graph matching theory as described in any one of the first embodiments.

[0102] The fourth embodiment:

[0103] The A* algorithm represents the solution of a problem as a state to describe the progress of the problem at a certain moment. Considering that solving the offloading strategy essentially involves solving the one-to-many mapping relationship between subtasks and offloading nodes, i.e., the graph homomorphism problem, the concept of state in the A* algorithm can be used to represent the task offloading strategy at a specific moment. In addition, since there are dependencies between subtasks, for example, for serially processed subtasks, their offloading nodes may be associated with the offloading nodes of their previous subtasks. Therefore, there is a certain association between the offloading methods of subtasks. The A* algorithm represents all solutions of the problem as a sequence of states, and this feature can be used to characterize the association between the offloading methods of subtasks. Considering the fit of the A* algorithm in the above two key aspects, the A* algorithm is used to solve the offloading problem of dependent tasks in a mobile scenario.

[0104] The A* algorithm is essentially also an algorithm for finding the shortest path. The OpenList represents the set of reachable nodes around, and the CloseList represents the nodes that have been determined to be on the shortest path. Each time, a point is selected from the OpenList as a new starting point, and the set of reachable nodes around this new starting point is re-designated as the OpenList, and a point is selected from the OpenList as the new starting point until the end point is reached. Selecting a new starting point from the OpenList is achieved by calculating the heuristic function value f(n), and the node with the smallest heuristic function value is used as the new starting point. Since the task offloading strategy is being solved, the nodes on the shortest path in the A* algorithm are equivalent to the matching pairs to be solved.

[0105] The scenario of task offloading is as Figure 1 shown. There are 7 base stations and 1 mobile user in the system, and each base station is equipped with a corresponding MEC server. The user needs to offload a computationally intensive application with a deadline of D, that is, it needs to be completed within the time period (0, D), to the base station or its own terminal device. Only the user's location within the time period (0, D) and the base stations covering the user are considered in this case. During the movement of the user, the geographical location of the user is constantly changing, and the base stations covering the user are also constantly changing dynamically. For the sake of easy processing, by means of "sampling", the base stations that the user can access at certain discrete moments are used as the set of offloadable base stations, rather than considering the set of base stations covering the user at each moment. These discrete moments are denoted as timestamps, that is At the time stamp T1, the base stations covering the user are BS1 and BS2. The user accesses and offloads some subtasks to BS2. Since the next offloading process occurs at the time stamp T2, when the user selects BS2 as the offloading node, the available time period for the user, that is, the dwell time, is (0, t3), and the unavailable time period, that is, the moving time, is (t3, T2). Therefore, it can be analyzed from this scenario that as the geographical location of the user changes, the base stations covering the user change dynamically, that is, the switching frequency of the user is relatively high compared to static users. When the user leaves the coverage area of a certain base station, that base station is unavailable to the user. Therefore, the available duration after the user accesses a certain base station is limited, which also means that the task offloading process needs to occur within the available time period to ensure the normal progress of the offloading process.

[0106] To characterize the dynamically changing offloading nodes, a timing diagram is used for modeling. The set of offloadable nodes during the user's movement is represented as a directed timing diagram where is the set of offloading nodes, (the offloading nodes include the base station nodes for edge offloading and the user nodes for local processing); is a set of edges, where each edge represents a two-hop link of base station - user - base station, and the label L S is used to represent the available time period of the base station for the user, which is given by the smooth-turn mobility model.

[0107] Take Figure 1 the research scenario shown as an example to explain the timing diagram model (as Figure 2 shown). Three samplings are performed on the complete offloading process, that is, the time period (0, D) is marked with three timestamps, which means that the user completes the computationally intensive application within the time period (0, D) through three offloading processes. The first sampling moment T1 is the moment when the user starts task offloading. At this moment, the set of base stations that the user can offload to is The set of base stations that the user can offload to at the second sampling moment T2 is The set of base stations that the user can offload to at the third sampling moment T3 is Therefore, the set of base stations that the user can access during the entire task offloading process is The set of offloadable nodes during the entire process is where BS0 is the user's terminal device to represent the computational offloading method of local processing. For the link label between base station node BS m and base station node BS n , use L m,n =(s m,n , a m,n ) to represent the available time period of the user within the range of base station BS m after leaving base station BS n . Take base station 3 at the T2 timestamp as an example. The timestamp on the link between base station 1 and base station 3 is (t2, t6). At time t2, the user has left the coverage range of BS1 and entered the coverage range of BS3, and leaves the coverage range of BS3 at time t6; the timestamp on the link between base station 2 and base station 3 is (t3, t6). At time t3, the user leaves the coverage range of BS2 and at this time the user is already within the coverage range of BS3, so the start time of the link is t3, and the user leaves the coverage range of BS3 at time t6.

[0108] The computationally intensive application to be offloaded is composed of multiple subtasks with dependencies, so it is represented by an application graph (as Figure 3 shown), that is where is the set of subtasks, and the set of edges is used to represent the dependencies between subtasks, where the label L of the edge A is the amount of data to be transferred between two subtasks. If the input of subtask requires subtask If the output results are such that there is a dependency relationship between these two subtasks, subtask v i is the direct predecessor subtask of subtask v j , and subtask v j is the direct successor subtask of subtask v i , then their dependency relationship is (v i , v j ) ∈ ε A . The latency limit of the application is D (unit: seconds), and the number of subtasks is The set representation of the subtask subscript is Express the subtask as a triple, that is, v j = (λ j , μ j , d j ), where λ j represents the input data size of the subtask (unit: bit), μ j represents the computing resources required by the subtask (unit: cycles), d j represents the latency tolerance of the subtask (unit: seconds), and the amount of data to be transferred between subtask v i and subtask v j is denoted as ε i,j .

[0109] In the face of the challenges of subtask dependency and user mobility, in order to solve the task offloading strategy, the task offloading problem is abstracted into a graph homomorphism problem to establish a one-to-many mapping relationship between offloading nodes and subtasks, which enables considering the mapping of nodes and edges in the application graph to simultaneously optimize the execution computing time and data transfer time of subtasks. For the solution of the graph homomorphism problem, the Graph Edit Distance (GED) is used as an index of graph similarity. First, determine the set of edit operations and define the corresponding costs for each edit operation, then define the similarity index, and finally use the improved A* algorithm, namely the provided OASA algorithm, to solve the graph edit sequence, that is, the task offloading strategy.

[0110] The operation of mapping subtask v j to offloading node BS n is used as the transformation node operation, denoted as VertexTrans(·). There are two types of offloading nodes. The first type is the user node, and the second type is the base station node. Therefore, there are two costs for the node transformation operation. If the subtask is mapped to a user node, the cost of the transformation node operation is the local computing time of this subtask, that is, VerTrans(v j ) = μ j / f0. If the subtask is mapped to a base station node, the cost of the node conversion operation is the execution time of the subtask in the edge offloading mode, i.e., VertexTrans(v j ) = μ j / f n . Where f0 is the CPU frequency of the user terminal, and f n is the computing resource allocated by the base station node BS n to this subtask.

[0111] Assume that the offloading node of subtask v i is BS m , and the offloading node of subtask v j is BS n . Then, mapping the edge (v i , v j ) between subtask nodes to the edge between offloading nodes (BS m , BS n ) is called the edge conversion operation, and the cost of this operation is denoted as EdgeTrans(v i , v j ). The existence of an edge between subtasks indicates that there is a dependency relationship between these two subtasks and a certain amount of data needs to be transferred. Therefore, there is a data transfer time when BS m ≠ BS n , and there is no data transfer time when BS m = BS n . Therefore, the completion time of subtask v j can be expressed as:

[0112]

[0113] Define the similarity index as that is, the negative value of the application completion time. Then, the smaller the application completion time, the higher the similarity between the two graphs.

[0114] The description of the OASA algorithm for solving the graph homomorphism problem, i.e., the task offloading problem, is as follows:

[0115]

[0116]

[0117] The above is only the preferred embodiment of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.

Claims

1. A task offloading method based on timing diagrams and graph matching theory, characterized in that: It includes the following steps: Step S1: Obtain the application graph and acquire the set of subtasks and sort all the subtasks in ascending order according to the latency tolerance value of each subtask to determine the rank of each subtask. The rank of subtask v j is denoted as Rank(v j ); where the computationally intensive application to be offloaded is represented by the application graph , is the set of subtasks in the application, and ε A represents the dependency relationship between subtasks; the computationally intensive application to be offloaded consists of multiple subtasks with dependency relationships; Step S2: Determine subtask v j In the application graph Location; if subtask v j Is the entry subtask v0 of the application, jump to step S3; if subtask v j Is the exit subtask v I Then jump to step S4; otherwise, subtask v j Is the intermediate subtask of the application, then jump to step S5; Step S3: Determine the offloading node of subtask v0 as the user terminal, i.e., x 0,n = BS0, delete subtask v0 from the OpenList, put the matching pair (v0, BS0) into the CloseList, and add the direct successor subtasks of subtask v0 to the OpenList; the OpenList is used to store the set of ready subtasks whose offloading methods are to be determined, and its initial value is the starting subtask v0 of the application; the CloseList is used to store the determined matching pairs, and its initial value is an empty set; BS0 is the user terminal; where BS n represents the offloading node with serial number n, where the offloading nodes include: user terminals and base stations. When n = 0, BS n i.e., BS0 represents the user terminal for local processing of subtasks; when n ≠ 0, BS n represents the base station for edge computing of subtasks; Step S4: Determine the offloading node of subtask v I as the user terminal, i.e., x I,n = BS0, delete subtask v I from OpenList, and put the matching pair (v I , BS0) into CloseList; Step S5: For the intermediate subtask v j Determine the corresponding offloading node and form a matching pair (v j , BS n ), and put the matching pair into the CloseList, including the following sub-steps: Step S5-1: Determine the set of offloading nodes CandidateSet and the set of ready subtasks OpenList at timestamp ts; Step S5-2: Mark each subtask in OpenList to determine the subtasks for delayed offloading, the subtasks for serial processing, and the subtasks for normal offloading; Step S5-3: Update the candidate offloading node sets for each subtask in the OpenList; at timestamp ts, if the tag of subtask v j is status(v j ) = 1, i.e., delayed offloading, then its candidate offloading node set is expanded to the union of the offloading node sets at the current timestamp and the next timestamp, that is If the tag of subtask v j is status(v j ) = 2, i.e., serial processing, then its candidate node set is expanded to the set of candidate nodes at the current timestamp and the offloading nodes of its previous subtask, that is where subtask v j is the direct previous subtask of subtask v j ; if the tag of subtask v j is status(v j ) = 0, i.e., normal offloading, then the candidate node set is not updated and uses the initial value, that is is the base station node at timestamp ts, is the base station node at timestamp ts+1; x i,m is the offloading node determined by subtask v i at timestamp ts-1; Step S5-4: According to the ranking order Rank(v of each subtask in the OpenList j ), calculate the heuristic function value of each offloading node in the CandidateSet for each subtask in turn. Take the offloading node with the smallest heuristic function value f(n) as the offloading node of the subtask, form a matching pair, and put the matching pair into the CloseList; Step S6: Starting from the last matching pair (v I , BS0) in the CloseList, gradually trace the previous matching pairs until the starting matching pair (v0, BS0), return the found result path, and the algorithm ends.

2. A task offloading method based on a timing diagram and graph matching theory according to claim 1, wherein: When the latency tolerance value of subtask v j is greater than the next timestamp, i.e., LST(v j ) > ts + 1, the subtask v j is determined to be delayed offloaded and marked as status(v j ) = 1; Subtask v j The immediate predecessor subtask of i is v. When subtask v i has multiple immediate successor subtasks v j i.e., when succ(v i ) > 2, subtask v j is determined to be processed serially and is marked as status(v j ) = 2; succ(·) is used to represent the set of immediate successor subtasks of a subtask. When subtask v j does not meet the requirements of deferred unloading and serial processing, subtask v j is determined to be a normal unloading and is marked as status(v j ) = 0.

3. A task offloading method based on a timing diagram and graph matching theory according to claim 1, wherein: The heuristic function value f(n) is calculated as follows: f(n) = g(n) + h(n) where: g(n) is the cost of the current matching pair (v j , BS n ) from the starting matching pair (v0, BS0), and h(n) is the estimated cost of the current matching pair (v j , BS n ) from the last matching pair (v I , BS0), that is, g(n) represents the time elapsed for completing the application, and h(n) represents the remaining time required for completing the application.

4. A task offloading method based on a timing diagram and graph matching theory according to claim 3, wherein: The calculation formula of g(n) is as follows: where: VertexTrans(v j ) represents the cost of the conversion node operation, that is, the cost of mapping the subtask v j to the offloading node BS n ; EdgeTrans(v i , v j ) represents the cost of the conversion edge operation, that is, the cost of mapping the edge between subtask nodes (v i , v j ) ∈ ε A to the edge between offloading nodes (BS m , BS n ) ∈ ε S . represents the set of offloading nodes, and L S represents the available time period of the base station for the user.

5. A task offloading method based on a timing diagram and graph matching theory according to claim 4, wherein: The VertexTrans(v j ) calculation formula is as follows: VertexTrans(v j ) = μ j / f n Among them, μ j is the computing resource required for subtask v j and f n is the computing resource provided by the offloading node for subtask v j ​ 6. A task offloading method based on a timing diagram and graph matching theory according to claim 4, wherein: The EdgeTrans(v i , v j ) calculation formula is as follows: where: pred(v j ) represents the set of direct predecessor subtasks of subtask v j , ∈ i,j is the amount of data to be transferred between subtask v i and subtask v j , Λ m,n is the communication rate between offloading nodes BS m and offloading node BS n ; BS n represents the candidate offloading node at timestamp ts, and BS m represents the candidate offloading node at timestamp ts - 1.

7. A task offloading method based on a timing diagram and graph matching theory according to claim 3, wherein: The calculation formula of h(n) is as follows: h(n) = (s m,n - a m′,m ) - (a m,n - s m,n ) where: s m,n represents the start time of the edge between the offloading node BS m and the offloading node BS n a represents the end time of the edge between the offloading node BS m,n and the offloading node BS m and the offloading node BS n a represents the end time of the edge between the offloading node BS m′,m and the offloading node BS m′ and the offloading node BS m a, then (s m,n - a m′,m ) represents the duration that the user waits to access, (a m,n - s m,n ) represents the available duration after the user accesses. BS m′ represents the candidate offloading node at timestamp ts - 2, BS m represents the candidate offloading node at timestamp ts - 1.

8. A computer-readable storage medium, characterized in that: Stored thereon is a computer program, which when executed by a processor, implements a task offloading method based on a timing diagram and graph matching theory as described in any one of claims 1-7.

9. A computer device, comprising: A memory for storing instructions; A processor for executing the instructions, such that the computer device performs the operations of a task offloading method based on a timing diagram and graph matching theory as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Joint optimization method for task unloading and resource allocation in multi-cell scene

    CN111586720A

  • Unloading method based on task relevance in Internet of Vehicles

    CN114980029A