Simulation method of scheduler, electronic device, and storage medium

By simulating the process execution results and scheduling order using a deterministic scheduler, the uncertainty problem of the simulation scheduler in the face of fluctuations in the vehicle system is solved, and the stability and consistency of the simulation results are achieved, supporting the effective development and iteration of autonomous driving algorithms.

CN115437761BActive Publication Date: 2026-02-24SHENZHEN DEEPROUTE AI CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210912078.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-29
Publication Date
2026-02-24
Estimated Expiration
2042-07-29

AI Technical Summary

Technical Problem

Existing simulation schedulers suffer from instability in simulation results due to uncertainties in the I/O and CPU utilization of in-vehicle systems. Furthermore, serial scheduling methods cannot accurately reproduce the asynchronous scheduling logic in vehicles, which affects the development and iteration of autonomous driving algorithms.

Method used

A scheduler is employed to deterministically simulate process scheduling by acquiring the process execution results and scheduling order, ensuring the consistency of simulation results. System jitter factors are also introduced to achieve stable reproduction with the vehicle environment.

Benefits of technology

It enables stable reproduction of vehicle-enhanced problems in a simulation environment, ensuring that simulation results are consistent with actual vehicle environments, and supporting the stable development and iteration of autonomous driving algorithms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115437761B_ABST
    Figure CN115437761B_ABST
Patent Text Reader

Abstract

The application discloses a simulation method of a scheduler, an electronic device and a storage medium. In the method, an information event is acquired; a second process is triggered and called in response to the information event; a current state of the second process is acquired, and a current scheduling sequence of the second process is acquired; a current running result of a first process and a current running result of a third process are acquired according to the current state of the second process and the current scheduling sequence of the second process; and a request is generated and sent to call the second process once according to the current running result of the first process and the current running result of the third process, so that the scheduling of the second process is simulated. The application also discloses an electronic device and a storage medium. Through the deterministic software execution flow, the asynchronous calling can be implemented, the software execution sequence of the on-board scheduler is ensured to be strictly consistent, instead of simple process repetition, so that the consistency of the simulation result is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of autonomous driving simulation technology, and in particular to a simulation method for a scheduler, an electronic device, and a storage medium. Background Technology

[0002] Most current simulation schedulers use the pub (publisher) / sub (subscriber) method of ROS (Robot Operating System) to schedule various algorithm modules between processes. Pub / Sub is a fully managed real-time messaging service that can send and receive messages between independent applications.

[0003] While simulation schedulers using this approach appear to share the same scheduling method as the onboard scheduler, this method is inherently subject to uncertainty due to fluctuations in system I / O (Input / Output) and CPU (Central Processing Unit) utilization. This uncertainty makes offline analysis of problems encountered onboard unreliable. Consequently, most current simulation schedulers cannot reliably reproduce various problems encountered onboard, thus hindering the development, improvement, and iteration speed of autonomous driving algorithms.

[0004] Currently, deterministic simulation schedulers can guarantee a consistent scheduling order for each operation, eliminating the impact of online system fluctuations. However, most of these schedulers primarily use synchronous, serial scheduling methods, which are inconsistent with the asynchronous scheduling logic in vehicles and cannot perfectly replicate the actual software execution flow in a car. Furthermore, serial scheduling assumes a perfect system, so schedulers using serial scheduling cannot actively introduce system jitter and therefore cannot stably reproduce the problems encountered while driving a vehicle. Summary of the Invention

[0005] This application discloses a simulation method, electronic device, and storage medium for a scheduler, so as to enable the simulated scheduler to stably reproduce the problems encountered by driving vehicles.

[0006] This application provides a simulation method for a scheduler, the scheduler being used to schedule a first process, a second process, and a third process, wherein if the first process is called once, the second process is called once, and the third process is called once at a predetermined time interval. Each time the second process is called, the execution results of the first process and the third process are required. The method includes: acquiring an information event, wherein the information event represents the return of the execution result of the first process after it has been called; in response to the information event, triggering a call to the second process; and in response to the call to the second process, acquiring the current state of the second process and acquiring the current scheduling order of the second process, wherein... The current state of the second process represents the execution result of the third process that the second process has received. The current scheduling order of the second process represents the current execution result of the first process and the current execution result of the third process when the second process is currently called. Based on the current state and current scheduling order of the second process, the current execution result of the first process and the current execution result of the third process are obtained. Based on the current execution result of the first process and the current execution result of the third process, a request is generated and sent to call the second process once, thereby simulating the scheduling of the second process.

