A task offloading and resource allocation joint optimization method in internet of vehicles

By constructing an MEC system model and using a genetic algorithm to optimize task offloading and resource allocation, the problem of task offloading and resource allocation in the coexistence scenario of eMBB and URLLC services in the Internet of Vehicles was solved, and the system cost was minimized while meeting the latency requirements of URLLC.

CN116056151BActive Publication Date: 2026-05-01NANJING UNIV OF INFORMATION SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NANJING UNIV OF INFORMATION SCI & TECH
Filing Date
2023-02-03
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

In the context of vehicle-to-everything (V2X) communication, where eMBB and URLLC services coexist, existing technologies have failed to effectively address the joint optimization issues of task offloading and resource allocation, resulting in an inability to meet the stringent latency requirements and energy consumption reduction needs of URLLC users.

Method used

A MEC system model is constructed, and a heuristic algorithm based on genetic algorithm is used to optimize task offloading and resource allocation for URLLC and eMBB users. By minimizing the average cost of system latency and energy consumption, and considering the latency constraints of URLLC users and the computing resource limitations of MEC servers, computing resources are allocated and task offloading decisions are made.

Benefits of technology

While meeting the latency requirements of URLLC users, the average system cost for URLLC and eMBB users in the vehicle-to-everything (V2X) network has been reduced, achieving efficient resource allocation and minimizing energy consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116056151B_ABST
    Figure CN116056151B_ABST
Patent Text Reader

Abstract

The application discloses a task unloading and resource allocation joint optimization method in Internet of Vehicles, and the method comprises the following steps: constructing a mobile edge computing (MEC) system model of ultra-reliable low-latency communication (URLLC) vehicle users and enhanced mobile broadband (eMBB) vehicle users; based on the MEC system model, taking the average cost minimization of the time delay and energy consumption of all ULRIC vehicle users and eMBB vehicle users in the system as the target, taking the time delay constraint of ULRIC vehicle users and the total amount limitation of MEC server computing resources as the constraint condition, constructing a MEC system ULRIC / eMBB task unloading and resource allocation joint optimization model; solving the joint optimization model by adopting a heuristic algorithm based on a genetic algorithm, and obtaining the optimal task unloading rate of eMBB vehicle users, the optimal task unloading decision of ULRIC vehicle users and the computing resource allocation scheme of all vehicle users.
Need to check novelty before this filing date? Find Prior Art

Description

A Joint Optimization Method for Task Offloading and Resource Allocation in Vehicle Networking Technical Field

[0001] This invention belongs to the field of wireless communication technology and relates to a joint optimization method for task offloading and resource allocation in vehicle networking, specifically a joint optimization method for task offloading and resource allocation in a scenario where eMBB and URLLC services coexist in vehicle networking. Background Technology

[0002] Enhanced Mobile Broadband (eMBB) services and Ultra-Reliable Low-Latency Communication (URLLC) enabled by 5G New Radio (NR) are considered fundamental prerequisites for future intelligent transportation systems. In particular, eMBB services aim to provide extremely high data rates for content delivery, significantly improving the Quality of Experience (QoE) of bandwidth-intensive in-vehicle entertainment applications. On the other hand, URLLC is designed to address the stringent requirements for latency and reliability in critical data packet transmission, thereby facilitating autonomous driving in connected vehicles. The coexistence of these two services leads to resource contention. Furthermore, to meet the QoS requirements of sensitive vehicular network tasks, the computing power of a single vehicle may be insufficient, necessitating Mobile Edge Computing (MEC) to offload tasks to nearby MEC servers and alleviate the workload on the terminal. Properly offloading tasks and allocating resources for URLLC and eMBB users in vehicular networks while meeting the different QoS requirements of both is a significant challenge. Moreover, due to the limited battery capacity of terminals, each vehicle needs to be able to successfully process tasks with minimal energy consumption.

[0003] Simultaneous service of eMBB and URLLC services in MEC systems has gradually become a research hotspot. Existing technologies have considered the resource allocation problem in the coexistence scenario of eMBB and URLLC services in vehicular networks, but have not considered the task offloading and joint allocation of computing resources in the coexistence scenario of eMBB and URLLC services in vehicular network communication scenarios. Summary of the Invention

[0004] Objective: To address the aforementioned issues, this invention provides a joint optimization method for task offloading and resource allocation in a scenario where URLLC and eMBB services coexist in the Internet of Vehicles (IoV). Under the premise of meeting the strict latency constraints of URLLC users, this method reduces the average system cost of latency and energy consumption for both URLLC and eMBB users in the IoV.

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

[0006] In a first aspect, the present invention provides a method for joint optimization of task offloading and resource allocation in a vehicle-to-everything (V2X) network, comprising:

[0007] Step S1: Construct a mobile edge computing (MEC) system model for the coexistence of ultra-reliable low-latency communication (URLLC) vehicle users and enhanced mobile bandwidth (eMBB) vehicle users;

[0008] Step S2: Based on the MEC system model, with the goal of minimizing the average cost of latency and energy consumption for all URLLC vehicle users and eMBB vehicle users in the system, and with the constraints of latency for URLLC vehicle users and the total computing resources limit of the MEC server as constraints, construct a joint optimization model for URLLC / eMBB task offloading and resource allocation in the MEC system.

[0009] Step S3: Use a heuristic algorithm based on genetic algorithm to solve the joint optimization model to obtain the optimal task offloading rate for eMBB vehicle users, the optimal task offloading decision for URLLC vehicle users, and the computing resource allocation scheme for all vehicle users.

[0010] In some embodiments, step S1 includes:

[0011] The MEC-based vehicle-to-everything (V2X) network includes C vehicles traveling one-way on a road, K roadside units (RSUs) along the road, and each RSU is equipped with an MEC server; the set of RSUs is defined as K = {1, 2, ..., k}, the set of M eMBB vehicle users is represented as M = {1, 2, ..., m}, and the set of N URLLC vehicle users is represented as N = {1, 2, ..., n}; each vehicle has one and only one computational task q = {d, c, t}. max}, where d represents the data size of the computation task, c is the number of CPU cycles required to complete one input data bit, and t max This represents the maximum latency that task q can tolerate.

