Automatic driving task scheduling method, system and equipment based on dynamic priority

By dividing autonomous driving tasks into perception and reasoning tasks and optimizing scheduling based on a dynamic priority calculation formula, the problems of low resource utilization and task blocking delays in existing technologies are solved, achieving more efficient resource allocation and system stability.

CN121849178APending Publication Date: 2026-04-14HONEYCOMB (WUHAN) MICROSYSTEM TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-30
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

The task scheduling strategies in existing autonomous driving systems result in low utilization of computing resources, high task blocking latency, and poor system real-time performance, making it unable to dynamically respond to changes in resource contention.

Method used

A task scheduling method based on dynamic priority is adopted. By dividing autonomous driving tasks into perception tasks and reasoning tasks, a task pool is constructed, and the scheduling priority is calculated using a dynamic priority calculation formula. Processor cores are dynamically allocated to optimize resource utilization and avoid task blocking.

Benefits of technology

It effectively improved resource utilization, avoided task blocking and delays, and enhanced the real-time performance and stability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121849178A_ABST
    Figure CN121849178A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of automatic driving, in particular to an automatic driving task scheduling method, system and equipment based on dynamic priority, and the method comprises the steps: dividing an automatic driving task into a sensing task and a reasoning task based on the calculation type, execution frequency and period of the automatic driving task, constructing a sensing task pool and a reasoning task pool based on the execution information; calculating the scheduling priority of the automatic driving task based on a preset dynamic priority calculation formula; and executing the automatic driving task based on the scheduling priority. In this way, for various heterogeneous computing tasks facing the automatic driving task, the resource utilization rate can be effectively improved, and task blocking delay is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of autonomous driving technology, and specifically to an autonomous driving task scheduling method, system, and device based on dynamic priority. Background Technology

[0002] Advanced autonomous driving systems, such as Level 4 and above, are typically deployed on heterogeneous computing platforms that include various computing units, such as central processing units, graphics processing units, and tensor processing units. These computing units need to work together to process large amounts of data from sensors and perform complex perception, decision-making, and control tasks.

[0003] In existing technologies, the scheduling of tasks in the aforementioned systems generally employs a fixed-priority scheduling method, assigning static and immutable priorities to different tasks. While this method is simple, it cannot dynamically respond to real-time changes caused by competition for shared resources (such as memory bandwidth and data bus) during system operation. When a high-priority task is blocked by a low-priority task, it leads to increased task execution latency, affecting the system's real-time performance and stability. Summary of the Invention

[0004] In view of this, the purpose of the present invention is to provide an autonomous driving task scheduling method, system and device based on dynamic priority, so as to overcome the technical problems of low utilization of computing resources, high task blocking latency and poor system real-time performance caused by improper task scheduling strategies.

[0005] To achieve the above objectives, the present invention adopts the following technical solution: Firstly, this application provides an autonomous driving task scheduling method based on dynamic priority, comprising: Based on the computation type, execution frequency and cycle of autonomous driving tasks, autonomous driving tasks are divided into perception tasks and reasoning tasks. A perception task pool and a reasoning task pool are constructed based on the perception tasks and corresponding execution information. The execution information includes worst-case execution time, execution cycle, and resources required for execution; The scheduling priority of autonomous driving tasks is calculated based on a preset dynamic priority calculation formula; The dynamic priority calculation formula uses the sum of the period factor and the worst-case waiting time factor as the scheduling priority of the autonomous driving task. The period factor is the product of the reciprocal of the execution period and a first coefficient. The worst-case waiting time factor is the product of the quotient of the worst-case waiting time and the worst-case execution time and a second coefficient. The first coefficient of the perception task is greater than the second coefficient of the perception task, the first coefficient of the reasoning task is less than the second coefficient of the reasoning task, the first coefficient of the perception task is greater than the first coefficient of the reasoning task, and the second coefficient of the perception task is less than the second coefficient of the reasoning task. The worst-case waiting time is determined based on the competition for the resources required for execution. The autonomous driving task is executed based on the scheduling priority.

