Simulation system, method and device based on application software framework and simulation system for intelligent driving software

By employing an application software framework-based simulation system in the intelligent driving system, and utilizing the simulation manager and controller to construct a directed acyclic graph, the timing control problem of multi-source input data is solved, the consistency and reliability of simulation results are achieved, and the simulation efficiency is improved.

CN120909152APending Publication Date: 2025-11-07CHONGQING CHANGAN AUTOMOBILE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511057739.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-30
Publication Date
2025-11-07

AI Technical Summary

Technical Problem

The lack of timing control and order preservation management for multi-source input data in existing intelligent driving system simulation tests leads to inconsistent simulation results, affecting the accuracy of system response and the reliability of tests.

Method used

A simulation system based on an application software framework is adopted. The simulation manager receives historical data and simulation time, creates simulation tasks and controllers, and constructs a directed acyclic graph to ensure the consistency of task dependencies and execution order.

Benefits of technology

This achieves consistency and reproducibility of simulation results across multiple simulations, improves the credibility and efficiency of simulation results, and ensures the reliability and accuracy of simulation testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120909152A_ABST
    Figure CN120909152A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of simulation testing, in particular to a simulation system, method and device based on an application software framework and a simulation system for intelligent driving software. The simulation system based on the application software framework comprises a simulation manager, a simulation controller and a task group scheduler, the simulation manager is in communication connection with a simulation platform, and the simulation manager is used for receiving historical data and simulation time recharged by the simulation platform; creating a simulation task and a simulation controller corresponding to the simulation task according to the historical data and the simulation time; the simulation controller is used for determining a task dependency relationship among the tasks in the simulation tasks based on a preset task algorithm, and constructing a directed acyclic graph; and controlling the task group scheduler to execute the simulation task according to the task execution sequence determined by the directed acyclic graph. Through control of a function task pull-up time sequence and order-preserving management in a data acquisition process, a consistent simulation mode is provided, and the consistency of multiple simulation test results is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of simulation testing, in particular to a simulation system, method and device based on an application software framework and a simulation system for intelligent driving software. BACKGROUND

[0002] In the field of intelligent driving technology, in order to improve the stability of the intelligent driving system and avoid the safety risks of real scene testing, during the development of the intelligent driving system, simulation testing will be performed on the developed intelligent driving system.

[0003] In related technologies, there is a lack of strict time sequence control and order preservation management of multi-source input data, so the consistency problem is always difficult to effectively solve. This is specifically reflected in the following aspects:

[0004] (1) The task start time sequence in multiple simulation processes is difficult to control, affecting the accuracy of system response. For example, due to the lack of accurate synchronization mechanism between the simulation platform and the simulation software framework, the start time of the same task may have slight differences in different simulations, which affects the subsequent tasks that depend on the task results, resulting in inconsistent simulation results.

[0005] (2) The data acquisition process has a disordered phenomenon, causing deviation of the simulation results from the actual scene. For example, the sensor data generated by the simulation platform may not be received and processed by the simulation software framework in the time sequence in the real world due to transmission delay, processing sequence, etc., resulting in a difference between the behavior of the perception module, decision module, etc. that depend on these data and the actual situation. SUMMARY

[0006] One of the purposes of the present application is to provide a simulation system based on an application software framework to solve the consistency problem between multiple simulation results in the prior art, so that the multiple simulation results do not have reproducibility, seriously affecting the test credibility and limiting the actual application effect of the simulation technology. The second purpose is to provide a simulation method based on an application software framework; the third purpose is to provide a simulation device based on an application software framework; and the fourth purpose is to provide a simulation system for intelligent driving software.

[0007] In order to achieve the above purposes, the technical solutions adopted by the present application are as follows:

[0008] In some embodiments, an application software framework-based simulation system is provided, which is communicatively connected with a simulation platform, and includes a simulation manager, a simulation controller and a task group scheduler, wherein: the simulation manager is communicatively connected with the simulation platform, and is configured to receive historical data and simulation time fed back by the simulation platform, and create a simulation task and a simulation controller corresponding to the simulation task according to the historical data and the simulation time; the simulation controller is configured to determine a task dependency relationship between tasks in the simulation task based on a preset task algorithm, construct a directed acyclic graph, and control the task group scheduler to execute the simulation task according to a task execution order determined based on the directed acyclic graph.

[0009] The application software framework-based simulation system provided by the present disclosure receives historical data and simulation time fed back by a simulation platform through a simulation manager, and creates corresponding simulation tasks and simulation controllers, thereby ensuring that the same input data and execution time sequence are used in each simulation, and consistent output results are obtained. The simulation controller determines the dependency relationship between tasks according to a preset task algorithm, and constructs a directed acyclic graph, thereby ensuring that the tasks are executed in the correct order. In this way, in the simulation process, the simulation tasks are no longer actively mobilized, but the simulation controllers of all simulation tasks are managed by the simulation manager, the dependency relationship between tasks is determined based on the received simulation signals, a directed acyclic graph is constructed, the simulation time is controlled to be consistent with the real time of the simulation task, and the task group scheduler is pulled to execute the corresponding function task function.

[0010] The simulation system of the present disclosure receives historical data and simulation time data fed back by a simulation platform through a simulation manager, and creates corresponding simulation tasks and simulation controllers, thereby ensuring that the same input data and execution time sequence are used in each simulation, and consistent output results are obtained. Specifically, uniform simulation timestamp adjustment ensures that the data processed by all tasks is consistent in time; the task execution order based on the directed acyclic graph ensures that the time sequence of task execution is determined, and thus the same set of input data is processed by the system in exactly the same path and order in multiple simulations, and the same result is finally obtained. This greatly improves the credibility and reproducibility of the simulation results, and makes the testing and verification based on the simulation results more reliable.