[0012] The set of tasks generated by C vehicles is represented as follows: The channel bandwidth is W, and it is evenly distributed according to the number of vehicles; assuming that all RSUs have the same computing power, denoted as F. rsu ,use To represent the computing power of eMBB vehicle users, using To represent the computing power of URLLC vehicle users;

[0013] The MEC system model includes: a calculation model for the transmission rate, latency, energy consumption, and total cost of URLLC vehicle users and eMBB vehicle users;

[0014] Transmission rates for S1.1, URLLC vehicle users, and eMBB vehicle users:

[0015] Given a decoding error probability and finite block length Under bytes, the transmission rate of URLLC vehicle users for:

[0016]

[0017] Where W is the subcarrier bandwidth, P n This is the transmit power, N0 is the transmission noise of the wireless channel, and Q is the transmit power. -1 It is the inverse function of the Q function, G n The channel gain between the URLLC vehicle user and the RSU is expressed as:

[0018] G n =127 + 30logr,

[0019] Where r is the distance between the vehicle and the RSU; V n It is channel dispersion, represented as:

[0020]

[0021] eMBB vehicle user transmission rate for:

[0022]

[0023] Where W is the subcarrier bandwidth, P m G is the transmit power, N0 is the white noise spectrum of the channel, and G is the transmit power. m This represents the channel gain between the eMBB vehicle user and the RSU;

[0024] S1.2, latency for URLLC vehicle users and eMBB vehicle users:

[0025] S1.2.1, Represent the unloading decision as a n ∈{0,1}, a n =1 indicates unloading the computation; otherwise, the computation is performed locally. The computing power of URLLC vehicle user n is determined by the on-board unit (OBU) placed on the vehicle.

[0026] If local computation is selected, the local computation latency for URLLC vehicle user n is:

[0027]

[0028] If unloading calculation is selected, the unloading calculation latency for URLLC vehicle user n is: It is the task transmission latency. This refers to the task computation latency; combined with the transmission rate model, it refers to the task transmission latency. Represented as:

[0029]

[0030] The MEC server allocates computing resources to each URLLC vehicle user n as follows: Task computation latency Represented as:

[0031]

[0032] Where c n The number of CPU cycles required to complete one input data bit, d n This refers to the amount of data required for the computation task.

[0033] All URLLC packets are the same size, and the computing resources allocated to URLLC vehicle users are the same. Represented as:

[0034]

[0035] Where F u The computing resources allocated to all URLLC vehicle users by the RSU are represented as follows:

[0036] F u =(1-β)F rsu ,

[0037] Where β is the allocation factor, then (1-β) is the proportion of computing resources allocated by RSU to all URLLC vehicle users to the total computing resources of RSU;

[0038] URLLC vehicle user unloading calculation delay Represented as:

[0039]

[0040] The total task execution delay T for URLLC vehicle users n for:

[0041]

[0042] S1.2.2 For eMBB tasks with long data packets, partial offloading is adopted, with part of the computation performed locally and part performed on the MEC server; the total amount of data to be computed for eMBB vehicle user tasks is d. m , using γm This indicates that the amount of data processed locally accounts for d. m The proportion of the total data volume, with the amount of data processed locally being γ. m d m The amount of data that needs to be unloaded is (1-γ) m )d m ;

[0043] Local processing latency is calculated as follows:

[0044]

[0045] Unloading computation latency is It is the task transmission latency. This refers to the task computation latency; combined with the transmission rate model, it refers to the task transmission latency. Represented as:

[0046]

[0047] Assume the computing resources allocated by the MEC server to eMBB vehicle users are... Then the task calculation delay Represented as:

[0048]

[0049] Computational resource allocation based on weighted proportional distribution, and the computing resources allocated to eMBB vehicle users. Represented as:

[0050]

[0051] Where F e The computing resources allocated by RSU to all eMBB vehicle users are represented as follows:

[0052] F e =βF rsu ,

[0053] Where β is the allocation factor, which is the proportion of computing resources allocated by RSU to all eMBB vehicle users to the total computing resources of RSU;

[0054] The CPU capacity allocated by the MEC server to URLLC vehicle users and the CPU capacity allocated by the MEC server to eMBB vehicle users cannot exceed the total capacity of the MEC server.

[0055]

[0056] The tasks of eMBB vehicle users are computed locally and offloaded to the MEC server for computation simultaneously; therefore, the total task execution latency T for eMBB vehicle users is... m for:

[0057]

[0058] S1.3, Equipment energy consumption of URLLC vehicle users and eMBB vehicle users:

[0059] For URLLC tasks, if local computation is selected, the local computation energy consumption of URLLC vehicle user n is... for:

[0060]

[0061] in This represents the computing power of different URLLC vehicle users, where k is a system constant.

[0062] If offload calculation is selected, the offload calculation energy consumption for URLLC vehicle user n is... Represented as:

[0063]

[0064] Locally calculated energy consumption for eMBB vehicle users Represented as:

[0065]

[0066] Where f m This represents the computing power of different eMBB vehicle users;

[0067] eMBB vehicle users' unloading calculation energy consumption Represented as:

[0068]

[0069] S1.4, Total Cost Function of Latency and Energy Consumption for Vehicle Users in URLLC and eMBB;

[0070] The total cost of latency and energy consumption for URLLC vehicle user n, C n Represented as:

[0071]

[0072] The total cost of latency and energy consumption for eMBB vehicle user m, C m Represented as;

[0073] C m =λ m T m +(1-λ m E m

[0074] Among them, a n This represents the uninstallation decision of a URLLC vehicle user, a n =1 indicates unloading the calculation, a n =0 indicates local computation; λ n , λ m The weighting factor represents different preferences for latency and energy consumption.

[0075] In some embodiments, the average cost Θ of latency and energy consumption for all URLLC vehicle users and eMBB vehicle users in the system is expressed as:

[0076] Where M represents the total number of eMBB vehicle users, N represents the total number of URLLC vehicle users, and C represents the total number of eMBB vehicle users. m C represents the total cost of latency and energy consumption for eMBB vehicle user m. n This represents the total cost of latency and energy consumption for URLLC vehicle user n.

[0077] In some embodiments, a joint optimization model for URLLC / eMBB task offloading and resource allocation in the MEC system is constructed, including:

[0078] Define a = {a1, a2, ..., a} n} represents the task offloading decision for URLLC vehicle users, γ = {γ1, γ2, ..., γ} m} Task offloading decisions for eMBB vehicle users To calculate the resource allocation matrix, Let m and n be the computing resources allocated by the MEC server to eMBB vehicle user m and URLLC vehicle user n, respectively. The optimization problem P1 is described as follows:

[0079]

[0080] stC1:

[0081] C2:

[0082] C3:

[0083] C4:

[0084] C5:

[0085] Where C1 represents the binary offload constraint, meaning that tasks for URLLC vehicle users can only be computed locally or completely offloaded; C2 ensures that the offloaded data size for eMBB vehicle users must be less than the total input data size; and C3 indicates that the total computing resources allocated to eMBB and URLLC vehicle users should be less than the maximum computing capacity F of the MEC server in the system. rsu C4 and C5 indicate that the execution latency of each user does not exceed the maximum tolerable latency t. max .

[0086] In some embodiments, step S3, solving the joint optimization model using a heuristic algorithm based on a genetic algorithm, includes:

[0087] Step S31: Set the initial computing resource allocation matrix F (0) URLLC vehicle user task offloading decision a (0) Set the current iteration number to r = 0;

[0088] Step S32: F (r) and a (r) Substituting into optimization problem P1, we transform it into optimization problem P2, and then use a genetic algorithm to obtain the task offloading rate γ of eMBB vehicle users. (r+1) ;

[0089] Step S33: F (r) and γ (r+1) Substituting into optimization problem P1, we transform it into optimization problem P3, and use a genetic algorithm to obtain the task offloading decision a for URLLC vehicle users. (r+1) ;

[0090] Step S34: Place a (r+1) and γ (r+1) Substituting the solutions into optimization problem P1, we transform it into optimization problem P4, and then use a genetic algorithm to obtain the resource allocation scheme F. (r+1) ;

[0091] Step S35: Determine whether the growth value of the objective function Θ in two consecutive steps is less than the threshold τ;

[0092] Step S36: If the growth value is not less than the threshold τ, then r = r + 1, and return to repeat steps S32 to S35;

[0093] If the growth value is less than the threshold τ, output the optimal task offloading rate γ for the current eMBB vehicle user. * Optimal task unloading decision for URLLC vehicle users a* and computing resource allocation scheme F * .

[0094] In some embodiments, given F = F' and a = a', optimization problem P1 is transformed into optimization problem P2:

[0095]

[0096] stC1:

[0097] C2:

[0098] C3:

[0099] C4:

[0100] C5:

[0101] At this point, P1 is transformed into an optimization problem P2 about γ, which is solved using a genetic algorithm to obtain the task offloading rate of eMBB vehicle users.

[0102] In some embodiments, substituting the task offloading decision γ' of the eMBB vehicle user into P1, when given F = F', optimization problem P1 is transformed into optimization problem P3:

[0103]

[0104] stC1:

[0105] C2:

[0106] C3:

[0107] C4:

[0108] C5:

[0109] At this point, P1 is transformed into an optimization problem P3 about a, where a is an integer variable between 0 and 1. A genetic algorithm is used to solve the problem to obtain the task offloading decision for URLLC vehicle users.

[0110] In some embodiments, substituting the task offloading decision a' of URLLC vehicle users and the task offloading decision γ' of eMBB vehicle users into P1 yields the optimization problem P4:

[0111]

[0112] stC1:

[0113] C2:

[0114] C3:

[0115] C4:

[0116] C5:

[0117] At this point, P1 is transformed into an optimization problem P4 about F, which is solved using a genetic algorithm to obtain a computational resource allocation scheme.

[0118] In a second aspect, the present invention provides a joint optimization device for task offloading and resource allocation in a vehicle network, including a processor and a storage medium;

[0119] The storage medium is used to store instructions;

[0120] The processor is configured to operate according to the instructions to perform the steps of the method according to the first aspect.

[0121] Thirdly, the present invention provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in the first aspect.

[0122] Beneficial effects: This invention addresses the problem that existing work does not simultaneously consider task offloading and resource allocation in the coexistence scenario of eMBB and URLLC services in vehicular networks. It proposes a joint optimization method for task offloading and resource allocation in vehicular networks, which simultaneously considers the joint allocation of task offloading and computing resources in the coexistence scenario of eMBB and URLLC services in vehicular networks. This achieves the goal of minimizing the average cost of latency and energy consumption for all users of the system while satisfying the QoS of URLLC and eMBB services. Attached Figure Description

[0123] Figure 1: Schematic diagram of the MEC network model in which URLLC vehicle users and eMBB vehicle users coexist in an embodiment of the present invention;

[0124] Figure 2: Flowchart of the genetic algorithm according to an embodiment of the present invention;

[0125] Figure 3: Convergence performance of the present invention embodiment when using a genetic algorithm to solve for the optimal unloading rate of eMBB vehicle users;

[0126] Figure 4: Convergence performance of the genetic algorithm in this embodiment of the invention for solving the optimal unloading decision for URLLC vehicle users;

[0127] Figure 5: Convergence performance of the present invention embodiment when using a genetic algorithm to solve for the optimal allocation of computing resources for all vehicles;

[0128] Figure 6: Global algorithm flowchart of an embodiment of the present invention;

[0129] Figure 7: Curve graph (coordinate graph) showing the impact of changes in the number of eMBB vehicle users on the average system cost of this invention and two comparative methods;

[0130] Figure 8: Comparison of latency (coordinate graph) of the effect of changes in the number of eMBB vehicle users on the URLLC vehicle users of the present invention and two comparative methods. Detailed Implementation

[0131] The present invention will be further described below with reference to the accompanying drawings and embodiments. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention, and should not be used to limit the scope of protection of the present invention.

[0132] In the description of this invention, "several" means one or more, "multiple" means two or more, "greater than," "less than," and "exceeding" are understood to exclude the stated number, while "above," "below," and "within" are understood to include the stated number. The use of "first" and "second" in the description is merely for distinguishing technical features and should not be construed as indicating or implying relative importance, or implicitly indicating the number of indicated technical features, or implicitly indicating the order of the indicated technical features.

[0133] In the description of this invention, the terms "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0134] Example 1

