Task scheduling method and device, electronic equipment and readable storage medium

By obtaining the basic priority, load sensitivity coefficient, and baseline load of a task, the real-time load and priority of the task are dynamically adjusted, solving the problems of rigid task scheduling and load adaptation in existing technologies, and realizing dynamic adaptability and security of task scheduling.

CN121501441APending Publication Date: 2026-02-10GUANGZHOU AUTOMOBILE GROUP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511575810.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-30
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

Existing task scheduling methods suffer from problems such as rigid fixed-priority scheduling, disconnect between single-dimensional load scheduling and security requirements, and inability of static thresholds to adapt to dynamic load changes in tasks, leading to delays in critical tasks and inefficient resource allocation.

Method used

By acquiring the basic priority, load sensitivity coefficient, and baseline load of a task, the real-time load and priority of the task are dynamically adjusted. Combined with a multi-dimensional load quantification model and a priority safety threshold mechanism, dynamic adaptability of task scheduling is achieved.

Benefits of technology

It improves the real-time performance, reliability, and security of task scheduling in complex traffic scenarios, ensures the resource utilization rate of critical tasks, reduces the excessive resource consumption of auxiliary tasks, and dynamically adapts to load changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121501441A_ABST
    Figure CN121501441A_ABST
Patent Text Reader

Abstract

The invention discloses a task scheduling method and device, electronic equipment and a readable storage medium, and belongs to the field of intelligent driving. The task scheduling method comprises the following steps: acquiring task information of a task; the task information at least comprises a basic priority, a load sensitivity coefficient and a reference load of the task; the load sensitivity coefficient reflects the influence of load change on the task; determining a real-time load of the task; determining the priority of the task according to the real-time load and the task information; and executing task scheduling of the task according to the priority. According to the method, the real-time performance, the safety and the resource utilization rate of the intelligent driving system can be improved, and the task execution reliability in a complex traffic scene is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of intelligent driving, specifically relating to a task scheduling method, device, electronic device, and readable storage medium. Background Technology

[0002] In the field of intelligent driving, task scheduling is a core technology for ensuring the real-time performance and safety of the system. Mainstream scheduling methods can be divided into three categories: fixed-priority scheduling, single-dimensional load scheduling, and static threshold scheduling.

[0003] However, the task scheduling methods in related technologies have shortcomings such as rigid fixed priority scheduling, disconnect between single-dimensional load scheduling and security requirements, and static thresholds that cannot adapt to dynamic load changes in tasks, which can easily lead to problems such as delays in critical tasks and inefficient resource allocation.

[0004] Therefore, how to provide a task scheduling method that can integrate multi-dimensional dynamic loads, dynamically adapt to various driving scenarios, and take into account task safety, so as to ensure the real-time performance, reliability, and safety of task execution in complex traffic scenarios, has become an urgent problem to be solved. Summary of the Invention

[0005] The purpose of this application is to provide a task scheduling method, apparatus, electronic device, and readable storage medium that can solve the problems of rigid fixed priority scheduling, disconnect between single-dimensional load scheduling and security requirements, and inability of static thresholds to adapt to dynamic load changes in tasks.

[0006] To solve the above-mentioned technical problems, this application is implemented as follows: In a first aspect, embodiments of this application provide a task scheduling method, the method comprising: Obtain task information for the task; the task information includes at least the task's basic priority, load sensitivity coefficient, and baseline load; the load sensitivity coefficient reflects the impact of load changes on the task. Determine the real-time load of the task; The priority of the task is determined based on the real-time load and the task information; Task scheduling is performed based on the stated priority.

[0007] Optionally, before obtaining the task information of the task, the method includes: Determine the task type of the task; the task type includes perception layer tasks, decision layer tasks, control layer tasks, and auxiliary tasks; The task information corresponding to the task is determined based on the task type.

[0008] Optionally, determining the real-time load of the task includes: Obtain the first task load data for the task; the first task load data includes at least computational load, data load, and environment-related load. Determine the task scenario corresponding to the task; Based on the task scenario, the weight coefficients corresponding to the computing load, data load, and environment-related load are determined as the first load weight coefficients. The real-time load of the task is determined based on the first task load data and the first load weighting coefficient.

[0009] Optionally, determining the priority of the task based on the real-time load and the task information includes: The priority update is triggered before each task is processed; The priority of the task is determined based on the current real-time load and the task information.

[0010] Optionally, determining the priority of the task based on the real-time load and the task information includes: The load fluctuation is determined based on the real-time load and the baseline load; The priority is updated when the load fluctuation exceeds a preset fluctuation threshold. The priority of the task is determined based on the current real-time load and the task information.

[0011] Optionally, determining the priority of the task based on the real-time load and the task information includes: The baseline load is updated according to a preset time interval; The priority update is triggered when the baseline load update is detected; The priority of the task is determined based on the current real-time load and the task information.

[0012] Optionally, the method further includes: Monitor the execution metrics of the task scheduling; the execution metrics include deadline fulfillment rate and resource utilization rate; If the deadline satisfaction rate is less than a preset satisfaction rate threshold, or the resource utilization rate does not meet the preset utilization rate threshold range, the first load weight coefficient is adjusted.

[0013] Secondly, embodiments of this application provide a task scheduling apparatus, the apparatus comprising: An acquisition module is used to acquire task information of the task; the task information includes at least the task's basic priority, load sensitivity coefficient, and baseline load; the load sensitivity coefficient reflects the impact of load changes on the task. A determination module is used to determine the real-time load of the task; A priority determination module is used to determine the priority of the task based on the real-time load and the task information; An execution module is used to perform task scheduling based on the priority of the task.

