A reliable offloading method based on deep reinforcement learning in edge scenarios of connected vehicles
By applying deep reinforcement learning methods in the edge scenarios of the Internet of Vehicles, combining the urgency and importance of tasks, optimizing the allocation and processing order of tasks on multiple RSUs solves the problem that existing technologies fail to effectively consider the reliability of dynamic scenarios. problems, improving system reliability and task completion rate.
Patent Information
- Application Number
- CN202410180549.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-18
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2044-02-18
AI Technical Summary
The existing technology fails to effectively consider the reliability of task offloading strategies in dynamic scenarios in the edge scenarios of the Internet of Vehicles. It only focuses on the impact of static scenarios and data transmission failures on reliability, and does not fully evaluate the offloading situation of tasks during the offloading process.
Using a method based on deep reinforcement learning, through collaborative decision-making between vehicles, roadside units and clouds, combined with the urgency and importance of tasks, a Markov decision-making process and dynamic queue-jumping strategy are designed to optimize tasks on multiple RSUs. Allocation and processing order to improve system reliability.
It realizes reliable offloading decisions for diversified tasks and diversified resources in the edge scenario of the Internet of Vehicles, improves the system's transmission success probability and calculation success probability, and ensures the weight of task delay and importance in reliability evaluation and dynamic adjustment. Offload strategies to suit needs at different times.
Smart Images