[0006] Furthermore, in some embodiments of this application, the division of autonomous driving tasks into perception tasks and reasoning tasks based on the computation type, execution frequency, and cycle of the autonomous driving task includes: Autonomous driving tasks with an execution frequency greater than a preset frequency threshold and an execution period less than a preset period threshold are identified as perception tasks, while autonomous driving tasks that are computationally intensive and have an execution period greater than a preset period threshold are identified as reasoning tasks.

[0007] Furthermore, in some embodiments of this application, the first coefficient of the perception task is 0.7 and the second coefficient is 0.3; the first coefficient of the reasoning task is 0.3 and the second coefficient is 0.7.

[0008] Furthermore, in some embodiments of this application, calculating the worst-case waiting time for the autonomous driving task includes: The autonomous driving task for which the worst-case waiting time needs to be calculated is the primary target autonomous driving task. Autonomous driving tasks that are currently being executed or pending execution, and whose required resources are the same as or overlap with those required for the execution of the first objective autonomous driving task, are classified into a set of competing tasks. Calculate the competition factor for each autonomous driving task in the set of competing tasks, where the competition factor is the ratio of worst-case execution time to execution cycle; The worst-case waiting time of the first target autonomous driving task is determined by multiplying the sum of the competition factors of all autonomous driving tasks in the competition task set with the worst-case execution time of the first target autonomous driving task.

[0009] Furthermore, in some embodiments of this application, executing the autonomous driving task based on the respective scheduling priorities includes: The autonomous driving tasks are sorted based on the aforementioned scheduling priority; Based on the ranking of autonomous driving tasks, target processor cores that minimize the increase in system utilization are assigned to each autonomous driving task in turn, so that the corresponding autonomous driving tasks can be processed by the target processing cores.

[0010] Furthermore, in some embodiments of this application, the step of sequentially assigning target processor cores that minimize the system utilization increment to each autonomous driving task includes: The system utilization rate is defined as the utilization rate of the processor core with the highest utilization rate among all processor cores in the system. The highest priority autonomous driving task is designated as the second target autonomous driving task. For the second target autonomous driving task, the system utilization rate before allocation and the system utilization rate after allocation are determined and predicted. The system utilization rate before allocation is the system utilization rate before the second target autonomous driving task is allocated to the processor cores, and the system utilization rate after allocation is the system utilization rate after the second target autonomous driving task is allocated to each processor core. For the second target autonomous driving task, the number of system utilization rates after allocation is multiple. The difference between the system utilization rate after allocation and the system utilization rate before allocation is taken as the system utilization rate increment; The processor core corresponding to the minimum system utilization increment is selected as the target processor core for the second objective autonomous driving task.

[0011] Furthermore, in some embodiments of this application, it also includes: After assigning the second target autonomous driving task to the target processor core, determine whether the system utilization increment exceeds a preset increment threshold. If it does, shut down a preset number of currently active processor cores and re-determine the target processor core, or reduce the execution frequency of low-priority autonomous driving tasks.

[0012] Furthermore, in some embodiments of this application, the method further includes updating the execution information of the autonomous driving task based on a preset update frequency.

[0013] Secondly, this application provides an autonomous driving task scheduling system based on dynamic priority, comprising: The task classification module is used to classify autonomous driving tasks into perception tasks and inference tasks based on the computation type, execution frequency, and cycle of the autonomous driving tasks. It constructs a perception task pool and an inference task pool based on the perception tasks and corresponding execution information. The execution information includes worst-case execution time, execution cycle, and resources required for execution. The priority calculation module is used to calculate the scheduling priority of autonomous driving tasks based on a preset dynamic priority calculation formula. The dynamic priority calculation formula uses the sum of a period factor and a worst-case waiting time factor as the scheduling priority of the autonomous driving task. The period factor is the product of the reciprocal of the execution period and a first coefficient. The worst-case waiting time factor is the product of the quotient of the worst-case waiting time and the worst-case execution time and a second coefficient. The first coefficient for the perception task is greater than the second coefficient for the perception task, the first coefficient for the inference task is less than the second coefficient for the inference task, the first coefficient for the perception task is greater than the first coefficient for the inference task, and the second coefficient for the perception task is less than the second coefficient for the inference task. The worst-case waiting time is determined based on the competition for the resources required for execution. An execution module is used to execute the autonomous driving task based on the scheduling priority.

