Multi-task deterministic scheduling system and method

By designing a multi-task deterministic scheduling system in the field of vehicle communications and utilizing task execution modules, time synchronization modules, and performance tuning modules, the problem of absolute time scheduling that cannot be achieved in existing technologies is solved, strict time control and time consistency of tasks are achieved, and the requirements of time-sensitive application scenarios such as intelligent driving are met.

CN120653393APending Publication Date: 2025-09-16SAIC GENERAL MOTORS +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510761211.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-09
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

The scheduling strategy of the existing Autosar CP architecture cannot achieve absolute time task scheduling, cannot meet the needs of scenarios with strict time requirements, and lacks the effective use of external time synchronization signals and the calibration mechanism of scheduling time deviation.

Method used

A multi-task deterministic scheduling system is provided, comprising a task execution module, a time synchronization module, and a performance tuning module. The task execution module activates the schedule and executes tasks upon receiving a time synchronization message. The time synchronization module records the time synchronization message and periodically calibrates the schedule. The performance tuning module adjusts the schedule using a linear fitting algorithm to compensate for time deviations.

Benefits of technology

It achieves strict time control of tasks, ensures the time consistency of multi-sensor data acquisition and processing, improves the stability and reliability of the scheduling system, and meets the needs of time-sensitive application scenarios such as intelligent driving.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120653393A_ABST
    Figure CN120653393A_ABST
Patent Text Reader

Abstract

The invention relates to a multi-task deterministic scheduling system, and the system comprises a task execution module which is configured to start a scheduling table when a time synchronization message is received for the first time, and execute scheduling table related tasks based on the scheduling table; the time synchronization module is configured to record the time synchronization message received each time and periodically perform scheduling time calibration on the scheduling table based on the time synchronization message; and the performance tuning module is configured to perform performance tuning on the dispatch table through a linear fitting algorithm in response to the dispatch time deviation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of vehicle communications, and in particular, to a multi-task deterministic scheduling system and method. Background Art

[0002] With the rapid development of automotive electronics, the tasks handled by onboard electronic control units are becoming increasingly complex. This is particularly true in the field of intelligent driving, which places higher demands on deterministic and real-time task scheduling. In intelligent driving systems, multi-sensor coordinated fusion technology requires data collection and processing to be performed according to strict time sequences and cycles. The timestamp of data collection plays a crucial role in the final decision-making process.

[0003] The Autosar CP (Classic Platform) architecture, currently widely used in automotive electronic systems, primarily employs a priority-based, free-flowing scheduling strategy. While this scheduling strategy can meet the task scheduling requirements of general application scenarios, it only implements task scheduling requirements based on task timing and cannot effectively control task scheduling based on absolute time.

[0004] The scheduling systems in the existing technology have the following problems: First, most scheduling systems schedule only based on task priority, which cannot meet the needs of scenarios with strict absolute time requirements; second, there is a lack of effective use of external time synchronization signals, making it difficult to ensure the time accuracy of scheduling; third, there is a lack of effective calibration and tuning mechanisms for scheduling time deviations that may occur during operation; finally, in time-sensitive application scenarios such as intelligent driving, the time consistency of multi-sensor data collection and processing cannot be guaranteed, affecting the accuracy of decision-making results.

[0005] Therefore, there is an urgent need for a multi-task deterministic scheduling system that can perform scheduling based on external time synchronization signals and dynamically calibrate scheduling time deviations to meet the needs of time-sensitive application scenarios such as intelligent driving. Summary of the Invention

[0006] In order to solve the problem that the existing Autosar CP architecture scheduling strategy cannot realize absolute time task scheduling, realize deterministic scheduling with strict time requirements and integrate sensor data and correctly output decision results, a multi-task deterministic scheduling system and method are provided.