[0014] Thirdly, embodiments of this application provide an electronic device including a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the method described in the first aspect.

[0015] Fourthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first aspect.

[0016] In this embodiment, task information is obtained, including at least the task's basic priority, load sensitivity coefficient, and baseline load. The real-time load of the task is then determined, and the task priority is determined based on the real-time load and task information. Finally, task scheduling is executed according to the priority. This allows task scheduling to dynamically adapt to real-time load changes, ensuring the real-time performance, reliability, and security of task execution in complex traffic scenarios. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a flowchart illustrating the steps of a task scheduling method provided in an embodiment of this application; Figure 2 This is a flowchart illustrating the steps of another embodiment of the task scheduling method of this application; Figure 3 This is a flowchart illustrating the steps of another embodiment of the task scheduling method of this application; Figure 4 This is a dynamic priority adjustment and scheduling execution logic diagram of an embodiment of the task scheduling method of this application; Figure 5 This is a schematic diagram of a multi-dimensional load quantization model, which is another embodiment of the task scheduling method of this application. Figure 6 This is a structural block diagram of a task scheduling device provided in an embodiment of this application. Detailed Implementation

[0019] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. The terms "first," "second," etc., in the specification and claims of this application are used to distinguish similar objects and are not used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application can be implemented in orders other than those illustrated or described herein. In addition, "and / or" in the specification and claims indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following related objects are in an "or" relationship.

[0020] In the field of intelligent driving, task scheduling is a core technology for ensuring the real-time performance and safety of the system. Mainstream scheduling methods can be divided into three categories: Fixed-priority scheduling: In traditional automotive electronic systems, control execution tasks are preset to the highest priority, while perception tasks have a fixed lower priority. Its disadvantage is that it cannot adapt to dynamic load changes. When the perception task experiences a sudden increase in load due to environmental complexity, such as a surge in camera data noise caused by heavy rain, insufficient priority can easily lead to delays in data processing and decision-making lags.

[0021] Single-dimensional load scheduling: such as adjusting priorities based on CPU (Central Processing Unit) utilization or allocating resources based on GPU load. These methods only focus on hardware resource consumption and do not consider the security relevance of the tasks themselves. For example, they fail to consider that the impact of load fluctuations in decision-making tasks on security is far greater than that of auxiliary tasks, which can lead to a mismatch between resource allocation and security requirements.

[0022] Static threshold scheduling: This method, which triggers priority adjustment by setting a fixed load threshold, cannot dynamically optimize the threshold parameters according to the scenario. It is prone to misjudgment in complex scenarios. For example, it may lead to misjudgment of the priority of corresponding tasks because it cannot match the large difference in demand between the load thresholds of congested road sections and highway sections.

[0023] To address the problems of rigid fixed-priority scheduling, disconnect between single-dimensional load scheduling and security requirements, and inability of static thresholds to adapt to dynamic scenarios in related technologies, this application provides a task scheduling method that can quantify the real-time load of tasks and adaptively adjust task priorities based on dynamic load changes and task information.

[0024] The task scheduling provided by the embodiments of this application will be described in detail below with reference to the accompanying drawings, through specific examples and application scenarios.

[0025] Reference Figure 1 This is a flowchart illustrating the steps of an embodiment of a task scheduling method according to this application, including the following steps: Step 101: Obtain the task information of the task; the task information includes at least the basic priority, load sensitivity coefficient, and baseline load of the task; Among them, the task information can be preset according to the task type, the basic priority of the task can reflect the degree of impact of the task on driving safety, the load sensitivity coefficient of the task can reflect the impact of load changes on the task, especially the weight of the impact of load changes on task safety, and the baseline load of the task can be set according to the average load under different driving scenarios.

[0026] Step 102: Determine the real-time load of the task; Among them, the real-time load of a task refers to the workload indicator that is monitored in real time and dynamically adjusted in terms of resource allocation when processing a task. It can reflect the task's immediate demand for system resources and the current resource utilization status of the system.

[0027] Step 103: Determine the priority of the task based on the real-time load and the task information; The task priority can be represented as the priority setting used to adjust process scheduling based on the current situation during task execution.

[0028] Step 104: Execute the task scheduling according to the priority.

