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

By breaking down the sensor data processing flow into input, computation, and output tasks, and scheduling them according to priority and resource consumption, the problems of scalability and low resource utilization in sensor data processing are solved, thereby improving the efficiency and resource utilization of intelligent driving.

CN121742987APending Publication Date: 2026-03-27MOMENTA (SUZHOU) TECHNOLOGY 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
2024-09-27
Publication Date
2026-03-27

Smart Images

  • Figure CN121742987A_ABST
    Figure CN121742987A_ABST
Patent Text Reader

Abstract

The invention discloses a task scheduling system, method and device, a storage medium and electronic equipment. The system can schedule and execute a workflow which is triggered by each sensor and comprises a data input task, a data calculation task and a data output task. The data input management module sets an input priority for a data input task, executes the data input task according to the input priority and / or the number of tasks under the input priority, and generates a data calculation task corresponding to the data input task after the data input task is completed; the data calculation management module sets a calculation priority for the data calculation task, executes the data calculation task according to the execution calculation power consumption of the data calculation task under the calculation priority and / or the input priority, and generates a data output task corresponding to the data calculation task after the data calculation task is completed; and the data output management module sets output priorities for the data output tasks, and executes the data output tasks according to the output priorities and / or the number of tasks under the output priorities.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of smart device technology, and more specifically, to a task scheduling system, method, apparatus, storage medium, and electronic device. Background Technology

[0002] With the development of intelligent driving technology, the types and numbers of sensors installed on vehicles are increasing, placing higher demands on the computing power of intelligent driving platforms. Related technologies create an independent pipeline for the data collected by each sensor, and execute each pipeline independently to process the collected data. For example... Figure 1 As shown, a vehicle includes LiDAR 1, LiDAR 2, Camera 1, Camera 2, and Camera 2. Each sensor has a pipeline, and each pipeline includes three stages: input, computation, and output. While this process is relatively simple and convenient to implement, it suffers from drawbacks such as poor scalability and low utilization of computational resources. Summary of the Invention

[0003] This application provides a task scheduling system, method, apparatus, storage medium, and electronic device, which aims to solve the problems of poor scalability and low utilization of computing resources caused by executing each pipeline independently.

[0004] The specific technical solution is as follows:

[0005] In a first aspect, embodiments of this application provide a task scheduling system, which is used to schedule and execute workflows triggered by each sensor, each workflow including a data input task, a data calculation task, and a data output task, and the system includes a data input management module, a data calculation management module, and a data output management module;

[0006] The data input management module is used to acquire multiple data input tasks generated based on data collected by each sensor, set an input priority for each data input task, execute each data input task according to the input priority and / or the number of tasks under each input priority, and after completing the data input task, generate the data calculation task corresponding to the data input task and send it to the data calculation management module.

[0007] The data computing management module is used to obtain each data computing task sent by the data input management module, set a computing priority for each data computing task, execute each data computing task according to the computing priority and / or the computing power consumption of each data computing task under the input priority, and generate the data output task corresponding to the data computing task after completing the data computing task, and send it to the data output management module.

[0008] The data output management module is used to obtain each data output task sent by the data calculation management module, set an output priority for each data output task, and execute each data output task according to the output priority and / or the number of tasks under each output priority.

[0009] As can be seen from the above scheme, the task scheduling system provided in this application embodiment can divide each workflow into three types of tasks, and each type of task is executed by a corresponding management module. When executing data input tasks, the data input management module can execute each data input task according to the input priority and / or the number of tasks under each input priority. When executing data calculation tasks, the data calculation management module can execute each data calculation task according to the calculation priority and / or the execution computing power consumption of each data calculation task under each input priority. When executing data output tasks, the data output management module can execute each data output task according to the output priority and / or the number of tasks under each output priority. This not only allows high-priority tasks to be processed first, improving the efficiency of intelligent driving, but also, by combining the priority with the number of tasks and the execution computing power consumption under each input priority to determine the scheduling timing of adjacent priorities, it can further improve the utilization of computing resources. In addition, when each workflow changes, management modules can be quickly added or removed, improving the scalability of the system.

[0010] In one possible implementation, the data input management module is configured to execute each data input task sequentially according to the input priority from high to low, and if the number of tasks under the currently executed input priority is less than or equal to a first task volume threshold, to begin parallel execution of the data input tasks under the next input priority; and / or,

[0011] The data output management module is used to execute each data output task in descending order of output priority, and to start executing the data output task under the next output priority in parallel when the number of tasks under the current output priority is less than or equal to the second task quantity threshold.

[0012] In one possible implementation, the data computing management module is configured to execute each data computing task sequentially in descending order of computing priority, and to begin parallel execution of the data computing task under the next computing priority if the computing power consumption of the data computing task under the current computing priority is less than or equal to the consumption threshold.

