Task scheduling method and system for auxiliary driving system and storage medium
By building a task scheduler process and a unified control interface in the operating system, the resources of the assisted driving system are dynamically managed, solving the response delay problem caused by resource contention in traditional systems and achieving faster system response and resource utilization efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NEUSOFT RUICHI AUTOMOTIVE TECH (WUHAN) CO LTD
- Filing Date
- 2025-12-25
- Publication Date
- 2026-04-21
AI Technical Summary
Traditional driver assistance systems suffer from problems such as insufficient resources for critical tasks and system response delays due to dynamic changes in the workload of multiple functional modules and resource competition.
Deploy business processes and independent task scheduler processes within the operating system. Through a predefined task scheduling table and a unified control interface, dynamically manage the lifecycle of tasks and resource allocation, and employ high-priority scheduling algorithms to ensure that critical tasks receive resources.
It enables precise allocation and efficient utilization of resources in the driver assistance system, improves system response speed, and alleviates resource shortages and delays in critical tasks.
Smart Images

Figure CN121893976A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of scheduling management, and in particular to a task scheduling method, system, and storage medium for a driver assistance system. Background Technology
[0002] Advanced driver assistance systems (ADAS) involve the collaborative work of multiple modules, including perception, decision-making, and control. Each module contains a large number of computational tasks (such as sensor data processing, path planning, and obstacle recognition). These tasks have vastly different requirements for computing power, memory, and network bandwidth, and may dynamically change with the driving scenario (for example, the computational load in highway cruising is drastically different from that in urban congestion). Without proper scheduling, there is a risk of insufficient resources for critical tasks (such as delayed emergency braking decisions) or excessive resource consumption by non-critical tasks, directly affecting the system's response speed and reliability.
[0003] In summary, traditional driver assistance systems suffer from technical problems such as insufficient critical task resources and system response delays due to the dynamic changes in the workload of multiple functional modules and resource competition. Summary of the Invention
[0004] In view of this, the purpose of the present invention is to provide a task scheduling method, system and storage medium for a driver assistance system, so as to alleviate the technical problems of insufficient critical task resources and system response delay caused by dynamic changes in the task load of multiple functional modules and resource competition in traditional driver assistance systems.
[0005] In a first aspect, the present invention provides a task scheduling method for an assisted driving system, the method comprising: Deploy business processes and independent task scheduler processes in the operating system. The business processes contain multiple tasks with a unified control interface. The task scheduler process loads a predefined task scheduling table, which defines system functions, tasks, inter-task dependencies, and scheduling strategies. The task scheduler process receives system function requests from the driver assistance system or the user; The task scheduler process queries the task scheduling table according to the system function request, determines the set of tasks whose status needs to be changed and their order of change, and generates corresponding task control instructions. The task scheduler process sends the task control instructions to the corresponding business processes, which then execute the task control instructions to change the state of their internal tasks, thereby achieving dynamic allocation of resources for the assisted driving system.
[0006] Furthermore, the unified control interface includes: an initialization interface, a deinitialization interface, an activation interface, a deactivation interface, and an interface for changing operating parameters; The business process manages the lifecycle and operational behavior of its internal tasks by calling the unified control interface.
[0007] Furthermore, the task scheduling table includes the following fields: system function identifier, process identifier, task identifier, task priority, action to be executed, and dependency on other task actions.
[0008] Furthermore, the determination of the set of tasks whose states need to be changed and the order of change are based on a scheduling algorithm. The scheduling algorithm selects tasks from the task scheduling table that simultaneously meet the following conditions as tasks to be scheduled: (a) Not marked as executed; (b) There are no unsatisfied dependencies; (c) The task that satisfies conditions (a) and (b) has the highest priority.
[0009] Furthermore, the task scheduler process is set to a higher real-time priority than the business process to ensure that its scheduling instructions can be responded to in a timely manner.
[0010] Furthermore, the actions to be performed include: activating, deactivating, or changing running parameters, wherein the activation action is used to start the task running, the deactivation action is used to stop the task to release resources, and the changing running parameters action is used to dynamically adjust the execution configuration of the task.
[0011] Furthermore, the task scheduler process sends the task control instructions to the corresponding business processes through an inter-process communication mechanism.
[0012] In a second aspect, the present invention also provides a task scheduling system for an assisted driving system, for implementing the method as described in any one of the first aspects, the system comprising: One or more business processes are deployed on the operating system, and each business process contains multiple tasks with a unified control interface; The task scheduler process, separate from the business process, is configured to: load the task scheduling table; receive system function requests; generate task control instructions based on the task scheduling table and scheduling algorithm; and send the task control instructions to the target business process. The target business process responds to the task control command and performs state management of its internal tasks.
[0013] Furthermore, the task scheduler process and the business process exchange instructions and responses through an inter-process communication mechanism.
[0014] Thirdly, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the method described in the first aspect.
[0015] This invention provides a task scheduling method for an assisted driving system. The method includes: deploying a business process and an independent task scheduler process in an operating system; wherein the business process contains multiple tasks with a unified control interface; the task scheduler process loads a predefined task scheduling table, which defines system functions, tasks, inter-task dependencies, and scheduling strategies; the task scheduler process receives system function requests from the assisted driving system or a user; based on the system function requests, the task scheduler process queries the task scheduling table to determine the set of tasks whose states need to be changed and their order of change, and generates corresponding task control instructions; the task scheduler process sends the task control instructions to the corresponding business process, which then executes the task control instructions to change the state of its internal tasks, thereby achieving dynamic allocation of resources for the assisted driving system. As described above, the task scheduling method for assisted driving systems of the present invention constructs a dynamic task scheduler at the application layer, oriented towards business logic, on top of the operating system. Through a predefined task scheduling table and a unified control interface, it achieves accurate allocation and efficient utilization of resources in the assisted driving system, greatly improving the system response speed and alleviating the technical problems of insufficient critical task resources and system response delay caused by dynamic changes in the task load of multiple functional modules and resource competition in traditional assisted driving systems. Attached Figure Description
[0016] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0017] Figure 1 A flowchart of a task scheduling method for an assisted driving system provided in an embodiment of the present invention; Figure 2 This is a block diagram illustrating the intent understanding of an assisted driving system provided in an embodiment of the present invention. Detailed Implementation
[0018] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] In traditional driver assistance systems, the dynamic changes in the workload of multiple functional modules and resource competition lead to insufficient resources for critical tasks and system response delays.
[0020] Based on this, the task scheduling method for assisted driving systems of the present invention constructs a dynamic task scheduler at the application layer, oriented towards business logic, on top of the operating system. Through a predefined task scheduling table and a unified control interface, it realizes the accurate allocation and efficient utilization of assisted driving system resources, greatly improving the system response speed.
[0021] To facilitate understanding of this embodiment, a task scheduling method for an assisted driving system disclosed in this embodiment of the invention will first be described in detail.
[0022] Example 1: According to an embodiment of the present invention, an embodiment of a task scheduling method for an assisted driving system is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0023] Figure 1 This is a flowchart of a task scheduling method for an assisted driving system according to an embodiment of the present invention, such as... Figure 1 As shown, the method includes the following steps: Step S102: Deploy business processes and independent task scheduler processes in the operating system. The business processes contain multiple tasks with a unified control interface. The task scheduler process loads a predefined task scheduling table, which defines system functions, tasks, inter-task dependencies, and scheduling strategies. Step S104: The task scheduler process receives system function requests from the driver assistance system or the user; Step S106: The task scheduler process queries the task scheduling table according to the system function request, determines the set of tasks whose status needs to be changed and their order of change, and generates corresponding task control instructions. In step S108, the task scheduler process sends task control instructions to the corresponding business process, which then executes the task control instructions to change the state of its internal tasks, thereby realizing the dynamic allocation of resources for the assisted driving system.
[0024] In this embodiment of the invention, in order to ensure the response speed and user experience of the system (i.e., the assisted driving system) in the operation of multiple tasks in multiple modules of the assisted driving system, a method is proposed to activate or deactivate different task sets according to the enabling of different functions of the system (i.e., system function requests). Based on the necessary resources required for business function migration, the optimal scheduling of the entire assisted driving system resources is achieved, reducing system resource waste and improving user experience.
[0025] This invention provides a task scheduling method for an assisted driving system. The method includes: deploying a business process and an independent task scheduler process in an operating system; wherein the business process contains multiple tasks with a unified control interface; the task scheduler process loads a predefined task scheduling table, which defines system functions, tasks, inter-task dependencies, and scheduling strategies; the task scheduler process receives system function requests from the assisted driving system or a user; based on the system function requests, the task scheduler process queries the task scheduling table to determine the set of tasks whose states need to be changed and their order of change, and generates corresponding task control instructions; the task scheduler process sends the task control instructions to the corresponding business process, which then executes the task control instructions to change the state of its internal tasks, thereby achieving dynamic allocation of resources for the assisted driving system. As described above, the task scheduling method for assisted driving systems of the present invention constructs a dynamic task scheduler at the application layer, oriented towards business logic, on top of the operating system. Through a predefined task scheduling table and a unified control interface, it achieves accurate allocation and efficient utilization of resources in the assisted driving system, greatly improving the system response speed and alleviating the technical problems of insufficient critical task resources and system response delay caused by dynamic changes in the task load of multiple functional modules and resource competition in traditional assisted driving systems.
[0026] The above provides a brief overview of the task scheduling method for an assisted driving system of the present invention. The specific details involved are described in detail below.
[0027] In an optional embodiment of the present invention, the unified control interface includes: an initialization interface, a deinitialization interface, an activation interface, a deactivation interface, and an interface for changing operating parameters; Business processes manage the lifecycle and runtime behavior of their internal tasks by calling a unified control interface.
[0028] In an optional embodiment of the present invention, The task scheduling table contains the following fields: system function identifier, process identifier, task identifier, task priority, action to be executed, and dependencies on other task actions.
[0029] In an optional embodiment of the present invention, The set of tasks whose states need to be changed and the order of the changes are determined based on the scheduling algorithm. The scheduling algorithm selects tasks from the task scheduling table that simultaneously meet the following conditions as tasks to be scheduled: (a) Not marked as executed; (b) There are no unsatisfied dependencies; (c) The task that satisfies conditions (a) and (b) has the highest priority.
[0030] In an optional embodiment of the present invention, The task scheduler process is set to a higher real-time priority than the business processes to ensure that its scheduling instructions can be responded to in a timely manner.
[0031] In an optional embodiment of the present invention, The actions to be performed include: activation, deactivation, or changing running parameters. The activation action is used to start the task, the deactivation action is used to stop the task to release resources, and the changing running parameters action is used to dynamically adjust the execution configuration of the task.
[0032] In an optional embodiment of the present invention, The task scheduler process sends task control instructions to the corresponding business processes through inter-process communication mechanisms.
[0033] This invention implements a method for optimal scheduling of system resources based on a dynamic task scheduler. Tasks are abstracted from business modules; different businesses have different business models, which can lead to different abstracted tasks. This invention is applicable to various business scenarios and has good scalability.
[0034] Intent understanding diagram as follows Figure 2 As shown.
[0035] Overall system deployment: a. Business processes (such as process A, process B, and process C) exist in the system as processes. Each process can consist of multiple tasks, which are abstracted according to business logic. Their granularity depends on the fineness of system control. Each task can be activated to start running or deactivated to stop running at any time. Each task is subject to unified scheduling by the task scheduler process. Each task has a unified control interface to achieve unified scheduling by the task scheduler process. The unified control interface is defined as follows:
[0036] b. The task scheduler process exists as an independent process within the system. It activates or deactivates different task sets based on the enabled system functions. System function activation may be user-triggered, such as a user initiating automatic parking via the HMI; or it may be triggered by internal system events, such as an EDR event. The task scheduler process has a higher priority than business processes. A FIFO real-time scheduling strategy is used to ensure the real-time performance of the task scheduler process. Based on the task scheduling table and the enabled status of different system functions, the task scheduler process outputs task activation control commands according to the following scheduling algorithm: ① Find the task that meets the following conditions from the task scheduling table: Condition 1: The task has not yet started; Condition 2: The task with no dependencies or the task with dependencies has already been completed; Condition 3: The task with the highest priority among the first two conditions must be met.
[0037] ② Send a task control instruction to the process containing the service that meets all three of the above conditions, with the timeout temporarily set to 5 seconds; ③ Wait for the execution result, and return to ① to continue execution until all tasks that meet the conditions have been completed.
[0038] c. Task scheduling table: Based on the correspondence between tasks extracted from system business and business functions, the task scheduler process controls tasks according to the task scheduling table. A system (i.e., an assisted driving system) may have multiple business functions, some of which are executed in parallel, while others are mutually exclusive. These functions need to be uniformly defined in the task scheduling table, as shown in the example below:
[0039] The task scheduling table mentioned above is a dynamically loadable configuration file; the task scheduler process supports reloading the updated task scheduling table during system runtime to achieve dynamic updates of the scheduling policy.
[0040] Specific procedures: a. During the system startup phase, business processes are created and started. The task scheduler process loads the task scheduling table to start the process and initializes the task according to the init action of the task in the task scheduling table.
[0041] b. When the task scheduler process receives a system function request from the system or HMI, it searches the task scheduling table, finds the task associated with the system function request, and implements control over these associated tasks.
[0042] c. During the system exit phase, all activated tasks are deactivated and stopped from running, and the deinit action is performed on all tasks.
[0043] This invention designs an independent task scheduler process above the operating system to achieve precise scheduling of system business logic, which is impossible for the process / thread scheduler in the operating system. Based on the business logic represented by the task scheduling table, it achieves the separation of the unified task scheduler process and different business logic, and has good scalability.
[0044] This invention proposes a task scheduling method based on system business logic. Unlike the process / thread scheduler provided by the operating system, this task scheduler process uses a task scheduling table and scheduling algorithm based on system business logic to achieve dynamic and precise scheduling according to business scenarios. It proposes a task scheduling table based on system business logic, which defines the dependencies between tasks in the system. The task scheduling table is key to achieving task scheduling and scalability. This invention extends the resource scheduling capabilities of the operating system to the business application layer. Through a three-in-one design of "task scheduler-scheduling table-standardized tasks," it realizes a new paradigm of dynamic resource management that is business-function oriented, configurable, and predictable. This method is particularly suitable for systems like assisted driving systems, which are complex, have diverse scenarios, and have extremely high requirements for real-time performance and reliability.
[0045] 1. Core Architecture: Three-layer Scheduling Model This solution designs a three-tier architecture to decouple business logic from operating system scheduling: First layer: Business processes and tasks Business process: The carrier of functional modules running in the system (such as process A - perception, process B - planning, process C - control).
[0046] Task: An independently manageable computing unit abstracted from business logic within a business process (such as "object detection" or "path planning" tasks). Each task is equipped with a unified control interface (init, definit, activate, deactivate, changepar), enabling it to be standardized and managed by the upper-layer scheduler process.
[0047] Second layer: Task scheduler (core) An independent, high-priority real-time process.
[0048] Core responsibility: It is not responsible for specific business calculations, but rather acts as a "scheduling brain," sending task control instructions (activation, deactivation, parameter modification) to tasks within the business process based on external events and predetermined strategies.
[0049] Scheduling is based on: a task scheduling table (predefined business logic rules) and a scheduling algorithm.
[0050] The third layer: Task scheduling table (the carrier of scheduling strategies) A static configuration table defines system functions, tasks, and the dependencies between tasks. It is the scheduler's "strategy."
[0051] Table structure: Defines key fields such as system function, process, task, priority, action (activate / deactivate / changepar), and dependencies.
[0052] 2. Workflow: Dynamic Response and Precise Scheduling 1. Initialization phase: The system starts up, and all business processes and task scheduler processes start up.
[0053] The task scheduler loads the task scheduling table.
[0054] The task scheduler process calls the init interface of all tasks to complete the initialization.
[0055] 2. Runtime Scheduling (Core): Event triggering: The user selects "automatic parking" through the HMI, or the system triggers an "emergency braking" event internally.
[0056] Scheduling decision: After the task scheduler process receives a system function request: a. Look up the table: Based on the function name of the "Automatic Parking" system, find all related task rows in the task scheduling table.
[0057] b. Analyze dependencies: resolve the dependencies between tasks (e.g., "task A is activated" depends on "task B is deactivated").
[0058] c. Generate instruction sequence: Generate an ordered sequence of task control instructions based on priority and dependencies.
[0059] Instruction execution: The task scheduler process sends a sequence of task control instructions to the corresponding business processes through inter-process communication (such as message queues).
[0060] Resource reallocation: The business process executes a sequence of task control instructions, activating the tasks required for "automatic parking" while deactivating unrelated or mutually exclusive tasks (such as the "high-speed cruise" task). System resources (CPU, memory) are then precisely reallocated to the tasks that are most needed at the moment.
[0061] 3. System Exit: The task scheduler process sends deactivate and deinit commands to safely shut down all tasks.
[0062] 3. Key Mechanisms: Scheduling Algorithms and Dependency Management The core of the scheduling algorithm is: Identify “ready tasks”: those that are (1) not executed, (2) have no dependencies or have satisfied dependencies, and (3) have the highest priority.
[0063] Effect: Ensures that critical tasks can obtain resources first, while avoiding deadlocks or state inconsistencies caused by task dependencies.
[0064] The inventive points of this invention are as follows: Invention Point 1: Application-layer dynamic task scheduling architecture oriented towards business logic; The technical problem solved: The operating system's native scheduler is unaware of business logic and cannot dynamically adjust resource allocation according to functional scenarios.
[0065] Technical approach: On top of the operating system process / thread scheduler, build an independent, high-priority application-layer task scheduler process. This task scheduler process dynamically manages the lifecycle (activation / deactivation) of tasks within the business process based on system function requests and predefined business logic (task scheduling table).
[0066] Technical effect: It realizes precise scheduling based on business awareness, dynamically allocates system resources to the most needed tasks in the current scenario, avoids the waste of resources by non-critical tasks, and fundamentally improves the system response speed and reliability.
[0067] Invention Point Two: A task management paradigm based on a unified control interface and configurable task scheduling tables; Technical problem solved: In traditional systems, task management logic is hard-coded into business code, resulting in high coupling and making it difficult to maintain and extend.
[0068] Technical means: Define a unified control interface (init, activate, deactivate, etc.) for all tasks, and abstract the mapping, dependency, priority, etc. of tasks and system functions into a structured task scheduling table, so that the scheduling logic is configurable and data-driven.
[0069] Technical benefits: It decouples scheduling logic from business logic. When new features need to be adapted or scheduling strategies need to be modified, only the configuration table needs to be modified without changing the code, greatly improving the system's scalability and maintainability.
[0070] Invention Point 3: A "Ready Task" Scheduling Algorithm Based on Dependency and Priority; Technical problem to be solved: In complex business scenarios, the task startup order is disordered, which may lead to functional abnormalities due to resource competition or unmet dependencies.
[0071] Technical means: The task scheduler uses an algorithm that always selects the tasks that are "not executed, have satisfied their dependencies, and have the highest priority" for priority scheduling.
[0072] Technical effect: It ensures the rationality and determinism of task scheduling, satisfies the dependency constraints of business logic, and ensures that high-priority tasks can obtain resources in a timely manner, thereby improving the stability and real-time performance of the system.
[0073] Example 2: A task scheduling system for an assisted driving system, for implementing the method as described in any of Embodiment 1, the system comprising: One or more business processes are deployed on the operating system, and each business process contains multiple tasks with a unified control interface; The task scheduler process, separate from the business process, is configured to: load the task scheduling table; receive system function requests; generate task control instructions based on the task scheduling table and scheduling algorithm; and send the task control instructions to the target business process. The target business process responds to task control instructions and performs state management of its internal tasks.
[0074] Optionally, the task scheduler process and the business process exchange instructions and responses through an inter-process communication mechanism.
[0075] The system provided in this embodiment of the invention has the same implementation principle and technical effects as the aforementioned method embodiment. For the sake of brevity, any parts not mentioned in the system embodiment can be referred to the corresponding content in the aforementioned method embodiment.
[0076] Corresponding to the above-described task scheduling method for an assisted driving system, this application embodiment also provides a computer-readable storage medium storing machine-executable instructions. When the machine-executable instructions are invoked and executed by a processor, the machine-executable instructions cause the processor to perform the steps of the above-described task scheduling method for an assisted driving system.
[0077] The task scheduling system for assisted driving systems provided in this application embodiment can be specific hardware on the device or software or firmware installed on the device. The system provided in this application embodiment has the same implementation principle and technical effects as the foregoing method embodiments. For the sake of brevity, any parts not mentioned in the device embodiments can be referred to the corresponding content in the foregoing method embodiments. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can all be referred to the corresponding processes in the above method embodiments, and will not be repeated here.
[0078] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0079] For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0080] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0081] In addition, the functional units in the embodiments provided in this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0082] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the task scheduling method for the assisted driving system described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0083] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0084] Finally, it should be noted that the above-described embodiments are merely specific implementations of this application, used to illustrate the technical solutions of this application, and not to limit them. The protection scope of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this application; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application. All should be covered within the protection scope of this application. Therefore, the protection scope of this application should be determined by the protection scope of the claims.
Claims
1. A task scheduling method for an assisted driving system, characterized in that, The method includes: Deploy business processes and independent task scheduler processes in the operating system. The business processes contain multiple tasks with a unified control interface. The task scheduler process loads a predefined task scheduling table, which defines system functions, tasks, inter-task dependencies, and scheduling strategies. The task scheduler process receives system function requests from the driver assistance system or the user; The task scheduler process queries the task scheduling table according to the system function request, determines the set of tasks whose status needs to be changed and their order of change, and generates corresponding task control instructions. The task scheduler process sends the task control instructions to the corresponding business processes, which then execute the task control instructions to change the state of their internal tasks, thereby achieving dynamic allocation of resources for the assisted driving system.
2. The method according to claim 1, characterized in that, The unified control interface includes: an initialization interface, a deinitialization interface, an activation interface, a deactivation interface, and an interface for changing operating parameters; The business process manages the lifecycle and operational behavior of its internal tasks by calling the unified control interface.
3. The method according to claim 1, characterized in that, The task scheduling table contains the following fields: system function identifier, process identifier, task identifier, task priority, action to be executed, and dependency on other task actions.
4. The method according to claim 1, characterized in that, The determination of the set of tasks whose states need to be changed and the order of change are based on a scheduling algorithm. The scheduling algorithm selects tasks from the task scheduling table that simultaneously meet the following conditions as tasks to be scheduled: (a) Not marked as executed; (b) There are no unsatisfied dependencies; (c) The task that satisfies conditions (a) and (b) has the highest priority.
5. The method according to claim 1, characterized in that, The task scheduler process is set to a higher real-time priority than the business processes to ensure that its scheduling instructions can be responded to in a timely manner.
6. The method according to claim 3, characterized in that, The actions to be performed include: activating, deactivating, or changing running parameters. The activation action is used to start the task, the deactivation action is used to stop the task to release resources, and the action to change running parameters is used to dynamically adjust the execution configuration of the task.
7. The method according to claim 1, characterized in that, The task scheduler process sends the task control instructions to the corresponding business processes through an inter-process communication mechanism.
8. A task scheduling system for an assisted driving system, for implementing the method as described in any one of claims 1 to 7, characterized in that, The system includes: One or more business processes are deployed on the operating system, and each business process contains multiple tasks with a unified control interface; The task scheduler process, separate from the business process, is configured to: load the task scheduling table; receive system function requests; generate task control instructions based on the task scheduling table and scheduling algorithm; and send the task control instructions to the target business process. The target business process responds to the task control command and performs state management of its internal tasks.
9. The system according to claim 8, characterized in that, The task scheduler process and the business process exchange instructions and responses through an inter-process communication mechanism.
10. A computer-readable storage medium storing a computer program thereon, characterized in that, The computer program is executed by the processor to perform the method of any one of claims 1 to 7.