[0014] Thirdly, this application provides an autonomous driving task scheduling device based on dynamic priority, including a processor and a memory, wherein the processor is connected to the memory: The processor is used to call and execute the program stored in the memory; The memory is used to store the program, which is at least used to execute the above-described dynamic priority-based autonomous driving task scheduling method.

[0015] This invention relates to the field of autonomous driving technology, specifically to an autonomous driving task scheduling method, system, and device based on dynamic priority. The method includes: classifying autonomous driving tasks into perception tasks and inference tasks based on their computation type, execution frequency, and cycle; constructing perception task pools and inference task pools based on execution information; calculating the scheduling priority of autonomous driving tasks based on a preset dynamic priority calculation formula, wherein the dynamic priority calculation formula uses the sum of a cycle factor and a worst-case waiting time factor as the scheduling priority of the autonomous driving task; the cycle factor is the product of the reciprocal of the execution cycle and a first coefficient; the worst-case waiting time factor is the product of the quotient of the worst-case waiting time and the worst-case execution time and a second coefficient, wherein the first coefficient for perception tasks is greater than the second coefficient for perception tasks, the first coefficient for inference tasks is less than the second coefficient for inference tasks, the first coefficient for perception tasks is greater than the first coefficient for inference tasks, and the second coefficient for perception tasks is less than the second coefficient for inference tasks; the worst-case waiting time is determined based on the contention for resources required for execution; and executing autonomous driving tasks based on the scheduling priority. This effectively improves resource utilization and avoids task blocking and delays for various heterogeneous computing tasks faced by autonomous driving tasks. Attached Figure Description

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

[0017] Figure 1 This is a flowchart illustrating the autonomous driving task scheduling method based on dynamic priority provided in an embodiment of the present invention. Figure 2 This is a schematic diagram illustrating the principle of the autonomous driving task scheduling method based on dynamic priority provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of an autonomous driving task scheduling system based on dynamic priority provided in an embodiment of the present invention. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be described in detail below. Obviously, the described embodiments are merely some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other implementation methods obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0019] Figure 1 This is a flowchart illustrating the autonomous driving task scheduling method based on dynamic priority provided in an embodiment of the present invention. Please refer to [link / reference]. Figure 1 This embodiment may include the following steps: S101. Based on the computation type, execution frequency and cycle of autonomous driving tasks, autonomous driving tasks are divided into perception tasks and reasoning tasks. A perception task pool is constructed based on perception tasks and corresponding execution information, and a reasoning task pool is constructed based on reasoning tasks and corresponding execution information.

[0020] The execution information includes the worst-case execution time, execution cycle, and resources required for execution.

[0021] Specifically, in this application, autonomous driving tasks with an execution frequency greater than a preset frequency threshold and an execution period less than a preset period threshold, i.e., high frequency and short period, are defined as perception tasks, and autonomous driving tasks with computationally intensive execution periods greater than a preset period threshold, i.e., computationally intensive and long period, are defined as reasoning tasks.

[0022] Based on this, a perception task pool is constructed based on perception tasks and corresponding execution information, and a reasoning task pool is constructed based on reasoning tasks and corresponding execution information. In the task pool, each task is associated with its corresponding execution information.

[0023] For example, ID information can be set for perception tasks and inference tasks respectively, and the corresponding worst-case execution time, execution cycle and required resources (i.e. the resources that the execution task needs to access or utilize, such as the physical bus connecting the sensor and the processor for perception tasks, and the local video memory of the GPU for inference tasks) can be associated to build perception task pools and inference task pools.

[0024] S102. Calculate the scheduling priority of autonomous driving tasks based on the preset dynamic priority calculation formula.

[0025] The dynamic priority calculation formula uses the sum of the period factor and the worst-case waiting time factor as the scheduling priority of the autonomous driving task. The period factor is the product of the reciprocal of the execution period and the first coefficient. The worst-case waiting time factor is the product of the quotient of the worst-case waiting time and the worst-case execution time and the second coefficient. The first coefficient of the perception task is greater than the second coefficient of the perception task, the first coefficient of the reasoning task is less than the second coefficient of the reasoning task, the first coefficient of the perception task is greater than the first coefficient of the reasoning task, and the second coefficient of the perception task is less than the second coefficient of the reasoning task. The worst-case waiting time is determined based on the competition for the resources required for execution.

