Task scheduling method and device of vehicle-mounted edge computing, equipment and storage medium

CN122924939APending Publication Date: 2026-10-16BEIJING AUTOMOBILE RES GENERAL INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611028936.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-10
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0004]本申请提供一种车载边缘计算的任务调度方法、装置、设备及存储介质,以解决相关技术中的调度决策仅依赖于节点的瞬时在线状态,忽略了车载节点在线时长与稳定性,导致任务频繁中断等问题

Benefits of technology

本申请实施例通过构建在线概率矩阵来量化车辆在不同时间段的在线规律,并结合车辆的当前运行状态进行动态修正,从而精准推算出车辆的预测可用时长,将待调度任务的预测执行时长与车辆的预测可用时长进行匹配确定目标车辆,从根本上避免了将长任务分配给即将下线的车辆,显著提升了车载边缘计算任务调度的可靠性与执行成功率,降低了任务失败风险。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122924939A_ABST
    Figure CN122924939A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of Internet of Vehicles, in particular to a task scheduling method and device for vehicle-mounted edge computing, equipment and a storage medium, wherein the method comprises the following steps: obtaining a predicted execution duration of a task to be scheduled and a current running state of an online vehicle; an online probability matrix corresponding to the online vehicle is constructed, and a predicted available duration of the online vehicle is calculated based on the online probability matrix and the current running state, wherein the online probability matrix is used for representing the online regularity of the online vehicle in different time periods; the predicted execution duration is matched with the predicted available duration, so that a target vehicle is determined from the online vehicle, and the task to be scheduled is distributed to the target vehicle. Therefore, the scheduling decision in the related art only depends on the instantaneous online state of a node, the online duration and stability of a vehicle-mounted node are ignored, and problems such as frequent interruption of a task are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of vehicle networking technology, and in particular to a task scheduling method, apparatus, device and storage medium for vehicle edge computing. Background Technology

[0002] In traditional distributed computing and edge computing scheduling systems, the basic logic of task allocation is to select a suitable node from the currently online computing nodes to assign the task. The core logic is that vehicles report their online status to the cloud scheduling system through a heartbeat mechanism. The scheduling system maintains a real-time "list of online vehicles," and when a computing task arrives, it selects a suitable vehicle from this list for task allocation.

[0003] However, due to the significant instability of vehicle online status, scheduling in related technologies relies solely on the instantaneous online status of nodes. Long-running tasks are easily misassigned to vehicles on the verge of going offline. When a vehicle unexpectedly goes offline due to engine shutdown or leaving a signal blind spot, the executing task is forced to interrupt and cannot be resumed, requiring rescheduling. This not only significantly increases the task failure rate but also results in a severe waste of computing resources. Summary of the Invention

[0004] This application provides a task scheduling method, apparatus, device, and storage medium for vehicle-mounted edge computing to solve the problems in related technologies where scheduling decisions rely solely on the instantaneous online status of nodes, ignoring the online duration and stability of vehicle-mounted nodes, leading to frequent task interruptions.

[0005] The first aspect of this application provides a task scheduling method for vehicle-mounted edge computing, comprising the following steps: obtaining the predicted execution duration of the task to be scheduled and the current operating status of online vehicles; constructing an online probability matrix corresponding to the online vehicles, and calculating the predicted available duration of the online vehicles based on the online probability matrix and the current operating status, wherein the online probability matrix is ​​used to represent the online pattern of online vehicles in different time periods; matching the predicted execution duration with the predicted available duration to determine the target vehicle from the online vehicles, and assigning the task to be scheduled to the target vehicle.

[0006] Optionally, constructing the online probability matrix corresponding to online vehicles further includes: obtaining historical heartbeat data of online vehicles; dividing the historical heartbeat data based on the weekday dimension and time period dimension, and counting the historical online counts of online vehicles in each time period; determining the online probability of online vehicles in each time period based on the historical online counts; smoothing the online probability using an exponentially weighted moving average algorithm, and using the smoothed result as the element value of the corresponding time period to construct the online probability matrix corresponding to online vehicles.

[0007] Optionally, the online probability matrix is ​​a 7×48 time-dimensional matrix, where the row dimension represents the 7 days of a week, the column dimension represents the 48 time periods of a day, and each time period corresponds to a preset time interval; the element values ​​in the online probability matrix represent the online probability of a vehicle within the corresponding time period.

[0008] Optionally, based on the online probability matrix and the current operating status, the predicted available time of online vehicles is calculated, including: obtaining the online probabilities of multiple consecutive time periods from the current moment from the online probability matrix; multiplying the online probabilities of multiple consecutive time periods in chronological order to calculate the cumulative online probability of online vehicles; when the cumulative online probability is greater than or equal to a preset confidence threshold, determining the number of online time periods of online vehicles, and calculating the predicted available time of online vehicles based on the current operating status and the number of online time periods.

