5G MEC task unloading method based on task granularity in Internet of Vehicles

By adopting a task granularity-based task unloading method in 5G MEC systems, calculating the priority of each task and implementing a differentiated unloading strategy, the problem that the existing technology cannot effectively shorten the task unloading delay and reduce energy consumption under limited resource conditions, and achieving a more efficient and stable task unloading effect.

CN119922511APending Publication Date: 2025-05-02HUAXIN CONSULTATING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411807236.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-10
Publication Date
2025-05-02

AI Technical Summary

Technical Problem

The prior art cannot effectively shorten the unloading delay of 5G MEC tasks and reduce energy consumption under limited resource conditions, especially in multi-task concurrency scenarios, resulting in unstable unloading process.

Method used

The 5G MEC task unloading method based on task granularity is adopted. By calculating the unloading link transmission rate between the vehicle and the roadside unit, the tasks are divided into fine, medium and coarse granularity, and the priority of each task is calculated based on processing time and energy consumption, a differentiated unloading strategy is realized.

Benefits of technology

It effectively shortens the energy consumption of 5G network, while maximizing the efficiency and benefits of unloading of vehicle network tasks, ensuring that the vehicle is always in a good unloading quality environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119922511A_ABST
    Figure CN119922511A_ABST
Patent Text Reader

Abstract

The invention discloses a 5G MEC task unloading method based on task granularity in the Internet of Vehicles, and solves the problems that an existing method does not consider too much limitation of MEC server resources, and unloading time delay cannot be well shortened and unloading energy consumption cannot be well reduced under the condition of limited resources. The method comprises the following steps: calculating an unloading link transmission rate between a vehicle and a current roadside unit; the unloading processing time and the energy consumption of each task in the roadside unit are calculated, and normalization processing is carried out on the unloading processing time and the energy consumption of each task; all the tasks are subjected to fine, medium and coarse granularity task division, the priorities of the fine, medium and coarse granularity tasks are calculated according to task unloading processing time and energy consumption, and all the tasks are unloaded according to the priorities. Differentiated unloading strategies are achieved for tasks with different priorities, it can be guaranteed that the vehicle is always in a good unloading quality environment, and real-time guarantee is provided for improving the success rate of a task system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of 5G communication technology, and in particular to a 5G MEC task offloading method based on task granularity in an Internet of Vehicles. Background Art

[0002] Mobile Edge Computing (MEC) sinks cloud computing services from the cloud to the edge of the network, which can meet the ultra-low latency requirements of the fifth-generation mobile communication (5G) new services and is considered to be one of the key technologies of 5G communication. In addition, the introduction of MEC technology into the Internet of Vehicles can effectively solve the problem of shortage of computing and storage resources of vehicle terminals, and at the same time meet the high reliability and low latency requirements brought by the high-speed mobility and safety of vehicles. However, in the Internet of Vehicles introduced with MEC, how to schedule the efficient offloading of computing tasks is a topic worthy of study. For example, the patent application number is 2024100105026, and the name is a 5G MEC task offloading method based on hierarchical delay. The method includes selecting the link with the lightest load for offloading according to the total delay of each link and the hierarchical delay coefficient. This method is similar to most other traditional offloading methods, and does not consider the problem of limited resources of MEC servers, especially in the scenario of multi-task concurrency, so it cannot optimize the efficiency of roadside units in processing tasks. Therefore, it is necessary to design a method that comprehensively considers differentiated unloading methods, and even solve the problem of how to perfectly shorten the unloading delay and reduce the unloading energy consumption under the condition of limited resources, so as to make the unloading process faster and more stable. Summary of the invention

[0003] The present invention mainly solves the problem that the existing methods do not take into account the limited resources of MEC servers, and cannot effectively shorten the unloading delay and reduce the unloading energy consumption under limited resource conditions. It provides a 5G MEC task unloading method based on task granularity in the Internet of Vehicles.

[0004] The above technical problems of the present invention are mainly solved by the following technical solutions: a 5G MEC task offloading method based on task granularity in a vehicle network, wherein the MEC includes a roadside unit communicating with a vehicle, the roadside unit is configured with a MEC server, the vehicle network includes a vehicle-mounted terminal, and the vehicle generates a task, comprising the following steps: Calculate the transmission rate of the unloading link between the vehicle and the current roadside unit; Calculate the unloading processing time and energy consumption in the roadside unit for each task, and normalize the unloading processing time and energy consumption of each task based on all tasks; Divide all tasks into fine, medium and coarse granularity tasks, calculate the fine granularity task priority according to the task offloading processing time, calculate the coarse granularity task priority according to the task offloading processing energy consumption, and calculate the medium granularity task priority according to the weighted calculation of time and energy consumption; Offload all tasks by priority.

[0005] According to the edge distance between the vehicle and the roadside unit, the present invention calculates the remaining time that the vehicle can be unloaded in the current roadside unit under the premise of monitoring the channel state and noise environment of the unloading link, detects the channel state and noise environment of the unloading link, calculates the throughput capacity and task transmission rate of the unloading link, and divides the tasks into three types of fine granularity, medium granularity and coarse granularity according to the amount of unloading resources applied for by the task, calculates the processing time and energy consumption of all tasks, and calculates the corresponding unloading priority in a differentiated manner. Differentiated unloading strategies are implemented for tasks of different priorities, which can ensure that the vehicle is always in a good unloading quality environment and provide real-time guarantee for improving the success rate of the task system. The present invention divides the tasks into fine, medium and coarse granularity, sets the fine granularity task priority by the task unloading processing time, sets the coarse granularity task priority by the task unloading processing energy consumption, and sets the medium granularity task priority in combination with time and energy consumption. Tasks are unloaded according to the priority, while reducing the energy consumption of the 5G network, maximizing the efficiency and benefits of the unloading of the Internet of Vehicles tasks.

[0006] As a preferred solution, the fine, medium and coarse granularity task division of all tasks specifically includes: Set the low threshold and high threshold of task granularity; Obtain the computing power information of all tasks applying for MEC services, compare the computing power of the tasks applying for MEC services with the low granularity threshold and the high granularity threshold respectively, select tasks not greater than the low granularity threshold as fine-grained tasks, select tasks not less than the high granularity threshold as coarse-grained tasks, and tasks between the high and low granularity thresholds as medium-grained tasks.