[0026] Specifically, in this application, the scheduling priority of each autonomous driving task in the aforementioned task pool is calculated using the following dynamic priority calculation formula:

[0027] Where i is the label of the autonomous driving task; Indicates the scheduling priority of autonomous driving task i; The first coefficient; This indicates the execution cycle of autonomous driving task i; The second coefficient; The worst-case waiting time for autonomous driving task i; The worst-case execution time for autonomous driving task i.

[0028] S103. Execute autonomous driving tasks based on scheduling priority.

[0029] Specifically, autonomous driving tasks can be sorted based on scheduling priority; then, based on the sorting results of the autonomous driving tasks, target processor cores that minimize the increase in system utilization are allocated to each autonomous driving task in turn, so that the corresponding autonomous driving tasks can be processed by the target processing cores.

[0030] The autonomous driving task scheduling method provided in this application, based on dynamic priority, categorizes autonomous driving tasks into perception tasks and inference tasks according to their computation type, execution frequency, and cycle. It then constructs perception task pools and inference task pools based on execution information. The method calculates the scheduling priority of autonomous driving tasks using a pre-defined dynamic priority calculation formula. This formula uses the sum of a cycle factor and a worst-case waiting time factor as the scheduling priority of the autonomous driving task. The cycle factor is the product of the reciprocal of the execution cycle and a first coefficient. The worst-case waiting time factor is the product of the quotient of the worst-case waiting time and the worst-case execution time and a second coefficient. The first coefficient for perception tasks is greater than the second coefficient for inference tasks, and vice versa. The worst-case waiting time is determined based on the contention for the resources required for execution. Finally, the method executes autonomous driving tasks based on scheduling priorities. This approach effectively improves resource utilization and avoids task blocking and delays for various heterogeneous computing tasks faced by autonomous driving tasks.

[0031] Furthermore, in some embodiments of this application, the first coefficient for the perception task is 0.7 and the second coefficient is 0.3; the first coefficient for the inference task is 0.3 and the second coefficient is 0.7. In practical applications, by constructing perception task pools and inference task pools, the corresponding first and second coefficients can be quickly and accurately determined when calculating the scheduling priority of autonomous driving tasks, thereby accelerating computational efficiency.

[0032] Furthermore, in some embodiments of this application, calculating the worst-case waiting time for the autonomous driving task includes: S201. The autonomous driving task for which the worst-case waiting time needs to be calculated is taken as the primary target autonomous driving task.

[0033] Specifically, in practical applications, as autonomous driving tasks are executed periodically, there are usually multiple autonomous driving tasks that need to be allocated processor cores for execution at a given time or time period. This application calculates the scheduling priority of autonomous driving tasks at the current time or time period, sorts these autonomous driving tasks based on the scheduling priority, and then allocates processor cores to them to execute these autonomous driving tasks based on the sorting results.

[0034] Therefore, determining the first target autonomous driving task means determining the first target autonomous driving task from the current time point or time period, the scheduling priority to be calculated, and the subsequent autonomous driving tasks to be executed.

[0035] It is understood that in a calculation process, the determined first target autonomous driving task is an autonomous driving task, used to determine the worst-case waiting time of the autonomous driving task and to calculate the scheduling priority of the autonomous driving task. Of course, in other embodiments of this application, when this step is performed in parallel by multiple computing units, the number of first target autonomous driving tasks can be multiple, that is, each computing resource can correspond to one first target autonomous driving task, and each computing resource calculates the worst-case waiting time of the corresponding autonomous driving task.

[0036] S202. First, classify the autonomous driving tasks that are currently being executed or pending execution, and whose required resources are the same as or overlap with those required for the execution of the first target autonomous driving task, into the competing task set.

[0037] It should be noted that when determining the set of competing tasks for the first target autonomous driving task, the tasks are those currently being executed and those that require computational scheduling priority and are assigned processor cores for execution (i.e., pending execution) within the current time point or time period. From these, tasks whose execution resources are the same as or overlap with those required for the execution of the first target autonomous driving task are identified and included in the set of competing tasks for the first target autonomous driving task.