[0135] A joint optimization method for task offloading and resource allocation in vehicle-to-everything (V2X) networks includes:

[0136] Step S1: Construct a mobile edge computing (MEC) system model for the coexistence of ultra-reliable low-latency communication (URLLC) vehicle users and enhanced mobile bandwidth (eMBB) vehicle users;

[0137] Step S2: Based on the MEC system model, with the goal of minimizing the average cost of latency and energy consumption for all URLLC vehicle users and eMBB vehicle users in the system, and with the constraints of latency for URLLC vehicle users and the total computing resources limit of the MEC server as constraints, construct a joint optimization model for URLLC / eMBB task offloading and resource allocation in the MEC system.

[0138] Step S3: Use a heuristic algorithm based on genetic algorithm to solve the joint optimization model to obtain the optimal task offloading rate for eMBB vehicle users, the optimal task offloading decision for URLLC vehicle users, and the computing resource allocation scheme for all vehicle users.

[0139] This embodiment considers the uplink transmission in a scenario where URLLC and eMBB services coexist, and proposes a joint optimization method for task offloading and resource allocation in vehicular networks. As shown in Figure 1, the MEC-based vehicular network includes C vehicles traveling one-way on the road, and K roadside units (RSUs) along the road. Each RSU is equipped with an MEC server, and the two are connected via a fiber optic wired link. The set of RSUs is defined as K = {1, 2, ..., k}, the set of M eMBB vehicle users is represented as M = {1, 2, ..., m}, and the set of N URLLC vehicle users is represented as N = {1, 2, ..., n}. Each vehicle has one and only one computational task q = {d, c, t}. max}, where d represents the data size of the computation task, c is the number of CPU cycles required to complete one input data bit, and t max Let represent the maximum tolerable delay for task q. Then the set of tasks generated by C vehicles can be represented as... The channel bandwidth is W, and this invention allocates the channel bandwidth evenly based on the number of vehicles. It is assumed that all RSUs have the same computing power, denoted as F. rsu ,use To represent the computing power of eMBB vehicle users, using This represents the computing power of URLLC vehicle users.

[0140] In some embodiments, a joint optimization method for task offloading and resource allocation in a scenario where eMBB and URLLC services coexist in a vehicle-to-everything (V2X) network includes the following steps:

[0141] S1: Establish the system model. The MEC system model includes two types of vehicles: URLLC and eMBB.

[0142] First, the transmission rates of URLLC vehicle users and eMBB vehicle users are characterized.

[0143] According to the finite block length theory, given the decoding error probability... and finite block length Under bytes, the transmission rate of URLLC vehicle users for:

[0144]

[0145] Where W is the subcarrier bandwidth, P n This is the transmit power, N0 is the transmission noise of the wireless channel, and Q is the transmit power. -1 It is the inverse function of the Q function, G n The channel gain between the URLLC vehicle user and the RSU is expressed as:

[0146] G n =127 + 30logr,

[0147] Where r is the distance between the vehicle and the RSU. V n It is channel dispersion, represented as:

[0148]

[0149] eMBB vehicle user transmission rate for:

[0150]

[0151] Where W is the subcarrier bandwidth, P m G is the transmit power, N0 is the white noise spectrum of the channel, and G is the transmit power. m This represents the channel gain between the eMBB vehicle user and the RSU.

[0152] Then, the latency of URLLC vehicle users and eMBB vehicle users is characterized.

[0153] Because URLLC packets are very short, local task processing may be more advantageous if the channel conditions between the vehicle and the RSU are poor. This is because partially offloading the URLLC task would incur additional overhead due to packet splitting and rearrangement. Therefore, URLLC task processing is performed locally or on the MEC server, without task splitting. Thus, the offloading decision is represented as a n ∈{0,1}, a n =1 indicates unloading the computation; otherwise, the computation is performed locally. This assumes binary unloading, meaning the unloading task cannot be further split. This refers to the computing power of URLLC vehicle user n, determined by the on-board unit (OBU) placed on the vehicle. If local computing is selected, the local computing latency is:

[0154]

[0155] If you choose to uninstall the computation, the uninstallation time is... It is transmission delay. This involves calculating latency. Combined with the transmission rate model, the task transmission latency... Represented as:

[0156]

[0157] Assume the MEC server allocates computing resources to each URLLC vehicle user n. Then the task calculation delay It can be represented as:

[0158]

[0159] Where c n The number of CPU cycles required to complete one input data bit, d n This refers to the data size of the computational task. Since URLLC data packets are all the same size, the computational resources allocated to URLLC vehicle users... It can be represented as:

[0160]

[0161] Where F u The computing resources allocated to all URLLC vehicle users by the RSU can be represented as:

[0162] F u =(1-β)F rsu ,

[0163] Where β is the allocation factor, then (1-β) is the proportion of computing resources allocated by RSU to all URLLC vehicle users out of the total computing resources of RSU.

[0164] Since the amount of data in the computation result is very small compared to the amount of data in the input task, the latency of returning the computation result from the MEC server is ignored. Therefore, the total unloading execution latency for URLLC vehicle users includes the uplink transmission latency (i.e., unloading latency) and computation latency on the MEC server, and the unloading computation latency... Represented as:

[0165]

[0166] The total task execution latency for URLLC vehicle users is:

[0167]

[0168] For eMBB tasks with long data packets, partial offloading is employed, with part of the computation performed locally and the rest on the MEC server. The total amount of data to be computed for eMBB vehicle user tasks is d. m , using γ m This indicates that the amount of data processed locally accounts for d. m The proportion of the total data volume, therefore the amount of data processed locally is γ. m d m The amount of data that needs to be unloaded is (1-γ) m )d m The local processing latency is calculated as follows:

[0169]

[0170] Unloading computation latency is It is transmission delay. This involves calculating latency. Combined with the transmission rate model, the task transmission latency... Represented as:

[0171]

[0172] Assume the MEC server allocates computing resources to eMBB vehicle users as follows: Then the task calculation delay It can be represented as:

[0173]

[0174] Considering the allocation of computing resources (i.e., CPU capacity) based on a weighted proportional allocation, the computing resources allocated to eMBB vehicle users... It can be represented as:

[0175]