[0013] As can be seen from the above scheme, compared with directly executing each data input task in descending order of input priority, that is, compared with completing the task of the previous priority before starting to execute the task of the next priority, the embodiments of this application can further improve the utilization rate of computing resources by starting to execute the data input task of the next input priority in parallel when the number of tasks under the current execution input priority is less than or equal to the first task volume threshold, starting to execute the data output task of the next output priority in parallel when the number of tasks under the current execution output priority is less than or equal to the second task volume threshold, and starting to execute the data computing task of the next computing priority in parallel when the execution computing power consumption of the data computing task under the current execution computing priority is less than or equal to the consumption threshold.

[0014] In one possible implementation, the execution computing power consumption includes the percentage of kernel usage in the graphics processing unit (GPU) or the percentage of active thread bundles.

[0015] In one possible implementation, when the data input task, the data calculation task, and the data output task are collectively referred to as target tasks, and the input priority, the calculation priority, and the output priority are collectively referred to as target priorities, the target priority is set for the target task of the corresponding sensor based on the default sensor priority corresponding to the workflow stage where the target task is located. Alternatively, the sensor priority corresponding to the workflow stage where the target task is located is determined based on the vehicle's driving state, and the target priority is set for the target task of the corresponding sensor based on the determined sensor priority.

[0016] As can be seen from the above scheme, the embodiments of this application can not only set the priority of each task directly according to the default sensor priority, but also dynamically update the sensor priority in combination with the vehicle driving status, thereby dynamically updating the task priority, which can further improve the efficiency and safety of intelligent driving.

[0017] Secondly, embodiments of this application provide a task scheduling method, which is applied to a task scheduling system. The system is used to schedule and execute workflows triggered by each sensor, each workflow including a data input task, a data calculation task, and a data output task. The method includes:

[0018] Multiple data input tasks generated based on data collected by each sensor are obtained, and an input priority is set for each data input task. Each data input task is executed according to the input priority and / or the number of tasks under each input priority. After the data input task is completed, the data calculation task corresponding to the data input task is generated.

[0019] A calculation priority is set for each of the data calculation tasks. Each data calculation task is executed according to the calculation priority and / or the execution computing power consumption of each data calculation task under the input priority. After the data calculation task is completed, the data output task corresponding to the data calculation task is generated.

[0020] An output priority is set for each of the data output tasks, and each data output task is executed according to the output priority and / or the number of tasks under each output priority.

[0021] In one possible implementation, each data input task is executed according to the input priority and / or the number of tasks under each input priority, including: executing each data input task sequentially in descending order of input priority, and starting to execute the data input tasks under the next input priority in parallel if the number of tasks under the currently executed input priority is less than or equal to a first task quantity threshold; and / or,

[0022] Executing each data computation task according to the computation priority and / or the computational power consumption of each data computation task under the input priority includes: executing each data computation task sequentially in descending order of computation priority, and if the computational power consumption of the data computation task under the currently executed computation priority is less than or equal to the consumption threshold, then starting to execute the data computation task under the next computation priority in parallel; and / or,

[0023] Execute each data output task according to the output priority and / or the number of tasks under each output priority, including: executing each data output task sequentially in descending order of the output priority, and starting to execute the data output task under the next output priority in parallel if the number of tasks under the currently executed output priority is less than or equal to the second task quantity threshold.

[0024] In one possible implementation, the execution computing power consumption includes the percentage of kernel usage in the graphics processing unit (GPU) or the percentage of active thread bundles.

[0025] In one possible implementation, when the data input task, the data computation task, and the data output task are collectively referred to as target tasks, and the input priority, the computation priority, and the output priority are collectively referred to as target priorities, setting a target priority for each target task includes:

[0026] The target priority is set for the target task of the corresponding sensor based on the default sensor priority corresponding to the workflow stage in which the target task is located, or the target priority is set for the target task of the corresponding sensor based on the vehicle's driving status.

[0027] As can be seen from the above scheme, the task scheduling method provided in this application embodiment can divide each workflow into three types of tasks, and each type of task is executed by a corresponding management module. When the data input management module executes the data input task, it can execute each data input task according to the input priority and / or the number of tasks under each input priority. When the data calculation management module executes the data calculation task, it can execute each data calculation task according to the calculation priority and / or the execution computing power consumption of the data calculation task under each input priority. When the data output management module executes the data output task, it executes each data output task according to the output priority and / or the number of tasks under each output priority. This not only allows high-priority tasks to be processed first, improving the efficiency of intelligent driving, but also, by combining the priority with the number of tasks under each input priority and the execution computing power consumption to determine the scheduling timing of adjacent priorities, it can further improve the utilization of computing resources. In addition, when each workflow changes, the management module can be quickly added or removed, improving the scalability of the system.