[0009] Optionally, the current operating state includes a parked charging state, a driving state, and a parked non-charging state. Calculating the predicted available time of the online vehicle based on the current operating state and the number of online time periods includes: obtaining a correction coefficient corresponding to the current operating state of the online vehicle; correcting the number of online time periods using the correction coefficient; and calculating the predicted available time based on the corrected number of online time periods and a preset time interval corresponding to each time period.

[0010] Optionally, the predicted execution time is matched with the predicted available time, including: obtaining a preset safety margin coefficient; determining the target execution time based on the safety margin coefficient and the predicted execution time; if the predicted available time of an online vehicle is greater than or equal to the target execution time, then the online vehicle is determined to be the target vehicle; if there are multiple target vehicles, then the target vehicles are sorted according to the predicted available time, and the task to be scheduled is assigned to the target vehicle at the top of the sort.

[0011] Optionally, the task scheduling method for vehicle-mounted edge computing further includes: if no target vehicle exists, obtaining the task status of the task to be scheduled; if the task status is an emergency state, executing an emergency scheduling strategy, wherein the emergency scheduling strategy includes: reducing the preset safety margin coefficient to relax the matching conditions, or splitting the task to be scheduled into multiple sub-tasks and assigning them to multiple online vehicles for parallel execution; if the task to be scheduled is a non-emergency state, adding the task to be scheduled to a waiting queue.

[0012] A second aspect of this application provides a task scheduling device for vehicle-mounted edge computing, comprising: an acquisition module for acquiring the predicted execution duration of the task to be scheduled and the current operating status of online vehicles; a calculation module for constructing an online probability matrix corresponding to the online vehicles, and calculating the predicted available duration of the online vehicles based on the online probability matrix and the current operating status, wherein the online probability matrix is ​​used to represent the online pattern of online vehicles in different time periods; and a scheduling module for matching the predicted execution duration with the predicted available duration to determine the target vehicle from the online vehicles and assigning the task to be scheduled to the target vehicle.

[0013] Optionally, the calculation module is further used to: acquire historical heartbeat data of online vehicles; divide the historical heartbeat data based on the weekday dimension and time period dimension, and count the historical online count of online vehicles in each time period; determine the online probability of online vehicles in each time period based on the historical online count; smooth the online probability using an exponentially weighted moving average algorithm, and use the smoothed result as the element value of the corresponding time period to construct the online probability matrix corresponding to online vehicles.

[0014] Optionally, the online probability matrix is ​​a 7×48 time-dimensional matrix, where the row dimension represents the 7 days of a week, the column dimension represents the 48 time periods of a day, and each time period corresponds to a preset time interval; the element values ​​in the online probability matrix represent the online probability of a vehicle within the corresponding time period.

[0015] Optionally, the calculation module is further configured to: obtain the online probability of multiple consecutive time periods from the current time from the online probability matrix; multiply the online probabilities of multiple consecutive time periods in chronological order to calculate the cumulative online probability of the online vehicle; when the cumulative online probability is greater than or equal to a preset confidence threshold, determine the number of online time periods of the online vehicle, and calculate the predicted available time of the online vehicle based on the current operating status and the number of online time periods.

[0016] Optionally, the current operating status includes a parked charging status, a driving status, and a parked non-charging status. The calculation module is further used to: obtain the correction coefficient corresponding to the current operating status of the online vehicle; correct the number of online time periods using the correction coefficient; and calculate the predicted available duration based on the corrected number of online time periods and the preset time interval corresponding to each time period.

[0017] Optionally, the scheduling module is further configured to: obtain a preset safety margin coefficient; determine the target execution time based on the safety margin coefficient and the predicted execution time; if the predicted available time of an online vehicle is greater than or equal to the target execution time, then the online vehicle is determined to be the target vehicle; when there are multiple target vehicles, the target vehicles are sorted according to the predicted available time, and the task to be scheduled is assigned to the target vehicle at the top of the sort.

[0018] Optionally, the task scheduling device for vehicle-mounted edge computing further includes: a processing module, used to obtain the task status of the task to be scheduled if no target vehicle is matched; if the task status is an emergency state, to execute an emergency scheduling strategy, wherein the emergency scheduling strategy includes: reducing the preset safety margin coefficient to relax the matching conditions, or splitting the task to be scheduled into multiple sub-tasks and assigning them to multiple online vehicles for parallel execution; if the task to be scheduled is a non-emergency state, to add the task to be scheduled to a waiting queue.

[0019] A third aspect of this application provides a vehicle, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor executes the program to implement the task scheduling method for in-vehicle edge computing as described in the above embodiments.

[0020] A fourth aspect of this application provides a computer-readable storage medium having a computer program or instructions stored thereon, which, when executed, are used to implement the task scheduling method for vehicle edge computing as described in the above embodiments.