[0007] The technical solution adopted by the present application to solve its technical problems is: to provide a multi-task deterministic scheduling system, the scheduling system including: a task execution module, which is configured to start the scheduling table when a time synchronization message is received for the first time, and to execute scheduling table-related tasks based on the scheduling table; a time synchronization module, which is configured to: record the time synchronization message received each time, and periodically calibrate the scheduling time of the scheduling table based on the time synchronization message; a performance tuning module, which is configured to perform performance tuning on the scheduling table through a linear fitting algorithm in response to the occurrence of scheduling time deviation.

[0008] Preferably, the task execution module is further configured to execute non-scheduling table related tasks based on task priority.

[0009] Furthermore, the task priority of the schedule-related task is higher than the priority of the non-schedule-related task.

[0010] Optionally, the task execution module is further configured to receive the time synchronization message based on the gPTP protocol.

[0011] Preferably, the task execution module is further configured to periodically receive the time synchronization message to start the scheduling table.

[0012] Furthermore, the scheduling time deviation includes one or more of the following: the task execution module does not receive the time synchronization message, the task execution module does not periodically receive the time synchronization message, and the task execution module does not respond to the received time synchronization message.

[0013] Optionally, the performance tuning module is further configured to: in response to the occurrence of the scheduling time deviation, calculate linear parameters based on the time synchronization message recorded by the time synchronization module, and synchronize the fitting time to the scheduling table by calculating the linear parameters.

[0014] The present application also provides a multi-task deterministic scheduling method, which includes the following steps: starting a scheduling table when a time synchronization message is received for the first time, and executing scheduling table-related tasks based on the scheduling table; recording the time synchronization message received each time, and periodically calibrating the scheduling table based on the time synchronization message; and in response to a scheduling time deviation, optimizing the performance of the scheduling table through a linear fitting algorithm.

[0015] The computer-readable storage medium of the present application stores a computer program thereon, wherein the computer program implements the above-mentioned multi-task deterministic scheduling method when executed by a processor.

[0016] The computer device of the present application includes a storage module, a processor, and a computer program stored in the storage module and executable on the processor, wherein the processor implements the above-mentioned multi-task deterministic scheduling method when executing the computer program.

[0017] The vehicle of the present application, wherein the vehicle includes the above-mentioned multi-task deterministic scheduling system. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The above and / or other aspects and advantages of the present application will become clearer and easier to understand through the following description of various aspects in conjunction with the accompanying drawings, in which the same or similar elements are represented by the same reference numerals. In the drawings:

[0019] Figure 1 shows a schematic block diagram of a multi-task deterministic scheduling system 100 according to an embodiment of the present application; and

[0020] Figure 2 FIG2 shows a schematic flow chart of a multi-task deterministic scheduling method 200 according to an embodiment of the present application. DETAILED DESCRIPTION

[0021] The description of the following specific embodiments is merely exemplary in nature and is not intended to limit the disclosed technology or the application and use of the disclosed technology. In addition, there is no intention to be bound by any express or implied theory presented in the foregoing technical field, background technology or the following specific embodiments.

[0022] In the following detailed description of the embodiments, numerous specific details are set forth to provide a more thorough understanding of the disclosed technology. However, it will be apparent to one of ordinary skill in the art that the disclosed technology can be practiced without these specific details. In other instances, well-known features are not described in detail to avoid unnecessarily complicating the description.

[0023] Terms such as “comprise” and “include” indicate that in addition to the units and steps directly and clearly stated in the specification, the technical solution of the present application does not exclude the situation where it has other units and steps that are not directly or clearly stated.

[0024] Hereinafter, various exemplary embodiments according to the present application will be described in detail with reference to the accompanying drawings.

[0025] Now refer to Figure 1 , Figure 1 is a schematic block diagram of a multi-task deterministic scheduling system 100 according to an embodiment of the present application.

[0026] like Figure 1As shown, the multi-task deterministic scheduling system 100 includes: a task execution module 210 , a time synchronization module 220 and a performance tuning module 230 .