[0011] Optionally, the step of creating, by the simulation manager, the simulation task and the simulation controller corresponding to the simulation task according to the historical data and the simulation time includes: adjusting the time of the historical data according to the simulation time; determining the data type and algorithm function of the historical data to generate the simulation task; and creating the simulation controller based on the simulation task.

[0012] In this embodiment, by adjusting the time of historical data, it is ensured that the simulation task uses data corresponding to the simulation time, and by time sequence alignment of multi-source data, it is avoided that data time sequence error causes distortion of simulation results. The simulation manager analyzes historical data to determine data task type and algorithm function, generates a simulation task, and creates a simulation controller based on the simulation task, which simplifies the creation process of the simulation task and the simulation controller and improves the simulation efficiency.

[0013] Optionally, the simulation manager is further configured to receive a control signal including a sequence number sent by the simulation platform, start the simulation controller, and send a completion signal fed back by the simulation controller to the simulation platform; and destroy the simulation controller that has completed the simulation task.

[0014] In this embodiment, by receiving the control signal including the sequence number sent by the simulation platform, the simulation controller can run the simulation task in sequence. By sending the completion signal fed back by the simulation controller to the simulation platform, the simulation platform can obtain the simulation task execution result in time and perform subsequent processing, thereby improving the simulation efficiency. By destroying the simulation controller that has completed the simulation task, the occupied resources can be released, and resource waste can be avoided.

[0015] Optionally, the simulation controller is further configured to update the sequence number of the control signal after one task in the simulation task is completed and feed back to the simulation platform; and the simulation manager is further configured to control the simulation controller to execute the next task in the case that the sequence number of the control signal changes.

[0016] In this embodiment, by updating the sequence number of the control signal by the simulation controller after the task is completed and feeding back to the simulation platform, and by controlling the simulation controller to execute the next task by the simulation manager in the case that the sequence number of the control signal changes, it is ensured that the simulation task is executed in the correct order, and it is avoided that the task execution is chaotic.

[0017] Optionally, the simulation controller is configured to determine the task dependency relationship between tasks in the simulation task based on a preset task algorithm, and the steps of constructing the directed acyclic graph include: abstracting each algorithm task as a node of the directed acyclic graph, and defining the dependency relationship between tasks as a directed edge; recursively traversing the task dependency relationship between tasks in the simulation task by a depth-first search algorithm to construct the directed acyclic graph.

[0018] In this embodiment, each algorithm task is abstracted as a node of the directed acyclic graph, and the dependency relationship between tasks is defined as a directed edge, which can clearly express the dependency relationship between tasks. By recursively traversing the task dependency relationship between tasks in the simulation task by a depth-first search algorithm, the directed acyclic graph is constructed, which can ensure that the tasks are executed in the correct order and avoid deadlocks or execution errors.

[0019] Optionally, the simulation controller is configured to determine the task dependency relationship between tasks in the simulation task based on a preset task algorithm, and the step of constructing the directed acyclic graph further includes: when the detected task dependency relationship between tasks is a circular dependency path, identifying all nodes in the circular dependency path; and removing any edge in the circular dependency path to obtain the directed acyclic graph.

[0020] In this embodiment, by analyzing the dependency relationship between tasks, it is detected whether there is a circular dependency path. When a circular dependency path is detected, by identifying all nodes in the circular dependency path and removing any edge in the circular dependency path, the circular dependency relationship between tasks can be eliminated, the loop that may exist in the directed graph can be eliminated, so that all tasks can be correctly executed, and the problem of deadlock or task execution failure caused by circular dependency can be avoided.

[0021] Optionally, the step of determining the task execution order based on the directed acyclic graph includes: according to the dependency relationship in the directed acyclic graph, tasks without pre-dependency relationship are executed in parallel through a thread pool, and tasks with dependency relationship are executed in series according to the topological sorting corresponding to the dependency relationship.

[0022] In this embodiment, the dependency relationship in the directed acyclic graph is analyzed to determine which tasks can be executed in parallel and which tasks need to be executed in series. By executing tasks without pre-dependency relationship in the directed acyclic graph in parallel through a thread pool, the computing power of a multi-core processor can be fully utilized to improve the simulation efficiency. In addition, by executing tasks with dependency relationship in the directed acyclic graph in series according to the topological sorting corresponding to the dependency relationship, it can be ensured that the tasks are executed in the correct order, and the problem of deadlock or execution error can be avoided.

[0023] In some embodiments, a simulation method based on an application software framework is provided. The application software framework is in communication connection with a simulation platform. The simulation method includes: receiving historical data and simulation time backfilled by the simulation platform; creating simulation tasks and simulation controllers corresponding to the simulation tasks according to the historical data and the simulation time; determining the task dependency relationship between tasks in the simulation task based on a preset task algorithm to construct a directed acyclic graph; and executing the simulation tasks according to the task execution order determined based on the directed acyclic graph.

[0024] The simulation method based on the application software framework provided by the present disclosure receives historical data and simulation time fed back by a simulation platform through a simulation manager, and creates corresponding simulation tasks and a simulation controller, so that the same input data and execution timing are used for each simulation, thereby obtaining consistent output results. The simulation controller determines the dependency relationship between tasks according to a preset task algorithm, and constructs a directed acyclic graph to ensure that the tasks are executed in the correct order. At the same time, the simulation controller controls a task group scheduler to execute the simulation tasks, thereby ensuring the accuracy of the task execution timing. In addition, the simulation controller updates the simulation time to an internal time interface, so that the time obtained by the driving application is modified from real time to simulation time, thereby further ensuring the accuracy of the simulation results.