[0021] Therefore, this application has at least the following beneficial effects: This application embodiment quantifies the online patterns of vehicles in different time periods by constructing an online probability matrix and dynamically corrects it in combination with the current operating status of the vehicle, thereby accurately calculating the predicted available time of the vehicle. The predicted execution time of the task to be scheduled is matched with the predicted available time of the vehicle to determine the target vehicle. This fundamentally avoids assigning long tasks to vehicles that are about to be taken offline, significantly improves the reliability and execution success rate of vehicle edge computing task scheduling, and reduces the risk of task failure.

[0022] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description

[0023] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein: Figure 1 This is a flowchart of a task scheduling method for vehicle-mounted edge computing provided according to an embodiment of this application; Figure 2 This is an example diagram illustrating the identification of operating states according to an embodiment of this application; Figure 3 This is a flowchart illustrating the calculation of predicted available time according to one embodiment of this application; Figure 4 Here is a flowchart of a task-vehicle matching and scheduling process according to one embodiment of this application; Figure 5 This is a diagram of a task pre-scheduling system architecture according to an embodiment of this application; Figure 6 This is a block diagram of a task scheduling device for vehicle edge computing provided according to an embodiment of this application; Figure 7 This is a structural schematic diagram of a vehicle according to an embodiment of this application. Detailed Implementation

[0024] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.

[0025] The following description, with reference to the accompanying drawings, outlines a task scheduling method, apparatus, device, and storage medium for vehicle-mounted edge computing according to embodiments of this application. Addressing the problems mentioned in the background section, this application provides a task scheduling method for vehicle-mounted edge computing. This method quantifies the online patterns of vehicles at different time periods by constructing an online probability matrix and dynamically adjusts it based on the vehicle's current operating status. This accurately calculates the predicted available time of the vehicle. The predicted execution time of the task to be scheduled is matched with the predicted available time of the vehicle to determine the target vehicle. This fundamentally avoids assigning long tasks to vehicles about to be decommissioned, significantly improving the reliability and success rate of vehicle-mounted edge computing task scheduling and reducing the risk of task failure.

[0026] Specifically, Figure 1 This is a flowchart illustrating a task scheduling method for vehicle-mounted edge computing provided in an embodiment of this application.

[0027] like Figure 1 As shown, the task scheduling method for vehicle-mounted edge computing includes the following steps: In step S101, the predicted execution time of the task to be scheduled and the current operating status of the online vehicles are obtained.

[0028] The current operating status includes parked charging status, driving status, and parked but not charging status.

[0029] Understandably, online stability and computing power quality vary significantly under different states, thus requiring different scheduling strategies. In actual execution, such as... Figure 2 As shown, in this embodiment of the application, the vehicle can be determined to be moving based on changes in GPS location or vehicle speed. If it is moving, it is in a "driving" state; if it is not moving, it is in a parked state. Then, the charging status is further used to determine whether it is "parked and charging" or "parked and not charging".

[0030] Specifically, a vehicle in motion indicates the worst online stability because users may reach their destination and turn off the engine at any time; the computing power quality is also generally poor because heat dissipation is limited while in motion, and the network may fluctuate due to movement. Therefore, a vehicle in motion is only suitable for assigning short tasks (estimated execution time < 30 minutes).

[0031] When a vehicle is parked and charging, it indicates the best online stability. Charging typically lasts for several hours with a stable power supply, preventing disconnection due to battery depletion. The computing quality is also highest because of the stable power supply, good heat dissipation, and reliable network connection during charging. Therefore, a vehicle parked and charging is the preferred platform for long-running tasks (estimated execution time > 2 hours).

[0032] A vehicle being parked and not charging indicates moderate online stability—more stable than when in motion but less stable than when charging—because the battery has limited power and may go offline due to depletion. Computational quality is also average, and the battery consumption of tasks needs to be considered. Therefore, a vehicle parked and not charging is suitable for assigning medium-duration tasks (0.5-2 hours).

[0033] It should be noted that the confidence level and actual value of the predicted availability time differ depending on the vehicle's state. For example, a predicted availability of 2 hours is much more reliable when the vehicle is parked and charging than when it is in motion, and therefore requires differentiated treatment during scheduling.

[0034] In this embodiment of the application, the task type, data size and model complexity parameters of the task to be scheduled can be obtained, and the expected execution time of the task to be scheduled can be calculated based on the above multi-dimensional feature parameters. This allows for accurate quantification of the time the task occupies computing resources, providing reliable data support for subsequent matching and scheduling based on vehicle online time.

[0035] In step S102, an online probability matrix corresponding to the online vehicle is constructed. Based on the online probability matrix and the current operating status, the predicted available time of the online vehicle is calculated. The online probability matrix is ​​used to represent the online pattern of the online vehicle in different time periods.