[0029] The system can acquire task information such as basic priority, load sensitivity coefficient, and baseline load to determine the real-time load of a task. Then, based on the real-time load and task information, it determines the dynamic priority of the task and executes task scheduling according to the dynamic priority. The dynamic priority of a task can be calculated based on the load fluctuation obtained from the real-time load and baseline load, combined with the basic priority and load sensitivity coefficient. The corresponding calculation formula is: P = P0 × (1 + k × ΔL). Here, P represents the task priority, P0 represents the task's basic priority, k represents the task's load sensitivity coefficient, and ΔL represents the task's load fluctuation coefficient. The calculation formula for the load fluctuation coefficient is: ΔL = (L - L0) / L0, where L represents the task's real-time load and L0 represents the task's baseline load. When ΔL > 0, it means the current real-time load is higher than the baseline load, and the task priority will increase with the increase of the real-time load. When ΔL < 0, it means the current real-time load is lower than the baseline load, and the task priority can be appropriately reduced. For example, assuming the current task is a perception task with a base priority of 6 and a load sensitivity coefficient of 1.2, when the real-time load of the current task increases by 50% compared to the baseline load, the corresponding priority P = 6 × (1 + 1.2 × 0.5) = 9.6 (level). Assuming the current task is an auxiliary task with a base priority of 3 and a load sensitivity coefficient of 0.5, when the real-time load of the current task decreases by 30% compared to the baseline load, the corresponding priority P = 3 × (1 + 0.5 × (-0.3)) = 2.55 (level). Through the above implementation process, introducing base priority and load sensitivity coefficient ensures that resources are tilted towards safety-critical tasks. Compared to task scheduling with fixed priorities, priority adjustment can simultaneously meet load and safety requirements, improve the resource utilization rate of core tasks such as decision-making and perception tasks, ensure that their priority increases significantly when their load increases, reduce excessive resource consumption by auxiliary tasks, and enable task scheduling to dynamically adapt to real-time load changes, resulting in more scientific and reasonable dynamic priorities for task scheduling, thereby ensuring the real-time performance, reliability, and safety of task execution in complex traffic scenarios.

[0030] For example, the task scheduler can schedule tasks based on dynamic priorities. The task scheduler can employ a scheduling strategy combining priority preemption and time-slice round-robin. Higher-priority tasks can preempt resources from lower-priority tasks; for example, a perception task with P=9.6 can preempt GPU resources from an auxiliary task with P=2.55. Tasks of the same priority can be executed in a round-robin fashion according to a preset time slice, such as 10ms, to avoid a single task occupying resources for an extended period. Furthermore, decision-making and control-level tasks have a significant impact on driving safety. If the execution priority of these tasks is too low, resulting in slow execution, it can easily lead to safety issues. Therefore, a task priority safety threshold mechanism can be set for decision-making and control-level tasks. When the priority of a decision-making or control-level task falls below the preset priority safety threshold, it is forcibly elevated to the highest level to prevent timely responses and ensure that core safety tasks are not limited by resources. The priority safety threshold can be set to 7 levels, and the specific priority safety threshold can also be preset according to the actual priority settings of various tasks; this application does not impose specific restrictions on this. Decision-making, perception, and control tasks that are above the priority safety threshold can be classified as high-priority tasks. For auxiliary tasks, even if their priority is above the priority safety threshold, they will not be included in the scope of high-priority task determination, in order to prevent non-critical auxiliary tasks from taking over core resources.

[0031] In one embodiment of this application, before obtaining the task information of the task, the method includes: Determine the task type of the task; the task type includes perception layer tasks, decision layer tasks, control layer tasks, and auxiliary tasks; The task information corresponding to the task is determined based on the task type.

[0032] The tasks at the perception layer can include at least LiDAR point cloud processing and camera target detection; the tasks at the decision layer can include at least path planning and behavior decision-making; the tasks at the control layer can include at least throttle control command generation and brake control command generation; and the auxiliary tasks can include at least log recording and vehicle-to-everything (V2X) communication.

[0033] The task type can be determined, and then the corresponding task information can be determined based on the task type. For example, when presetting basic priorities for various tasks, the basic priority for control layer tasks can be set to the highest level of 10, the basic priority for decision layer tasks to level 8, the basic priority for perception layer tasks to level 6, and the basic priority for auxiliary tasks to level 3. The basic priorities of various tasks can also be reasonably set according to actual needs. Generally, the basic priorities of perception layer tasks, decision layer tasks, control layer tasks, and auxiliary tasks are set in descending order of priority. This application does not impose specific restrictions on this. For example, when presetting load sensitivity coefficients for various tasks, the load sensitivity coefficient for control layer tasks can be set to 1.2, the load sensitivity coefficient for decision layer tasks to 1.0, the load sensitivity coefficient for perception layer tasks with small load fluctuations to 0.8, and the load sensitivity coefficient for auxiliary tasks to 0.5. The load sensitivity coefficients of various tasks can also be reasonably set according to actual needs. Generally, the load sensitivity coefficients of perception layer tasks, decision layer tasks, control layer tasks, and auxiliary tasks are set in descending order of priority. This application does not impose specific restrictions on this. For example, when presetting the baseline load for various tasks, it can be set according to the average load under various driving scenarios. The driving scenario can be set according to weather conditions and / or road conditions, such as sunny weather, open road scenarios, etc. This application does not impose specific limitations on this. Through the above implementation process, the task information corresponding to each task can be determined according to the task type of each task. The pre-setting of task information takes into account the impact on safety and the impact of different driving scenarios, which helps to integrate the safety importance of the task and adapt to various driving scenarios when determining the task priority, balance resource allocation and safety, and ensure the real-time performance, reliability and safety of task execution in complex traffic scenarios.

[0034] Reference Figure 2 This is a flowchart illustrating the steps of another embodiment of the task scheduling method of this application. In one embodiment of this application, determining the real-time load of the task includes: Step 201: Obtain the first task load data of the task; the first task load data includes at least computing load, data load and environment-related load; Among them, computing load can represent the usage of computing resources when running a task, data load can represent the workload and resource consumption required when processing a task, and environment-related load can represent the load related to the vehicle's operating environment in a certain driving scenario.

[0035] Step 202: Determine the task scenario corresponding to the task; The task scenario can refer to the road scenario where the vehicle is currently located, such as urban roads, highways, mountain roads, rural roads, etc. This application does not make specific limitations on this.