[0007] In some embodiments, based on the current state of the second process, it is determined whether the second process can be invoked next; in response to the invocation of the second process next time, the next scheduling order of the second process is obtained, wherein the next scheduling order of the second process represents the next running result of the first process and the nth running result of the third process required when the second process is invoked next time, where n is a positive integer greater than 1; based on the next running result and the nth running result, a request is generated and sent to invoke the second process next time, thereby simulating the scheduling of the second process.

[0008] In some embodiments, the current state of the second process represents the m-th execution result of the third process that the second process has received, where m is a positive integer less than n; determining whether the second process can be called next based on the current state of the second process includes: determining whether the second process can be called next based on the m-th execution result of the third process; wherein, in response to m being greater than 1, it is determined that the second process can be called next.

[0009] In some embodiments, obtaining the current running result of the first process and the current running result of the third process includes: obtaining the current running result of the first process online and / or offline from the scheduler; and obtaining the current running result of the third process online and / or offline from the scheduler.

[0010] In some embodiments, online retrieval means directly calling the current running result of the first process returned when the scheduler currently calls the first process or the current running result of the third process returned when the scheduler currently calls the third process; offline retrieval means retrieving the current running result of the first process or the current running result of the third process from an offline file, wherein the offline file is used to store the running results when the scheduler calls the first process or the third process.

[0011] In some embodiments, obtaining the current state of the second process includes: obtaining the current state of the second process from a first preset table; obtaining the current scheduling order of the second process includes: obtaining the current scheduling order of the second process from a second preset table; wherein the first preset table is different from the second preset table, and both the first preset table and the second preset table are created by the scheduler when performing scheduling.

[0012] In some embodiments, the scheduler is further configured to schedule a fourth process, wherein the fourth process is called once when the second process is called once, and the fourth process requires the running result of the second process and the running result of the third process to be called once; the method further includes: in response to the second process being called, triggering the calling of the fourth process; in response to the calling of the fourth process, obtaining the current state of the fourth process and obtaining the current scheduling order of the fourth process, wherein the current state of the fourth process represents the running result of the third process that the fourth process has currently received, and the current scheduling order of the fourth process represents the current running result of the second process and the x-th running result of the third process required when the fourth process is currently called, where x is a positive integer greater than 1; obtaining the current running result of the second process and the x-th running result of the third process based on the current state of the fourth process and the current scheduling order of the fourth process; generating and sending a request based on the current running result of the second process and the x-th running result of the third process to call the fourth process once, thereby simulating the scheduling of the fourth process.

[0013] In some embodiments, x is less than n.

[0014] A second aspect of this application provides an electronic device including a memory and a processor coupled to each other, the processor being configured to execute program instructions stored in the memory to implement the simulation method of the scheduler described in any one aspect.

[0015] A third aspect of this application provides a non-volatile computer storage medium storing program instructions thereon, which, when executed by a processor, implement a simulation method for the scheduler described in any one of the first aspects.

[0016] The above scheme involves acquiring information events, where each information event represents the return of the execution result of the first process after it has been called. In response to the information event, a call to the second process is triggered. The current state and current scheduling order of the second process are acquired. Based on the current state and current scheduling order of the second process, the current execution result of the first process and the current execution result of the third process are acquired. Based on the current execution results of the first and third processes, a request is generated and sent to call the second process once, simulating the scheduling of the second process. During this process, the execution results of the first and third processes are received to obtain the execution result of the current process corresponding to the actual order of the scheduler, thus completing the scheduling of the second process without interference between processes. This deterministic software execution flow allows for asynchronous calls, ensuring strict consistency with the software execution order of the on-board scheduler, rather than simple process repetition, thereby guaranteeing the consistency of simulation results. Simultaneously, factors such as system jitter can be introduced to change the interval between the timed first processes, enabling stable offline reproduction of problems encountered on the vehicle's online system.

[0017] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this application. Attached Figure Description

[0018] Figure 1 This is a schematic diagram of the process scheduling situation of the scheduler in this application embodiment within a preset time period;

[0019] Figure 2 This is another schematic diagram illustrating the process scheduling situation of the scheduler in this application embodiment within a preset time period;

[0020] Figure 3 This is a flowchart illustrating the simulation method of the scheduler in an embodiment of this application;

[0021] Figure 4 This is another schematic flowchart illustrating the simulation method of the scheduler in the embodiments of this application;

[0022] Figure 5 This is a schematic diagram of the framework of an electronic device according to an embodiment of this application;

[0023] Figure 6 This is a schematic diagram of the framework of a non-volatile computer-readable storage medium according to an embodiment of this application. Detailed Implementation