[0025] In some embodiments, a simulation device based on an application software framework is provided, comprising a processor and a memory storing program instructions, the processor being configured to execute the simulation method based on the application software framework as described in any of the above embodiments when running the program instructions.

[0026] In some embodiments, a simulation system for intelligent driving software is provided, comprising: an application software framework comprising a simulation system based on an application software framework as described in any of the above embodiments; and a simulation platform in communication connection with the application software framework, configured to feed back historical data to the application software framework, send control signals and receive feedback signals.

[0027] The present application has the following beneficial effects:

[0028] (1) The application software framework adjusts the time stamp of the received historical data, and replaces the time stamp that may exist in the original data and is generated by different sensors or modules with a unified simulation time stamp maintained by the simulation manager. In this way, it is ensured that the time seen by all tasks during the simulation process is synchronized, and the processing order error caused by inconsistent original data time stamps is avoided, thereby ensuring the order preservation of data processing.

[0029] (2) The simulation controller determines the dependency relationship between tasks according to a preset task algorithm, and constructs a directed acyclic graph; the simulation controller controls the task group scheduler to execute the simulation tasks, thereby ensuring the accuracy of the task execution timing.

[0030] (3) The task group scheduler executes the tasks according to the order determined by the directed acyclic graph, thereby avoiding the randomness of the execution order caused by resource competition or scheduling jitter in actual operation. BRIEF DESCRIPTION OF DRAWINGS

[0031] Figure 1 The system schematic block diagram of the simulation system based on the application software framework provided by an embodiment of the present application is shown in the figure;

[0032] Figure 2 a schematic block diagram of a simulation manager provided for an embodiment of the present application;

[0033] Figure 3 a schematic flow diagram of a process for determining dependency between task relationships in a simulation task provided for an embodiment of the present application;

[0034] Figure 4 a schematic flow diagram of a process for determining dependency between task relationships in a simulation task provided for another embodiment of the present application;

[0035] Figure 5 a schematic block diagram of a simulation system based on an application software framework provided for another embodiment of the present application;

[0036] Figure 6 a schematic flow diagram of a process for a simulation method based on an application software framework provided for an embodiment of the present application;

[0037] Figure 7 a schematic block diagram of a simulation system for intelligent driving software provided for an embodiment of the present application;

[0038] Figure 8 a schematic structural diagram of a simulation device based on an application software framework provided for an embodiment of the present application.

[0039] Reference signs:

[0040] 1 application software framework; 2 simulation platform;

[0041] 100 simulation system based on an application software framework; 110 simulation manager; 120 simulation controller; 130 task group scheduler; 140 task manager. DETAILED DESCRIPTION

[0042] The present application will be described with reference to the attached drawings and preferred embodiments, which are given by way of illustration and are not meant to limit the present application. Other advantages and novel features of the present application will become readily apparent from the following detailed description of the application and from the drawings.

[0043] It should be noted that the drawings provided in the following embodiments only schematically illustrate the basic concepts of the present application, and only the components related to the present application are shown in the drawings, rather than being drawn according to the number, shape and size of the components in actual implementation. The actual implementation of each component can be a random change, and the component layout pattern can be more complex.

[0044] In some embodiments, in combination Figure 1 As shown, an application software framework-based simulation system 100 is provided, the application software framework 1 is in communication connection with the simulation platform 2, and the simulation system includes a simulation manager 110, a simulation controller 120 and a task group scheduler 130, wherein:

[0045] The simulation manager 110 is in communication connection with the simulation platform 2, and the simulation manager 110 is used to receive historical data and simulation time backfilled by the simulation platform 2; and according to the historical data and the simulation time, create a simulation task and a simulation controller 120 corresponding to the simulation task.

[0046] The simulation controller 120 is used to determine the task dependency relationship between tasks in the simulation task based on a preset task algorithm, and construct a directed acyclic graph; and according to the task execution order determined by the directed acyclic graph, control the task group scheduler 130 to execute the simulation task.

[0047] The simulation system 100 provided by the present disclosure, the simulation manager 110 receives the historical data and the simulation time data backfilled by the simulation platform, and adjusts the time stamp of the historical data according to the simulation time data, ensures that each simulation starts from the same data starting point, and the time attribute of the data is unified. This avoids the difference in simulation results caused by differences in data sources or inconsistent time stamps, and is the basis for achieving the uniqueness of multiple simulation results.

[0048] The simulation controller 120 determines the dependency relationship between tasks based on a preset task algorithm, and constructs a directed acyclic graph (DAG). This means that the complex task dependency relationship is structured, so that the execution order of the task can be clearly defined. Through the topological sorting of the DAG, a unique task execution order can be determined. The simulation controller 120 controls the execution of the task through the task group scheduler 130 according to the order determined by the DAG, ensures that the task is always executed in the correct logical order, and avoids the deviation of the simulation result caused by the wrong execution order, which is the key to achieving the consistency of the simulation result and the actual result.

[0049] The simulation system provided by the disclosure creates and initializes the simulation node through the simulation manager 110; the simulation platform 2 fills the shared memory of the application software framework 1 with historical data, and adjusts the time stamp of the historical data to synchronize the simulation time; the real-time simulation platform 2 sends a control signal to the simulation manager 110 to request the execution of a periodic task or a task group; the simulation manager 110 starts the simulation controller 120, and constructs a directed acyclic graph based on a preset algorithm task dependency relationship; the simulation controller 120 determines the task execution order according to the directed acyclic graph, and sequentially pulls up the tasks of each algorithm component through the task group scheduler 130; after completing all task execution, the application software framework 1 feeds back a completion signal to the simulation platform 2, and waits for a new round of execution.

