A vehicle fog computing method based on deep reinforcement learning and contract matching

By employing deep reinforcement learning and contract matching methods, the problems of uneven allocation of vehicle computing resources and lack of incentive mechanisms were solved, achieving reasonable allocation and optimization of vehicle computing resources and meeting the low latency requirements of computationally intensive applications.

CN116033388BActive Publication Date: 2026-03-20NANJING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-13
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

In existing technologies, uneven distribution of vehicle computing resources, asymmetric private information of vehicles, and a lack of effective incentive mechanisms lead to insufficient sharing of vehicle computing resources, which cannot meet the low latency requirements of computing-intensive applications.

Method used

By employing a method based on deep reinforcement learning and contract matching, vehicle information is collected through roadside units, task priorities are ranked, service vehicles are selected, a vehicle preference list is established, contracts are signed, and reward functions are calculated to achieve reasonable allocation and optimization of resources.

Benefits of technology

It achieves reasonable allocation and optimization of vehicle computing resources, meets the low latency requirements of computing-intensive applications, and improves resource utilization efficiency and the effectiveness of vehicle incentive mechanisms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116033388B_ABST
    Figure CN116033388B_ABST
Patent Text Reader

Abstract

The application discloses a vehicle fog computing method based on deep reinforcement learning and contract matching, on the basis of vehicle fog computing, deep reinforcement learning is used to reasonably allocate and optimize vehicle resources, and a task offloading framework based on vehicle fog computing is constructed. The framework adopts the mode of signing a contract, in the case of vehicle mobility, task priority and vehicle service availability, the reasonable allocation of resources is maximized. Vehicles are roughly divided into two categories: task vehicles and service vehicles. First, the task vehicle generates a task and sends it to the roadside processing unit RSU, and the SAC algorithm is used to establish a preference list of service vehicles according to the priority of the task, the availability of the vehicle service and the shared computing capacity provided by the service vehicle; secondly, the RSU selects the corresponding service vehicle to sign a contract and make a reward, and finally, a task offloading strategy is executed, which maximizes the reasonable allocation of resources on the premise that the task can be completed.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of Internet of Vehicles, and integrates the concept of fog computing into Internet of Vehicles, combines contract theory and matching theory, and realizes reasonable allocation and optimization of vehicle resources. BACKGROUND

[0002] With the rapid development of Internet of Vehicle (IoV) and Artificial Intelligence (AI) technology, a series of vehicle computing-intensive applications have been promoted, such as augmented reality, automatic driving, crowd perception, virtual reality, etc. In order to meet the growing computing demand, due to the limited computing power of vehicle-mounted devices, they will face great challenges in providing high-quality services, and the cost of upgrading is also high. At this time, the emergence of cloud offloading as an effective way to solve these challenges.

[0003] Cloud offloading is to offload tasks to remote cloud servers to compute tasks to obtain a large amount of computing resources. However, cloud offloading will cause longer transmission delay time, higher communication energy consumption, and increased computing cost. Therefore, for delay-sensitive applications, it is not suitable to be offloaded to centralized cloud. Therefore, in order to meet the low delay requirement of task offloading, mobile edge computing (MEC) is introduced in the vehicle network, that is, vehicle edge computing (VEC), in which the road side unit (RSU) and the base station (BS) are equipped with a certain amount of computing and storage resources to provide corresponding computing services for vehicles. However, due to the increase in the number of vehicles and traffic density, the computing resources of RSU and BS are limited, and it is difficult to guarantee the quality of service (QoS) and experience quality (QoE) of all application programs. In addition, RSU and BS servers are usually fixed infrastructure, so the relative speed between vehicles and RSU / BS is high, resulting in a short connection time. On the contrary, the relative speed between two vehicles driving in the same direction is small, which can maintain a long connection time. Moreover, many high-end cars are equipped with many vehicle-mounted devices and have a certain computing power.

[0004] With the rapid development of autonomous driving and the fifth generation (5G) communication technology, there will be more and more cars with sufficient computing power. Vehicle fog computing (VFC) is to extend the concept of fog computing to the traditional vehicle network, in which vehicles are used as mobile fog nodes to support the full use of the computing resources of vehicles themselves. Vehicle fog computing is considered a promising solution to alleviate the overload of base stations and reduce processing delays during peak hours. By taking advantage of the underutilized computing resources of nearby vehicles, computing tasks can be offloaded from base stations to vehicle fog nodes.