[0007] This solution divides tasks into three categories: fine-grained, medium-grained, and coarse-grained tasks based on the amount of offload resources requested by the task, that is, the MEC service computing capacity requested. The MEC service computing capacity requested by the task is the attribute of the task, and this information can be obtained after the vehicle generates the task. By setting the low and high thresholds of granularity, tasks less than or equal to the low threshold of granularity are marked as fine-grained tasks, tasks greater than or equal to the high threshold of granularity are marked as coarse-grained tasks, and the remaining tasks between the low and high thresholds of granularity are marked as medium-grained tasks.

[0008] As a preferred solution, the fine-grained task priority is calculated according to the task offloading processing time, the coarse-grained task priority is calculated according to the offloading processing energy consumption, and the medium-grained task priority is calculated according to the weighted calculation of time and energy consumption, specifically including: Set the initial priorities of fine, medium and coarse granularity tasks in sequence; According to the number of fine-grained tasks, the fine-grained task priority evaluation index is set to 1 for a single task, and the fine-grained task priority evaluation index is set to the difference between 1 and the normalized value of its offloading processing time for multiple tasks. The fine-grained task priority is the sum of its initial priority and the priority evaluation value index; According to the number of coarse-grained tasks, the priority evaluation index of a single coarse-grained task is set to 1, and for multiple tasks, the priority evaluation index of each coarse-grained task is set to the difference between 1 and its normalized value of unloading processing energy consumption. The priority of a coarse-grained task is the sum of its initial priority and the priority evaluation value index; According to the number of medium-granularity tasks, the medium-granularity task priority evaluation index is set to 1 for a single quantity, and the weighted sum of the normalized value of the unloading processing time and the normalized value of the unloading processing energy consumption of each medium-granularity task is calculated. The weighted sum value is normalized, and the medium-granularity task priority evaluation value is set to the difference between 1 and its weighted sum normalized value. The medium-granularity task priority is the sum of its initial priority and the priority evaluation value index.

[0009] In this solution, fine, medium and coarse granularity tasks refer to fine granularity tasks, medium granularity tasks and coarse granularity tasks, and can also be expressed as fine, medium and coarse granularity tasks. The priorities of fine, medium and coarse granularity tasks are the sum of their initial priorities and priority evaluation values, respectively, where the initial priority is determined by preset, and the initial priorities of fine, medium and coarse granularity tasks are set differently, that is, the initial priorities of fine, medium and coarse granularity tasks are different from each other and are set to different initial priorities. Preferably, the initial priorities are set in descending order of fine, medium and coarse granularity. When the number of fine, medium and coarse-grained tasks is 1, their priority evaluation values ​​are all 1. When the number is multiple, the fine-grained task priority evaluation value is calculated according to the unloading processing time, which is the difference between 1 and the normalized value of its unloading processing time; the coarse-grained task priority evaluation value is calculated according to the unloading processing energy consumption, which is the difference between 1 and the normalized value of its unloading processing energy consumption. The medium-grained task priority evaluation value is obtained by weighted calculation of the unloading processing time and energy consumption. Specifically, the delay weight is set, and the normalized value of the unloading processing time and the normalized value of the unloading processing energy consumption of the medium-grained task are weighted and calculated. Then the weighted sum is normalized based on all medium-grained tasks to obtain the weighted and normalized value of the medium-grained task. The medium-grained task priority evaluation value is 1 and the difference between the weighted and normalized value.

[0010] The normalized value of the unloading processing time and the normalized value of the unloading processing energy consumption are the values ​​after the unloading processing time and energy consumption are normalized. Normalization is a prior art, and the present invention adopts one of the normalization methods. The calculation process is to calculate the sum of all task unloading processing times and the sum of all task unloading processing energy consumptions, and take the ratio of the task unloading processing time to the time sum as the normalized value of the task unloading processing time, and take the ratio of the task unloading processing energy consumption to the total energy consumption as the normalized value of the task unloading processing energy consumption. The normalization distributes the task unloading processing time and the unloading processing energy consumption in an interval to achieve comparability. The present invention distributes the unloading processing time and the unloading processing energy consumption in (0,1) respectively.

[0011] Specifically, the fine, medium and coarse granularity task priorities are the sum of their initial priorities and priority evaluation values, respectively. The difference sets the fine, medium and coarse initial priorities. The number of tasks is the difference between the fine granularity task priority evaluation value of 1 and its normalized value of unloading processing time, the coarse granularity task priority evaluation value of 1 and its normalized value of unloading processing energy consumption, and the medium granularity task priority is the difference between the weighted sum of its unloading processing time and unloading processing energy consumption and then normalized, and the weighted sum of 1 and its normalized value. When the number of tasks is 1, the fine, medium and high granularity task priority evaluation values ​​are all 1.

[0012] As a preferred solution, the above-mentioned unloading of all tasks according to priority specifically includes: Set the upper limit of task offloading and sort all tasks in descending order of priority; If the number of tasks is less than the upper limit of task offloading, all tasks will be sent to the MEC server in order of priority for offloading; If the number of tasks is greater than the upper limit of task offloading, the tasks with the upper limit of the number of tasks downloaded at the front of the sequence will be sent to the MEC server in sequence for offloading.

[0013] This solution evaluates the task offloading carrying capacity of the MEC server before offloading tasks, and judges the number of tasks by setting the upper limit of task offloading. All tasks are first arranged in descending order according to priority to obtain a task offloading sequence. If the number of tasks does not exceed the upper limit of task offloading, all tasks in the sequence are sent to the MEC server for offloading in sequence. If the number of tasks exceeds the upper limit of task offloading, the tasks before the upper limit of task offloading in the sequence are sent to the MEC server for offloading, and the remaining tasks are processed locally.

[0014] As a preferred solution, it also includes the judgment of roadside unit access, specifically including: Set the MEC server load threshold; Determine whether the MEC server load is greater than the MEC server load threshold. If all onboard tasks are processed locally, MEC offloading is not performed. If not, MEC offloading is performed.

[0015] The MEC server load and the MEC server load threshold are both percentages. By comparing the MEC server load and the MEC server load threshold, when the load is greater than the threshold, it means that the current MEC server is in a high-load state. At this time, all tasks loaded on the vehicle are processed locally and no longer implemented MEC unloading. When the load is less than the threshold, MEC unloading is implemented. This step is performed first at the beginning of this method, starting with calculating the MEC server load, and limiting the task unloading operation to only lightly loaded roadside units.