[0050] In the embodiment, the simulation manager 110 creates and initializes the simulation node, including: before the simulation starts, the simulation manager 110 creates and initializes the required simulation nodes according to the information pre-configured or dynamically received. Each simulation node usually corresponds to one or more functional modules in the intelligent driving system, such as a perception module, a decision module, a control module, etc. The initialization process includes allocating resources for each node, loading necessary algorithm components, setting initial states, etc. This step ensures that the infrastructure of the simulation environment is ready.

[0051] Optionally, the step of the simulation manager 110 creating a simulation task and a simulation controller 120 corresponding to the simulation task according to the historical data and the simulation time includes: adjusting the time of the historical data according to the simulation time; determining the data type and algorithm function of the historical data to generate a simulation task; and creating a simulation controller 120 based on the simulation task.

[0052] In the embodiment, the system time stamp of the real-time simulation platform 2 input data is replaced with a unified simulation time stamp, and the simulation time is provided to the intelligent driving application through a time interface. By adjusting the time of the historical data, it is ensured that the simulation task uses data corresponding to the simulation time, and by aligning the time sequence of multi-source data, it is avoided that the data time sequence error causes the simulation result to be distorted. The simulation manager 110 analyzes the historical data to determine the data task type and algorithm function, generates a simulation task, and creates a simulation controller 120 based on the simulation task, which simplifies the creation process of the simulation task and the simulation controller 120, and improves the simulation efficiency.

[0053] For example, the simulation platform 2 is responsible for external tools that generate simulation scenarios, simulate sensor data, simulate vehicle dynamics, etc. In order to provide consistent simulation input, the simulation platform 2 fills the shared memory area inside the application software framework 1 with pre-recorded or generated historical data, such as time series data containing sensor readings, environmental information, vehicle state, etc. The application software framework 1 adjusts the time stamp of the received historical data, replacing the time stamps that may exist in the original data, which are generated by different sensors or modules, with a unified simulation time stamp maintained by the simulation manager 110. This adjustment ensures that all tasks see synchronized time during the simulation process, avoiding processing order errors caused by inconsistent original data time stamps, thereby ensuring the order preservation of data processing.

[0054] The time stamp adjustment is specifically replacing the system time stamp of the simulation platform 2 input data with a unified simulation time stamp. That is, all data from the simulation platform 2, after entering the application software framework 1, are given a global and unified simulation time maintained by the simulation manager 110. In this way, all tasks inside the application software framework 1 see consistent "current time", avoiding processing order errors caused by inconsistent original data time stamps. The application software framework 1 provides this unified simulation time to intelligent driving applications through a set time interface. In this way, all modules inside the intelligent driving application use this synchronized simulation time, ensuring the consistency of time-based logical judgment and behavior decision.

[0055] Optionally, the simulation manager 110 is also configured to receive a control signal including a sequence number sent by the simulation platform 2, start the simulation controller 120, and send a completion signal fed back by the simulation controller 120 to the simulation platform 2; and destroy the simulation controller 120 that has completed the simulation task.

[0056] In this embodiment, the simulation process usually needs to be advanced in a certain time sequence. When the simulation platform 2 advances the simulation time to a certain specific point, it will send a control signal to the simulation manager 110. The control signal usually contains a sequence number, which is used to identify which round or frame of simulation request it is. The role of this sequence number is to inform the simulation manager 110 that it can start executing a set of predetermined periodic tasks or task groups. By receiving the control signal containing the sequence number sent by the simulation platform 2, the simulation controller 120 can run the simulation tasks in sequence. By sending the completion signal fed back by the simulation controller 120 to the simulation platform 2, the simulation platform 2 can timely obtain the simulation task execution result and perform subsequent processing, thereby improving the simulation efficiency. By destroying the simulation controller 120 that has completed the simulation task, the occupied resources can be released, avoiding resource waste.

[0057] Optionally, the simulation controller 120 is further configured to update the sequence number of the control signal after one of the simulation tasks is completed, and feed back to the simulation platform 2; and the simulation manager 110 is further configured to control the simulation controller 120 to execute the next task if the sequence number of the control signal is changed.

[0058] In this embodiment, the simulation controller 120 updates the sequence number of the control signal after the task is completed, and feeds back to the simulation platform 2, and the simulation manager 110 controls the simulation controller 120 to execute the next task if the sequence number of the control signal is changed, so as to ensure that the simulation tasks are executed in the correct order and avoid confusion in task execution. In this way, the sequence number mechanism ensures that the simulation cycle is completed each time before responding to a new signal, so as to avoid interruption of task execution. The timestamp forced alignment eliminates the data timing disorder caused by system clock difference. The sequence number verification + timestamp alignment realizes strict synchronization of data consumption and task scheduling.

[0059] In some examples, a task group can contain multiple tasks that need to be completed cooperatively. After receiving the control signal, the simulation manager 110 starts the simulation controller 120 corresponding to the task group requested to be executed. And after completing all task execution, the simulation controller 120 feeds back a completion signal to the real-time simulation platform, and waits for a new round of execution. When all tasks in the task group are successfully executed, or an error occurs in the execution process, the application software framework 1 sends a completion signal to the simulation platform 2 to inform the simulation platform 2 that the current round or frame of simulation task has ended. After receiving the completion signal, the simulation platform 2 can update the simulation time and prepare for the next round of data filling and control signal sending. The application software framework 1 enters a waiting state and is ready to receive the next round of simulation instructions.