[0005] Due to the high-speed mobility of vehicles, when considering the case of vehicles in a high dynamic environment, the computing resource allocation strategy should change with the real-time changes of the vehicle environment, and it is difficult to obtain a complete system model and environment dynamics. Therefore, model-free DRL (Deep Reinforcement Learning) can be used to process the vehicle environment.

[0006] In addition, there is also a lack of effective incentive mechanism for vehicles as fog nodes. Most previous studies have assumed that vehicles will share their computing resources unconditionally, but this assumption is not very feasible in reality. Private vehicles will not provide computing resources unconditionally free of charge, so they need to be compensated accordingly.

[0007] In addition, for vehicles themselves, the private information of vehicles, such as preferences for resource sharing and the total amount of available resources, is asymmetric, which is called an information asymmetry scenario. Therefore, it is essential to establish an incentive mechanism that effectively optimizes the economic benefits of network operators or base stations under the condition of information asymmetry. SUMMARY

[0008] The main purpose of the present application is to provide a vehicle fog computing method based on deep reinforcement learning and contract matching to reasonably allocate and optimize vehicle resources.

[0009] To achieve the above purpose, the present application provides a vehicle fog computing method based on deep reinforcement learning and contract matching, mainly comprising the following steps:

[0010] S1, the roadside unit RSU collects vehicle and task information, including the speed, position, computing power of the vehicle, and the size, required computing resources, deadline and priority of the task;

[0011] S2, the tasks are sorted according to their priorities, and tasks with high priorities are executed first; the time required for computing tasks to be offloaded to service vehicles is compared with the task deadlines to select available service vehicles;

[0012] S3, the service availability of the computing task offloading to the service vehicle is calculated, and a service vehicle preference list corresponding to the shared computing capability of the service vehicle is established;

[0013] S4, a contract is signed, a reward function is calculated, and the task offloading is completed.

[0014] As a further improvement of the application, the step S1 is specifically: establishing a system model, taking the roadside unit RSU as the origin (0, 0) to establish a two-dimensional coordinate, and the communication range of the RSU is R; the position of the task vehicle V i is defined as (X i , Y i ), the position of the service vehicle V k is defined as (X k , Y k ), the speed of the task vehicle V i and the service vehicle V k is the same, which is v.

[0015] As a further improvement of the application, the step S2 is specifically:

[0016] The roadside unit RSU collects all the task information, sorts them according to the priority S n of the task, and executes the task with high priority first;

[0017] It is judged whether the task vehicle V i and the service vehicle V k are within the communication range of the RSU, and the task offloading is started;

[0018] The time required by the task vehicle V i to offload the task φ n to the surrounding service vehicle V k is calculated and compared with the deadline of the task φ n to screen out the vehicle V k that can provide service.

[0019] As a further improvement of the application, the formula for calculating the time is:

[0020]

[0021] Wherein, D n represents the input data size, r i,k represents the transmission rate between the task vehicle V i and the service vehicle V k , C n represents the calculation size of CPU cycles required to complete the task, and θk This indicates the vehicle's computing power.

[0022] As a further improvement of the present invention, step S3 specifically involves: selecting the vehicles V that can provide services. k Calculate the task φ n Unload to service vehicle V k Service availability And determine whether the service is feasible; then, based on the service vehicle V k Provided shared computing power θ m Create a vehicle preference list.

[0023] As a further improvement of the present invention, the service availability The calculation formula is:

[0024]

[0025] Among them, T k Indicates mission vehicle V i With service vehicle V k The duration of the V2V transmission link between them, τ n Represents the delay constraint, ε k This indicates that the unloading task was performed on the serviced vehicle V. k The probability of acceptance.

[0026] As a further improvement of the present invention, the duration T k Represented as:

[0027]

[0028] Where R represents the communication range of the RSU, when A positive result indicates successful task uninstallation; otherwise, a negative result indicates task uninstallation failure.