[0024] The embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0025] In the following description, specific details such as particular system architectures, interfaces, and technologies are presented for illustrative purposes rather than for limiting purposes, in order to provide a thorough understanding of this application.

[0026] In this document, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " generally indicates that the preceding and following related objects have an "or" relationship. Furthermore, "many" in this document means two or more. Moreover, the term "at least one" in this document means any combination of at least two of any one or more of a plurality of objects. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.

[0027] Throughout this specification and claims, certain terms refer to specific components. As will be understood by those skilled in the art, electronic device manufacturers may use different names to refer to the same component. Components are distinguished not by name, but by function. In the following specification and claims, the term "comprising" is an open-ended limiting term and should therefore be interpreted as meaning "including but not limited to...". Furthermore, the term "coupled" is intended to mean either an indirect electrical connection or a direct electrical connection. Therefore, when one device is coupled to another device, this connection can be a direct electrical connection or an indirect electrical connection achieved through other devices and connecting parts.

[0028] To facilitate understanding of this application, the scheduler of the following embodiments of this application will be described in detail below.

[0029] This scheduler can be applied to autonomous vehicles, serving as a functional module of the operating system installed in the autonomous vehicle, i.e., a function of the operating system, or as a hardware component in the autonomous vehicle that implements the scheduling function of its operating system. This application does not limit this.

[0030] The scheduler can schedule various algorithm modules between processes. When the scheduler calls a process once, that process runs once, which is equivalent to requesting the service of the algorithm module corresponding to that process once. The scheduler returns a calculation result, which is the result of the process's operation.

[0031] In some embodiments, the scheduler is used to schedule a first process, a second process, and a third process, wherein if the first process is called once, the second process is called once, and the third process is called once at a predetermined time interval. When the second process is called once, the running results of the first process and the running results of the third process are required.

[0032] As can be seen, the scheduler's scheduling method is as follows: the first process is called at intervals; when the first process is called once, the second process is called once; the third process is scheduled periodically. Each time the second process is called, the results of both the first and third processes are required. For example, calling the second process once requires the latest results of both the first and third processes.

[0033] In some examples, the scheduler creates a first preset table when performing a scheduling operation. This first preset table can be used to record the state of the processes called by the scheduler. The state of a process represents the input information it has received to run the process when it is called. For example, if calling a second process requires the results of the first and third processes, the first preset table records the current state of the second process, that is, when the second process is currently called, it has already received the results of the first and third processes.

[0034] In some examples, the scheduler creates a second preset table when performing scheduling. This second preset table can be used to record the scheduling order of processes called by the scheduler. The scheduling order represents the input information required by the process when it is called, i.e., the results of other processes. For example, if calling the second process once requires the results of the first and third processes, the second preset table records the current scheduling order of the second process, i.e., the current results of the first and third processes required to run the second process when it is currently called. It is important to note that the current results of the first and third processes described here refer to the results returned after the first and third processes have already been called when the second process is called. The current result of the first process refers to the result returned after the first process has already been called when the second process is called, and the current result of the third process refers to the result returned after the third process has already been called when the second process has already been called.

[0035] Taking the application of this scheduler to autonomous vehicles as an example, the first process can be the perception process, the result of which is the information of obstacles around the autonomous vehicle; the second process can be the planning process, the result of which is the planned path of the autonomous vehicle; and the third process can be the CAN bus process, the result of which is the current operating status of the autonomous vehicle, including speed, acceleration, positioning, wheel speed, etc.

[0036] For an example of a scheduler being applied to autonomous vehicles, please refer to [link / reference]. Figure 1 , Figure 1 This is a schematic diagram illustrating the process scheduling situation of the scheduler in this application embodiment within a preset time period. For example... Figure 1 As shown, the scheduler calls the perception process at intervals, for example, it calls the perception process on a scheduled basis. When the scheduler calls the perception process once, it also calls the planning process once. For example, when the perception process receives new information events, such as the result returned by the perception process, the scheduler calls the planning process once. The scheduler also calls the CANbus process periodically, for example, 50 times per second. Each call to the planning process requires the results of both the perception and CANbus processes. For example, each call to the planning process requires the latest results of both the perception and CANbus processes.

[0037] Each time the scheduler calls the perception process, planning process, and CANbus process, it returns the corresponding execution result. For example... Figure 1 As shown, at the beginning of a preset time period, the scheduler calls the perception process for the first time and returns the first execution result of the perception process accordingly. The scheduler's first call to the perception process then calls the planning process once, i.e., for the first time. At this point, the first execution result of both the perception process and the CANbus process is needed. Therefore, the first scheduling order of the planning process represents the first execution result of both the perception process and the CANbus process, as shown in Table 1 below. Table 1 can be either the second preset table mentioned above or a sub-table within the second preset table.