[0038] S203. Calculate the competition factor for each autonomous driving task in the set of competing tasks. The competition factor is the ratio of the worst-case execution time to the execution cycle. Specifically, after determining the set of competing tasks, the competition factor of each autonomous driving task in the set is calculated, which is the ratio of its worst-case execution time to its execution cycle.

[0039] S204. The worst-case waiting time of the first target autonomous driving task is determined by the product of the sum of the competition factors of all autonomous driving tasks in the competition task set and the worst-case execution time of the first target autonomous driving task.

[0040] Specifically, the competition factors of all autonomous driving tasks in the competition task set are summed, and the product of this sum and the worst-case execution time of the first target autonomous driving task is used as the worst-case waiting time of the first target autonomous driving task, which is then used to calculate the scheduling priority of the first target autonomous driving task.

[0041] Understandably, in this application, the periodicity factor is used to reflect the urgency of the task, while the worst-case waiting time factor is used to reflect the impact of resource contention on the task. Thus, scheduling priorities determined by the worst-case waiting time are more reasonable, and in scheduling scenarios involving various heterogeneous computing tasks in autonomous driving, this can effectively improve resource utilization and avoid task blocking and delays.

[0042] In this application, after determining the priority of the autonomous driving tasks to be executed at the current time or within a time period, these autonomous driving tasks are sorted, and then, based on the sorting result, processor cores are allocated sequentially from highest to lowest priority for execution. The specific allocation strategy includes: S301. Designate the current highest priority autonomous driving task as the second target autonomous driving task.

[0043] S302. For the second target autonomous driving task, determine the system utilization rate before allocation and predict the system utilization rate after allocation.

[0044] Specifically, in this application, the utilization rate of the processor core with the highest utilization rate among all processor cores in the system is taken as the system utilization rate.

[0045] Based on this, the autonomous driving task with the highest priority among the autonomous driving tasks that currently require processor core allocation is identified as the second target autonomous driving task. The system utilization rate of the second target autonomous driving task before allocation and the system utilization rate after allocation are calculated.

[0046] The system utilization rate before allocation is the system utilization rate before the second target autonomous driving task is allocated to the processor core; the system utilization rate after allocation is the system utilization rate after the second target autonomous driving task is allocated to each processor core.

[0047] S302. The difference between the system utilization rate after allocation and the system utilization rate before allocation is taken as the system utilization rate increment.

[0048] S303. The processor core corresponding to the minimum system utilization increment is selected as the target processor core for the second objective autonomous driving task.

[0049] Understandably, for the second target autonomous driving task, there are multiple allocated system utilization values. For example, when predicting the allocated system utilization, if the system has 10 processor cores, the predicted number of allocated system utilization values ​​is also 10, with each allocated system utilization value corresponding to one processor core. Furthermore, the calculated system utilization increment is also 10. In this case, the processor core corresponding to the smallest system utilization increment is selected as the target processor core for the second target autonomous driving task, and the second autonomous driving task is subsequently executed through this target processor core.

[0050] In some embodiments of this application, after allocating a target processor core to the second target autonomous driving task, an overload verification is also performed. Specifically, this includes: determining whether the system utilization increment exceeds a preset increment threshold after allocating the second target autonomous driving task to the target processor core; if it exceeds the threshold, then shutting down a preset number of currently active processor cores (initially, one-third of the processor cores can be activated), and re-determining the target processor core, or reducing the execution frequency of low-priority autonomous driving tasks, in order to avoid processor core overload causing task timeouts, while balancing system computing power redundancy and real-time performance to ensure the safe operation of autonomous driving.

[0051] Based on the same inventive concept, this application also provides an autonomous driving task scheduling system based on dynamic priority. Figure 2 This is a schematic diagram of the structure of an autonomous driving task scheduling system based on dynamic priority provided in an embodiment of the present invention, as shown below. Figure 2 As shown, the system includes: The task classification module 11 is used to classify autonomous driving tasks into perception tasks and inference tasks based on the computation type, execution frequency and cycle of autonomous driving tasks, and to build a perception task pool based on perception tasks and corresponding execution information, and to build an inference task pool based on inference tasks and corresponding execution information; wherein, the execution information includes worst case execution time, execution cycle and resources required for execution.