[0036] Step 203: Determine the weight coefficients corresponding to the computing load, data load, and environment-related load respectively as the first load weight coefficients based on the task scenario; Step 204: Determine the real-time load of the task based on the first task load data and the first load weight coefficient.

[0037] The system can acquire computational load, data load, and environment-related load data as the first task load data to determine the corresponding task scenario. Then, based on the task scenario, it determines the preset weight coefficients for the computational load, data load, and environment-related load as the first load weight coefficients. For example, for an urban road scenario, the weight coefficients for computational load, data load, and environment-related load can be set to 0.3, 0.4, and 0.3, respectively; for a highway scenario, the weight coefficients can be set to 0.4, 0.2, and 0.4, respectively. The weight coefficients for computational load, data load, and environment-related load in each task scenario can be optimized based on the actual simulation results obtained from simulation tests of the corresponding task scenario; this application does not impose specific limitations on this. After acquiring the first task load data and determining the corresponding first load weight coefficients based on the task scenario, the real-time load of the task can be determined based on the first task load data and the first load weight coefficients. Through the above implementation process, three types of parameters—computational load, data load, and environmentally related load—are comprehensively considered when determining real-time load. This allows for a more comprehensive and accurate reflection of the load situation of the intelligent driving system during actual operation, avoiding inaccurate assessments caused by considering only a single factor. Multi-dimensional load quantification can be used to quantify the real-time load corresponding to each task, accurately capturing load characteristics under different scenarios and improving the comprehensiveness of load assessment. Compared to the single-dimensional load used in related technologies, this improves the task deadline fulfillment rate and enhances the dynamic adaptability of task scheduling in complex scenarios.

[0038] The formula for calculating the real-time load of a task is: L = α × C + β × D + γ × E.

[0039] Where: L represents the real-time load of the task, C represents the computational load of the task, D represents the data load of the task, E represents the environmental load of the task, and α, β, and γ are the corresponding weighting coefficients.

[0040] For example, the computational load can include at least the computing power requirements, memory usage, and computation time of the CPU or GPU (Graphics Processing Unit). The computing power requirements of the CPU or GPU can be collected in real time by the hardware monitoring module of the intelligent driving system. During task execution, the real-time load of the CPU / GPU's floating-point unit (FPU) or streaming multiprocessor (SM) is monitored, and the number of floating-point operations required for a single frame task, such as LiDAR point cloud clustering or camera target detection, is calculated. Memory usage can be read by the system's memory management unit (MMU). When the task is loaded, the size of the physical memory (or virtual memory) used by the task is recorded. During task execution, the peak memory usage is updated in real time, excluding redundant data from temporary caches to ensure data accuracy. Computation time can be calculated using a high-precision timer, such as a microsecond-level clock, recording the time difference between the start and end times of task execution. Idle time while waiting for resources should be excluded; only the actual computation time is counted.

[0041] For example, the data load can include at least the amount of sensor input data and the data update frequency. The amount of sensor input data can include at least the number of LiDAR point cloud points and the number of camera image pixels. The number of LiDAR point cloud points can be obtained by directly reading the output frame data of the LiDAR sensor, counting the number of valid points in each frame of the point cloud, and filtering out invalid noise points. The number of camera image pixels can be calculated based on the image resolution of the camera output or the resolution parameters of the camera. The data update frequency can be obtained based on the number of valid data frames output by the sensor within a preset time window. When the task scenario changes, the number of frames in the statistical window can be dynamically updated, thereby updating the data update frequency. For example, in a congested scenario, the sensor output frequency is reduced, and the data update frequency can be dynamically updated in this case. For example, environmental loads can include at least the number of traffic participants, road curvature, and weather impact coefficients. The number of traffic participants can represent the total number of traffic participants passing through a certain point on the road, including motor vehicles, non-motor vehicles, and pedestrians. The number of traffic participants can be extracted from the output of the perception layer task. The perception module can identify and output the number of traffic participants within the current field of view using camera target detection models, LiDAR target tracking algorithms, etc. Road curvature can be obtained based on the vehicle's current positioning, for example, by fusing the vehicle's current GPS (Global Positioning System) + IMU (Inertial Measurement Unit) positioning and matching the curvature parameters of the corresponding road segment in a high-precision map. Alternatively, in scenarios without a high-precision map, road curvature can also be inferred from the vehicle's real-time speed and steering angle, combined with a kinematic model. Weather impact coefficients can be pre-calibrated based on various weather conditions. Weather impact coefficients can be determined based on environmental sensors and a pre-set weather coefficient mapping table. The system can determine the current weather type based on sensors such as rain, light, and humidity sensors installed in the vehicle. For example, it can detect "heavy rain" using the rain sensor and "sunny" using the light sensor. Then, it can refer to a preset weather coefficient mapping table to determine the corresponding coefficient for the current weather. For instance, the weather influence coefficient for sunny weather is 1.0, for heavy rain it is 1.5, for light rain it is 1.2, and for fog it is 1.8, etc., and the coefficient value is directly output. The weather influence coefficients for various weather types can be set according to actual needs, and this application does not impose specific limitations on them.

[0042] For example, in urban road scenarios, due to the dense sensor data, the weighting coefficient corresponding to the data load should be higher. In highway scenarios, because road curvature and vehicle speed have a significant impact on decision-making, the weighting coefficient corresponding to the environmental correlation load should be higher. Different initial load weighting coefficients can be adapted according to different driving scenarios.