[0036] The online probability matrix is ​​a 7×48 time-dimensional matrix, where the row dimension represents the 7 days of a week and the column dimension represents the 48 time periods of a day, with each time period corresponding to a preset time interval; the element values ​​in the online probability matrix represent the online probability of a vehicle within the corresponding time period.

[0037] It is understood that the embodiments of this application construct an online probability matrix to characterize the online patterns of online vehicles in different time periods, and combine it with the current operating status of the vehicles to comprehensively calculate the predicted available time of online vehicles. This enables accurate prediction of the time window in which vehicles can remain online in the future based on the joint analysis of historical online patterns and real-time status. This provides a key decision-making basis for the subsequent accurate matching of task execution time with vehicle available time, and effectively avoids the risk of task interruption caused by unexpected vehicle offline.

[0038] In one embodiment of this application, constructing the online probability matrix corresponding to online vehicles further includes: obtaining historical heartbeat data of online vehicles; dividing the historical heartbeat data based on the weekday dimension and time period dimension, and counting the historical online times of online vehicles in each time period; determining the online probability of online vehicles in each time period based on the historical online times; smoothing the online probability using an exponentially weighted moving average algorithm, and using the smoothed result as the element value of the corresponding time period to construct the online probability matrix corresponding to online vehicles.

[0039] It is understood that this application embodiment acquires historical heartbeat data of online vehicles, divides the historical heartbeat data based on weekday and time period dimensions, counts the historical online frequency of online vehicles in each time period to determine the basic online probability, and then uses an exponentially weighted moving average algorithm to smooth the online probability, using the smoothed result as the element value of the corresponding time period, thereby constructing an online probability matrix corresponding to online vehicles. Thus, not only is the travel pattern and online characteristics of vehicles on different dates and time periods accurately captured through multi-dimensional historical data statistics, but the exponentially weighted moving average algorithm also effectively suppresses random fluctuations and noise interference in the data, enabling the constructed online probability matrix to more stably and accurately reflect the future online trend of vehicles, providing a high-confidence data foundation for predicting available time.

[0040] Specifically, the online probability matrix in this application embodiment is used to accurately depict the online time patterns of each vehicle. The rows of the matrix represent the 7 days of the week (Monday to Sunday), and the columns represent the 48 time slots of a day (each time slot is 30 minutes long, from 00:00 to 23:30). Each element in the matrix is ​​a probability value between 0 and 1, representing "the probability that the vehicle is online on a certain day and during a certain time slot." For example, this application embodiment can reveal typical user travel patterns from the online probability matrix.

[0041] For example, during nighttime (00:00-01:00): the online probability is very high (around 0.9), indicating that the car's infotainment system remains online when the user parks at night, possibly charging or in standby mode; during the morning rush hour (08:00-08:30): the online probability drops sharply on weekdays (0.15-0.30), indicating that the car's infotainment system may go offline due to the engine being turned off when the user is driving; the online probability remains relatively high on weekends (0.65-0.75), indicating that people travel later on weekends. Weekly differences: the patterns are similar on weekdays (Monday to Friday), but the patterns are significantly different on weekends (Saturday and Sunday), reflecting the weekly periodicity.

[0042] In actual implementation, this application embodiment can collect historical heartbeat data of vehicles over the past N weeks (N≥4), count the number of online times in a two-dimensional manner of "day of the week + time period", calculate the basic online probability for each time period (online probability = number of online times / total number of weeks), and introduce an exponential weighted moving average algorithm to smooth the probability value. This gives higher weight to recent data while suppressing random noise, so that the constructed online probability matrix can accurately depict the long-term periodic travel patterns of vehicles and quickly adapt to the dynamic changes in user habits.

[0043] It should be noted that the time granularity and dimensional composition of the online probability matrix in this application embodiment can be flexibly configured according to the accuracy requirements and computing resources of the actual application scenario: on the one hand, the time granularity can be refined to 15 minutes or 10 minutes (i.e., 96 or 144 time periods) to improve prediction accuracy, or coarsened to 1 hour or by day type (i.e., 24 or 7 time periods) to reduce data processing volume; on the other hand, a date dimension can be further introduced to distinguish between weekdays, weekends and holidays, thereby constructing a refined profile that adapts to the travel patterns of different date types, achieving the best balance between scheduling accuracy and system overhead.

[0044] In one embodiment of this application, the online probabilities of multiple consecutive time periods starting from the current moment are obtained from the online probability matrix; the online probabilities of multiple consecutive time periods are multiplied in chronological order to calculate the cumulative online probability of the online vehicle; when the cumulative online probability is greater than or equal to a preset confidence threshold, the number of online time periods of the online vehicle is determined, and the predicted available time of the online vehicle is calculated based on the current operating status and the number of online time periods.

[0045] The preset reliability threshold can be set according to actual conditions without specific limitations. For example, a preset reliability threshold of 80% can be set. This threshold indicates how confident one is that the vehicle will remain online for that long. A higher threshold results in a shorter but more reliable predicted availability time; a lower threshold results in a longer predicted availability time but also a greater risk.