[0038] The planning process is called a second time. At this point, the results of the second execution of the perception process and the fourth execution of the CANbus process are needed, as shown in Table 1 below. The second scheduling order of the planning process represents the results of the second and fourth executions of the perception and CANbus processes. This process continues in the same manner, as shown in Table 1 below. The fifth scheduling order of the planning process represents the results of the fifth and twelfth executions of the perception and CANbus processes.

[0039] Table 1. Scheduling order of the scheduler calling the planning process.

[0040] Number of times the planning process runs Perception process execution results Canbus process execution results 1 1 1 2 2 4 3 3 6 4 4 9 5 5 12

[0041] It is important to note that, Figure 1 In the example, the perception process is not invoked periodically because of system fluctuations or jitters in the autonomous vehicle's operating system. Here, pcpt represents the perception process, plan represents the planning process, and cbs represents the CANbus process.

[0042] In some other embodiments, based on the above embodiments, the scheduler is also used to schedule a fourth process. That is, the scheduler is used to schedule the first process, the second process, the third process, and the fourth process. When the first process is called once, the second process is called once, and the third process is called once at a predetermined time interval. When the second process is called once, the running results of the first process and the running results of the third process are required. When the second process is called once, the fourth process is called once, and when the fourth process is called once, the running results of the second process and the running results of the third process are required.

[0043] Accordingly, the scheduler's scheduling method is as follows: the first process is called at intervals; when the first process is called once, the second process is called once; when the second process is called once, the fourth process is called once; the third process is scheduled periodically. Each time the second process is called, the results of both the first and third processes are required. For example, each time the second process is called, the latest results of both the first and third processes are required. Similarly, each time the fourth process is called, the results of both the second and third processes are required. For example, each time the fourth process is called, the latest results of both the second and third processes are required.

[0044] Continue with Figure 1In this example, the scheduler is applied to an autonomous vehicle. The first process can be a perception process, the result of which is information about obstacles around the autonomous vehicle. The second process can be a planning process, the result of which is the planned path of the autonomous vehicle. The third process can be a CAN bus process, the result of which is the current operating status of the autonomous vehicle, including speed, acceleration, positioning, wheel speed, etc. The fourth process can be a control process, the result of which is the control commands issued to the vehicle based on the results of the planning process.

[0045] For an example of a scheduler being applied to autonomous vehicles, please refer to [link / reference]. Figure 2 , Figure 2 This is another schematic diagram illustrating the process scheduling situation of the scheduler in this application embodiment within a preset time period. For example... Figure 2 As shown, the scheduler calls the perception process at intervals, for example, it calls the perception process on a scheduled basis. When the scheduler calls the perception process once, it also calls the planning process once; for example, when the perception process receives a new information event, the scheduler calls the planning process once. The scheduler also calls the CANbus process periodically, for example, 50 times per second. When the scheduler calls the planning process once, it also calls the control process once; for example, when the planning process has a new result, the scheduler calls the control process once. Each call to the control process requires the results of both the planning process and the CANbus process. For example, a single call to the control process requires the latest results of both the planning process and the CANbus process.

[0046] Each time the scheduler calls the perception process, planning process, CANbus process, and control process, it returns the corresponding execution result. For example... Figure 2As shown, for example, at the beginning of a preset time period, the scheduler calls the perception process for the first time and returns the first result of the perception process. The scheduler's first call to the perception process then calls the planning process once (the first time), requiring the first results of both the perception and CANbus processes. Therefore, the first scheduling order of the planning process represents the first results of these two processes. Similarly, the scheduler's first call to the planning process then calls the control process once (the first time), requiring the first results of both the planning and CANbus processes. Thus, the first scheduling order of the control process represents the first results of these two processes.

[0047] Please see Figure 3 , Figure 3 This is a flowchart illustrating the simulation method of the scheduler in this application embodiment. The scheduler can be the scheduler of the above embodiment, used to schedule a first process, a second process, and a third process. The first process is called once, then the second process is called once, and the third process is called once at a predetermined time interval. Each time the second process is called, the running results of the first process and the running results of the third process are required.

[0048] The execution entity of this method can be a terminal device with mutually coupled memory and processor, such as a microcomputer, server, and mobile devices such as laptops and tablets. In some possible implementations, the scheduler simulation method can be implemented by the processor calling computer-readable instructions stored in memory. Specifically, it may include the following steps:

[0049] Step S31: Obtain information events, where information events represent the result of the first process being called and returning the running result of the first process.

[0050] Based on the above Figure 1 The example uses the scheduler applied to an autonomous vehicle to illustrate the acquisition of information events. These information events represent the perception process being invoked and returning the result of the perception process's execution.

[0051] Step S32: In response to the information event, trigger the invocation of the second process.

[0052] Continuing with the above Figure 1The example uses an autonomous vehicle as an example to illustrate the use of the scheduler. In response to an information event, i.e., the completion of one run of the perception process, the scheduler obtains the current running result of the perception process being called, thereby triggering the call to the planning process, i.e., the planning process will be called.

[0053] Step S33: In response to the invocation of the second process, obtain the current state of the second process and obtain the current scheduling order of the second process.

[0054] Continuing with the above Figure 1 The example uses an autonomous vehicle as an example to illustrate the use of the scheduler. By determining that the planning process will be invoked, the current state of the planning process and the current scheduling order of the planning process can be obtained. For example, the current state of the planning process can be the result of several runs of the corresponding process that have been received, and the current scheduling order of the planning process can be the result of the number of runs of the relevant process.

[0055] The current state of the second process represents the running result of the third process that the second process has received. The current scheduling order of the second process represents the current running result of the first process and the current running result of the third process that the second process is currently running when the second process is currently called.

[0056] In other words, the current state of the planning process represents the execution results of the CANbus process that the planning process has currently received. The current scheduling order of the planning process represents the current execution results of the perception process and the CANbus process that the planning process needs when it is currently invoked. That is, when the planning process is currently invoked, it needs the latest execution results of the perception process and the latest execution results of the CANbus process.

[0057] Step S34: Based on the current state of the second process and the current scheduling order of the second process, obtain the current running result of the first process and the current running result of the third process.

[0058] Continuing with the above Figure 1The example uses an autonomous vehicle as an example to illustrate how the scheduler can be used to call the planning process. Based on the current state and scheduling order of the planning process, the current running results of the perception process and the CANbus process are obtained.

[0059] Step S35: Based on the current running results of the first process and the third process, generate and send a request to call the second process once, thereby simulating the scheduling of the second process.

[0060] Continuing with the above Figure 1 The example uses an autonomous vehicle as an example to illustrate the use of the scheduler. Based on the current running results of the perception process and the canbus process, it generates and sends request information to complete a call to the planning process once, thereby simulating the scheduling of the planning process.

[0061] In this embodiment, an information event is acquired, which represents the return of the execution result of the first process after it is called. In response to the information event, the second process is triggered to be called, that is, the current state of the second process is acquired, and the current scheduling order of the second process is acquired. Furthermore, the current execution result of the first process and the current execution result of the third process are acquired. Based on the acquired current execution results of the first process and the third process, a request is generated and sent to call the second process once, thereby simulating the scheduling of the second process. In this way, by receiving the execution results of the first process and the third process, the execution result of the current process corresponding to the actual order of the scheduler is acquired, so as to complete the scheduling of the second process and the processes do not interfere with each other. That is, through the deterministic software execution flow, asynchronous calls can be implemented to ensure strict consistency with the software execution order of the on-board scheduler, rather than simple process repetition, thereby ensuring the consistency of simulation results. At the same time, influencing factors such as system jitter can be introduced, so that the interval between the timed first processes will change accordingly, so as to achieve stable offline reproduction of the problems encountered by the vehicle on the line.

[0062] In some embodiments, based on the current state of the second process, it is determined whether the second process can be invoked next; in response to the invocation of the second process next time, the next scheduling order of the second process is obtained, wherein the next scheduling order of the second process represents the next running result of the first process and the nth running result of the third process required when the second process is invoked next time, where n is a positive integer greater than 1; based on the next running result and the nth running result, a request is generated and sent to invoke the second process next time, thereby simulating the scheduling of the second process.

[0063] Continuing with the above Figure 1 The example uses an autonomous vehicle as an example to illustrate the scheduler's application. Based on the current state of the planning process, it determines whether the planning process can be invoked again. This is done by using information about the current state of the planning process, such as computational and service information, to determine if the conditions for invoking the planning process again are met. If it can be invoked again, the next scheduling order of the planning process is obtained. This next scheduling order represents the next execution result of the perception process and the nth execution result of the CANbus process, where n is a positive integer greater than 1. For example, if the planning process is to be invoked a second time, the scheduling order for the second planning process represents the need for the second execution result of the perception process and the fifth execution result of the CANbus process. At this point, based on the next execution result of the planning process and the nth execution result of the CANbus process, a request message is generated and sent to invoke the planning process again, thus simulating the scheduling of the planning process.