Figure CN118075263B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of task offloading technology, and in particular to a reliable offloading method based on deep reinforcement learning in edge scenarios of Internet of Vehicles. Background Art
[0002] In order to improve the performance of VEC (Vehicle Edge Computing) networks, offloading schemes have been widely studied. In the prior art, a solution studies a dependency-aware task scheduling problem and designs a multi-task scheduling scheme for multiple applications to shorten the completion delay. Another solution considers partial offloading and effectively reduces energy consumption by proposing multi-user partial computing. Another solution proposes a task offloading strategy considering multi-hop vehicles in VEC to minimize the computational cost and execution delay of all tasks. In order to reduce the energy consumption and delay of tasks, another solution studies this problem by jointly considering resource allocation and offloading in VEC, and proposes a two-layer optimization algorithm based on deep q-network and gradient descent method. Another solution designs a co-offloading method considering energy consumption and QoS (Quality of Service). A Bayesian optimization-based computation offloading (BOCO) method is designed to obtain offloading decisions. While ensuring QoS, it avoids high energy consumption and excessive resource allocation in pursuit of delay minimization. Another solution proposes an offloading algorithm based on meta-reinforcement-deep reinforcement learning, aiming to reduce energy consumption and delay. The algorithm consists of a meta-reinforcement learning model and a deep reinforcement learning model. The meta-reinforcement learning model can improve the migration ability of the entire model, while deep reinforcement learning can learn models from historical task offloading scenarios by combining multiple parallel deep neural networks. There are also schemes that consider the computational scheduling and offloading problems of a series of dependent tasks in a MEC system consisting of multiple MEC (Mobile Edge Computing) servers and one mobile device. They proposed a parallel transmission and execution scheme to reduce the maximum completion time of all tasks. There are also schemes that establish a collaborative offloading game between vehicles, edge servers, and cloud servers to obtain an effective offloading strategy. After proving the unique Nash equilibrium, a collaborative task offloading algorithm based on a genetic algorithm is proposed.
[0003] The disadvantages of the above-mentioned task offloading methods in the prior art include: the prior art only considers the impact of data transmission and task completion failure on reliability. It only considers static offloading scenarios, and does not consider the dynamic scenario of task arrival after the offloading strategy is determined. In fact, these are just some indicators that affect reliability, and the offloading of tasks completed in the process of executing the offloading strategy should be considered. Summary of the invention
[0004] The embodiments of the present invention provide a reliable unloading method based on deep reinforcement learning in the edge scenario of the Internet of Vehicles, so as to realize a reasonably designed unloading solution and improve the performance of the Internet of Vehicles.
[0005] In order to achieve the above object, the present invention adopts the following technical scheme.
[0006] A reliable offloading method based on deep reinforcement learning in edge scenarios of Internet of Vehicles, comprising:
[0007] The vehicle sends an unloading task request to the access roadside unit, and the unloading task request carries task data, which includes input data, calculation amount, delay limit and task importance;
[0008] After receiving the unloading task request sent by the vehicle, the access roadside unit requests the cloud layer for an unloading solution. After the cloud layer generates the unloading solution, it sends the unloading solution to the access roadside unit.
[0009] The access roadside unit transmits the task data to the target roadside unit according to the unloading scheme;
[0010] The target roadside unit calculates the task data and transmits the calculation result to the access roadside unit, and the access roadside unit returns the calculation result to the vehicle.
[0011] Preferably, the vehicle sends an unloading task request to the access roadside unit, and the unloading task request carries task data, and the task data includes input data, calculation amount, delay limit and task importance, including:
[0012] The cloud-edge-end scenario of the Internet of Vehicles consists of a cloud layer, an edge layer, and a user layer. The cloud layer includes a cloud server, which is responsible for providing an offloading solution. The edge layer includes multiple roadside units set up along the road. The set of roadside units is represented as Let F n represents the computing resources deployed on RSU n. Each roadside unit can only calculate one task at a time. The user layer consists of various vehicles. The vehicle set is represented by Assume that each vehicle generates only one task at a time, and the time is divided into several cycles, represented as Each cycle is discretized into several time slots, represented as represents the Jth time slot in the kth cycle, time slot The task set is represented as represents the Mth task on the Jth time slot of the kth cycle;
[0013] Task ψ m is represented as a four-tuple {D m , C m , τ m , κ m}, D m represents the amount of input data, C m represents the amount of computation, τ m represents the delay limit, κ m represents the importance of the task, taking the urgency and importance of the task as two influencing factors of the task priority, u1, u2, ... represent the sorted list of the urgency of the task, v1, v2, ... represent the sorted list of the importance of the task, and the task ψ m The priority of w m It is expressed as:
[0014]
[0015] w m Represents the task ψ m The priority of u m Represents the task ψ m The urgency of m Represents the task ψ m The importance of
[0016] Vehicle m sends an unloading task ψ to connected RSU i m Request to upload task ψ to connected RSU i m The data upload delay is expressed as:
[0017]
[0018] represents the time delay of vehicle m uploading task data to connected RSU i, D m Represents the task ψ m The amount of input data, R m,i Represents the transmission rate between vehicle m and connected RSU i.
[0019] Preferably, after receiving the unloading task request sent by the vehicle, the access roadside unit requests an unloading plan from the cloud layer, and after the cloud layer generates the unloading plan, the cloud layer sends the unloading plan to the access roadside unit, including:
[0020] After RSU n receives the offloading task data, the waiting queue on RSU n is expressed as:
[0021]
[0022] Where Q represents the number of tasks unloaded on RSU n. At the initial time of cycle k, the tasks in the system are expressed as: Ψ(k) = {ψ1, ψ2, ..., ψ M}, task ψ m The uninstallation strategy is expressed as:
[0023]
[0024] Where n represents the task ψ m is offloaded to RSU n, Indicates that task m on RSU n is are counted;
[0025] The offloading strategy of the task set Ψ(k) is expressed as:
[0026]
[0027] The task is offloaded to the RSU, and the available RSUs are Select from, expressed as:
[0028] n∈{0, 1, ..., N}
[0029] The constraints for setting the initial unloading decision problem include:
[0030] RSU n waits for tasks in the queue to be satisfied
[0031]
[0032] Among them, the waiting queue of tasks on RSU n is expressed as
[0033] Task ψ q The start time of the task ψ on RSU n should be later than that of the previous task ψ on RSU n. q-1 The end time is expressed as:
[0034]
[0035] in, is the previous task ψ q-1 The end time of The task ψ q Start time;
[0036] Task ψ q Completion time It is expressed as:
[0037]
[0038] The objective function of the initial unloading decision problem is set as:
[0039]
[0040] stn∈(0, 1, ..., N}
[0041]
[0042]
[0043]
[0044] Modeling the objective function of the initial unloading decision problem as a Markov decision process;
[0045] When a new task arrives, the dynamic queue insertion strategy is used to insert the task into the waiting queue on the RSU to locally adjust the initial offloading strategy. m When an offloading request arrives, the cloud layer obtains a new task ψ m The priority of w m ,The insertion point in the waiting queue on the RSU is determined according to the priority of the task ψ m The insertion point in the waiting queue at each RSU is represented as:
[0046]
[0047] in, Indicates that the task is calculated for the i-th time on RSU n, and indicates that the task is inserted before the i-th task on RSUn;
[0048] When the task m When offloading to each RSU, the cloud layer calculates the system reliability. By comparing the system reliability on each RSU, the cloud layer obtains the task ψ m Uninstallation solution It is expressed as:
[0049]
[0050] After the above two steps, the new task ψ m The uninstallation scheme is determined.
[0051] When B tasks arrive at the same time, the unloading scheme is expressed as:
[0052]
[0053] The task insertion factor is set. When determining the insertion point of the new task on each RSU, it is judged whether the insertion factor of the subsequent task has reached the limit. If the limit has been reached, the insertion point will be changed to a point after the original insertion point;
[0054] The task queue position on RSU n is represented as in Represents the task ψ Q Rank k on RSUn, when a new task ψ m is offloaded to RSU n, and its priority satisfy When task ψ m The processing order is expressed as:
[0055]
[0056] in Represents the task on RSU n The number of times a task is inserted into the queue, χ represents the maximum number of times each task is inserted into the queue. On Task If you uninstalled before, satisfy Task The processing order p q It is expressed as:
[0057]
[0058] Similarly, the task The processing order is expressed as:
[0059]
[0060] In this way, the cloud layer can obtain the offloading strategy for new tasks without affecting the execution of current tasks.
[0061] The purpose of dynamic queue unloading is to maximize the reliability of the system. The system reliability is expressed as:
[0062]
[0063] The constraints for setting the dynamic queue-jumping unloading decision problem include:
[0064] When a new task arrives, the RSU to which it is unloaded must be selected from N, expressed as:
[0065] b∈{1, 2, ..., N}
[0066] The choice of task insertion point on RSU is limited, expressed as:
[0067]
[0068] Among them, M n Indicates the number of tasks on RSUn;
[0069] The upper limit of the number of times a task can be interrupted in the queue is x, which is expressed as:
[0070]
[0071] The objective function of the dynamic queue-jumping unloading decision problem is set as follows:
[0072]
[0073]
[0074]
[0075]
[0076]
[0077]
[0078]
[0079]
[0080] The objective function of the dynamic queue-jumping unloading decision problem is modeled as a Markov decision process.
[0081] State Space:
[0082]
[0083] Action Space:
[0084]
[0085] Reward function:
[0086]
[0087] A deep reinforcement learning algorithm is used to solve the objective function of the dynamic queue-jumping unloading decision-making problem. The optimization goal is used as the reward function, and the constraints are written into the algorithm environment. The machine learns the strategy through training, and the value of the action is used as the solution result, which includes which RSU the tasks in the system are assigned to.
[0088] It can be seen from the technical solution provided by the above-mentioned embodiments of the present invention that the embodiments of the present invention propose a reliability assessment mechanism in combination with the Internet of Vehicles communication scenario, which incorporates factors such as transmission success probability, calculation success probability, task importance and required delay into the reliability assessment mechanism, so as to realize unloading decisions in the Internet of Vehicles edge scenarios with diversified tasks and resources.
[0089] Additional aspects and advantages of the present invention will be given in part in the following description, which will become obvious from the following description, or may be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0090] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0091] Figure 1 A processing flow chart of a reliable unloading method based on deep reinforcement learning in an edge scenario of an Internet of Vehicles provided by an embodiment of the present invention;
[0092] Figure 2 A model structure diagram of a cloud-edge-end network scenario of an Internet of Vehicles provided in an embodiment of the present invention;
[0093] Figure 3 A priority representation schematic diagram provided for an embodiment of the present invention;
[0094] Figure 4 A schematic diagram of an offloading model in an edge network provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0095] The embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be interpreted as limiting the present invention.
[0096] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. In addition, the "connection" or "coupling" used herein may include wireless connection or coupling. The term "and / or" used herein includes any unit and all combinations of one or more associated listed items.
[0097] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art in the art to which the present invention belongs. It should also be understood that terms such as those defined in common dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless defined as herein.
[0098] To facilitate understanding of the embodiments of the present invention, several specific embodiments will be further explained below with reference to the accompanying drawings, and each embodiment does not constitute a limitation on the embodiments of the present invention.
[0099] The embodiment of the present invention models the unloading scenario at the edge of the Internet of Vehicles as a Markov decision process, and combines deep reinforcement learning to explore the optimal unloading solution by designing the environment, reward function, etc., to achieve unloading decisions in the edge scenario of the Internet of Vehicles with diversified tasks and resources. The present invention proposes a reliability evaluation mechanism in combination with the Internet of Vehicles communication scenario, and incorporates factors such as the probability of successful transmission, the probability of successful completion, the importance of the task, and the delay into the reliability evaluation mechanism. The present invention proposes a reliable unloading solution for different periods, which can not only solve the initial unloading problem, but also dynamically adjust the existing unloading strategy on this basis.
[0100] The embodiment of the present invention studies a reliable unloading scheme in a VEC network, and establishes a priority model that comprehensively considers the importance and urgency of tasks to evaluate the priority of tasks. The embodiment of the present invention designs the following unloading schemes: 1) Initial unloading strategy. The initial unloading strategy is adopted as the basic strategy for periodic initial unloading of the system. 2) Dynamic queue insertion strategy. The dynamic queue insertion strategy is used as an adjustment strategy for tasks that arrive during the execution of the basic strategy. A reliability analysis is performed to better evaluate the reliability of the system. The unloading problem is formulated as an MDP (Markov Decision Process) to maximize the reliability of the system. In order to solve this problem, a SAC-based unloading algorithm using a soft behavior critic is proposed.
[0101] The processing flow chart of a reliable unloading method based on deep reinforcement learning in an edge scenario of an Internet of Vehicles provided by an embodiment of the present invention is as follows: Figure 1 As shown, the process includes the following steps:
[0102] Step S10: The vehicle sends an unloading task request to the connected RSU (Road Side Unit), and the unloading task request carries task data, which includes input data, calculation amount, delay limit and task importance.
[0103] Step S20: After receiving the unloading task request sent by the vehicle, the connected RSU requests the cloud layer for an unloading solution, and the cloud layer generates an unloading solution and then sends the unloading solution to the connected RSU.
[0104] Step S30: The access RSU transmits the task data to the target RSU according to the offloading plan.
[0105] Step S40: The target RSU calculates the task data and transmits the calculation result to the access RSU, and the access RSU transmits the calculation result back to the vehicle.
[0106] The above step S10 specifically includes: a model of a cloud-edge-end network scenario of an Internet of Vehicles provided by an embodiment of the present invention is as follows Figure 2 As shown in Figure 2, the cloud-edge-end scenario of the Internet of Vehicles consists of the cloud layer, edge layer, and user layer. The cloud layer includes multiple cloud servers with rich computing resources, which are responsible for providing offloading solutions. The edge layer includes many RSUs set up along the road. The set of RSUs is represented as Let F n represents the computing resources deployed on RSU n. We assume that each RSU can only compute one task at a time. Therefore, if several tasks are offloaded to the same RSU, the tasks need to be queued and wait for completion. The user layer is mainly composed of various vehicles, and the vehicle set is represented as The computing resources of the vehicle are limited, and the tasks need to be offloaded to the RSU. We assume that each vehicle generates only one task at a time. Time is divided into several cycles, represented as Each cycle is discretized into several time slots, which can be expressed as represents the Jth time slot in the kth cycle. So, the time slot The task set can be expressed as represents the Mth task on the Jth time slot of the kth cycle. For communication services, the cloud layer and the edge layer communicate using a dedicated network, and wireless links connect the user layer to the edge layer. In addition, the RSUs communicate with each other through wired links, and each RSU can directly transmit data to vehicles within its service range.
[0107] Priority model: a task ψ m can be represented as a four-tuple {D m , C m , τ m , κ m}, D m represents the amount of input data, C m represents the amount of computation, τ m represents the delay limit, κ m Represents the importance of the task.
[0108] In the Internet of Vehicles, the differences in tasks determine the necessity of priority. The differences in tasks are mainly reflected in the urgency and importance of tasks. The more urgent and important the task is, the higher the priority of the task. Considering the importance and urgency of the task, the embodiment of the present invention proposes a priority model to evaluate the priority of the task. Figure 3 A priority representation schematic diagram provided in an embodiment of the present invention, such as Figure 3 As shown, the priority table is used to sort the tasks by priority based on the two influencing factors. u1, u2, ... and v1, v2, ... represent the sorted lists of the two factors that affect the priority, and the direction indicated by the arrows indicates the priority from high to low. This method can avoid considering different units and value ranges of different influencing factors. Moreover, using the priority table, no task has the same priority. In addition, multiple influencing factors can be considered by using the priority table multiple times. In order to apply this priority table, task ψ m The priority of w m It can be expressed as:
[0109]
[0110] In this formula, w m The task ψ is obtained by combining two factors. m The priority of u m and v m Respectively represent the ranking of two influencing factors.
[0111] When evaluating task priorities, we consider the urgency and importance of the task. The urgency of a task refers to the amount of computation required within the latency limit, which can be expressed as:
[0112]
[0113] In this formula, ι m Represents the task ψ m The urgency of C m Represents the task ψ m The amount of computation required, τ m Represents the task ψ m delay limit.
[0114] To evaluate the importance of the tasks, a two-dimensional dual importance evaluation method is used. Specifically, vehicle type and task type are considered in the evaluation method. In terms of vehicle type, vehicles are divided into three types: emergency vehicles, public vehicles, and private vehicles. and represent the set of emergency vehicles, public vehicles, and private vehicles respectively. Therefore, the vehicle priority is defined as:
[0115]
[0116] In this formula, b v Indicates the priority of the vehicle. and Represent the collection of emergency vehicles, public vehicles and private vehicles respectively.
[0117] As for the task types, they are divided into three types: traffic safety tasks, traffic efficiency tasks, and entertainment tasks. and They represent the set of traffic safety tasks, traffic efficiency tasks, and entertainment tasks respectively. Therefore, the priority of the task is defined as:
[0118]
[0119] In this formula, b c Indicates the priority of the task content. and They represent the set of traffic safety tasks, traffic efficiency tasks and entertainment tasks respectively.
[0120] Therefore, the task ψ m The importance of can be expressed as:
[0121]
[0122] In this formula, κ m Represents the task ψ m The importance of v Indicates the priority of the vehicle, b c Indicates the priority of the task content
[0123] According to the task m The urgency and importance of tasks can be expressed as:
[0124]
[0125] In this formula, κ m Represents the task ψ m The importance of m It indicates the urgency of the task, and d is a constant used to correct the urgency of the task.
[0126] Figure 4 A schematic diagram of an offloading model in an edge network provided by an embodiment of the present invention is shown in FIG. Figure 4 As shown in Figure 2, the unloading process is introduced by taking vehicle m as an example. First, vehicle m sends an unloading task ψ to the connected RSU i. m Request, the vehicle uploads task ψ to the connected RSU i mThe data upload delay can be expressed as:
[0127]
[0128] In this formula, represents the time delay of vehicle m uploading task data to connected RSU i, D m represents the amount of task input data, R m,i Represents the transmission rate between vehicle m and connected RSU i.
[0129] The above step S20 specifically includes: the access RSU i requests the cloud layer for an offloading strategy. The cloud layer generates a specific offloading strategy using a priority-based offloading scheme, and then delivers the offloading strategy to RSU i. According to the offloading strategy, RSU i transmits the data of the task to the target RSU n. This is because the access RSU may not meet the resource requirements of the coverage area. If the target RSU is an access RSU, the target RSU does not have to send data. Therefore, the transmission delay can be expressed as:
[0130]
[0131] In this formula, represents the transmission delay between access RSU i and target RSU n, d i,n is the distance between access RSU i and target RSU n, R i,n is the transmission rate between access RSU i and target RSU n.
[0132] Task ψ m The computation delay on RSU n can be expressed as:
[0133]
[0134] In this formula, Represents the task ψ m The computation delay on RSU n, C m For the task m The amount of computation required, F n is the computing capability of RSU n.
[0135] Since an RSU is usually scheduled to process multiple tasks, and an RSU only computes one task at a time, the task needs to wait in line. m The delay of waiting on RSU n is also taken into account, and this part of the delay can be expressed as
[0136] Once the task ψ mOnce the calculation is completed, the result will be transmitted back to vehicle m by connecting to RSU i. Since the size of the result is usually much smaller than the size of the input data, the delay in returning the result can be ignored. m The delay of offloading to RSU n can be expressed as:
[0137]
[0138] Reliability Model: The reliability of a product is defined as its ability to perform a specific function under specific conditions. Therefore, the reliability of an edge network is related to its ability to complete a task within a specified delay constraint. The system's ability to complete a task can be reflected in the probability of success, effectiveness, required delay, and importance of the task.
[0139] 1) Success probability. The task completion process mainly includes three stages: data upload, data transmission and result calculation. The failure probability of the three stages can be modeled by Poisson distribution. It is known that the failure rates of the three stages are λ1, λ2 and λ3 respectively. The failure probability of the three stages can be expressed as:
[0140]
[0141] Failure at any stage will result in task ψ m Therefore, task ψ m The probability of successful completion depends on three stages and is expressed as:
[0142]
[0143] 2) Validity. If the completion of a task does not meet the delay constraint, the result of the task is considered invalid. Introducing the binary variable δ m To indicate whether the delay constraint is met, it is expressed as:
[0144]
[0145] 3) Required delay. If the task is effective, the sooner it is completed, the more valuable it is. Therefore, the reliability of the system is closely related to the delay required to complete the task. In order to evaluate the ability of the system to complete the task, we use the standardized delay, expressed as:
[0146]
[0147] 4) Importance. Due to poor communication environment or insufficient computing resources in the system, some tasks cannot be completed. In order to maintain the normal operation of the system, it is necessary to ensure the completion of important tasks. Therefore, we use the function f(κ m ) is used to describe the impact of importance on system reliability, expressed as:
[0148] f(κm )=(d-κ m ) a
[0149] Considering the success probability, effectiveness, required delay, and importance of a task, we model the reliability of the system as:
[0150]
[0151] This is used as the optimization objective function (page 16). The purpose of this invention is to obtain the unloading strategy when reliability is maximized. The reliability expression obtained by this reliability modeling is our optimization goal.
[0152] A reliable unloading solution based on deep reinforcement learning provided by an embodiment of the present invention includes an initial unloading strategy and a dynamic queue insertion unloading strategy. The initial unloading strategy is used as a basic strategy for periodic initial unloading of the system. The dynamic queue insertion strategy is used as an adjustment strategy for tasks that arrive during the execution of the basic strategy.
[0153] The initial offloading strategy is used as the basic strategy for the periodic initial offloading of the system. The purpose of initial offloading is to obtain the basic offloading strategy by studying the task allocation and task processing sequence to achieve high reliability of the system.
[0154] Task allocation: Task ψ m Can be uninstalled to Due to the different locations and computing resources of RSUs, offloading tasks to different RSUs has different effects on system reliability.
[0155] Task processing order: The processing order of tasks on RSU is based on priority. The waiting queue on RSU n can be expressed as
[0156]
[0157] Where Q represents the number of tasks offloaded to RSU n. The priority of tasks on RSU n satisfies It ensures that high-priority tasks in the system are completed first, which is conducive to improving system performance under limited conditions.
[0158] At the initial moment of cycle k, the tasks in the system can be expressed as Ψ(k) = {ψ1, ψ2, ..., ψ M}, task ψ m The uninstallation strategy can be expressed as:
[0159]
[0160] Where n represents the task ψ m is offloaded to RSU n, Indicates that task m on RSU n is is calculated.
[0161] The offloading strategy of task set Ψ(k) can be expressed as:
[0162]
[0163] In the edge network, the possible situations of offloading M tasks to N RSUs are N M As the number of tasks and RSUs increases, the number of offloading strategies grows exponentially. Therefore, we use DRL (Deep Reinforcement Learning) to quickly and effectively obtain the initial offloading strategy.
[0164] To formulate the initial offloading problem, some constraints should be considered. The tasks are offloaded to the RSUs, and the RSUs available are The selection can be expressed as:
[0165] n∈{0, 1, ..., N}
[0166] In order to meet the priority principle, the tasks waiting in the queue on RSU n should meet
[0167]
[0168] Among them, the waiting queue of tasks on RSU n is represented as Q.
[0169] Since RSU only computes one task at a time, the task ψ q The start time of the task ψ on RSU n should be later than that of the previous task ψ on RSU n. q-1 The end time can be expressed as:
[0170]
[0171] in, is the previous task ψ q-1 The end time of The task ψ q The time when the task ψ starts q Completion time It can be expressed as:
[0172]
[0173] The initial offloading decision problem is formulated as an optimization problem in the edge network, and the optimization goal is to maximize the reliability of the system. Therefore, it can be formulated as:
[0174]
[0175] stn∈{0, 1, ..., N}
[0176]
[0177]
[0178]
[0179] In order to solve this optimization problem, it is modeled as a Markov decision process.
[0180] State space: The cloud layer acts as an agent, observing and collecting environmental parameters in each cycle k.
[0181] Input data volume: The input data volume of the task set Ψ(k) can be expressed as
[0182] Computational Amount: The computational amount of the task set Ψ(k) can be expressed as
[0183] Delay constraint: The delay constraint of the task set Ψ(k) can be expressed as
[0184] Importance: The task set Ψ(k) can be expressed as
[0185] Computing resources: The remaining computing resources of each RSU can be expressed as
[0186] Vehicle position: The position of the vehicle can be expressed as
[0187] RSU position: The position of the RSU can be expressed as
[0188] Assumptions Representing the state space, the state vector of period k can be expressed as:
[0189]
[0190] Action space: Based on the current state s(k), the cloud will choose action a(k). Assume Represents the action space, and the action vector in cycle k can be expressed as:
[0191] a(k)=[n1(k),n2(k),...,n M (k)]
[0192] Reward function: Based on the current state s(k), the cloud will choose action a(k) and obtain the reward R(s(k), a(k)) and the next state s(k+1). The reward for period k can be expressed as:
[0193]
[0194] Dynamic queue insertion unloading strategy: The initial unloading strategy is used as the basic unloading strategy. However, the unloading requests of tasks arrive intermittently. To address the above problems, a dynamic queue insertion strategy is designed. When a new task arrives, it locally adjusts the initial unloading strategy by inserting the task into the waiting queue on the RSU.
[0195] When the new task ψ m When an offload request arrives, the cloud layer first obtains its priority w m The insertion point in the waiting queue on the RSU is determined according to the priority. m The insertion point in the waiting queue at each RSU can be expressed as:
[0196]
[0197] in, Indicates that the task is calculated for the i-th time on RSU n, and indicates that the task is inserted before the i-th task on RSUn. Taking the task offloaded to RSU n as an example, we assume that RSU n is assigned Q tasks. The waiting queue on RSU n can be expressed as:
[0198]
[0199] Therefore, the task ψ m The possible insertion positions on RSU n are 1 to Q+1, which can be expressed as:
[0200]
[0201] The priority of tasks on RSU n satisfies If the task ψ m The priority of This means that the insertion point is The waiting queue on RSU n can be obtained:
[0202]
[0203] When the task m When offloading to each RSU, the cloud computing system reliability can be expressed as Γ = {Γ1, Γ2, ..., Γ NFinally, by comparing the system reliability of each RSU, the cloud layer obtains the task ψ m Uninstallation solution It can be expressed as:
[0204]
[0205] After the above two steps, the new task ψ m The uninstallation scheme is determined.
[0206] Inevitably, there will be a situation where multiple tasks arrive at the same time for queue insertion. When B tasks arrive at the same time, the unloading scheme can be expressed as:
[0207]
[0208] When considering priorities, fairness is more important. High-priority tasks should not occupy all resources, even if they have greater performance gain to the system. When new tasks are inserted into the task waiting queue on the RSU, subsequent tasks are interrupted and wait longer.
[0209] To improve fairness and prevent low-priority tasks from waiting all the time, we set a task insertion factor. This means that the number of times a task can be queued is limited. When determining the insertion point of a new task on each RSU, it is necessary to determine whether the insertion factor of the subsequent task has reached the limit. If the limit has been reached, the insertion point will be changed to a point after the original insertion point.
[0210] We denote the task queue position on RSU n as in Represents the task ψ Q Rank k on RSU n. When a new task ψ m is offloaded to RSU n, and its priority satisfy When task ψ m The processing order can be expressed as:
[0211]
[0212] in Represents the task on RSU n The number of times a task is inserted into the queue, and χ represents the maximum number of times each task can be inserted into the queue. On Task If you uninstalled before, satisfy Task The processing order p q They can be expressed as:
[0213]
[0214] Similarly, the task The processing order can be expressed as:
[0215]
[0216] In this way, the cloud layer can obtain the offloading strategy for new tasks without affecting the execution of current tasks.
[0217] Similar to initial unloading, the purpose of dynamic queue insertion unloading is to maximize the reliability of the system. Considering the impact of inserted tasks on reliability, the system reliability can be expressed as:
[0218]
[0219] In addition to the constraints mentioned above, the following constraints should also be considered in the dynamic queue insertion process. When a new task arrives, the RSU to which it is unloaded should be selected from N, which can be expressed as:
[0220] b∈{1, 2, ..., N}
[0221] The choice of task insertion point on RSU is limited and can be expressed as:
[0222]
[0223] Among them, M n Represents the number of tasks on RSU n.
[0224] The upper limit of the number of times a task can be interrupted in the queue is x, which can be expressed as:
[0225]
[0226] The dynamic queue-jumping unloading decision problem is formulated as an optimization problem in the edge system. Considering the constraints, the problem can be formulated as follows:
[0227]
[0228]
[0229]
[0230]
[0231]
[0232]
[0233]
[0234]
[0235] In order to solve the above optimization problem, the above optimization problem is modeled as a Markov decision process
[0236] State Space:
[0237]
[0238] Action Space:
[0239]
[0240] Reward function:
[0241]
[0242] After modeling as a Markov process, the deep reinforcement learning algorithm Soft actor critic (SAC) algorithm is used to solve the above optimization problem. The SAC algorithm is a model-free and non-strategy AC algorithm. Compared with the AC algorithm, it is more exploratory and not easy to fall into the local optimal solution. Its goal is to maximize the reward function, and we use the optimization target as the reward function. The constraints are written into the algorithm environment, and the machine learns the strategy through training. The final solution is the value of the action, which corresponds to which RSU the tasks in the system are assigned to.
[0243] The present invention uses a simulation platform to evaluate our proposed solution, which is based on Python 3.9 on Python and Ubunth18.04.3lts. Consider a 300-meter road where RSUs are uniformly deployed. The simulation parameters are set as follows: The number of vehicles is set to 3 to 40. We assume that each vehicle travels at a stable speed. The speed is set to 10 to 40 km / h. The computing resources of RSU are randomly distributed between 4 and 8 GHz. The data size of the task is randomly determined from a uniform distribution between 100 and 300 MB. The task computation size is randomly distributed in the range of [0.5, 2] × 109 CPU (Central Processing Unit) cycles. The task delay limit range is 0.5 seconds to 5 seconds. In the evaluation, these tasks are randomly generated, so there is no loss of generality. RSU and vehicles communicate with a bandwidth of 10 MHz. The system noise power is set to -80 dBm. The vehicle transmission power is 20 dBm. Since the scenario is assumed to be an urban environment, the path loss coefficient is 4. In addition, the failure rates of uploading, transmission, and calculation are set to 0.02, 0.015, and 0.015, respectively.
[0244] The unloading scheme proposed in the present invention is compared with other unloading schemes to further illustrate their impact on system reliability performance.
[0245] 1) Task-based Computation Offloading (TCUO): Tasks that require less computing resources are completed first.
[0246] 2) Task complexity-based offloading (TCLO): Tasks with lower computational complexity are completed first.
[0247] 3) Arrival Time-Based Offloading (ATO): Tasks that arrive early are completed first.
[0248] We compared the Initial Offloading (IO) scheme with other schemes. As the number of tasks increases, the system reliability of each scheme decreases because more vehicles have to wait for service with limited available resources. The proposed scheme performs better than other schemes because it prioritizes important and urgent tasks, which usually have a greater impact on system reliability. The proposed scheme is more effective than other schemes when the number of tasks is large because there is no resource competition when the number of tasks is small. All tasks in the system can be completed. However, when the number of tasks is large, the resources in the system are insufficient to support the completion of all tasks. The advantages of our proposed scheme are fully demonstrated.
[0249] The system reliability of all schemes decreases as the noise power increases. This is because a harsh environment can cause high latency, which has a negative impact on system reliability. As the noise power increases, the system reliability decreases sharply. This is because data transmission is an important link, and noise power has a great impact on data transmission. The scheme proposed by the present invention performs better than other schemes because the system can often complete important and urgent tasks in harsh environments. At the same completion rate, important tasks bring more benefits to the system.
[0250] Reliability decreases as the number of tasks increases, because more vehicles have to wait for service with limited available resources. Secondly, the proposed solution outperforms the baseline solution. This is because the proposed solution can flexibly adjust the system's unloading scheme, while the baseline solution can only unload newly arrived tasks after the existing unloading scheme is fully completed, so urgent tasks may not be completed within the delay limit. Finally, the proposed solution performs better when the number of tasks is small. This is because the improvement effect of the solution proposed in the present invention is significant when the number of tasks is small.
[0251] Noise power is related to system reliability. An increase in noise power will reduce the reliability of the system because a poor environment will lead to higher latency, which will greatly affect the reliability of the system. As the noise power increases, the reliability of the system drops sharply because data transmission is an important link and noise power has a great impact on data transmission. In addition, the scheme proposed by the present invention performs better than the baseline scheme. This is because the scheme proposed by the present invention can flexibly adjust the unloading scheme of the system.
[0252] As the RSU computing resources of all schemes increase, the system reliability also increases. This is because the increase in resources makes the average completion time shorter and further improves the reliability of the system. The scheme proposed by the present invention is better than the baseline scheme. This is because the scheme proposed by the present invention can flexibly adjust the unloading scheme of the system and has little interference to the system. The baseline scheme only unloads newly arrived tasks after the existing unloading scheme is fully completed, so urgent tasks may not be completed within the delay constraint.
[0253] In summary, the embodiment of the present invention proposes a reliability evaluation mechanism in combination with the IoV communication scenario, and incorporates factors such as transmission success probability, calculation success probability, task importance and required delay into the reliability evaluation mechanism. The present invention models the IoV edge unloading scenario as a Markov decision process, combines deep reinforcement learning, and explores the optimal unloading solution by designing the environment, reward function, etc., to achieve unloading decisions in IoV edge scenarios with diversified tasks and resources.
[0254] The embodiment of the present invention takes into account the arrival of tasks after the unloading strategy is initially determined, and proposes reliable unloading solutions for different periods, which can not only solve the initial unloading problem, but also dynamically adjust the existing unloading strategy on this basis. The embodiment of the present invention applies the soft actor critic algorithm, which not only takes into account rewards but also entropy. The strategy is trained to maximize the trade-off between expected benefits and entropy. The increased exploratory nature can prevent the strategy from converging to a bad local optimal value too early.
[0255] Those skilled in the art can understand that the accompanying drawings are only schematic diagrams of an embodiment, and the modules or processes in the accompanying drawings are not necessarily required to implement the present invention.
[0256] It can be known from the description of the above implementation methods that those skilled in the art can clearly understand that the present invention can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present invention or certain parts of the embodiments.
[0257] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0258] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A reliable unloading method based on deep reinforcement learning in the edge scenario of Internet of Vehicles, characterized in that: include: The vehicle sends an unloading task request to the access roadside unit, and the unloading task request carries task data, which includes input data, calculation amount, delay limit and task importance; After receiving the unloading task request sent by the vehicle, the access roadside unit requests the cloud layer for an unloading solution. After the cloud layer generates the unloading solution, it sends the unloading solution to the access roadside unit. The access roadside unit transmits the task data to the target roadside unit according to the unloading scheme; The target roadside unit calculates the task data and transmits the calculation result to the access roadside unit, and the access roadside unit returns the calculation result to the vehicle; The vehicle sends an unloading task request to the access roadside unit, and the unloading task request carries task data, which includes input data, calculation amount, delay limit and task importance, including: The cloud-edge-end scenario of the Internet of Vehicles consists of a cloud layer, an edge layer, and a user layer. The cloud layer includes a cloud server, which is responsible for providing an offloading solution. The edge layer includes multiple roadside units set up along the road. The set of roadside units is represented as Let F n represents the computing resources deployed on RSU n. Each roadside unit can only calculate one task at a time. The user layer consists of various vehicles. The vehicle set is represented by Assume that each vehicle generates only one task at a time, and the time is divided into several cycles, represented as Each cycle is discretized into several time slots, represented as represents the Jth time slot in the kth cycle, time slot The task set is represented as represents the Mth task on the Jth time slot of the kth cycle; Task ψ m is represented as a four-tuple {D m , C m , τ m , κ m }, D m represents the amount of input data, C m represents the amount of computation, τ m represents the delay limit, κ m represents the importance of the task, taking the urgency and importance of the task as two influencing factors of the task priority, u1, u2, ... represent the sorted list of the urgency of the task, v1, v2, ... represent the sorted list of the importance of the task, and the task ψ m The priority of w m It is expressed as: w m Represents the task ψ m The priority of u m Represents the task ψ m The urgency of m Represents the task ψ m The importance of Vehicle m sends an unloading task ψ to connected RSU i m Request to upload task ψ to connected RSU i m The data upload delay is expressed as: represents the time delay of vehicle m uploading task data to connected RSU i, D m Represents the task ψ m The amount of input data, R m,i represents the transmission rate between vehicle m and connected RSU i; After receiving the unloading task request sent by the vehicle, the access roadside unit requests an unloading plan from the cloud layer. After the cloud layer generates the unloading plan, the cloud layer sends the unloading plan to the access roadside unit, including: After the access roadside unit RSU n receives the unloading task data, the waiting queue on RSU n is expressed as: Where Q represents the number of tasks unloaded on RSU n. At the initial time of cycle k, the tasks in the system are expressed as: Ψ(k) = {ψ1, ψ2, ..., ψ M }, task ψ m Uninstall strategy It is expressed as: Where n represents the task ψ m is offloaded to RSU n, Indicates that task m on RSU n is are counted; Offloading strategy of task set Ψ(k) It is expressed as: The task is offloaded to the RSU, and the available RSUs are Select from, expressed as: n∈{0,1,...,N} The constraints for setting the initial unloading decision problem include: RSU n waits for tasks in the queue to be satisfied Among them, the waiting queue of tasks on RSU n is expressed as Task ψ q The start time of the task ψ on RSU n should be later than that of the previous task ψ on RSU n. q―1 The end time is expressed as: in, is the previous task ψ q―1 The end time of The task ψ q Start time; Task ψ q Completion time It is expressed as: The objective function of the initial unloading decision problem is set as: stn∈{0,1,...,N} Modeling the objective function of the initial unloading decision problem as a Markov decision process; When a new task arrives, the dynamic queue insertion strategy is used to insert the task into the waiting queue on the RSU to locally adjust the initial offloading strategy. m When an offloading request arrives, the cloud layer obtains a new task ψ m The priority of w m ,The insertion point in the waiting queue on the RSU is determined according to the priority of the task ψ m Insertion point in the waiting queue at each RSU It is expressed as: in, Indicates that the task is calculated for the i-th time on RSU n, and indicates that the task is inserted before the i-th task on RSUn; When the task m When offloading to each RSU, the cloud layer calculates the system reliability. By comparing the system reliability on each RSU, the cloud layer obtains the task ψ m Uninstallation solution It is expressed as: When B tasks arrive at the same time, the unloading scheme is expressed as: The task insertion factor is set. When determining the insertion point of the new task on each RSU, it is judged whether the insertion factor of the subsequent task has reached the limit. If the limit has been reached, the insertion point will be changed to a point after the original insertion point; The task queue position on RSU n is represented as in Represents the task ψ Q When a new task ψ is ranked k on RSU n, m is offloaded to RSU n, and its priority satisfy When task ψ m The processing order is expressed as: in Represents the task on RSU n The number of times a task is inserted into the queue, χ represents the maximum number of times each task is inserted into the queue. On Task If you uninstalled before, satisfy Task The processing order p q It is expressed as: Similarly, the task The processing order is expressed as: In this way, the cloud layer can obtain the offloading strategy for new tasks without affecting the execution of current tasks; The purpose of dynamic queue unloading is to maximize the reliability of the system. The system reliability Γ is expressed as: The constraints for setting the dynamic queue-jumping unloading decision problem include: When a new task arrives, the RSU to which it is unloaded must be selected from N, expressed as: b∈{1,2,...,N} The choice of task insertion point on RSU is limited, expressed as: Among them, M n Indicates the number of tasks on RSUn; The upper limit of the number of times a task can be interrupted in the queue is x, which is expressed as: The objective function of the dynamic queue-jumping unloading decision problem is set as follows: The objective function of the dynamic queue-jumping unloading decision problem is modeled as a Markov decision process. State Space Action Space Reward Function A deep reinforcement learning algorithm is used to solve the objective function of the dynamic queue-jumping unloading decision-making problem. The optimization goal is used as the reward function, and the constraints are written into the algorithm environment. The machine learns the strategy through training, and the value of the action is used as the solution result, which includes which RSU the tasks in the system are assigned to.
