Optimization method for task offloading and resource scheduling of edge computing in internet of vehicles
By introducing a dual-priority mechanism and dynamic task switching in the Internet of Vehicles (IoV), and combining it with deep reinforcement learning algorithms, the offloading of edge computing tasks and resource scheduling in the IoV are optimized, which solves the problems of insufficient dynamism and resource scheduling in the existing technology, and realizes efficient emergency task response and elastic resource scheduling.
Patent Information
- Application Number
- CN202511450203.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-11
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2045-10-11
AI Technical Summary
Existing edge computing task offloading methods for vehicle-to-everything (V2X) networks have shortcomings in dynamism and resource scheduling, making it difficult to achieve efficient emergency task response and elastic resource scheduling, and the optimization decisions lack adaptability.
A deep reinforcement learning algorithm based on Markov decision process is adopted, combined with a dual priority mechanism, to dynamically preempt computing resources and realize task switching, optimize communication bandwidth and computing resource allocation, and construct a vehicle network task offloading and resource scheduling model.
Significantly reduces task processing latency, improves emergency task response capabilities, enables efficient utilization and adaptive optimization of system resources, and reduces communication energy consumption.
Smart Images

Figure CN120916201B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of Internet of Vehicles, and particularly relates to an optimization method for edge computing task offloading and resource scheduling of Internet of Vehicles. BACKGROUND
[0002] The present application considers a very complete simulation environment, and the bandwidth allocation of edge transmission is determined by the task priority. In addition to the offloading scheme, the resource allocation of the edge server is also an optimization target. At the same time, this paper introduces a task jump mechanism with priority, all vehicles can choose to offload tasks to the nearest server or migrate tasks to the edge server in the adjacent domain by the server for calculation, so as to further shorten the total time delay, and a part of the resource allocation decision will also be determined by the task priority. The work to be studied is how to coordinate multiple parameters to optimize the final goal and develop a suitable offloading strategy.
[0003] The classical algorithm optimization method can explain each step in the solving process, but the result may be affected by factors such as initial value and constraint, and attention should be paid to parameter setting, constraint condition and parameter adjustment, and it may not converge or converge slowly, but it usually has the characteristics of good flexibility, high interpretability and the like. Deep reinforcement learning combines the perception prediction ability of deep learning and the decision-making ability of reinforcement learning, uses neural network to fit value and strategy, so that the agent can efficiently process scheduling information in a complex environment, but it has poor interpretability and needs time for modeling and optimization. Therefore, this paper plans to combine traditional scheduling methods and deep reinforcement learning based on Markov decision process, improve prediction ability, accelerate model building and learning, and maximize edge computing scheduling efficiency.
[0004] According to the search, the Chinese invention patent with the publication number CN119996446A discloses an RSU-assisted multi-hop task offloading method based on asynchronous deep reinforcement learning, relates to the technical field of edge offloading and deep reinforcement, accurately evaluates the connection stability between nodes by establishing a vehicle movement model and a communication model; models the task offloading problem as a high-dimensional MDP, and solves the problem by using A3C algorithm; the A3C algorithm trains multiple agents asynchronously, effectively handles the optimization problem in a large-scale action space, and thus realizes a more optimal task offloading strategy in a complex and variable vehicle networking environment; compared with existing task offloading strategies, the method has significant performance improvement in reducing task processing delay and improving computing resource utilization, especially in multi-RSU and high dynamicity scenarios, significantly improves the task completion rate and resource utilization efficiency of the system; in addition, the application also has good scalability and can adapt to more complex application requirements in future vehicle networking.
[0005] The technical comparison between the present application and the "RSU-assisted multi-hop task offloading method based on asynchronous deep reinforcement learning" is as follows:
[0006] The present application and the "RSU-assisted multi-hop task offloading method based on asynchronous deep reinforcement learning" are both in the field of vehicle networking edge computing, both involve task offloading and resource scheduling, but there are fundamental differences in core architecture and scheduling mechanism, mainly in the following two aspects: 1. The underlying task scheduling mechanism; 2. The final optimization decision.
[0007] In terms of task scheduling mechanism, an architectural upgrade from "multi-hop transmission" to "coordinated preemption and jumping" is achieved. The "RSU-assisted multi-hop task offloading based on asynchronous deep reinforcement learning" adopts "RSU-assisted multi-hop task offloading", which is essentially a static and passive transmission path optimization. Once the task is offloaded, its execution path is relatively fixed, lacking the ability to dynamically adjust according to the real-time state of the system, while the present application proposes a new mechanism of "task preemption + task dynamic jumping", achieving a fundamental breakthrough in architecture. The system can dynamically preempt the computing resources occupied by low-priority tasks according to the urgency of newly arrived high-priority tasks, achieving instantaneous reallocation of resources and greatly improving the system's response capability to emergency events. At the same time, the task can dynamically migrate to the optimal server according to the load state of the neighboring server during execution, breaking through the single-server resource bottleneck and upgrading from "path optimization" to "global resource pool utilization". This mechanism far surpasses the single "multi-hop transmission" of the "RSU-assisted multi-hop task offloading method based on asynchronous deep reinforcement learning", achieving true cross-domain coordination and resource elastic scheduling.
[0008] In terms of optimization decision, a paradigm shift from "single decision" to "dual-priority invisible cooperation" is achieved. The "RSU-assisted multi-hop task offloading method based on asynchronous deep reinforcement learning" uses asynchronous deep reinforcement learning (A3C) to optimize offloading decisions, with the core optimization goal focusing on the selection of transmission paths to minimize processing delay. The present application introduces a "dual-priority invisible cooperation" decision framework, achieving multi-dimensional and adaptive integrated optimization: it innovatively designs a dual-independent priority mechanism that decouples transmission and computation. Transmission priority integrates vehicle speed, task data volume, and urgency to dynamically allocate bandwidth, while computation priority introduces residual time awareness to dynamically allocate computing power. The cooperation of the two ensures that high-urgency tasks are given priority in both transmission and computation stages. Through deep reinforcement learning, the road scene (such as emergency braking and regular cruising) is intelligently perceived, and priority strategy parameters (lambda coefficient) are dynamically generated and adaptively adjusted, enabling the resource allocation strategy to form "invisible cooperation" with the real-time vehicle networking environment, thereby optimizing delay, energy consumption, and task success rate at the system level. The optimization dimension and intelligence level far exceed the single delay optimization goal of the application.
[0009] The RSU-assisted multi-hop task offloading method based on asynchronous deep reinforcement learning provides a multi-hop transmission scheme based on fixed rules, and the application provides an intelligent scheduling system with dynamic preemption, cross-domain jumping, double-priority cooperation and scene adaptation capability, realizing the leap from "transmission optimization" to "system-level resource intelligent cooperation", and the technical distinction is significant.
[0010] Through retrieval, the US invention patent with publication number US12399756B2 provides a method for optimizing task offloading in vehicle networking using deep reinforcement learning, including the following steps: S1: constructing a vehicle-mounted system network; S2: constructing a task model of the application; S3: constructing a task load model: calculating the time delay, energy consumption and incentive compensation of three offloading modes of local calculation, offloading to nearby vehicles and offloading to nearby RSUs according to the vehicle-mounted network system and the task model; S4: determining the priority of the task: first, determine the priority of each sub-task according to the allocation of the predecessor node of the sub-task, and then schedule according to the multi-queue algorithm; S5: finding the optimal offloading strategy using deep reinforcement learning.
[0011] The technical comparison between the present application and the method for optimizing task offloading in vehicle networking using deep reinforcement learning is as follows:
[0012] Although both the present application and the method for task offloading in vehicle networking using deep reinforcement learning use a deep reinforcement learning framework and focus on task priority design, there are essential differences in system completeness and scheduling mechanism, mainly in the following two key aspects: 1. completeness of the system model; 2. optimization target and cooperation dimension.
[0013] In terms of completeness of the system model: the mechanism completeness upgrade from "static offloading" to "dynamic jumping and preemption" is realized. The optimization core of the method for task offloading in vehicle networking using deep reinforcement learning is to select the optimal execution location for dependent sub-tasks, and its model is essentially a static and one-time offloading decision. Once the task is offloaded to a specific location, its execution process is fixed at that node and completed, lacking the ability to dynamically adjust according to the system state changes during execution. The present application constructs a complete system model that supports "task dynamic jumping" and "resource real-time preemption", realizing dynamic scheduling at the full life cycle level; the task can dynamically migrate to a server with better resources for continuous execution according to the real-time load state of the neighboring server during execution. At the same time, a real-time preemption mechanism based on double priority is introduced. When a high-priority new task arrives, it can preempt the resources occupied by a low-priority task, ensuring the immediate processing of urgent tasks (such as safety alarms). Compared with the static scheduling in the application that relies on "initial priority sorting", this can dynamically guarantee the service quality of high-priority tasks, which is a substantial enhancement of the priority model.
[0014] In the optimization target and the coordination dimension: the optimization paradigm expansion from "cost weighted sum" to "multi-objective implicit coordination" is realized. The optimization target of the "vehicle networking task offloading method based on deep reinforcement learning" is "weighted sum of energy consumption and incentive compensation under time delay constraint", which is essentially a linear weighted optimization of multi-objective into single objective, and the weight needs to be set in advance, which is difficult to adapt to the complex and changeable vehicle networking environment. The present application proposes a "time delay-energy consumption" multi-objective implicit coordination optimization framework. By designing the calculation priority of the remaining time and the multi-dimensional dynamic weight communication priority, the multi-objective optimization targets such as time delay constraint, energy consumption sensitivity and task urgency are implicitly embedded into the priority calculation and resource allocation strategy, and the optimal balance point is automatically learned by the agent, avoiding the difficulty of subjective setting of weight coefficient.
[0015] Compared with the "vehicle networking task offloading method based on deep reinforcement learning", the present application provides an initial offloading strategy for dependent tasks, and the present application proposes a global optimization system integrating dynamic jumping, real-time preemption and multi-objective implicit coordination, realizing the leap from "static offloading decision" to "dynamic resource coordination", and significantly improving the model completeness and optimization dimension. SUMMARY
[0016] The present application aims to overcome the shortcomings and deficiencies of the prior art, and provides an optimization method for vehicle networking edge computing task offloading and resource scheduling, which optimally allocates the additive noise of the base station to the vehicle user and optimizes the position of the movable antenna, realizes the optimization of the base station compensation cost in vehicle networking, and improves the transmission rate of the vehicle user and reduces the communication energy consumption.
[0017] To achieve the above purpose, the technical scheme adopted by the present application is:
[0018] The optimization method for vehicle networking edge computing task offloading and resource scheduling comprises the following steps:
[0019] S1: a vehicle networking task offloading and resource scheduling optimization model based on double priority and task dynamic jumping is constructed, and a target function of minimizing offloading scheduling time delay and total energy consumption is established according to the total cost of mobile vehicle task offloading and scheduling;
[0020] S2: the joint optimization problem is modeled as a Markov decision process; a deep reinforcement learning algorithm is adopted, the optimization strategy is continuously learned through the interaction between the agent and the environment, and the optimal joint strategy of each scheduling time slot is directly output, so as to realize the minimization of the total cost of the system;
[0021] S3: In each scheduling time slot, the edge server allocates communication bandwidth and computing resources for vehicle users according to the optimal communication strategy, task offloading decision and computing resource allocation scheme obtained by solving, triggers task preemption and cross-server hopping mechanism, calculates the total system delay and total energy consumption of the current time slot, and outputs the optimized system performance index.
[0022] As a preferred technical scheme of the present application: in step S1, the objective function of minimizing the weighted sum of offloading scheduling delay and total energy consumption includes:
[0023] The objective function includes two parts, namely delay cost and energy consumption cost, and the optimization problem objective function is as follows:
[0024] (1);
[0025] ;
[0026] Wherein, denotes the sum of the delay generated by offloading and scheduling of vehicle task i at time slot t on edge server m, denotes the sum of the energy consumption generated by offloading and scheduling of vehicle task i at time slot t on edge server m; denotes the weighted sum of delay and energy consumption; M denotes the total set of edge servers, and m denotes a specific edge server in the set M, denotes all vehicle tasks on edge server m, i denotes the task generated by the ith vehicle, denotes the maximum processing delay that the task i can tolerate, denotes the percentage of computing resources allocated by edge server m to vehicle task i, N denotes the total number of vehicle set within the range of edge server m, denotes the offloading decision of task i at time slot t, denotes that the task is processed locally by the vehicle, denotes that the task is offloaded to the nearest MEC server; denote the weight coefficients of speed / data volume / urgency, respectively, for controlling the influence degree of different factors on priority, denotes a neighboring service domain of the edge server, which is used to judge the feasibility of task hopping, and its neighboring server set is defined as wherein is the distance between two edge servers, is the maximum single-hop distance of the main edge server, and the preferred value is 2 times the RSU coverage radius , that is, Because this model only considers a single main server, the subscript of is omitted.
[0027] As a preferred technical solution of the present invention: In step S1, based on the vehicle network task offloading and resource scheduling optimization model with dual priorities and dynamic task jump, the local offloading model of the vehicle user is represented as follows:
[0028] (2);
[0029] (3);
[0030] This indicates the latency required for task i to be processed locally. This indicates the energy consumption required for task i to perform calculations locally. This represents the computing resources required for task i. This represents the local computing power of the mobile vehicle corresponding to task i. This represents the energy consumption of the moving vehicle corresponding to task i for one CPU cycle of computation.
[0031] Specifically, a system is constructed that includes multiple base stations, each deploying an edge server and a movable antenna, with N vehicle users.
[0032] Task transmission priority is represented as:
[0033] (4);
[0034] This represents the overall communication priority of task i, used to indicate the weight of communication resource allocation; It is divided into weighted coefficients representing speed, data volume, and urgency, used to control the degree of influence of different factors on the priority of task communication; This represents the instantaneous velocity of vehicle i in time slot t. This indicates the maximum speed allowed on the current road. This represents the amount of raw data for vehicle i in the current task within time slot t. This indicates all vehicle tasks within the same edge server service range under the current time slot t. The average data volume, i.e. This is used to eliminate deviations in the absolute value of data. This is a task urgency indicator, used to ensure the absolute priority of urgent tasks;
[0035] Task calculation priority is represented as:
[0036] (5);
[0037] This indicates the overall computational priority of task i. Let $\mathbf{i}$ be the maximum latency that task $i$ can tolerate. This represents the time that task i has been computed on the edge server. For a time smoothing term, This indicates the urgency of a task, with α being the urgency coefficient, ensuring the absolute priority of urgent tasks.
[0038] As a preferred technical solution of the present invention: In step S1, based on the vehicle network task offloading and resource scheduling optimization model with dual priority and dynamic task switching, the task preemption mechanism is as follows:
[0039] (6);
[0040] Where C is the candidate task set, representing the set of tasks that the current task can preempt. This represents the set of tasks currently running on this edge server. This indicates the maximum computing resources that the main edge server in the current time slot can provide. This represents task j, which is assumed to be preempted from computing resources. This represents the minimum computing resources required for the current task i. This represents the dynamic release ratio, used to ensure that the released resources exactly meet the needs of the new task. It is calculated as follows: If C is not an empty set, then select the candidate set C to calculate the priority. The lowest priority task j is selected, and it is determined whether the current priority of task i is higher than that of task j. If it is higher, partial preemption of the computing resources of task j is performed, and the computing power occupied by task i is released proportionally and allocated to the new task. If C is an empty set, or the computing priority of task j that needs to be preempted is higher than that of task i, the preemption phase is skipped, and task i directly enters the migration process.
[0041] Specifically, the task migration mechanism is as follows:
[0042] (7);
[0043] This indicates the cluster of adjacent edge servers to the current region's main server. , This indicates the server with the lowest load rate in the cluster. Indicates server The original computing resources, Indicates server The total amount of computing resources already used.
[0044] As a preferred technical solution of the present invention: In step S1, based on the vehicle network task offloading and resource scheduling optimization model with dual priorities and dynamic task switching, the communication resource allocation strategy in the same time slot is expressed as follows:
[0045] (8);
[0046] (9);
[0047] denotes the spectrum resource ratio allocated by the current master edge server to the vehicle task i, N denotes the set of all tasks within the range of the current master edge server, and the influence of mutual interference between different edge servers and different channels is ignored here, and only the resource allocation within the coverage range of a single server is optimized; denotes the communication priority weight of task i, denotes the sum of the communication priority weights of all tasks within the range of the edge server; denotes the actual uplink rate of the vehicle i unloading the task to the master server, W denotes the channel bandwidth of the total available spectrum of the edge server, denotes the transmission power of the vehicle i uploading the task to the RSU, denotes the noise power spectral density, denotes the channel gain of wireless propagation between the vehicle i and the edge server.
[0048] As a preferred technical solution of the present application: in step S1, based on the dual-priority and task dynamic jump vehicle networking task unloading and resource scheduling optimization model, the time delay and energy consumed by vehicle task unloading and scheduling are respectively represented as:
[0049] (10);
[0050] (11);
[0051] (12);
[0052] (13);
[0053] denotes the transmission delay of task i, denotes the uplink rate of task i uploaded to the edge server, denotes the data size of task i; denotes the transmission energy consumption of task i, denotes the upload power of the vehicle i uploading the task; denotes the computing delay of the edge server m processing the task i, denotes the computing resources required by task i, denotes the total computing resources of the edge server m, denotes the computing resource ratio allocated by the edge server m to the task i; denotes the computing energy consumption of the edge server m processing the task i, denotes the computing power of the edge server m.
[0054] As a preferred technical solution of the present application: in step S1, based on the double-priority and task dynamic jump vehicle networking task offloading and resource scheduling optimization model, in the case of task jump, the consumed delay and energy are represented as:
[0055] (14);
[0056] (15);
[0057] denotes the jump delay of the task i migration, is the exclusive channel bandwidth between edge servers, denotes the data size of the task i, denotes the signal transmission power of the edge server, denotes the channel gain between the two servers, denotes the noise power spectral density; denotes the jump energy consumption of the task i migration, denotes the signal transmission power of the edge server when performing task migration.
[0058] As a preferred technical solution of the present application: in step S1, based on the double-priority and task dynamic jump vehicle networking task offloading and resource scheduling optimization model, in the case of non-local computing, the consumed delay and energy are represented as:
[0059] (16);
[0060] (17);
[0061] denotes the total edge computing delay of the task i, denotes the transmission delay of the task i, denotes the sum of the computing delays of the edge server k processing the task i, k is the edge server where the task finally locates, is the time slice, which describes the dynamic situation that the task is interrupted and allocated with different computing resources multiple times during execution, denotes the jump delay of the task i migration; denotes the total edge computing energy consumption of the task i, denotes the transmission energy consumption of the task i, denotes the sum of the computing energy consumptions of the edge server k processing the task i, The jump energy consumption represents the task i migration, and m represents the main edge server selected by the current model.
[0062] As a preferred technical solution of the present application: in step S1, based on the double priority and task dynamic jump vehicle networking task offloading and resource scheduling optimization model, the time delay and energy consumed by the model for task offloading and resource scheduling are comprehensively represented as:
[0063] (18);
[0064] (19);
[0065] The comprehensive processing time delay of task i is represented as: The local processing time delay of task i is represented as: The edge offloading processing time delay of task i is represented as: The comprehensive processing energy consumption of task i is represented as: The local processing energy consumption of task i is represented as: The edge offloading processing energy consumption of task i is represented as: The offloading decision of task i is represented as:
[0066] As a preferred technical solution of the present application: in step S2, the Deep Q-learning algorithm in reinforcement learning is used for solving, specifically: the Deep Q-learning algorithm in reinforcement learning is used to solve the optimal joint strategy of each scheduling time slot, and the specific process is as follows:
[0067] S21, the target joint optimization problem is represented as:
[0068] (1);
[0069] ;
[0070] Wherein, The sum of the time delay generated by the offloading and scheduling of vehicle task i on edge server m at time slot t is represented as: The sum of the energy consumption generated by the offloading and scheduling of vehicle task i on edge server m at time slot t is represented as: The weighted sum of time delay and energy consumption is represented as: M represents the total set of edge servers, and m represents a specific edge server in the set M, All vehicle tasks under edge server m are represented as: The task generated by the i-th vehicle in the set is represented as: The maximum processing time delay that the task i can tolerate is represented as: denotes the percentage of computing resources allocated by edge server m to vehicle task i, N denotes the total number of vehicles within the range of edge server m, denotes the offloading decision of task i at time slot t, denotes that the task is processed locally by the vehicle, denotes that the task is offloaded to the nearest MEC server; denote the weight coefficients of speed / data volume / urgency, respectively, for controlling the degree of influence of different factors on priority, denotes a neighboring service domain of the edge server, which is used to determine the feasibility of task jumping, and defines its neighboring server set as wherein is the distance between two edge servers, is the maximum single-hop distance of the main edge server, and the preferred value is 2 times the RSU coverage radius , i.e. , because this model only considers a single main server, the subscript of is omitted;
[0071] S22, the Deep Q-learning algorithm in reinforcement learning is used to solve the problem, and the specific steps are as follows:
[0072] S221, a Markov decision process is constructed and represented as:
[0073] (20);
[0074] wherein denotes the state space, denotes the action space, denotes the immediate decision reward, denotes the state transition probability, wherein denotes
[0075] (21);
[0076] wherein denotes the set of neighboring edge servers, denotes the set of vehicle task information, denotes the set of vehicle dynamic information, including the speed vector and position vector of the vehicle,
[0077] denotes
[0078] (22);
[0079] wherein denote the weight coefficients of speed / data volume / urgency, respectively, for controlling the degree of influence of different factors on priority, denotes the offloading decision of task i at time slot t, denotes the percentage of computing resources allocated by edge server m to vehicle task i;
[0080] S222, constructing target network:
[0081] In the deep Q-learning algorithm, the main purpose of introducing the target network is to improve the stability of Q value training and alleviate the problem caused by overestimating Q value. The network updates the target Q value according to the Bellman equation, and its mathematical expression is as follows:
[0082] (23);
[0083] wherein denotes the target Q value, denotes the reward obtained by the agent at the i-th step, denotes the discount factor, denotes the action selected at the i+1-th step, is the Q value output by the target network, represents the state at the i+1-th step, is the parameter set in the target network,
[0084] S223, constructing experience replay pool:
[0085] The experience replay mechanism is used to store the historical state transition data generated in the process of interaction between the agent and the environment, and to extract batch samples from it in a random sampling manner during model training. Each step of interaction is recorded in the form of a multi-tuple as follows:
[0086] (24);
[0087] wherein represents the experience replay buffer, denotes the state at the i-th step, is the action selected by the agent at the i-th step, denotes the immediate reward obtained after executing the action , denotes the successor state, is a termination identifier used to identify whether the state is a terminal state,
[0088] In the training process of the deep reinforcement learning algorithm, the design of the loss function combines the mean square error criterion with the Bellman optimality principle to construct the loss function in the following form:
[0089] (25);
[0090] wherein, Indicated by The training loss is for the parameters. For mathematical expectation operators, For the transfer samples sampled from the experience cache, This represents the target Q-value calculated through the target network. This represents the current Q-network's estimated output for the state and action;
[0091] S224, Construction Greedy strategy:
[0092] In the action selection mechanism of the deep Q-learning algorithm, the following is adopted: A greedy strategy aims to achieve an effective balance between exploration and exploitation, and this strategy uses probability... Randomly selecting actions enhances the exploration of potential environmental behaviors; simultaneously, using probability... Choosing the action with the maximum Q value in the current state to achieve optimal utilization of existing knowledge can be expressed in the following form:
[0093] (26);
[0094] (27);
[0095] in This represents the action selected in step i. This represents a uniform distribution in action space A. This represents the exploration probability hyperparameter. This represents the current Q-network's estimated output regarding the state and action. This represents the action that produces the maximum Q value. To select the function for this action,
[0096] In the exploration-exploitation balancing strategy of reinforcement learning, a linear decay mechanism is used to dynamically adjust the exploration rate parameter to achieve the goal of sufficient exploration in the early stage of training and stable exploitation in the later stage. This mechanism can be expressed in the following mathematical form:
[0097] (28);
[0098] in This represents the exploration rate value during the i-th training iteration. Indicates the largest value, Represents the smallest value, This is the current training step number. This indicates the preset total number of training steps.
[0099] Compared with the prior art, the application has the beneficial effects that:
[0100] The application establishes a joint optimization function taking minimizing the total time delay and total energy consumption of the system as the target by constructing a vehicle networking edge computing system model combining the task jump mechanism and the double priority scheduling. BRIEF DESCRIPTION OF DRAWINGS
[0101] Figure 1 is a flow chart of the optimization method of vehicle networking edge computing task offloading and resource scheduling;
[0102] Figure 2 is a schematic diagram of the optimization system of vehicle networking task offloading and resource scheduling;
[0103] Figure 3 is a comparison chart of the double priority dynamic jump algorithm and the greedy allocation algorithm, the uniform allocation algorithm and the random allocation algorithm in the system total cost aspect;
[0104] Figure 4 is a communication energy consumption comparison chart of the algorithm and the fixed resource scheduling algorithm and the random scheduling algorithm. DETAILED DESCRIPTION
[0105] The application will be further described in detail below in combination with the drawings and specific embodiments:
[0106] As shown in Figure 1 , the embodiment provides an optimization method of vehicle networking edge computing task offloading and resource scheduling, including the following steps:
[0107] S1: a vehicle networking task offloading and resource scheduling optimization model based on double priority and task dynamic jump is constructed, and a target function minimizing the offloading scheduling time delay and total energy consumption is established according to the total cost of mobile vehicle task offloading and scheduling;
[0108] S2: the joint optimization problem is modeled as a Markov decision process; a DeepQ-learning algorithm in deep reinforcement learning is adopted to continuously learn and optimize the strategy through the interaction between the agent and the environment, and the optimal joint strategy of each scheduling time slot is directly outputted, so as to realize the minimization of the system total cost;
[0109] S3: In each scheduling time slot, the edge server allocates communication bandwidth and computing resources to the vehicle user according to the optimal communication strategy, task offloading decision and computing resource allocation scheme obtained by solving, triggers the task preemption and cross-server hopping mechanism, calculates the total system delay and total energy consumption of the current time slot, and outputs the optimized system performance index.
[0110] The method of the embodiment realizes the minimization of the total cost of the vehicle networking edge computing system and significantly improves the task completion rate and reduces the system communication energy consumption through the joint optimization of the vehicle user priority scheduling and task dynamic hopping.
[0111] In step S1, the target function of minimizing the weighted sum of offloading scheduling delay and total energy consumption includes:
[0112] The target function includes two parts, namely delay cost and energy consumption cost, and the optimization problem target function is as follows:
[0113] (1);
[0114] ;
[0115] wherein, denotes the sum of the delay generated by offloading and scheduling of the vehicle task i at time slot t on the edge server m, denotes the sum of the energy consumption generated by offloading and scheduling of the vehicle task i at time slot t on the edge server m; denotes the weighted sum of delay and energy consumption; M denotes the total set of edge servers, and m denotes a specific edge server in the set M, denotes all vehicle tasks under the edge server m, and i denotes the task generated by the ith vehicle in the set, denotes the maximum processing delay that the task i can tolerate, denotes the percentage of computing resources allocated by the edge server m to the vehicle task i, and N denotes the total number of vehicles in the range of the edge server m, denotes the offloading decision of the task i at time slot t, denotes that the task is processed by the vehicle locally, denotes that the task is offloaded to the nearest MEC server; denote the weight coefficients of speed / data volume / urgency, respectively, for controlling the influence degree of different factors on the priority, denotes a neighboring service domain of the edge server, which is used to judge the feasibility of task hopping, and the neighboring server set thereof is defined as wherein, is the distance between two edge servers, The maximum single-hop distance for the primary edge server is preferably twice the RSU coverage radius. ,Right now Since this model only considers a single master server, it is omitted. subscript;
[0116] In step S1, based on the vehicle-to-everything (V2X) task offloading and resource scheduling optimization model with dual priorities and dynamic task switching, the local offloading model for vehicle users can be represented as:
[0117] (2);
[0118] (3);
[0119] This indicates the latency required for task i to be processed locally. This indicates the energy consumption required for task i to perform calculations locally. This represents the computing resources required for task i. This represents the local computing power of the mobile vehicle corresponding to task i. This represents the energy consumption of the moving vehicle corresponding to task i for one CPU cycle of computation.
[0120] Specifically, a system is constructed that includes multiple base stations, each deploying an edge server and a movable antenna, with N vehicle users.
[0121] Task transmission priority is represented as:
[0122] (4);
[0123] This represents the overall communication priority of task i, used to indicate the weight of communication resource allocation; It is divided into weighted coefficients representing speed, data volume, and urgency, used to control the degree of influence of different factors on the priority of task communication; This represents the instantaneous velocity of vehicle i in time slot t. This indicates the maximum speed allowed on the current road. This represents the amount of raw data for vehicle i in the current task within time slot t. This indicates all vehicle tasks within the same edge server service range under the current time slot t. The average data volume, i.e. This is used to eliminate deviations in the absolute value of data. This is a task urgency indicator, used to ensure the absolute priority of urgent tasks (such as collision warnings).
[0124] The task offloading and resource scheduling optimization model based on double priority and task dynamic jump of the vehicle networking can be expressed as:
[0125] (5);
[0126] Pi represents a comprehensive calculation priority of the task i, TLi represents a maximum time delay that can be tolerated by the task i, Ti represents a time that the task i has been calculated on the edge server, is a time smoothing term, is a task urgency identifier, and a is an urgency coefficient, which ensures absolute priority of an urgent task.
[0127] Now, related researches mostly adopt a single priority to coordinate bandwidth and calculation resources, but in practice, the constraint characteristics of the two types of resources are different, so the application proposes a double priority mechanism of and , which decouples transmission and calculation, is more in line with the physical layer characteristics, and has technical rationality. At the same time, the traditional scheme only considers static calculation amount , while the design of the application introduces dynamic residual time perception, which is more suitable for the delay-sensitive scene of vehicle networking; through time window isolation, conflicts are avoided, and tasks with high transmission priority can naturally enter the calculation queue earlier, forming an invisible synergy.
[0128] In step S1, the task offloading and resource scheduling optimization model based on double priority and task dynamic jump of the vehicle networking is as follows:
[0129] (6);
[0130] wherein C is a candidate task set, representing a task set that can be preempted by the current task, represents a task set currently running on the edge server, represents a maximum calculation resource that can be provided by the main edge server in the current time slot, represents a task j that is assumed to be preempted, represents a minimum calculation resource required by the current task i, represents a dynamic release ratio, which is used to ensure that the released resource just meets the demand of the new task, and is calculated as if C is not an empty set, the calculation priority The lowest priority task j is selected, and it is determined whether the current priority of task i is higher than that of task j. If it is higher, partial preemption of the computing resources of task j is performed, and the computing power occupied by task i is released proportionally and allocated to the new task. If C is an empty set, or the computing priority of task j that needs to be preempted is higher than that of task i, the preemption phase is skipped, and task i directly enters the migration process.
[0131] Specifically, the task migration mechanism is as follows:
[0132] (7);
[0133] This indicates the cluster of adjacent edge servers to the current region's main server. , This indicates the server with the lowest load rate in the cluster. Indicates server The original computing resources, Indicates server The total computing resources already used. The first formula selects the nearest server with the lowest load rate, rather than the server with the lowest absolute load, which better reflects the relative load pressure between servers and achieves load balancing. Note that at this time, the vehicle still offloads local tasks to its corresponding master server. Whether the task is migrated is determined and implemented by that server. The communication bandwidth between edge servers is fixed by default, that is, the communication speed between servers is constant.
[0134] In step S1, based on the vehicle-to-everything (V2X) task offloading and resource scheduling optimization model with dual priorities and dynamic task switching, the communication resource allocation strategy in the same time slot can be expressed as:
[0135] (8);
[0136] (9);
[0137] This represents the proportion of spectrum resources currently allocated by the main edge server to vehicle task i, and N represents the set of all tasks within the current main edge server's coverage area. Here, the impact of mutual interference between different edge servers and different channels is ignored, and resource allocation within the coverage area of a single server is optimized only. This represents the communication priority weight of task i. This represents the sum of communication priority weights for all tasks within the scope of this edge server; W represents the actual uplink rate at which vehicle i offloads tasks to the master server, and W represents the channel bandwidth of the total available spectrum for the edge servers. This indicates the transmit power of vehicle i when uploading tasks to the RSU. denotes the noise power spectral density, denotes the channel gain of wireless propagation between vehicle i and edge server.
[0138] In step S1, based on the vehicle networking task offloading and resource scheduling optimization model with double priority and task dynamic jump, the consumed delay and energy of vehicle task offloading and scheduling can be represented as:
[0139] (10);
[0140] (11);
[0141] (12);
[0142] (13);
[0143] denotes the transmission delay of task i, denotes the uplink rate of task i uploaded to the edge server, denotes the data size of task i; denotes the transmission energy consumption of task i, denotes the upload power when vehicle i uploads the task; denotes the computing delay of edge server m processing task i, denotes the computing resource required by task i, denotes the total computing resource of edge server m, denotes the computing resource ratio of edge server m allocated to task i; denotes the computing energy consumption of edge server m processing task i, denotes the computing power of edge server m.
[0144] In step S1, based on the vehicle networking task offloading and resource scheduling optimization model with double priority and task dynamic jump, in the case of task jump, the consumed delay and energy can be represented as:
[0145] (14);
[0146] (15);
[0147] denotes the jump delay of task i migration, is the exclusive channel bandwidth between edge servers, denotes the data size of task i, denotes the signal transmission power of edge server, denotes the channel gain between the two servers, denotes the noise power spectral density; denotes the transition energy consumption of task i when migration occurs, denotes the signal transmission power of the edge server when task migration is performed.
[0148] In step S1, based on the double-priority and task dynamic jump vehicle networking task offloading and resource scheduling optimization model, the consumed time delay and energy in the case of non-local computing can be represented as:
[0149] (16);
[0150] (17);
[0151] denotes the total edge computing delay of task i, denotes the transmission delay of task i, denotes the sum of the computing delay of the edge server k processing task i, k is the edge server where the task finally locates, is the time slice, which describes the dynamic situation that the task is interrupted and allocated with different computing resources multiple times during execution, denotes the transition delay of task i when migration occurs; denotes the total edge computing energy consumption of task i, denotes the transmission energy consumption of task i, denotes the sum of the computing energy consumption of the edge server k processing task i, denotes the transition energy consumption of task i when migration occurs, m denotes the main edge server selected by the current model.
[0152] In step S1, based on the double-priority and task dynamic jump vehicle networking task offloading and resource scheduling optimization model, the consumed time delay and energy in the case of non-local computing can be represented as:
[0153] (18);
[0154] (19);
[0155] denotes the comprehensive processing delay of task i, denotes the local processing delay of task i, denotes the edge offloading processing delay of task i; denotes the comprehensive processing energy consumption of task i, denotes the local processing energy consumption of task i, denotes the edge offloading processing energy consumption of task i; denotes the offloading decision of task i.
[0156] In step S2, the Deep Q-learning algorithm in reinforcement learning is used for solving, specifically: using the Deep Q-learning algorithm in reinforcement learning to solve the optimal joint strategy of each scheduling time slot, the specific process is as follows:
[0157] S21, the target joint optimization problem is represented as:
[0158] (1);
[0159] ;
[0160] Wherein, represents the sum of the delay generated by the vehicle task i unloading and scheduling at time slot t on the edge server m, represents the sum of the energy consumption generated by the vehicle task i unloading and scheduling at time slot t on the edge server m; represents the weighted sum of delay and energy consumption; M represents the total set of edge servers, and m represents a specific edge server in the set M, represents all vehicle tasks under the edge server m, i represents the task generated by the i-th vehicle in the middle, represents the maximum processing delay that the task i can tolerate, represents the percentage of computing resources allocated by the edge server m to the vehicle task i, N represents the total number of vehicle sets within the edge server m, represents the unloading decision of task i at time slot t, represents that the task is processed locally by the vehicle, represents that the task is unloaded to the nearest MEC server; respectively represent the weight coefficients of speed / data volume / emergency degree, used to control the influence degree of different factors on priority, represents a neighboring service domain of the edge server, used to judge the feasibility of task jumping, and the neighboring server set thereof is defined as , wherein is the distance between two edge servers, is the maximum single-hop distance of the main edge server, and the preferred value is 2 times the RSU coverage radius , that is, , because this model only considers a single main server, the subscript of is omitted;
[0161] S22, the Deep Q-learning algorithm in reinforcement learning is used to solve the problem, and the specific steps are as follows:
[0162] S221, a Markov decision process is constructed and represented as:
[0163] (20);
[0164] wherein denotes the state space, denotes the action space, denotes the immediate decision reward, denotes the state transition probability, wherein is represented as:
[0165] (21);
[0166] wherein denotes the set of adjacent edge servers, denotes the set of vehicle task information, denotes the set of vehicle dynamic information, including the speed vector and the position vector of the vehicle,
[0167] is represented as:
[0168] (22);
[0169] wherein denote the weight coefficients of speed / data volume / urgency, respectively, for controlling the degree of influence of different factors on the priority, denotes the offloading decision of task i at time slot t, denotes the percentage of computing resources allocated by edge server m to vehicle task i;
[0170] S222, a target network is constructed:
[0171] In the deep Q-learning algorithm, the main purpose of introducing the target network is to improve the stability of Q value training and alleviate the problems caused by overestimating Q values. The network updates the target Q value according to the Bellman equation, and its mathematical expression is as follows:
[0172] (23);
[0173] wherein denotes the target Q value, denotes the reward obtained by the agent at the i-th step, denotes the discount factor, denotes the action selected at the i+1-th step, is the Q value output by the target network, represents the state at the i+1-th step, is the parameter set in the target network,
[0174] S223, Constructing experience replay pool:
[0175] The experience replay mechanism is a core design in deep Q-learning algorithm, which is mainly used to store the historical state transition data generated in the process of interaction between the agent and the environment, and to extract batch samples from it in a random sampling manner during model training. This mechanism records each step of interaction as a tuple in the form of:
[0176] (24);
[0177] Wherein represents the experience replay buffer, represents the state at the i-th step, is the action selected by the agent at the i-th step, represents the immediate reward obtained after executing the action , and represents the successor state, is a termination identifier used to identify whether the state is a terminal state,
[0178] In the training process of deep reinforcement learning algorithm, the design of loss function has a key impact on the performance of the model. This method combines the mean square error criterion with the Bellman optimality principle to construct a loss function in the form of:
[0179] (25);
[0180] Wherein, represents the training loss with as the parameter, is the mathematical expectation operator, is the transition sample sampled from the experience buffer, represents the target Q value calculated by the target network, represents the estimation output of the current Q network for the state and action;
[0181] S224, Constructing greedy policy:
[0182] In the action selection mechanism of deep Q-learning algorithm, a greedy policy is adopted to achieve an effective balance between exploration and utilization. This policy randomly selects an action with a probability , thereby enhancing the exploration of potential behaviors of the environment; at the same time, it selects the action with the maximum Q value in the current state with a probability , thereby achieving optimal utilization of existing knowledge, and its decision-making process can be expressed in the form of:
[0183] (26);
[0184] (27);
[0185] wherein represents the action selected at the i-th step, represents a uniform distribution over the action space A, represents the exploration probability hyperparameter, represents the current Q-network's estimated output for a state and action, represents the action that yields the maximum Q-value, is a function that selects this action,
[0186] In the exploration-exploitation balance strategy of reinforcement learning, a linear decay mechanism is usually used to dynamically adjust the exploration rate parameter to achieve the goal of sufficient exploration in the early stage of training and stable exploitation in the later stage. This mechanism can be expressed in mathematical form as follows
[0187] (28);
[0188] wherein represents the exploration rate value at the i-th training iteration, represents the maximum value, represents the minimum value, is the current training step number, represents the preset total training step number.
[0189] Figure 3 is a comparison chart of the total system cost of the double-priority dynamic jump algorithm and the greedy allocation algorithm, the uniform allocation algorithm, and the random allocation algorithm proposed in the application. Figure 4 is a communication energy consumption comparison chart of the algorithm proposed in the application and the fixed resource scheduling algorithm and the random scheduling algorithm. From Figure 3 it can be seen that the algorithm proposed in the application significantly reduces the total system running cost through intelligent priority scheduling and cross-server resource coordination, and its performance is significantly better than the traditional greedy strategy, uniform allocation, and random offloading method. From Figure 4 it can be seen that the algorithm proposed in the application effectively optimizes the communication energy consumption efficiency through the dynamic resource allocation and task jump mechanism, and exhibits a significant energy consumption advantage compared with the fixed scheduling and random scheduling scheme.
[0190] The embodiment constructs a task offloading and resource scheduling optimization model based on double priority and task dynamic jump of Internet of Vehicles, establishes a joint optimization objective function of minimizing total system delay and total energy consumption according to a computing model, a communication model, quality of service requirements and system energy consumption of a vehicle task, intelligently perceives an environment state through a deep reinforcement learning algorithm, dynamically outputs an optimal communication priority strategy, a task offloading decision and a computing resource allocation scheme, and triggers a task preemption and server jump mechanism, finally realizes minimization of global cost of an Internet of Vehicles edge computing system, significantly improves completion rate of high-priority tasks, and reduces system communication energy consumption.
[0191] As shown in Figure 2 The embodiment also provides a task offloading and resource scheduling optimization system of Internet of Vehicles, which comprises:
[0192] A construction module is configured to construct a task offloading and resource scheduling model based on double priority and task dynamic jump of Internet of Vehicles, and establish a target function of minimizing offloading and scheduling delay and total energy consumption according to total cost of mobile vehicle task offloading and scheduling;
[0193] A joint optimization module is configured to obtain an optimal joint strategy, model the joint optimization problem as a Markov decision process, and directly output an optimal joint strategy of each scheduling time slot by continuously learning and optimizing the strategy through interaction between an agent and an environment by using a Deep Q-learning algorithm in deep reinforcement learning, so as to realize minimization of total system cost.
[0194] A task preemption migration module is configured to optimize system performance indicators, allocate communication bandwidth and computing resources to vehicle users and trigger a task preemption and cross-server jump mechanism for the vehicle users according to the optimal communication strategy, the task offloading decision and the computing resource allocation scheme obtained by solving, calculate total system delay and total energy consumption of a current time slot, and output optimized system performance indicators.
[0195] Preferably, the construction module establishes a target function of minimizing a weighted sum of offloading and scheduling delay and total energy consumption.
[0196] The target function comprises two parts, namely delay cost and energy consumption cost, and the optimization problem target function is as follows:
[0197] (1);
[0198] ;
[0199] Wherein, denotes a sum of delay generated by offloading and scheduling of a vehicle task i at an edge server m in a time slot t, denotes the sum of energy consumption caused by the offloading and scheduling of vehicle task i at edge server m in time slot t; denotes the weighted sum of latency and energy consumption; M denotes the total set of edge servers, and m denotes a specific edge server in set M, denotes all vehicle tasks at edge server m, and i denotes the task generated by the ith vehicle, denotes the maximum processing latency that task i can tolerate, denotes the percentage of computing resources allocated by edge server m to vehicle task i, and N denotes the total number of vehicles within the range of edge server m, denotes the offloading decision of task i in time slot t, denotes that the task is processed locally by the vehicle, denotes that the task is offloaded to the nearest MEC server; denotes the weight coefficient of speed / data volume / urgency, respectively, for controlling the influence degree of different factors on priority, denotes a neighboring service domain of the edge server, which is used to judge the feasibility of task jumping, and defines its neighboring server set as wherein is the distance between two edge servers, is the maximum single-hop distance of the main edge server, and the preferred value is 2 times the RSU coverage radius , i.e. because the model only considers a single main server, the subscript of is omitted;
[0200] The Deep Q-learning algorithm in reinforcement learning is used to solve the objective function of the sub-problem, and the optimized offloading decision and communication and computing resource allocation decision are obtained.
[0201] The specific implementation process of the functions realized by each module in the vehicle networking task offloading and resource scheduling optimization system in the embodiment is the same as the implementation process in the vehicle networking task offloading and resource scheduling optimization method, and will not be repeated here.
[0202] The above only describes the preferred embodiments of the present application, and does not limit the protection scope of the present application, and any equivalent structural transformation made according to the content of the present application specification and drawings, or direct / indirect application in other related technical fields is included in the patent protection scope of the present application.
Claims
1. An optimization method for task offloading and resource scheduling in vehicle-to-everything (V2X) edge computing, characterized in that, Includes the following steps: S1: Construct an optimization model for vehicle network task offloading and resource scheduling based on dual priority and dynamic task jump. Based on the total cost of mobile vehicle task offloading and scheduling, establish an objective function to minimize offloading and scheduling latency and total energy consumption. In step S1, based on the vehicle-to-everything (V2X) task offloading and resource scheduling optimization model with dual priorities and dynamic task switching, the local offloading model for vehicle users is represented as follows: (2); (3); This indicates the latency required for task i to be processed locally. This indicates the energy consumption required for task i to perform calculations locally. This represents the computing resources required for task i. This represents the local computing power of the mobile vehicle corresponding to task i. This represents the energy consumption of the moving vehicle corresponding to task i for one CPU cycle of computation. Specifically, a system is constructed that includes multiple base stations, each deploying an edge server and a movable antenna, with N vehicle users. Task transmission priority is represented as: (4); This represents the overall communication priority of task i, used to indicate the weight of communication resource allocation; It is divided into weighted coefficients representing speed, data volume, and urgency, used to control the degree of influence of different factors on the priority of task communication; This represents the instantaneous velocity of vehicle i in time slot t. This indicates the maximum speed allowed on the current road. This represents the amount of raw data for vehicle i in the current task within time slot t. This indicates all vehicle tasks within the same edge server service range under the current time slot t. The average data volume, i.e. This is used to eliminate deviations in the absolute value of data. This is a task urgency indicator, used to ensure the absolute priority of urgent tasks; Task calculation priority is represented as: (5); This indicates the overall computational priority of task i. Let $\mathbf{i}$ be the maximum latency that task $i$ can tolerate. This represents the time that task i has been computed on the edge server. For a time smoothing term, This indicates the urgency of a task, with α being the urgency coefficient, ensuring the absolute priority of urgent tasks. In step S1, based on the vehicle-to-everything (V2X) task offloading and resource scheduling optimization model with dual priority and dynamic task switching, the task preemption mechanism is as follows: (6); Where C is the candidate task set, representing the set of tasks that the current task can preempt. This represents the set of tasks currently running on this edge server. This indicates the maximum computing resources that the main edge server in the current time slot can provide. This represents task j, which is assumed to be preempted from computing resources. This represents the minimum computing resources required for the current task i. This represents the dynamic release ratio, used to ensure that the released resources exactly meet the needs of the new task. It is calculated as follows: If C is not an empty set, then select the candidate set C to calculate the priority. The lowest priority task j is selected, and it is determined whether the current priority of task i is higher than that of task j. If it is higher, partial preemption of the computing resources of task j is performed, and the computing power occupied by task i is released proportionally and allocated to the new task. If C is an empty set, or the computing priority of task j that needs to be preempted is higher than that of task i, the preemption phase is skipped, and task i directly enters the migration process. Specifically, the task migration mechanism is as follows: (7); This indicates the cluster of adjacent edge servers to the current region's main server. , This indicates the server with the lowest load rate in the cluster. Indicates server The original computing resources, Indicates server The total amount of computing resources already in use; S2: The joint optimization problem is modeled as a Markov decision process; a deep reinforcement learning algorithm is used to continuously learn optimization strategies through the interaction between the agent and the environment, and directly output the optimal joint strategy for each scheduling slot, thereby minimizing the total system cost. S3: In each scheduling time slot, the edge server allocates communication bandwidth and computing resources to vehicle users based on the optimal communication strategy, task offloading decision and computing resource allocation scheme obtained from the solution, and triggers task preemption and cross-server jump mechanism, calculates the total system latency and total energy consumption of the current time slot, and outputs the optimized system performance indicators.
2. The optimization method for offloading and scheduling edge computing tasks in the Internet of Vehicles (IoV) according to claim 1, characterized in that, In step S1, the objective function for minimizing the weighted sum of offloading scheduling delay and total energy consumption includes: The objective function consists of two parts: latency cost and energy consumption cost. The objective function for the optimization problem is shown below: (1); ; in, This represents the sum of latency incurred by vehicle task i during time slot t for unloading and scheduling on edge server m. This represents the sum of energy consumption generated by vehicle task i being unloaded and scheduled in time slot t on edge server m; This represents the weighted sum of latency and energy consumption; M represents the total set of edge servers, and m represents a specific edge server in set M. This represents all vehicle tasks under edge server m, where i represents... The task generated by the i-th vehicle. This indicates the maximum processing latency that task i can tolerate. This represents the percentage of computing resources allocated to vehicle task i by edge server m, where N represents the total number of vehicles within the range of edge server m. This represents the offloading decision for task i in time slot t. This indicates that the task is processed locally on the vehicle. This indicates that the task will be unloaded to the nearest MEC server; These represent weighting coefficients for speed, data volume, and urgency, used to control the degree of influence of different factors on priority. This represents a neighboring service domain of the edge server, used to determine the feasibility of task redirection. Its set of neighboring servers is defined as follows: ,in The distance between the two edge servers. The maximum single-hop distance for the primary edge server is twice the RSU coverage radius. ,Right now Since this model only considers a single master server, it is omitted. The subscript.
3. The optimization method for offloading and scheduling edge computing tasks in the Internet of Vehicles (IoV) according to claim 1, characterized in that, In step S1, based on the vehicle-to-everything (V2X) task offloading and resource scheduling optimization model with dual priorities and dynamic task switching, the communication resource allocation strategy in the same time slot is expressed as: (8); (9); This represents the proportion of spectrum resources currently allocated by the main edge server to vehicle task i, and N represents the set of all tasks within the current main edge server's coverage area. Here, the impact of mutual interference between different edge servers and different channels is ignored, and resource allocation within the coverage area of a single server is optimized only. This represents the communication priority weight of task i. This represents the sum of communication priority weights for all tasks within the scope of this edge server; W represents the actual uplink rate at which vehicle i offloads tasks to the master server, and W represents the channel bandwidth of the total available spectrum for the edge servers. This indicates the transmit power of vehicle i when uploading tasks to the RSU. Represents the noise power spectral density. This represents the channel gain for wireless propagation between vehicle i and the edge server.
4. The optimization method for offloading and scheduling edge computing tasks in the Internet of Vehicles (IoV) according to claim 1, characterized in that, In step S1, based on the vehicle-to-everything (V2X) task offloading and resource scheduling optimization model with dual priorities and dynamic task switching, the latency and energy consumed by vehicle task offloading and scheduling are expressed as follows: (10); (11); (12); (13); This represents the transmission delay of task i. This represents the upload rate of task i to the edge server. Indicates the amount of data in task i; Indicates the transmission power consumption of task i. This indicates the upload power of vehicle i when it uploads a task; This represents the computation latency of edge server m in processing task i. This represents the computing resources required for task i. This represents the total computing resources of edge server m. This represents the ratio of computing resources allocated to task i by edge server m; This represents the computational energy consumption of edge server m in processing task i. This represents the computing power of edge server m.
5. The optimization method for offloading and scheduling edge computing tasks in the Internet of Vehicles (IoV) according to claim 1, characterized in that, In step S1, the vehicle-to-everything (V2X) task offloading and resource scheduling optimization model based on dual priority and dynamic task switching expresses the latency and energy consumed when a task switching occurs as follows: (14); (15); This indicates the jump delay when task i migrates. This refers to the channel bandwidth exclusively used between edge servers. This indicates the size of the data in task i. This indicates the signal transmission power of the edge server. This represents the channel gain between the two servers. Indicates the noise power spectral density; This represents the energy consumption of the jump when task i migrates. This indicates the signal transmission power when the edge server performs task migration.
6. The optimization method for offloading and scheduling edge computing tasks in the Internet of Vehicles (IoV) according to claim 1, characterized in that, In step S1, the latency and energy consumed by the vehicle-to-everything (V2X) task offloading and resource scheduling optimization model based on dual priority and dynamic task switching, under non-local computation conditions, are expressed as follows: (16); (17); This represents the total edge computation latency of task i. This represents the transmission delay of task i. This represents the sum of computation latency for edge server k in processing task i, where k is the final edge server where the task resides. It refers to a time slice, which describes the dynamic situation where a task is interrupted multiple times and allocated different computing resources multiple times during execution. This indicates the jump delay when task i undergoes a migration; This represents the total edge computing energy consumption of task i. This represents the transmission power consumption of task i. This represents the sum of computational energy consumption of edge server k in processing task i. This represents the jump energy consumption when task i migrates, and m represents the main edge server selected by the current model.
7. The optimization method for offloading and scheduling edge computing tasks in the Internet of Vehicles (IoV) according to claim 1, characterized in that, In step S1, based on the vehicle-to-everything (V2X) task offloading and resource scheduling optimization model with dual priorities and dynamic task switching, the time and energy consumed by this model for task offloading and resource scheduling are comprehensively expressed as follows: (18); (19); This represents the overall processing latency of task i. This represents the local processing latency of task i. This indicates the edge unloading processing latency for task i; This represents the total processing energy consumption of task i. This represents the local processing power consumption of task i. This indicates the energy consumption of edge offloading processing for task i; This represents the unloading decision for task i.
8. The optimization method for task offloading and resource scheduling in vehicle-to-everything (V2X) edge computing as described in claim 1, characterized in that, In step S2, the Deep Q-learning algorithm from reinforcement learning is used to solve the problem. Specifically, the Deep Q-learning algorithm is used to solve for the optimal joint policy for each scheduling slot. The specific process is as follows: S21. The joint optimization problem of the objectives is expressed as: (1); ; in, This represents the sum of latency incurred by vehicle task i during time slot t for unloading and scheduling on edge server m. This represents the sum of energy consumption generated by vehicle task i being unloaded and scheduled in time slot t on edge server m; This represents the weighted sum of latency and energy consumption; M represents the total set of edge servers, and m represents a specific edge server in set M. This represents all vehicle tasks under edge server m, where i represents... The task generated by the i-th vehicle. This indicates the maximum processing latency that task i can tolerate. This represents the percentage of computing resources allocated to vehicle task i by edge server m, where N represents the total number of vehicles within the range of edge server m. This represents the offloading decision for task i in time slot t. This indicates that the task is processed locally on the vehicle. This indicates that the task will be unloaded to the nearest MEC server; These represent weighting coefficients for speed, data volume, and urgency, used to control the degree of influence of different factors on priority. This represents a neighboring service domain of the edge server, used to determine the feasibility of task redirection. Its set of neighboring servers is defined as follows: ,in The distance between the two edge servers. The maximum single-hop distance for the primary edge server is twice the RSU coverage radius. ,Right now Since this model only considers a single master server, it is omitted. subscript; S22. The Deep Q-learning algorithm from reinforcement learning is used to solve the problem. The specific steps are as follows: S221. The Markov decision process is represented as follows: (20); in Representing the state space, Represents the action space, Indicates immediate decision-making rewards. Denotes the state transition probability, where Represented as: (21); in Represents a set of nearby edge servers. This represents a set of vehicle task information. This represents a set of vehicle dynamic information, including the vehicle's velocity vector and position vector. Represented as: (22); in These represent weighting coefficients for speed, data volume, and urgency, used to control the degree of influence of different factors on priority. This represents the offloading decision for task i in time slot t. This represents the percentage of computing resources allocated by edge server m to vehicle task i. S222, Construct the target network: In deep Q-learning algorithms, the main purpose of introducing a target network is to improve the stability of Q-value training and alleviate the problem caused by overestimating the Q-value. This network updates the target Q-value based on the Bellman equation, the mathematical expression of which is as follows: (23); in Indicates the target Q value. This represents the reward obtained by the agent in step i. Indicates the discount factor. This indicates the action selected in step i+1. The Q value output by the target network. This represents the state at step i+1. This is the set of parameters in the target network. S223. Construct an experience replay pool: The experience replay mechanism is used to store historical state transition data generated during the interaction between the agent and the environment, and to extract batch samples from it during the model training phase using random sampling. This mechanism represents each interaction record in the following tuple form: (24); in Represents the experience replay cache. This represents the state at step i. It is the action chosen by the agent at step i. Indicates the execution of an action The instant reward obtained afterward Indicates the successor state. This is a termination identifier used to indicate whether the state is a termination state. In the training process of deep reinforcement learning algorithms, the loss function is designed by combining the mean squared error criterion and the Bellman optimality principle, and is constructed as follows: (25); in, Indicated by The training loss is for the parameters. For mathematical expectation operators, For the transfer samples sampled from the experience cache, This represents the target Q-value calculated through the target network. This represents the current Q-network's estimated output for the state and action; S224, Construction Greedy strategy: In the action selection mechanism of the deep Q-learning algorithm, the following is adopted: - A greedy strategy aims to achieve an effective balance between exploration and exploitation, using probability... Randomly selected actions enhance the exploration of potential environmental behaviors; simultaneously, actions are selected with a probability of 1- Choosing the action with the maximum Q value in the current state to achieve optimal utilization of existing knowledge can be expressed in the following form: (26); (27); in This represents the action selected in step i. This represents a uniform distribution in action space A. This represents the exploration probability hyperparameter. This represents the current Q-network's estimated output regarding the state and action. This represents the action that produces the maximum Q value. To select the function for this action, In the exploration-exploitation balancing strategy of reinforcement learning, a linear decay mechanism is used to dynamically adjust the exploration rate parameter to achieve the goal of sufficient exploration in the early stage of training and stable exploitation in the later stage. This mechanism can be expressed in the following mathematical form: (28); in This represents the exploration rate value during the i-th training iteration. Indicates the largest value, Represents the smallest value, This is the current training step number. This indicates the preset total number of training steps.
Citation Information
Patent Citations
RSU auxiliary multi-hop task unloading method based on asynchronous deep reinforcement learning
CN119996446A
Method of optimizing dependent task offloading in internet of vehicles using deep reinforcement learning
US12399756B2
Multi-target joint optimization task unloading strategy based on deep reinforcement learning in Internet of Vehicles
CN116321298A
Task scheduling and resource allocation method based on federal reinforcement learning in Internet of Vehicles
CN116709378A