[0064] The current state of the second process represents the m-th execution result of the third process that the second process has received, where m is a positive integer less than n. Based on the current state of the second process, it is determined whether the second process can be called next, including: based on the m-th execution result of the third process, it is determined whether the second process can be called next; wherein, in response to m being greater than 1, it is determined that the second process can be called next.

[0065] Continuing with the above Figure 1 The example uses an autonomous vehicle as an example to illustrate the scheduler's application. The current state of the planning process represents the result of the m-th run of the CANbus process that the planning process has received, where m is a positive integer less than n. For example, if the planning process is to be called a second time, then the current state of the planning process represents the result of the 4th run of the CANbus process that the planning process has received. Simultaneously, based on the m-th run result of the CANbus process, it is determined whether the planning process can be called again. Specifically, if m is greater than 1, it is determined that the second process can be called again.

[0066] In some embodiments, obtaining the current running result of the first process and the current running result of the third process includes: the self-scheduler obtaining the current running result of the first process online and / or offline; the self-scheduler obtaining the current running result of the third process online and / or offline.

[0067] Based on the above Figure 1 The example uses an autonomous vehicle as an example to illustrate how the scheduler obtains the current running results of the perception process and the CANbus process. Specifically, the scheduler can obtain the current running results of the perception process in three states: online, offline, and online / offline. The scheduler can also obtain the current running results of the CANbus process in three states: online, offline, and online / offline.

[0068] Among them, online retrieval means directly calling the current running result of the first process returned when the scheduler is currently calling the first process, or the current running result of the third process returned when the scheduler is currently calling the third process; offline retrieval means retrieving the current running result of the first process or the current running result of the third process from an offline file, wherein the offline file is used to store the running result when the scheduler calls the first process or the third process.

[0069] Continuing with the above Figure 1 Taking the example of a scheduler applied to an autonomous vehicle, online retrieval can mean directly calling the current running result of the perception process when the scheduler currently calls the perception process, or it can mean directly calling the current running result of the CANbus process when the scheduler currently calls the CANbus process. Offline retrieval can mean that the current running result of the perception process or the current running result of the CANbus process is provided by an offline file. The offline file is used to store the running results of the scheduler calling the perception process or the CANbus process.

[0070] In some embodiments, obtaining the current state of the second process includes: obtaining the current state of the second process from a first preset table; obtaining the current scheduling order of the second process includes: obtaining the current scheduling order of the second process from a second preset table. The first preset table and the second preset table are different; both the first preset table and the second preset table are created by the scheduler when performing scheduling.

[0071] Continuing with the above Figure 1The example uses an autonomous vehicle as an example of a scheduler. When executing a scheduling operation, the scheduler creates a first preset table and a second preset table. The first preset table records the state of the processes called by the scheduler. The state of a process represents the input information received when it is called, which is required to run the process. For example, if calling the planning process requires the results of both the perception and CANbus processes, the first preset table records the current state of the planning process, indicating that it has already received the results of both processes when it is called. The second preset table records the scheduling order of the processes called by the scheduler. This scheduling order represents the input information required by the process when it is called, i.e., the results of other processes. For example, if calling the planning process requires the results of both the perception and CANbus processes, the second preset table records the current scheduling order of the planning process, i.e., the current results of the perception and CANbus processes required to run the planning process when it is called.

[0072] In some embodiments, the scheduler is also used to schedule a fourth process, wherein the fourth process is called once when the second process is called once, and the fourth process is called once, requiring the running results of the second process and the running results of the third process.

[0073] The fourth process can be the control process, scheduled so that the control process is called every time the planning process is invoked. The control process's output can be instructions issued based on the planning process's results; that is, control commands are issued to the vehicles based on the path planning from the planning process's output. Each time the control process is invoked, it requires the latest results from both the planning and CANbus processes.

[0074] Please see Figure 4 , Figure 4This is another flowchart illustrating the simulation method of the scheduler in this application embodiment. The scheduler can be the same as the scheduler in the above embodiment, used to schedule the first process, the second process, the third process, and the fourth process. Specifically, if the first process is called once, the second process is called once; if the second process is called once, the fourth process is called once; and the third process is called once at predetermined time intervals. Further, based on the above embodiments, the following steps may be included:

[0075] Step S41: In response to the invocation of the second process, the invocation of the fourth process is triggered.