[0016] As a preferred solution, before dividing the tasks into fine, medium and coarse granularity, the task offloading conditions are screened, including: Obtain task breakpoint resuming status, vehicle speed, distance between the vehicle and the edge of the current service roadside unit coverage, roadside unit coverage radius, and roadside unit coverage rate information; Calculate the remaining time that the vehicle can enjoy the current roadside unit service, select tasks whose remaining time is less than the unloading processing time and do not support breakpoint resumption, remove them and transfer them to local processing.

[0017] This solution calculates the remaining time that the vehicle can enjoy the current roadside unit service based on the vehicle's speed, the distance between the vehicle and the edge of the coverage of the current service roadside unit, the coverage radius of the roadside unit, and the coverage rate of the roadside unit. The specific calculation is the difference between the distance between the vehicle and the edge of the coverage of the current service roadside unit and the product of the coverage radius of the roadside unit and the inverse value of the roadside unit coverage rate, divided by the vehicle's speed, where the inverse value of the roadside unit coverage rate is the difference between 1 and the roadside unit coverage rate. Information such as the vehicle's speed, the distance between the vehicle and the edge of the coverage of the current service roadside unit, the coverage radius of the roadside unit, and the coverage rate of the roadside unit is obtained through the vehicle terminal. The task breakpoint resumption is an attribute of the vehicle-mounted task, which uses 1 and 0 to identify the task breakpoint resumption. The unloading processing time is the time it takes to unload the task in the current roadside unit. Through judgment, if the vehicle can enjoy the remaining time of the current roadside unit service, that is, the remaining time is less than the unloading processing time and does not support breakpoint resumption, it means that the task cannot be fully processed in the current roadside unit and needs to be switched to the next roadside unit. Therefore, the task is transferred to local processing, and all similar tasks are removed from the vehicle task list, and finally a task list that can achieve MEC offloading is obtained.

[0018] As a preferred solution, the calculation of the transmission rate of the unloading link between the vehicle and the roadside unit specifically includes: calculating the roadside unit channel state according to the distance between the vehicle and the roadside unit, and calculating the unloading link transmission rate in combination with the roadside unit signal-to-noise ratio.

[0019] As a preferred solution, the calculation of the roadside unit channel state according to the distance between the vehicle and the roadside unit specifically includes: Set the path loss constant and path loss coefficient of the MEC offloading link and the vehicle terminal transmission power; According to the distance from the vehicle to the roadside unit, the path loss of the roadside unit is calculated as the product of the road loss constant plus the road loss coefficient and the logarithmic function of the distance from the current vehicle to the roadside unit / 1000; Calculate the channel gain of the roadside unit as the difference between the vehicle terminal transmit power and the link path loss.

[0020] The path loss constant and path loss coefficient of the MEC offloading link are the attributes of the offloading link, and the vehicle terminal transmission power is the attribute of the vehicle terminal. The above information is obtained through the vehicle terminal.

[0021] As a preferred solution, the calculation of the unloading link transmission rate in combination with the roadside unit signal-to-noise ratio specifically includes: setting the background noise and the processing bandwidth of the roadside unit; The signal-to-noise ratio of the roadside unit is obtained by subtracting the channel gain of the roadside unit from the background noise; The offload link transmission rate is calculated based on the roadside unit signal-to-noise ratio and processing bandwidth.

[0022] The background noise is pre-set, and the processing bandwidth is a property of the roadside unit, which is obtained through the vehicle-mounted unit communication.

[0023] As a preferred solution, the time and energy consumption of unloading processing in the roadside unit are calculated for each task, specifically including: Obtain the computing power and task computing complexity information of the MEC server, and compare the task computing complexity with the computing power of the MEC server to obtain the task processing delay on the MEC server; Obtaining task size information, and comparing the task size with the link transmission rate to obtain the task to roadside unit transmission time; The time for unloading tasks in the roadside unit is the sum of the transmission time from the task to the roadside unit and the processing delay of the task in the MEC server; The energy consumption of unloading the task in the roadside unit is calculated based on the transmission power of the vehicle terminal and the time it takes to unload the task in the roadside unit.

[0024] First, the transmission rate of the unloading link between the vehicle and each roadside unit is calculated, and the transmission time from the task to the roadside unit is calculated according to the task size and the transmission rate. Specifically, the task size of the task is divided by the transmission rate to obtain the transmission time from the task to the target roadside unit.

[0025] The MEC server includes computing power, which is the CPU consumption of the MEC server per unit time. The processing delay of the task in the MEC server can be obtained based on the computing power of the MEC server and the task size of the task. Specifically, it is the task size divided by the computing power of the MEC server. At the same time, the obtained transmission time and the MEC server processing delay are added to obtain the unloading processing time of the task in the roadside unit. The on-board terminal includes a transmission power attribute, and the energy consumption required for unloading is calculated based on the transmission power and transmission time. The specific calculation process is 10 to the power of transmission power / 10 multiplied by the transmission time, and then divided by 1000, where 10 to the power of transmission power / 10 and 1000 are the conversion between units.

[0026] Therefore, the advantages of the present invention are: According to the edge distance between the vehicle and the roadside unit, under the premise of monitoring the channel status and noise environment of the unloading link, the remaining time that the vehicle can be unloaded at the current roadside unit is calculated, the channel status and noise environment of the unloading link are detected, and the throughput capacity and task transmission rate of the unloading link are calculated. According to the amount of unloading resources applied for by the task, the tasks are divided into three categories of fine granularity, medium granularity and coarse granularity. The processing time and energy consumption of all tasks are calculated, and the corresponding unloading priorities are calculated in a differentiated manner. Differentiated unloading strategies are implemented for tasks of different priorities, which can ensure that the vehicle is always in a good unloading quality environment, providing real-time guarantee for improving the success rate of the task system.

[0027] The tasks are divided into fine, medium and coarse granularity. The fine-grained task priority is set by the task offloading processing time, the coarse-grained task priority is set by the task offloading processing energy consumption, and the medium-grained task priority is set based on the time and energy consumption. Tasks are offloaded according to priority, which maximizes the efficiency and benefits of vehicle network task offloading while reducing the energy consumption of the 5G network. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 It is a schematic diagram of a process of the present invention.

[0029] Figure 2 It is a comparison chart of the offloadable tasks of other algorithms under a certain RSU distance of the present invention.

[0030] Figure 3 This is a comparison chart of the task offloading success rate between the present invention and other algorithms. DETAILED DESCRIPTION