[0029] As a further improvement of the present invention, step S4 specifically includes:

[0030] Contracts are created based on vehicle type, and RSUs are used to broadcast contract information.

[0031] Let the mission vehicle V i With service vehicle V k Achieve two-way matching, with both parties signing a contract and determining the remuneration based on the task priority and contract type;

[0032] After the contract is signed, calculate the reward function r(s). t ,a t This indicates that the task has been successfully unloaded.

[0033] As a further improvement of the present application, the reward function r(s t ,a t ) is expressed as:

[0034]

[0035] Where c k (t) is a binary variable, c k (t) = 1 indicates that the computing task is offloaded to V k , π k (t) represents the unit price paid to the service vehicle per CPU cycle, D(t) represents the data size of the task, C(t) represents the computing resources required by the task, and u k (t) represents the utility function of the task.

[0036] As a further improvement of the present application, it is assumed that there are T time slots in a cycle, and in each time slot, a computing task of the task vehicle is offloaded to a service vehicle, then the average reward can be expressed as:

[0037]

[0038] The present application has the beneficial effects that: the present application extends the concept of fog computing to traditional vehicle networks, wherein vehicles are used as mobile fog nodes to support the full utilization of vehicle computing resources; considering the high mobility of vehicles, a model-free DRL is introduced to obtain the system model of the vehicle and the dynamics of the environment; and the vehicle is given a corresponding incentive reward, which can better realize the bidirectional matching between tasks and computing resources, thereby realizing the reasonable allocation and optimization of resources. BRIEF DESCRIPTION OF DRAWINGS

[0039] Figure 1 is the system model of the vehicle fog computing established by the present application.

[0040] Figure 2 is the simulation effect diagram of the SAC algorithm proposed by the present application.

[0041] Figure 3 is a comparison diagram of the simulation effects of the SAC algorithm and the TD3 algorithm.

[0042] Figure 4 is a flowchart of task offloading. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical scheme and advantages of the present application clearer, the present application will be described in detail below with reference to the drawings and specific embodiments.

[0044] It should be emphasized that, in describing the application, various specific details are set forth in order to provide a thorough understanding of the application. However, it will be apparent to those skilled in the art that the application can be practiced without these specific details. In other instances, well-known methods, procedures, components, and circuits have not been described in detail so as not to unnecessarily obscure aspects of the application.

[0045] To solve the challenges faced by VFC mentioned in the background, the application designs a distributed vehicle-to-vehicle (V2V) task offloading scheme, which mainly involves the following aspects:

[0046] 1) Considering the priority of the computing task, ensuring that the vehicle task with high priority is executed first, and establishing the corresponding vehicle priority utility function;

[0047] 2) In the task offloading process, the service availability of the vehicle is evaluated to determine whether it will affect the task offloading and computing;

[0048] 3) In order to encourage vehicles to share their resources, an incentive mechanism is established, and a contract is designed, which specifies the relationship between the required computing resources of the vehicle and the payment required for the vehicle to contribute computing resources;

[0049] 4) According to the sharing capabilities that the vehicle can provide, a vehicle preference list is established;

[0050] 5) The task offloading problem is formulated as a Markov decision process (MDP), and a model-free reinforcement learning algorithm is used, which uses an actor-critic framework to evaluate and improve the task offloading strategy, and at the same time, the algorithm is applied to maximize the expected return and policy entropy, improving the robustness and sampling efficiency.

[0051] Specifically, the application of the Internet of Vehicles is as shown in Figure 1 The scene includes RSU and Z vehicles with strong computing power moving on a one-way highway, z∈{1,2,3…Z}. In this scenario, the RSU is responsible for the allocation of computing resources, and the communication range of the RSU is set to be much larger than that of the vehicle. We assume that if a vehicle enters the coverage area of an RSU and is willing to participate in VFC, it will send an information containing its position, speed and computing capability to the RSU; then, the road traffic situation within the coverage of the RSU can be agented by the RSU; finally, we use a time slot model to divide the time into discrete intervals.

[0052] In a time interval T, assuming that there are several vehicles that do not have enough computing power to execute some vehicle-mounted applications, we will select one of them, V icalled task vehicles, and during this period, in the communication range of V i there are K vehicles, denoted as V k ={V1, V2,.... V K} respectively, which are likely to be selected as service vehicles to provide idle computing resources for task vehicles.