[0043] In one embodiment of this application, determining the priority of the task based on the real-time load and the task information includes: The priority update is triggered before each task is processed; The priority of the task is determined based on the current real-time load and the task information.

[0044] Priority updates can be triggered before each task processing, and then the dynamic priority of the task can be determined based on the current real-time load and task information. Intelligent driving systems typically process tasks in frames; for example, a perception task processes one frame of data every 100ms. The basic calculation cycle of the priority can be aligned with the task processing cycle, such as calculating it every 100ms. Before each task processing, the priority of the current task is calculated based on the latest collected real-time load and baseline load. Through this implementation process, it can be ensured that the priority used in each task processing is the latest priority determined based on the current real-time load and task information. This allows task scheduling to dynamically adapt to real-time load changes, ensuring the real-time nature and accuracy of priority allocation for tasks.

[0045] In one embodiment of this application, determining the priority of the task based on the real-time load and the task information includes: The load fluctuation is determined based on the real-time load and the baseline load; The priority is updated when the load fluctuation exceeds a preset fluctuation threshold. The priority of the task is determined based on the current real-time load and the task information.

[0046] Load fluctuations can be determined based on real-time load and baseline load. Specifically, load fluctuations are determined by the difference between the real-time load and the baseline load. A load fluctuation threshold can be preset; when the load fluctuation exceeds the preset threshold, a priority update is triggered, and the dynamic priority of tasks is determined based on the current real-time load and task information. Through this implementation process, priority updates can be triggered immediately when load fluctuations exceed the preset threshold, avoiding potential lag in priority adjustments caused by sudden load increases. This eliminates the need to wait for the base cycle, ensuring that high-load tasks can promptly increase their priority and seize resources, guaranteeing the real-time nature and accuracy of priority allocation for tasks.

[0047] In one embodiment of this application, determining the priority of the task based on the real-time load and the task information includes: The baseline load is updated according to a preset time interval; The priority update is triggered when the baseline load update is detected; The priority of the task is determined based on the current real-time load and the task information.

[0048] The time interval for updating the baseline load can be preset. The baseline load is updated based on the average load within the preset time interval. When a baseline load update is detected, the priority of all tasks is forcibly updated, and the dynamic priority of tasks is determined based on the current real-time load and task information. The current baseline load is the average real-time load within the previous sliding window (the time interval for updating the baseline load) in the current scenario. Through the above implementation process, the baseline load is updated periodically, reducing load assessment errors during scenario switching and minimizing scheduling errors caused by parameter mismatch. It also ensures that the corresponding priorities can dynamically match after the baseline load changes, avoiding parameter mismatch. This achieves coordination between dynamic task priority and baseline load updates.

[0049] For example, priority calculation can be achieved through a combination of real-time triggering and periodic calculation. The primary method is to trigger periodic updates of priorities corresponding to the basic calculation cycle synchronized with the task processing cycle, while the secondary method is to trigger immediate updates of priorities triggered by load fluctuations and baseline load updates. This approach can ensure timely updates of dynamic priorities while avoiding excessive system resource consumption caused by continuous real-time priority calculation.

[0050] In one embodiment of this application, the method further includes: Monitor the execution metrics of the task scheduling; the execution metrics include deadline fulfillment rate and resource utilization rate; If the deadline satisfaction rate is less than a preset satisfaction rate threshold, or the resource utilization rate does not meet the preset utilization rate threshold range, the first load weight coefficient is adjusted.