[0027] The task execution module 210 is configured to start the schedule when the time synchronization message is received for the first time, and to execute the tasks related to the schedule based on the schedule. It should be noted that in some embodiments, the vehicle-mounted switch is used as the core node for time synchronization, and a reference time source is generated by specifying a master switch, and hierarchical time distribution is implemented to the slave switches to achieve microsecond-level synchronization of global devices in the absolute time dimension. The master switch serves as the starting point for time synchronization, and synchronizes its system time to each slave switch through timestamp marking and hardware clock calibration to build a unified vehicle-mounted time domain. As a terminal device, the task execution module 210 obtains the current precise time in real time and dynamically adjusts the local clock by interacting with the directly connected switch through the gPTP (general precise time protocol) protocol. Specifically, the task execution module 210 includes a processor and a memory, and the memory stores a schedule, which contains multiple predefined tasks and their execution time points. When the task execution module receives the time synchronization message for the first time, the processor reads the scheduling table in the memory and executes the corresponding tasks in sequence according to the predefined execution time points in the scheduling table. For example, in the scheduling table with a 500ms period, three computing chain task points are designed, and their offsets in the table are 0ms, 100ms, and 200ms respectively.

[0028] The time synchronization module 220 is configured to record each received time synchronization message and periodically calibrate the schedule based on the time synchronization message. Specifically, the time synchronization module 220 includes a time recording unit and a calibration unit. The time recording unit is used to record the timestamp and sequence number of each received time synchronization message and store this information in a memory. The calibration unit periodically reads the time synchronization message information recorded in the memory, calculates the deviation between the actual reception time and the expected reception time, and calibrates the execution time points in the schedule based on this deviation, ensuring that tasks are executed at the correct time points.

[0029] The performance tuning module 230 is configured to optimize the schedule table's performance using a linear fitting algorithm in response to scheduling time deviations. Specifically, the performance tuning module 230 includes a deviation detection unit and a fitting calculation unit. The deviation detection unit detects scheduling time deviations. When the deviation exceeds a preset threshold, the fitting calculation unit triggers the execution of the linear fitting algorithm. The fitting calculation unit uses a linear fitting algorithm to calculate the time deviation trend based on historical time synchronization message data recorded by the time synchronization module. Based on the calculated results, the task execution time points in the schedule table are adjusted to adapt to changes in the system operating environment and improve the stability and reliability of the scheduling system.

[0030] The task execution module 210 is also configured to execute non-schedule-related tasks based on task priority. Specifically, the task execution module 210 maintains a task queue for storing non-schedule-related tasks. These tasks are assigned to different priority queues based on their priorities. After executing the schedule-related tasks, the task execution module 210 executes the non-schedule-related tasks in descending order based on their priorities. When a new non-schedule-related task arrives, the task execution module 210 inserts it into the corresponding priority queue based on its priority, ensuring that high-priority tasks are executed first.

[0031] Scheduled tasks have a higher priority than non-scheduled tasks. Specifically, the task execution module assigns the highest priority to scheduled tasks, ensuring they are executed on time according to the predefined schedule times and unaffected by non-scheduled tasks. Non-scheduled tasks are assigned different priorities based on their importance and urgency, but their priorities are always lower than those of scheduled tasks. This prioritization ensures deterministic execution of scheduled tasks while allowing the system to process other non-critical tasks during idle time.

[0032] The task execution module 210 is further configured to receive time synchronization messages based on the gPTP protocol. Specifically, the task execution module 210 includes a communication interface that supports the IEEE 802.1AS Precision Time Protocol (gPTP). The communication interface receives gPTP synchronization messages from a master clock source. These messages contain precise time information for synchronizing the system clock. The gPTP protocol provides nanosecond-level time synchronization accuracy, ensuring that the scheduling system can execute tasks based on a highly accurate time reference, meeting real-time requirements.

[0033] The task execution module 210 is also configured to periodically receive time synchronization messages to activate the schedule. Specifically, the task execution module 210 is equipped with a timer that periodically triggers the system to check whether a new time synchronization message has been received. Upon receiving a new time synchronization message, the task execution module updates the system clock based on the time information in the message and recalculates the execution time of the task in the schedule based on the updated clock. This periodic time synchronization mechanism ensures that the scheduling system can continuously maintain time accuracy and maintain stable scheduling performance even during long-term operation.