[0046] It is understandable that, such as Figure 3As shown, this embodiment of the application can query the online probability of the current time period and each subsequent time period from the 7×48 online probability matrix to obtain a probability curve starting from the current moment. The probability of "being continuously online until the t-th time period" is calculated cumulatively backward from the current moment. The calculation method is to multiply the online probabilities of each time period: P(continuously online for t time periods) = P1 × P2 × ... × Pt. This is a calculation based on conditional probability, meaning that to be continuously online for t time periods, one needs to be online in each time period, and it is assumed that the online events in each time period are independent.

[0047] Furthermore, in this embodiment, the probability of a vehicle remaining online can be gradually increased starting from t=1 until the maximum t is found, making the cumulative online probability greater than or equal to the confidence threshold. This t represents the number of time periods the vehicle is expected to remain online, serving as the base available time. Finally, this base available time is corrected based on the vehicle's current real-time operating status to obtain the predicted available time. Thus, this embodiment quantifies the confidence of the vehicle's continuous online status using probability multiplication and eliminates the deviation between a single probability prediction and the actual physical state through a correction mechanism, ensuring the reliability of the prediction results.

[0048] In one embodiment of this application, calculating the predicted available time of the online vehicle based on the current operating status and the number of online time periods includes: obtaining a correction coefficient corresponding to the current operating status of the online vehicle; correcting the number of online time periods using the correction coefficient; and calculating the predicted available time based on the corrected number of online time periods and a preset time interval corresponding to each time period.

[0049] This application embodiment can set corresponding correction coefficients for different operating states, such as Figure 3 As shown, t is adjusted based on the vehicle's current operating status. For example, a vehicle parked and charging not only has a stable network connection but also a charging station, indicating it has no battery anxiety and is likely parked in a fixed location (such as a garage or charging station) in a stable environment. In this embodiment, it can be considered a high-quality computing node with high stability, so the expected duration can be increased by 20%, hence the correction coefficient is set to 1.2. A vehicle in motion may stall at any time upon reaching its destination or enter a tunnel or underground garage, causing a network outage. In this embodiment, it is considered a high-risk node, and to prevent the task from interrupting halfway through, the expected duration can be reduced by 30% to leave sufficient safety margin, hence the correction coefficient is set to 0.7. When parked and not charging, the vehicle is stationary, the network is stable, but the battery is continuously consumed. It is more stable than when in motion but has an additional risk of battery depletion compared to when charging. Therefore, as a baseline, no further adjustments are made, and the correction coefficient is set to 1.0.

[0050] After determining the correction coefficient, the embodiments of this application can calculate the predicted availability time of online vehicles using the following calculation formula.

[0051]

[0052] Where PAD represents the predicted available duration, and t represents the calculated number of online time periods. This represents the correction factor corresponding to the current operating state. This indicates the preset time interval (e.g., 30 minutes) corresponding to each time period.

[0053] Therefore, through the above-mentioned correction mechanism, the predicted number of online time periods in this application are transformed into a duration prediction that fits the physical reality, effectively avoiding the risk of failure caused by assigning long tasks to unstable vehicles.

[0054] In step S103, the predicted execution time is matched with the predicted available time to determine the target vehicle from the online vehicles and the task to be scheduled is assigned to the target vehicle.

[0055] It is understood that the embodiments of this application strictly compare and match the predicted execution time of the task to be scheduled with the predicted available time of online vehicles, select online vehicles whose predicted available time is greater than or equal to the predicted execution time as target vehicles, and accurately allocate the task to be scheduled to the target vehicle, ensuring that the task can be completed before the target vehicle goes offline. This achieves closed-loop verification of task requirements and vehicle computing power supply in the time dimension, effectively avoiding the risk of task execution interruption due to early vehicle offline or sudden state change, ensuring that edge computing tasks can be executed completely and stably, thereby significantly improving the success rate of distributed task scheduling.

[0056] In one embodiment of this application, matching the predicted execution time with the predicted available time includes: obtaining a preset safety margin coefficient; determining the target execution time based on the safety margin coefficient and the predicted execution time; if the predicted available time of an online vehicle is greater than or equal to the target execution time, then the online vehicle is determined to be the target vehicle; if there are multiple target vehicles, then the target vehicles are sorted according to the predicted available time, and the task to be scheduled is assigned to the target vehicle at the top of the sort.

[0057] The preset safety margin coefficient can be set according to the actual situation. For example, setting it to 1.2 means leaving a 20% safety margin, which can increase the probability of successful task completion.

[0058] This application embodiment can use a preset safety margin coefficient to weight the original predicted execution time of the task to determine the target execution time. The predicted available time of online vehicles is strictly compared with the calculated target execution time. Only when the predicted available time is greater than or equal to the target execution time is the online vehicle determined to meet the scheduling conditions and marked as the target vehicle.