[0060] Optionally, the conditions for the simulation controller 120 to respond to the control signal include: (1) the current sequence number is inconsistent with the sequence number of the received signal; (2) all previous period tasks have been completed. The way to determine whether the current sequence number is inconsistent with the sequence number of the received signal includes but is not limited to: the simulation controller 120 internally maintains a current expected sequence number. Only when the sequence number of the received control signal is greater than the current expected sequence number, it is confirmed as a new simulation request that needs to be processed, and the internal expected sequence number is updated to prevent repeated processing or processing of outdated requests. At the same time, the simulation controller checks whether there are previous period tasks (i.e. tasks that depend on the output of the previous round or other related tasks to start execution) in the tasks it is responsible for executing that have not been completed. Only when all previous period tasks have been completed and the sequence number of the control signal is updated, the simulation controller will start executing the tasks in the current task group to ensure that the timing dependency of task execution is strictly followed.

[0061] In combination withFigure 2 As shown, the simulation manager 110 is configured to manage the functional components of the simulation mode external interface and overall behavior, and is mainly responsible for creating a simulation controller, initializing the simulation controller, starting the simulation controller, and stopping the simulation controller. The simulation controller 120 is configured to manage the functional components of the simulation task specific execution details, and the simulation controller 120 supports setting the enable state of the simulation mode and the message reply period, and manages multiple simulation nodes and their corresponding module tasks. The periodic tasks in the simulation mode are triggered uniformly by the simulation manager 110, and the data in the shared memory of the simulation platform 2 is adjusted uniformly by the application framework to replace the real time with the simulation time. The simulation controller 120 is specifically configured to subscribe to the request signal of the simulation platform 2 to start the task execution process; maintain the dependency graph of the tasks to ensure that the tasks are executed in the correct order; send a response signal when the task is completed to notify the simulation platform 2; and manage the dependency relationship of the periodic tasks and perform loop unwinding on the loop data. The simulation controller 120 realizes an asynchronous reply mechanism through a condition variable and a mutex, and the simulation controller 120 notifies the task state through an asynchronous mechanism. The asynchronous reply mechanism allows the occupied computing resources to be released immediately after the task execution is completed, thereby avoiding blocking caused by resource occupation.

[0062] In combination Figure 2 As shown, the simulation controller 120 is specifically configured to obtain the dependency relationship of the periodic task execution, and preferentially unwinds the loop for the looped task; updates the real time to the simulation time issued by the simulation platform; executes all periodic tasks in sequence according to the dependency relationship; listens to the control signal of the simulation platform, and executes the next periodic simulation task when the sequence number of the control signal changes; updates the sequence number value of the feedback signal, and sends a frame of feedback signal to the simulation platform.

[0063] Optionally, the simulation controller 120 is configured to determine the task dependency relationship between tasks in the simulation tasks based on a preset task algorithm, and the step of constructing a directed acyclic graph includes: abstracting each algorithm task as a node of the directed acyclic graph, and defining the dependency relationship between tasks as a directed edge; recursively traversing the task dependency relationship between tasks in the simulation tasks through a depth-first search algorithm to construct the directed acyclic graph.

[0064] In this embodiment, each algorithm task is abstracted as a node of the directed acyclic graph, and the dependency relationship between tasks is defined as a directed edge, which can clearly express the dependency relationship between tasks. The global dependency mapping table is generated by recursively traversing the task dependency relationship between tasks in the simulation tasks through a depth-first search algorithm. The depth-first search algorithm can effectively explore the dependency relationship between tasks to construct a complete directed acyclic graph, so as to ensure that the tasks are executed in the correct order and avoid deadlocks or execution errors.

[0065] Optionally, the simulation controller 120 is configured to determine the task dependency relationship between tasks in the simulation task based on the preset task algorithm, and the step of constructing the directed acyclic graph further comprises: when the detected task dependency relationship between tasks is a circular dependency path, identifying all nodes in the circular dependency path; and removing any edge in the circular dependency path to obtain the directed acyclic graph.

[0066] In this embodiment, by analyzing the dependency relationship between tasks, it is detected whether there is a circular dependency path. When a circular dependency path is detected, by identifying all nodes in the circular dependency path and removing any edge in the circular dependency path, the circular dependency relationship between tasks can be eliminated, and the loop that may exist in the directed graph can be eliminated, thereby ensuring that all tasks can be correctly executed and avoiding the problem of deadlock or task execution failure caused by circular dependency.

[0067] Optionally, the step of determining the task execution order according to the directed acyclic graph comprises: according to the dependency relationship in the directed acyclic graph, tasks without pre-dependency are executed in parallel through a thread pool, and tasks with dependency are executed in series according to the topological order corresponding to the dependency relationship.

[0068] In this embodiment, the dependency relationship in the directed acyclic graph is analyzed to determine which tasks can be executed in parallel and which tasks need to be executed in series. By executing tasks without pre-dependency in parallel through a thread pool in the directed acyclic graph, the computing power of a multi-core processor can be fully utilized to improve simulation efficiency. Furthermore, by executing tasks with dependency in series according to the topological order corresponding to the dependency relationship in the directed acyclic graph, it can be ensured that the tasks are executed in the correct order to avoid deadlock or execution errors.

[0069] The determination method of the task execution order comprises: according to the dependency relationship in the directed acyclic graph, tasks without pre-dependency are executed in parallel; and tasks with dependency are strictly executed in series, and the post-task calls the pre-task persistent execution result. According to the topological order of the directed acyclic graph, the simulation controller identifies tasks without pre-dependency, which can be executed in parallel to improve simulation efficiency. For tasks with dependency, they are executed in series according to the dependency order defined in the directed acyclic graph. For example, if task B depends on the output of task A, task B must wait for task A to complete execution and obtain its output result before starting execution. In order to ensure the reliability of serial execution, the post-task (such as task B) usually needs to call the persistent execution result of the pre-task (such as task A), such as the intermediate result stored in the shared memory or a specific data structure, instead of directly waiting for the real-time completion of task A. This helps to reduce the waiting time between tasks and ensures that the post-task obtains complete and correct input.