[0031] The technical solution of the present invention is further specifically described below through embodiments and in conjunction with the accompanying drawings. Example

[0032] This embodiment provides a 5G MEC task offloading method based on task granularity in a vehicle network, wherein the MEC includes a roadside unit communicating with a vehicle, the roadside unit is configured with a MEC server, the vehicle network includes an on-board terminal, and the vehicle generates a task, such as Figure 1 As shown, the following steps are included: Roadside unit access judgment; Calculate the transmission rate of the unloading link between the vehicle and the current roadside unit; Calculate the unloading processing time and energy consumption in the roadside unit for each task, and normalize the unloading processing time and energy consumption of each task based on all tasks; Divide all tasks into fine, medium and coarse granularity tasks, calculate the fine granularity task priority according to the task offloading processing time, calculate the coarse granularity task priority according to the task offloading processing energy consumption, and calculate the medium granularity task priority according to the weighted calculation of time and energy consumption; Offload all tasks by priority.

[0033] As a preferred solution of this embodiment, the roadside unit admission judgment includes: Set the MEC server load threshold; Determine whether the MEC server load is greater than the MEC server load threshold. If all onboard tasks are processed locally, MEC offloading is not performed. If not, MEC offloading is performed.

[0034] The MEC server load and the MEC server load threshold are both percentages. By comparing the MEC server load and the MEC server load threshold, when the load is greater than the threshold, it means that the current MEC server is in a high-load state. At this time, all tasks loaded on the vehicle are processed locally and no longer implemented MEC unloading. When the load is less than the threshold, MEC unloading is implemented. This step is performed first at the beginning of this method, starting with calculating the MEC server load, and limiting the task unloading operation to only lightly loaded roadside units.

[0035] As a preferred solution of this embodiment, calculating the unloading link transmission rate between the vehicle and the current roadside unit specifically includes: According to the distance between the vehicle and the roadside unit, the roadside unit channel status is calculated, and the unloading link transmission rate is calculated in combination with the roadside unit signal-to-noise ratio.

[0036] The specific calculation of the roadside unit channel state is: Set the path loss constant and path loss coefficient of the MEC offloading link, and the vehicle terminal transmit power; the path loss constant and path loss coefficient of the MEC offloading link are the offloading link attributes, and the vehicle terminal transmit power is the vehicle terminal attribute. The above information is obtained through the vehicle terminal.

[0037] According to the distance from the vehicle to the roadside unit, the path loss of the roadside unit is calculated as the product of the road loss constant plus the road loss coefficient and the logarithmic function of the distance from the current vehicle to the roadside unit / 1000; The channel gain of the roadside unit is calculated as the difference between the vehicle terminal transmission power and the link path loss. The calculated channel gain is the channel state of the roadside unit.

[0038] The signal-to-noise ratio of the roadside unit is further calculated as follows: Set the background noise and the processing bandwidth of the roadside unit; the background noise is preset, and the processing bandwidth is a property of the roadside unit and is obtained through the vehicle-mounted unit communication.

[0039] The signal-to-noise ratio of the roadside unit is obtained by subtracting the roadside unit channel gain from the background noise.

[0040] Finally, the offload link transmission rate is calculated based on the roadside unit signal-to-noise ratio and processing bandwidth.

[0041] As a preferred solution of this embodiment, the unloading processing time and energy consumption in the roadside unit are calculated for each task respectively, and the unloading processing time and energy consumption of each task are normalized based on all tasks, specifically including: Obtain the computing power and task computing complexity information of the MEC server. The MEC server includes computing power, which is the CPU consumption of the MEC server per unit time.

[0042] Compare the task computational complexity of the task with the computing power of the MEC server to obtain the task processing delay on the MEC server; Obtaining task size information, and comparing the task size with the link transmission rate to obtain the task to roadside unit transmission time; The time for unloading tasks in the roadside unit is the sum of the transmission time from the task to the roadside unit and the processing delay of the task in the MEC server; The energy consumption of unloading the task in the roadside unit is calculated based on the transmission power of the vehicle terminal and the time for unloading the task in the roadside unit. The vehicle terminal includes the transmission power attribute, and the specific calculation process is 10 transmission power / 10 times the transmission time, and then divided by 1000, where 10 transmission power / 10 times and 1000 are the conversion between units.

[0043] The unloading processing time and unloading processing energy consumption of the unloading task in the roadside unit are calculated for each task, the sum of the unloading processing time of all tasks is calculated to obtain the total time, and the sum of the unloading processing energy consumption of all tasks is calculated to obtain the total energy consumption. The normalization process is to compare the unloading processing time of each task with the total time to obtain the time normalization value of each task, and to compare the unloading processing energy consumption of each task with the total energy consumption to obtain the energy consumption normalization value of each task. This scheme normalizes the unloading processing time and energy consumption of each task by calculating their proportion in the total value, and evenly distributes the normalized values ​​between (0,1), and distributes the task unloading processing time and unloading processing energy consumption in an interval to achieve comparability. The normalized values ​​of time and energy consumption calculated in this embodiment are used for the subsequent calculation of the priority of each granularity task.

[0044] As a preferred solution of this embodiment, before the task granularity is divided, the task offloading situation is screened, specifically including: Obtain task breakpoint resuming status, vehicle speed, distance between the vehicle and the edge of the current service roadside unit coverage, roadside unit coverage radius, and roadside unit coverage rate information; Calculate the remaining time that the vehicle can enjoy the current roadside unit service, select tasks whose remaining time is less than the unloading processing time and do not support breakpoint resumption, remove them and transfer them to local processing.

[0045] This solution calculates the remaining time that the vehicle can enjoy the current roadside unit service based on the vehicle's speed, the distance between the vehicle and the edge of the coverage of the current service roadside unit, the coverage radius of the roadside unit, and the coverage rate of the roadside unit. The specific calculation is the difference between the distance between the vehicle and the edge of the coverage of the current service roadside unit and the product of the coverage radius of the roadside unit and the inverse value of the roadside unit coverage rate, divided by the vehicle's speed, where the inverse value of the roadside unit coverage rate is the difference between 1 and the roadside unit coverage rate. Information such as the vehicle's speed, the distance between the vehicle and the edge of the coverage of the current service roadside unit, the coverage radius of the roadside unit, and the coverage rate of the roadside unit is obtained through the vehicle terminal. The task breakpoint resumption is an attribute of the vehicle-mounted task, which uses 1 and 0 to identify the task breakpoint resumption. The unloading processing time is the time it takes to unload the task in the current roadside unit. The remaining service time is compared with the unloading processing time of each task. If the vehicle can enjoy the remaining service time of the current roadside unit, that is, the remaining time is less than the task unloading processing time and breakpoint resumption is not supported, it means that the task cannot be fully processed in the current roadside unit and needs to be switched to the next roadside unit. Therefore, the task is transferred to local processing, and all similar tasks are removed from the vehicle task list, and finally a task list that can achieve MEC offloading is obtained.