[0059] However, in real-world high-density vehicle-to-everything (V2X) scenarios, multiple target vehicles that meet the time requirements often exist simultaneously. In this case, this embodiment introduces a sorting optimization strategy to select the final target vehicle. Specifically, this embodiment can sort all target vehicles in descending order of predicted available time, prioritizing the allocation of the task to be scheduled to the target vehicle at the top of the sort (i.e., the one with the longest predicted available time). This further reduces the probability of interruption during task execution and also reserves ample time resources for possible additional operations such as resuming interrupted transmissions and saving intermediate results.

[0060] In one embodiment of this application, the task scheduling method for vehicle edge computing further includes: if there is no target vehicle, obtaining the task status of the task to be scheduled; if the task status is an emergency state, executing an emergency scheduling strategy, wherein the emergency scheduling strategy includes: reducing the preset safety margin coefficient to relax the matching conditions, or splitting the task to be scheduled into multiple sub-tasks and allocating them to multiple online vehicles for parallel execution; if the task to be scheduled is a non-emergency state, adding the task to be scheduled to a waiting queue.

[0061] Understandably, when, after rigorous matching, it is found that no vehicle's predicted available time can meet the target execution time (i.e., conventional scheduling fails), this application embodiment will not directly report an error or discard the task, but will instead perform differentiated processing based on the urgency of the task.

[0062] Specifically, when a task is in an emergency (such as emergency obstacle avoidance decision-making in autonomous driving, critical safety warning, etc.) and there is no perfectly matching vehicle, this embodiment can reduce the preset safety margin coefficient (for example, reducing the original coefficient of 1.2 to 1.0 or even 0.9). This allows previously excluded online vehicles to re-enter the candidate pool as edge nodes, ensuring that emergency tasks can be immediately assigned and avoiding task delays. Secondly, this embodiment can also divide the task to be scheduled into multiple smaller sub-tasks and assign them to multiple currently online vehicles for parallel execution.

[0063] When a task is not in an emergency, the embodiments of this application can place the task to be scheduled into a waiting queue and assign it after a vehicle with sufficient predicted availability comes online. The tasks in the waiting queue will be re-evaluated periodically, and will be assigned immediately once a suitable vehicle is available. This can fundamentally avoid the problem of assigning long tasks to vehicles that are about to be taken offline, and significantly reduce the task failure rate caused by vehicle taking offline.

[0064] The task scheduling method for vehicle edge computing proposed in this application constructs an online probability matrix to quantify the online patterns of vehicles in different time periods and dynamically corrects them in combination with the current operating status of the vehicles, thereby accurately calculating the predicted available time of the vehicles. The predicted execution time of the tasks to be scheduled is matched with the predicted available time of the vehicles to determine the target vehicles. This fundamentally avoids assigning long tasks to vehicles that are about to be taken offline, significantly improves the reliability and success rate of vehicle edge computing task scheduling, and reduces the risk of task failure.

[0065] The following is combined Figure 5 The system architecture of this application provides a detailed description of the task scheduling method for vehicle-mounted edge computing, as exemplified by the embodiments of this application. Figure 5 As shown, the system architecture is divided into five layers, from bottom to top: data acquisition layer, online profiling layer, prediction calculation layer, pre-scheduling layer, and task management layer. Each layer has a clear responsibility and works together to complete the pre-scheduling of tasks based on online pattern prediction.

[0066] The data acquisition layer is responsible for collecting various types of raw data from the vehicle, including: a heartbeat data acquisition module that collects the vehicle's heartbeats when it goes online and offline, used to calculate online time; a GPS location acquisition module that collects the vehicle's location and speed information, used to determine driving / parking status; and a charging status acquisition module that collects the vehicle's charging status, used to distinguish between parking and charging and parking and not charging.

[0067] The online profiling layer is responsible for building a complete online profile for each vehicle. The 7×48 online probability matrix construction engine generates an online probability matrix with weekly and time-period granularity based on historical heartbeat data; the operation status recognition module combines location and charging information to identify whether the vehicle is currently driving, parked and charging, or parked and not charging; the online profile database stores the profile data of all vehicles for use by the upper layer.

[0068] The predictive computing layer predicts how long each vehicle can remain online based on online profiles and current status; the supply-side computing power curve generator aggregates the predicted available time of the entire fleet to generate a computing power supply curve in the time dimension, reflecting the changing trend of the fleet's overall computing power in the next 24 hours.

[0069] The pre-scheduling layer estimates the time required for task execution based on parameters such as task type and data volume; the task-vehicle matching scheduler matches the target execution time of the task with the predicted available time of the vehicle and selects a suitable vehicle to allocate the task; the batch task pre-planner performs time planning for non-urgent batch tasks based on the supply-side computing power curve to achieve peak shaving and valley filling; and the waiting queue manager manages tasks that cannot be allocated temporarily due to insufficient predicted available time.

