IP Library Granted Patent US 12,333,333
Granted Patent B2
US 12,333,333 · App. 17/957,940 · Granted Jun 17, 2025

Task scheduling method and apparatus

Inventor: Qijian He (Shanghai, CN)
Assignee: Shenzhen Yinwang Intelligent Technologies Co., Ltd.
G06F9/4881
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,333,333
App. No.
17/957,940
Granted
Jun 17, 2025
Kind
B2
Abstract

A task scheduling method and an apparatus that belongs to the field of intelligent vehicles is provided. The method may be applied to an embedded device using AUTomotive Open System Architecture (AUTOSAR), the embedded device includes a memory and a processor, the memory stores an interface function, and a first software component and a second software component are deployed in the processor. In this solution, registration information of a to-be-deployed algorithm may be obtained and parsed by using the interface function, and a task in the algorithm may be scheduled and executed by using the software component.

Claims (73)

1. A task scheduling method, comprising:

obtaining, by an embedded device using AUTomotive Open System ARchitecture (AUTOSAR) and an interface function, registration information of a to-be-deployed algorithm, wherein the algorithm comprises a plurality of tasks, and wherein the registration information comprises configuration information of each task and relational data used to describe a dependency between the plurality of tasks;

generating, by the embedded device via the interface function, a dependency graph of the plurality of tasks based on the relational data, wherein the dependency graph comprises a plurality of nodes; and each node is used to indicate one task;

recording, by the embedded device via the interface function, a mapping relationship between each node in the dependency graph and configuration information of a task indicated by the node to obtain an execution flow graph of the algorithm;

creating, by the embedded device via a first software component, an algorithm instance based on the execution flow graph;

scheduling, by the embedded device via the first software component based on the algorithm instance, a target task that meets a scheduling condition in the plurality of tasks comprised in the algorithm to a second software component;

executing, by the embedded device via the second software component, the target task;

sending, by the embedded device via the second software component, a notification message to the first software component after the second software component executes the target task, wherein the notification message is used to indicate that the target task is executed; and

updating, by the embedded device via the first software component, a status of the target task to a finish state in response to the notification message.

2. The method according to claim 1 , wherein the creating, by the embedded device via the first software component, an algorithm instance based on the execution flow graph comprises:

in response to the first software component determining that the first software component meets an instance creation condition, creating the algorithm instance based on the execution flow graph, wherein the instance creation condition comprises one or more of the following conditions:

a total quantity of created instances of the first software component is less than a quantity threshold; and

the embedded device has a resource required to execute the task in the algorithm.

3. The method according to claim 2 , wherein a plurality of second software components are deployed in the embedded device and the scheduling, by the embedded device via the first software component based on the algorithm instance, a target task that meets a scheduling condition in the plurality of tasks comprised in the algorithm to the second software component comprises:

determining, by the embedded device via the first software component based on the algorithm instance and from the plurality of tasks comprised in the algorithm, an identifier of the target task that meets the scheduling condition;

determining, by the embedded device via the first software component based on the identifier of the target task and from the plurality of second software components, a target second software component executed by the processor to execute the target task; and

sending, by the embedded device via the first software component, the identifier of the target task to the target second software component.

4. The method according to claim 1 , wherein before the scheduling, by the embedded device via the first software component based on the algorithm instance, a target task that meets a scheduling condition in the algorithm to the second software component, the method further comprises:

detecting, by the embedded device via the first software component based on the algorithm instance and in response to the notification message, whether the target task that meets the scheduling condition exists in the plurality of tasks comprised in the algorithm.

5. The method according to claim 1 , wherein the scheduling condition comprises:

the embedded device having the resource required to execute the task; and a status of a task on which the task depends is a finish state.

6. The method according to claim 1 , wherein the configuration information comprises:

attribute information of each task and scheduling information of each task; and

the recording, by the embedded device via the interface function, a mapping relationship between each node in the dependency graph and configuration information of a task indicated by the node; to obtain an execution flow graph of the algorithm comprises:

recording, by the embedded device via the interface function, a mapping relationship between each node in the dependency graph and the attribute information of the task indicated by the node; to obtain a task flow graph of the algorithm; and

recording, by the embedded device via the interface function, a mapping relationship between each node in the task flow graph and the scheduling information of the task indicated by the node to obtain the execution flow graph of the algorithm.