[0034] Scheduling time deviation includes one or more of the following: the task execution module does not receive the time synchronization message, the task execution module does not periodically receive the time synchronization message, and the task execution module does not respond to the received time synchronization message. Specifically, the performance tuning module 230 is provided with a monitoring unit for monitoring the reception of the time synchronization message. When the monitoring unit detects one of the following situations, it is determined that a scheduling time deviation has occurred: 1) No time synchronization message is received within the expected time window; 2) The time interval between the received time synchronization messages does not meet the predefined periodicity requirements, for example, the interval between two messages exceeds the preset threshold; 3) The system receives the time synchronization message but fails to respond to the message in time due to processing delays or other reasons, resulting in time synchronization failure.

[0035] The performance tuning module 230 is further configured to calculate linear parameters based on the time synchronization message recorded by the time synchronization module in response to the occurrence of a scheduling time deviation, and synchronize the fitting time to the scheduling table by calculating the linear parameters. Specifically, when the performance tuning module detects a scheduling time deviation, it reads the historical time synchronization message record from the memory of the time synchronization module, including the reception timestamp and sequence number of the message. The performance tuning module uses this data to construct a time series and applies a linear regression algorithm to calculate linear parameters, including the slope and intercept. These linear parameters describe the relationship between the system clock and the reference clock. The performance tuning module then uses these linear parameters to calculate the fitting time and applies the fitting time to the scheduling table to adjust the execution time point of the task. This linear fitting method based on historical data can effectively compensate for the time deviation caused by time synchronization interruption or irregularity, ensuring that the system can still maintain relatively accurate scheduling under abnormal time synchronization conditions.

[0036] Figure 2 FIG. 2 shows a schematic flow chart of a multi-task deterministic scheduling method 200 according to an embodiment of the present application. Figure 2 As shown, the scheduling method 200 includes the following steps:

[0037] S210: Start the scheduling table when the time synchronization message is received for the first time, and execute the tasks related to the scheduling table based on the scheduling table. Specifically, the scheduling system monitors the time synchronization message in the network through the communication interface. When the time synchronization message is received for the first time, the system parses the time information in the message and synchronizes the system clock with the time information. After the synchronization is completed, the system loads the predefined scheduling table, which contains multiple tasks and their corresponding execution time points. The system executes the tasks in the scheduling table in a predetermined order based on the synchronized clock and the time points in the scheduling table. These tasks may include key operations such as data acquisition, signal processing, and control instruction sending. Their execution time points are precisely defined in the scheduling table to ensure the real-time and deterministic nature of the system.

[0038] S220: Record each time synchronization message received, and periodically calibrate the scheduling time of the scheduling table based on the time synchronization message. Specifically, the system maintains a time synchronization message record table. Whenever a new time synchronization message is received, the system records the message's reception timestamp, sequence number, message content and other information in the table. The system periodically (for example, every 10 milliseconds) checks the most recently received time synchronization message and calculates the difference between the actual reception time and the expected reception time. If the difference exceeds a preset threshold (for example, 100 microseconds), the system will recalculate the execution time point of the task in the scheduling table based on the latest time synchronization information to ensure that the task can be executed at the correct time point. This periodic calibration mechanism can effectively compensate for the effects of system clock drift and network delay changes, and maintain the time accuracy of the scheduling system.

[0039] S230: In response to the occurrence of a scheduling time deviation, the scheduling table is performance tuned by a linear fitting algorithm. Specifically, the system continuously monitors the reception of time synchronization messages. When one of the following situations is detected, the system determines that a scheduling time deviation has occurred: 1) the time synchronization message is not received within the expected time window; 2) the time interval between the received time synchronization messages does not meet the predefined periodicity requirements; 3) the system fails to respond to the received time synchronization message in a timely manner. Once a scheduling time deviation is detected, the system extracts historical data from the time synchronization message record table, including the message reception timestamp and the corresponding reference time. The system uses these data points to apply a linear regression algorithm to calculate the parameters (slope and intercept) of the best fit line. These parameters describe the linear relationship between the system clock and the reference clock. The system uses these linear parameters to calculate the fitting time at the current moment, and synchronizes the task execution time points in the scheduling table with the fitting time to ensure that the system can maintain relatively accurate task scheduling even in the event of a time synchronization interruption.