[0070] The task management layer is responsible for the entire lifecycle management of tasks, including task queues, task execution monitoring, and result collection.

[0071] Next, with reference to the accompanying drawings, a task scheduling device for vehicle-mounted edge computing proposed according to an embodiment of this application is described.

[0072] Figure 6 This is a block diagram of a task scheduling device for vehicle-mounted edge computing according to an embodiment of this application.

[0073] like Figure 6 As shown, the vehicle-mounted edge computing task scheduling device 10 includes: an acquisition module 100, a computing module 200, and a scheduling module 300.

[0074] The acquisition module 100 is used to acquire the predicted execution time of the task to be scheduled and the current running status of the online vehicles; the calculation module 200 is used to construct the online probability matrix corresponding to the online vehicles, and calculate the predicted available time of the online vehicles based on the online probability matrix and the current running status, wherein the online probability matrix is ​​used to represent the online pattern of the online vehicles in different time periods; the scheduling module 300 is used to match the predicted execution time with the predicted available time to determine the target vehicle from the online vehicles and assign the task to be scheduled to the target vehicle.

[0075] In one embodiment of this application, the calculation module 200 is further configured to: acquire historical heartbeat data of online vehicles; divide the historical heartbeat data based on the weekday dimension and the time period dimension, and count the historical online count of online vehicles in each time period; determine the online probability of online vehicles in each time period based on the historical online count; smooth the online probability using an exponentially weighted moving average algorithm, and use the smoothed result as the element value of the corresponding time period to construct the online probability matrix corresponding to the online vehicles.

[0076] In one embodiment of this application, the online probability matrix is ​​a 7×48 time-dimensional matrix, where the row dimension represents the 7 days of a week, the column dimension represents the 48 time periods of a day, and each time period corresponds to a preset time interval; the element values ​​in the online probability matrix represent the online probability of a vehicle within the corresponding time period.

[0077] In one embodiment of this application, the calculation module 200 is further configured to: obtain the online probabilities of multiple consecutive time periods from the current time from the online probability matrix; multiply the online probabilities of multiple consecutive time periods in chronological order to calculate the cumulative online probability of the online vehicle; when the cumulative online probability is greater than or equal to a preset confidence threshold, determine the number of online time periods of the online vehicle, and calculate the predicted available time of the online vehicle based on the current operating status and the number of online time periods.

[0078] In one embodiment of this application, the current operating state includes a parked charging state, a driving state, and a parked non-charging state. The calculation module 200 is further configured to: obtain the correction coefficient corresponding to the current operating state of the online vehicle; correct the number of online time periods using the correction coefficient; and calculate the predicted available duration based on the corrected number of online time periods and the preset time interval corresponding to each time period.

[0079] In one embodiment of this application, the scheduling module 300 is further configured to: obtain a preset safety margin coefficient; determine the target execution time based on the safety margin coefficient and the predicted execution time; if the predicted available time of an online vehicle is greater than or equal to the target execution time, then determine that the online vehicle is the target vehicle; when there are multiple target vehicles, sort the target vehicles according to the predicted available time, and assign the task to be scheduled to the target vehicle at the top of the sort.

[0080] In one embodiment of this application, the vehicle-mounted edge computing task scheduling device 10 further includes: a processing module, configured to obtain the task status of the task to be scheduled if no target vehicle is matched; if the task status is an emergency state, execute an emergency scheduling strategy, wherein the emergency scheduling strategy includes: reducing the preset safety margin coefficient to relax the matching conditions, or splitting the task to be scheduled into multiple sub-tasks and allocating them to multiple online vehicles for parallel execution; if the task to be scheduled is a non-emergency state, add the task to be scheduled to a waiting queue.

[0081] It should be noted that the foregoing explanation of the task scheduling method embodiment for vehicle edge computing also applies to the task scheduling device for vehicle edge computing in this embodiment, and will not be repeated here.

[0082] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device may include: The memory 701, the processor 702, and the computer program stored on the memory 701 and executable on the processor 702.

[0083] When the processor 702 executes the program, it implements the task scheduling method for vehicle edge computing provided in the above embodiments.

[0084] Furthermore, electronic devices also include: Communication interface 703 is used for communication between memory 701 and processor 702.

[0085] The memory 701 is used to store computer programs that can run on the processor 702.

[0086] The memory 701 may include high-speed RAM (Random Access Memory) memory, and may also include non-volatile memory, such as at least one disk storage.

[0087] If the memory 701, processor 702, and communication interface 703 are implemented independently, then the communication interface 703, memory 701, and processor 702 can be interconnected via a bus to complete communication between them. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 7 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0088] Optionally, in a specific implementation, if the memory 701, processor 702, and communication interface 703 are integrated on a single chip, then the memory 701, processor 702, and communication interface 703 can communicate with each other through an internal interface.