[0028] Thirdly, embodiments of this application provide a task scheduling apparatus, which is applied to a task scheduling system. The system is used to schedule and execute workflows triggered by each sensor, each workflow including a data input task, a data calculation task, and a data output task. The apparatus includes:

[0029] The acquisition unit is used to acquire multiple data input tasks generated based on data collected by each sensor;

[0030] A setting unit is used to set the input priority for each of the data input tasks;

[0031] An execution unit is configured to execute each of the data input tasks according to the input priority and / or the number of tasks under each input priority;

[0032] The generation unit is used to generate the data calculation task corresponding to the data input task after the data input task is completed;

[0033] The setting unit is also used to set a calculation priority for each of the data calculation tasks;

[0034] The execution unit is further configured to execute each of the data calculation tasks according to the calculation priority and / or the execution computing power consumption of each of the input priorities;

[0035] The generation unit is also used to generate the data output task corresponding to the data calculation task after completing the data calculation task;

[0036] The setting unit is also used to set an output priority for each of the data output tasks;

[0037] The execution unit is further configured to execute each of the data output tasks according to the output priority and / or the number of tasks under each output priority.

[0038] In one possible implementation, the execution unit is configured to execute each data input task sequentially according to the input priority from high to low, and if the number of tasks under the currently executed input priority is less than or equal to a first task quantity threshold, to begin parallel execution of the data input tasks under the next input priority; and / or,

[0039] Each data computation task is executed sequentially in descending order of computation priority, and if the computational power consumption of the data computation task at the current priority is less than or equal to the consumption threshold, the data computation task at the next priority is executed in parallel; and / or,

[0040] Each data output task is executed sequentially in descending order of output priority. If the number of tasks under the current output priority is less than or equal to the second task quantity threshold, the data output tasks under the next output priority are executed in parallel.

[0041] In one possible implementation, the execution computing power consumption includes the percentage of kernel usage in the graphics processing unit (GPU) or the percentage of active thread bundles.

[0042] In one possible implementation, the setting unit is configured to, when the data input task, the data calculation task, and the data output task are collectively referred to as target tasks, and the input priority, the calculation priority, and the output priority are collectively referred to as target priorities, set the target priority for the target task of the corresponding sensor according to the default sensor priority corresponding to the workflow stage where the target task is located; or, based on the vehicle's driving state, determine the sensor priority corresponding to the workflow stage where the target task is located, and set the target priority for the target task of the corresponding sensor according to the determined sensor priority.

[0043] As can be seen from the above scheme, the task scheduling device provided in this application embodiment can divide each workflow into three types of tasks, and each type of task is executed by a corresponding management module. When executing data input tasks, the data input management module can execute each data input task according to the input priority and / or the number of tasks under each input priority. When executing data calculation tasks, the data calculation management module can execute each data calculation task according to the calculation priority and / or the execution computing power consumption of each data calculation task under each input priority. When executing data output tasks, the data output management module executes each data output task according to the output priority and / or the number of tasks under each output priority. This not only allows high-priority tasks to be processed first, improving the efficiency of intelligent driving, but also, by combining the priority with the number of tasks and the execution computing power consumption under each input priority to determine the scheduling timing of adjacent priorities, it can further improve the utilization of computing resources. In addition, when each workflow changes, the management modules can be quickly added or removed, improving the scalability of the system.

[0044] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the method as described in any possible implementation of the second aspect.

[0045] Fifthly, embodiments of this application provide an electronic device, which includes:

[0046] One or more processors;

[0047] The processor is coupled to a storage device for storing one or more programs;

[0048] When one or more programs are executed by one or more processors, the electronic device performs the method as described in any possible implementation of the second aspect.

[0049] Sixthly, embodiments of this application provide a vehicle that includes the means as described in any possible implementation of the third aspect, or includes electronic equipment as described in the fifth aspect.

[0050] In a seventh aspect, embodiments of this application provide a computer program product containing instructions that, when executed on a computer or processor, cause the computer or processor to perform the method described in any possible implementation of the second aspect. Attached Figure Description

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

[0052] Figure 1 This is an example diagram of a task scheduling process provided in related technologies;

[0053] Figure 2 This is a schematic diagram of the structure of a task scheduling system provided in an embodiment of this application;

[0054] Figure 3 An example diagram of a task scheduling process provided in an embodiment of this application;

[0055] Figure 4 A flowchart illustrating a task scheduling method provided in an embodiment of this application;

[0056] Figure 5 A block diagram of a task scheduling device provided in an embodiment of this application;

