Vehicle-mounted edge computing task scheduling method and device based on double time scales
By introducing a dual-timescale vehicle edge computing task scheduling method, combined with deep reinforcement learning and heuristic algorithms, the problems of model deployment delay and resource consumption under the single-timescale framework are solved, and the efficient and stable operation of the vehicle edge computing system is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGDONG UNIV OF TECH
- Filing Date
- 2025-12-10
- Publication Date
- 2026-04-21
AI Technical Summary
In existing technologies for vehicle-mounted edge computing, the single-time-scale task offloading framework leads to model deployment delays and resource consumption issues, making it difficult to balance decision-making efficiency with changes in the dynamic environment, resulting in unstable system performance.
A dual-timescale on-vehicle edge computing task scheduling method is adopted. It performs joint optimization of model deployment and task scheduling through long-term deep reinforcement learning, and uses heuristic algorithms for task scheduling in short-term time periods, thus decoupling the high-overhead model deployment and low-overhead task scheduling.
It significantly reduces the total latency of task inference, improves the efficiency of system resource utilization and the stability of long-term operation, and achieves coordinated optimization of performance, energy efficiency and robustness in dynamic vehicle networking environment.
Smart Images

Figure CN121900892A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of edge computing, and in particular to a method and apparatus for scheduling vehicle-mounted edge computing tasks based on dual time scales. Background Technology
[0002] In the field of intelligent transportation, the application of deep learning (DNN) models to vehicle-to-everything (V2X) scenarios hinges on providing efficient and reliable DNN inference services for various in-vehicle intelligent services. However, in this dynamic environment, achieving rapid response to inference requests has become a major challenge in ensuring service quality.
[0003] Currently, edge computing-based task offloading technology provides a feasible path to reduce task inference latency by offloading vehicle computing tasks to roadside units (RSUs). Against this backdrop, some technical solutions have begun to adopt a single-timescale joint decision-making framework, which synchronously and dynamically adjusts the model deployment and task offloading strategies of roadside units based on real-time task requests. However, this framework has drawbacks. Model deployment, especially downloading large DNN models from the cloud to roadside units, is a high-overhead operation involving significant network transmission and storage writes. At a single timescale, frequent model deployment and replacement to meet dynamic task demands leads to two major drawbacks: First, inference tasks must wait for the lengthy model download and loading process to complete before execution, making deployment latency a system bottleneck; second, frequent deployment operations continuously consume roadside unit storage I / O, computing resources, and link bandwidth, crowding out resources required for actual inference tasks and causing overall system performance instability. The single-timescale framework also has problems with setting the decision cycle: if the decision cycle is too long, the system cannot effectively track the rapid movement of vehicles and the dynamic changes of tasks, resulting in insufficient decision agility; if the decision cycle is too short, system resources will be occupied by frequent model deployment operations, leading to excessive resource consumption in the short term and long-term performance degradation. These problems reveal the shortcomings of existing methods in balancing decision efficiency and dynamic decision management. Summary of the Invention
[0004] To overcome the shortcomings of the prior art, this invention provides a method and apparatus for scheduling vehicle-mounted edge computing tasks based on dual time scales, which can improve the scheduling decision efficiency of vehicle-mounted edge computing tasks.
[0005] An embodiment of the present invention provides a method for scheduling vehicular edge computing tasks based on dual time scales, comprising the following steps: Based on the current traffic environment, a vehicle-to-everything (V2X) system is constructed; wherein, the V2X system includes a cloud server, several roadside units and several sets of vehicles, with one roadside unit corresponding to one set of vehicles; When the set of vehicles issues a reasoning task, the current decision stage is determined, and the decision type is determined based on the current decision stage; wherein, the decision stage includes a long-term decision stage and a short-term decision stage. Based on the decision type, the corresponding scheduling scheme is solved by the cloud server, and the roadside unit is scheduled to perform reasoning on the task to be reasoned according to the scheduling scheme.
[0006] Furthermore, in the aforementioned vehicle networking system: Each roadside unit is located within the communication range of the cloud server, and the communication ranges of each roadside unit do not overlap; wherein, all roadside units are equipped with a CPU, and some roadside units are also equipped with a DNN accelerator. Let the set of roadside units be R, then:
[0007] in, This represents the k-th roadside unit, and there are a total of k roadside units; The set of vehicles corresponding to the roadside unit includes all vehicles entering the communication range of the roadside unit. The computational tasks generated by all vehicles in the set of vehicles are offloaded to the corresponding roadside unit; wherein, one vehicle generates one computational task; let the set of vehicles be V, then:
[0008] in, This represents the set of vehicles corresponding to the kth roadside unit; Let the set of computational tasks corresponding to the k-th roadside unit be . ,but:
[0009] in, This represents the nth computation task of the kth roadside unit.
[0010] Furthermore, determining the current decision-making stage specifically includes: The number of seconds the system runs corresponding to the current time is determined based on the preset timer in the cloud server. When the number of seconds the system runs coincides with the preset long-term decision time, the current decision stage is determined to be the long-term periodic decision stage. When the number of seconds the system runs does not coincide with the preset long-term decision time, the current decision stage is determined to be a short-time-cycle decision stage.
[0011] Furthermore, determining the decision type based on the current decision-making stage specifically includes: When the current decision-making stage is a long-term cycle decision-making stage, the decision type is determined to be a joint decision; wherein, the joint decision includes model deployment decision and task unloading decision; When the current decision-making stage is a short-time-cycle decision-making stage, the decision type is determined to be an individual decision; wherein, the individual decision includes task unloading decision.
[0012] Furthermore, the model deployment decision and the task unloading decision include: Assume that the cloud server contains Three types of deep neural network models, each of which includes If the accuracy is such that time t corresponds to the model deployment decision... The specific formula is as follows:
[0013] in, ; Meanwhile, the task unloading decision corresponds to time t. The specific formula is as follows:
[0014] in, .
[0015] Preferably, the joint decision-making and the individual decision-making further include: accelerated reasoning decision-making; wherein time t corresponds to the accelerated reasoning decision-making. The specific formula is as follows:
[0016] in, .
[0017] Furthermore, the step of solving the corresponding scheduling scheme through the cloud server based on the decision type specifically includes: When the decision type is the joint decision, the model deployment decision and task unloading decision are solved using the DDPG algorithm to obtain the solution result; When the decision type is the individual decision, the task unloading decision is solved using a heuristic algorithm to obtain the solution result.
[0018] Preferably, before solving the scheduling scheme, the method further includes: fitting the scheduling scheme as a constrained minimization of total latency problem; wherein, the total latency of the k-th computation task on the roadside unit i is... Specifically:
[0019] in, The task offloading delay for the k-th computation task on the roadside unit i. The task inference delay for the k-th computation task on the roadside unit i. The model download delay is the m-th model when the download accuracy of the roadside unit i is p. The constrained problem of minimizing total delay is specifically as follows:
[0020] st
[0021]
[0022]
[0023]
[0024]
[0025]
[0026]
[0027]
[0028] in, It is the service latency of the j-th task on roadside unit i. This represents the minimum precision requirement for the j-th task on roadside unit i. This represents the maximum tolerable delay for the j-th task on roadside unit i. This represents the maximum tolerable energy consumption for task j. This represents the maximum storage capacity of roadside unit i.
[0029] Furthermore, the process of obtaining model deployment and task scheduling decisions using the DDPG algorithm specifically includes: Collect real-time resource information of each roadside unit; wherein, the real-time resource information includes: the length of each task queue in the roadside unit, the real-time available computing resources of the roadside unit, and the available storage space of the roadside unit; Based on the real-time resource information, a decision vector is generated using the DDPG algorithm; A policy reward function is constructed, and the decision vector is optimized with the goal of maximizing the policy reward function to generate the optimal decision vector, thereby obtaining the model deployment and task scheduling decision; wherein, the policy reward function is specifically:
[0030] Where s represents the real-time resource information, a represents the decision vector, and E represents the total system energy consumption. β is a preset weighting coefficient.
[0031] Another embodiment of the present invention provides a vehicle-mounted edge computing task scheduling device based on dual time scales, comprising: a construction module, a judgment module, and a scheduling module; The construction module is used to construct a vehicle network system based on the current traffic environment; wherein, the vehicle network system includes a cloud server, several roadside units and several sets of driving vehicles, and one roadside unit corresponds to one set of driving vehicles. The determination module is used to determine the current decision stage when the set of vehicles issues a reasoning task, and to determine the decision type based on the current decision stage; wherein, the decision stage includes a long-term decision stage and a short-term decision stage. The scheduling module is used to solve the corresponding scheduling scheme through the cloud server according to the decision type, and to schedule the roadside unit to perform reasoning on the task to be reasoned according to the scheduling scheme.
[0032] Compared with the prior art, the beneficial effects of the present invention are as follows: By introducing a dual-timescale decision-making mechanism, the high-overhead model deployment and low-overhead task scheduling are decoupled. Deep reinforcement learning is used to jointly optimize model deployment and task scheduling over long periods, while heuristic algorithms are used to achieve rapid task scheduling over short periods. This systematically solves the problems of slow decision-making and system oscillation under a single-timescale framework. It not only significantly reduces the total latency of task inference, but also effectively improves the system's resource utilization efficiency and long-term operational stability, achieving coordinated optimization of performance, energy efficiency, and robustness in a dynamic vehicle-to-everything (V2X) environment. Attached Figure Description
[0033] Figure 1 This is a flowchart illustrating a dual-time-scale vehicle edge computing task scheduling method according to an embodiment of the present invention.
[0034] Figure 2 This is a schematic diagram of a vehicle networking system provided in an embodiment of the present invention.
[0035] Figure 3 This is a schematic diagram of a dual time scale division provided in an embodiment of the present invention.
[0036] Figure 4 This is a schematic diagram of a vehicle-mounted edge computing task scheduling device based on dual time scales, provided as another embodiment of the present invention. Detailed Implementation
[0037] The accompanying drawings are for illustrative purposes only and should not be construed as limiting the scope of this patent. It will be understood by those skilled in the art that certain well-known structures and their descriptions may be omitted in the accompanying drawings.
[0038] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.
[0039] Reference Figure 1 The following is a flowchart illustrating a dual-time-scale vehicle edge computing task scheduling method according to an embodiment of the present invention, comprising the following steps: S1: Based on the current traffic environment, construct a vehicle network system; wherein, the vehicle network system includes a cloud server, several roadside units and several sets of driving vehicles, and one roadside unit corresponds to one set of driving vehicles; S2: When the set of vehicles issues a reasoning task, determine the current decision stage and the decision type based on the current decision stage; wherein, the decision stage includes a long-term decision stage and a short-term decision stage. S3: Based on the decision type, solve the corresponding scheduling scheme through the cloud server, and schedule the roadside unit to perform reasoning on the task to be reasoned according to the scheduling scheme.
[0040] For step S1, specifically in the vehicle networking system: Each roadside unit is located within the communication range of the cloud server, and the communication ranges of each roadside unit do not overlap; wherein, all roadside units are equipped with a CPU, and some roadside units are also equipped with a DNN accelerator. Let the set of roadside units be R, then:
[0041] in, This represents the k-th roadside unit, and there are a total of k roadside units; The set of vehicles corresponding to the roadside unit includes all vehicles entering the communication range of the roadside unit. The computational tasks generated by all vehicles in the set of vehicles are offloaded to the corresponding roadside unit; wherein, one vehicle generates one computational task; let the set of vehicles be V, then:
[0042] in, This represents the set of vehicles corresponding to the kth roadside unit; Let the set of computational tasks corresponding to the k-th roadside unit be . ,but:
[0043] in, This represents the nth computation task of the kth roadside unit.
[0044] In a preferred embodiment, refer to Figure 2 This is a schematic diagram of a vehicle networking system according to an embodiment of the present invention. Figure 2 As can be seen, the vehicle-to-everything (V2X) system consists of a cloud server, several Roadside Units (RSUs), and sets of vehicles corresponding to each Roadside Unit. The communication range of each Roadside Unit is typically non-overlapping, and each Roadside Unit is within the communication range of the cloud server C. When a vehicle enters the communication range of a Roadside Unit, it is assigned to the set of vehicles that Roadside Unit can communicate with. The computational tasks generated by the vehicle are offloaded to the Roadside Unit corresponding to the set of vehicles to which that vehicle belongs.
[0045] In this model, each vehicle can offload its inference tasks to the corresponding roadside unit via a vehicle-to-infrastructure (V2I) connection. Simultaneously, roadside units can share computing and communication resources via infrastructure-to-infrastructure (I2I) connections. Without loss of generality, this embodiment assumes that all trained inference models are stored on a cloud server. Each roadside unit can communicate with the central cloud server via a wired connection. Therefore, each roadside unit can obtain its inference model from the cloud server. Inference tasks include object recognition, path planning, and semantic segmentation.
[0046] For step S2, specifically, determining the current decision-making stage includes: The number of seconds the system runs corresponding to the current time is determined based on the preset timer in the cloud server. When the number of seconds the system runs coincides with the preset long-term decision time, the current decision stage is determined to be the long-term periodic decision stage. When the number of seconds the system runs does not coincide with the preset long-term decision time, the current decision stage is determined to be a short-time-cycle decision stage.
[0047] In a preferred embodiment, refer to Figure 3 This is a schematic diagram of a dual-timescale division provided in an embodiment of the present invention. Figure 3 As can be seen, this preferred embodiment divides time into two scales—a long time period and a short time period: the long time period is 10 seconds, and the short time period is 1 second. That is, starting from the start time, every 10 seconds is a long-term decision moment, and the rest are short-term decision moments.
[0048] By dividing the time into different scales, this invention can solve the problem of decreased system dynamic performance caused by excessively long decision cycles under a single time scale, and the problem of excessive resource consumption caused by frequent model deployment due to excessively short decision cycles.
[0049] Furthermore, determining the decision type based on the current decision-making stage specifically includes: When the current decision-making stage is a long-term cycle decision-making stage, the decision type is determined to be a joint decision; wherein, the joint decision includes model deployment decision and task unloading decision; When the current decision-making stage is a short-time-cycle decision-making stage, the decision type is determined to be an individual decision; wherein, the individual decision includes task unloading decision.
[0050] Preferably, the model deployment decision and the task unloading decision include: Assume that the cloud server contains Three types of deep neural network models, each of which includes If the accuracy is such that time t corresponds to the model deployment decision... The specific formula is as follows:
[0051] in, ; Meanwhile, the task unloading decision corresponds to time t. The specific formula is as follows:
[0052] in, .
[0053] Preferably, the joint decision-making and the individual decision-making further include: accelerated reasoning decision-making; wherein time t corresponds to the accelerated reasoning decision-making. The specific formula is as follows:
[0054] in, .
[0055] In a preferred embodiment, in order to improve the system's decision-making speed and dynamic resource management capabilities during long-term operation, and considering that the model deployment operation itself has a long cycle, this preferred embodiment simultaneously formulates joint decisions on model deployment and task unloading during the long-term decision-making phase, while only task unloading decisions are made during the short-term decision-making phase.
[0056] Assume there are a total of There are three types of DNN models, and each model has three different inference accuracies: high, medium, and low. We use [various methods / methods] respectively. This indicates that the cloud server contains all types and accuracies of pre-trained DNN models, while the roadside units, due to memory limitations, only deploy a subset of DNN models. Furthermore, since the cloud server contains different types of models, each task corresponds to one model for inference, and each model has a different level of accuracy, this preferred embodiment sets that each model can be deployed at a maximum of one level of accuracy on each roadside unit. Moreover, high-accuracy DNN models can infer tasks with low accuracy requirements, but tasks requiring high accuracy cannot be inferred by DNN models with accuracy requirements lower than the task's requirements. Without loss of generality, higher-accuracy models occupy more storage space and have longer inference times.
[0057] Therefore, the deployment decision variables of the DNN model are defined as follows: The specific mathematical formula is as follows:
[0058] Finally, using This represents the model deployment decision for all the roadside units.
[0059] In each short time period, the vehicle offloads the generated task to a communicable edge server. If the model deployed on that server meets the task's model type and accuracy requirements, as well as the maximum tolerable latency requirement, inference is performed on that roadside unit. Otherwise, the task is offloaded to a nearby roadside unit that meets the task requirements for inference. Therefore, the task offloading decision variable is defined as:
[0060] Finally, using This represents the task offloading decision for all computational tasks.
[0061] Since some roadside units are equipped with DNN accelerators, inference tasks can be performed on these accelerators. Therefore, the decision variables for accelerating inference are defined as follows:
[0062] Finally, using Record whether all tasks are inferred via CPU or DNN accelerator.
[0063] For step S3, specifically, the step of solving the corresponding scheduling scheme through the cloud server according to the decision type includes: When the decision type is the joint decision, the model deployment decision and task unloading decision are solved using the DDPG algorithm to obtain the solution result; When the decision type is the individual decision, the task unloading decision is solved using a heuristic algorithm to obtain the solution result.
[0064] In a preferred embodiment, during any long time period, deep reinforcement learning is used to make joint decisions on model deployment and task offloading; while during any short time period, only task offloading decisions are made, i.e., a heuristic algorithm is designed to schedule tasks to the roadside unit with the least latency based on the existing model deployment status of roadside units.
[0065] This invention effectively addresses task reasoning scenarios in the Internet of Vehicles (IoV) environment characterized by dynamic disturbances (such as sudden changes in vehicle density, sudden task requests, and network state fluctuations). By decoupling control commands at different time granularities through a dual-timescale decision-making mechanism and leveraging the long-term planning capabilities of deep reinforcement learning, the robustness and service stability of the system are significantly improved, avoiding severe performance oscillations or avalanche-like failures caused by local disturbances.
[0066] Preferably, before solving the scheduling scheme, the method further includes: fitting the scheduling scheme as a constrained minimization of total latency problem; wherein, the total latency of the k-th computation task on the roadside unit i is... Specifically:
[0067] in, The task offloading delay for the k-th computation task on the roadside unit i. The task inference delay for the k-th computation task on the roadside unit i. The model download delay is the m-th model when the download accuracy of the roadside unit i is p. The constrained problem of minimizing total delay is specifically as follows:
[0068] st
[0069]
[0070]
[0071]
[0072]
[0073]
[0074]
[0075]
[0076] in, It is the service latency of the j-th task on roadside unit i. This represents the minimum precision requirement for the j-th task on roadside unit i. This represents the maximum tolerable delay for the j-th task on roadside unit i. This represents the maximum tolerable energy consumption for task j. This represents the maximum storage capacity of roadside unit i.
[0077] In a preferred embodiment, before solving, the scheduling scheme needs to be formally described as a problem of minimizing the total task latency over a long period under constraints such as the maximum tolerable latency of the task, vehicle energy consumption, and task accuracy requirements, in order to perform quantification. During the scheduling process, several types of latency exist, including the total communication latency for task unloading, task inference latency, and model download latency.
[0078] Specifically, the total communication latency for task offloading consists of inter-network layer task offloading (transmission of tasks between roadside units) and microarchitecture-level communication latency (transmission of tasks between hardware units within a roadside unit). Therefore, the expression for the task offloading latency is:
[0079] in, Delays in unloading tasks between roadside unit layers and vehicles. This indicates the transmission delay of tasks between the vehicle and the internal hardware of the roadside unit during the entire unloading process.
[0080] Communication latency between network layers mainly refers to the latency of task transmission between devices in the model, defined as follows: Given the delay in vehicle offloading tasks to a communicable roadside unit and the task offloading delay between roadside units, then:
[0081] in, This represents the delay at which the kth vehicle, which can communicate within roadside unit i, will offload its task to the roadside unit. This represents the delay in offloading the task of the kth vehicle, which is communicable within roadside unit i, to roadside unit j via roadside unit i.
[0082] Assuming the communication bandwidth is B and the channel condition between the vehicle and the roadside unit is good, the transmission speed between the vehicle and the roadside unit can be calculated using Shannon's theorem as follows:
[0083] in, Let B represent the transmission rate between roadside unit i and the j-th vehicle it can communicate with, and let B be the communication bandwidth between them. This represents the transmission power of vehicle j. This represents the channel power gain between the two. This represents Gaussian white noise.
[0084] definition Let the communication delay be the time required for the k-th vehicle within the communication range of roadside unit i to offload its task to the roadside unit. Then:
[0085] in, The input value is the size of the task of the kth vehicle that can communicate with roadside unit i. Let be the transmission rate between roadside unit i and the communicable vehicle k.
[0086] The unloading of tasks between roadside units can be defined as:
[0087] in, This represents the transmission rate between roadside unit i and roadside unit j, assuming that the transmission rates between roadside units are the same.
[0088] Network-level communication power consumption Determined by the vehicle's transmit power and network-level communication latency, it is defined as:
[0089] in, This represents the transmission power of the kth vehicle in roadside unit i.
[0090] Microarchitecture communication latency refers to the time delay in data transmission between different computing units (such as CPUs and DNN accelerators) and memory (such as DRAM) within a roadside unit. Therefore, microarchitecture communication latency can be defined as:
[0091] in, Microarchitecture-level input communication latency refers to the time required to read task input data from memory (such as DRAM) into the computing unit (CPU or DNN accelerator). Microarchitecture-level output communication latency refers to the time required to write task output data back to memory from the computing unit.
[0092] Specifically, microarchitecture-level input communication latency can be defined as:
[0093] in, This represents the data size of the k-th task on roadside unit i. This represents the DRAM read bandwidth of roadside unit i.
[0094] Microarchitecture-level output communication latency can be defined as:
[0095] in, This indicates the size of the output data of the k-th task on roadside unit i. This represents the DRAM write bandwidth of roadside unit i.
[0096] Regarding the task inference latency, each task can be inferred by one piece of hardware, let... Given the inference delay of task k on roadside unit i, then:
[0097] in, and These represent the workload of task k on roadside unit i on the DNN accelerator and CPU, respectively. , These represent the computing power of the CPU and the DNN accelerator, respectively.
[0098] Regarding model download latency, when adjusting model deployment, the first step is to use... To determine whether a roadside unit deploys this type of model, if the roadside unit downloads the required model from the cloud server, then the latency for roadside unit i to download the m-th model with precision p from the cloud is defined as:
[0099] in, It is the size of the m-th model with precision p. It refers to the transmission rate of the cloud server.
[0100] In summary, the service latency of the k-th task on roadside unit i can be defined as:
[0101] Therefore, the inference delay of all tasks, i.e., the constrained problem of minimizing the total delay, can be expressed as:
[0102] st
[0103]
[0104]
[0105]
[0106]
[0107]
[0108]
[0109]
[0110] in, It is the service latency of the j-th task on roadside unit i. Each roadside unit is limited to deploying at most one accuracy level for each model. This means that at the roadside unit layer, tasks can only be offloaded to roadside units that meet the accuracy requirements of the task model. This represents the minimum precision requirement for the j-th task on roadside unit i. This represents the maximum tolerable delay for the j-th task on roadside unit i. This represents the maximum tolerable energy consumption for task j. This represents the maximum storage capacity of roadside unit i. , , These represent model deployment, task unloading, and device selection as binary decision variables, respectively.
[0111] Furthermore, the process of obtaining model deployment and task scheduling decisions using the DDPG algorithm specifically includes: Collect real-time resource information of each roadside unit; wherein, the real-time resource information includes: the length of each task queue in the roadside unit, the real-time available computing resources of the roadside unit, and the available storage space of the roadside unit; Based on the real-time resource information, a decision vector is generated using the DDPG algorithm; A policy reward function is constructed, and the decision vector is optimized with the goal of maximizing the policy reward function to generate the optimal decision vector, thereby obtaining the model deployment and task scheduling decision; wherein, the policy reward function is specifically:
[0112] Where s represents the real-time resource information, a represents the decision vector, and E represents the total system energy consumption. β is a preset weighting coefficient.
[0113] In a preferred embodiment, a state space, an action space, and a reward function need to be constructed before solving the problem. The state space S contains the real-time resource information s, which mainly includes the length of each task queue in each roadside unit, the available computing resources of the CPU and DNN accelerator in the roadside unit, and the available storage space of the roadside unit.
[0114] The action space A contains a comprehensive decision vector a, which is generated by a policy network and includes: task unloading decision (specifying the target roadside unit and execution device of the task) and model deployment decision (managing the model library composition on the roadside unit). The reward function r is designed as follows:
[0115] Where T is the average latency for processing a batch of tasks, and E is the total system energy consumption. β is a weighting coefficient used to balance minimizing latency and controlling energy consumption.
[0116] The DDPG algorithm framework consists of four neural networks: Current Policy Network Generate an action based on the current state s .
[0117] Current evaluation network : Evaluate the expected long-term return Q that can be obtained by performing action a in state s.
[0118] Target Policy Network The target network of the current policy network, whose parameters are periodically updated synchronously from the current policy network, is used to generate stable target actions.
[0119] Target Evaluation Network The target network of the current evaluation network, whose parameters are periodically updated synchronously from the current evaluation network, is used to calculate a stable target Q value.
[0120] The algorithm aims to learn an optimal policy μ* that maximizes the expected cumulative discount reward. The objective Q-value is achieved when training the evaluation network. Calculate using the following formula:
[0121] in, It is the immediate reward obtained after performing the action, calculated by the reward function r, where γ is a discount factor used to weigh the importance of the current reward against the future reward.
[0122] Through the interaction and iteration between the current network and the target network in the DDPG algorithm, an optimal policy μ* is eventually learned. This policy outputs a joint decision on model deployment and task offloading at the beginning of each long-duration period, thereby achieving continuous optimization of the system's long-term performance. At the decision point of a short-duration period, only task scheduling decisions are made, i.e., a heuristic algorithm is designed to schedule tasks to the roadside unit with the minimum latency based on the existing model deployment of roadside units.
[0123] In a specific embodiment, the workflow of the dual-time-scale vehicle edge computing task scheduling method of the present invention is as follows: (1) System initialization After the system starts, initialization operations are performed first, including: loading the initial DNN model deployment configuration and vehicle set for each roadside unit; initializing the policy network and evaluation network of the DDPG algorithm; and setting timers for long and short time periods.
[0124] (2) Time period judgment At each decision point, the system determines the current time scale: if the current time is a long-term decision point, then execute step 3; if the current time is a short-term decision point, then execute step 4; if the two coincide, then execute the long-term decision first.
[0125] (3) Long-term decision-making process At long-term decision points, the system performs the following operations: Status acquisition: Collect information such as task queue length, available computing resources (CPU / NPU), storage status, current model deployment status, and task type distribution for each roadside unit; DRL Decision: Input the state into the trained DDPG policy network and output joint decision actions, including: Model deployment decision: Determine the type and accuracy of the DNN model to be deployed on each roadside unit; Task offloading decision: Assign target roadside units and execution devices (CPU / DNN accelerators) to the currently pending tasks. Model deployment and execution: Based on the decision results, download the required models from the cloud server to the corresponding roadside units and update the roadside unit model library; Task scheduling and execution: The task is scheduled to the designated roadside unit and device according to the decision result.
[0126] (4) Short-term decision-making process At short-term decision points, the system performs the following operations: Status acquisition: Only the current task queue and available resources of each roadside unit are collected; Heuristic scheduling: A greedy strategy is used to schedule newly arrived tasks to the roadside unit with the least service latency for processing, where service latency includes communication latency and inference latency; Task execution: The task enters the inference queue on the target roadside unit according to the FIFO principle, and the CPU or NPU performs inference.
[0127] Through the aforementioned dual-timescale decision-making mechanism, the system ensures long-term resource optimization and model deployment rationality while achieving rapid response to short-term task requests, effectively balancing system overhead and service quality.
[0128] Reference Figure 4 The following is a schematic diagram of the structure of a vehicle-mounted edge computing task scheduling device based on dual time scales, provided in another embodiment of the present invention, including: a construction module 101, a judgment module 102, and a scheduling module 103; The construction module 101 is used to construct a vehicle network system according to the current traffic environment; wherein, the vehicle network system includes a cloud server, several roadside units and several sets of driving vehicles, and one roadside unit corresponds to one set of driving vehicles. The determination module 102 is used to determine the current decision stage when the set of vehicles issues a reasoning task, and to determine the decision type based on the current decision stage; wherein, the decision stage includes a long-term decision stage and a short-term decision stage. The scheduling module 103 is used to solve the corresponding scheduling scheme through the cloud server according to the decision type, and to schedule the roadside unit to perform reasoning on the task to be reasoned according to the scheduling scheme.
[0129] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the implementation of the present invention. Those skilled in the art can make other variations or modifications based on the above description. It is neither necessary nor possible to exhaustively describe all embodiments here. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the claims of the present invention.
Claims
1. A method for scheduling vehicular edge computing tasks based on dual time scales, characterized in that, Includes the following steps: Based on the current traffic environment, a vehicle-to-everything (V2X) system is constructed; wherein, the V2X system includes a cloud server, several roadside units and several sets of vehicles, with one roadside unit corresponding to one set of vehicles; When the set of vehicles issues a reasoning task, the current decision stage is determined, and the decision type is determined based on the current decision stage; wherein, the decision stage includes a long-term decision stage and a short-term decision stage. Based on the decision type, the corresponding scheduling scheme is solved by the cloud server, and the roadside unit is scheduled to perform reasoning on the task to be reasoned according to the scheduling scheme.
2. The vehicle-mounted edge computing task scheduling method based on dual time scales as described in claim 1, characterized in that, In the vehicle networking system: Each roadside unit is located within the communication range of the cloud server, and the communication ranges of each roadside unit do not overlap; wherein, all roadside units are equipped with a CPU, and some roadside units are also equipped with a DNN accelerator. Let the set of roadside units be R, then: in, This represents the k-th roadside unit, and there are a total of k roadside units; The set of vehicles corresponding to the roadside unit includes all vehicles entering the communication range of the roadside unit. The computational tasks generated by all vehicles in the set of vehicles are offloaded to the corresponding roadside unit; wherein, one vehicle generates one computational task; let the set of vehicles be V, then: in, This represents the set of vehicles corresponding to the kth roadside unit; Let the set of computational tasks corresponding to the k-th roadside unit be . ,but: in, This represents the nth computation task of the kth roadside unit.
3. The vehicle-mounted edge computing task scheduling method based on dual time scales as described in claim 1, characterized in that, The determination of the current decision-making stage specifically includes: The number of seconds the system runs corresponding to the current time is determined based on the preset timer in the cloud server. When the number of seconds the system runs coincides with the preset long-term decision time, the current decision stage is determined to be the long-term periodic decision stage. When the number of seconds the system runs does not coincide with the preset long-term decision time, the current decision stage is determined to be a short-time-cycle decision stage.
4. The vehicle-mounted edge computing task scheduling method based on dual time scales as described in claim 1, characterized in that, The step of determining the decision type based on the current decision-making stage includes: When the current decision-making stage is a long-term cycle decision-making stage, the decision type is determined to be a joint decision; wherein, the joint decision includes model deployment decision and task unloading decision; When the current decision-making stage is a short-time-cycle decision-making stage, the decision type is determined to be an individual decision; wherein, the individual decision includes task unloading decision.
5. The on-board edge computing task scheduling method based on dual time scales as described in claim 4, characterized in that, The model deployment decision and the task unloading decision include: Assume that the cloud server contains Three types of deep neural network models, each of which includes If the accuracy is such that time t corresponds to the model deployment decision... The specific formula is as follows: in, ; Meanwhile, the task unloading decision corresponds to time t. The specific formula is as follows: in, .
6. The vehicle-mounted edge computing task scheduling method based on dual time scales as described in claim 5, characterized in that, The joint decision-making and the individual decision-making also include: accelerated reasoning decision-making; wherein, time t corresponds to the accelerated reasoning decision-making. The specific formula is as follows: in, .
7. The on-board edge computing task scheduling method based on dual time scales as described in claim 5, characterized in that, The step of solving the corresponding scheduling scheme through the cloud server according to the decision type specifically includes: When the decision type is the joint decision, the model deployment decision and task unloading decision are solved using the DDPG algorithm to obtain the solution result; When the decision type is the individual decision, the task unloading decision is solved using a heuristic algorithm to obtain the solution result.
8. The on-board edge computing task scheduling method based on dual time scales as described in claim 6, characterized in that, Before solving the scheduling scheme, the method further includes: fitting the scheduling scheme into a constrained minimization of total latency problem; wherein, the total latency of the k-th computation task on the roadside unit i is... Specifically: in, The task offloading delay for the k-th computation task on the roadside unit i. The task inference delay for the k-th computation task on the roadside unit i. The model download delay is the m-th model when the download accuracy of the roadside unit i is p. The constrained problem of minimizing total delay is specifically as follows: st in, It is the service latency of the j-th task on roadside unit i. This represents the minimum precision requirement for the j-th task on roadside unit i. This represents the maximum tolerable delay for the j-th task on roadside unit i. This represents the maximum tolerable energy consumption for task j. This represents the maximum storage capacity of roadside unit i.
9. The on-board edge computing task scheduling method based on dual time scales as described in claim 7, characterized in that, The process of obtaining model deployment and task scheduling decisions using the DDPG algorithm specifically includes: Collect real-time resource information of each roadside unit; wherein, the real-time resource information includes: the length of each task queue in the roadside unit, the real-time available computing resources of the roadside unit, and the available storage space of the roadside unit; Based on the real-time resource information, a decision vector is generated using the DDPG algorithm; A policy reward function is constructed, and the decision vector is optimized with the goal of maximizing the policy reward function to generate the optimal decision vector, thereby obtaining the model deployment and task scheduling decision; wherein, the policy reward function is specifically: Where s represents the real-time resource information, a represents the decision vector, and E represents the total system energy consumption. β is a preset weighting coefficient.
10. A vehicle-mounted edge computing task scheduling device based on dual time scales, characterized in that, include: Modules for building, determining, and scheduling; The construction module is used to construct a vehicle network system based on the current traffic environment; wherein, the vehicle network system includes a cloud server, several roadside units and several sets of driving vehicles, and one roadside unit corresponds to one set of driving vehicles. The determination module is used to determine the current decision stage when the set of vehicles issues a reasoning task, and to determine the decision type based on the current decision stage; wherein, the decision stage includes a long-term decision stage and a short-term decision stage. The scheduling module is used to solve the corresponding scheduling scheme through the cloud server according to the decision type, and to schedule the roadside unit to perform reasoning on the task to be reasoned according to the scheduling scheme.