[0176] Where F e The computing resources allocated to all eMBB vehicle users by the RSU can be represented as follows:

[0177] F e =βF rsu ,

[0178] Where β is the allocation factor, which is the proportion of computing resources allocated by the RSU to all eMBB vehicle users out of the total computing resources of the RSU.

[0179] The CPU capacity allocated by the MEC server to URLLC vehicle users and the CPU capacity allocated by the MEC server to eMBB vehicle users cannot exceed the total capacity of the MEC server.

[0180]

[0181] Since the tasks of eMBB vehicle users are computed locally and offloaded to the MEC server for computation simultaneously, the total task execution latency for eMBB vehicle users is:

[0182]

[0183] Next, we will characterize the device energy consumption of URLLC vehicle users and eMBB vehicle users.

[0184] For URLLC tasks, if local computation is selected, the local energy consumption is:

[0185]

[0186] in This represents the computing power of different URLLC vehicle users, where k is a system constant that depends on the chip architecture of the vehicle equipment. Let k = 5 × 10 -27 .

[0187] If offloading computation is selected, the total energy consumption is the offloading energy consumption, ignoring the energy consumption for receiving computation results. The total energy consumption for offloading computation of URLLC vehicle user n is the task's offloading energy consumption, considering only the device's own energy consumption and ignoring the MEC server's computation energy consumption. Therefore, the offloading computation energy consumption is expressed as:

[0188]

[0189] For eMBB vehicle users, the locally calculated energy consumption can be expressed as:

[0190]

[0191] Where f m This represents the computing power of different eMBB vehicle users. The total energy consumption for offloading computation by eMBB vehicle users is the offloading energy consumption of the task, considering only the energy consumption of the device itself and not the computing energy consumption of the MEC server. Therefore, the offloading computation energy consumption is expressed as:

[0192]

[0193] Finally, a total cost function characterizing the latency and energy consumption of all URLLC and eMBB vehicle users within the system.

[0194] The total cost of latency and energy consumption for URLLC vehicle user n is expressed as follows:

[0195]

[0196] Among them, a n This represents the uninstallation decision of a URLLC vehicle user, a n =1 indicates unloading the calculation, a n =0 indicates local computation. λ is a weighting factor representing different preferences for latency and energy consumption. This value varies depending on the specific needs, and latency or energy consumption can be reduced by adjusting the value of λ. The total cost for eMBB vehicle user m is expressed as a weighted sum of latency and energy consumption:

[0197] C m =λ m T m +(1-λ m E m .

[0198] S2: Establish a joint optimization model for URLLC / eMBB task unloading and resource allocation in the MEC system.

[0199] Under the strict latency constraints of URLLC vehicle users, the average cost of latency and energy consumption is minimized by optimizing the joint allocation of computing resources between URLLC and eMBB vehicle users. The optimization model is as follows:

[0200]

[0201] The optimization model is a weighted average sum of latency and energy consumption for all URLLC and eMBB vehicle users in the system. The optimization objective is to find the optimal joint allocation strategy for task offloading and computing resources, minimizing the average cost of latency and energy consumption for all users in the system while meeting the latency and reliability requirements of URLLC. Define a = {a1, a2, ..., a...} n} represents the task unloading decision for URLLC tasks, where γ = {γ1, γ2, ..., γ} m} is the unloading decision for the eMBB task. To compute the resource allocation matrix, the optimization problem P1 can be described as follows:

[0202]

[0203] stC1:

[0204] C2:

[0205] C3:

[0206] C4:

[0207] C5:

[0208] C1 represents the binary offload constraint, meaning that tasks for URLLC vehicle users can only be computed locally or completely offloaded; C2 guarantees that the offloaded data size for eMBB vehicle users must be less than the total input data size; C3 indicates that the total computing resources allocated to eMBB and URLLC vehicle users should be less than the maximum computing capacity of the edge servers in the system; C4 and C5 indicate that the execution latency of each user does not exceed the maximum tolerable latency.

[0209] The optimization problem described above is a mixed-integer nonlinear programming problem. Such problems are typically non-convex and NP-hard, making them challenging to solve. Therefore, this invention divides the optimization problem into two sub-problems: the task offloading decision problem and the resource allocation problem. The task offloading decision problem can be further divided into two parts: one part determines whether URLLC vehicle users perform computation locally or on the MEC server; the other part determines the optimal offloading rate for eMBB vehicle users, i.e., how much data will be executed locally and how much will be offloaded to the edge server.

[0210] S3: A heuristic algorithm based on genetic algorithm is used to solve the joint optimization model to obtain the optimal task offloading rate for eMBB vehicle users, the optimal task offloading decision for URLLC vehicle users, and the computing resource allocation scheme for all vehicle users.

[0211] Given F = F' and a = a', the optimization problem P1 is transformed into P2:

[0212]

[0213] stC1:

[0214] C2:

[0215] C3:

[0216] C4:

[0217] C5:

[0218] At this point, P1 is transformed into an optimization problem P2 concerning γ, which is solved using a genetic algorithm to find the initial optimal unloading rate γ' for eMBB vehicle users. The specific steps are as follows:

[0219] Step 1: Encoding and Population Initialization.

[0220] For γ, floating-point encoding is used, and each floating-point vector represents a chromosome. The dimension of the floating-point vector is the same as the dimension of the solution vector.

[0221] Step 2: Fitness value.

[0222] Since this invention studies the minimization problem, the fitness function is set as follows:

[0223]

[0224] The higher the fitness value, the lower the cost of the objective function, indicating that the unloading strategy is better.

[0225] Step 3: Select.

[0226] The roulette wheel algorithm is used to select individuals, that is, to randomly spin a roulette wheel for selection, and each individual may be selected repeatedly. The basic idea is that the probability of each individual being selected is proportional to its fitness. Let P(d) i Selecting chromosomes for the next generation i The probability of being selected, i.e.:

[0227]

[0228] Step 4: Cross.

[0229] A single-point crossover method is used, where a crossover point is randomly set in the chromosome string, followed by gene exchange to generate two new individuals. The significance lies in improving the adaptability of the new population by preserving genes from the better parents for the next generation.

[0230] Step 5: Mutation.

[0231] To prevent all solutions in the population from falling into local optima.