[0076] Based on the above Figure 2 The example uses the scheduler applied to an autonomous vehicle as an example. For instance, when the third planning process is invoked, the third control process can be triggered.

[0077] Step S42: In response to the invocation of the fourth process, obtain the current state of the fourth process and obtain the current scheduling order of the fourth process.

[0078] Continuing with the above Figure 2 The example uses the scheduling mechanism applied to an autonomous vehicle as an example. In response to calling the control process, which is to issue control commands to the vehicle based on the results of the planning process, the call to the control process needs to obtain the current state of the control process and the current scheduling order of the control process.

[0079] Here, the current state of the fourth process represents the running result of the third process that the fourth process has received, and the current scheduling order of the fourth process represents the current running result of the second process and the xth running result of the third process required when the fourth process is currently called, where x is a positive integer greater than 1.

[0080] Continuing with the above Figure 2The example uses an autonomous vehicle as an example to illustrate the scheduler. The current state of the control process represents the results of the CANbus process that the control process has received so far. For example, if the control process is to be called for the third time, then the current state of the control process represents the results of the 7th CANbus process execution that the control process has received so far. The current scheduling order of the control process represents the current execution results of the planning process and the xth execution result of the CANbus process required when the control process is currently called, where x is a positive integer greater than 1. For example, if the control process is to be called for the third time, then the current scheduling order of the control process represents the current execution results of the planning process and the 7th execution result of the CANbus process required when the control process is currently called.

[0081] Step S43: Based on the current state of the fourth process and the current scheduling order of the fourth process, obtain the current running result of the second process and the xth running result of the third process.

[0082] Furthermore, continuing with the above... Figure 2 The example uses an autonomous vehicle as an example to illustrate the use of the scheduler. Based on the current state and scheduling order of the control process, it obtains the current running result of the planning process and the xth running result of the CANbus process. For example, if the control process is to be called for the third time, it obtains the third running result of the planning process and the 7th running result of the CANbus process required for the current call, and uses this information to call the control process.

[0083] Step S44: Based on the current running result of the second process and the xth running result of the third process, generate and send a request to call the fourth process once, thereby simulating the scheduling of the fourth process.

[0084] Continuing with the above Figure 2 The example uses an autonomous vehicle as an example to illustrate the use of the scheduler. Based on the current running result of the planning process and the xth running result of the canbus process, a request message can be generated and sent to call the control process once, thereby simulating the scheduling of the control process.

[0085] As mentioned above, x is the number of times the control process is run when it is currently called, as represented by the current scheduling order of the control process, corresponding to the result of the CAN bus process. x is a positive integer greater than 1. n is the number of times the planning process is run when it is called again, as represented by the next scheduling order of the planning process. n is a positive integer greater than 1. In some embodiments, x is less than n.

[0086] Please see Figure 5 , Figure 5 This is a schematic diagram of a framework of an embodiment of the electronic device 50 of this application. The electronic device 50 includes a memory 51 and a processor 52 coupled to each other. The processor 52 is used to execute program instructions stored in the memory 51 to implement the steps of any of the above-described simulation method embodiments of the scheduler. In a specific implementation scenario, the electronic device 50 may include, but is not limited to, a microcomputer or a server. In addition, the electronic device 50 may also include mobile devices such as laptops and tablets, which are not limited here.

[0087] Specifically, processor 52 controls itself and memory 51 to implement the steps of any of the above-described image detection model training method embodiments, or to implement the steps of any of the above-described image detection method embodiments. Processor 52 can also be called a CPU (Central Processing Unit). Processor 52 may be an integrated circuit chip with signal processing capabilities. Processor 52 can also be a general-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor can be a microprocessor or any conventional processor. Furthermore, processor 52 can be implemented using integrated circuit chips.

[0088] Please see Figure 6 , Figure 6 This is a schematic diagram of a framework of an embodiment of the computer-readable storage medium 60 of this application. The computer-readable storage medium 60 stores program instructions 601 that can be executed by a processor. The program instructions 601 are used to implement the steps in any of the simulation method embodiments of the scheduler described above.

[0089] In some embodiments, the functions or modules of the apparatus provided in this disclosure can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0090] The description of the various embodiments above tends to emphasize the differences between the various embodiments. The similarities or similarities between them can be referred to, and for the sake of brevity, they will not be repeated here.

[0091] In the several embodiments provided in this application, it should be understood that the disclosed methods and apparatus can be implemented in other ways. For example, the apparatus implementations described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.