[0052] The priority calculation module 12 is used to calculate the scheduling priority of autonomous driving tasks based on a preset dynamic priority calculation formula. The dynamic priority calculation formula uses the sum of a period factor and a worst-case waiting time factor as the scheduling priority of the autonomous driving task. The period factor is the product of the reciprocal of the execution period and a first coefficient. The worst-case waiting time factor is the product of the quotient of the worst-case waiting time and the worst-case execution time and a second coefficient. The first coefficient for the perception task is greater than the second coefficient for the perception task, and the first coefficient for the inference task is less than the second coefficient for the inference task. The worst-case waiting time is determined based on the competition for the resources required for execution. Execution module 13 is used to execute autonomous driving tasks based on scheduling priority.

[0053] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0054] The present invention also provides an autonomous driving task scheduling device based on dynamic priority, for implementing the above method embodiments. Figure 3This is a schematic diagram of the structure of an autonomous driving task scheduling device based on dynamic priority provided in an embodiment of the present invention, as shown below. Figure 3 As shown, the autonomous driving task scheduling device based on dynamic priority in this embodiment includes a processor 21 and a memory 22, with the processor 21 connected to the memory 22. The processor 21 is used to call and execute programs stored in the memory 22; the memory 22 is used to store programs, which are at least used to execute the autonomous driving task scheduling method based on dynamic priority in the above embodiments.

[0055] The specific implementation scheme of the autonomous driving task scheduling device based on dynamic priority provided in this application can refer to the implementation scheme of the autonomous driving task scheduling method based on dynamic priority in any of the above embodiments, and will not be repeated here.

[0056] It is understood that the same or similar parts in the above embodiments can be referred to each other, and the contents not described in detail in some embodiments can be referred to the same or similar contents in other embodiments.

[0057] It should be noted that in the description of this invention, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this invention, unless otherwise stated, "a plurality of" means at least two.

[0058] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of the invention 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 will be understood by those skilled in the art to which embodiments of the invention pertain.

[0059] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in 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 (PGAs), field-programmable gate arrays (FPGAs), etc.

[0060] 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.

[0061] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0062] The storage media mentioned above can be read-only memory, disk, or optical disk, etc.

[0063] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

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

Claims

1. A method for scheduling autonomous driving tasks based on dynamic priority, characterized in that, include: Based on the computation type, execution frequency and cycle of autonomous driving tasks, autonomous driving tasks are divided into perception tasks and reasoning tasks. A perception task pool and a reasoning task pool are constructed based on the perception tasks and corresponding execution information. The execution information includes worst-case execution time, execution cycle, and resources required for execution; The scheduling priority of autonomous driving tasks is calculated based on a preset dynamic priority calculation formula; The dynamic priority calculation formula uses the sum of the period factor and the worst-case waiting time factor as the scheduling priority of the autonomous driving task. The period factor is the product of the reciprocal of the execution period and a first coefficient. The worst-case waiting time factor is the product of the quotient of the worst-case waiting time and the worst-case execution time and a second coefficient. The first coefficient of the perception task is greater than the second coefficient of the perception task, the first coefficient of the reasoning task is less than the second coefficient of the reasoning task, the first coefficient of the perception task is greater than the first coefficient of the reasoning task, and the second coefficient of the perception task is less than the second coefficient of the reasoning task. The worst-case waiting time is determined based on the competition for the resources required for execution. The autonomous driving task is executed based on the scheduling priority.

2. The autonomous driving task scheduling method based on dynamic priority according to claim 1, characterized in that, Based on the computation type, execution frequency, and cycle of the autonomous driving task, the autonomous driving task is divided into perception tasks and reasoning tasks, including: Autonomous driving tasks with an execution frequency greater than a preset frequency threshold and an execution period less than a preset period threshold are identified as perception tasks, while autonomous driving tasks that are computationally intensive and have an execution period greater than a preset period threshold are identified as reasoning tasks.

3. The autonomous driving task scheduling method based on dynamic priority according to claim 1, characterized in that, The first coefficient for the perception task is 0.7, and the second coefficient is 0.3; the first coefficient for the reasoning task is 0.3, and the second coefficient is 0.

7.