[0057] Figure 6 This is a schematic diagram of the structure of an electronic device or computer device provided in an embodiment of this application. Detailed Implementation

[0058] 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 a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0059] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. The terms "comprising" and "having," and any variations thereof, in the embodiments and drawings of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices.

[0060] Figure 2 This is a schematic diagram of a task scheduling system. The system is used to schedule and execute workflows triggered by each sensor. Each workflow includes a data input task, a data calculation task, and a data output task. The system includes a data input management module 110, a data calculation management module 120, and a data output management module 130.

[0061] The data input management module 110 is used to acquire multiple data input tasks generated based on data collected by each sensor, set an input priority for each data input task, execute each data input task according to the input priority and / or the number of tasks under each input priority, and after completing the data input task, generate the data calculation task corresponding to the data input task and send it to the data calculation management module 120.

[0062] The data computing management module 120 is used to obtain each data computing task sent by the data input management module 110, set a computing priority for each data computing task, execute each data computing task according to the computing priority and / or the computing power consumption of each data computing task under the input priority, and generate a data output task corresponding to the data computing task after completing the data computing task, and send it to the data output management module 130.

[0063] The data output management module 130 is used to obtain each data output task sent by the data calculation management module 120, set the output priority for each data output task, and execute each data output task according to the output priority and / or the number of tasks under each output priority.

[0064] In this embodiment, when the system is applied to a vehicle, the sensors may include various sensors on the vehicle, such as cameras and LiDAR, and there may be one or multiple sensors of each type. Each time a sensor collects data and transmits it to the system, a corresponding workflow is generated. The workflow priorities of different types of sensors may be different, and the workflow priorities of different sensors of the same type may also be different. The priorities of the same workflow may also be different at different stages, that is, the priorities of data input tasks, data calculation tasks, and data output tasks in the same workflow may be different. Figure 3 As shown, the rectangles of different colors represent different priorities, with dark gray, light gray, and white having decreasing priorities in that order.

[0065] The task scheduling system provided in this application embodiment can divide each workflow into three types of tasks, each executed by a corresponding management module. When executing data input tasks, the data input management module can execute each data input task according to its input priority and / or the number of tasks under each input priority. When executing data calculation tasks, the data calculation management module can execute each data calculation task according to its calculation priority and / or the computational power consumption of each data calculation task under each input priority. When executing data output tasks, the data output management module executes each data output task according to its output priority and / or the number of tasks under each output priority. This not only ensures that high-priority tasks are processed first, improving the efficiency of intelligent driving, but also further improves the utilization of computing resources by combining priorities with the number of tasks and computational power consumption under each input priority to determine the scheduling timing of adjacent priorities. Furthermore, when each workflow changes, management modules can be quickly added or removed, improving the system's scalability.

[0066] In one possible implementation, when data input tasks, data calculation tasks, and data output tasks are collectively referred to as target tasks, and input priority, calculation priority, and output priority are collectively referred to as target priorities, the target priority of the target task of the corresponding sensor is set according to the default sensor priority corresponding to the workflow stage where the target task is located. Alternatively, the sensor priority corresponding to the workflow stage where the target task is located is determined according to the vehicle's driving status, and the target priority of the target task of the corresponding sensor is set according to the determined sensor priority.

[0067] The system can pre-set a priority for each sensor based on its overall importance, which serves as the default sensor priority. For example, forward sensors are generally more important than lateral and backward sensors, so the priority of forward sensors can be set to the highest, followed by lateral sensors, and lastly backward sensors.

[0068] However, the importance of each sensor may change under different driving conditions. For example, when the vehicle is traveling straight, the forward sensor is the most important, while when the vehicle is turning left, the left sensor is the most important. Therefore, to facilitate the system to make safety decisions more quickly, the sensor priority corresponding to the workflow stage of the target task can be determined in real time based on the vehicle's driving status, and the target priority of the corresponding sensor can be set according to the determined sensor priority. For example, when the vehicle is turning left, the data input management module 110 sets the priority of the left sensor to the highest, followed by the rear sensor, and finally the forward sensor.

[0069] This application embodiment can not only directly set the priority for each task according to the default sensor priority, but also dynamically update the sensor priority based on the vehicle driving status, thereby dynamically updating the task priority, which can further improve the efficiency and safety of intelligent driving.

[0070] In one possible implementation, the data input management module 110, the data calculation management module 120, and the data output management module 130 can directly execute each task in descending order of priority according to the priority of the tasks they manage. However, in order to further improve the resource utilization of the GPU, other information can be combined to determine whether the next priority task can be called.