[0051] During task initialization, the planned deadline for each task can be preset and stored through the system task management module, while also marking the task type. For example, the "LiDAR point cloud processing" task in the perception task needs to be completed within 100ms, so its planned deadline can be marked as 100ms. The "path planning" task in the decision task needs to be completed within 50ms, so its planned deadline can be marked as 50ms. Task scheduling execution metrics can be monitored, including the deadline fulfillment rate and resource utilization. The deadline fulfillment rate indicates whether the execution time of a task meets the preset planned deadline. The actual completion time of each task can be collected in real time using system timers and task status registers, and the time difference between the actual completion time and the planned deadline can be calculated after the task is completed. The actual completion time of each task can be calculated based on the timestamp from task startup to output result. A preset feedback optimization period can be used as a statistical window, and the deadline fulfillment rate can be calculated using the following formula: Deadline fulfillment rate = (Number of core tasks with actual completion time ≤ planned deadline within the window) / Total number of core tasks within the window × 100%. For example, the feedback optimization cycle can be set to 10 minutes. If 1000 perception tasks are executed within 10 minutes, and 995 of them are completed within the planned deadline, the calculated deadline fulfillment rate is 99.5%. Resource utilization can represent the efficiency of various hardware resources. Relevant resource utilization can be obtained through hardware resource monitoring. For example, it can be achieved through CPU kernel monitoring interfaces, such as the CPU's `top` command (system process monitoring command), and through memory management modules to collect CPU utilization, GPU utilization, and memory utilization in real time. CPU utilization can include the real-time utilization rate of a single core / total cores, obtained by "the computing power requirement of the currently running task / the total CPU computing power". GPU utilization can include real-time computing power utilization and video memory utilization. Real-time computing power utilization is obtained by "the current task's FLOPS (floating-point operations per second) consumption / the GPU's maximum FLOPS", and video memory utilization is obtained by "used video memory / total video memory". Memory utilization can be the real-time utilization rate of system memory, obtained by "allocated memory / total memory". Then, the collected hardware resource data can be bound to the currently running tasks. For example, by associating tasks with their corresponding hardware resource data through task identifiers, it is possible to distinguish between "core tasks consuming resources" and "auxiliary tasks consuming resources," thus avoiding interference from non-critical tasks in the statistics. Then, based on a preset resource utilization statistics window, a weighted average of the collected CPU utilization, GPU utilization, and memory utilization can be calculated to determine the overall resource utilization rate.For example, the resource utilization statistics window can be set to 1 minute. Since intelligent driving has higher computing power requirements, the weights of CPU utilization, GPU utilization, and memory utilization can be set to 0.4, 0.4, and 0.2, respectively. This application does not impose specific restrictions on this. Then, the overall resource utilization rate = (CPU utilization × 0.4 + GPU utilization × 0.4 + memory utilization × 0.2) × 100%. If the deadline fulfillment rate of high-priority tasks is found to be lower than the preset fulfillment rate threshold, or if resource utilization does not meet the preset utilization threshold range, the first load weight coefficient can be adjusted accordingly. High-priority tasks can include three core security tasks: perception layer tasks, decision layer tasks, and control layer tasks. The fulfillment rate threshold can be set to 99%, and the utilization threshold range can be set to greater than or equal to 70% and less than or equal to 90%. The adjustment strategy for the first load weight coefficient needs to be generated comprehensively based on abnormal indicators and task scenarios, and the sum of the first load weight coefficients must be guaranteed to be 1 to avoid load assessment distortion. The adjustment range of the first load weight coefficient, including the computation load weight coefficient, data load weight coefficient, and environment-related load weight coefficient, can be limited to no more than 0.1 each time to avoid system fluctuations caused by excessive weight coefficient adjustments. After each adjustment of the first load weight coefficient, a preset feedback period (e.g., 10 minutes) can be used as a verification window. The deadline fulfillment rate and resource utilization of the tasks within this feedback period are monitored. If the execution metrics meet the corresponding threshold range, the adjusted weight coefficient is retained. If the execution metrics still show anomalies, the first load weight coefficient adjustment steps described above can be repeated until the execution metrics are satisfactory. Through this implementation process, by monitoring execution metrics and dynamically updating the first load weight coefficient corresponding to the task, real-time adaptation to scenario changes can be achieved. This reduces load assessment errors and optimizes load assessment accuracy during scenario switching, minimizing scheduling errors caused by parameter mismatches.

[0052] For example, if the deadline fulfillment rate for a high-priority perception task is less than 99%, and anomaly indicators are analyzed, if the analysis of the load composition reveals that the proportion of computational load (computational load / total load × 100%) is greater than 50%, it can be determined that the weight of computational load is too low, resulting in the real-time load not fully reflecting the computing power demand and insufficient resource allocation. In this case, the weight coefficient corresponding to the computational load can be increased (e.g., increased by 0.1), and the coefficient with the lowest weight in the current scenario can be reduced. Usually, the weight of loads unrelated to anomalies is reduced first.

[0053] For example, if the deadline fulfillment rate for a high-priority decision-making task is less than 99%, and anomaly indicators are analyzed, if the analysis of the load composition reveals that the proportion of environmentally related load (environmentally related load / total load × 100%) is greater than 40%, then the current task scenario may correspond to a highway and a rainy day. In this case, it can be determined that the weight of the environmentally related load is too low, causing the real-time load to fail to fully reflect the impact of weather and road curvature on decision-making. In this case, the weight coefficient corresponding to the environmentally related load can be increased (e.g., increased by 0.1). And because the sensitivity to data volume is low in the highway scenario, the weight coefficient corresponding to the data load can be reduced accordingly.

[0054] For example, if the resource utilization rate corresponding to the current task is less than 70%, it can be determined that there is a waste of resources. If the analysis of the load composition finds that the proportion of data load (data load / total load × 100%) is less than 20%, then there may be a situation where the data volume drops sharply due to a temporary failure of the sensors in the urban road section. Correspondingly, it can be determined that the weight of data load is too high, causing the real-time load to be underestimated due to the low data load, which in turn leads to the task priority being falsely low and resources being idle. At this time, the weight coefficient corresponding to data load can be reduced (e.g., reduced by 0.1), and the weight coefficient corresponding to computing load can be increased (e.g., increased by 0.1), so as to utilize idle resources to support tasks that require computing power.

[0055] For example, if the resource utilization rate corresponding to the current task is greater than 90%, it can be determined that there is a resource overload. If the analysis of the load composition shows that the proportion of computing load (computing load / total load × 100%) is greater than 60%, then there may be a situation where multiple perception tasks are running simultaneously, causing computing power to be strained. Correspondingly, it can be determined that the weight of computing load is too high, causing a large number of tasks to have artificially high priority due to the high weight coefficient of computing load, thus preempting system resources. At this time, the weight coefficient corresponding to computing load can be reduced (e.g., reduced by 0.1), and the weight coefficient corresponding to data load can be increased (e.g., increased by 0.1). The current proportion of data load is low, and the data task has low computing power requirements, which can alleviate the overload.

[0056] Reference Figure 3 This is a flowchart illustrating the steps of another embodiment of the task scheduling method of this application, including the following steps: Step 301 involves task classification and basic parameter definition. Task classification categorizes tasks into perception tasks, decision-making tasks, control tasks, and auxiliary tasks. Basic parameter definition includes defining basic priority, load sensitivity coefficient, and basic load.