4. The autonomous driving task scheduling method based on dynamic priority according to claim 1, characterized in that, The worst-case latency for calculating autonomous driving tasks includes: The autonomous driving task for which the worst-case waiting time needs to be calculated is the primary target autonomous driving task. Autonomous driving tasks that are currently being executed or pending execution, and whose required resources are the same as or overlap with those required for the execution of the first objective autonomous driving task, are classified into a set of competing tasks. Calculate the competition factor for each autonomous driving task in the set of competing tasks, where the competition factor is the ratio of worst-case execution time to execution cycle; The worst-case waiting time of the first target autonomous driving task is determined by multiplying the sum of the competition factors of all autonomous driving tasks in the competition task set with the worst-case execution time of the first target autonomous driving task.

5. The autonomous driving task scheduling method based on dynamic priority according to claim 1, characterized in that, Executing the autonomous driving task based on the aforementioned scheduling priorities includes: The autonomous driving tasks are sorted based on the aforementioned scheduling priority; Based on the ranking of autonomous driving tasks, target processor cores that minimize the increase in system utilization are assigned to each autonomous driving task in turn, so that the corresponding autonomous driving tasks can be processed by the target processing cores.

6. The autonomous driving task scheduling method based on dynamic priority according to claim 5, characterized in that, The target processor cores, which are assigned to each autonomous driving task in order to minimize the increase in system utilization, include: The system utilization rate is defined as the utilization rate of the processor core with the highest utilization rate among all processor cores in the system. The highest priority autonomous driving task is designated as the second target autonomous driving task. For the second target autonomous driving task, the system utilization rate before allocation and the system utilization rate after allocation are determined and predicted. The system utilization rate before allocation is the system utilization rate before the second target autonomous driving task is allocated to the processor cores, and the system utilization rate after allocation is the system utilization rate after the second target autonomous driving task is allocated to each processor core. For the second target autonomous driving task, the number of system utilization rates after allocation is multiple. The difference between the system utilization rate after allocation and the system utilization rate before allocation is taken as the system utilization rate increment; The processor core corresponding to the minimum system utilization increment is selected as the target processor core for the second objective autonomous driving task.

7. The autonomous driving task scheduling method based on dynamic priority according to claim 6, characterized in that, Also includes: Determine whether the system utilization increment exceeds a preset increment threshold after the second target autonomous driving task is assigned to the target processor core; If the number of active processor cores is exceeded, a preset number of currently active processor cores will be shut down, and a new target processor core will be determined, or the execution frequency of low-priority autonomous driving tasks will be reduced.

8. The autonomous driving task scheduling method based on dynamic priority according to claim 1, characterized in that, Also includes: The execution information of the autonomous driving task is updated based on a preset update frequency.

9. An autonomous driving task scheduling system based on dynamic priority, characterized in that, include: The task classification module is used to classify autonomous driving tasks into perception tasks and inference tasks based on the computation type, execution frequency, and cycle of the autonomous driving tasks. It constructs a perception task pool and an inference task pool based on the perception tasks and corresponding execution information. The execution information includes worst-case execution time, execution cycle, and resources required for execution. The priority calculation module is used to calculate the scheduling priority of autonomous driving tasks based on a preset dynamic priority calculation formula. The dynamic priority calculation formula uses the sum of a period factor and a worst-case waiting time factor as the scheduling priority of the autonomous driving task. The period factor is the product of the reciprocal of the execution period and a first coefficient. The worst-case waiting time factor is the product of the quotient of the worst-case waiting time and the worst-case execution time and a second coefficient. The first coefficient for the perception task is greater than the second coefficient for the perception task, the first coefficient for the inference task is less than the second coefficient for the inference task, the first coefficient for the perception task is greater than the first coefficient for the inference task, and the second coefficient for the perception task is less than the second coefficient for the inference task. The worst-case waiting time is determined based on the competition for the resources required for execution. An execution module is used to execute the autonomous driving task based on the scheduling priority.

10. An autonomous driving task scheduling device based on dynamic priority, characterized in that, It includes a processor and a memory, wherein the processor is connected to the memory: The processor is used to call and execute the program stored in the memory; The memory is used to store the program, which is at least used to execute the autonomous driving task scheduling method based on dynamic priority as described in any one of claims 1-8.