[0071] Specifically, the data input management module 110 is used to execute each data input task sequentially according to its input priority from high to low, and to begin parallel execution of the next data input task under the next input priority if the number of tasks under the currently executed input priority is less than or equal to the first task quantity threshold; and / or,

[0072] The data output management module 130 is used to execute each data output task sequentially according to its output priority from high to low, and to begin parallel execution of the next data output task if the number of tasks under the current output priority is less than or equal to the second task quantity threshold; and / or,

[0073] The data computing management module 120 is used to execute each data computing task in descending order of computing priority. If the computing power consumption of the data computing task under the current computing priority is less than or equal to the consumption threshold, the next data computing task under the next computing priority will be executed in parallel.

[0074] The first task load threshold, the second task load threshold, and the consumption threshold can all be determined based on practical experience. Execution computing power consumption includes the percentage of cores (such as CUDA cores) used in the GPU (Graphics Processing Unit), or the percentage of active thread bundles.

[0075] To improve GPU resource utilization, I / O bandwidth can be maximized. Generally, input bandwidth and output bandwidth are independent. Input bandwidth refers to the data flow rate per second sent to the GPU, while output bandwidth refers to the data flow rate per second retrieved from the GPU. To improve input bandwidth, if the computational cost of the data computation task at the current execution priority is less than or equal to a certain threshold, the next computational priority data computation task is executed in parallel. Similarly, to improve output bandwidth, if the number of tasks at the current output priority is less than or equal to a second threshold, the next output priority data output task is executed in parallel.

[0076] The GPU's computing power is provided by Stream Multiprocessors (SMs). Threads are allocated to SMs for execution, and each thread on an SM runs concurrently using a wrapping mechanism (e.g., 32 threads per group). Therefore, when the proportion of active wrapping tasks is low, the next data computation task with the next computation priority can be executed in parallel to increase the proportion of active wrapping tasks.

[0077] Compared to executing each data input task sequentially according to its input priority from high to low, i.e., executing the next priority task only after completing the previous priority task, this embodiment of the application further improves the utilization rate of computing resources by starting to execute data input tasks under the next input priority in parallel when the number of tasks under the current input priority is less than or equal to a first task volume threshold, starting to execute data output tasks under the next output priority in parallel when the number of tasks under the current output priority is less than or equal to a second task volume threshold, and starting to execute data computation tasks under the next computation priority in parallel when the computing power consumption of the data computation tasks under the current computation priority is less than or equal to a consumption threshold.

[0078] The following explanation uses a low-speed urban autonomous driving scenario as an example to illustrate the solution of the above system:

[0079] In low-speed urban autonomous driving scenarios, one possible configuration is three LiDARs, including a top LiDAR, a left LiDAR, and a right LiDAR, and eight cameras, including a long-range forward-facing camera, a mid-range forward-facing camera, a close-range forward-facing camera, a left front-side camera, a right front-side camera, a left rear-side camera, a right rear-side camera, and a front rear-facing camera.

[0080] Assuming both the camera and LiDAR are triggered at 10Hz, in the worst-case scenario for the Host2Device stage, all 11 sensors arrive at the SoC (System on Chip) simultaneously. After some preprocessing, the data is copied from host memory to GPU memory. However, the GPU's total data bandwidth is fixed, so simultaneous data copying slows everything down. To meet the real-time requirements of forward-moving perception, if there is a forward sensor data copying task, it will be added to the front of the task queue, ensuring priority execution (higher priority than lateral and backward tasks). Therefore, forward tasks are exclusive. If there are no forward tasks at present, lateral data copying can proceed concurrently.

[0081] Similar to the computation phase, the computation of the three forward cameras and the top LiDAR has a high priority. Therefore, when performing GPU inference, these four sensors are executed first, and the same principle applies to the output phase.

[0082] The effects achieved by adjusting the task priorities of the data replication and computation phases include at least the following:

[0083] (1) While ensuring the priority of the replication task, try to occupy as much bandwidth as possible;

[0084] (2) While ensuring the priority of computing tasks, try to use the maximum computing power;

[0085] (3) From the perspective of task pipeline, it ensures that high-priority pipelines are optimally scheduled and executed.

[0086] The above discussion assumes that the forward direction has high priority. If some driving behavior data, such as execution, left turn, right turn, and emergency braking, can be obtained during the calculation process, the priority of sensors in different directions can be dynamically adjusted to achieve the overall optimal configuration.

[0087] Based on the above system embodiments, another embodiment of this application provides a task scheduling method. The method is applied to a task scheduling system, which schedules and executes workflows triggered by each sensor. Each workflow includes a data input task, a data computation task, and a data output task, such as... Figure 4 As shown, the method includes:

[0088] S210: Obtain multiple data input tasks generated based on data collected by each sensor, set an input priority for each data input task, execute each data input task according to the input priority and / or the number of tasks under each input priority, and generate the data calculation task corresponding to the data input task after the data input task is completed.

[0089] In this context, when data input tasks, data calculation tasks, and data output tasks are collectively referred to as target tasks, and input priority, calculation priority, and output priority are collectively referred to as target priorities, a target priority is set for each target task. This includes: setting a target priority for the target task of the corresponding sensor based on the default sensor priority corresponding to the workflow stage in which the target task is located; or, determining the sensor priority corresponding to the workflow stage in which the target task is located based on the vehicle's driving status, and setting a target priority for the target task of the corresponding sensor based on the determined sensor priority.

[0090] For example, in this step, the input priority of the data input task of the corresponding sensor can be set according to the default sensor priority corresponding to the data input stage, or the sensor priority corresponding to the data input stage can be determined according to the vehicle's driving status, and the input priority of the data input task of the corresponding sensor can be set according to the determined sensor priority.

[0091] After setting input priorities, the system can directly execute each data input task sequentially according to its priority from highest to lowest, or it can execute data input tasks based on both the input priorities and the number of tasks under each priority. In other words, it can execute each data input task sequentially according to its priority from highest to lowest, and if the number of tasks under the currently executing input priority is less than or equal to a first task quantity threshold, it will begin executing data input tasks under the next input priority in parallel. The first task quantity threshold can be determined based on practical experience.

[0092] S220: Set a computation priority for each data computation task, execute each data computation task according to the computation priority and / or the computational power consumption of each data computation task under each input priority, and generate the corresponding data output task after the data computation task is completed.

[0093] The execution computing power consumption includes the percentage of kernel usage in the graphics processing unit (GPU) or the percentage of active thread bundles.

[0094] In this step, the calculation priority of the data calculation task of the corresponding sensor can be set according to the default sensor priority corresponding to the data calculation stage, or the sensor priority corresponding to the data calculation stage can be determined according to the vehicle's driving status, and the calculation priority of the data calculation task of the corresponding sensor can be set according to the determined sensor priority.

[0095] After setting the computation priorities, the system can directly execute each data computation task sequentially according to its priority from highest to lowest, or it can execute data computation tasks based on both the computation priorities and the number of tasks under each priority. In other words, it can execute each data computation task sequentially according to its priority from highest to lowest, and if the computational power consumption of the data computation task under the currently executing priority is less than or equal to a consumption threshold, it will begin executing the data computation task under the next priority in parallel. The consumption threshold can be determined based on practical experience.

[0096] S230: Set an output priority for each data output task, and execute each data output task according to the output priority and / or the number of tasks under each output priority.

[0097] In this step, the output priority of the data output task of the corresponding sensor can be set according to the default sensor priority corresponding to the data output stage, or the sensor priority corresponding to the data output stage can be determined according to the vehicle's driving status, and the output priority of the data output task of the corresponding sensor can be set according to the determined sensor priority.

[0098] After setting the output priorities, the system can execute each data output task sequentially from highest to lowest priority. If the number of tasks under the currently executing output priority is less than or equal to the second task volume threshold, the system will begin executing data output tasks under the next output priority in parallel. The second task volume threshold can be determined based on practical experience.

[0099] The task scheduling method provided in this application can divide each workflow into three types of tasks, each executed by a corresponding management module. When executing data input tasks, the data input management module can execute each data input task according to its input priority and / or the number of tasks under each input priority. When executing data calculation tasks, the data calculation management module can execute each data calculation task according to its calculation priority and / or the computational power consumption of each data calculation task under each input priority. When executing data output tasks, the data output management module can execute each data output task according to its output priority and / or the number of tasks under each output priority. This not only ensures that high-priority tasks are processed first, improving the efficiency of autonomous driving, but also further improves the utilization of computing resources by combining priorities with the number of tasks and computational power consumption under each input priority to determine the scheduling timing of adjacent priorities. Furthermore, when each workflow changes, management modules can be quickly added or removed, improving the system's scalability.

[0100] Based on the above method embodiments, another embodiment of this application provides a task scheduling apparatus. The apparatus is applied to a task scheduling system, which schedules and executes workflows triggered by each sensor. Each workflow includes a data input task, a data computation task, and a data output task, such as... Figure 5 As shown, the device includes:

[0101] The acquisition unit 310 is used to acquire multiple data input tasks generated based on data collected by each sensor;

[0102] Setting unit 320 is used to set input priority for each of the data input tasks;

[0103] Execution unit 330 is configured to execute each of the data input tasks according to the input priority and / or the number of tasks under each input priority;

[0104] The generation unit 340 is used to generate the data calculation task corresponding to the data input task after the data input task is completed;