[0057] Step 302: Perform multi-dimensional load quantification assessment, including: integrated computing load, data load, and environment-related load; and adapt to different scenarios through dynamic weights.

[0058] Step 303, perform priority calculation, including: dynamically adjusting the priority based on the basic priority, load sensitivity coefficient and load fluctuation.

[0059] Step 304: Perform task scheduling according to the hybrid strategy, including: high-priority tasks can preempt resources; tasks of the same priority are rotated in time slices; and priority safety thresholds are set for core tasks to ensure their mandatory protection.

[0060] Step 305, feedback optimization, includes: monitoring task execution metrics, including the deadline fulfillment rate and resource utilization rate of monitoring tasks; dynamically optimizing parameters to adapt to changes in the scenario; and returning to step 303 after completing the feedback optimization.

[0061] Through the above implementation steps, multi-dimensional load quantification and feedback optimization enable the system to accurately capture the load characteristics of different scenarios. Compared to single-dimensional methods in related technologies, this improves the deadline fulfillment rate and makes the system more stable in complex scenarios such as heavy rain and traffic congestion. Using basic priority and load sensitivity coefficients as safety weights, combined with a priority safety threshold enforcement mechanism set for core tasks, ensures that resources are tilted towards safety-critical tasks. Compared to fixed priority methods in related technologies, this further improves the resource utilization rate of decision-making tasks and reduces unnecessary resource waste caused by auxiliary tasks. Introducing dynamic weights reduces load assessment errors during scenario switching, such as switching from urban road scenarios to highway scenarios, thus reducing scheduling errors caused by parameter mismatch.

[0062] Reference Figure 4 This is a dynamic priority adjustment and scheduling execution logic diagram of a task scheduling method embodiment of this application.

[0063] Initiate dynamic priority adjustment and task scheduling; Input the real-time load and basic parameters. The basic parameters are the task information of this application, including the basic priority, load sensitivity coefficient and baseline load. Calculate the load fluctuation coefficient, which represents the proportion of deviation between the real-time load and the reference load; Calculate dynamic priority and obtain priority safety threshold: Calculate dynamic priority by combining basic priority, load sensitivity coefficient and load fluctuation coefficient; priority safety threshold can be determined according to decision task and corresponding system level, and according to control task and corresponding resource level; Determine whether the dynamic priority of the control task is lower than the safety threshold; If so, then it will be forcibly elevated to the highest priority; If not, retain the current dynamic priority; The scheduling strategy is as follows: high-priority tasks preempt low-priority resources; tasks of the same priority are executed in a round-robin fashion using time slices. Execute tasks and monitor performance metrics, including task deadlines and resource utilization. The feedback optimization module adjusts parameters, including adjusting the first load weight coefficient according to the execution indicators such as the task deadline and resource utilization obtained from monitoring. End dynamic priority adjustment and task scheduling.

[0064] Through the above-mentioned dynamic priority adjustment and scheduling execution logic, task scheduling can dynamically adapt to real-time load changes, ensuring the real-time performance, reliability, and security of task execution in complex traffic scenarios.

[0065] Reference Figure 5 This is a schematic diagram of a multi-dimensional load quantization model, which is another embodiment of the task scheduling method of this application.

[0066] Environmental parameters can be determined based on the number of traffic participants, road complexity (such as road curvature), and environmental impacts (such as weather). The data load parameters can be determined based on the amount of sensor input data and the data update frequency. The computational load parameters can be determined based on CPU / GPU computing power requirements, memory usage, and computation time. The defined parameters can be aggregated to obtain the aggregated environment load, aggregated data load, and aggregated computation load. Dynamic weight allocation is implemented; for example, for urban roads, data load is assigned a higher weight, while for highways, environmental load is assigned a higher weight. Calculate the real-time load value, including: calculating the real-time load value based on the dynamic weight allocation results and the aggregated environmental load, aggregated data load, and aggregated computation load; Output real-time load values.

[0067] By quantifying real-time load using the aforementioned multi-dimensional load quantification model, computational load, data load, and environment-related load can be integrated. Through corresponding dynamic weight coefficients, different scenarios can be adapted, achieving comprehensive load assessment and scenario adaptability.

[0068] It should be noted that the task scheduling method provided in this application embodiment can be executed by a task scheduling device, or a control module in the task scheduling device for executing the loading task scheduling method. This application embodiment uses the execution of the loading task scheduling method by a task scheduling device as an example to illustrate the task scheduling method provided in this application embodiment.

[0069] Figure 6This is a schematic diagram of a task scheduling device provided in an embodiment of the present invention, the device comprising: The acquisition module 601 is used to acquire task information of the task; the task information includes at least the basic priority, load sensitivity coefficient and baseline load of the task; the load sensitivity coefficient reflects the impact of load changes on the task. The determination module 602 is used to determine the real-time load of the task; Priority determination module 603 is used to determine the priority of the task based on the real-time load and the task information; The execution module 604 is used to perform task scheduling of the task according to the priority.

[0070] The task scheduling device further includes: The task type determination module is used to determine the task type of the task; the task type includes perception layer tasks, decision layer tasks, control layer tasks, and auxiliary tasks; The task information determination module is used to determine the task information corresponding to the task based on the task type.