[0053] Suppose there are N tasks in the time interval T, and the task set is denoted as φ n ={φ1, φ2,.... φ N}, and the task φ n is denoted as {D n , C n , τ n , S n}, where D n represents the input data size, C n represents the computing size of CPU cycles required to complete the task, τ n represents the delay constraint, and S n represents the priority of the task. In this invention, a two-dimensional coordinate system is established with the RSU as the origin (0, 0), the computing capacity of the RSU is denoted as θ0, the speed and position of the vehicle are denoted as v f and (X f , Y f ), and the computing capacity of the vehicle is denoted as θ k .

[0054] We assume that the wireless channel state between the task vehicle V i and the service vehicle V k remains static during the data transmission of each computing task, and the transmission rate between the task vehicle V i and the service vehicle V k is denoted as:

[0055] r i,k = Blog2(1+R i,k ) (1)

[0056] where B represents the bandwidth of the channel transmission, and R i,k represents the signal-to-noise ratio (SNR) of the wireless channel during transmission between the task vehicle V i and the service vehicle V k .

[0057] The signal-to-noise ratio (SNR) of the transmission channel between the task vehicle V i and the service vehicle V k in the Tth time interval of wireless communication is denoted as:

[0058]

[0059] where, denotes the wireless transmission power of the task vehicle V i at the Tth time interval; h i,k denotes the wireless channel gain between the task vehicle V i and the service vehicle V k ; N0denotes the noise power.

[0060] The wireless channel gain h i between the task vehicle V k and the service vehicle V i,k is denoted as:

[0061]

[0062] where, P i denotes the transmission power of the task vehicle V i , and denote the gain of the transmission antenna of the task vehicle V i and the gain of the reception antenna of the service vehicle V k , respectively, L i,k is denoted as the transmission loss.

[0063] The transmission loss L i,k is denoted as

[0064] L i,k = 20lgF + 20lgσ i,k (4)

[0065] where, F denotes the transmission frequency, σ i,k denotes the distance between the task vehicle V i and the service vehicle V k , i.e., σ i,k = (X i - X k ) 2 + (Y i - Y k ) 2 (5)

[0066] Assuming that the task size D n to be calculated is now needed, the time for transmitting the task from the task vehicle V i to the service vehicle V k is:

[0067]

[0068] The time required for the task is calculated as:

[0069]

[0070] Total time is denoted as

[0071] When , the task can be offloaded from the task vehicle V i to the service vehicle V k , and the service vehicle V k can finish the task within the deadline of the task. Conversely, when , it indicates that the time spent on processing the task exceeds the maximum tolerable delay of the task. If the task vehicle V i cannot finish the task processing by offloading the task to another vehicle, the task needs to be offloaded to the RSU for local processing.

[0072] Regarding the availability of services: in the VFC system, not all vehicles within the communication range of the task vehicle are suitable for task offloading, because some vehicles can be heavily loaded, or the total delay of task offloading exceeds the contact time of the task vehicle and the service vehicle. We use to represent the service availability of the task φ n offloaded to the service vehicle V k . Then, we assume that the service availability depends on the service probability of the service vehicle and the duration of the V2V link between the task vehicle and the service vehicle, which is defined as:

[0073]

[0074] where T k denotes the duration of the V2V transmission link between the task vehicle V i and the service vehicle V k , τ n denotes the delay constraint, and ε k denotes the probability of the offloaded task being accepted by the service vehicle V k .

[0075] The duration T i of the V2V transmission link between the task vehicle V k and the service vehicle V k is denoted as:

[0076]

[0077] When , it indicates that the task can be successfully offloaded, otherwise, an interruption occurs in the process of task offloading, indicating that the task offloading fails.

[0078] Regarding the type of task: in general, vehicle applications can be divided into three categories: critical tasks, high-priority tasks, and low-priority tasks.

[0079] Critical tasks include core tasks and safety-related tasks of the vehicle system, which must be executed locally without relying on the vehicle environment. Therefore, the vehicle must reserve some computing resources for local critical tasks.