[0105] The setting unit 320 is also used to set a calculation priority for each of the data calculation tasks;

[0106] The execution unit 330 is further configured to execute each of the data calculation tasks according to the calculation priority and / or the execution computing power consumption of each of the data calculation tasks under the input priority;

[0107] The generation unit 340 is also used to generate the data output task corresponding to the data calculation task after completing the data calculation task;

[0108] The setting unit 320 is also used to set an output priority for each of the data output tasks;

[0109] The execution unit 330 is further configured to execute each of the data output tasks according to the output priority and / or the number of tasks under each output priority.

[0110] In one possible implementation, the execution unit 330 is configured to execute each data input task sequentially according to the input priority from high to low, and if the number of tasks under the currently executed input priority is less than or equal to a first task quantity threshold, to begin parallel execution of the data input tasks under the next input priority; and / or,

[0111] Each data computation task is executed sequentially in descending order of computation priority, and if the computational power consumption of the data computation task at the current priority is less than or equal to the consumption threshold, the data computation task at the next priority is executed in parallel; and / or,

[0112] Each data output task is executed sequentially in descending order of output priority. If the number of tasks under the current output priority is less than or equal to the second task quantity threshold, the data output tasks under the next output priority are executed in parallel.

[0113] In one possible implementation, the execution computing power consumption includes the percentage of kernel usage in the graphics processing unit (GPU) or the percentage of active thread bundles.

[0114] In one possible implementation, the setting unit 320 is configured to, when the data input task, the data calculation task, and the data output task are collectively referred to as target tasks, and the input priority, the calculation priority, and the output priority are collectively referred to as target priorities, set the target priority for the target task of the corresponding sensor according to the default sensor priority corresponding to the workflow stage where the target task is located; or, based on the vehicle's driving state, determine the sensor priority corresponding to the workflow stage where the target task is located, and set the target priority for the target task of the corresponding sensor according to the determined sensor priority.

[0115] The task scheduling device provided in this application embodiment can divide each workflow into three types of tasks, each executed by a corresponding management module. When executing data input tasks, the data input management module can execute each data input task according to its input priority and / or the number of tasks under each input priority. When executing data calculation tasks, the data calculation management module can execute each data calculation task according to its calculation priority and / or the computational power consumption of each data calculation task under each input priority. When executing data output tasks, the data output management module executes each data output task according to its output priority and / or the number of tasks under each output priority. This not only ensures that high-priority tasks are processed first, improving the efficiency of intelligent driving, but also further improves the utilization of computing resources by combining priorities with the number of tasks and computational power consumption under each input priority to determine the scheduling timing of adjacent priorities. Furthermore, when each workflow changes, management modules can be quickly added or removed, improving the system's scalability.

[0116] Based on the above method embodiments, another embodiment of this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as described in any of the above embodiments.

[0117] Based on the above method embodiments, another embodiment of this application provides an electronic device or computer device, such as... Figure 6 As shown, it includes:

[0118] One or more processors 410;

[0119] The processor 410 is coupled to a storage device 420, the storage device 420 being used to store one or more programs;

[0120] When the one or more programs are executed by the one or more processors 410, the electronic device or computer device performs the method as described in any of the above embodiments.

[0121] Based on the above method embodiments, another embodiment of this application provides a vehicle that includes the device as described in any of the above embodiments, or includes the electronic device as described above.

[0122] Based on the above embodiments, another embodiment of this application provides a computer program product, which includes instructions that, when executed on a computer or processor, cause the computer or processor to perform the method described in any of the above embodiments.

[0123] The above-described method and apparatus embodiments correspond to the system embodiments and have the same technical effects. For detailed descriptions, please refer to the method embodiments. The apparatus embodiments are derived based on the method embodiments; detailed descriptions can be found in the method embodiments section, and will not be repeated here. Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of one embodiment, and the modules or processes shown in the drawings are not necessarily essential for implementing this application.

[0124] Those skilled in the art will understand that the units and modules in the apparatus of the embodiments can be distributed in the apparatus of the embodiments as described in the embodiments, or they can be located in one or more devices different from this embodiment with corresponding changes. The units / modules of the above embodiments can be combined into one unit / module, or they can be further divided into multiple sub-units / sub-modules.