[0071] The determining module further includes: The first task load data acquisition submodule is used to acquire the first task load data of the task; the first task load data includes at least computing load, data load and environment-related load. The task scenario determination submodule is used to determine the task scenario corresponding to the task. The first load weight coefficient determination submodule is used to determine the weight coefficients corresponding to the computing load, data load and environment-related load respectively as the first load weight coefficients according to the task scenario. The real-time load determination submodule is used to determine the real-time load of the task based on the first task load data and the first load weighting coefficient.

[0072] The priority determination module is further used for: The priority update is triggered before each task is processed; The priority of the task is determined based on the current real-time load and the task information.

[0073] The priority determination module is further used for: The load fluctuation is determined based on the real-time load and the baseline load; The priority is updated when the load fluctuation exceeds a preset fluctuation threshold. The priority of the task is determined based on the current real-time load and the task information.

[0074] The priority determination module is further used for: The baseline load is updated according to a preset time interval; The priority update is triggered when the baseline load update is detected; The priority of the task is determined based on the current real-time load and the task information.

[0075] The determining module further includes: The monitoring submodule is used to monitor the execution metrics of the task scheduling; the execution metrics include deadline fulfillment rate and resource utilization rate. The adjustment submodule is used to adjust the first load weight coefficient when the deadline satisfaction rate is less than a preset satisfaction rate threshold or the resource utilization rate does not meet the preset utilization rate threshold range.

[0076] The task scheduling device in this application embodiment can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. For example, mobile electronic devices can be mobile phones, tablets, laptops, PDAs, in-vehicle electronic devices, wearable devices, ultra-mobile personal computers (UMPCs), netbooks, or personal digital assistants (PDAs), etc., while non-mobile electronic devices can be servers, network-attached storage (NAS), personal computers (PCs), televisions (TVs), ATMs, or self-service machines, etc. This application embodiment does not impose specific limitations.

[0077] The task scheduling device in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit the specific operating system used.

[0078] The task scheduling device provided in this application embodiment can achieve... Figures 1 to 5 The various processes implemented by the task scheduling device in the method embodiment will not be described again here to avoid repetition.

[0079] This application provides a task scheduling device that can acquire task information, including at least the task's basic priority, load sensitivity coefficient, and baseline load. This allows for the determination of the task's real-time load, and then the determination of the task's priority based on the real-time load and task information. Finally, task scheduling is executed according to the priority. This enables task scheduling to dynamically adapt to real-time load changes, ensuring the real-time performance, reliability, and safety of task execution in complex traffic scenarios.

[0080] This application also provides an electronic device, including a processor, a memory, and a program or instructions stored in the memory and executable on the processor. When the program or instructions are executed by the processor, they implement the various processes of the above-described task scheduling method embodiments and achieve the same technical effects. To avoid repetition, they will not be described again here.

[0081] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.

[0082] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described task scheduling method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0083] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0084] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0085] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0086] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A task scheduling method, characterized in that, The method includes: Obtain task information for the task; the task information includes at least the task's basic priority, load sensitivity coefficient, and baseline load; the load sensitivity coefficient reflects the impact of load changes on the task. Determine the real-time load of the task; The priority of the task is determined based on the real-time load and the task information; Task scheduling is performed based on the stated priority.

2. The method according to claim 1, characterized in that, Before obtaining the task information of the task, the method includes: Determine the task type of the task; the task type includes perception layer tasks, decision layer tasks, control layer tasks, and auxiliary tasks; The task information corresponding to the task is determined based on the task type.

3. The method according to claim 1, characterized in that, Determining the real-time load of the task includes: Obtain the first task load data for the task; the first task load data includes at least computational load, data load, and environment-related load. Determine the task scenario corresponding to the task; Based on the task scenario, the weight coefficients corresponding to the computing load, data load, and environment-related load are determined as the first load weight coefficients. The real-time load of the task is determined based on the first task load data and the first load weighting coefficient.

4. The method according to claim 1, characterized in that, Determining the priority of the task based on the real-time load and the task information includes: The priority update is triggered before each task is processed; The priority of the task is determined based on the current real-time load and the task information.

5. The method according to claim 1, characterized in that, Determining the priority of the task based on the real-time load and the task information includes: The load fluctuation is determined based on the real-time load and the baseline load; The priority is updated when the load fluctuation exceeds a preset fluctuation threshold. The priority of the task is determined based on the current real-time load and the task information.

6. The method according to claim 1, characterized in that, Determining the priority of the task based on the real-time load and the task information includes: The baseline load is updated according to a preset time interval; The priority update is triggered when the baseline load update is detected; The priority of the task is determined based on the current real-time load and the task information.

7. The method according to claim 3, characterized in that, The method further includes: Monitor the execution metrics of the task scheduling; the execution metrics include deadline fulfillment rate and resource utilization rate; If the deadline satisfaction rate is less than a preset satisfaction rate threshold, or the resource utilization rate does not meet the preset utilization rate threshold range, the first load weight coefficient is adjusted.

8. A task scheduling device, characterized in that, The device includes: An acquisition module is used to acquire task information of the task; the task information includes at least the task's basic priority, load sensitivity coefficient, and baseline load; the load sensitivity coefficient reflects the impact of load changes on the task. A determination module is used to determine the real-time load of the task; A priority determination module is used to determine the priority of the task based on the real-time load and the task information; An execution module is used to perform task scheduling based on the priority of the task.

9. An electronic device, characterized in that, It includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the task scheduling method as described in claims 1-7.

10. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the task scheduling method as described in claims 1-7.