[0040] The present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the multi-task deterministic scheduling method of the present application.

[0041] The present application also provides a computer device, comprising a storage module, a processor, and a computer program stored on the storage module and executable on the processor, wherein the processor implements the multi-task deterministic scheduling method of the present application when executing the computer program.

[0042] The present application also provides a vehicle comprising the multi-task deterministic scheduling system of the present application. The vehicle referred to in this application may refer to any suitable vehicle having a drive system consisting of at least a battery, a power conversion device, and a drive motor, such as a hybrid electric vehicle, an electric vehicle, a plug-in hybrid electric vehicle, and the like. A hybrid electric vehicle is a vehicle that has two or more power sources, such as a gasoline-powered and an electric vehicle.

[0043] The specific embodiments described above are intended only to more clearly illustrate the principles of the present invention, wherein the various components are clearly shown or described to make the principles of the present invention easier to understand. Those skilled in the art may readily make various modifications or variations to the present invention without departing from the scope of the present invention. It should be understood that such modifications or variations are intended to be within the scope of the present invention.

Claims

1. A multi-task deterministic scheduling system, characterized in that: The scheduling system includes: a task execution module configured to start the schedule table when a time synchronization message is received for the first time, and execute tasks related to the schedule table based on the schedule table; A time synchronization module is configured to: record the time synchronization message received each time, and periodically perform scheduling time calibration on the scheduling table based on the time synchronization message; The performance tuning module is configured to perform performance tuning on the scheduling table by using a linear fitting algorithm in response to occurrence of a scheduling time deviation.

2. The multi-task deterministic scheduling system according to claim 1, characterized in that: The task execution module is further configured to execute non-schedule related tasks based on task priorities.

3. The multi-task deterministic scheduling system according to claim 2, characterized in that: The task priority of the schedule-related task is higher than the priority of the non-schedule-related task.

4. The multi-task deterministic scheduling system according to claim 1, characterized in that: The task execution module is further configured to receive the time synchronization message based on the gPTP protocol.

5. The multi-task deterministic scheduling system according to claim 1, characterized in that: The task execution module is further configured to periodically start the scheduling table upon receiving the time synchronization message.

6. The multi-task deterministic scheduling system according to claim 5, characterized in that: The scheduling time deviation includes one or more of the following: the task execution module does not receive the time synchronization message, the task execution module does not periodically receive the time synchronization message, and the task execution module does not respond to the received time synchronization message.

7. The multi-task deterministic scheduling system according to claim 6, characterized in that: The performance tuning module is further configured to: in response to the occurrence of the scheduling time deviation, calculate linear parameters based on the time synchronization message recorded by the time synchronization module, and synchronize the fitting time to the scheduling table by calculating the linear parameters.

8. A multi-task deterministic scheduling method, characterized in that: The scheduling method comprises the following steps: When a time synchronization message is received for the first time, a schedule table is started, and tasks related to the schedule table are executed based on the schedule table; Recording each received time synchronization message, and periodically calibrating the scheduling time of the scheduling table based on the time synchronization message; as well as In response to the occurrence of a schedule time deviation, the schedule table is performance-tuned by using a linear fitting algorithm.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the multi-task deterministic scheduling method according to claim 8 is implemented.

10. A computer device comprising a storage module, a processor, and a computer program stored in the storage module and executable on the processor, wherein: When the processor executes the computer program, the multi-task deterministic scheduling method according to claim 8 is implemented.

11. A vehicle, characterized in that: The vehicle includes the multi-task deterministic scheduling system according to any one of claims 1-7.