[0232] After determining the optimal task offloading decision γ' for eMBB vehicle users, substitute it into P1. When F = F' is given, P1 transforms into P3:

[0233]

[0234] stC1:

[0235] C2:

[0236] C3:

[0237] C4:

[0238] C5:

[0239] At this point, P1 is transformed into an optimization problem P3 concerning 'a', where 'a' is an integer variable between 0 and 1. A genetic algorithm is used to solve this problem to obtain a better task unloading decision. The specific steps are as follows:

[0240] In this invention, the task offloading decision for URLLC vehicle users constitutes the individual's chromosome information. For the nth chromosome, its chromosome information can be represented as:

[0241]

[0242] Step 1: Encoding and Population Initialization.

[0243] For a n It uses binary encoding, that is, encoding with 0 and 1, a n =1 indicates unloading the calculation, a n =0 indicates local computation. When the binary chromosome is represented as {00011 00000}, it means that vehicles 4 and 5 will offload their tasks to the MEC server for computation, while the tasks of the remaining vehicles will be computed locally. According to the task offloading model, there are N tasks that need to go through an offloading decision to determine whether to offload them. Therefore, in the genetic algorithm, each chromosome should be composed of N genes. Each task can choose to be computed locally or offloaded to the MEC server for computation. Thus, each gene has two possible values ​​(0 for local computation and 1 for MEC server computation), resulting in the initial chromosome population I(0).

[0244] Step 2: Fitness value.

[0245] Since this invention studies the minimization problem, the fitness function is set as follows:

[0246]

[0247] The higher the fitness value, the lower the cost of the objective function, indicating that the unloading strategy is better.

[0248] Step 3: Select.

[0249] The roulette wheel algorithm is used to select individuals, that is, to randomly spin a roulette wheel for selection, and each individual may be selected repeatedly. The basic idea is that the probability of each individual being selected is proportional to its fitness. Let P(d) i Selecting chromosomes for the next generation i The probability of being selected, i.e.:

[0250]

[0251] Step 4: Cross.

[0252] A single-point crossover method is used, where a crossover point is randomly set in the chromosome string, followed by gene exchange to generate two new individuals. The significance lies in improving the adaptability of the new population by preserving genes from the better parents for the next generation.

[0253] Step 5: Mutation.

[0254] To prevent all solutions in the population from falling into local optima, for binary encoding, randomly select a few positions and change them from 1 to 0 or from 0 to 1.

[0255] After finding the optimal task offloading decision a' for URLLC vehicle users, substituting the optimal task offloading decision a' for URLLC vehicle users and the optimal task offloading decision γ' for eMBB vehicle users into P1, we obtain problem P4:

[0256]

[0257] stC1:

[0258] C2:

[0259] C3:

[0260] C4:

[0261] C5:

[0262] At this point, P1 is transformed into an optimization problem P4 concerning F, which is solved using a genetic algorithm. The specific steps are as follows:

[0263] Step 1: Encoding and Population Initialization.

[0264] For F, floating-point encoding is used, and each floating-point vector represents a chromosome. The dimension of the floating-point vector is the same as the dimension of the solution vector.

[0265] Step 2: Fitness value.

[0266] Since this invention studies the minimization problem, the fitness function is set as follows:

[0267]

[0268] The higher the fitness value, the lower the cost of the objective function, indicating that the unloading strategy is better.

[0269] Step 3: Select.

[0270] The roulette wheel algorithm is used to select individuals, that is, to randomly spin a roulette wheel for selection, and each individual may be selected repeatedly. The basic idea is that the probability of each individual being selected is proportional to its fitness. Let P(d) i Selecting chromosomes for the next generation i The probability of being selected, i.e.:

[0271]

[0272] Step 4: Cross.

[0273] A single-point crossover method is used, where a crossover point is randomly set in the chromosome string, followed by gene exchange to generate two new individuals. The significance lies in improving the adaptability of the new population by preserving genes from the better parents for the next generation.

[0274] Step 5: Mutation.

[0275] To prevent all solutions in the population from falling into local optima.

[0276] This embodiment uses a heuristic algorithm based on genetic algorithms to solve the problem.

[0277] In summary, this invention models task offloading decisions and resource allocation as mixed-integer nonlinear programming problems, and proposes a heuristic algorithm based on genetic algorithms. The problem is divided into two subproblems: by substituting the initial resource allocation and URLLC task offloading decisions into P1, we obtain P2, which only concerns the eMBB task offloading decision. Substituting the obtained eMBB task offloading decision solution and initial resource allocation into P1, we obtain P3, which only concerns the URLLC task offloading decision. Substituting the obtained eMBB task offloading decision solution and URLLC task offloading decision solution into P1, we obtain P4, which only concerns the resource allocation problem. All problems are solved using genetic algorithms, iteratively solving the problem based on their coupling relationship. The global algorithm flow is shown in Figure 3.

[0278] Step S31: Set the initial computing resource allocation matrix F (0) URLLC vehicle user task offloading decision a (0)Set the current iteration number to r = 0;

[0279] Step S32: F (r) and a (r) Substituting the solutions into optimization problem P1, we transform it into optimization problem P2. A genetic algorithm is then used to obtain the optimal task offloading rate γ for eMBB vehicle users. (r+1) ;

[0280] Step S33: F (r) and γ (r+1) Substituting into optimization problem P1, we transform it into optimization problem P3. Using a genetic algorithm, we obtain the optimal task offloading decision a for URLLC vehicle users. (r+1) ;

[0281] Step S34: Place a (r+1) and γ (r+1) Substituting the solutions into optimization problem P1, we transform it into optimization problem P4, and then use a genetic algorithm to obtain a better resource allocation scheme F. (r+1) ;

[0282] Step S35: Determine whether the growth value of the objective function Θ in two consecutive steps is less than the threshold τ;

[0283] Step S36: If the growth value is not less than the threshold τ, then r = r + 1, and return to repeat steps S32 to S35;

[0284] If the growth value is less than the threshold τ, output the optimal task offloading rate γ for the current eMBB vehicle user. * Optimal task unloading decision for URLLC vehicle users a * and computing resource allocation scheme F * .