[0080] High-priority tasks represent a class of tasks with strict delay constraints, such as vehicle navigation, road perception, etc. If the high-priority task cannot be completed within the maximum tolerable delay, the task will fail and may cause some loss to the vehicle. Compared with low-priority tasks, the vehicle should ensure that high-priority tasks are executed first.

[0081] The utility function of the high-priority task is:

[0082]

[0083] where μ H represents the utility value, which is usually a constant, τ n represents the delay constraint, t n represents the time required to offload the task.

[0084] Low-priority tasks are a class of delay-tolerant tasks, such as vehicle entertainment applications, value-added services, etc. If the completion time of the low-priority task exceeds the reference delay, the result will still be used, but the availability of the result will decrease as the execution time increases. If the completion time of the low-priority task is less than the reference delay, the utility will be a normal number.

[0085] The utility function of the low-priority task is:

[0086]

[0087] where μ L represents the utility value, which is usually a constant, τ n represents the delay constraint, t n represents the time required to offload the task, c represents the delay value, c > 0, and c represents a constant.

[0088] Incentive mechanism design regarding the contract: First, the preference of the vehicle for resource sharing is quantified as its vehicle type. Higher types of vehicles are more willing to share their resources and serve as fog nodes than lower types of vehicles, so the base station can intuitively use higher-level types of vehicles. Since the number of vehicles in a unit is usually limited, the set of vehicle types belongs to a discrete and limited space. The definition of the vehicle type is as follows:

[0089] Sort the k vehicles within the communication range of the RSU in ascending order according to their preferences, and divide them into M types. Denote the set of vehicle types as M = {1,..., m,..., M}, and for each m in M, the set of its computing capabilities is θ m= {θ1,..., θ m M} have the following relationship θ1<... < θ m M Due to the asymmetry of information, the RSU only knows that there are M types of vehicles in total, and is not aware of the amount of resources that vehicles can contribute. Therefore, for vehicle V k , the probability of belonging to the m-type contract is ρ m , that is,

[0090] Because the base station cannot provide the same contract item for different types of vehicles, but can design up to M contracts for M types of vehicles, that is, design one contract item for each type, the contract item dedicated to M-type vehicles is denoted as (δ m , π m ), where δ m represents the required computing resources, and π m is the unit price of executing computing resources, and the entire contract is denoted as

[0091] Regarding the SAC-based DRL algorithm: SAC is a maximum entropy reinforcement learning algorithm based on a non-strategic actor-critic model. Compared with value-based DRL algorithms such as DQN and double DQN, SAC is more efficient in solving high-dimensional action space problems, and is therefore more suitable for vehicle task allocation under different traffic densities. In addition, by incorporating the entropy measure of the policy into the reward, SAC can explore more feasible strategies. If there are multiple optimal options, the policy in SAC will select each option with the same probability. Therefore, compared with some other policy-based DRL algorithms, such as Deep Deterministic Policy Gradient (DDPG), Asynchronous Advantage Actor-critic (A3C), SAC has better robustness and randomness, and is therefore easier to adjust in a random vehicle environment.

[0092] First, create the required state space:

[0093] In each time interval, the DRL agent in the RSU observes the vehicle environment within the coverage of the RSU and collects the following parameters:

[0094] 1, r i,k (t): the transmission rate between the task vehicle V i and the service vehicle V k ;

[0095] 2, η​​k (t): represents the service availability of computing tasks. According to the definition of service availability, η k (t) can be evaluated by V k the proportion of the minimum computing resources occupied by the local task, the priority of the offloaded task, V i the relative distance and speed between V k and the traffic density at time t.

[0096] D(t), C(t), τ(t), S(t) represent the data size of the task, the computing resources required by the task, the deadline of the high-priority task or the reference delay of the low-priority task, and the priority of the task at time t, respectively.

[0097] Let S represent the state space, and the state vector at time t be represented as follows:

[0098] s t = {r i,k (1), r i,k (2),... r i,k (t), η k (1), η k (2),... η k (t), D(t), C(t), τ(t), S(t)}

[0099] Secondly, the action space is created:

[0100] By observing the state at time t, the agent will take the corresponding action to determine the unit price that the service vehicle and the task vehicle should pay to the service vehicle. We represent the action space as A, and the action vector executed by the agent at time t as

[0101] a t = {c1(t), c2(t),..., c k (t), π1(t), π2(t),..., π k (t)}

[0102] Among the action space, c k (t) is a binary variable, c k (t) = 1 indicates that the computing task is offloaded to V k , and π k (t) represents the unit price that should be paid to the service vehicle per CPU cycle.

[0103] Finally, the reward function is established:

[0104] In each step, the RSU agent selects the corresponding action a t by observing the state s tThen, immediately, a reward is obtained.

[0105] The reward function is represented by r(s t ,a t ):

[0106]

[0107] Where u k (t) represents the utility function for the task.

[0108] Assuming that there are T time slots in a cycle, and in each time slot, a computing task of a task vehicle is offloaded to a service vehicle, the average reward can be given as:

[0109]

[0110] In summary, the vehicle fog computing method based on deep reinforcement learning and contract matching of the present application mainly includes the following steps:

[0111] S1, the roadside unit RSU collects vehicle and task information, including the speed, position, computing capacity of the vehicle, and the size, required computing resources, deadline and priority of the task;

[0112] S2, the tasks are sorted according to the priority, and the tasks with high priority are executed first; the time required for offloading the computing task to the service vehicle is compared with the task deadline, and the available service vehicles are screened out;

[0113] S3, the service availability of offloading the computing task to the service vehicle is calculated, and a service vehicle preference list corresponding to the shared computing capacity of the service vehicle is established;

[0114] S4, signing a contract, calculating a reward function, and completing the task offloading.

[0115] Wherein, step S1 is specifically: establishing a system model, establishing a two-dimensional coordinate with the roadside unit RSU as the origin (0, 0), and the communication range of the RSU is R; the position of the task vehicle V i is defined as (X i , Y i ), the position of the service vehicle V k is defined as (X k , Y k ), and the speed of the task vehicle V i and the service vehicle V k is the same, which is v.

[0116] Step S2 is specifically: the roadside unit RSU collects all the task information, and sorts the tasks according to the priority S nSort the tasks, and execute the higher-priority tasks first; determine the task vehicle V. i With service vehicle V k Is the vehicle within RSU's communication range, and has the task unloading begun? Calculate the task vehicle V. i Task φ n Unload to surrounding service vehicles V k Time required and associate it with task φ n Deadline Comparisons are made to filter out vehicles V that can provide services. k .

[0117] Step S3 specifically involves: based on the selected vehicles V that can provide services. k Calculate the task φ n Unload to vehicle V k Service availability And determine whether the service is feasible; then, based on the service vehicle V k Provide shared computing power θ m Create a vehicle preference list.

[0118] Step S4 specifically involves: establishing a corresponding contract based on the vehicle type and using the RSU to broadcast the contract information; allowing the task vehicle V... i With service vehicle V k To achieve two-way matching, both parties sign a contract, and the reward is determined based on parameters such as task priority and contract type. After the contract is signed, the reward function r(s) is calculated. t ,a t This indicates that the task has been successfully unloaded.

[0119] like Figure 2 The diagram shown is a simulation of the proposed algorithm, SAC, which employs reinforcement learning and mainly consists of two action-value functions and one policy function. The algorithm's matching convergence is achieved by subtracting the target value network from the actual estimated value network. The more times the difference is within an acceptable threshold, the greater the probability that the two are close, and thus the more convergent the algorithm.

[0120] like Figure 3 The image shows a comparison of two reinforcement learning algorithms. By comparing TD3 (Twin Delayed DeepDeterministic policy gradient algorithm) with the SAC algorithm, it was found that SAC has a faster ascent and convergence speed than TD3 in the early stages, but TD3 has a better convergence performance than SAC.

[0121] like Figure 4As shown, it is a flow chart of task offloading of the application, which illustrates the whole process of task offloading.

[0122]

[0123]

[0124]

[0125] In summary, the application extends the concept of fog computing to the traditional vehicle network, which takes the vehicle as a mobile fog node to support the full use of the vehicle's computing resources; considering the high mobility of the vehicle itself, a model-free DRL is introduced to obtain the system model of the vehicle and the dynamics of the environment; and the vehicle is given corresponding incentive rewards, which can better achieve the two-way matching between tasks and computing resources, thereby realizing the reasonable allocation and optimization of resources.