[0046] As a preferred solution of this embodiment, all tasks are divided into fine, medium and coarse granularity tasks, specifically including: Set the low threshold and high threshold of task granularity; Obtain the computing power information of all tasks applying for MEC services, compare the computing power of the tasks applying for MEC services with the low granularity threshold and the high granularity threshold respectively, select tasks not greater than the low granularity threshold as fine-grained tasks, select tasks not less than the high granularity threshold as coarse-grained tasks, and tasks between the high and low granularity thresholds as medium-grained tasks.

[0047] This solution applies for MEC service computing capacity based on the amount of offloading resources requested by the task, and divides the tasks into three categories: fine-grained, medium-grained, and coarse-grained. The MEC service computing capacity requested by the task is the attribute of the task, and this information can be obtained after the vehicle generates the task.

[0048] As a preferred solution of this embodiment, the fine-grained task priority is calculated according to the task offloading processing time, the coarse-grained task priority is calculated according to the task offloading processing energy consumption, and the medium-grained task priority is calculated according to the weighted calculation of time and energy consumption, specifically including: Set the initial priorities of fine, medium and coarse granularity tasks in sequence; According to the number of fine-grained tasks, the fine-grained task priority evaluation index is set to 1 for a single task, and the fine-grained task priority evaluation index is set to the difference between 1 and the normalized value of its offloading processing time for multiple tasks. The fine-grained task priority is the sum of its initial priority and the priority evaluation value index; According to the number of coarse-grained tasks, the priority evaluation index of a single coarse-grained task is set to 1, and for multiple tasks, the priority evaluation index of each coarse-grained task is set to the difference between 1 and its normalized value of unloading processing energy consumption. The priority of a coarse-grained task is the sum of its initial priority and the priority evaluation value index; According to the number of medium-granularity tasks, the medium-granularity task priority evaluation index is set to 1 for a single quantity, and the weighted sum of the normalized value of the unloading processing time and the normalized value of the unloading processing energy consumption of each medium-granularity task is calculated for multiple quantities. The weighted sum value is normalized, and the medium-granularity task priority evaluation index is set to the difference between 1 and its weighted sum normalized value. The medium-granularity task priority is the sum of its initial priority and the priority evaluation value index.

[0049] The above-mentioned fine, medium and coarse granularity tasks refer to fine granularity tasks, medium granularity tasks and coarse granularity tasks. The priorities of fine, medium and coarse granularity tasks are the sum of their initial priorities and priority evaluation values, respectively, wherein the initial priority is determined by preset, and the initial priorities of fine, medium and coarse granularity tasks are set differently, that is, the initial priorities of fine, medium and coarse granularity tasks are different from each other, and are set to different initial priorities, preferably, the initial priorities are set in descending order of fine, medium and coarse granularity. When the number of fine, medium and coarse-grained tasks is 1, their priority evaluation values ​​are all 1. When the number is multiple, the fine-grained task priority evaluation value is calculated according to the unloading processing time, which is the difference between 1 and the normalized value of its unloading processing time; the coarse-grained task priority evaluation value is calculated according to the unloading processing energy consumption, which is the difference between 1 and the normalized value of its unloading processing energy consumption; the medium-grained task priority evaluation value is obtained by weighted calculation of the unloading processing time and energy consumption, specifically, setting the delay weight, performing weighted sum calculation on the normalized value of the unloading processing time and the normalized value of the unloading processing energy consumption of the medium-grained task, and then normalizing the weighted sum value based on all medium-grained tasks to obtain the weighted and normalized value of the medium-grained task. The medium-grained task priority evaluation value is 1 and the difference between its weighted and normalized value.

[0050] As a preferred solution of this embodiment, all tasks are unloaded according to priority, specifically including: Set the upper limit of task offloading and sort all tasks in descending order of priority; If the number of tasks is less than the upper limit of task offloading, all tasks will be sent to the MEC server in order of priority for offloading; If the number of tasks is greater than the upper limit of task offloading, the tasks with the upper limit of the download of the front tasks in the sequence will be sent to the MEC server in sequence for offloading, and the remaining tasks will be processed locally.

[0051] Embodiment 2: This embodiment discloses a 5G MEC task offloading method based on task granularity in the Internet of Vehicles. The method is described below using a specific formula. The MEC includes a roadside unit set in the vehicle driving area, and the roadside unit is equipped with a MEC edge computing server. The Internet of Vehicles includes a vehicle terminal, and the vehicle terminal is connected to the roadside unit. Assume that a communication vehicle is traveling at a speed of Vc (km / h), and the vehicle currently loads a task list TK = {Tk1, Tk2, ..., Tk m}, each task size Tkc k (kB), k∈[1,m], the computational complexity of each task is Tcp k (Cycles), each applying for the computing power Tap of MEC service k (Ctcles / s), breakpoint resume flag Imp k∈{0, 1}, breakpoint resuming is represented by 1, indicating that the task supports breakpoint resuming, the center distance between the vehicle and the current roadside unit Dst s (m), the distance Dst between the vehicle and the edge of the roadside unit covered by the point e (m), and the current MEC server load Rld s .

[0052] S1. Roadside unit access judgment.

[0053] S11. Set the MEC server load threshold Rld th ∈[0, 1]; S12. Determine whether Rld is satisfied s >Rld th ,If so, it means that the current MEC server is in a high load state, all ,onboard tasks are processed locally and MEC offloading is not implemented. ,If not, MEC offloading is performed.

[0054] S2. Calculate the unloading link transmission rate between the vehicle and the current roadside unit.

[0055] S21. Set the path loss constant Ct of the MEC offloading link dd and path loss coefficient Cf dd , vehicle terminal transmission power Pw sd (dBm); S22. Calculate the path loss of the roadside unit based on the distance from the vehicle to the roadside unit Los s =Ct dd +Cf dd *log(Dst s / 1000)(dB),

[0056] Where, log(·) is the common logarithm.