[0285] To verify the algorithm proposed in this invention for task offloading decision-making and resource allocation, simulation experiments were conducted on the MATLAB platform. Specific simulation parameters were as follows: all URLLC service data packets were the same size (32 bytes); eMBB service data packet sizes were randomly distributed between 50-100KB; the maximum allowable latency was 1 second; the vehicle's local computation frequency was randomly distributed between 80-100MHz; the RSU computation frequency was 800MHz; the vehicle's maximum transmit power was 1.3W; the total channel bandwidth was 20MHz; and the white noise power N0 was 3×10⁻⁶. -13 The effective energy coefficient k = 5 × 10 -27 , probability of incorrect decoding 10 -5 The distance between the two vehicles and the roadside unit is 4 meters, the threshold τ is 0.1, and the mutation probability and crossover probability of the genetic algorithm are both 0.2.

[0286] Figure 7 shows the average system cost effect of the proposed method under different numbers of eMBB vehicle users, and Figure 8 shows the average latency effect of the proposed method for URLLC vehicle users under different numbers of eMBB vehicle users. The two comparison methods are the full unloading method and the random unloading method.

[0287] Figure 7 compares the impact of the two methods on the average cost of all vehicles in the system. As shown in the figure, when the number of URLLC vehicle users is fixed, the method proposed in this invention achieves the lowest average system cost as the number of eMBB vehicle users increases. Figure 8 shows that the method proposed in this invention results in lower average latency for URLLC vehicle users. Therefore, it can be concluded that the algorithm proposed in this invention can achieve a lower average system cost than both the full unloading method and the random unloading method while satisfying the latency constraints of URLLC vehicle users.

[0288] In summary, by implementing the task offloading and resource allocation joint optimization method for a scenario where eMBB and URLLC services coexist in a vehicle-to-everything (V2X) network according to an embodiment of the present invention, a lower average system cost in terms of latency and energy consumption than the full offloading method and the random offloading method can be obtained while ensuring the latency constraints of URLLC vehicle users.

[0289] Example 2

[0290] Secondly, this embodiment provides a joint optimization device for task offloading and resource allocation in a vehicle network, including a processor and a storage medium;

[0291] The storage medium is used to store instructions;

[0292] The processor is configured to operate according to the instructions to perform the steps of the method according to Embodiment 1.

[0293] Example 3

[0294] Thirdly, this embodiment provides a storage medium on which a computer program is stored, which, when executed by a processor, implements the steps of the method described in Embodiment 1.

[0295] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0296] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in one or more flowchart illustrations and / or one or more block diagrams.

[0297] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowcharts and / or one or more block diagrams.

[0298] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide steps for implementing the functions specified in one or more flowcharts and / or one or more block diagrams.

[0299] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A joint optimization method for task offloading and resource allocation in vehicle-to-everything (V2X) networks, characterized in that, include: Step S1: Construct a mobile edge computing (MEC) system model for the coexistence of ultra-reliable low-latency communication (URLLC) vehicle users and enhanced mobile bandwidth (eMBB) vehicle users; Step S2: Based on the MEC system model, with the objective of minimizing the average cost of latency and energy consumption for all URLLC and eMBB vehicle users in the system, and with constraints on the latency of URLLC vehicle users and the total computing resources of the MEC server, a joint optimization model for URLLC / eMBB task offloading and resource allocation in the MEC system is constructed. Step S3: A heuristic algorithm based on a genetic algorithm is used to solve the joint optimization model to obtain the optimal task offloading rate for eMBB vehicle users, the optimal task offloading decision for URLLC vehicle users, and the computing resource allocation scheme for all vehicle users. This includes: Step S31: Setting the initial computing resource allocation matrix. URLLC vehicle user task offloading decision Set the current iteration number to Step S32: ... and Substituting into the joint optimization model, the problem is transformed into optimization problem P2, which is then solved using a genetic algorithm to obtain the task offload rate of eMBB vehicle users. Step S33: ... and Substituting into the joint optimization model, the problem is transformed into optimization problem P3, which is then solved using a genetic algorithm to obtain the task offloading decision for URLLC vehicle users. Step S34: ... and Substituting into the joint optimization model, the problem is transformed into optimization problem P4, which is then solved using a genetic algorithm to obtain the resource allocation scheme. Step S35: Determine the objective function in two consecutive steps. Is the growth value less than the threshold? Step S36: If the growth value is not less than the threshold ,but And return to repeat steps S32 to S35; if the increase value is less than the threshold Output the optimal task offload rate for the current eMBB vehicle user. Optimal task offloading decision for URLLC vehicle users and computing resource allocation scheme 。 2. The method for joint optimization of task offloading and resource allocation in the Internet of Vehicles according to claim 1, characterized in that, Step S1 includes: MEC-based vehicle networking, including A vehicle traveling in one direction on the road, with [something] along the roadside. There are 10 roadside units (RSUs), each equipped with a MEC server; the set of RSUs is defined as follows: , The set of eMBB vehicle users is represented as ,and A set of URLLC vehicle users is represented as Each vehicle has one and only one computational task. ,in This indicates the size of the data in the computation task. The number of CPU cycles required to complete one input data bit. Representative task The maximum tolerable delay; The set of tasks generated by a vehicle is represented as follows: The channel bandwidth is The channel bandwidth is evenly allocated based on the number of vehicles; assuming all RSUs have the same computing power, denoted as . ,use To represent the computing power of eMBB vehicle users, using To represent the computing power of URLLC vehicle users; the MEC system model includes: a calculation model for the transmission rate, latency, energy consumption, and total cost of URLLC vehicle users and eMBB vehicle users; S1.1, the transmission rate of URLLC vehicle users and eMBB vehicle users: under a given decoding error probability and finite block length Under bytes, the transmission rate of URLLC vehicle users for: ,in It is the subcarrier bandwidth. It's the transmission power. It is the transmission noise of the wireless channel. yes The inverse function of the function, The channel gain between the URLLC vehicle user and the RSU is expressed as: ,in It is the distance between the vehicle and the RSU; It is channel dispersion, represented as: eMBB vehicle user transmission rate for: ,in It is the subcarrier bandwidth. It's the transmission power. It is the white noise spectrum of the channel. S1.2, Channel gain between eMBB vehicle users and RSUs; S1.2, Delays between URLLC vehicle users and eMBB vehicle users: S1.2.1, Express the offloading decision as , This indicates that computation will be unloaded; otherwise, computation will be performed locally. URLLC vehicle user The computing power is determined by the onboard unit (OBU) placed in the vehicle; if local computing is selected, the URLLC vehicle user... The local computation latency is: If you choose to unload the calculation, URLLC vehicle users The unloading calculation latency is , It is the task transmission latency. This refers to the task computation latency; combined with the transmission rate model, it refers to the task transmission latency. Represented as: The MEC server serves each URLLC vehicle user. The allocated computing resources are Task computation latency Represented as: ,in The number of CPU cycles required to complete one input data bit. The data size for this computational task; the size of URLLC data packets is the same, and the computing resources allocated to URLLC vehicle users are... Represented as: ,in The computing resources allocated to all URLLC vehicle users by the RSU are represented as follows: ,in If it is an allocation factor, then The proportion of computing resources allocated by RSU to all URLLC vehicle users out of the total computing resources of RSU; the offloading computation latency of URLLC vehicle users. Represented as: The total task execution delay for URLLC vehicle users is then... for: S1.2.2 For eMBB tasks with long data packets, partial offloading is adopted, with part of the computation performed locally and part performed on the MEC server; the total amount of data to be computed for eMBB vehicle user tasks is [amount missing]. ,use This indicates the proportion of data processed locally. The proportion of the total data volume, the amount of data processed locally is The amount of data that needs to be uninstalled is Local processing latency is calculated as follows: The unloading calculation delay is , It is the task transmission latency. This refers to the task computation latency; combined with the transmission rate model, it refers to the task transmission latency. Represented as: Assume the computing resources allocated by the MEC server to eMBB vehicle users are... Then the task computation delay Represented as: Computing resources allocated based on weighted proportional distribution, and computing resources allocated to eMBB vehicle users. Represented as: ,in The computing resources allocated by RSU to all eMBB vehicle users are represented as follows: ,in The allocation factor is the proportion of computing resources allocated by the RSU to all eMBB vehicle users out of the total computing resources of the RSU; the CPU capacity allocated by the MEC server to URLLC vehicle users and the CPU capacity allocated by the MEC server to eMBB vehicle users cannot exceed the total capacity of the MEC server. For eMBB vehicle users, tasks are computed locally and offloaded to the MEC server for computation simultaneously; therefore, the total task execution latency for eMBB vehicle users is relatively low. for: S1.3, Device energy consumption for URLLC vehicle users and eMBB vehicle users: For URLLC tasks, if local computation is selected, the energy consumption of URLLC vehicle users... Local computing power consumption for: ,in This represents the computing power of different URLLC vehicle users. It is a system constant; if unloading calculation is selected, URLLC vehicle users Unloading calculation energy consumption Represented as: Local computing power consumption of eMBB vehicle users Represented as: ,in This represents the computing power of different eMBB vehicle users; the offloading computing energy consumption of eMBB vehicle users. Represented as: The total cost function of latency and energy consumption for S1.4, URLLC, and eMBB vehicle users; URLLC vehicle users Total cost of latency and energy consumption Represented as: eMBB vehicle users Total cost of latency and energy consumption Represented as; ,in, This indicates the uninstallation decision of URLLC vehicle users. Indicates unloading calculation, Indicates local calculation; 、 The weighting factor represents different preferences for latency and energy consumption.