[0125] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A task scheduling system, characterized in that, The system is used to schedule and execute workflows triggered by each sensor. Each workflow includes a data input task, a data calculation task, and a data output task. The system includes a data input management module, a data calculation management module, and a data output management module. The data input management module is used to acquire multiple data input tasks generated based on data collected by each sensor, set an input priority for each data input task, execute each data input task according to the input priority and / or the number of tasks under each input priority, and after completing the data input task, generate the data calculation task corresponding to the data input task and send it to the data calculation management module. The data computing management module is used to obtain each data computing task sent by the data input management module, set a computing priority for each data computing task, execute each data computing task according to the computing priority and / or the computing power consumption of each data computing task under the input priority, and generate the data output task corresponding to the data computing task after completing the data computing task, and send it to the data output management module. The data output management module is used to obtain each data output task sent by the data calculation management module, set an output priority for each data output task, and execute each data output task according to the output priority and / or the number of tasks under each output priority.

2. The system according to claim 1, characterized in that, The data input management module is used to execute each data input task in descending order of input priority, and to start executing the data input task under the next input priority in parallel when the number of tasks under the current input priority is less than or equal to the first task quantity threshold. And / or, The data output management module is used to execute each data output task in descending order of output priority, and to start executing the data output task under the next output priority in parallel when the number of tasks under the current output priority is less than or equal to the second task quantity threshold.

3. The system according to claim 1, characterized in that, The data computing management module is used to execute each data computing task in descending order of computing priority, and to start parallel execution of the data computing task under the next computing priority if the computing power consumption of the data computing task under the current computing priority is less than or equal to the consumption threshold.

4. The system according to claim 3, characterized in that, The execution computing power consumption includes the percentage of kernel usage in the graphics processing unit (GPU) or the percentage of active thread bundles.

5. The system according to any one of claims 1-4, characterized in that, When the data input task, the data calculation task, and the data output task are collectively referred to as target tasks, and the input priority, the calculation priority, and the output priority are collectively referred to as target priorities, the target priority is set for the target task of the corresponding sensor according to the default sensor priority corresponding to the workflow stage where the target task is located. Alternatively, the sensor priority corresponding to the workflow stage where the target task is located is determined according to the vehicle's driving state, and the target priority is set for the target task of the corresponding sensor according to the determined sensor priority.

6. A task scheduling method, characterized in that, The method is applied to a task scheduling system, which schedules and executes workflows triggered by each sensor, each workflow including a data input task, a data computation task, and a data output task. The method includes: Multiple data input tasks generated based on data collected by each sensor are obtained, and an input priority is set for each data input task. Each data input task is executed according to the input priority and / or the number of tasks under each input priority. After the data input task is completed, the data calculation task corresponding to the data input task is generated. A calculation priority is set for each of the data calculation tasks. Each data calculation task is executed according to the calculation priority and / or the execution computing power consumption of each data calculation task under the input priority. After the data calculation task is completed, the data output task corresponding to the data calculation task is generated. An output priority is set for each of the data output tasks, and each of the data output tasks is executed according to the output priority and / or the number of tasks under each output priority.

7. The method according to claim 6, characterized in that, Execute each data input task according to the input priority and / or the number of tasks under each input priority, including: executing each data input task sequentially in descending order of input priority, and if the number of tasks under the currently executed input priority is less than or equal to a first task quantity threshold, starting to execute the data input tasks under the next input priority in parallel; and / or, Executing each data computation task according to the computation priority and / or the computational power consumption of each data computation task under the input priority includes: executing each data computation task sequentially in descending order of computation priority, and if the computational power consumption of the data computation task under the currently executed computation priority is less than or equal to the consumption threshold, then starting to execute the data computation task under the next computation priority in parallel; and / or, Execute each data output task according to the output priority and / or the number of tasks under each output priority, including: executing each data output task sequentially in descending order of the output priority, and starting to execute the data output task under the next output priority in parallel if the number of tasks under the currently executed output priority is less than or equal to the second task quantity threshold.

8. A task scheduling device, characterized in that, The device is used in a task scheduling system, which schedules and executes workflows triggered by each sensor. Each workflow includes a data input task, a data computation task, and a data output task. The device includes: The acquisition unit is used to acquire multiple data input tasks generated based on data collected by each sensor; The setting unit is used to set the input priority for each of the data input tasks; An execution unit is configured to execute each of the data input tasks according to the input priority and / or the number of tasks under each input priority; The generation unit is used to generate the data calculation task corresponding to the data input task after the data input task is completed; The setting unit is also used to set a calculation priority for each of the data calculation tasks; The execution unit is further configured to execute each of the data calculation tasks according to the calculation priority and / or the execution computing power consumption of each of the input priorities; The generation unit is also used to generate the data output task corresponding to the data calculation task after completing the data calculation task; The setting unit is also used to set an output priority for each of the data output tasks; The execution unit is further configured to execute each of the data output tasks according to the output priority and / or the number of tasks under each output priority.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 6-7.

10. An electronic device, characterized in that, The electronic device includes: One or more processors; The processor is coupled to a storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the electronic device performs the method as described in any one of claims 6-7.