7. An embedded device using AUTomotive Open System ARchitecture (AUTOSAR), wherein the embedded device comprises a memory and a processor, and wherein the memory stores an interface function, and wherein a first software component and a second software component are deployed in the processor and wherein:

the interface function is executed by the processor to:

obtain registration information of a to-be-deployed algorithm, wherein the algorithm comprises a plurality of tasks, and wherein the registration information comprises configuration information of each task and relational data used to describe a dependency between the plurality of tasks;

generate a dependency graph of the plurality of tasks based on the relational data, wherein the dependency graph comprises a plurality of nodes; and each node is used to indicate one task; and

record, in the memory, a mapping relationship between each node in the dependency graph and configuration information of a task indicated by the node; to obtain an execution flow graph of the algorithm; and

wherein the first software component is executed by the processor to create an algorithm instance based on the execution flow graph, and schedule, based on the algorithm instance, a target task that meets a scheduling condition in the plurality of tasks comprised in the algorithm to the second software component; and

wherein the second software component is executed by the processor to execute the target task;

wherein the second software component is further executed by the processor to:

send a notification message to the first software component after the target task is executed, wherein the notification message is used to indicate that the target task is executed; and

update a status of the target task to a finish state in response to the notification message.

8. The device according to claim 7 , wherein the first software component is further executed by the processor to:

in response to being determined that the first software component meets an instance creation condition, create the algorithm instance based on the execution flow graph, wherein the instance creation condition comprises one or more of the following conditions:

a total quantity of created instances is less than a quantity threshold; and

the embedded device has a resource required to execute the task in the algorithm.

9. The device according to claim 7 , wherein:

a plurality of second software components are deployed in the processor and the first software component is further executed by the processor to:

determine, based on the algorithm instance and from the plurality of tasks comprised in the algorithm, an identifier of the target task that meets the scheduling condition;

determine, based on the identifier of the target task and from the plurality of second software components, a target second software component configured to execute the target task; and

send the identifier of the target task to the target second software component.

10. The device according to claim 7 , wherein the first software component is further executed by the processor to:

detect, based on the algorithm instance and in response to the notification message, whether the target task that meets the scheduling condition exists in the plurality of tasks comprised in the algorithm.

11. The device according to claim 7 , wherein the scheduling condition comprises:

the embedded device having the resource required to execute the task and a status of a task on which the task depends is a finish state.

12. The device according to claim 7 , wherein the configuration information comprises attribute information of each task and scheduling information of each task and the interface function is further executed by the processor to:

record, in the memory, a mapping relationship between each node in the dependency graph and the attribute information of the task indicated by the node; to obtain a task flow graph of the algorithm; and

record, in the memory, a mapping relationship between each node in the task flow graph and the scheduling information of the task indicated by the node-to obtain the execution flow graph of the algorithm.

13. A non-transitory computer-readable storage medium, wherein the computer-readable storage medium stores instructions, and in response to the computer-readable storage medium being run on an embedded device, the embedded device is enabled to perform the following:

obtaining, using AUTomotive Open System ARchitecture (AUTOSAR) and an interface function, registration information of a to-be-deployed algorithm, wherein the algorithm comprises a plurality of tasks, and wherein the registration information comprises configuration information of each task and relational data used to describe a dependency between the plurality of tasks;

generating, by the embedded device via the interface function, a dependency graph of the plurality of tasks based on the relational data, wherein the dependency graph comprises a plurality of nodes and each node is used to indicate one task,

recording, by the embedded device via the interface function, a mapping relationship between each node in the dependency graph and configuration information of a task indicated by the node to obtain an execution flow graph of the algorithm;

creating, by the embedded device via a first software component, an algorithm instance based on the execution flow graph;

scheduling, by the embedded device via the first software component based on the algorithm instance, a target task that meets a scheduling condition in the plurality of tasks comprised in the algorithm to a second software component;

executing, by the embedded device via the second software component, the target task;

sending, by the embedded device via the second software component, a notification message to the first software component after the second software component executes the target task, wherein the notification message is used to indicate that the target task is executed; and

updating, by the embedded device via the first software component, a status of the target task to a finish state in response to the notification message.

14. The non-transitory computer-readable storage medium according to claim 13 , wherein the creating, by the embedded device via the first software component, an algorithm instance based on the execution flow graph comprises:

in response to the first software component determining that the first software component meets an instance creation condition, creating the algorithm instance based on the execution flow graph, wherein the instance creation condition comprises one or more of the following conditions:

a total quantity of created instances of the first software component is less than a quantity threshold; and

the embedded device has a resource required to execute the task in the algorithm.

15. The non-transitory computer-readable storage medium according to claim 14 , wherein a plurality of second software components are deployed in the embedded device and the scheduling, based on the algorithm instance, a target task that meets a scheduling condition in the plurality of tasks comprised in the algorithm to the second software component comprises:

determining, based on the algorithm instance and from the plurality of tasks comprised in the algorithm, an identifier of the target task that meets the scheduling condition;

determining, based on the identifier of the target task and from the plurality of second software components, a target second software component configured to execute the target task; and

sending the identifier of the target task to the target second software component.

16. The non-transitory computer-readable storage medium according to claim 13 , wherein before the scheduling, based on the algorithm instance, a target task that meets a scheduling condition in the algorithm to the second software component, the embedded device is further enabled to perform the following:

detecting, based on the algorithm instance and in response to the notification message, whether the target task that meets the scheduling condition exists in the plurality of tasks comprised in the algorithm.

17. The non-transitory computer-readable storage medium according to claim 13 , wherein the scheduling condition comprises:

the embedded device having the resource required to execute the task and a status of a task on which the task depends is a finish state.

Assignments (3)
CHANGE OF NAME Recorded May 1, 2026
From: SHENZHEN YINWANG INTELLIGENT TECHNOLOGIES CO., LTD.
To: YINWANG INTELLIGENT TECHNOLOGIES CO., LTD.
Reel/Frame 075316/0074 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 8, 2025
From: HE, QIJIAN
To: HUAWEI TECHNOLOGIES CO., LTD.
Reel/Frame 069779/0877 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 12, 2024
From: HUAWEI TECHNOLOGIES CO., LTD.
To: SHENZHEN YINWANG INTELLIGENT TECHNOLOGIES CO., LTD.
Reel/Frame 069336/0026 →
Continuity (2)
Continuation PCTCN2020082729 · Apr 1, 2020
Related Publication 20230025917A1 · Jan 26, 2023
References Cited (17)
US 8566633B2 · Fuhrman · 2013 [cited by examiner]
US 8566804B1 · Carrick · 2013 [cited by examiner]
US 8990783B1 · Yu · 2015 [cited by examiner]
US 9135065B1 · Stefansson · 2015 [cited by applicant]
US 10196069B2 · Satyavolu · 2019 [cited by examiner]
US 10216542B2 · Wang · 2019 [cited by examiner]
US 10452432B2 · Lim · 2019 [cited by examiner]
US 10452605B2 · Wang · 2019 [cited by examiner]
CN 103257904A · 2013 [cited by applicant]
CN 106897132A · 2017 [cited by applicant]
CN 109445926A · 2019 [cited by applicant]
CN 109743390A · 2019 [cited by applicant]
Wang et al., “Generation of Schedule Tables on Multi-core Systems for Autosar Applications,” 2016 Conference on Design and Architectures for Signal and Image Processing (DASIP), Total 8 pages, Institute of Electrical an… [cited by applicant]
Xie, “Research on Multiple DAGs Scheduling of Heterogeneous Networked Embedded Systems for Automotive,” Hunan University, Issue 03, Total 138 pages (2019). With an English Abstract. [cited by applicant]
Wang et al., “Optimizing Application Distribution on Multi-Core Systems within Autosar,” 8th European Congress on Embedded Real Time Software and Systems (ERTS 2016), HAL Id: hal-01289485, Total 11 pages, HAL open scien… [cited by applicant]
Xie et al., “Optimal configuration algorithm for static segment of FlexRay,” Journal on Communications, doi:10.3969/j.issn.1000-436x.2012.11.005, vol. 33, No. 11, Total 8 pages (Nov. 2012). With an English Abstract. [cited by applicant]
Nasri et al., “Response-Time Analysis of Limited-Preemptive Parallel DAG Tasks Under Global Scheduling,” 31st Euromicro Conference on Real-Time Systems (ECRTS 2019), Article No. 21, Leibniz International Proceedings in … [cited by applicant]