Segmentable task unloading and service caching method in cloud-side collaborative Internet of Vehicles scene
By combining the zero-mean Gaussian distribution and the Nakagami-m model to describe channel conditions in the Internet of Vehicles, combined with the deep deterministic policy gradient algorithm and the task priority queue model, the task offloading decision is dynamically adjusted, and the service caching and task offloading decisions in the Internet of Vehicles are solved. Coupling issues improve system performance and user experience.
Patent Information
- Application Number
- CN202410447961.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-15
- Publication Date
- 2024-08-23
AI Technical Summary
Existing Internet of Vehicles task offloading strategies fail to effectively combine service caching and task offloading decisions, and do not consider collaborative processing and task priority, resulting in low system latency and low resource utilization, affecting user experience and system security.
This paper proposes a divisible task offloading and service caching method in the cloud-edge collaborative car networking scenario. It uses zero-mean Gaussian distribution and Nakagami-m model to describe dynamic channel conditions. It combines the deep deterministic policy gradient algorithm to design a task priority queue model and Markov decision process, dynamically adjusts task offloading decisions to optimize system performance.
It significantly reduces the average task processing cost, improves task completion rate and system throughput, ensures timely processing of high-priority tasks, and improves user experience and system performance.
Smart Images

Figure CN118540743A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet of Vehicles edge computing, and specifically to a divisible task offloading and service caching method in a cloud-edge collaborative Internet of Vehicles scenario. Background Art
[0002] The Internet of Vehicles (IoV) aims to promote the deep integration of vehicles, people, roads and the environment, ensure the safety of the traffic system and improve the efficiency of the traffic system through the interconnection technology of vehicle-to-everything (V2X), and promote the intelligentization of urban services to a higher level. The concept of IoV originates from the Internet of Things (IoT). It deeply perceives the status of vehicles and roads through advanced sensor technology, and combines wireless communication networks and modern intelligent information processing technology to achieve intelligent management and decision-making of traffic, bringing revolutionary changes to the traffic system, effectively improving the service quality of the traffic system, and improving the safety of the traffic system. In recent years, the development of IoV has led to the emergence of many innovative applications for smart cars. For example, cutting-edge technologies such as autonomous driving and assisted driving make driving safer and more convenient, intelligent traffic management improves the efficiency of road use, and in-vehicle multimedia services greatly enrich the driving experience of drivers. Augmented reality and virtual reality technologies have pushed the driving experience to a new level. However, these advanced applications often involve a large number of computationally intensive tasks, which place extremely high demands on system reliability, security, and real-time response speed, and require a large amount of computing and communication resources to support them. Vehicle-mounted devices are often limited by their performance, size, weight, energy, and other factors, and are often unable to independently meet the stringent requirements of these computationally intensive applications.
[0003] In recent years, various industries, universities and research institutes have explored mobile edge computing applications for the Internet of Vehicles. By sinking the service functions of the cloud computing center to regional gateways, base stations or road side units (RSUs) and other locations close to the vehicle, the massive data and computing tasks generated in the Internet of Vehicles applications are offloaded to edge nodes for processing. Mobile Edge Computing (MEC) has become an ideal technology to support applications with strict real-time requirements for the Internet of Vehicles with its low latency and high efficiency. The introduction of MEC not only significantly improves the overall performance of the Internet of Vehicles system, but also provides unlimited possibilities for the future development of intelligent transportation systems. However, the integration of edge computing and the Internet of Vehicles has also brought new challenges, among which the problem of computing task offloading is particularly prominent. The formulation of offloading decisions is crucial, involving the complex decision-making process of the user terminal to determine whether to offload, when to offload, how many tasks to offload, and which tasks to choose to offload. In addition, the high-speed mobility of vehicles leads to dynamic changes in the network topology, which further increases the complexity of the problem. Therefore, in the integrated system of Internet of Vehicles and mobile edge computing, formulating a reasonable computing task offloading strategy based on the dynamic resource requirements and diverse task characteristics of vehicles in a complex communication environment has become an extremely challenging research task.
[0004] The paper (Raza S, Liu W, Ahmed M, et al. An efficient task offloading scheme in vehicular edge computing [J]. Journal of Cloud Computing, 2020, 9: 1-14.) studied the divisible task offloading problem of vehicle edge computing in urban street scenarios and proposed a mobile-aware partial task offloading method. This method considers two types of vehicles, namely computationally intensive vehicles (Regionale HuisartsenVereniging, referred to as RHV) and resource-rich vehicles (Rapid Response Vehicle, referred to as RRV). RHV vehicles can calculate part of the tasks locally, and the remaining tasks can be offloaded to nearby RRV vehicles or VEC servers through V2V or V2I communication, but the maximum tolerable delay and vehicle stay time must be observed. This method uses the abundant resources in the RRV vehicle to help reduce the burden on the VEC server, improves the utilization of RRV vehicle computing resources, and minimizes the overall system cost. However, this method does not take into account the service cache status of the RRV vehicle. If the service program corresponding to the task is not cached, the task completion delay will increase and may even exceed the maximum tolerable delay of the task.
[0005] The literature (Bute MS, Fan P, Zhang L, et al. An efficient distributed task offloading scheme for vehicular edge computing networks [J]. IEEE Transactions on Vehicular Technology, 2021, 70 (12): 13149-13161.) studies the problem of low completion rate of long-term task offloading caused by link life and vehicle speed in multi-lane highway scenarios, discusses how to utilize decentralized idle computing resources, and proposes an efficient distributed task offloading method based on fuzzy logic algorithm. This method is based on a decentralized self-organizing VEC network. By considering important indicators such as link reliability, distance, available computing resources, and relative speed, an incentive mechanism is introduced to increase the number of service vehicles to improve the system task completion rate. In order to support the execution of computationally intensive tasks in the VEC network, the task is divided into multiple subtasks and offloaded to nearby vehicles with idle computing resources for parallel processing. Compared with existing methods, the proposed computational task offloading method shows good performance in terms of task completion rate, resource utilization, and packet delivery rate. This method does not take into account the task type. Different types of tasks have different delay tolerance and computing resource requirements. If the first-in-first-out queuing mode is used, such tasks may not be processed in time, resulting in calculation failure, which will have serious consequences for user security.
[0006] The literature (Fan W, Liu J, Hua M, et al. Joint Task Offloading and Resource Allocation for Multi-Access Edge Computing Assisted by Parked and Moving Vehicles [J]. IEEE Transactions on Vehicular Technology, 2022.) targets the parked and moving vehicle assisted MEC scenario consisting of multiple user devices, parked vehicles, and moving vehicles. In order to minimize the total priority-weighted task processing delay of all devices, the wireless channels of the base stations where the MEC servers are deployed are allocated to offload tasks to edge servers or vehicles and allocate computing resources of edge servers and vehicles. With the goal of minimizing the total priority-weighted task processing delay of all tasks, the task offloading and resource allocation problem is described as a mixed integer nonlinear programming problem, and an iterative algorithm based on generalized bender decomposition and reformulation linearization is designed to decompose the original problem into a convex primal subproblem and a non-convex principal subproblem, which is then convexified. Finally, the optimal solution is provided by iteratively minimizing the two subproblems. In addition, in order to reduce the computational complexity, this method designs a two-stage heuristic algorithm (Two Stage Heuristic Algorithm, referred to as TSHA), which divides the optimization process into two stages: uplink channel allocation and task offloading vehicle selection; it runs iteratively to jointly optimize the computing resource allocation of base stations and vehicles, downlink channel allocation and vehicle selection process. This method performs well in convergence, but the vehicle network has characteristics such as dynamics, randomness and time-varying. The traditional algorithm in this method is difficult to simulate and capture the characteristics of the network to solve the optimal strategy, while deep reinforcement learning with strong feature representation and decision-making capabilities is suitable for solving this type of problem.
[0007] Reference (Zeng J, Gou F, Wu J. Task offloading scheme combining deep reinforcement learning and convolutional neural networks for vehicle trajectory prediction in smart cities [J]. Computer Communications, 2023, 208: 29-43.) In order to solve the problem that the high-speed movement of vehicles leads to short communication time between vehicles and base stations, this paper proposes a task offloading method based on trajectory prediction. This solution encodes each vehicle by LSTM, uses a neural network model to learn the characteristics of each vehicle, realizes information interaction between different vehicles around through the social layer, and predicts the vehicle trajectory by fully combining the surrounding vehicles. In order to solve the problem of task offloading decision-making, combined with the idea of deep reinforcement learning, a task offloading algorithm based on trajectory prediction is designed, the Actor-Critic neural network is used to realize task offloading decision-making, and the task offloading problem is solved by combining the trajectory prediction results. Compared with the traditional task offloading method, this method adapts to the smart car environment, shows greater stability when facing large computing tasks, and effectively reduces task latency. However, this method has not yet taken into account collaborative processing tasks. Collaboration between edge nodes or cloud-edge collaborative processing can improve network throughput and the success rate of task offloading.
[0008] In summary, the problems that still exist in the technical methods of task offloading strategies in the scenario of Internet of Vehicles are as follows: First, the above technical methods do not jointly study the service cache and task offloading decision-making issues, and there is a strong coupling relationship between the two. In the Internet of Vehicles, edge nodes usually cache some commonly used services to improve response speed, but it is impossible to cache all types of services in limited storage space. The state of the service cache will directly affect the latency of task offloading. Therefore, the task offloading strategy must keenly capture the changes in the service cache state and dynamically adjust the offloading decision accordingly to ensure efficient execution of tasks. Second, the above technical methods have not yet considered collaborative processing tasks. A reasonable collaborative strategy can offload tasks to the most suitable nodes, minimize system latency and improve system throughput, share resources and information, which is also the key to improving system operation efficiency. Third, task priority. Different types of tasks have different latency tolerance and computing resource requirements. If a simple first-in-first-out queuing mode is adopted, for real-time applications such as autonomous driving, it may lead to untimely task processing and calculation failure, which will have serious consequences for user safety. Therefore, it is necessary to build a queue model based on task priority to ensure that high-priority tasks are given priority processing, so as to meet the differentiated needs of various tasks. Summary of the invention
[0009] The core goal of the present invention is to solve the coupling problem between service caching and task offloading decisions, while taking into account dynamic channel conditions, diverse task types and collaboration between edge nodes, and proposes a divisible task offloading and service caching method in a cloud-edge collaborative Internet of Vehicles scenario. Under this method, tasks can be flexibly selected to be offloaded to any edge node for processing, and collaboration can be achieved between edge nodes, or tasks can be offloaded to a cloud computing center when necessary. The wireless communication channel is based on orthogonal frequency division multiple access technology, and the spectrum resources allocated to each edge node are the same. In order to better characterize the dynamic channel conditions, the zero-mean Gaussian distribution and the Nakagami-m model are used. The Nakagami-m model can effectively capture the random variability of the communication channel in different environments because of its scalable parameters and excellent fitting performance. In view of the diverse task types, a task priority queue model is proposed. The tasks generated by the vehicle are prioritized and scheduled by the task scheduler to ensure that high-priority tasks can be preferentially offloaded to the appropriate edge nodes for calculation. The task offloading strategy dynamically adjusts the offloading decision according to the service cache changes, and expresses the optimization problem as a long-term mixed integer nonlinear programming (MINLP) problem, which is modeled as a Markov decision process (MDP), and proposes an edge service cache and task offloading algorithm based on deep deterministic policy gradient (DDPG) to solve the optimal solution to the problem. In this task offloading algorithm, adaptive noise is added to better balance the exploration and utilization of deterministic strategies. At the same time, in order to reduce the cumulative error and obtain higher quality policy updates, the Actor network and the target network are delayed. The simulation experiment results show that this method not only significantly reduces the average task processing cost, but also improves the task completion rate, thereby effectively ensuring the quality of user experience. At the same time, the service caching mechanism can also reduce the system energy consumption caused by repeated operations. The technical solution to achieve the purpose of the present invention is:
[0010] A divisible task offloading and service caching method in a cloud-edge collaborative Internet of Vehicles scenario comprises the following steps:
[0011] Step S1: Build a task offloading and service cache system architecture;
[0012] Step S2: Establish the communication model, service cache model, task offloading model and task priority model of the system, establish the optimization problem with the goal of minimizing the average processing cost of the task, and determine the constraints;
[0013] Step S3: approximate the optimization problem proposed in step S2 as a Markov decision process (MDP), design the service program cache state, remaining storage capacity, remaining available computing resources, bandwidth, channel gain and task priority as the state space, and also design the offloading decision, cache decision and task partition ratio as the action space, and use the equation with the minimization of the average processing cost of the task as the optimization goal as the reward, and transform it into solving the optimal divisible task offloading strategy problem and the cache strategy problem;
[0014] Step S4: construct a divisible task decision model and a service cache decision model based on a deep deterministic policy gradient algorithm; train the divisible task decision model and the service cache decision model according to the real-time state space with the goal of minimizing the average processing cost of the task; output the task offloading decision and the service cache decision through the trained divisible task and service cache decision models according to the real-time state space.
[0015] The specific steps of step S1 are:
[0016] A three-layer system architecture is composed of a cloud computing center, an edge pool, and mobile vehicles. The edge pool is composed of a group of edge nodes connected by optical fibers. The edge nodes are roadside units equipped with MEC servers. A management controller (i.e., an agent) is deployed in the edge pool. The agent can collect information from vehicles and edge servers, and make service caching decisions for edge nodes and task offloading decisions for vehicles. The edge pool is defined as E = {1,2,...,e,...,N E}, the set of mobile vehicles is defined as V = {1,2,...,v,...,N V}, the computing power of the edge node MEC server and the intelligent networked vehicle is defined as f e and f v , the set of different types of service programs is defined as K = {1,2,...,k,...,N K}, the size of each service program in the service program set is defined as
[0017] The specific steps of step S2 are:
[0018] (1) Build a communication model:
[0019] In order to characterize the actual communication scenario of the Internet of Vehicles, for the channel gain, both small-scale fading and large-scale fading are considered. Large-scale fading includes path loss and shadow fading. Small-scale fading is based on Nakagami-m distribution, and shadow fading is based on zero-mean Gaussian distribution. Therefore, the channel gain g v,e Modeled as:
[0020]
[0021] Among them, D0 represents the relevant distance, D v,e (t) represents the Euclidean distance between vehicle v and edge node e, λ represents the propagation speed of electromagnetic waves in space, χ represents the path attenuation index, and f c Indicates the channel carrier frequency, H v,e represents small-scale fading, Represents shadow parameters;
[0022] When vehicle v communicates with edge node e, the channel transmission rate is expressed as:
[0023]
[0024] Among them, W v,e (t) represents the vehicle allocation bandwidth, P v represents the transmission power of vehicle v, κ represents the Boltzmann constant, ε represents the noise temperature of the receiving system, and ψ represents the noise coefficient of the receiving system;
[0025] (2) Build a service program cache model:
[0026] At the beginning of each time slot t, the vehicle that enters the edge node range updates the task request. The service cache decision of the edge node is made by the agent, while the service cache decision for the vehicle is made by the vehicle based on its own situation. v and M e Represent the storage capacity of each vehicle and each edge server respectively. Therefore, the service cache has the following storage space limitations:
[0027]
[0028] The binary decision variable c v,k (t)∈{0,1},c e,k (t)∈{0,1} is used to represent the cache status of service program k in vehicle v or edge node e in time slot t;
[0029] For splittable task types, the task can adopt a partial offloading strategy in the following situations:
[0030] When a vehicle v within the communication range of the edge node e initiates a task T v,k When an uninstall request is made, if task T is already cached locally v,k The corresponding service program k, then the agent needs to consider whether the edge node e has cached the corresponding service program. If the edge node e does not cache the corresponding service program, task T v,k Perform the calculation directly locally, otherwise task T v,k You can choose to partially offload to edge nodes e for execution;
[0031] When a vehicle v within the communication range of the edge node e initiates a task T v,k When an uninstall request is made, if there is no cache task T locally v,k Corresponding service program k, task T v,k It will be completely offloaded to the edge node e. At this time, if the edge node e has cached task T v,k The corresponding service program k can be based on whether the task T is cached in the edge pool v,k The corresponding service program k is chosen to be executed directly on the edge node e or partially offloaded to the edge pool for execution. If the edge node e does not have task T v,k The corresponding cache service program can be completely offloaded to other edge nodes in the edge pool or cloud computing center for execution according to the program cache status of the edge pool;
[0032] (3) Building a task offloading model:
[0033] When a vehicle v within the communication range of the edge node e initiates a task T v,k When an unloading request is received, the agent performs the task T v,k The corresponding cache placement of service program k selects task T v,k The edge node to which the task should be offloaded is v,k Determine the unloading ratio and resource allocation; define d v,k (t)∈[0,1],d e,k (t)∈[0,1] is a continuous decision variable, d v,k (t) and d e,k (t) respectively represent the task T v,k The ratio of offloading to the nearest edge node e and edge pool, [1-d v,k (t)] and [1-d e,k (t)] represent the remaining tasks performed by vehicle v and the nearest edge node e, respectively. Based on this, we derive the tasks T involving different cache situations. v,k The calculation delay and transmission delay are as follows:
[0034] Task T v,k The computational latency generated by local execution is expressed as:
[0035]
[0036] Task T v,k The energy consumption generated by local execution is expressed as:
[0037]
[0038] Where l is the calculation energy efficiency parameter;
[0039] Task T v,kThe transmission delay offloaded to the edge node e is expressed as:
[0040]
[0041] Where φ(x) indicates whether the task T is cached in the edge node or edge pool v,k The corresponding cache service program k;
[0042] Define the edge node MEC server assigned to task T v,k The computing resource scaling factor is The task T of edge node e v,k The execution time is expressed as:
[0043]
[0044] If the task T at the edge node e v,k If the data is further unloaded to other edge nodes in the edge pool, the transmission delay is:
[0045]
[0046] where r e,pool (t) represents the transmission rate between edge servers;
[0047] Define other edge nodes in the edge pool to be assigned to task T v,k The computing resource scaling factor is Then task T v,k The execution time required is:
[0048]
[0049] If task T v,k Further offload to the cloud computing center for processing, task T v,k First, it is unloaded to the nearest edge node e, and the resulting delay is:
[0050]
[0051] Then the edge node e transmits the task data to the cloud computing center, and the transmission delay is:
[0052]
[0053] where r e,cloud (t) is the data transmission rate between the edge node e and the cloud computing center;
[0054] The propagation delay of light wave signal in optical fiber is t l :
[0055]
[0056] Where l is the propagation distance, c is the speed of light, and n is the refractive index;
[0057] So task T v,k The total latency of offloading to the cloud computing center is:
[0058]
[0059] Considering the transmission delay and computation delay under different caching and offloading decisions, the processing task T v,k The total delay in time slot t is expressed as:
[0060]
[0061] Similarly, task T v,k The total energy consumption is:
[0062]
[0063] Where P v and P edge are the transmission powers of vehicles and edge nodes, respectively;
[0064] Formula (1.14) represents the latency in all cases of service caching and task offloading, assuming represents the total number of tasks received by edge node e in time slot t. The average processing delay of all tasks in the system is defined as:
[0065]
[0066] The average energy consumption of all tasks in the system is defined as:
[0067]
[0068] (4) Task priority model:
[0069] Introducing waiting delay, the delay tolerance and computational complexity of the comprehensive task affect the task priority and scheduling. The number of tasks in the task scheduling system is represented as {1, 2, ..., n}, and the task priority set is represented as Task priorities are defined as follows:
[0070]
[0071] Among them, τ v It is task T v,k Tolerance delay, t v Is to execute task T v,k The expected waiting delay, ω1 and ω2 represent the task T v,k The weight coefficient of delay tolerance and computational complexity;
[0072] (5) Constructing the problem model:
[0073] The processing cost of a task is composed of the task completion delay and energy consumption, which is defined as:
[0074] U(t)=u T T(t)+u E E(t) (1.19)
[0075] where u T ∈[0,1] and u E ∈[0,1] represents the weight parameters of task completion delay and energy consumption respectively. The main goal is to minimize the average processing cost of all tasks. The optimization problem is represented by the following mathematical model:
[0076]
[0077]
[0078]
[0079]
[0080]
[0081]
[0082]
[0083]
[0084]
[0085] Constraints C1 and C2 are the cache conditions of vehicle v and edge node e regarding service program k, and C3 and C4 are the cache conditions of task T v,k The proportion of offloaded to the nearest edge node e and edge pool, C5 and C6 are the cache capacity limits of each vehicle and edge server, respectively, and C7 and C8 are the edge nodes and edge pools for task T. v,k The proportion of computing resources allocated.
[0086] The specific steps of step S3 are:
[0087] Construct a Markov decision process model:
[0088] Constructing the state space: At time slot t, the state of the edge node e and the vehicle v within its communication range includes the following parameters: service program k cache state c e,k (t), remaining storage capacity m e (t), remaining available computing resources Fe (t), bandwidth W allocated to vehicle v v,e (t), the channel gain g between the edge node e and the vehicle v v,e (t) and the cache status c of the service program in the vehicle v,k (t), therefore, the state of the edge node in the time slot is expressed as:
[0089]
[0090] The system state space consists of the states of all edge nodes in time slot t. After dimensionality reduction and normalization, it is represented as s e (t), therefore, the system state space s t ∈S is expressed as:
[0091]
[0092] Constructing action space: At time slot t, the actions of edge node e and vehicle v within its communication range include: vehicle v sends task T v,k The proportion of offloading to edge node e v,k (t), assigned to task T v,k The computing resources F v,e (t), task T v,k The proportion of offloading to the edge pool e,k (t) and the updated service cache status c after all task calculations are completed e,k (t), therefore, the action of edge node e in time slot t is expressed as:
[0093]
[0094] The system action space consists of the actions of all edge nodes in time slot t. After dimensionality reduction and normalization, it is represented as a e (t), therefore, the system action space a t ∈A is expressed as:
[0095]
[0096] The agent's actions are driven by rewards. The reward mechanism should be associated with the objective function. Therefore, the agent is in state s t Next, according to the strategy, we select action a t The reward r t It is expressed as:
[0097]
[0098] in is a hyperparameter.
[0099] The specific steps of step S4 are:
[0100] In the DDPG algorithm, the Actor network is responsible for generating actions based on the current strategy, while the Critic network evaluates the actions taken and gives reward predictions. The specific process is as follows:
[0101] Initialization: Initialize the experience playback buffer, the Actor network, and the Critic network, and create corresponding target networks for these two networks. The parameters in the target network are the same as those of the original network.
[0102] Interaction and experience collection: At each time slot, the agent receives the current state s t As input, it adds adaptive noise according to the current policy and outputs a random action a t , where the current strategy is represented by the Actor network, the agent performs the action, and observes the reward r of the environment feedback t and the next state s t+1 , store this experience in the experience playback buffer, this experience includes the current state s t , Action performed a t , the reward obtained and the next state s t+1 ;
[0103] Experience replay and training: When there is enough data in the experience replay buffer, a batch of experience samples are randomly extracted from it. The target network uses these experience samples to calculate the target Q value, which is based on the maximum expected reward of the next state plus the current reward r t Calculation, by minimizing the error between the Q value predicted by the Critic network and the target Q value and updating the parameters of the Critic network through the gradient descent method, using the Critic network to evaluate the actions under the current strategy, and updating the parameters of the Actor network at a low frequency through the policy gradient method;
[0104] Target network update: In each round of training, the parameters of the target network are smoothly updated in a low-frequency soft update mode to maintain the stability of the target network;
[0105] Iterative optimization: Repeat the steps of experience replay, training, and target network update. During the iterative training process, the agent's strategy is gradually optimized until the preset number of training rounds is reached or other stopping conditions are met, and finally the optimal strategy is output.
[0106] This technical solution provides an efficient and reliable solution for task offloading and service caching in the Internet of Vehicles scenario. Compared with the existing technical methods, the method of this technical solution has the following significant advantages:
[0107] 1. This technical solution adopts a method combining zero-mean Gaussian distribution with the Nakagami-m model to achieve an accurate description of the characteristics of the communication channel. Among them, the Nakagami-m model can effectively capture the random and variable characteristics of the communication channel in different environments due to its parameter scalability and excellent fitting performance. This feature enables the model to more closely simulate the complex situations of the real system and provides richer and more useful conditions for model training. In this way, this technical solution ensures that the model can better adapt to and cope with various complex communication environments.
[0108] 2. In view of the diverse types of tasks, this technical solution proposes a task priority queue model. This model uses a task scheduler to evaluate the priority of tasks generated by vehicles to ensure that high-priority tasks can be processed first. By optimizing the task processing order, the present invention effectively reduces the task waiting time and improves the user experience.
[0109] 3. This technical solution fully considers the system service cache status in the task offloading decision process. According to the service cache status, the offloading strategy is dynamically adjusted to ensure that the task can be offloaded to the most suitable edge node for calculation. This strategy not only improves the accuracy of task offloading, further reduces the cost of task processing, but also optimizes the use of system resources, improves user experience and system performance.
[0110] 4. The cloud-edge collaboration mechanism and the edge node collaboration mechanism designed in this technical solution significantly improve the completion rate of task offloading and greatly increase the throughput of the system. By realizing collaborative processing tasks between edge nodes and cloud-edge collaboration, this technical solution fully utilizes the advantages of edge computing and cloud computing and realizes the optimal allocation of computing resources. This collaboration mechanism not only improves the processing power of the system, but also ensures that tasks can be completed in the shortest time, thereby improving the overall performance and efficiency of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0111] Figure 1 Schematic diagram of computing task offloading and service cache architecture;
[0112] Figure 2 Schematic diagram of the interactive training process;
[0113] Figure 3 The simulation results of the impact of different unloading methods on unloading costs are shown in the figure;
[0114] Figure 4 The simulation results of the impact of different caching methods on offloading cost. DETAILED DESCRIPTION
[0115] The content of the present invention is further described below in conjunction with the drawings and embodiments, but the present invention is not limited thereto.
[0116] Example:
[0117] A divisible task offloading and service caching method in a cloud-edge collaborative Internet of Vehicles scenario comprises the following steps:
[0118] Step S1: Determine a system network architecture, which includes a mobile vehicle, an edge pool, and a cloud computing center;
[0119] The system consists of a three-layer system architecture consisting of a cloud computing center, an edge pool, and mobile vehicles. Figure 1 As shown in the figure, the edge pool is composed of a group of edge nodes connected by optical fiber. The edge node is a roadside unit equipped with a MEC server. A management controller (i.e., an agent) is deployed in the edge pool. The agent can collect information from vehicles and edge servers, and make service caching decisions for edge nodes and task offloading decisions for vehicles. The edge pool is defined as E = {1,2,...,e,...,N E}, the set of mobile vehicles is defined as V = {1,2,...,v,...,N V}, the computing power of the edge node MEC server and the intelligent networked vehicle is represented by f e and f v , dividing time into a set of discrete time slots indexed as {1,2,...,t,...,N T}, each time slot has an equal duration Δt, and the set of service programs of different types is defined as K = {1,2,...,k,...,N K}, the size of each service program in the service program set is defined as Assuming that the computing tasks generated by each vehicle in a time slot follow the Bernoulli distribution and the computing tasks are divisible, the task feature information is expressed as:
[0120] T v,k ={D v ,C v ,k,τ v ,pr v} (1.26)
[0121] Where D v Represents task T v,k The amount of input data, in bits; C v Represents the computational task T v,k The number of CPU cycles required, in cycles; τ v Denotes the computational task T of vehicle v v,k The maximum tolerable delay, in ms; pr v For task T v,k Priority;
[0122] Step S2: Establish the communication model, service cache model, task offloading model and task priority model of the system, determine the delay of the vehicle task, establish the optimization problem with the goal of minimizing the average processing cost of the task, and determine the constraints;
[0123] (1) Build a communication model:
[0124] Assumptions It represents the total number of tasks received by edge node e in time slot t. The wireless communication between vehicles and RSU is based on Orthogonal Frequency Division Multiple Access (OFDMA). The total bandwidth of each edge node is W. The spectrum allocated to different edge nodes is the same. The system channel background noise power N0 is expressed by mathematical model as follows:
[0125] N0=κεψW v,e (t) (1.27)
[0126] Where κ is the Boltzmann constant, ε and ψ represent the noise temperature and noise coefficient of the receiving system respectively, W v,e (t) represents the bandwidth allocated by edge node e to the vehicle, and the value of this bandwidth is:
[0127]
[0128] The shadow fading between the vehicle and the edge node follows a zero-mean Gaussian distribution, that is, X~N(0,σ 2 ),variance Indicates shadow;
[0129] Assume (x v ,y v ) and (x e ,y e ) represent the position coordinates of vehicle v and edge node e respectively, h v and h e denote the antenna heights of vehicle v and edge node e respectively. The path loss between the vehicle and the edge node is expressed by the mathematical model as follows:
[0130]
[0131] Among them, λ, χ, and f c They represent the propagation speed of electromagnetic waves in space, the path attenuation index and the channel carrier frequency respectively, D0 represents the relevant distance, D v,e is the Euclidean distance between vehicle v and edge node e:
[0132]
[0133] The small-scale fading between the vehicle and the edge node is modeled using the Nakagami-m channel, and the small-scale parameter Follows the Nakagami-m distribution, that is:
[0134]
[0135] Where m represents the Nakagami-m attenuation parameter, represents the small-scale fading expectation;
[0136] In order to better characterize the actual communication scenario of the Internet of Vehicles, for the channel gain, both small-scale fading and large-scale fading are considered. Large-scale fading includes path loss and shadow fading, so the channel gain g v,e Modeled as:
[0137]
[0138] Among them, H v,e represents small-scale fading, Represents shadow parameters;
[0139] When vehicle v communicates with edge node e, the channel transmission rate can be expressed as:
[0140]
[0141] Among them, P v represents the transmission power of vehicle v;
[0142] (2) Build a service program cache model:
[0143] At the beginning of each time slot t, the vehicle that enters the edge node range updates the task request. The service cache decision of the edge node is made by the proxy, while the service cache decision for the vehicle is made by the vehicle based on its own situation. Assume that M v and M e are the storage capacity of each vehicle and each edge server respectively. Therefore, the service cache has the following storage space limitations:
[0144]
[0145] The binary decision variable c v,k (t)∈{0,1},c e,k (t)∈{0,1} is used to represent the cache status of service program k in vehicle v or edge node e in time slot t, c v,k (t) = 1 and c e,k (t) = 1 means that the service program k is cached on the vehicle v or edge node e, c v,k (t) = 0 and c e,k(t) = 0 means that the service program k is not cached on the vehicle v or the edge node e, respectively;
[0146] For splittable task types, the task can adopt a partial offloading strategy in the following situations:
[0147] When a vehicle v within the communication range of the edge node e initiates a task T v,k When an uninstall request is made, if task T is already cached locally v,k The corresponding service program k, then the agent needs to consider whether the edge node e has cached the corresponding service program. If the edge node e does not cache the corresponding service program, task T v,k Perform the calculation directly locally, otherwise task T v,k You can choose to partially offload to edge nodes e for execution;
[0148] When a vehicle v within the communication range of the edge node e initiates a task T v,k When an uninstall request is made, if there is no cache task T locally v,k Corresponding service program k, task T v,k It will be completely offloaded to the edge node e. At this time, if the edge node e has cached task T v,k The corresponding service program k can be based on whether the task T is cached in the edge pool v,k The corresponding service program k is executed directly on the edge node e or partially offloaded to the edge pool for execution. v,k The corresponding cache service program can be completely offloaded to other edge nodes in the edge pool or cloud computing center for execution according to the program cache status of the edge pool;
[0149] (3) Building a task offloading model:
[0150] When a vehicle v within the communication range of the edge node e initiates a task T v,k When an unloading request is received, the agent performs the task T v,k The corresponding cache placement of service program k selects task T v,k The edge node to which the task should be offloaded is v,k Determine the unloading ratio and resource allocation, assuming d v,k (t)∈[0,1],d e,k (t)∈[0,1] is a continuous decision variable, d v,k (t) and d e,k (t) respectively represent the task T v,k The ratio of offloaded to the nearest edge node e and edge pool, then [1-d v,k (t)] and [1-d e,k(t)] are the remaining tasks performed by vehicle v and the nearest edge node e, respectively. Based on this, we derive the tasks T involving different cache situations. v,k The calculation delay and transmission delay are as follows:
[0151] Task T v,k The computational latency generated by local execution is expressed as:
[0152]
[0153] Task T v,k The energy consumption generated by local execution is expressed as:
[0154]
[0155] Where l is the calculation energy efficiency parameter;
[0156] Task T v,k The transmission delay offloaded to the edge node e is expressed as:
[0157]
[0158] Where φ(x) indicates whether the task T is cached in the edge node or edge pool v,k The corresponding cache service program k is expressed as:
[0159]
[0160] Assume that the edge node MEC server is assigned to task T v,k The computing resource scaling factor is The task T of edge node e v,k The execution time is expressed as:
[0161]
[0162] If the task T at the edge node e v,k If the data is further unloaded to other edge nodes in the edge pool, the transmission delay is:
[0163]
[0164] where r e,pool (t) represents the transmission rate between edge servers;
[0165] Assume that other edge nodes in the edge pool are assigned to task T v,k The computing resource scaling factor is Then task T v,k The execution time required is:
[0166]
[0167] If task T v,k Further offload to the cloud computing center for processing. Since the cloud computing center has abundant computing and storage resources, the queuing delay and computing time of the cloud computing center are ignored. In addition, since the amount of data of the calculation result is usually much smaller than the task T v,k The amount of input data is , so the delay of the calculation result return process is also ignored. However, it is necessary to consider the task T v,k The latency of offloading to the cloud computing center includes the data transmission time between the vehicle and the edge node and the wired transmission delay of the long-distance optical fiber network. v,k First, it is unloaded to the nearest edge node e, and the resulting delay is:
[0168]
[0169] Then the edge node e transmits the task data to the cloud computing center, and the transmission delay is:
[0170]
[0171] where r e,cloud (t) is the data transmission rate between the edge node e and the cloud computing center;
[0172] The propagation delay of light wave signal in optical fiber is t l :
[0173]
[0174] Where l is the propagation distance, c is the speed of light, and n is the refractive index;
[0175] So task T v,k The total latency of offloading to the cloud computing center is:
[0176]
[0177] Considering the transmission delay and computation delay under different caching and offloading decisions, the processing task T v,k The total delay in time slot t can be expressed as:
[0178]
[0179] Similarly, task T v,k The total energy consumption is:
[0180]
[0181] Where P v and P edge are the transmission powers of vehicles and edge nodes, respectively;
[0182] Formula (1.14) can express the delay caused by all situations of service caching and task offloading. The average processing delay of all tasks in the system is defined as:
[0183]
[0184] The average energy consumption of all tasks in the system is defined as:
[0185]
[0186] (4) Task priority model:
[0187] Introducing waiting delay, the delay tolerance and computational complexity of the comprehensive task affect the task priority and scheduling. The number of tasks in the task scheduling system is represented as {1, 2, ..., n}, and the task priority set is represented as Task priorities are defined as follows:
[0188]
[0189] Among them, τ v It is task T v,k Tolerance delay, t v Is to execute task T v,k Estimated waiting delay, τ v -t v ≤0 means task T v,k If the calculation cannot be completed within the maximum delay tolerance, the calculation of the task is abandoned directly. ω1 and ω2 represent the task T v,k The weight coefficient of delay tolerance and computational complexity, and the following conditions must be met:
[0190]
[0191] (5) Constructing the problem model:
[0192] The main goal is to design a joint computation offloading and service caching method to minimize the average processing cost of all tasks. The processing cost of a task is composed of the task completion delay and energy consumption, which is defined as:
[0193] U(t)=u T T(t)+u E E(t) (1.19)
[0194] where u T ∈[0,1] and u E ∈[0,1] represents the weight parameter of task completion delay and energy consumption. The value of the weight parameter varies according to the nature of the vehicle task. Therefore, the optimization problem is represented by the following mathematical model:
[0195]
[0196]
[0197]
[0198]
[0199]
[0200]
[0201]
[0202]
[0203]
[0204] Constraints C1 and C2 are the cache conditions of vehicle v and edge node e regarding service program k, and C3 and C4 are the cache conditions of task T v,k The proportion of offloaded to the nearest edge node e and edge pool, C5 and C6 are the cache capacity limits of each vehicle and edge server, respectively, and C7 and C8 are the edge nodes and edge pools for task T. v,k The proportion of computing resources allocated;
[0205] Step S3: Approximate the optimization problem proposed in step S2 as a Markov decision process (MDP), design the task request state, service program cache state, remaining storage capacity, bandwidth, channel gain and task priority as the state space, and also design the offloading strategy, cache strategy and task partition ratio as the action space, and use the equation with minimizing the average task processing cost as the optimization goal as the reward, and transform it into solving the optimal task offloading strategy problem and cache strategy problem;
[0206] Constructing state space: In the Internet of Vehicles system, the state space is used to describe the system environment information. At time slot t, the state of the edge node e and the vehicle v within its communication range includes the following parameters: service program k cache state c e,k (t), remaining storage capacity m e (t), remaining available computing resources F e (t), bandwidth W allocated to vehicle v v,e (t), the channel gain g between the edge node e and the vehicle v v,e (t) and the cache status of the service program in the vehicle, so the state of the edge node in the time slot is expressed as:
[0207]
[0208] The system state space consists of the states of all edge nodes in time slot t. After dimensionality reduction and normalization, it is represented as s e (t), therefore, the system state space s t ∈S is defined as:
[0209]
[0210] Constructing action space: After the agent obtains the status information of the vehicle and the edge node, it selects the action to be executed according to the strategy. At time slot t, the action for the edge node e and the vehicle v within its communication range includes the following parts: vehicle v sends task T v,k The proportion of offloading to edge node e v,k (t), assigned to task T v,k The computing resources F v,e (t), task T v,k The proportion of offloading to the edge pool e,k (t) and the updated service cache status c after all task calculations are completed e,k (t), therefore, the action of edge node e in time slot t is expressed as:
[0211]
[0212] The system action space consists of the actions of all edge nodes in time slot t. After dimensionality reduction and normalization, it is represented as a e (t), therefore, the system action space a t ∈A is defined as:
[0213]
[0214] The agent's actions are driven by rewards. The reward mechanism should be associated with an objective function, which aims to minimize the average processing cost of all tasks in the system. Therefore, the agent is in state s t Next, according to the strategy, we select action a t The reward r t The definition is as follows:
[0215]
[0216] in is a hyperparameter;
[0217] Step S4: Find the optimal solution to the problem based on the deep deterministic policy gradient algorithm. The interactive training process is as follows: Figure 2 As shown;
[0218] (1) Actor neural network training and parameter update rules in the current network
[0219] The main function of the Actor network is to t Select action a t , then through action a t Interact with the environment and output a reward value r t and the next state s t+1 In this process, action a t is generated from the task offloading strategy. The task offloading strategy is based on the Actor network strategy μ(s t |θ μ ) and a random strategy for adaptive noise generation, where the adaptive noise is based on mean reversion (Ornstein-Uhlenbeck, OU) noise ξ t Improved,adaptive noise is to better balance the exploration and exploitation of deterministic strategies. Therefore, action a t The mathematical model is defined as:
[0220]
[0221] Where σ is the gain factor, n ep is the number of completed iterations;
[0222] Output action a in the Actor's current network t After that, the Critic current network will calculate the action value Q(s t ,a t |θ η ), the loss value of the Actor's current network is determined by the Q value output by the Critic's current network. The loss function model of the Actor network is expressed as:
[0223]
[0224] In the Actor network, update the network parameters θ μ The policy gradient method is adopted, and its policy gradient model is:
[0225]
[0226] The Actor network converts the state into t ,a t ,r t ,s t+1} is stored in the experience replay buffer as the training data set for training the current network. In each step of iterative training, the system will randomly extract a certain number of experience replay tuples {s t ,a t ,r t ,s t+1}, Actor network parameters θμ The iterative update process is expressed as:
[0227]
[0228] where α μ Indicates the current network learning rate of Actor;
[0229] (2) Critic neural network training and parameter update rules in the current network
[0230] The main work of the Critic network is to use the action value function Q(s t ,a t ,θ η ) Evaluate the action a chosen by the Actor network t The evaluation value output by the network is used to evaluate the quality of the Actor's actions. t ,a t ,θ η ) is updated through the Bellman equation, and the mathematical model is expressed as:
[0231] Q(s t ,a t |θ η )=E[r(s t ,a t )+γQ(s t+1 ,a t+1 |θ η )] (1.38)
[0232] The mean square error between the evaluation value and the target value is defined as the loss function, which is expressed as:
[0233] L(θ η )=E{(Q(s t ,a t |θ η )-y t ) 2} (1.39)
[0234] Among them, y t is the target value in the Critic target network, which is expressed as:
[0235] y t = r(s t ,a t )+γQ'(s t+1 ,μ'(s t+1 |θ η ')|θ η ') (1.40)
[0236] The loss function L(θ η) is expressed as:
[0237]
[0238] At each step of the training, the system randomly extracts a certain number of experience replay tuples {s t ,a t ,r t ,s t+1}, use Adam optimizer to update the parameter θ η , the update rule is expressed as:
[0239]
[0240] where α η Refers to the learning rate of the Critic current network;
[0241] (3) Training and updating rules of the target network
[0242] According to the parameter network θ in the current network μ and θ η Soft update target network parameter θ μ ' and θ η ', the soft update expression is:
[0243]
[0244] where κ∈[0,1].
[0245] In order to provide a more stable update target and reduce the cumulative error, the Actor current network and the target network are updated delayed, that is, they are updated only after the Critic network is updated d times. The specific process of training the Actor network and the Critic network is as follows:
[0246]
[0247]
[0248] The embodiment named the task offloading and service caching method based on the DDPG algorithm as CSCTP-DDPG. In order to verify the effectiveness and superiority of CSCTP-DDPG for task offloading and service caching, a comparative experiment on the offloading cost was conducted between it and six other schemes.
[0249] Simulation experiment comparison of the impact of different offloading methods on offloading costs: Local, that is, all vehicle computing tasks are performed locally; MEC, that is, all vehicle-generated computing tasks are offloaded to edge nodes for execution; Cloud, that is, all vehicle-generated computing tasks are offloaded to cloud computing centers for execution. For each group of experiments with different numbers of vehicles, the same proportion of parameter values is set, and multiple experiments are performed to obtain the average value. The final results are shown in the figure. Figure 3 As shown. Figure 3 It can be seen that when the number of vehicles is the same, the unloading cost of this method is lower than that of other methods.
[0250] Simulation experiment comparison of the impact of different caching methods on offloading costs: N-Cache, task offloading without considering service cache; LRU, the service program requested in the previous time slot in the server continues to be cached in the next time slot, and the service program that is not requested is randomly replaced; DQN-based service cache and task offloading algorithm; the same proportion of parameter values are set in each group of experiments with different task sizes, and the average is taken after multiple experiments. The final results are shown in the figure. Figure 4 As shown. Figure 4 It can be seen that when the task size is the same, the offloading cost of this method is lower than that of other methods.
Claims
1. A divisible task offloading and service caching method in a cloud-edge collaborative Internet of Vehicles scenario, characterized in that: The steps include: Step S1: Build a task offloading and service cache system architecture; Step S2: Establish the communication model, service cache model, task offloading model and task priority model of the system, establish the optimization problem with the goal of minimizing the average processing cost of the task, and determine the constraints; Step S3: approximate the optimization problem proposed in step S2 to a Markov decision process, design the service program cache state, remaining storage capacity, remaining available computing resources, bandwidth, channel gain and task priority as the state space, and also design the offloading decision, cache decision and task division ratio as the action space, and use the equation with the minimization of the average processing cost of the task as the optimization goal as the reward, and transform it into solving the optimal divisible task offloading strategy problem and the cache strategy problem; Step S4: construct a divisible task decision model and a service cache decision model based on a deep deterministic policy gradient algorithm; train the divisible task decision model and the service cache decision model according to the real-time state space with the goal of minimizing the average processing cost of the task; output the task offloading decision and the service cache decision through the trained divisible task and service cache decision models according to the real-time state space.
2. According to the method of claim 1, the method of offloading divisible tasks and caching services in a cloud-edge collaborative Internet of Vehicles scenario is characterized in that: The specific steps of step S1 are: A three-layer system architecture consists of a cloud computing center, an edge pool, and mobile vehicles. The edge pool consists of a group of edge nodes connected by optical fibers. The edge nodes are roadside units equipped with MEC servers. A management controller, i.e., an agent, is deployed in the edge pool. The agent can collect information from vehicles and edge servers, and make service caching decisions for edge nodes and task offloading decisions for vehicles. The edge pool is defined as E = {1,2,...,e,...,N E }, the set of mobile vehicles is defined as V = {1,2,...,v,...,N V }, the computing power of the edge node MEC server and the intelligent networked vehicle is defined as f e and f v , the set of different types of service programs is defined as K = {1,2,...,k,...,N K }, the size of each service program in the service program set is defined as 3. According to the method of claim 1, the method of offloading divisible tasks and caching services in a cloud-edge collaborative Internet of Vehicles scenario is characterized in that: The specific steps of step S2 are: (1) Build a communication model: In order to characterize the actual communication scenario of the Internet of Vehicles, for the channel gain, both small-scale fading and large-scale fading are considered. Large-scale fading includes path loss and shadow fading. Small-scale fading is based on Nakagami-m distribution, and shadow fading is based on zero-mean Gaussian distribution. Therefore, the channel gain g v,e Modeled as: Among them, D0 represents the relevant distance, D v,e (t) represents the Euclidean distance between vehicle v and edge node e, λ represents the propagation speed of electromagnetic waves in space, χ represents the path attenuation index, and f c Indicates the channel carrier frequency, H v,e represents small-scale fading, Represents shadow parameters; When vehicle v communicates with edge node e, the channel transmission rate is expressed as: Among them, W v,e (t) represents the vehicle allocation bandwidth, P v represents the transmission power of vehicle v, κ represents the Boltzmann constant, ε represents the noise temperature of the receiving system, and ψ represents the noise coefficient of the receiving system; (2) Build a service program cache model: At the beginning of each time slot t, the vehicle that enters the edge node range updates the task request. The service cache decision of the edge node is made by the agent, while the service cache decision for the vehicle is made by the vehicle based on its own situation. v and M e Represent the storage capacity of each vehicle and each edge server respectively. Therefore, the service cache has the following storage space limitations: The binary decision variable c v,k (t)∈{0,1},c e,k (t)∈{0,1} is used to represent the cache status of service program k in vehicle v or edge node e in time slot t; For splittable task types, the task adopts a partial offloading strategy in the following situations: When a vehicle v within the communication range of the edge node e initiates a task T v,k When an uninstall request is made, if task T is already cached locally v,k The corresponding service program k, then the agent needs to consider whether the edge node e has cached the corresponding service program. If the edge node e does not cache the corresponding service program, task T v,k Perform the calculation directly locally, otherwise task T v,k Can choose to partially offload to edge node e for execution; When a vehicle v within the communication range of the edge node e initiates a task T v,k When an uninstall request is made, if there is no cache task T locally v,k Corresponding service program k, task T v,k It will be completely offloaded to the edge node e. At this time, if the edge node e has cached task T v,k The corresponding service program k can determine whether the task T is cached in the edge pool. v,k The corresponding service program k is chosen to be executed directly on the edge node e or partially offloaded to the edge pool for execution; if the edge node e does not have task T v,k The corresponding cache service program can be completely offloaded to other edge nodes or cloud computing centers in the edge pool for execution according to the program cache status of the edge pool; (3) Building a task offloading model: When a vehicle v within the communication range of the edge node e initiates a task T v,k When an unloading request is received, the agent performs the task T v,k The corresponding cache placement of service program k selects task T v,k The edge node to which the task should be offloaded is v,k Determine the unloading ratio and resource allocation; define d v,k (t)∈[0,1],d e,k (t)∈[0,1] is a continuous decision variable, d v,k (t) and d e,k (t) respectively represent the task T v,k The ratio of offloading to the nearest edge node e and edge pool, [1-d v,k (t)] and [1-d e,k (t)] represent the remaining tasks performed by vehicle v and the nearest edge node e, respectively. Based on this, we derive the tasks T involving different cache situations. v,k The calculation delay and transmission delay are as follows: Task T v,k The computational latency generated by local execution is expressed as: Task T v,k The energy consumption generated by local execution is expressed as: in is the calculation energy efficiency parameter; Task T v,k The transmission delay offloaded to the edge node e is expressed as: Where φ(x) indicates whether the task T is cached in the edge node or edge pool v,k The corresponding cache service program k; Define the edge node MEC server assigned to task T v,k The computing resource scaling factor is The task T of edge node e v,k The execution time is expressed as: If the task T at the edge node e v,k If the data is further unloaded to other edge nodes in the edge pool, the transmission delay is: where r e,pool (t) represents the transmission rate between edge servers; Define other edge nodes in the edge pool to be assigned to task T v,k The computing resource scaling factor is Then task T v,k The execution time required is: If task T v,k Further offload to the cloud computing center for processing, task T v,k First, it is unloaded to the nearest edge node e, and the resulting delay is: Then the edge node e transmits the task data to the cloud computing center, and the transmission delay is: where r e,cloud (t) is the data transmission rate between the edge node e and the cloud computing center; The propagation delay of light wave signal in optical fiber is t l : Where l is the propagation distance, c is the speed of light, and n is the refractive index; So task T v,k The total latency of offloading to the cloud computing center is: Considering the transmission delay and computation delay under different caching and offloading decisions, the processing task T v,k The total delay in time slot t is expressed as: Task T v,k The total energy consumption is: Where P v and P edge are the transmission powers of vehicles and edge nodes, respectively; Formula (1.14) represents the latency in all cases of service caching and task offloading, assuming represents the total number of tasks received by edge node e in time slot t. The average processing delay of all tasks in the system is defined as: The average energy consumption of all tasks in the system is defined as: (4) Task priority model: Introducing waiting delay, the impact of task delay tolerance and computational complexity on task priority and scheduling is considered. The number of tasks in the task scheduling system is represented as {1,2,...,n}, and the task priority set is represented as Task priorities are defined as follows: Among them, τ v It is task T v,k Tolerance delay, t v Is to execute task T v,k The expected waiting delay, ω1 and ω2 represent the task T v,k The weight coefficient of delay tolerance and computational complexity; (5) Constructing the problem model: The processing cost of a task is composed of the task completion delay and energy consumption, which is defined as: U(t)=u T T(t)+u E E(t) (1.19) where u T ∈[0,1] and u E ∈[0,1] represents the weight parameters of task completion delay and energy consumption respectively. The main goal is to minimize the average processing cost of all tasks. The optimization problem is represented by the following mathematical model: Constraints C1 and C2 are the cache conditions of vehicle v and edge node e regarding service program k, and C3 and C4 are the cache conditions of task T v,k The proportion of offloaded to the nearest edge node e and edge pool, C5 and C6 are the cache capacity limits of each vehicle and edge server, respectively, and C7 and C8 are the edge nodes and edge pools for task T. v,k The proportion of computing resources allocated.
4. According to the method of claim 1, the divisible task offloading and service caching method in the cloud-edge collaborative Internet of Vehicles scenario is characterized in that: The specific steps of step S3 are: Construct a Markov decision process model: Constructing the state space: At time slot t, the state of the edge node e and the vehicle v within its communication range includes the following parameters: service program k cache state c e,k (t), remaining storage capacity m e (t), remaining available computing resources F e (t), bandwidth W allocated to vehicle v v,e (t), the channel gain g between the edge node e and the vehicle v v,e (t) and the cache status c of the service program in the vehicle v,k (t), therefore, the state of the edge node in the time slot is expressed as: The system state space consists of the states of all edge nodes in time slot t. After dimensionality reduction and normalization, it is represented as s e (t), therefore, the system state space s t ∈S is expressed as: Constructing action space: At time slot t, the actions of edge node e and vehicle v within its communication range include: vehicle v sends task T v,k The proportion of offloading to edge node e v,k (t), assigned to task T v,k The computing resources F v,e (t), task T v,k The proportion of offloading to the edge pool e,k (t) and the updated service cache status c after all task calculations are completed e,k (t), therefore, the action of edge node e in time slot t is expressed as: The system action space consists of the actions of all edge nodes in time slot t. After dimensionality reduction and normalization, it is represented as a e (t), therefore, the system action space a t ∈A is expressed as: The agent's actions are driven by rewards. The reward mechanism should be associated with the objective function. Therefore, the agent is in state s t Next, we select action a according to the strategy. t The reward r t It is expressed as: in is a hyperparameter.
5. According to the method of claim 1, the divisible task offloading and service caching method in the cloud-edge collaborative Internet of Vehicles scenario is characterized in that: The specific steps of step S4 are: In the DDPG algorithm, the Actor network is responsible for generating actions based on the current strategy, while the Critic network evaluates the actions taken and gives reward predictions. The specific process is as follows: Initialization: Initialize the experience playback buffer, Actor network and Critic network, create corresponding target networks for the Actor network and Critic network, and the parameters in the target network are the same as those of the original network; Interaction and experience collection: At each time slot, the agent receives the current state s t As input, it adds adaptive noise according to the current policy and outputs a random action a t , where the current strategy is represented by the Actor network, the agent performs the action, and observes the reward r of the environment feedback t and the next state s t+1 , store this experience in the experience playback buffer, this experience includes the current state s t , Action performed a t , the reward obtained and the next state s t+1 ; Experience replay and training: When there is enough data in the experience replay buffer, a batch of experience samples are randomly extracted from it. The target network uses these experience samples to calculate the target Q value, which is based on the maximum expected reward of the next state plus the current reward r t Calculation, by minimizing the error between the Q value predicted by the Critic network and the target Q value and updating the parameters of the Critic network through the gradient descent method, using the Critic network to evaluate the actions under the current strategy, and updating the parameters of the Actor network at a low frequency through the policy gradient method; Target network update: In each round of training, the parameters of the target network are smoothly updated in a low-frequency soft update mode to maintain the stability of the target network; Iterative optimization: Repeat the steps of experience replay, training, and target network update. During the iterative training process, the agent's strategy is gradually optimized until the preset number of training rounds is reached or other stopping conditions are met, and finally the optimal strategy is output.
Citation Information
Cited By
Border collaborative multi-task computing unloading method and device and storage medium
CN118760530A
Intelligent computing power distribution method and service system based on cloud edge collaboration
CN118860675A
Edge computing network service cache updating method considering switching cost
CN119299457A
Internet of vehicles heterogeneous resource allocation method based on cloud side-end cooperative computing
CN119364316A
Multi-agent depth deterministic gradient strategy calculation unloading method
CN119545434A