[0089] Processor 402 may be a CPU (Central Processing Unit), an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of this application.

[0090] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the above-described task scheduling method for in-vehicle edge computing.

[0091] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0092] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0093] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more N executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.

[0094] It should be understood that the various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (FPGAs), field-programmable gate arrays (FPGAs), etc.

[0095] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

[0096] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.

Claims

1. A task scheduling method for vehicle-mounted edge computing, characterized in that, Includes the following steps: Obtain the predicted execution time of the tasks to be scheduled and the current operating status of online vehicles; Construct an online probability matrix corresponding to the online vehicle, and calculate the predicted available time of the online vehicle based on the online probability matrix and the current operating status. The online probability matrix is ​​used to represent the online pattern of the online vehicle in different time periods. The predicted execution time is matched with the predicted available time to determine the target vehicle from the online vehicles, and the task to be scheduled is assigned to the target vehicle.

2. The task scheduling method for vehicle-mounted edge computing according to claim 1, characterized in that, The construction of the online probability matrix corresponding to the online vehicle includes: Obtain the historical heartbeat data of the online vehicles; The historical heartbeat data is divided based on the day of the week and time period, and the number of times the online vehicles are online in each time period is counted. The online probability of the online vehicle in each time period is determined based on the historical online count. The online probabilities are smoothed using an exponentially weighted moving average algorithm, and the smoothed result is used as the element value for the corresponding time period to construct the online probability matrix corresponding to the online vehicles.

3. The task scheduling method for vehicle-mounted edge computing according to claim 1 or 2, characterized in that, The online probability matrix is ​​a 7×48 time-dimensional matrix, where the row dimension represents the 7 days of a week and the column dimension represents the 48 time periods of a day, with each time period corresponding to a preset time interval; the element values ​​in the online probability matrix represent the online probability of the online vehicle within the corresponding time period.

4. The task scheduling method for vehicle-mounted edge computing according to claim 2, characterized in that, The step of calculating the predicted availability time of the online vehicle based on the online probability matrix and the current operating state includes: Obtain the online probabilities for multiple consecutive time periods starting from the current time from the online probability matrix; The cumulative online probability of the online vehicle is calculated by multiplying the online probabilities of the multiple consecutive time periods in chronological order. When the cumulative online probability is greater than or equal to a preset confidence threshold, the number of online time periods of the online vehicle is determined, and the predicted available time of the online vehicle is calculated based on the current operating status and the number of online time periods.

5. The task scheduling method for vehicle-mounted edge computing according to claim 4, characterized in that, The current operating status includes parked charging status, driving status, and parked not charging status. The calculation of the predicted availability time of the online vehicle based on the current operating status and the number of online time periods includes: Obtain the correction coefficient corresponding to the current operating status of the online vehicles; use the correction coefficient to correct the number of online time periods, and calculate the predicted available duration based on the corrected number of online time periods and the preset time interval corresponding to each time period.

6. The task scheduling method for vehicle-mounted edge computing according to claim 1, characterized in that, Matching the prediction execution time with the prediction available time includes: Obtain the preset safety margin coefficient; The target execution time is determined based on the safety margin coefficient and the predicted execution time. If the predicted available time of the online vehicle is greater than or equal to the target execution time, then the online vehicle is determined to be the target vehicle; If there are multiple target vehicles, the target vehicles are sorted according to the predicted available time, and the task to be scheduled is assigned to the target vehicle at the top of the sort.

7. The task scheduling method for vehicle-mounted edge computing according to claim 6, characterized in that, Also includes: If no target vehicle is matched, the task status of the task to be scheduled is obtained; If the task status is an emergency state, an emergency scheduling strategy is executed, wherein the emergency scheduling strategy includes: reducing the preset safety margin coefficient to relax the matching conditions, or splitting the task to be scheduled into multiple sub-tasks and assigning them to multiple online vehicles for parallel execution. If the task to be scheduled is not urgent, then the task to be scheduled is added to the waiting queue.

8. A task scheduling device for vehicle-mounted edge computing, characterized in that, include: The acquisition module is used to obtain the predicted execution time of the task to be scheduled and the current operating status of online vehicles; The calculation module is used to construct the online probability matrix corresponding to the online vehicle, and calculate the predicted available time of the online vehicle based on the online probability matrix and the current operating status. The online probability matrix is ​​used to represent the online pattern of the online vehicle in different time periods. The scheduling module is used to match the predicted execution time with the predicted available time to determine the target vehicle from the online vehicles and assign the task to be scheduled to the target vehicle.

9. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the program to implement the task scheduling method for in-vehicle edge computing as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program or instructions stored thereon, characterized in that, When the computer program or instructions are executed, they implement the task scheduling method for vehicle edge computing as described in any one of claims 1-7.