[0092] Furthermore, the functional units in the various embodiments of 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. The integrated unit can be implemented in hardware or as a software functional unit.

[0093] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it 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 all or part 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 a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of 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.

[0094] Those skilled in the art will readily recognize that numerous modifications and variations can be made to the apparatus and method while maintaining the teachings of this invention. Therefore, the above disclosure should be considered limited only by the scope of the appended claims.

Claims

1. A simulation method for a scheduler, characterized in that, The scheduler is used to schedule a first process, a second process, and a third process. When the first process is called once, the second process is called once. The third process is called once at predetermined time intervals. When the second process is called once, the execution results of the first process and the third process are required. The method includes: Obtain information events, wherein the information events represent the first process being invoked and the result of the first process being returned; In response to the aforementioned information event, the second process is invoked. In response to calling the second process, the current state of the second process is obtained, and the current scheduling order of the second process is obtained, wherein the current state of the second process represents the running result of the third process that the second process has received, and the current scheduling order of the second process represents the current running result of the first process that has been run when the second process is currently called and the current running result of the third process that has been run when the second process is currently called. Based on the current state of the second process and the current scheduling order of the second process, obtain the current running result of the first process and the current running result of the third process; Based on the current running results of the first process and the third process, a request is generated and sent to invoke the second process once, thereby simulating the scheduling of the second process.

2. The method according to claim 1, characterized in that, Further includes: Based on the current state of the second process, determine whether the second process can be invoked again. In response to the ability to call the second process next time, the next scheduling order of the second process is obtained, wherein the next scheduling order of the second process represents the next running result of the first process and the nth running result of the third process required when the second process is called next time, where n is a positive integer greater than 1; Based on the results of the next run and the nth run, a request is generated and sent to invoke the second process for the next run, thereby simulating the scheduling of the second process.

3. The method according to claim 2, characterized in that, The current state of the second process represents the m-th execution result of the third process that the second process has received so far, where m is a positive integer less than n; Based on the current state of the second process, determine whether the second process can be invoked next, including: Based on the m-th execution result of the third process, determine whether the second process can be invoked for the next execution. In response to m being greater than 1, it is determined that the second process can be invoked next time.

4. The method according to claim 2, characterized in that, The step of obtaining the current running result of the first process and the current running result of the third process includes: The scheduler obtains the current running result of the first process online or offline; The scheduler obtains the current running result of the third process whether it is online or offline.

5. The method according to claim 4, characterized in that, The online acquisition means directly calling the current running result of the first process returned when the scheduler is currently calling the first process, or the current running result of the third process returned when the scheduler is currently calling the third process; The offline acquisition refers to obtaining the current running result of the first process or the current running result of the third process from an offline file, wherein the offline file is used to store the running result when the scheduler calls the first process or the third process.

6. The method according to claim 2, characterized in that, Obtaining the current state of the second process includes: Obtain the current state of the second process from the first preset table; Obtaining the current scheduling order of the second process includes: Obtain the current scheduling order of the second process from the second preset table; The first preset table is different from the second preset table. Both the first preset table and the second preset table are created by the scheduler when performing scheduling.

7. The method according to any one of claims 2-6, characterized in that, The scheduler is also used to schedule a fourth process, wherein if the second process is called once, the fourth process is called once, and each time the fourth process is called, the running results of the second process and the running results of the third process are required. The method further includes: In response to the invocation of the second process, the invocation of the fourth process is triggered. In response to calling the fourth process, the current state of the fourth process is obtained, and the current scheduling order of the fourth process is obtained, wherein the current state of the fourth process represents the running result of the third process that the fourth process has received, and the current scheduling order of the fourth process represents the current running result of the second process and the x-th running result of the third process required when the fourth process is currently called, where x is a positive integer greater than 1. Based on the current state of the fourth process and the current scheduling order of the fourth process, obtain the current running result of the second process and the xth running result of the third process; Based on the current running result of the second process and the xth running result of the third process, a request is generated and sent to invoke the fourth process once, thereby simulating the scheduling of the fourth process.

8. The method according to claim 7, characterized in that, The x is less than the n.

9. An electronic device, characterized in that, The system includes a memory and a processor that are coupled to each other, the processor being used to execute program instructions stored in the memory to implement a simulation method for the scheduler according to any one of claims 1-8.

10. A non-volatile computer storage medium storing program instructions thereon, characterized in that, When the program instructions are executed by the processor, they implement the simulation method of the scheduler as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Process scheduling method in PHM simulation verification

    CN104598306A

  • Task scheduling method and device based on double linked lists, electronic equipment and storage medium

    CN114416322A