3. The method for joint optimization of task offloading and resource allocation in the Internet of Vehicles according to claim 1, characterized in that, Average cost of latency and energy consumption for all URLLC and eMBB vehicle users in the system Represented as: Where M represents the total number of eMBB vehicle users and N represents the total number of URLLC vehicle users. Indicates eMBB vehicle users The total cost of latency and energy consumption, Indicates URLLC vehicle user The total cost of latency and energy consumption.

4. The method for joint optimization of task offloading and resource allocation in the Internet of Vehicles according to claim 3, characterized in that, Construct a joint optimization model for URLLC / eMBB task offloading and resource allocation in the MEC system, including: defining... Task offloading decisions for URLLC vehicle users Task offloading decisions for eMBB vehicle users To calculate the resource allocation matrix, 、 These represent the MEC server's allocation to eMBB vehicle users. URLLC vehicle users The computational resources, the joint optimization model P1 is described as follows: C1 represents the binary offload constraint, meaning that tasks for URLLC vehicle users can only be computed locally or completely offloaded; C2 ensures that the offloaded data size for eMBB vehicle users must be less than the total input data size; and C3 indicates that the total computing resources allocated to eMBB and URLLC vehicle users should be less than the maximum computing capacity of the MEC server in the system. C4 and C5 indicate that the execution latency for each user does not exceed the maximum tolerable latency. 。 5. The method for joint optimization of task offloading and resource allocation in the Internet of Vehicles according to claim 4, characterized in that, When given , At that time, the joint optimization model P1 is transformed into optimization problem P2: At this point, the joint optimization model P1 is transformed into a model concerning... The optimization problem P2 is solved using a genetic algorithm to obtain the task offloading rate of eMBB vehicle users.

6. The method for joint optimization of task offloading and resource allocation in the Internet of Vehicles according to claim 4, characterized in that, Decision on offloading tasks for eMBB vehicle users Substituting into the joint optimization model P1, when given At that time, the joint optimization model P1 is transformed into optimization problem P3: At this point, the joint optimization model P1 is transformed into a model concerning... The optimization problem P3, The variables are 0-1 integers, and a genetic algorithm is used to solve for the task offloading decision of URLLC vehicle users.

7. The method for joint optimization of task offloading and resource allocation in the Internet of Vehicles according to claim 4, characterized in that, Decision on offloading tasks for URLLC vehicle users Task offloading decisions for eMBB vehicle users Substituting into the joint optimization model P1, we obtain the optimization problem P4: At this point, the joint optimization model P1 is transformed into a model concerning... The optimization problem P4 is solved using a genetic algorithm to obtain a computational resource allocation scheme.

8. A joint optimization device for task offloading and resource allocation in a vehicle-to-everything (V2X) network, characterized in that, It includes a processor and a storage medium; the storage medium is used to store instructions; the processor is used to operate according to the instructions to perform the steps of the method according to any one of claims 1 to 7.

9. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.