[0057] S23. Calculate the channel gain of the roadside unit Gn s =Pw sd -Los s (dB),

[0058] S23. Set background noise Ns bk (dB / Hz), the processing bandwidth of the roadside unit Bd ru (Mhz), calculate the signal-to-noise ratio of the current roadside unit Snr s =Gn s -Ns bk (dB / Hz);

[0059] S24. Calculate the unloading link transmission rate based on the roadside unit signal-to-noise ratio and processing bandwidth Th s =Bd ru *log(1+Snr s , 2)(Mbps).

[0060] S3. Calculate the unloading processing time and energy consumption in the roadside unit for each task, and normalize the unloading processing time and energy consumption of each task based on all tasks.

[0061] S31. Obtain the computing capacity Ac of the MEC server MEC (Cycles / s) and task computation complexity TCP k (Cycles), calculate all tasks Tk k , k∈[1,m] is the processing delay of the MEC server

[0062] where power(·) represents the power function.

[0063] Get the size of each task Tkc k (kB), calculate the transmission time of each task to the roadside unit

[0064] S32. Calculate the unloading processing time of each task in the roadside unit Tms k =(Tmt k +Tge k ) / 1000(s).

[0065] Calculate the energy consumption of each task in the roadside unit for unloading processing Eng k =power(10, Pw sd / 10)*Tmt k / 1000(mw).

[0066] S33. Calculate the total processing time of all task offloading

[0067] And the total energy consumption of all task offloading processing

[0068] Solve the time normalization value of each task

[0069] And the energy consumption normalized value of each task

[0070] S4. Filter the tasks based on their offloadability.

[0071] S41. Get the task breakpoint continuation status, vehicle speed V c (km / h), the distance Dst between the vehicle and the edge of the current service roadside unit coverage e (m), roadside unit coverage radius Rad s (m), roadside unit coverage rate Cvp s ∈[0, 100%]; S42. Calculate the remaining time that the vehicle can enjoy the current roadside unit service

[0072] S43. For each task, select left <Tms k And Imp k = 0, remove the selected tasks from the task list TK, transfer them to the local for processing, and then obtain the task list TK that can realize MEC offloading mec .

[0073] S5. Divide all tasks into fine, medium and coarse granularity tasks, calculate the fine granularity task priority according to the task offloading processing time, calculate the coarse granularity task priority according to the task offloading processing energy consumption, and calculate the medium granularity task priority according to the weighted value of time and energy consumption.

[0074] S51. Set the task granularity low threshold Tap low , Task granularity high threshold Tap high ; Get the computing capacity Tap of all tasks applying for MEC services k , the task list Tk mec Meet Tap k ≤Tap low The tasks are divided into fine-grained tasks to meet the Tap k ≥Tap high Assign all tasks of the task to the coarse-grained task and assign all other tasks to the medium-grained task. sgt , include all coarse-grained tasks into the coarse-grained task set TK lgt , all medium-granularity tasks are included in the medium-granularity task set TK mgt .

[0075] S52. Set the initial priority of fine-grained tasks Pri sgt ∈[3, 9], calculate the initial priority Pri of the medium-granularity task mgt =Prisgt -1, calculate the initial priority Pri of the coarse-grained task lgt =Pri mgt -1.

[0076] S53. If the fine-grained task set TK sgt There is only one task in Tk x , then the unique fine-grained task priority evaluation index Bvp x =1, otherwise, calculate TK sgt The priority evaluation index Evp of all fine-grained tasks in x =1-GYT x , calculate TK sgt Any task in Tk x Uninstall priority Pri x =Pri sgt +Evp x .

[0077] S54. If the coarse-grained task set TK lgt There is only one task in Tk z , then the only coarse-grained task priority evaluation index Evp z =1, otherwise, calculate TKl gt The priority evaluation index Evp of all coarse-grained tasks in z =1-GyE z , calculate TK lgt Any task in Tk z Uninstall priority Pri z =Pri lgt +Evp z .

[0078] S55. If the medium-granularity task set TK mgt There is only one task in Tk y , then the only medium-granularity task priority evaluation index Evp y =1, otherwise, set the delay weight Det t , for TK mgt Any task in Tk y , calculate the weighted value of the indicator Qid y =Det t *GYT y +(1-Det)*GYE y ;

[0079] Calculate TK mgt The sum of the weighted values ​​of the indicators of all tasks in

[0080] Calculating Tk y Priority evaluation indicators

[0081] Calculate TK mgt Any task in Tk y Uninstall priority Pri y =Pri mgt +Evp y .

[0082] S6. All tasks are offloaded according to priority.

[0083] S61. Set the upper limit of task unloading Ndl mx , sort all tasks in descending order of priority, and get TK′ mec .

[0084] S62. If the number of tasks is less than the task offloading upper limit Ndl mx , then TK′ mec All tasks are sent to the MEC server in order of priority for unloading; If the number of tasks is greater than the task offloading upper limit Ndl mx , then TK′ mec Middle front Ndl mx Each task is sent to the MEC server in turn for offloading, and the remaining tasks are transferred back to local processing.

[0085] If the number of tasks is greater than the task offloading upper limit Ndl mx , then TK′ mec Middle front Ndl mx Each task is sent to the MEC server in turn for offloading, and the remaining tasks are transferred back to local processing.

[0086] The method of the present invention is specifically described below using an example. Taking m=4 as an example, the task status of the vehicle operation is as follows: As shown in Table 1:

[0087] Table 1 Distribution of vehicle operation tasks The roadside unit situation is shown in Table 2:

[0088] Table 2 Distribution of roadside units The basic data are shown in Table 3: project data Operating frequency (GHz) 2.6 Subcarrier bandwidth index μ 1 <![CDATA[Vehicle speed V c (km / h)]]> 120 <![CDATA[MEC server load threshold Rld th ∈[0, 1]]]> 70% <![CDATA[Coverage radius Rad of roadside unit s (m)]]> 250 <![CDATA[Edge coverage rate Cvp of the roadside unit s ∈[0, 100%]]]> 95% <![CDATA[Path loss constant Ct of the offloading link dd > 128.1 <![CDATA[Path loss coefficient Cf dd > 37.6 <![CDATA[Vehicle terminal transmission power Pw sd (dBm)]]> 24 <![CDATA[Background noise Ns bk (dB / Hz)]]> -120 <![CDATA[Processing bandwidth Bd of the roadside unit ru (Mhz)]]> 100 <![CDATA[MEC server computing power Ac MEc (Cycles / s)]]> <![CDATA[4*10 9 ]]> <![CDATA[Task granularity low threshold Tap low > <![CDATA[0.1*10 9 ]]> <![CDATA[Task Granularity High Threshold Tap high > <![CDATA[0.5*10 9 ]]> <![CDATA[Initial priority Pri of fine-grained tasks sgt ∈[3, 9]]]> 3 <![CDATA[Delay Weight Det t > 60% <![CDATA[MEC service task offloading upper limit Ndl mx > 100

[0089] Table 3 Basic data A 5G MEC task offloading method based on task granularity in an Internet of Vehicles includes the following steps: S1. Roadside unit access judgment.

[0090] A 5G MEC task offloading method based on task granularity in an Internet of Vehicles includes the following steps: S1. Roadside unit access judgment.

[0091] S11. Set the MEC server load threshold Rld th =70%.

[0092] S12. MEC server load does not meet Rld s =45%>Rld th =70%, indicating that the current MEC server is not in a high-load state, and the tasks loaded on the vehicle can be offloaded by MEC.

[0093] S2. Calculate the unloading link transmission rate between the vehicle and the current roadside unit.

[0094] S21. Set the path loss constant Ct of the MEC offloading link dd and path loss coefficient Cf dd , vehicle terminal transmission power Pw sd (dBm); S22. Calculate the path loss of the roadside unit based on the distance from the vehicle to the roadside unit

[0095] S23. Calculate the channel gain of the roadside unit Gn s =Pw sd -Los s =-64.78(dB);

[0096] S23. Set background noise Ns bk (dB / Hz), the processing bandwidth of the roadside unit Bd ru (Mhz), calculate the signal-to-noise ratio of the current roadside unit

[0097] S24. Calculate the unloading link transmission rate based on the roadside unit signal-to-noise ratio and processing bandwidth Th s =Bd ru *log(1+Snr s , 2)=581.3(Mbps).

[0098] S3. Calculate the unloading processing time and energy consumption in the roadside unit for each task, and normalize the unloading processing time and energy consumption of each task based on all tasks.

[0099] S31. Calculate all tasks Tk k , k∈[1,m] is the processing delay of the MEC server

[0100] Calculate the transmission time of each task to the roadside unit

[0101] S32. Calculate the unloading processing time of each task in the roadside unit

[0102] Calculate the energy consumption of each task in the roadside unit for unloading processing

[0103] S33. Calculate the total processing time of all task offloading

[0104] And the total energy consumption of all task offloading processing

[0105] Solve the time normalization value of each task

[0106] And the energy consumption normalized value of each task

[0107] S4. Filter the tasks based on their offloadability.

[0108] S41. Get the task breakpoint continuation status, vehicle speed V c (km / h), the distance Dst between the vehicle and the edge of the current service roadside unit coverage e (m), roadside unit coverage radius Rad s (m), roadside unit coverage rate Cvp s ; S42. Calculate the remaining time that the vehicle can enjoy the current roadside unit service T left =(Dst e -(1-Cvp s )*Rad s ) / (V c *1000 / 3600)=4.95(s).

[0109] S43. Satisfy T left =4.95<Tms k And Imp k =0 is {Tk k=4}, so task Tk4 can only be transferred to local processing, all similar tasks are removed from the task list TK, and the task list TK that can realize MEC offloading is obtained mec ={Tk1, Tk2, Tk3}.

[0110] S5. Divide all tasks into fine, medium and coarse granularity tasks, calculate the fine granularity task priority according to the task offloading processing time, calculate the coarse granularity task priority according to the task offloading processing energy consumption, and calculate the medium granularity task priority according to the weighted value of time and energy consumption.

[0111] S51. Set the task granularity low threshold Tap low , Task granularity high threshold Tap high ; Task List TK mec Meet Tap k ≤Tap low The task {Tk2} is divided into fine-grained tasks, which will satisfy the Tap k ≥Tap high The tasks {Tk1} are divided into coarse-grained tasks, and the remaining tasks {Tk3} are divided into medium-grained tasks. All fine-grained tasks are included in the fine-grained task set TK sgt = {Tk2}, all coarse-grained tasks are included in the coarse-grained task set TK lgt = {Tk1}, all medium-granularity tasks are included in the medium-granularity task set TK mgt ={Tk3}.

[0112] S52. Set the initial priority of fine-grained tasks Pri sgt =3, calculate the initial priority Pri of the medium-granularity task mgt =Pri sgt -1=2, calculate the initial priority Pri of the coarse-grained task lgt =Pri mgt -1=1.

[0113] S53. Fine-grained task set TK sgt = There is only one task in {Tk2}, namely Tk x=2 , then the unique fine-grained task priority evaluation index Evp x=2 =1, calculate TK sgt Any task in Tk x Uninstall priority Prix x=2=Pri sgt +Evp x =4.

[0114] S54. Coarse-grained task set TK lgt = There is only one task in {Tk1}, namely Tk z=1 , then the only coarse-grained task priority evaluation index Evp z=1 =1, calculate TK lgt Any task in Tk z Uninstall priority Pri z=1 =Pri lgt +Evp z =2.

[0115] S55. Medium-granularity task set TK mgt = There is only one task in {Tk3}, namely Tk y=3 , then the only medium-granularity task priority evaluation index Evp y=3 =1, calculate TK mgt Any task in Tk y Uninstall priority Pri y=3 =Pri mgt +Evp y =3.

[0116] S6. All tasks are offloaded according to priority.

[0117] S61. Arrange all tasks in descending order of priority to obtain TK′ mec ={Tk2, Tk3, Tk1}.

[0118] S62.TK′ mec The number of tasks in is 3, which does not exceed Ndl mx , then TK′ mec All tasks in the process are sent to the MEC server in turn for unloading.

[0119] The effects of the present invention are described below using simulation experiments.

[0120] The performance of a 5G MEC task offloading method based on task granularity in the Internet of Vehicles (hereinafter referred to as SGS) of the present invention was compared and simulated on the MATLAB platform, and compared with a 5G MEC task offloading method based on hierarchical delay (hereinafter referred to as CTD). The basic data information is shown in Table 3 above, and the results are shown in Table 3 and Table 3. Figures 2 to 3 shown.

[0121] like Figure 2The figure shows the comparison of the task relationships that can be unloaded by different algorithms for the same vehicle at a certain RSU distance. In general, the more on-board tasks there are, the more tasks that can be unloaded; the farther the vehicle is from the RSU, the worse the cellular link quality, the more severe the channel attenuation, the lower the transmission rate, and the fewer tasks that can be unloaded; through comparison, it can be seen that CTD and SGS belong to two different types of unloading algorithms. CTD only considers the relationship between task delays, while SGS takes into account resource bottlenecks such as the remaining service time and the MEC server load and divides tasks into fine, medium, and coarse granularity for differentiated unloading; fine-grained tasks require fewer resources and are unloaded from the dimension of delay in accordance with the CTD method, so SGS has more tasks that can be unloaded than CTD; similarly, medium and coarse-grained tasks need to take into account delay and energy consumption, while CTD does not take into account the situation where MEC service resources are limited, and is more of an ideal state. Therefore, under the same distance, the performance of SGS deviates from that of CTD to a certain extent; like Figure 3 The task offloading success rate comparison chart of the SGS algorithm of the present invention and the CTD algorithm is shown. CTD uses latency for hierarchical control. The more tasks to be offloaded, the higher the service latency will be, which will reduce the task offloading success rate to a certain extent, thereby reducing resource utilization. The fine-grained service offloading performance of the SGS algorithm of the present invention is much higher than that of CTD, the medium-grained service is similar to CTD, and the coarse-grained service is slightly worse; under the condition of limited MEC offloading resources, selecting differentiated offloading strategies based on service granularity is more helpful to improve customer perception.

[0122] The specific embodiments described herein are merely examples of the spirit of the present invention. Those skilled in the art may make various modifications or additions to the specific embodiments described or replace them in similar ways, but they will not deviate from the spirit of the present invention or exceed the scope defined by the appended claims.

Claims

1. A 5G MEC task offloading method based on task granularity in an Internet of Vehicles, wherein the MEC includes a roadside unit communicating with a vehicle, the roadside unit is configured with a MEC server, the Internet of Vehicles includes an on-board terminal, and the vehicle generates a task, characterized in that: The following steps are involved: Calculate the transmission rate of the unloading link between the vehicle and the current roadside unit; Calculate the unloading processing time and energy consumption in the roadside unit for each task, and normalize the unloading processing time and energy consumption of each task based on all tasks; Divide all tasks into fine, medium and coarse granularity tasks, calculate the fine granularity task priority according to the task offloading processing time, calculate the coarse granularity task priority according to the task offloading processing energy consumption, and calculate the medium granularity task priority according to the weighted calculation of time and energy consumption; Offload all tasks by priority.

2. According to claim 1, a 5G MEC task offloading method based on task granularity in a connected vehicle network is characterized in that: Set the low threshold and high threshold of task granularity; Obtain the computing power information of all tasks applying for MEC services, compare the computing power of the tasks applying for MEC services with the low granularity threshold and the high granularity threshold respectively, select tasks not greater than the low granularity threshold as fine-grained tasks, select tasks not less than the high granularity threshold as coarse-grained tasks, and tasks between the high and low granularity thresholds as medium-grained tasks.

3. According to a 5G MEC task offloading method based on task granularity in a connected vehicle network according to claim 1, it is characterized by: The initial priorities of fine, medium and coarse-grained tasks are set in turn, and the fine, medium and coarse-grained task priority evaluation indicators are calculated according to the task offloading processing time and energy consumption. The fine, medium and coarse-grained task priorities are the sum of their initial priorities and the priority evaluation value indicators respectively.

4. According to claim 3, a 5G MEC task offloading method based on task granularity in a connected vehicle network is characterized in that: According to the number of fine-grained tasks, the fine-grained task priority evaluation index is set to 1 for a single quantity, and to the difference between 1 and the normalized value of its offloading processing time for multiple quantities. The fine-grained task priority is the sum of its initial priority and the priority evaluation value index.

5. According to claim 4, a 5G MEC task offloading method based on task granularity in a connected vehicle network is characterized in that: According to the number of coarse-grained tasks, the priority evaluation index of the coarse-grained task is set to 1 for a single number, and the priority evaluation index of each coarse-grained task is set to the difference between 1 and the normalized value of its unloading processing energy consumption for multiple numbers. The priority of the coarse-grained task is the sum of its initial priority and the priority evaluation value index.

6. The 5G MEC task offloading method based on task granularity in the Internet of Vehicles according to claim 5 is characterized by: According to the number of medium-granularity tasks, the medium-granularity task priority evaluation index is set to 1 for a single quantity, and the weighted sum of the normalized value of the unloading processing time and the normalized value of the unloading processing energy consumption of each medium-granularity task is calculated for multiple quantities. The weighted sum value is normalized, and the medium-granularity task priority evaluation index is set to the difference between 1 and its weighted sum normalized value. The medium-granularity task priority is the sum of its initial priority and the priority evaluation value index.

7. A 5GMEC task offloading method based on task granularity in a connected vehicle network according to any one of claims 1 to 6, characterized in that: Set the upper limit of task offloading and sort all tasks in descending order of priority; If the number of tasks is less than the upper limit of task offloading, all tasks will be sent to the MEC server in order of priority for offloading; If the number of tasks is greater than the upper limit of task offloading, the tasks with the upper limit of the number of tasks downloaded at the front of the sequence will be sent to the MEC server in sequence for offloading.

8. A 5GMEC task offloading method based on task granularity in a vehicle network according to any one of claims 1 to 6, characterized in that It also includes the judgment of roadside unit access, including: Set the MEC server load threshold; Determine whether the MEC server load is greater than the MEC server load threshold. If so, all vehicle-mounted tasks are processed locally. If not, perform MEC offloading.

9. A 5GMEC task offloading method based on task granularity in a vehicle network according to any one of claims 1 to 6, characterized in that It also includes filtering for task offloadability, including: Obtain task breakpoint resuming status, vehicle speed, distance between the vehicle and the edge of the current service roadside unit coverage, roadside unit coverage radius, and roadside unit coverage rate information; Calculate the remaining time that the vehicle can enjoy the current roadside unit service, select tasks whose remaining time is less than the unloading processing time and do not support breakpoint resumption, remove them and transfer them to local processing.

10. A 5GMEC task offloading method based on task granularity in a connected vehicle network according to any one of claims 1 to 6, characterized in that: According to the distance between the vehicle and the roadside unit, the roadside unit channel state is calculated, and the unloading link transmission rate is calculated in combination with the roadside unit signal-to-noise ratio.