[0070] A directed acyclic graph is a directed graph that has no cycles. A directed acyclic graph consists of nodes and edges, with edges having directionality, representing connections from one node to another. In task orchestration scenarios, a directed acyclic graph relationship can be used to describe the dependency relationships and execution order between tasks. At this time, each node represents a specific functional task, and the directed edge represents the dependency relationship between tasks, i.e. a task must be executed after another task is completed. In such scenarios, the acyclic nature of the directed acyclic graph ensures that all tasks can be topologically sorted, ensuring that tasks can be executed in a specific order without the risk of infinite loops. At the same time, tasks existing in different directed acyclic graphs can be safely executed in parallel, as different tasks may not have a dependency relationship in the directed acyclic graph, and thus can be executed at different points in time, thereby improving the overall efficiency of the system.

[0071] In this embodiment, tasks are abstracted as directed acyclic graph nodes, and dependency relationships are defined as directed edges, for example A→B represents that B depends on A. A global dependency table is generated by recursively traversing the dependency chain using a depth-first search algorithm. When a circular dependency path is detected, a loop resolution operation is performed. The steps of the loop resolution operation include: identifying the set of nodes in the circular dependency path; randomly selecting a dependency edge in the path to remove; updating the global dependency table and verifying acyclicity. When a circular dependency path is detected during the construction of the directed acyclic graph, the simulation controller will first identify all the nodes that make up the loop. Then, a dependency edge in the loop is selected for removal. The strategy for removing the edge can be random or follow a certain priority, for example, removing the edge that has the least impact on the system logic. After removing the edge, the dependency mapping table of the directed acyclic graph needs to be updated, and acyclicity verification needs to be performed again to ensure that the loop resolution operation is effective and does not introduce new problems.

[0072] For example, the dependency relationship calculation process between tasks in a simulation task is shown in the figure. During initialization, all dependent tasks of a given task are recursively searched based on a depth-first search algorithm, and the dependency relationship is recorded in the global dependency table. Combined with Figure 3 As shown, for acyclic relationships, the message-triggered task does not need to perform dependency relationship calculation, and only the periodic task needs to be calculated. After the algorithm is executed, the relationship is arranged as follows: the A and D tasks are executed simultaneously when the periodic task starts; the F task is executed after the A task is completed; the E task is executed after the A and D tasks are completed simultaneously. Combined with Figure 4 As shown, the loop relationship is shown, and there is a loop-type dependent periodic task. Since it violates the directed acyclic graph rule, it will cause mutual deadlock between tasks and cannot be executed. In this case, a loop resolution operation is performed to remove an edge in the loop-type dependency arbitrarily, so that the dependency relationship can be obtained normally. For example, as Figure 4As shown, removing the edges of O-X at random will break the loop into the dependency relationship of X→Y→Z→O.

[0073] Optionally, the simulation controller determines the task execution order according to the directed acyclic graph, and the step of sequentially pulling up the tasks of each algorithm component by the task group scheduler includes: the simulation controller determines one or more task execution orders based on the constructed directed acyclic graph. For tasks without pre-dependence, they can be executed in parallel; for tasks with dependency relationship, they are strictly executed in series according to the dependency order. The simulation controller passes the determined execution order and task information to the task group scheduler. The task group scheduler is responsible for actually starting the task functions of each algorithm component according to the task type and the current resource situation, and manages the execution process of the tasks. The task group scheduler can support multiple scheduling modes, such as simple thread pool, fair and ordered thread pool, timed task scheduling, resident task scheduling, etc., to adapt to the execution needs of different tasks. Among them, the fair and ordered thread pool avoids resource competition between different task groups by isolating task group resources, and ensures the orderliness and fairness of task execution.

[0074] In some embodiments, in combination Figure 5 As shown, the simulation system provided by the present disclosure includes a simulation manager 110, a simulation control and a task group scheduler 130. The simulation platform 2 is used to fill in historical data, send control signals and receive feedback signals. The simulation manager 110 is used to manage the life cycle of the simulation node and the external interface. The simulation controller 120 is used as the core component of managing the details of the simulation task execution, for constructing the dependency relationship between tasks, controlling the timing execution and loop breaking operation; after receiving the control signal of the simulation platform 2, the simulation manager 110 will start the simulation controller 120, execute the tasks in order according to the dependency order between tasks, and return an acknowledgement signal to the simulation platform 2 after all tasks are executed. The task group scheduler 130 is used to execute the task group according to the dependency relationship; the simulation system further includes a shared memory module, and the simulation platform fills in the historical data recorded or generated in advance into the shared memory module inside the application software framework. The shared memory module provides an efficient data exchange mechanism for storing the input data adjusted by the timestamp.

[0075] Optionally, the simulation system 100 based on the application software framework further includes a task manager 140. The task manager 140 provides a user interface for function registration. Users can use this interface to register algorithm tasks, including specifying input and output data types and algorithm functions. In addition, the task manager 140 also provides a function registration interface, an initialization interface, a destruction interface and a unified start-stop interface of the task, for unified management and control of the internal tasks of the module.

[0076] Optionally, the simulation manager 110 is also configured to manage the external interface of the simulation system. In addition, the simulation manager 110 creates the simulation controller 120 based on the tasks registered in the task manager 140, and controls the initialization, start, and stop of the simulation controller 120.

[0077] Optionally, the simulation controller 120 mainly implements the following functional details:

[0078] For example, the simulation controller 120 receives the simulation time and updates the simulation time to the internal time interface. The time obtained by the driving application is modified from the real time to the simulation time. The simulation task includes multiple periodic tasks, and there may be a certain dependency relationship between the multiple periodic tasks, such as periodic task A→periodic task B. After receiving the simulation control signal, periodic task A needs to be executed first, and then periodic task B is executed, which is the dependency relationship between tasks. In this way, when the simulation controller 120 is created, the dependency relationship of the simulation task is recursively traversed based on the depth-first search algorithm. In addition, according to the constructed dependency relationship, the simulation controller 120 sequentially pulls up all tasks with a dependency relationship in each simulation period. When all periodic tasks complete a round of execution, the simulation controller 120 maintains the update state of the control signal, updates the feedback signal sequence number, and sends the feedback signal to the simulation platform 2. The simulation controller 120 receives the control signal sent by the simulation platform 2, and when the sequence number of the signal changes, the next periodic simulation task is executed.

[0079] In this way, in the simulation mode, the simulation manager 110 is responsible for creating and starting the simulation controller 120 based on the algorithm tasks registered in the task manager 140. The simulation controller 120 communicates with the simulation platform 2 to ensure the consistency of the task input data and the accuracy of the execution order. Finally, the tasks are executed by the task group scheduler 130, thereby ensuring the efficiency and consistency of the entire simulation process.

[0080] In some embodiments, in combination with Figure 6 As shown, a simulation method based on an application software framework is provided, the application software framework is in communication connection with a simulation platform, and the simulation method comprises the following steps:

[0081] S601, receiving historical data and simulation time backfilled by the simulation platform.

[0082] S602, creating simulation tasks and simulation controllers corresponding to the simulation tasks according to the historical data and the simulation time.

[0083] S603, determining the task dependency relationship between tasks in the simulation tasks based on a preset task algorithm, and constructing a directed acyclic graph.

[0084] S604, the simulation task is executed according to the task execution order determined by the directed acyclic graph.

[0085] The simulation method based on the application software framework provided by the present disclosure receives historical data and simulation time fed back by the simulation platform through the simulation manager, and creates corresponding simulation tasks and simulation controllers, so as to ensure that the same input data and execution timing are used for each simulation, thereby obtaining consistent output results. The simulation controller determines the dependency relationship between tasks according to the preset task algorithm, and constructs a directed acyclic graph, so as to ensure that the tasks are executed in the correct order. At the same time, the simulation controller controls the task group scheduler to execute the simulation task, so as to ensure the accuracy of the task execution timing. In addition, the simulation controller updates the simulation time to the internal time interface, so that the time obtained by the driving application is modified from real time to simulation time, thereby further ensuring the accuracy of the simulation results.

[0086] In some embodiments, in combination with Figure 7 As shown in the figure, a simulation system for intelligent driving software is provided, which comprises: an application software framework 1 comprising a simulation system based on an application software framework 100 as described in any of the above embodiments; and a simulation platform 2, which is in communication connection with the application software framework 1, and is used for feeding back historical data to the application software framework 1, sending control signals and receiving feedback signals.

[0087] The simulation system provided by the present disclosure comprises an application software framework 1 and a simulation platform 2. The simulation platform 2 feeds back historical data to the shared memory in the application software framework 1, thereby providing input data support for subsequent simulation calculation. According to the simulation time provided by the simulation platform 2, the application software framework 1 adjusts the time stamp of the received data, and completes the update and management of the simulation time. After the time synchronization is completed, the simulation platform 2 generates a control signal and sends it to the application software framework 1, requesting to execute a predetermined periodic task or task group. According to the dependency relationship between the preset algorithm tasks, the application software framework 1 starts the corresponding tasks of each algorithm component in turn until all the tasks are executed. After completing a round of task execution, the application software framework 1 sends a feedback signal to the simulation platform 2, indicating that the tasks of the current period have been completed, and waits for new data and control signals to start a new round of execution.

[0088] The simulation platform 2 is used for developing and testing key tools of the automatic driving system, and covers simulation requirements from hardware in the loop (HIL) to software in the loop (SIL). The simulation platform 2 supports data simulation of real road environment, sensor data and vehicle dynamic behavior in a virtual traffic scene, can realize closed-loop verification of perception, planning, decision and control modules, and ensures real-time performance of the algorithm in the virtual environment. The simulation platform 2 can set simulation data content, adjust simulation data time, realize multi-module collaborative simulation experiment, and improve the overall verification capability of the system.

[0089] In the data consistency backfilling scheme, by using the simulation system of the present disclosure, the application software framework 1 ensures effective operation of the logical flow, time accuracy and control closed loop of the simulation system through data acquisition and preprocessing, adjustment and synchronization of simulation time, scheduling and execution of algorithm tasks, and signal interaction between the simulation platform 2.

[0090] In some embodiments, in combination with Figure 8 As shown in FIG. 1, a deployment structure schematic diagram of the computer device is shown. The computer device includes a processor A01, a network interface A02, a display screen A04, an input device A05 and a memory connected through a system bus. The processor A01 of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes an internal memory A03 and a non-volatile storage medium A06. The non-volatile storage medium A06 stores an operating system B01 and a computer program B02. It should be noted that the computer program includes a basic software program of a communication and scheduling layer, and also includes an upper application program carrying an actual intelligent driving function. The internal memory A03 provides an environment for running of the operating system B01 and the computer program B02 in the non-volatile storage medium A06. The network interface A02 of the computer device is configured to communicate with an external terminal through a network connection. The computer program is executed by the processor A01 to implement the method of any one of the above embodiments. The display screen A04 of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device A05 of the computer device can be a touch layer overlaid on the display screen, or can be a key, trackball or touchpad arranged on the shell of the computer device, or can be an external keyboard, touchpad or mouse, etc.

[0091] The computer readable storage medium provided by the embodiments of the present disclosure stores computer executable instructions, and the computer executable instructions are configured to execute the simulation method based on the application software framework.