[0126] The above examples are only used to illustrate the technical solutions of the application and are not limiting. Although the application has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that the technical solutions of the application can be modified or replaced equivalently without departing from the spirit and scope of the technical solutions of the application.

Claims

1. A vehicle fog calculation method based on deep reinforcement learning and contract matching, characterized in that, The main steps include: S1, the Roadside Unit (RSU) collects vehicle and task information, including vehicle speed, location, computing power, and task size, required computing resources, deadline, and priority; specifically: Establish a system model, using the roadside unit RSU as the origin (0,0) to establish a two-dimensional coordinate system, with the communication range of the RSU being R; Define the mission vehicle V i The position is (X) i ,Y i Service vehicle V k The position is (X) k ,Y k Mission vehicle V i With service vehicle V k Their speeds are the same, both being v; S2. Sort tasks according to their priority, and execute tasks with higher priority first; calculate the time required for a task to be unloaded to a service vehicle, and compare it with the task deadline to filter out available service vehicles. Specifically: The roadside unit (RSU) collects all task information and sorts it according to task priority (S). n Sort the tasks and execute the higher-priority tasks first. Determine the mission vehicle V i With service vehicle V k Is it within the communication range of RSU, and begin unloading the task? Calculate the task vehicle V i Task φ n Unload to surrounding service vehicles V k Time required and associate it with task φ n Deadline Comparison to filter out vehicles V that can provide services k ; S3. Calculate the service availability of the computing tasks offloaded to the service vehicles, and establish a corresponding service vehicle preference list based on the shared computing capabilities of the service vehicles. S4. Sign the contract, calculate the reward function, and the task is unloaded.

2. The method according to claim 1, characterized in that, The time The calculation formula is: Among them, D n Indicates the input data size, r i,k Indicates mission vehicle V i With service vehicle V k The transmission rate between them, C n θ represents the computational size of the CPU cycles required to complete the task. k This indicates the vehicle's computing power.

3. The method according to claim 1, characterized in that, Step S3 specifically involves: selecting the vehicles V that can provide services. k Calculate the task φ n Unload to service vehicle V k Service availability And determine whether the service is feasible; then, based on the service vehicle V k Provided shared computing power θ m Create a vehicle preference list.

4. The method according to claim 3, characterized in that, Service availability The calculation formula is: Among them, T k Indicates mission vehicle V i With service vehicle V k The duration of the V2V transmission link between them, τ n Represents the delay constraint, ε k This indicates that the unloading task was performed on the serviced vehicle V. k The probability of acceptance.

5. The method according to claim 4, characterized in that, The duration T k Represented as: Where R represents the communication range of the RSU, when A positive result indicates successful task uninstallation; otherwise, a negative result indicates task uninstallation failure.

6. The method according to claim 1, characterized in that, Step S4 specifically involves: Contracts are created based on vehicle type, and RSUs are used to broadcast contract information. Let the mission vehicle V i With service vehicle V k Achieve two-way matching, with both parties signing a contract and determining the remuneration based on the task priority and contract type; After the contract is signed, calculate the reward function r(s). t ,a t This indicates that the task has been successfully unloaded.

7. The method according to claim 6, characterized in that, The reward function r(s) t ,a t ) is represented as: Among them, c k (t) is a binary variable, c k (t) = 1 indicates that the computational task has been unloaded to V. k In the middle, π k (t) represents the unit price payable to the service vehicle per CPU cycle, D(t) represents the data size of the task, C(t) represents the computing resources required by the task, and u k (t) represents the utility function of the task.

8. The method according to claim 7, characterized in that, Assuming there are T time slots within a period, and in each time slot, a computational task from a task vehicle is offloaded to a service vehicle, then the average reward can be expressed as:

Citation Information

Patent Citations

  • Multi-agent-based calculation task unloading and resources allocation method for vehicle speed perception

    CN111918245A

  • Internet of vehicles computing resource allocation and optimization method based on deep learning

    CN114786129A