[0092] The technical solutions of the embodiments of the present disclosure can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes one or more instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method of the embodiments of the present disclosure. The aforementioned storage medium can be a non-transitory storage medium, for example, a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.

[0093] It should be noted that the specific values of the preset parameters in the present disclosure can be specifically set according to the specific configuration parameters of the vehicle, which will not be described one by one here.

[0094] The above description and drawings sufficiently illustrate the embodiments of the present disclosure to enable one skilled in the art to practice them. Other embodiments can include structural, logical, electrical, process, and other changes. The embodiments represent only a few of the possible variations. Individual components and functions are optional unless explicitly required, and the order of operations can be changed. Parts and features of some embodiments can be included or replaced by parts and features of other embodiments. Also, the words used in this application are only used to describe the embodiments and not to limit the claims. As used in the description of the embodiments and the claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. Similarly, the term "and / or" as used in this application means to include one or more associated listed items as well as all possible combinations of these. In addition, when used in this application, the term "comprise" and its variants "comprises" and / or "comprising" and the like mean the presence of the stated features, integers, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. Without more limitations, the element defined by the phrase "comprising a" does not exclude the presence of additional identical elements in the process, method, or device that includes the stated element. In this document, each embodiment focuses on the differences from other embodiments, and the same or similar parts between various embodiments can be referred to each other. For the method, product, etc. disclosed by the embodiments, if it corresponds to the method part disclosed by the embodiments, the relevant part can be referred to the description of the method part.

[0095] Those skilled in the art can understand that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. The skilled person can use different methods for each specific application to realize the described functions, but such implementation should not be considered beyond the scope of the embodiments of the present disclosure. The skilled person can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described system, device and unit can refer to the corresponding processes in the foregoing method embodiments, which will not be repeated here.

[0096] In the embodiments disclosed herein, the disclosed methods, products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the above-described device embodiments are only schematic, for example, the division of the units can only be a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other forms. The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to implement the embodiments. In addition, each functional unit in the embodiments of the present disclosure can be integrated in one processing unit, or each unit can be a physically independent unit, or two or more units can be integrated in one unit.

[0097] The computer program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other processing device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other processing device to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.

Claims

1. An application software framework based simulation system, characterized in that, The application software framework is in communication connection with the simulation platform, and the simulation system comprises a simulation manager, a simulation controller and a task group scheduler, wherein: The simulation manager is in communication connection with the simulation platform, and is configured to receive historical data and simulation time fed back by the simulation platform, and create a simulation task and a simulation controller corresponding to the simulation task according to the historical data and the simulation time; The simulation controller is configured to determine a task dependency relationship between tasks in the simulation task based on a preset task algorithm, and construct a directed acyclic graph, and control the task group scheduler to execute the simulation task according to a task execution order determined by the directed acyclic graph.

2. The simulation system of claim 1, wherein, The step of creating the simulation task and the simulation controller corresponding to the simulation task by the simulation manager according to the historical data and the simulation time comprises: adjusting the time of the historical data according to the simulation time; determining a data type and an algorithm function of the historical data, and generating the simulation task; creating the simulation controller based on the simulation task.

3. The simulation system according to claim 1, wherein: The simulation manager is further configured to receive a control signal including a serial number sent by the simulation platform, start the simulation controller, and send a completion signal fed back by the simulation controller to the simulation platform, and destroy the simulation controller which has completed the simulation task.

4. The simulation system according to claim 3, wherein: The simulation controller is further configured to update the serial number of the control signal after a task in the simulation task is completed, and feed back to the simulation platform; The simulation manager is further configured to control the simulation controller to execute a next task when the serial number of the control signal changes. The step of determining the task dependency relationship between tasks in the simulation task based on the preset task algorithm by the simulation controller, and constructing the directed acyclic graph comprises:

5. The simulation system of any one of claims 1 to 4, wherein, abstracting each algorithm task as a node of the directed acyclic graph, and defining a dependency relationship between tasks as a directed edge; recursively traversing the task dependency relationship between tasks in the simulation task by a depth-first search algorithm, and constructing the directed acyclic graph. The step of determining the task dependency relationship between tasks in the simulation task based on the preset task algorithm by the simulation controller, and constructing the directed acyclic graph further comprises:

6. The simulation system of claim 5, wherein, when the detected task dependency relationship between tasks is a circular dependency path, identifying all nodes in the circular dependency path; removing any edge in the circular dependency path to obtain the directed acyclic graph. The step of determining the task execution order according to the directed acyclic graph comprises:

7. The simulation system of any one of claims 1 to 4, wherein, according to the dependency relationship in the directed acyclic graph, executing tasks without a preceding dependency relationship in parallel through a thread pool, and executing tasks with a dependency relationship in series according to a topological order corresponding to the dependency relationship. The application software framework is in communication connection with the simulation platform, and the simulation method comprises:

8. A simulation method based on an application software framework, characterized by, receiving historical data and simulation time fed back by the simulation platform; creating a simulation task and a simulation controller corresponding to the simulation task according to the historical data and the simulation time; determining a task dependency relationship between tasks in the simulation task based on a preset task algorithm, and constructing a directed acyclic graph; executing the simulation task according to a task execution order determined by the directed acyclic graph. ​ 9. An application software framework based simulation apparatus, characterized by An application software framework-based simulation system comprising a processor and a memory having program instructions stored therein, the processor being configured to execute the program instructions to perform the application software framework-based simulation method of claim 8 when the program instructions are run.

10. A simulation system for intelligent driving software, characterized in that, comprising: an application software framework comprising the application software framework-based simulation system of any one of claims 1 to 7; and, a simulation platform communicatively connected with the application software framework, for back-feeding historical data to the application software framework, sending control signals and receiving feedback signals.