WO2022120717A1 - Simulation task scheduling method, execution method, simulation implementation method and device - Google Patents

Simulation task scheduling method, execution method, simulation implementation method and device Download PDF

Info

Publication number
WO2022120717A1
WO2022120717A1 PCT/CN2020/135262 CN2020135262W WO2022120717A1 WO 2022120717 A1 WO2022120717 A1 WO 2022120717A1 CN 2020135262 W CN2020135262 W CN 2020135262W WO 2022120717 A1 WO2022120717 A1 WO 2022120717A1
Authority
WO
WIPO (PCT)
Prior art keywords
simulation
task
software
content
node
Prior art date
Application number
PCT/CN2020/135262
Other languages
French (fr)
Chinese (zh)
Inventor
吴东保
孔翊斌
陈瑞
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN202080004954.3A priority Critical patent/CN112639734B/en
Priority to PCT/CN2020/135262 priority patent/WO2022120717A1/en
Publication of WO2022120717A1 publication Critical patent/WO2022120717A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45575Starting, stopping, suspending or resuming virtual machine instances
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5011Pool

Definitions

  • the present application relates to a simulation technology, and in particular, to a simulation task scheduling method, a simulation task execution method, a simulation implementation method, a simulation task scheduling device, a simulation task execution device, a simulation implementation device, a computing device and a storage medium.
  • simulation verification methods such as model-in-the-loop (MIL) simulation, software-in-the-loop (SIL) simulation, and hardware-in-the-loop (HIL) simulation can be used respectively.
  • MIL model-in-the-loop
  • SIL software-in-the-loop
  • HIL hardware-in-the-loop
  • simulation cloud platforms built and developed using self-developed or third-party simulation software, which are provided to external developers for access.
  • Examples include the Waymo CarCraft platform provided by Google, the Apollo Dreamland platform of Baidu, and the TAD Sim platform of Tencent.
  • This type of platform often requires the development of a complete set of mature self-developed simulation software, which requires a large investment and a long development cycle.
  • developers who access the platform they rely heavily on the self-developed simulation software provided by the platform, and it is difficult to transplant scenario use cases to other platforms.
  • simulation platforms based on a third-party simulation software have relatively simple functions, and can only be simulated and verified based on the third-party simulation software and a single type supported by the simulation software, and cannot support multiple types such as MIL, SIL, and HIL. simulation verification.
  • the present application provides a simulation task scheduling method, a simulation task execution method, a simulation implementation method, a simulation task scheduling device, a simulation task execution device, a simulation implementation device, a computing device and a storage medium, so as to support Simulate using multiple simulation software and/or support multiple simulation types.
  • a simulation task scheduling method including:
  • First content of a simulation task is defined according to the task element, and the first content includes at least one of the following: simulation type and simulation software;
  • the simulation task is scheduled to a simulation node matching the first content.
  • One possible implementation manner is that the task element input by the user can be received through a web interface or a client interface, and the defined simulation task is scheduled by the network-side platform. And it can support simultaneous input of multiple users through different user terminal-side interfaces at the same time.
  • the simulation task scheduling method can receive simulation tasks including simulation types and/or used simulation software, and send them to the simulation tasks that can process the simulation tasks.
  • the simulation type and/or the simulation node that can run the simulation software are scheduled, and the scheduling method can be scheduled to different simulation nodes according to different simulation software and different simulation types, so that in the process of simulation implementation, different simulation software, different Emulation type support. Therefore, through the definition of simulation tasks that can carry out different simulation types and simulation software, and through the mixed scheduling of corresponding different task queues, it can be used to connect simulation nodes that support different simulation types and/or simulation software, and quickly build support.
  • the scheduling of the simulation task to a simulation node matching the first content includes:
  • different task queues in at least one task queue correspond to at least one of the following: different simulation types and different simulation software.
  • One of the possible ways is to set different task queues corresponding to the first content, such as setting task queues corresponding to different simulation types, or task queues corresponding to different simulation software, or setting different types of task queues combined with different simulation software Task queue, through multiple task queues, the concurrent reception and transmission of tasks can be realized, which improves the efficiency of simulation task scheduling. Moreover, by assigning different simulation tasks to the corresponding queues, the simulation tasks can be scheduled to simulation nodes. At the time, it is not necessary to further judge the simulation type and/or simulation software of the simulation task according to the simulation task, which can further improve the scheduling efficiency of the simulation task.
  • simulation tasks When multiple simulation tasks are concurrent, they can be scheduled to different multiple simulation nodes; on the other hand, a single simulation node has multiple execution units, which can support the simultaneous execution of multiple tasks.
  • the distributed scheduling can effectively speed up the execution rate of simulation tasks and improve the utilization rate of the simulation machine, and can be used for uninterrupted batch execution of simulation tasks.
  • it in the process of simulation task scheduling, it can be automatically dispatched to low-load simulation nodes based on load balancing reception.
  • the method further includes: determining, according to registration information of at least one simulation node, the one simulation node that matches the first content; wherein the registration information includes at least one of the following: Supportable simulation types and runnable simulation software.
  • One of the possible ways is to record the registration information of each simulation node through the registry, and update the registry information when a new simulation node is added. Automatic registration of relevant information, and then can match the simulation node to which simulation task is to be scheduled according to the registration information.
  • the content of at least one of the following simulation tasks is also defined according to the task element: simulation project, control model, use case script, simulation rate, whether to display simulation animation, whether to display simulation animation or not. Save the simulation animation.
  • the content of the required simulation task can be defined as required.
  • One of the possible ways is to define it in the form of templates.
  • the simulation type is defined by one of the following information contained in the task element: model-in-the-loop simulation test MIL, software-in-the-loop simulation test SIL, processor-in-the-loop simulation test Simulation test PIL, hardware-in-the-loop simulation test HIL;
  • the simulation software is defined by the identification of the simulation software contained in the task element; the simulation project is defined by the identification of the simulation project contained in the task element; the control model is defined by the identification of the control model contained in the task element.
  • the use case script is defined by the identifier of the use case script contained in the task element.
  • this implementation can support several types of MIL, SIL, PIL, and HIL, that is, simulation tests corresponding to these four different stages, so that the present application can support different types of simulation tests.
  • a second aspect of the present application provides a simulation task execution method, including:
  • the first content of the simulation task includes at least one of the following: simulation type, simulation software;
  • the simulation task is performed by simulation software matching the first content.
  • the simulation software can execute the simulation task accordingly, especially when the simulation nodes can run multiple simulation types and/or simulation software.
  • the corresponding simulation can be run accurately in this way.
  • the simulation task further includes a simulation project, a control model or a use case script; the method further includes: acquiring a corresponding entity file for executing the simulation task from a file system.
  • the simulation task further includes a simulation rate, whether to display the simulation animation or whether to save the simulation animation.
  • the simulation task can be executed according to different contents of the simulation task, so as to realize flexible configuration when the simulation task is executed.
  • the method further includes: receiving an emulation control instruction through an emulation control port; and controlling the running of the emulation software according to the emulation control instruction.
  • an achievable way is that the user inputs the simulation control command through the interface, for example, the input of the control command is realized by controlling the control provided by the interface, and accordingly, the simulation control command is interacted with the simulation node to control the simulation in real time.
  • the operation of the simulation software on the node such as the control of the simulation running rate, pause, resume, etc., or the control of requesting process data.
  • the method further includes: acquiring simulation animation data from the simulation software, and outputting the simulation animation data through a simulation animation transmission port.
  • the simulation animation data can be obtained in real time, and output to the interface for display to the user.
  • a third aspect of the present application provides a simulation implementation method, including:
  • the complete simulation from the simulation task scheduling to the execution of the simulation task is realized, and it has the effect of any of the simulation task scheduling methods provided in the first aspect above, and has the simulation task provided in the second aspect above.
  • the effect of the executed method is realized, and it has the effect of any of the simulation task scheduling methods provided in the first aspect above, and has the simulation task provided in the second aspect above. The effect of the executed method.
  • a fourth aspect of the present application provides a simulation task scheduling device, including:
  • the receiving module is used to receive task elements
  • a processing module configured to define a first content of a simulation task according to the task element, the first content including at least one of the following: simulation type, simulation software; and for matching the simulation task to the first content
  • An emulation node scheduler for content configured to define a first content of a simulation task according to the task element, the first content including at least one of the following: simulation type, simulation software; and for matching the simulation task to the first content
  • the receiving module may receive task elements input by the user through a web interface or a client interface, and the processing module defines a simulation task and executes the scheduling. And it can support simultaneous input of multiple users through different user terminal-side interfaces at the same time.
  • the simulation task scheduling device can receive simulation tasks containing simulation types and/or used simulation software, and send the simulation tasks to the simulation tasks that can process the simulation tasks.
  • the simulation type and/or the simulation node that can run the simulation software are scheduled, and the scheduling device can be scheduled to different simulation nodes according to different simulation software and different simulation types, so that in the process of simulation implementation, different simulation software, different Emulation type support. Therefore, through the definition of simulation tasks that can carry out different simulation types and simulation software, and through the mixed scheduling of corresponding different task queues, it can be used to connect simulation nodes that support different simulation types and/or simulation software, and quickly build support.
  • the processing module is configured to: schedule to a simulation node matching the first content through a task queue corresponding to the first content of the simulation task; wherein, Different task queues in at least one task queue correspond to at least one of the following: different simulation types, different simulation software.
  • One of the possible ways is to set different task queues corresponding to the first content, such as setting task queues corresponding to different simulation types, or task queues corresponding to different simulation software, or setting different types of task queues combined with different simulation software Task queue, through multiple task queues, the concurrent reception and transmission of tasks can be realized, which improves the efficiency of simulation task scheduling.
  • different simulation tasks are allocated to the corresponding queues, which can realize the scheduling of simulation tasks. When the simulation node is reached, it is not necessary to further judge the simulation type and/or simulation software of the simulation task according to the simulation task, which can further improve the efficiency of simulation task scheduling.
  • simulation tasks When multiple simulation tasks are concurrent, they can be scheduled to different multiple simulation nodes; on the other hand, a single simulation node has multiple execution units, which can support the simultaneous execution of multiple tasks.
  • the distributed scheduling can effectively speed up the execution rate of simulation tasks and improve the utilization rate of the simulation machine, and can be used for uninterrupted batch execution of simulation tasks.
  • it in the process of simulation task scheduling, it can be automatically dispatched to low-load simulation nodes based on load balancing reception.
  • the processing module is further configured to determine, according to registration information of at least one simulation node, the one simulation node that matches the first content; wherein the registration information includes at least one simulation node One of the following: supported emulation types, runnable emulation software.
  • One of the possible ways is to record the registration information of each simulation node through the registry, and update the registry information when a new simulation node is added. Automatic registration of relevant information. Further, the processing module can match the simulation node to which the simulation task is to be dispatched accordingly.
  • the processing module is further configured to further define the content of at least one of the following of the simulation task according to the task element: simulation engineering, control model, use case script, simulation rate , Whether to display the simulation animation, whether to save the simulation animation.
  • the content of the required simulation task can be defined as required.
  • One of the possible ways is to define it in the form of templates.
  • the simulation type is defined by one of the following information contained in the task element: model-in-the-loop simulation test MIL, software-in-the-loop simulation test SIL, processor-in-the-loop simulation test Simulation test PIL, hardware-in-the-loop simulation test HIL; simulation software is defined by the identification of the simulation software included in the task element; the simulation project is defined by the identification of the simulation project included in the task element; the control The model is defined by the identifier of the control model contained in the task element; the use case script is defined by the identifier of the use case script contained in the task element.
  • this implementation can support several types of MIL, SIL, PIL, and HIL, that is, simulation tests corresponding to these four different stages, so that the present application can support different types of simulation tests.
  • a fifth aspect of the present application provides a simulation task execution device, including:
  • a receiving module configured to receive a scheduled simulation task;
  • the first content of the simulation task includes at least one of the following: simulation type and simulation software;
  • a processing module configured to execute the simulation task by using simulation software matching the first content.
  • the simulation software can execute the simulation task accordingly, especially when the simulation nodes can run multiple simulation types and/or simulation software.
  • the corresponding simulation can be run accurately in this way.
  • the simulation task further includes a simulation project, a control model or a use case script; the processing module is further configured to obtain a corresponding entity file for executing the simulation task from a file system .
  • the corresponding entity files are obtained from the file system through the processing module, which facilitates the sharing of the entity files of simulation projects, control models or use case scripts, facilitates the use of different users, and facilitates the loading and use of different simulation software.
  • the simulation task further includes the simulation rate, whether to display the simulation animation or whether to save the simulation animation.
  • the simulation task can be executed according to different contents of the simulation task, so as to realize flexible configuration when the simulation task is executed.
  • the receiving module is further configured to receive an emulation control instruction through an emulation control port; the processing module is further configured to control the running of the emulation software according to the emulation control instruction.
  • an achievable way of receiving the module is that the user inputs the simulation control command through the interface, for example, the input of the control command is realized by manipulating the control provided by the interface, and accordingly, the simulation control command is interacted with the simulation node, to Real-time control of the operation of the simulation software on the simulation node, such as control of the simulation running rate, pause, resume, etc., or control of requesting process data.
  • the apparatus further includes: a sending module, configured to acquire simulation animation data from the simulation software, and output the simulation animation data through a simulation animation transmission port.
  • the simulation animation data acquired in real time can be output to the interface and displayed to the user.
  • a sixth aspect of the present application provides a simulation implementation device, including: any of the simulation task scheduling devices provided in the fourth aspect; and the simulation task execution device provided in the fifth aspect.
  • a seventh aspect of the present application provides a computing device, comprising: a communication interface, and at least one processor; wherein the at least one processor is configured to execute program instructions, the program instructions when executed by the at least one processor causing the computing device to implement the method of any one of the first aspect above, or the program instructions, when executed by the at least one processor, cause the computing device to implement the method of any one of the second aspect above method.
  • An eighth aspect of the present application provides a computer-readable storage medium on which program instructions are stored, and when executed by a computer, the program instructions cause the computer to implement any of the methods described in the first aspect above, or, The program instructions, when executed by the computer, cause the computer to implement the method of any one of the second aspects above.
  • Type of simulation node for simulation verification specifically, has the following main characteristics:
  • High-efficiency and high-concurrency distributed simulation task scheduling supports mixed scheduling of multi-type simulation tasks, and can be used for large-scale simulation testing and verification without relying on high-performance simulators.
  • one of the technologies that embody high-efficiency scheduling is that in the process of simulation task scheduling, it can be automatically dispatched to low-load simulation nodes based on load balancing reception.
  • one of the technologies that reflects distributed high-concurrency scheduling is: when multiple simulation tasks are concurrent, they can be scheduled to different multiple simulation nodes; on the other hand, a single simulation node has multiple execution units, which can support multiple tasks at the same time. implement.
  • the distributed scheduling can effectively speed up the execution rate of simulation tasks and improve the utilization rate of the simulation machine, and can be used for uninterrupted batch execution of simulation tasks.
  • the task definition stage supports the selection of MIL/SIL/HIL and other simulation types, and the establishment of labels for simulation nodes can deal with various types of simulation tasks
  • the simulation task scheduling stage is scheduled according to the defined simulation nodes.
  • the simulation resources and execution process of the corresponding type of simulation task are arranged according to the simulation type in the execution node.
  • the real-time interactive control simulation experience can be supported, and the real-time state and result output of the simulation process can provide sufficient means for verifying simulation problems.
  • the real-time simulation interaction includes: after the simulation starts, you can view the real-time simulation animation, simulation status and log information through the platform, and send simulation control commands.
  • the simulation problem can be analyzed and located according to the simulation log and result data.
  • simulation scenarios and use case evaluation reports can be provided.
  • the platform supports multi-user login and provides user simulation resource management functions.
  • the framework supports user registration and authority management, and also supports receiving different simulation task definition task elements input by different users through different interfaces of different user terminals at the same time, so as to realize concurrent task definition.
  • the user can manage the user simulation project and the simulation scene under the project, the simulation vehicle, the simulation use case script and other resources through the interface.
  • Emulator resources are centrally managed by establishing a resource pool for unified scheduling.
  • a unified simulation entry is provided for different users. Users only need to fill in the required elements of the displayed task definition according to the interface, which shields the use details of the simulation software and reduces the cost of learning and using the simulation software.
  • Fig. 1 is the flow chart of the first embodiment of the simulation task scheduling method of the present application
  • Fig. 2 is the flow chart of the first embodiment of the simulation task execution method of the present application
  • Fig. 3 is the flow chart of the first embodiment of the simulation implementation method of the present application.
  • 6A is an interactive schematic diagram of an embodiment of the simulation task scheduling of the present application.
  • FIG. 6B is a schematic diagram of interacting with a simulation node through an interface in the present application.
  • FIG. 8 is a flowchart of a second embodiment of the simulation implementation method of the present application.
  • FIG. 9 is a flowchart of a third embodiment of the simulation implementation method of the present application.
  • FIG. 10 is a schematic diagram of the first embodiment of the simulation task scheduling apparatus of the present application.
  • FIG. 11 is a schematic diagram of the first embodiment of the simulation task execution device of the present application.
  • FIG. 12 is a schematic diagram of the first embodiment of the simulation implementation device of the present application.
  • FIG. 13 is a schematic diagram of the first embodiment of the simulation implementation system of the present application.
  • FIG. 14 is a schematic structural diagram of a computing device provided by an embodiment of the present application.
  • FIG. 15 is a flowchart of simulation task scheduling in an example of the prior art.
  • MIL Model In the Loop
  • the closed-loop test is realized at the model level, which can be understood as the simulation test of the control model (that is, the control algorithm) in the model development environment (such as Simulink), and by entering a series of test cases to verify whether the control model satisfies the design requirements.
  • the control model and the plant model (such as the vehicle model) are connected to form a closed loop, and the control model is used to control the plant model to verify whether the algorithm of the control model meets the functional requirements of the design.
  • the premise of MIL testing is to have a controlled object model, and the controlled object model can build or use an existing object model.
  • SIL Software In the Loop, software-in-the-loop simulation test.
  • Software here can be understood as code (such as C language code) automatically generated based on the above control model, but due to the reason of the code automatic generation tool itself or the code generation tool is not set correctly or other unknown reasons, the automatic code generation process may introduce some Therefore, it is necessary to verify the consistency between the automatically generated code and the control model (ie, control algorithm) in each function and behavior, which is SIL verification.
  • the basic principle is generally to use the same test case input as MIL, and check whether the output of SIL under the same test case is consistent with the output of the MIL stage. In order to test the efficiency, sometimes the controlled object model is not even connected, but the same input is made to the control model and the generated code to check whether the output is consistent, or whether the deviation between the two is within an acceptable range.
  • PIL Processor In the Loop, processor-in-the-loop simulation test. Indicates that the function implemented by the code is verified to be consistent with the model on the target processor.
  • the above SIL test is to verify the consistency of the code and the model. The code runs on a specific operating system platform. The SIL test does not guarantee that the running results of the code to the target processor can also be kept in sequence with the model, so there is a PIL test.
  • PIL refers to running the generated code on the target processor (ie, the actual controller) for testing.
  • HIL Hardware In the Loop
  • HIL hardware-in-the-loop simulation test. It means to verify whether the function implemented by the code is consistent with the requirement definition on the hardware control system.
  • HIL can be divided into three levels: ECU level, which can also be called signal level, only ECU software and hardware use physical objects, and other components of the closed-loop loop use virtual simulation systems; EPP level, which can also be called driver Level, EPP is the abbreviation of Electrical Power Package, ECU and actuators use physical objects, and other components of the closed-loop loop use virtual simulation systems;
  • System level also known as mechanical level, system components use physical objects (such as the control of the automotive motor system). circuit), and other components of the closed-loop circuit use a virtual simulation system.
  • HIC testing usually connects a controller under test with an industrial computer, which runs the model of the controlled object and simulates some electrical characteristics of the controlled object.
  • the tested controller does not know that it is connected to an industrial computer, and it will think that the connected object is a real object.
  • the simulation type is used to distinguish the types of simulation tests, such as the four types of simulation tests mentioned above: MIL, SIL, PIL, and HIL.
  • Simulation software the software used to run the simulation, in this application, including assisted/autonomous driving simulation software, such as CarMaker, PreScan, CARLA, etc.
  • Simulation software can include different programs that run different simulation types.
  • Simulation project It includes the resources required for building simulations, including simulation scenarios, simulation vehicles, simulation sensors, simulation use case scripts, etc. These resources can be pre-defined and stored in the file sharing system in the form of a pool for the execution of simulation. Loaded during the task.
  • the simulation objects in the simulation scene include environmental objects (buildings, obstacles, roads, traffic signals), weather objects, participant objects (related vehicles, pedestrians), and the like.
  • Each simulation object has its own parameters.
  • the road parameters in the environment object may include road surface adhesion coefficient, horizontal attribute, side slope attribute, concave-convex attribute, length attribute and so on.
  • the parameters of the simulated vehicle may include weight, size and shape, dynamic parameters, braking parameters, full load/light load, tire pressure, and the like.
  • the parameters of the simulated sensor may include sensor type (eg, distance sensor, speed sensor, acceleration sensor, rain sensor, etc.), location, quantity, etc. installed on the vehicle.
  • the control model that is, the control model to be verified, can also be called a control algorithm. It can be sensors, planning or vehicle control algorithms, etc.
  • Simulation task entry used to record the script name of the simulation use case to be used when running the simulation, so as to load the corresponding simulation use case script and execute the corresponding simulation process when the simulation node executes the simulation task.
  • the simulation use case is the use case used for the simulation test, and the simulation software runs the corresponding simulation process based on the series of scenarios arranged in the use case.
  • the performance test of a certain function of the vehicle when the target vehicle is in different states under different road characteristics, different operating conditions (acceleration, braking, steering, etc.) are performed to detect the vehicle stability.
  • Another example is the diagnostic test of a certain safety of a vehicle: the use case of performing fault injection under different working conditions to check whether the fault is detected.
  • Simulation nodes different simulation nodes have different identifiers, and simulation nodes may be physical or virtual servers (eg, cloud servers, or cloud hosts), computing terminals, and the like.
  • the content of the label includes the simulation type supported by the simulation node, and the desired simulation node can be selected according to the label.
  • a simulation node can contain multiple task execution units.
  • the execution unit can be a physical execution unit (for example, an execution unit composed of a core, memory, storage, etc. of a multi-core processor), or a virtual execution unit.
  • An execution unit (such as a virtual machine).
  • the task execution unit is used to execute the simulation software, and can be configured with a simulation animation transmission port to output a simulation image or video of the simulation software running, and also be configured with a simulation control port to receive control instructions to control the operation of the simulation software.
  • CarMaker an autonomous driving simulation software produced by German IPG company.
  • CarMaker is a vehicle dynamics simulation software for small passenger cars, and its application areas include advanced driver assistance systems, vehicle-related control systems, vehicle dynamics, fuel economy and hybrid vehicles.
  • the CarMaker system not only contains the necessary vehicle environment models, and I/O interfaces, but also has many advanced tools to view, control and analyze simulations and process simulation results. Simulations can also be run, controlled and analyzed using Matlab/Simulink, a tool closely coupled to CarMaker.
  • maneuvers that can be achieved in reality can be simulated, including simple maneuvers (such as braking on a straight), and complex maneuvers (a combination of shifting, braking, and turning on a curve).
  • IPGMovie integrated in CarMaker, can be used to simulate real traffic scene animation, which can be displayed on the screen for visual simulation.
  • Matlab a commercial mathematical software produced by MathWorks in the United States, can be used in data analysis, deep learning, image processing and computer vision, signal processing, control systems and other fields.
  • Simulink integrated in Matlab, is a visual simulation tool.
  • Simulink is a block diagram development environment for multi-domain simulation and model-based design. It supports system design, simulation, automatic code generation, and continuous testing and verification of embedded systems.
  • Simulink provides graphical editors, customizable block libraries, and solvers for dynamic system modeling and simulation. Simulink applications include automotive, aviation, industrial automation, large-scale modeling, complex logic, physical logic, signal processing, and more.
  • FIG. 15 shows a flowchart of a method for scheduling simulation tasks, the method includes the following steps: obtaining the number of simulation tasks of a simulation software model that need to be batch processed; The number of simulation algorithm nodes that have passed the verification; use the license to verify the equipment where the simulation algorithm nodes are located; control the equipment where the simulation algorithm nodes that have passed the verification are located to perform simulation tasks in batches.
  • the method can use multiple simulation algorithm nodes distributed on multiple devices to perform batch testing on the simulation tasks of the simulation software model, improve the simulation efficiency, and is suitable for complex situations with multiple simulation scenarios.
  • This method does not propose to support the use of multiple simulation software for scheduling, and does not propose to support the use of MIL, SIL, HIL and other simulation types for mixed scheduling, and does not propose to support the scheduling process.
  • the simulation task is defined to include a simulation type and/or simulation software, so that when the simulation task is scheduled and executed , scheduling to a simulation node that supports the simulation type and/or can run the simulation software, and executes the simulation task by using the simulation type and/or running the simulation software through the simulation node.
  • simulation tasks are defined to include simulation types and/or simulation software, and support for multiple simulation types and software is realized, so that when simulation tasks are scheduled and executed, simulation tasks can be dispatched to the support institutes. the simulation type and/or the simulation node running the simulation software.
  • this application supports the use of multiple simulation software, and supports the use of mixed scheduling of multiple simulation types such as MIL, SIL, and HIL.
  • the simulation node of the present application provides a simulation control port and a simulation animation transmission port to realize real-time interactive control of the simulation software during the execution of the simulation task, and obtain simulation animation data of the simulation software and display it to the user through the interface.
  • the simulation task scheduling method and simulation method of the present application can be used in various simulation applications, for example, in the automatic driving simulation technology of vehicles, and also in the automatic driving simulation technology of vehicles such as aircraft and ships, and can also be applied in other possible applications.
  • Automatically executed simulation applications such as the operation simulation of wind turbines, etc.
  • the present application provides a simulation task scheduling method. Referring to the flowchart shown in FIG. 1 , the first embodiment of the simulation task scheduling method of the present application is introduced, including the following steps:
  • first content of a simulation task includes at least one of the following: simulation type and simulation software.
  • simulation type includes at least one of the following: simulation type and simulation software.
  • the implementation manner of the above step S110 is: one or more interfaces may be displayed to the user, and task elements for defining a simulation task input by the user through the interface are received.
  • a client program can be used to display the interface for the user to operate.
  • Interface in some embodiments, it may be implemented in a manner based on a BS (Browser-Server, browser-server) framework, and an interface for user operation may be displayed through a web browser of a user terminal device.
  • the simulation method of the present application when implemented in a BS framework, can be implemented based on a cloud simulation service platform, the cloud simulation service platform provides a browser login page to the customer, so that the customer can browse through the executable browser.
  • devices such as computers, PADs, and mobile phones can access the cloud simulation service platform.
  • the interface display content includes content for user operation, which may be presented in a graphical user interface (GUI, Graphical User Interface), which implements the following through corresponding controls, windows, dialog boxes, etc.
  • GUI Graphical User Interface
  • the specific content displayed on the interface includes a task element selection control or a path input box control, and at least one of the following content of the simulation task is defined according to the task element: simulation type, simulation software , Simulation project, control model, use case script, simulation rate, whether to display simulation animation, whether to save simulation animation.
  • This embodiment includes at least a simulation type and/or simulation software.
  • the simulation type is defined by one of the following information contained in the task element: model-in-the-loop simulation test MIL, software-in-the-loop simulation test SIL, processor-in-the-loop simulation test PIL, hardware-in-the-loop simulation test
  • the loop simulation test HIL the simulation software is defined by the identification of the simulation software contained in the task element
  • the simulation project is defined by the identification of the simulation project contained in the task element
  • the control model is defined by the task element
  • the use case script is defined by the identifier of the use case script contained in the task element.
  • a menu bar-type selection control can be used to realize the reception of task elements corresponding to the simulation type, that is, the task elements of the corresponding simulation type are realized by receiving the MIL type, SIL type PIL, or HIL type selected by the user in the menu bar. reception. Similarly, in some embodiments, by receiving the name of the simulation software such as CarMaker, Matlab, etc. selected by the user in another menu bar, or the corresponding ID (such as the ID corresponding to the set software), etc., the simulation software is realized. The receipt of a task element.
  • the terminal display interfaces of different users can simultaneously receive the task elements input by each user through each interface, that is, the present application can support the simultaneous use of multiple users.
  • multiple items of content to be defined in the simulation task in the above step S120 may exist in the form of templates, and the template includes multiple items of content to be defined, such as simulation type items and simulation software items, which are respectively associated with each item in the interface.
  • the input corresponds to, for example, when a simulation type selected by the user from the MIL, SIL, PIL or HIL type is received through the menu bar, the specific simulation type is defined to the simulation type item; for example, the software selected by the user is received.
  • the software identification define the software identification to the simulation software item.
  • step S120 for task elements such as the identification of the simulation project, the identification of the control model, and the identification of the use case script, which are selected by the user through the operation interface and received in step S120, all of them will be defined in this step.
  • Items corresponding to simulation tasks such as corresponding simulation projects, control models, and use case script items.
  • the identification here includes name, number, designated access directory, etc.
  • the simulation rate selected by the user through the operation interface, whether to display the simulation animation, and/or whether to save the simulation animation item received through step S120 is also defined in the corresponding task.
  • this step will respectively define simulation tasks for the received task elements input by each user, that is, this application can support Simulate task-defined concurrency.
  • each task may be scheduled through a task queue, which may be: through a task corresponding to the first content of the simulation task The queue is scheduled to a simulation node matching the first content; wherein, different task queues in at least one task queue correspond to at least one of the following: different simulation types and different simulation software.
  • multiple task queues are used, and different task queues are made to correspond to different simulation types and/or different simulation software, that is, corresponding to the first content of the simulation task. Distinguish, the scheduling can be concurrent, and when the simulation task is scheduled to the simulation node, it is not necessary to judge the simulation type and/or simulation software defined by the simulation task, and the scheduling can be delivered faster.
  • corresponding MIL-type task queues, SIL-type task queues, and HIL-type task queues may be set for different simulation types.
  • different task queues can be set for different simulation software.
  • different task queues can be set for the combination of simulation type and simulation software.
  • the defined simulation tasks are distributed to the corresponding task queues according to their defined simulation types and/or simulation software;
  • the simulation tasks in each task queue are sequentially scheduled to simulation nodes that can support corresponding simulation types and/or can run corresponding simulation software.
  • a task queue is used, and each simulation task is scheduled to each simulation node in a first-in, first-out manner.
  • the simulation type and/or simulation software defined by the simulation task is first determined, and then the The simulation tasks are dispatched to simulation nodes that can handle the simulation type and/or can run the simulation software.
  • multiple task queues are used to sequentially receive and distribute simulation tasks, so as to facilitate concurrent scheduling of tasks and speed up the scheduling process.
  • the simulation types and/or runnable simulation software that each simulation node can support may be recorded in advance, and during scheduling, the simulation tasks are scheduled according to the recorded information, and the simulation tasks are scheduled. to the corresponding simulation node.
  • the one emulation node matching the first content may be determined according to the registration information of at least one emulation node, so as to schedule the emulation task to the corresponding emulation node; wherein the registration information includes at least the following One: Supportable simulation types and runnable simulation software.
  • the implementation manner of registering the simulation type and/or executable simulation software that the simulation node can support into the registry as the registration information of the simulation node may be, when the simulation node has installed one or more simulation software , the name of each installed simulation software and each simulation type supported by each simulation software may be uploaded as registration information to record in the registry.
  • the registry can also be replaced by a configuration file, which can also implement pre-recording of the emulation types and/or runnable emulation software that each emulation node can support.
  • the The information exchange is performed to obtain the simulation types and/or runnable simulation software that each simulation node can support, and then select a simulation node that can execute the defined simulation task for simulation task scheduling.
  • information exchange or the simulation task request directly carries the supported simulation type and/or executable simulation software of the simulation node. , and obtain the simulation type and/or runnable simulation software that the simulation node can support, and schedule the tasks in the corresponding task queue to the node.
  • the running status of each simulation node may also be obtained, where the running status includes node load capacity, such as the maximum number of execution units that support scheduling, or the number of available execution units; execute the scheduling At the same time, the scheduling is also controlled based on the load balancing strategy according to the running state of each simulation node.
  • node load capacity such as the maximum number of execution units that support scheduling, or the number of available execution units
  • the present application also provides a simulation task execution method. Referring to the flowchart shown in FIG. 2 , the first embodiment of the simulation scheduling method of the present application is introduced, including the following steps:
  • S210 Receive a scheduled simulation task; the received first content of the simulation task at least includes a simulation type and simulation software;
  • a simulation task defined with a simulation type and/or simulation software is scheduled to a corresponding simulation node, and the scheduled simulation task is received through the simulation node, and the simulation node can support The simulation type and/or the simulation software may be run.
  • the simulation task When executing the simulation task, specifically, the simulation task may be analyzed by a simulation node, and the simulation type and/or the simulation may be run according to the simulation type and/or simulation software contained in the first content. Software performs the simulation task.
  • only a simulation type is defined in a simulation task, and the simulation node executes the simulation task of the simulation type by using the simulation software on the simulation node that supports the simulation type. If there are multiple simulation softwares that support this simulation type on the simulation node, you can choose one to use.
  • only simulation software is defined in the simulation task, and the simulation node uses the simulation software it has to execute the simulation task;
  • only a simulation type and simulation software are defined in a simulation task, and the simulation node executes the simulation task of the simulation type by using the simulation software on the simulation node that supports the simulation type.
  • the entity files of the simulation project, control model or use case script stored in the file system may be obtained for executing the simulation The entity file of the task. This facilitates the sharing of simulation projects, control models, or use case script entity files.
  • the simulation task is executed according to the simulation rate further included in the simulation task, whether to display the simulation animation or whether to save the simulation animation.
  • the simulation control command input by the user through the interface in step S110 can be received through the simulation control port of the simulation node; and the simulation software running on the simulation node is controlled according to the simulation control command. In this way, the control of the operation of the simulation software is realized.
  • the simulation animation data can be obtained from the simulation software on the simulation node through the simulation node, and output to the interface described in step S110 through the simulation animation transmission port of the simulation node. In this way, the simulation animation generated by the simulation software can be displayed to the user through the interface.
  • the present application also provides a simulation implementation method, which is composed of a combination of the above simulation task scheduling method and simulation task implementation method with reference to the flowchart shown in FIG. 3 .
  • a simulation implementation method which is composed of a combination of the above simulation task scheduling method and simulation task implementation method with reference to the flowchart shown in FIG. 3 .
  • some other examples are also used for introduction, and these examples can also be applied to the above-mentioned methods.
  • Simulation task scheduling method and simulation task realization method includes the following steps:
  • the task elements of the simulation software, simulation project, control model, and use case script received in this step do not refer to entity files (entity files refer to files containing specific content, such as simulation software containing codes), but
  • entity files refer to files containing specific content, such as simulation software containing codes
  • the identifier corresponding to the entity file can obtain the corresponding entity file according to the identifier.
  • Physical files can be stored in a shared file system, examples are as follows:
  • the above simulation project and each simulation resource under it can be pre-configured, and the above-mentioned existing control model and use case script can be pre-established.
  • the user can perform corresponding operations through an interface provided by a web browser to achieve Configuration or upload of simulation project and its underlying simulation resources, establishment or upload of each control model, establishment or upload of each use case script.
  • Uploading here refers to uploading to a shared file system, and it can exist in the form of a pool, such as a simulation resource pool composed of various simulation resources, a simulation engineering resource pool composed of various simulation engineering resources, and a control model composed of various control models.
  • Each use case script constitutes a use case script pool.
  • the sub-elements under the task element can also be received, such as the project name (that is, the logo of the simulation project), etc.
  • the project name corresponds to one of the simulation resources to be used under the simulation project. configuration information.
  • the simulation resources may include simulation scene resources, simulation vehicle resources, simulation sensor resources, and the like.
  • various resource parameters selected or input by the user can be received through a certain display interface to complete the creation of simulation resources.
  • each simulation resource after each simulation resource is created, it can be stored as a configuration file.
  • the simulation resources of the simulation scene include simulation resources such as "rainy loop scene A resource configuration file”, “rainy weather loop scene B resource configuration file”, etc.
  • the resource parameters of the simulation scene such as road parameters, weather parameters, obstacle parameters, etc.
  • a simulated vehicle resource may be a "seven-seat SUV vehicle C resource configuration file”, and the simulated resource records various resource parameters that form the simulated vehicle, such as vehicle weight parameters, power parameters, tire pressure parameters, and the like.
  • a certain simulated sensor resource may be a "vehicle distance sensor A resource configuration file", which records various resource parameters that form the simulated sensor, such as sensor model, installation location, and quantity parameters.
  • the configuration information corresponding to a project name includes at least one simulation resource.
  • S320 Define a simulation task according to the received task element.
  • a simulation project when defining a simulation project, it also includes defining the relevant task elements of the selected simulation software under the selected simulation type. These task elements are the definitions required by the selected simulation software to perform the selected type of simulation tasks. These task elements are also in the step In S310, it is received through the interface.
  • the definitions of the relevant task elements are, for example: the definition of the controlled object model and the model development environment required for running the simulation in the MIL type; the definition of the SIL executable program required for running the simulation in the SIL type; the HIL type. Definition of the HIL real-time machine (IP, user name, execution parameters) and the definition of the HIL executable program to be executed by the real-time machine;
  • defining a simulation type item specifically refers to defining the name or loading path of the control model.
  • the control model can be a pre-established algorithm model, such as an automatic driving algorithm model.
  • the definition use case script item specifically defines the use case script name to the simulation task entry, and the simulation task entry refers to the entry for executing the automated simulation use case.
  • one of the specific implementations of this step in this embodiment may adopt the following sub-steps:
  • each simulation node registers the configuration information of each simulation node to the simulation task scheduling system (such as a cloud platform, a server and other network-side devices), and configure each simulation node according to the simulation type supported by each simulation node label and recorded in the registration information. And, corresponding to different simulation types, different task queues are created;
  • the simulation task scheduling system such as a cloud platform, a server and other network-side devices
  • the scheduling process may further include: acquiring the running status of each simulation node (for example, the load capacity, that is, the maximum load of the computing node (the maximum number of execution units that supports scheduling)); and performing the scheduling according to each simulation node.
  • the running state of the scheduler controls the schedule.
  • the implementation can be one of the following:
  • each simulation node after registration starts a scheduling agent (Agent) program, and feeds back the load status of the node (number of scheduled execution units/maximum load) in real time through the scheduling Agent program on the simulation node.
  • Agent scheduling agent
  • the Agent of the simulation node After receiving the simulation task sent by the simulation task scheduling system, the Agent of the simulation node starts the execution unit to execute the task;
  • the second method on the basis of the first method, the scheme of the simulation node actively requesting simulation task scheduling is further added. Specifically, when the simulation node judges whether its load reaches the limit value, if it does not reach the limit value, it can send a request to the simulation node according to the node label.
  • the simulation task scheduling system requests tasks of a corresponding type of task queue; during simulation task scheduling, the simulation node to be scheduled is selected from the simulation nodes that have received the request.
  • this step may include: constructing a simulation process according to the definition in the simulation task through the simulation node, calling and running the defined simulation software, and converting the defined entities of the simulation project, control model and use case script The files are loaded into the simulation software to cause the simulation software to perform simulation tasks of the simulation type.
  • An implementation method of this step is shown as follows, referring to the flowchart of the following steps performed by the execution unit in the schematic diagram shown in FIG. 4 :
  • S353 Call the simulation software on the simulation node to execute the determined simulation process.
  • the simulation software running process will carry the simulation project entity files, control model entity files, and use case script entity files required for the simulation.
  • the user can interact in real time with the simulation node that executes the simulation task, and when performing simulation control or acquiring simulation animation, the implementation can be as follows:
  • each simulation task When the defined simulation tasks are received, each simulation task will be assigned a task ID to distinguish each simulation task.
  • the task ID will be provided to the simulation node at the same time (or the simulation node will get the task ID when requesting a simulation task).
  • the simulation node can obtain the relevant data (node IP, simulation status, simulation control and animation transmission port, etc.)
  • the real-time interaction steps shown in FIG. 6B may be adopted, including:
  • the IP address of the corresponding simulation node processing the task can be obtained according to the task ID of the task;
  • the real-time simulation API is called to send the simulation control command to the simulation node, and the real-time simulation API sends the simulation control command to the simulation control port of the simulation node of the IP address.
  • the simulation control instructions include: pause, abort, continue, request data, request simulation state and animation and other instructions, and the simulation node can execute corresponding instructions or feed back data.
  • the real-time simulation API when requesting real-time animation, it can be specifically: calling the real-time simulation API to request real-time simulation animation according to the IP address of the simulation node and the simulation animation transmission port, and the API monitors the simulation animation transmission port of the simulation node with the IP address, and obtains the information sent by the simulation software. Simulate animation, and send real-time animation back to the user interface (such as browser interface) to display to the user.
  • the simulation animation transmission port data is acquired by the execution unit in real time from the simulation software.
  • FIG. 7 is a schematic diagram of a first specific embodiment of the simulation implementation method.
  • the simulation software adopts CarMaker
  • the development environment adopts Matlab.
  • the embodiment includes the following steps:
  • S710 The user logs in to the page through a browser, and the login process includes an authentication process for the user. After the authentication is passed, a first interface can be displayed through the browser, and the first interface has controls for the user to click or input. Input the task elements required to execute the simulation task, and receive the task elements submitted by the user through the browser interface.
  • the simulation tasks are defined according to the received task elements, and the resulting task definitions are as follows:
  • Simulation task type - MIL [corresponding to the simulation task type selected by the user]
  • Simulation software - CarMaker [corresponding to the name of the simulation software selected by the user]
  • Simulation task entry - MIL use case TCL script [corresponding to the name of the use case script selected by the user, the use case script is the use case script of the MIL type simulation task written in TCL language]
  • S720 According to the task type MIL in the simulation task, distribute the simulation task to the task queue corresponding to the simulation task type, and schedule the simulation task to the task queue according to the load situation of the corresponding simulation nodes and based on the load balancing strategy.
  • a simulation node of the MIL task type is dispatched to a simulation node with a label of MIL type and capable of running the CarMaker software.
  • the simulation node parses the defined simulation task through its idle execution unit, and determines the needs according to the MIL simulation type in the task definition, the simulation software CarMaker, the simulation project, the control model, and the MIL use case TCL script corresponding to the simulation task entry
  • the simulation process executed by the execution unit is executed, and the executed simulation process includes the following sub-steps:
  • the real-time interaction with the simulation node through the platform can be realized through the simulation control port and the simulation animation transmission port through the real-time simulation API.
  • the simulation results are stored in the shared file system.
  • FIG. 8 is a schematic diagram of a second specific embodiment of the simulation implementation method.
  • the simulation software adopts CarMaker, and the SIL simulation type simulation is to be performed, and the main difference from the MIL type simulation shown in FIG. 7 is described above. It is that the formed task definition is generated based on the SIL type, and the simulation task executed by the simulation node is for the flow of the SIL simulation type. The differences are briefly described as follows:
  • step S810 Basically the same as the above step S710, the main difference is that the tasks formed in this step are defined as follows:
  • Simulation task type - SIL [corresponding to the simulation task type selected by the user]
  • Simulation software - CarMaker [corresponding to the name of the simulation software selected by the user]
  • Simulation task entry - SIL use case TCL script [corresponding to the name of the use case script selected by the user, the use case script is the use case script of the SIL type simulation task written in TCL language]
  • step S820 It is basically the same as the above-mentioned step S720, and will not be repeated.
  • step S830 It is basically the same as the above step S730, the difference is that the simulation flow of the SIL type is executed, and the flow includes the following sub-steps:
  • the real-time interaction with the simulation node through the platform can be realized through the simulation control port and the simulation animation transmission port through the real-time simulation API.
  • the simulation results are stored in the shared file system.
  • step S810 when the task is defined in step S810, the CarMaker engineering framework code is changed to the SIL executable program name, then step S832 is not required, and the SIL executable program in step 833 is obtained from the file system according to the SIL executable program name. obtained from. That is, the SIL executable program can be compiled and stored separately in advance.
  • FIG. 9 is a schematic diagram of a second specific embodiment of the simulation implementation method.
  • the simulation software adopts CarMaker, and the simulation of the HIL simulation type is to be performed.
  • the main difference with the MIL type simulation shown in FIG. 7 above is It is that the formed task definition is generated based on the SIL type, and the simulation task executed by the simulation node is for the flow of the SIL simulation type. The differences are briefly described as follows:
  • step S910 Basically the same as the above step S710, the main difference is that the tasks formed in this step are defined as follows:
  • Simulation task type - HIL [corresponding to the simulation task type selected by the user]
  • Simulation software - CarMaker [corresponding to the name of the simulation software selected by the user]
  • HIL real-time machine [corresponding to the IP address of the real-time machine (such as industrial computer) input by the user for HIL simulation]
  • Simulation task entry - HIL use case TCL script [corresponding to the name of the use case script selected by the user, the use case script is the use case script of the HIL type simulation task written in TCL language]
  • step S920 It is basically the same as the above-mentioned step S720, and will not be repeated.
  • step S930 It is basically the same as the above-mentioned step S730, except that the simulation flow of the SIL type is executed, and the flow includes the following sub-steps:
  • S934 start the generated HIL executable program on the real-time machine, and connect it to CarMaker; that is, to realize the communication between the HIL executable program on the real-time machine and the process running by CarMaker;
  • the real-time interaction with the simulation software of the simulation node through the platform can be realized through the real-time simulation API through the simulation control port and the simulation animation transmission port.
  • the simulation results are stored in the shared file system.
  • step S932 when the task definition in step S910 is changed to the name of the HIL executable program in the CarMaker engineering framework code, step S932 is not required, and the HIL executable program in step 933 is obtained from the file system according to the name of the HIL executable program. obtained from. That is, the HIL executable program can be compiled and stored separately in advance.
  • the present application can support various simulation types. It can also be seen that the task definition requires only a few elements, and these elements can be obtained through the interface provided to the user. It can be seen that for the user, the specific internal situation of the simulation software does not need to be related, and the relevant resources can be input through the interface or Select, when the simulation node needs resources, it will be obtained from the file system, and each resource exists in the form of a pool, which can eliminate the need for users to rewrite and create each engineering resource, control model, and controlled model to a certain extent. Reduced labor.
  • FIG. 10 shows the first embodiment of the simulation task scheduling apparatus, and the simulation task scheduling apparatus includes:
  • a receiving module 1010 configured to receive a task element, the task element
  • the processing module 1020 is configured to define first content of a simulation task according to the task element, where the first content includes at least one of the following: simulation type and simulation software. In some embodiments, and for scheduling the simulation task to a simulation node matching the first content.
  • the processing module 1020 is further configured to define at least one of the following content of the simulation task according to the task element: simulation project, control model, use case script, simulation rate, whether to display simulation animation, and whether to save simulation animation.
  • the above-mentioned simulation type is defined by one of the following information contained in the task element: model-in-the-loop simulation test MIL, software-in-the-loop simulation test SIL, processor-in-the-loop simulation test PIL, and hardware-in-the-loop simulation test HIL.
  • the simulation software is defined by the identification of the simulation software contained in the task element;
  • the simulation project is defined by the identification of the simulation project contained in the task element;
  • the control model is defined by the identification of the control model contained in the task element.
  • the use case script is defined by the identifier of the use case script contained in the task element.
  • the processing module is configured to: through a task queue corresponding to the first content of the simulation task, schedule to a simulation node matching the first content; wherein, at least one task queue in the Different task queues correspond to at least one of the following: different simulation types and different simulation software.
  • the processing module 1020 is further configured to determine, according to registration information of at least one simulation node, the one simulation node that matches the first content; wherein the registration information includes at least one of the following: Supported simulation types and runnable simulation software.
  • FIG. 11 shows an embodiment of a simulation task execution apparatus, and the simulation task execution apparatus includes:
  • a receiving module 1110 configured to receive a scheduled simulation task; the first content of the simulation task includes at least one of the following: simulation type and simulation software;
  • the processing module 1120 is configured to perform the simulation task by using simulation software matching the first content.
  • the simulation task further includes a simulation project, a control model or a use case script; the processing module 1120 is further configured to obtain a corresponding entity file for executing the simulation task from a file system.
  • the simulation task further includes the simulation rate, whether to display the simulation animation or whether to save the simulation animation.
  • the receiving module 1110 is further configured to receive an emulation control instruction through an emulation control port; the processing module 1120 is further configured to control the running of the emulation software according to the emulation control instruction.
  • the apparatus further includes: a sending module 1130, configured to acquire simulation animation data from the simulation software, and output the simulation animation data through a simulation animation transmission port.
  • a sending module 1130 configured to acquire simulation animation data from the simulation software, and output the simulation animation data through a simulation animation transmission port.
  • FIG. 12 shows an embodiment of a simulation implementation apparatus, including any embodiment of the above-mentioned simulation scheduling apparatus and any embodiment of the above-mentioned simulation task execution apparatus.
  • FIG. 13 shows a specific embodiment of the simulation implementation device of the present invention, which is used for vehicle automatic driving simulation.
  • the user terminal's browser displays an interface for logging in, that is, an operation provided to the user, and the interface is correspondingly displayed to the user in a task template mode and used to receive required task elements input by the user.
  • Multiple simulation nodes form a simulation node cluster, each simulation node has multiple execution units, and each simulation node has simulation software.
  • the defined simulation tasks are assigned to task queues of different simulation types, and scheduled to simulation nodes that can process the task type.
  • the simulation node implements calling its idle execution unit to generate and execute the simulation process, for example, calling the uppermost execution unit shown in the diagram.
  • simulation result data As well as project entity files, control model entity files, use case script entity files, etc. Users can interact with simulation nodes in real time through the user terminal browser, send commands or receive simulation animations, and obtain simulation result data from the shared file system.
  • FIG. 14 is a schematic structural diagram of a computing device 1500 provided by an embodiment of the present application.
  • the computing device 1500 includes a processor 1510 and a communication interface 1530 .
  • the communication interface 1530 in the computing device 1500 shown in FIG. 14 may be used to communicate with other devices.
  • the computing device 1500 may further include a memory 1520 connected to the processor 1510 .
  • the memory 1520 may be used to store the program codes and data. Therefore, the memory 1520 may be a storage unit inside the processor 1510 , or an external storage unit independent from the processor 1510 , or may include a storage unit inside the processor 1510 and an external storage unit independent from the processor 1510 . part.
  • computing device 1500 may also include a bus.
  • the memory 1520 and the communication interface 1530 may be connected to the processor 1510 through a bus.
  • the bus may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus or the like.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry Standard Architecture
  • the bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one line is shown in FIG. 14, but it does not mean that there is only one bus or one type of bus.
  • the processor 1510 may adopt a central processing unit (central processing unit, CPU).
  • the processor may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • DSPs digital signal processors
  • ASICs application specific integrated circuits
  • FPGAs off-the-shelf programmable gate arrays
  • a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the processor 1510 uses one or more integrated circuits to execute related programs to implement the technical solutions provided by the embodiments of the present application.
  • the memory 1520 may include read only memory and random access memory and provides instructions and data to the processor 1510 .
  • a portion of the processor 1510 may also include non-volatile random access memory.
  • the processor 1510 may also store device type information.
  • the processor 1510 executes the computer-implemented instructions in the memory 1520 to perform the operation steps of the above-described method.
  • the computing device 1500 may correspond to corresponding subjects in executing the methods according to the various embodiments of the present application, and the above-mentioned and other operations and/or functions of the modules in the computing device 1500 are respectively for the purpose of realizing the present application.
  • the corresponding processes of each method in the embodiment will not be repeated here.
  • the disclosed system, apparatus and method may be implemented in other manners.
  • the apparatus embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the functions, if implemented in the form of software functional units and sold or used as independent products, may be stored in a computer-readable storage medium.
  • the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution.
  • the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program codes .
  • Embodiments of the present application further provide a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, is used to execute a method for generating diverse problems, and the method includes the methods described in the foregoing embodiments. at least one of the options.
  • the computer storage medium of the embodiments of the present application may adopt any combination of one or more computer-readable media.
  • the computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium.
  • the computer readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination of the above.
  • a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a propagated data signal in baseband or as part of a carrier wave, with computer-readable program code embodied thereon. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device .
  • Program code embodied on a computer readable medium may be transmitted using any suitable medium including, but not limited to, wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
  • Computer program code for performing the operations of the present application may be written in one or more programming languages, including object-oriented programming languages—such as Java, Smalltalk, C++, but also conventional Procedural programming language - such as the "C" language or similar programming language.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server.
  • the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or wide area network (WAN), or may be connected to an external computer (eg, through the Internet using an Internet service provider) connect).
  • LAN local area network
  • WAN wide area network
  • Internet service provider an external computer

Abstract

A simulation task scheduling method comprises: receiving a task element; defining a simulation task according to the task element, the simulation task being defined with first content comprising at least one of the following: a simulation type and simulation software; and scheduling the simulation task to a simulation node matching the first content. Also provided is a corresponding simulation task execution method, comprising: receiving a scheduled simulation task by means of a simulation node; and executing, by means of the simulation node, the simulation task by using simulation software matching first content. Different simulation types and different simulation software can be supported. The present invention can be applied to the self-driving simulation technology for transportation tools such as vehicles, aircrafts, and ships.

Description

仿真任务调度方法、执行方法、仿真实现方法及装置Simulation task scheduling method, execution method, simulation implementation method and device 技术领域technical field
本申请涉及一种仿真技术,尤其涉及一种仿真任务调度方法、仿真任务执行方法、仿真实现方法、仿真任务调度装置、仿真任务执行装置、仿真实现装置、计算设备及存储介质。The present application relates to a simulation technology, and in particular, to a simulation task scheduling method, a simulation task execution method, a simulation implementation method, a simulation task scheduling device, a simulation task execution device, a simulation implementation device, a computing device and a storage medium.
背景技术Background technique
随着自动驾驶领域控制算法研究和场景应用的快速发展,实现自动驾驶的控制系统的安全性和稳定性要求日益具体,而这需要大量测试加以验证。对自动驾驶功能的验证方法很多,其中通过仿真进行验证占有重要的比例,通过借助仿真进行大量测试验证工作可以节省成本、时间。其中,在自动驾驶控制模型的不同研发阶段,可以分别使用模型在环(MIL)仿真、软件在环(SIL)仿真、硬件在环(HIL)仿真等类型的仿真验证方法。With the rapid development of control algorithm research and scenario applications in the field of autonomous driving, the safety and stability requirements of the control system for autonomous driving are becoming more and more specific, and this requires a large number of tests to verify. There are many verification methods for autonomous driving functions, among which the verification through simulation occupies an important proportion, and the cost and time can be saved by conducting a large number of test and verification work with the help of simulation. Among them, in different development stages of the autonomous driving control model, simulation verification methods such as model-in-the-loop (MIL) simulation, software-in-the-loop (SIL) simulation, and hardware-in-the-loop (HIL) simulation can be used respectively.
当前有很多商用和开源的自动驾驶仿真软件,每种仿真软件所擅长的领域不尽相同,比如动力学仿真,场景仿真,传感器仿真等。多数软件也提供了开放的API接口。在自动驾驶领域仿真多数的还是依赖单机版仿真软件。单机版仿真软件存在的最大缺陷是受限于硬件资源难以进行规模化仿真验证。然而,对自动驾驶功能的充分验证需建立在大规模仿真场景以及大量的仿真测试里程基础上,因此考虑采用规模化调度仿真极为重要。At present, there are many commercial and open source autonomous driving simulation software, and each simulation software is good at different fields, such as dynamics simulation, scene simulation, sensor simulation, etc. Most software also provides an open API interface. Most simulations in the field of autonomous driving still rely on single-machine simulation software. The biggest defect of the stand-alone version of the simulation software is that it is difficult to perform large-scale simulation verification due to limited hardware resources. However, the full verification of autonomous driving functions needs to be based on large-scale simulation scenarios and a large number of simulation test miles, so it is extremely important to consider the use of large-scale scheduling simulation.
当前也有利用自研或者第三方仿真软件搭建开发的仿真云平台,提供给外部开发者接入。例如括谷歌公司提供的Waymo CarCraft平台,百度公司的Apollo Dreamland平台,腾讯公司的TAD Sim平台等。这一类平台往往需要开发成套成熟的自研仿真软件,投入大且开发周期长。对于接入平台的开发者而言,对平台提供的自研仿真软件依赖较大,场景用例难以移植到其他平台。At present, there are also simulation cloud platforms built and developed using self-developed or third-party simulation software, which are provided to external developers for access. Examples include the Waymo CarCraft platform provided by Google, the Apollo Dreamland platform of Baidu, and the TAD Sim platform of Tencent. This type of platform often requires the development of a complete set of mature self-developed simulation software, which requires a large investment and a long development cycle. For developers who access the platform, they rely heavily on the self-developed simulation software provided by the platform, and it is difficult to transplant scenario use cases to other platforms.
另外,部分基于某第三方仿真软件做的仿真平台的功能比较单一,只能基于该第三方仿真软件及该仿真软件所支持的单一类型进行仿真验证,无法支持MIL、SIL、HIL等多种类型的仿真验证。In addition, some simulation platforms based on a third-party simulation software have relatively simple functions, and can only be simulated and verified based on the third-party simulation software and a single type supported by the simulation software, and cannot support multiple types such as MIL, SIL, and HIL. simulation verification.
有鉴于此,有待提供一种能够支持使用多种仿真软件、支持多种仿真类型进行仿真验证的技术方案。In view of this, there is a need to provide a technical solution that can support the use of multiple simulation software and multiple simulation types for simulation verification.
发明内容SUMMARY OF THE INVENTION
鉴于现有技术的以上问题,本申请提供一种仿真任务调度方法、仿真任务执行方法、仿真实现方法、仿真任务调度装置、仿真任务执行装置、仿真实现装置、计算设备及存储介质,以能支持使用多种仿真软件和/或支持多种仿真类型进行仿真。In view of the above problems in the prior art, the present application provides a simulation task scheduling method, a simulation task execution method, a simulation implementation method, a simulation task scheduling device, a simulation task execution device, a simulation implementation device, a computing device and a storage medium, so as to support Simulate using multiple simulation software and/or support multiple simulation types.
为达到上述目的,本申请第一方面提供了一种仿真任务调度方法,包括:In order to achieve the above purpose, a first aspect of the present application provides a simulation task scheduling method, including:
接收任务元素;receive task element;
根据所述任务元素定义一仿真任务的第一内容,所述第一内容包括至少以下之一:仿真类型、仿真软件;First content of a simulation task is defined according to the task element, and the first content includes at least one of the following: simulation type and simulation software;
将所述仿真任务向匹配所述第一内容的一仿真节点调度。The simulation task is scheduled to a simulation node matching the first content.
其中一种可能的实现方式是,可以通过web界面,或客户端界面的方式接收用户输入的任务元素,所定义的仿真任务由网络侧平台执行所述调度。并且可支持多个用户同时通过不同的用户终端侧的界面的同时输入。One possible implementation manner is that the task element input by the user can be received through a web interface or a client interface, and the defined simulation task is scheduled by the network-side platform. And it can support simultaneous input of multiple users through different user terminal-side interfaces at the same time.
当设置有多个可处理不同仿真类型和/或可运行不同仿真软件的仿真节点时,通过该仿真任务调度方法,可以接收含有仿真类型和/或所用仿真软件的仿真任务,并向可处理该仿真类型和/或可运行该仿真软件的仿真节点进行调度,该调度方法可根据不同仿真软件不同仿真类型调度到不同的仿真节点,从而实现了在仿真实现的过程中,对不同仿真软件、不同仿真类型支持。从而,通过所述可进行不同仿真类型、仿真软件的仿真任务定义,和通过对应的不同任务队列的混合调度,可用于将支持不同仿真类型和/或仿真软件的仿真节点接入,快速搭建支持多种仿真软件,支持不同类型的仿真系统。When there are multiple simulation nodes that can process different simulation types and/or can run different simulation software, the simulation task scheduling method can receive simulation tasks including simulation types and/or used simulation software, and send them to the simulation tasks that can process the simulation tasks. The simulation type and/or the simulation node that can run the simulation software are scheduled, and the scheduling method can be scheduled to different simulation nodes according to different simulation software and different simulation types, so that in the process of simulation implementation, different simulation software, different Emulation type support. Therefore, through the definition of simulation tasks that can carry out different simulation types and simulation software, and through the mixed scheduling of corresponding different task queues, it can be used to connect simulation nodes that support different simulation types and/or simulation software, and quickly build support. A variety of simulation software to support different types of simulation systems.
作为第一方面的一种可能的实现方式,所述将所述仿真任务向匹配所述第一内容的一仿真节点调度包括:As a possible implementation manner of the first aspect, the scheduling of the simulation task to a simulation node matching the first content includes:
通过与所述仿真任务的第一内容对应的一任务队列,向匹配所述第一内容的一仿真节点调度;scheduling to a simulation node matching the first content through a task queue corresponding to the first content of the simulation task;
其中,至少一个任务队列中的不同的任务队列对应至少以下之一:不同的仿真类型、不同的仿真软件。Wherein, different task queues in at least one task queue correspond to at least one of the following: different simulation types and different simulation software.
其中一种可实现的方式是,设置对应第一内容的不同的任务队列,如设置对应不同的仿真类型的任务队列,或对应不同仿真软件的任务队列,或设置不同类型与不同仿真软件结合的任务队列,通过多个任务队列可以实现任务的并发接收和并发发送,提高了仿真任务调度效率,并且,通过将不同的仿真任务分配到对应的队列上,可以实现在将仿真任务调度到仿真节点时,不需要进一步根据仿真任务判断仿真任务的仿真类型和/或仿真软件,可进一步提高仿真任务调度效率。多个仿真任务并发时,可调度到不同的多个仿真节点;另一方面,单个仿真节点具有多个执行单元,可支持多个任务同时执行。该分布式调度可以有效加快仿真任务执行速率并提高仿真机利用率,可用于不间断地批量执行仿真任务。并且,仿真任务调度过程中可基于负载均衡收到,自动调度到低负载仿真节点。One of the possible ways is to set different task queues corresponding to the first content, such as setting task queues corresponding to different simulation types, or task queues corresponding to different simulation software, or setting different types of task queues combined with different simulation software Task queue, through multiple task queues, the concurrent reception and transmission of tasks can be realized, which improves the efficiency of simulation task scheduling. Moreover, by assigning different simulation tasks to the corresponding queues, the simulation tasks can be scheduled to simulation nodes. At the time, it is not necessary to further judge the simulation type and/or simulation software of the simulation task according to the simulation task, which can further improve the scheduling efficiency of the simulation task. When multiple simulation tasks are concurrent, they can be scheduled to different multiple simulation nodes; on the other hand, a single simulation node has multiple execution units, which can support the simultaneous execution of multiple tasks. The distributed scheduling can effectively speed up the execution rate of simulation tasks and improve the utilization rate of the simulation machine, and can be used for uninterrupted batch execution of simulation tasks. In addition, in the process of simulation task scheduling, it can be automatically dispatched to low-load simulation nodes based on load balancing reception.
作为第一方面的一种可能的实现方式,还包括:根据至少一个仿真节点的注册信息,确定匹配所述第一内容的所述一仿真节点;其中,所述注册信息包括至少以下之一:可支持的仿真类型、可运行的仿真软件。As a possible implementation manner of the first aspect, the method further includes: determining, according to registration information of at least one simulation node, the one simulation node that matches the first content; wherein the registration information includes at least one of the following: Supportable simulation types and runnable simulation software.
其中一种可实现的方式是,通过注册表记录各仿真节点的注册信息,并当有新仿真节点加入时更新注册表信息,通过注册信息的方式,可实现只要有新仿真节点的加入,即将相关信息的自动注册,进而可根据注册信息去匹配出要向哪个仿真节点调度仿真任务。One of the possible ways is to record the registration information of each simulation node through the registry, and update the registry information when a new simulation node is added. Automatic registration of relevant information, and then can match the simulation node to which simulation task is to be scheduled according to the registration information.
作为第一方面的一种可能的实现方式:根据所述任务元素还定义所述一仿真任务的至少以下之一的内容:仿真工程、控制模型、用例脚本、仿真速率、是否显示仿真 动画、是否保存仿真动画。As a possible implementation manner of the first aspect: the content of at least one of the following simulation tasks is also defined according to the task element: simulation project, control model, use case script, simulation rate, whether to display simulation animation, whether to display simulation animation or not. Save the simulation animation.
由上,通过该方式,可以根据需要去定义所需要的仿真任务的内容。其中一种可实现的方式,是通过模板的方式进行定义。From the above, in this way, the content of the required simulation task can be defined as required. One of the possible ways is to define it in the form of templates.
作为第一方面的一种可能的实现方式:所述仿真类型通过所述任务元素中包含的以下信息中的一个进行定义:模型在环仿真测试MIL、软件在环仿真测试SIL、处理器在环仿真测试PIL、硬件在环仿真测试HIL;As a possible implementation manner of the first aspect: the simulation type is defined by one of the following information contained in the task element: model-in-the-loop simulation test MIL, software-in-the-loop simulation test SIL, processor-in-the-loop simulation test Simulation test PIL, hardware-in-the-loop simulation test HIL;
仿真软件通过所述任务元素中包含的仿真软件的标识进行定义;所述仿真工程通过所述任务元素中包含的仿真工程的标识进行定义;所述控制模型通过所述任务元素中包含控制模型的标识进行定义;所述用例脚本通过所述任务元素中包含的用例脚本的标识进行定义。The simulation software is defined by the identification of the simulation software contained in the task element; the simulation project is defined by the identification of the simulation project contained in the task element; the control model is defined by the identification of the control model contained in the task element. The use case script is defined by the identifier of the use case script contained in the task element.
由上,该实现方式可支持MIL、SIL、PIL、HIL几种,即对应到这四个不同阶段的仿真测试,使得本申请可支持不同类型的仿真测试。From the above, this implementation can support several types of MIL, SIL, PIL, and HIL, that is, simulation tests corresponding to these four different stages, so that the present application can support different types of simulation tests.
本申请第二方面提供了一种仿真任务执行方法,包括:A second aspect of the present application provides a simulation task execution method, including:
接收调度的仿真任务;所述仿真任务的第一内容包括至少以下之一:仿真类型、仿真软件;receiving a scheduled simulation task; the first content of the simulation task includes at least one of the following: simulation type, simulation software;
通过匹配所述第一内容的仿真软件执行所述仿真任务。The simulation task is performed by simulation software matching the first content.
由上,由于调度时的仿真任务的第一内容包括有仿真类型和/或所用仿真软件,因此,仿真软件可据此执行仿真任务即可,尤其当仿真节点上可运行多种仿真类型和/或多种仿真软件时,通过该方式可以准确运行相应的仿真。From the above, since the first content of the simulation task during scheduling includes the simulation type and/or the simulation software used, the simulation software can execute the simulation task accordingly, especially when the simulation nodes can run multiple simulation types and/or simulation software. When using or multiple simulation software, the corresponding simulation can be run accurately in this way.
作为第二方面的一种可能的实现方式,所述仿真任务还包括仿真工程、控制模型或用例脚本;所述方法还包括:从文件系统获取对应的用于执行所述仿真任务的实体文件。As a possible implementation manner of the second aspect, the simulation task further includes a simulation project, a control model or a use case script; the method further includes: acquiring a corresponding entity file for executing the simulation task from a file system.
由上,通过文件系统存储,这样便于实现仿真工程、控制模型或用例脚本实体文件的共享,便于不同用户的使用,也便于不同仿真软件的加载使用。From the above, through the file system storage, it is convenient to realize the sharing of simulation projects, control models or use case script entity files, which is convenient for different users to use, and it is also convenient for loading and using different simulation software.
作为第二方面的一种可能的实现方式,所述仿真任务还包括仿真速率、是否显示仿真动画或是否保存仿真动画。As a possible implementation manner of the second aspect, the simulation task further includes a simulation rate, whether to display the simulation animation or whether to save the simulation animation.
由上可以根据仿真任务不同内容,执行所述仿真任务,实现仿真任务执行时的灵活配置。From the above, the simulation task can be executed according to different contents of the simulation task, so as to realize flexible configuration when the simulation task is executed.
作为第二方面的一种可能的实现方式,所述方法还包括:通过仿真控制端口接收仿真控制指令;根据所述仿真控制指令控制所述仿真软件的运行。As a possible implementation manner of the second aspect, the method further includes: receiving an emulation control instruction through an emulation control port; and controlling the running of the emulation software according to the emulation control instruction.
其中,一种可实现的方式是,用户通过界面输入仿真控制指令,例如通过界面提供的控件进行操控的方式实现控制指令的输入,据此与仿真节点进行仿真控制指令的交互,以实时控制仿真节点上的仿真软件的运行,如进行仿真运行速率、暂停、继续等控制,或请求过程数据的控制。Among them, an achievable way is that the user inputs the simulation control command through the interface, for example, the input of the control command is realized by controlling the control provided by the interface, and accordingly, the simulation control command is interacted with the simulation node to control the simulation in real time. The operation of the simulation software on the node, such as the control of the simulation running rate, pause, resume, etc., or the control of requesting process data.
作为第二方面的一种可能的实现方式,所述方法还包括:从所述仿真软件获取仿真动画数据,并通过仿真动画传输端口输出所述仿真动画数据。As a possible implementation manner of the second aspect, the method further includes: acquiring simulation animation data from the simulation software, and outputting the simulation animation data through a simulation animation transmission port.
由上,可实现实时获取仿真动画数据,并输出到界面显示给用户。From the above, the simulation animation data can be obtained in real time, and output to the interface for display to the user.
本申请第三方面提供了一种仿真实现方法,包括:A third aspect of the present application provides a simulation implementation method, including:
上述第一方面提供的任一所述仿真任务调度的方法;和Any of the methods for scheduling simulation tasks provided in the first aspect above; and
上述第二方面提供的任一所述仿真任务执行的方法。The method for executing any one of the simulation tasks provided in the second aspect above.
由上,实现了从仿真任务调度到仿真任务的执行的完整的仿真,具备上述第一方面提供的任一所述仿真任务调度的方法的效果,以及具备上述第二方面提供的所述仿真任务执行的方法的效果。From the above, the complete simulation from the simulation task scheduling to the execution of the simulation task is realized, and it has the effect of any of the simulation task scheduling methods provided in the first aspect above, and has the simulation task provided in the second aspect above. The effect of the executed method.
本申请第四方面提供了一种仿真任务调度装置,包括:A fourth aspect of the present application provides a simulation task scheduling device, including:
接收模块,用于接收任务元素;The receiving module is used to receive task elements;
处理模块,用于根据所述任务元素定义一仿真任务的第一内容,所述第一内容包括至少以下之一:仿真类型、仿真软件;以及用于将所述仿真任务向匹配所述第一内容的一仿真节点调度。a processing module, configured to define a first content of a simulation task according to the task element, the first content including at least one of the following: simulation type, simulation software; and for matching the simulation task to the first content An emulation node scheduler for content.
其中一种可能的实现方式是,接收模块可以通过web界面,或客户端界面的方式接收用户输入的任务元素,处理模块定义仿真任务,并执行所述调度。并且可支持多个用户同时通过不同的用户终端侧的界面的同时输入。One possible implementation is that the receiving module may receive task elements input by the user through a web interface or a client interface, and the processing module defines a simulation task and executes the scheduling. And it can support simultaneous input of multiple users through different user terminal-side interfaces at the same time.
当设置有多个可处理不同仿真类型和/或可运行不同仿真软件的仿真节点时,通过该仿真任务调度装置,可以接收含有仿真类型和/或所用仿真软件的仿真任务,并向可处理该仿真类型和/或可运行该仿真软件的仿真节点进行调度,该调度装置可根据不同仿真软件不同仿真类型调度到不同的仿真节点,从而实现了在仿真实现的过程中,对不同仿真软件、不同仿真类型支持。从而,通过所述可进行不同仿真类型、仿真软件的仿真任务定义,和通过对应的不同任务队列的混合调度,可用于将支持不同仿真类型和/或仿真软件的仿真节点接入,快速搭建支持多种仿真软件,支持不同类型的仿真系统。When there are multiple simulation nodes that can process different simulation types and/or can run different simulation software, the simulation task scheduling device can receive simulation tasks containing simulation types and/or used simulation software, and send the simulation tasks to the simulation tasks that can process the simulation tasks. The simulation type and/or the simulation node that can run the simulation software are scheduled, and the scheduling device can be scheduled to different simulation nodes according to different simulation software and different simulation types, so that in the process of simulation implementation, different simulation software, different Emulation type support. Therefore, through the definition of simulation tasks that can carry out different simulation types and simulation software, and through the mixed scheduling of corresponding different task queues, it can be used to connect simulation nodes that support different simulation types and/or simulation software, and quickly build support. A variety of simulation software to support different types of simulation systems.
作为第四方面的一种可能的实现方式,所述处理模块用于:通过与所述仿真任务的第一内容对应的一任务队列,向匹配所述第一内容的一仿真节点调度;其中,至少一个任务队列中的不同的任务队列对应至少以下之一:不同的仿真类型、不同的仿真软件。As a possible implementation manner of the fourth aspect, the processing module is configured to: schedule to a simulation node matching the first content through a task queue corresponding to the first content of the simulation task; wherein, Different task queues in at least one task queue correspond to at least one of the following: different simulation types, different simulation software.
其中一种可实现的方式是,设置对应第一内容的不同的任务队列,如设置对应不同的仿真类型的任务队列,或对应不同仿真软件的任务队列,或设置不同类型与不同仿真软件结合的任务队列,通过多个任务队列可以实现任务的并发接收和并发发送,提高了仿真任务调度效率,并且,通过处理模块,将不同的仿真任务分配到对应的队列上,可以实现在将仿真任务调度到仿真节点时,不需要进一步根据仿真任务判断仿真任务的仿真类型和/或仿真软件,可进一步提高仿真任务调度效率。多个仿真任务并发时,可调度到不同的多个仿真节点;另一方面,单个仿真节点具有多个执行单元,可支持多个任务同时执行。该分布式调度可以有效加快仿真任务执行速率并提高仿真机利用率,可用于不间断地批量执行仿真任务。并且,仿真任务调度过程中可基于负载均衡收到,自动调度到低负载仿真节点。One of the possible ways is to set different task queues corresponding to the first content, such as setting task queues corresponding to different simulation types, or task queues corresponding to different simulation software, or setting different types of task queues combined with different simulation software Task queue, through multiple task queues, the concurrent reception and transmission of tasks can be realized, which improves the efficiency of simulation task scheduling. Moreover, through the processing module, different simulation tasks are allocated to the corresponding queues, which can realize the scheduling of simulation tasks. When the simulation node is reached, it is not necessary to further judge the simulation type and/or simulation software of the simulation task according to the simulation task, which can further improve the efficiency of simulation task scheduling. When multiple simulation tasks are concurrent, they can be scheduled to different multiple simulation nodes; on the other hand, a single simulation node has multiple execution units, which can support the simultaneous execution of multiple tasks. The distributed scheduling can effectively speed up the execution rate of simulation tasks and improve the utilization rate of the simulation machine, and can be used for uninterrupted batch execution of simulation tasks. In addition, in the process of simulation task scheduling, it can be automatically dispatched to low-load simulation nodes based on load balancing reception.
作为第四方面的一种可能的实现方式,所述处理模块还用于根据至少一个仿真节点的注册信息,确定匹配所述第一内容的所述一仿真节点;其中,所述注册信息包括至少以下之一:可支持的仿真类型、可运行的仿真软件。As a possible implementation manner of the fourth aspect, the processing module is further configured to determine, according to registration information of at least one simulation node, the one simulation node that matches the first content; wherein the registration information includes at least one simulation node One of the following: supported emulation types, runnable emulation software.
其中一种可实现的方式是,通过注册表记录各仿真节点的注册信息,并当有新仿真节点加入时更新注册表信息,通过注册信息的方式,可实现只要有新仿真节点的加 入,即将相关信息的自动注册。进而,处理模块可据此去匹配出要向哪个仿真节点调度仿真任务。One of the possible ways is to record the registration information of each simulation node through the registry, and update the registry information when a new simulation node is added. Automatic registration of relevant information. Further, the processing module can match the simulation node to which the simulation task is to be dispatched accordingly.
作为第四方面的一种可能的实现方式,所述处理模块还用于根据所述任务元素还定义所述一仿真任务的至少以下之一的内容:仿真工程、控制模型、用例脚本、仿真速率、是否显示仿真动画、是否保存仿真动画。As a possible implementation manner of the fourth aspect, the processing module is further configured to further define the content of at least one of the following of the simulation task according to the task element: simulation engineering, control model, use case script, simulation rate , Whether to display the simulation animation, whether to save the simulation animation.
由上,通过该方式,可以根据需要去定义所需要的仿真任务的内容。其中一种可实现的方式,是通过模板的方式进行定义。From the above, in this way, the content of the required simulation task can be defined as required. One of the possible ways is to define it in the form of templates.
作为第四方面的一种可能的实现方式,所述仿真类型通过所述任务元素中包含的以下信息中的一个进行定义:模型在环仿真测试MIL、软件在环仿真测试SIL、处理器在环仿真测试PIL、硬件在环仿真测试HIL;仿真软件通过所述任务元素中包含的仿真软件的标识进行定义;所述仿真工程通过所述任务元素中包含的仿真工程的标识进行定义;所述控制模型通过所述任务元素中包含控制模型的标识进行定义;所述用例脚本通过所述任务元素中包含的用例脚本的标识进行定义。As a possible implementation manner of the fourth aspect, the simulation type is defined by one of the following information contained in the task element: model-in-the-loop simulation test MIL, software-in-the-loop simulation test SIL, processor-in-the-loop simulation test Simulation test PIL, hardware-in-the-loop simulation test HIL; simulation software is defined by the identification of the simulation software included in the task element; the simulation project is defined by the identification of the simulation project included in the task element; the control The model is defined by the identifier of the control model contained in the task element; the use case script is defined by the identifier of the use case script contained in the task element.
由上,该实现方式可支持MIL、SIL、PIL、HIL几种,即对应到这四个不同阶段的仿真测试,使得本申请可支持不同类型的仿真测试。From the above, this implementation can support several types of MIL, SIL, PIL, and HIL, that is, simulation tests corresponding to these four different stages, so that the present application can support different types of simulation tests.
本申请第五方面提供了一种仿真任务执行装置,包括:A fifth aspect of the present application provides a simulation task execution device, including:
接收模块,用于接收调度的仿真任务;所述仿真任务的第一内容包括至少以下之一:仿真类型、仿真软件;a receiving module, configured to receive a scheduled simulation task; the first content of the simulation task includes at least one of the following: simulation type and simulation software;
处理模块,用于通过匹配所述第一内容的仿真软件执行所述仿真任务。A processing module, configured to execute the simulation task by using simulation software matching the first content.
由上,由于调度时的仿真任务的第一内容包括有仿真类型和/或所用仿真软件,因此,仿真软件可据此执行仿真任务即可,尤其当仿真节点上可运行多种仿真类型和/或多种仿真软件时,通过该方式可以准确运行相应的仿真。From the above, since the first content of the simulation task during scheduling includes the simulation type and/or the simulation software used, the simulation software can execute the simulation task accordingly, especially when the simulation nodes can run multiple simulation types and/or simulation software. When using or multiple simulation software, the corresponding simulation can be run accurately in this way.
作为第五方面的一种可能的实现方式,所述仿真任务还包括仿真工程、控制模型或用例脚本;所述处理模块还用于从文件系统获取对应的用于执行所述仿真任务的实体文件。As a possible implementation manner of the fifth aspect, the simulation task further includes a simulation project, a control model or a use case script; the processing module is further configured to obtain a corresponding entity file for executing the simulation task from a file system .
由上,通过处理模块从文件系统获取相应的实体文件,这样便于实现仿真工程、控制模型或用例脚本实体文件的共享,便于不同用户的使用,也便于不同仿真软件的加载使用。From the above, the corresponding entity files are obtained from the file system through the processing module, which facilitates the sharing of the entity files of simulation projects, control models or use case scripts, facilitates the use of different users, and facilitates the loading and use of different simulation software.
作为第五方面的一种可能的实现方式,所述仿真任务还包括的仿真速率、是否显示仿真动画或是否保存仿真动画。As a possible implementation manner of the fifth aspect, the simulation task further includes the simulation rate, whether to display the simulation animation or whether to save the simulation animation.
由上可以根据仿真任务不同内容,执行所述仿真任务,实现仿真任务执行时的灵活配置。From the above, the simulation task can be executed according to different contents of the simulation task, so as to realize flexible configuration when the simulation task is executed.
作为第五方面的一种可能的实现方式,所述接收模块还用于通过仿真控制端口接收仿真控制指令;所述处理模块还用于根据所述仿真控制指令控制所述仿真软件的运行。As a possible implementation manner of the fifth aspect, the receiving module is further configured to receive an emulation control instruction through an emulation control port; the processing module is further configured to control the running of the emulation software according to the emulation control instruction.
其中,接收模块的一种可实现的方式是,用户通过界面输入仿真控制指令,例如通过界面提供的控件进行操控的方式实现控制指令的输入,据此与仿真节点进行仿真控制指令的交互,以实时控制仿真节点上的仿真软件的运行,如进行仿真运行速率、暂停、继续等控制,或请求过程数据的控制。Among them, an achievable way of receiving the module is that the user inputs the simulation control command through the interface, for example, the input of the control command is realized by manipulating the control provided by the interface, and accordingly, the simulation control command is interacted with the simulation node, to Real-time control of the operation of the simulation software on the simulation node, such as control of the simulation running rate, pause, resume, etc., or control of requesting process data.
作为第五方面的一种可能的实现方式,所述装置还包括:发送模块,用于从所述仿真软件获取仿真动画数据,并通过仿真动画传输端口输出所述仿真动画数据。As a possible implementation manner of the fifth aspect, the apparatus further includes: a sending module, configured to acquire simulation animation data from the simulation software, and output the simulation animation data through a simulation animation transmission port.
由上,通过该发送模块,可实现将实时获取的仿真动画数据输出到界面显示给用户。From the above, through the sending module, the simulation animation data acquired in real time can be output to the interface and displayed to the user.
本申请第六方面提供了一种仿真实现装置,包括:上述第四方面提供的任一所述仿真任务调度装置;和上述第五方面提供的所述仿真任务执行装置。A sixth aspect of the present application provides a simulation implementation device, including: any of the simulation task scheduling devices provided in the fourth aspect; and the simulation task execution device provided in the fifth aspect.
由上,实现了从仿真任务调度到仿真任务的执行的完整的仿真,具备上述第四方面提供的任一所述仿真任务调度的装置的效果,以及具备上述第五方面提供的所述仿真任务执行的装置的效果。From the above, a complete simulation from the simulation task scheduling to the execution of the simulation task is realized, with the effects of any of the simulation task scheduling devices provided in the fourth aspect above, and the simulation task provided in the fifth aspect above. The effect of the implemented device.
本申请第七方面提供了一种计算设备,包括:通信接口,以及至少一个处理器;其中,所述至少一个处理器用于执行程序指令,所述程序指令当被所述至少一个处理器执行时使得所述计算设备实现上述第一方面的任一所述的方法,或者,所述程序指令当被所述至少一个处理器执行时使得所述计算设备实现上述第二方面的任一所述的方法。A seventh aspect of the present application provides a computing device, comprising: a communication interface, and at least one processor; wherein the at least one processor is configured to execute program instructions, the program instructions when executed by the at least one processor causing the computing device to implement the method of any one of the first aspect above, or the program instructions, when executed by the at least one processor, cause the computing device to implement the method of any one of the second aspect above method.
本申请第八方面提供了一种计算机可读存储介质,其上存储有程序指令,所述程序指令当被计算机执行时使得所述计算机实现上述第一方面的任一所述的方法,或者,所述程序指令当被所述计算机执行时使得所述计算机实现上述第二方面的任一所述的方法。An eighth aspect of the present application provides a computer-readable storage medium on which program instructions are stored, and when executed by a computer, the program instructions cause the computer to implement any of the methods described in the first aspect above, or, The program instructions, when executed by the computer, cause the computer to implement the method of any one of the second aspects above.
综上,本申请提供的上述技术方案,通过所述可进行不同仿真类型、仿真软件的仿真任务定义,和通过对应的不同任务队列的混合调度,可用于快速搭建支持多种仿真软件,支持不同类型进行仿真验证的仿真节点,具体来说,具有以下主要特点:In summary, the above technical solutions provided in this application can be used to quickly build and support a variety of simulation software through the definition of simulation tasks of different simulation types and simulation software, and through the mixed scheduling of corresponding different task queues. Type of simulation node for simulation verification, specifically, has the following main characteristics:
1)高效率高并发分布式仿真任务调度,支持多类型仿真任务混合调度,可以用于规模化的仿真测试和验证,不需要依赖高性能仿真机。1) High-efficiency and high-concurrency distributed simulation task scheduling, supports mixed scheduling of multi-type simulation tasks, and can be used for large-scale simulation testing and verification without relying on high-performance simulators.
其中,体现高效率调度的技术之一在于,仿真任务调度过程中可基于负载均衡收到,自动调度到低负载仿真节点。Among them, one of the technologies that embody high-efficiency scheduling is that in the process of simulation task scheduling, it can be automatically dispatched to low-load simulation nodes based on load balancing reception.
其中,体现分布式高并发调度的技术之一在于:多个仿真任务并发时,可调度到不同的多个仿真节点;另一方面,单个仿真节点具有多个执行单元,可支持多个任务同时执行。该分布式调度可以有效加快仿真任务执行速率并提高仿真机利用率,可用于不间断地批量执行仿真任务。Among them, one of the technologies that reflects distributed high-concurrency scheduling is: when multiple simulation tasks are concurrent, they can be scheduled to different multiple simulation nodes; on the other hand, a single simulation node has multiple execution units, which can support multiple tasks at the same time. implement. The distributed scheduling can effectively speed up the execution rate of simulation tasks and improve the utilization rate of the simulation machine, and can be used for uninterrupted batch execution of simulation tasks.
其中,体现多类型任务的技术之一在于:任务定义阶段支持选择MIL/SIL/HIL及其他仿真类型,对仿真节点建立标签可以应对多种类型仿真任务,仿真任务调度阶段根据已定义仿真节点调度到对应仿真节点,任务执行阶段在执行节点根据仿真类型编排对应类型仿真任务的仿真资源和执行流程。Among them, one of the technologies that embody multi-type tasks is: the task definition stage supports the selection of MIL/SIL/HIL and other simulation types, and the establishment of labels for simulation nodes can deal with various types of simulation tasks, and the simulation task scheduling stage is scheduled according to the defined simulation nodes. To the corresponding simulation node, in the task execution stage, the simulation resources and execution process of the corresponding type of simulation task are arranged according to the simulation type in the execution node.
2)通过仿真节点提供的仿真控制端口、仿真动画传输端口支持在线实时仿真交互。2) Online real-time simulation interaction is supported through simulation control ports and simulation animation transmission ports provided by simulation nodes.
基于此,可以支持实时交互控制仿真体验,仿真过程实时状态和结果输出可提供充分的仿真问题验证手段。Based on this, the real-time interactive control simulation experience can be supported, and the real-time state and result output of the simulation process can provide sufficient means for verifying simulation problems.
并且实时仿真交互包括:仿真开始执行后可以通过平台查看实时仿真动画,仿真状态和日志等信息,并发送仿真控制指令。And the real-time simulation interaction includes: after the simulation starts, you can view the real-time simulation animation, simulation status and log information through the platform, and send simulation control commands.
3)通过仿真运行结果数据的输出,如存储到文件系统,可以基于此进一步实现对提供仿真问题定位手段和用例结果评价的支持。3) Through the output of simulation operation result data, such as storage to the file system, the support for providing simulation problem location means and use case result evaluation can be further realized based on this.
例如,仿真运行完成后可根据仿真日志和结果数据进行仿真问题分析定位。For example, after the simulation is completed, the simulation problem can be analyzed and located according to the simulation log and result data.
又如,可以提供仿真场景及用例评价报告。For another example, simulation scenarios and use case evaluation reports can be provided.
4)平台支持多用户登录,并提供用户仿真资源管理功能。4) The platform supports multi-user login and provides user simulation resource management functions.
例如,支持用户注册及权限管理,也支持同时通过不同用户终端的不同界面接收不同用户输入的不同的仿真任务定义的任务元素,以实现并发任务定义。For example, it supports user registration and authority management, and also supports receiving different simulation task definition task elements input by different users through different interfaces of different user terminals at the same time, so as to realize concurrent task definition.
又如,用户可以通过界面管理用户仿真工程及工程下的仿真场景,仿真车辆,仿真用例脚本等资源。通过建立资源池统一调度的方式集中管理仿真机资源。For another example, the user can manage the user simulation project and the simulation scene under the project, the simulation vehicle, the simulation use case script and other resources through the interface. Emulator resources are centrally managed by establishing a resource pool for unified scheduling.
并且,为不同的用户提供统一的仿真入口,用户只需要根据界面填写所显示的任务定义所需元素即可,屏蔽了仿真软件使用细节,降低仿真软件的学习使用成本。In addition, a unified simulation entry is provided for different users. Users only need to fill in the required elements of the displayed task definition according to the interface, which shields the use details of the simulation software and reduces the cost of learning and using the simulation software.
本申请的这些和其它方面在以下(多个)实施例的描述中会更加简明易懂。These and other aspects of the present application will be more clearly understood in the following description of the embodiment(s).
附图说明Description of drawings
以下参照附图来进一步说明本申请的各个特征和各个特征之间的联系。附图均为示例性的,一些特征并不以实际比例示出,并且一些附图中可能省略了本申请所涉及领域的惯常的且对于本申请非必要的特征,或是额外示出了对于本申请非必要的特征,附图所示的各个特征的组合并不用以限制本申请。另外,在本说明书全文中,相同的附图标记所指代的内容也是相同的。具体的附图说明如下:The various features of the present application and the connections between the various features are further explained below with reference to the accompanying drawings. The drawings are exemplary, some features are not shown to scale, and some of the drawings may omit features that are customary in the field to which the application relates and not essential to the application, or additionally show The non-essential features of the present application, and the combination of individual features shown in the drawings are not intended to limit the present application. In addition, the same reference numerals refer to the same contents throughout the present specification. The specific drawings are described as follows:
图1是本申请仿真任务调度方法的第一实施例的流程图;Fig. 1 is the flow chart of the first embodiment of the simulation task scheduling method of the present application;
图2是本申请仿真任务执行方法的第一实施例的流程图;Fig. 2 is the flow chart of the first embodiment of the simulation task execution method of the present application;
图3是本申请仿真实现方法的第一实施例的流程图;Fig. 3 is the flow chart of the first embodiment of the simulation implementation method of the present application;
图4是本申请仿真实现方法的第一实施例的交互示意图;4 is an interactive schematic diagram of the first embodiment of the simulation implementation method of the present application;
图5是本申请仿真任务调度的一实施方式的流程图;5 is a flowchart of an embodiment of the simulation task scheduling of the present application;
图6A是本申请仿真任务调度的一实施方式的交互示意图;6A is an interactive schematic diagram of an embodiment of the simulation task scheduling of the present application;
图6B是本申请中通过界面与仿真节点进行交互的示意图;FIG. 6B is a schematic diagram of interacting with a simulation node through an interface in the present application;
图7是本申请仿真实现方法的第一实施方式的流程图;7 is a flowchart of the first embodiment of the simulation implementation method of the present application;
图8是本申请仿真实现方法的第二实施方式的流程图;8 is a flowchart of a second embodiment of the simulation implementation method of the present application;
图9是本申请仿真实现方法的第三实施方式的流程图;9 is a flowchart of a third embodiment of the simulation implementation method of the present application;
图10是本申请仿真任务调度装置的第一实施例的示意图;10 is a schematic diagram of the first embodiment of the simulation task scheduling apparatus of the present application;
图11是本申请仿真任务执行装置的第一实施例的示意图;11 is a schematic diagram of the first embodiment of the simulation task execution device of the present application;
图12是本申请仿真实现装置的第一实施例的示意图;FIG. 12 is a schematic diagram of the first embodiment of the simulation implementation device of the present application;
图13是本申请仿真实现系统的第一实施方式的示意图;13 is a schematic diagram of the first embodiment of the simulation implementation system of the present application;
图14是本申请实施例提供的一种计算设备的结构性示意性图;FIG. 14 is a schematic structural diagram of a computing device provided by an embodiment of the present application;
图15是现有技术一示例的仿真任务调度流程图。FIG. 15 is a flowchart of simulation task scheduling in an example of the prior art.
具体实施方式Detailed ways
说明书和权利要求书中的词语“第一、第二、第三等”或模块A、模块B、模块C等类似用语,仅用于区别类似的对象,不代表针对对象的特定排序,可以理解地, 在允许的情况下可以互换特定的顺序或先后次序,以使这里描述的本申请实施例能够以除了在这里图示或描述的以外的顺序实施。The words "first, second, third, etc." in the description and claims, or similar terms such as module A, module B, module C, etc., are only used to distinguish similar objects, and do not represent a specific ordering of objects, which can be understood Indeed, where permitted, the specific order or sequence may be interchanged to enable the embodiments of the application described herein to be practiced in sequences other than those illustrated or described herein.
在以下的描述中,所涉及的表示步骤的标号,如S110、S120……等,并不表示一定会按此步骤执行,在允许的情况下可以互换前后步骤的顺序,或同时执行。In the following description, the reference numerals representing steps, such as S110, S120, etc., do not necessarily mean that this step will be performed, and the order of the preceding and following steps may be interchanged or performed simultaneously if permitted.
说明书和权利要求书中使用的术语“包括”不应解释为限制于其后列出的内容;它不排除其它的元件或步骤。因此,其应当诠释为指定所提到的所述特征、整体、步骤或部件的存在,但并不排除存在或添加一个或更多其它特征、整体、步骤或部件及其组群。因此,表述“包括装置A和B的设备”不应局限为仅由部件A和B组成的设备。The term "comprising" used in the description and claims should not be interpreted as being limited to what is listed thereafter; it does not exclude other elements or steps. Accordingly, it should be interpreted as specifying the presence of said features, integers, steps or components mentioned, but not excluding the presence or addition of one or more other features, integers, steps or components and groups thereof. Therefore, the expression "apparatus comprising means A and B" should not be limited to apparatuses consisting of parts A and B only.
本说明书中提到的“一个实施例”或“实施例”意味着与该实施例结合描述的特定特征、结构或特性包括在本申请的至少一个实施例中。因此,在本说明书各处出现的用语“在一个实施例中”或“在实施例中”并不一定都指同一实施例,但可以指同一实施例。此外,在一个或多个实施例中,能够以任何适当的方式组合各特定特征、结构或特性,如从本公开对本领域的普通技术人员显而易见的那样。Reference in this specification to "one embodiment" or "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the present application. Thus, the appearances of the terms "in one embodiment" or "in an embodiment" in various places in this specification are not necessarily all referring to the same embodiment, but can refer to the same embodiment. Furthermore, the particular features, structures or characteristics can be combined in any suitable manner, as would be apparent to one of ordinary skill in the art from this disclosure, in one or more embodiments.
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。如有不一致,以本说明书中所说明的含义或者根据本说明书中记载的内容得出的含义为准。另外,本文中所使用的术语只是为了描述本申请实施例的目的,不是旨在限制本申请。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field to which this application belongs. If there is any inconsistency, the meaning described in this specification or the meaning derived from the content described in this specification shall prevail. In addition, the terms used herein are only for the purpose of describing the embodiments of the present application, and are not intended to limit the present application.
为了准确地对本申请中的技术内容进行叙述,以及为了准确地理解本申请,在对具体实施方式进行说明之前先对本说明书中所使用的术语给出如下的解释说明或定义。In order to accurately describe the technical content of the present application and to accurately understand the present application, the following explanations or definitions are given to the terms used in the present specification before the specific embodiments are described.
MIL,Model In the Loop,模型在环仿真测试。表示在模型层面上实现闭环测试,可以理解为对控制模型(即控制算法)在模型的开发环境下(如Simulink)进行仿真测试,通过输入一系列的测试用例,验证控制模型是否满足了设计的功能需求。MIL中,将控制模型和被控对象模型(如车辆模型)连起来形成闭环,使用控制模型控制被控对象模型,以验证该控制模型的算法是否满足设计的功能需求。MIL测试的前提是需有被控对象模型,被控对象模型可搭建或使用现有的对象模型。MIL, Model In the Loop, model-in-the-loop simulation test. Indicates that the closed-loop test is realized at the model level, which can be understood as the simulation test of the control model (that is, the control algorithm) in the model development environment (such as Simulink), and by entering a series of test cases to verify whether the control model satisfies the design requirements. Functional Requirements. In MIL, the control model and the plant model (such as the vehicle model) are connected to form a closed loop, and the control model is used to control the plant model to verify whether the algorithm of the control model meets the functional requirements of the design. The premise of MIL testing is to have a controlled object model, and the controlled object model can build or use an existing object model.
SIL,Software In the Loop,软件在环仿真测试。这里的Software可理解为基于上述控制模型自动生成的代码(如C语言代码),但是由于代码自动生成工具本身的原因或者代码生成工具没有正确设置或者其他未知原因,自动生成代码过程可能会引入一些错误,因此需要验证自动生成的代码与控制模型(即控制算法)在各功能、行为上的一致性,即为SIL验证。其基本原则一般是使用与MIL相同的测试用例输入,查看对于相同的测试用例下SIL的输出是否与MIL阶段的输出一致。为了测试的高效性,有时甚至不接入被控对象模型,而是对控制模型和生成代码进行相同的输入,查看输出是否一致,或二者的偏差是否在可接受的范围之内。SIL, Software In the Loop, software-in-the-loop simulation test. Software here can be understood as code (such as C language code) automatically generated based on the above control model, but due to the reason of the code automatic generation tool itself or the code generation tool is not set correctly or other unknown reasons, the automatic code generation process may introduce some Therefore, it is necessary to verify the consistency between the automatically generated code and the control model (ie, control algorithm) in each function and behavior, which is SIL verification. The basic principle is generally to use the same test case input as MIL, and check whether the output of SIL under the same test case is consistent with the output of the MIL stage. In order to test the efficiency, sometimes the controlled object model is not even connected, but the same input is made to the control model and the generated code to check whether the output is consistent, or whether the deviation between the two is within an acceptable range.
PIL,Processor In the Loop,处理器在环仿真测试。表示在目标处理器上验证代码实现的功能是否与模型一致。上述SIL测试是验证代码与模型的一致性,代码运行在特定操作系统平台上,SIL测试并不能保证代码到目标处理器上的运行结果也能和模型保持依次,故有了PIL测试。PIL是指将生成的代码运行到目标处理器上(即实 际控制器上)进行测试。PIL, Processor In the Loop, processor-in-the-loop simulation test. Indicates that the function implemented by the code is verified to be consistent with the model on the target processor. The above SIL test is to verify the consistency of the code and the model. The code runs on a specific operating system platform. The SIL test does not guarantee that the running results of the code to the target processor can also be kept in sequence with the model, so there is a PIL test. PIL refers to running the generated code on the target processor (ie, the actual controller) for testing.
HIL,Hardware In the Loop,硬件在环仿真测试。表示在硬件控制系统上验证代码实现的功能是否与需求定义一致。一般来说HIL可以分为三个层级:ECU级,也可以称之为信号级,仅仅ECU软硬件采用实物,闭环回路的其他组成部分均采用虚拟仿真系统;EPP级,也可以称之为驱动级,EPP是Electrical Power Package的缩写,ECU及执行机构采用实物,闭环回路的其他组成部分采用虚拟仿真系统;System级,也可以称之为机械级,系统组件采用实物(如汽车电机系统的控制电路),闭环回路的其他组成部分采用虚拟仿真系统。HIC测试通常将一被测控制器和工控机相连,工控机运行被控对象的模型,且模拟出被控对象的一些电气特性。在HIL场景下,被测试的控制器并不知道与其相连的是一台工控机,其会认为所连接的是真实的实物对象。HIL, Hardware In the Loop, hardware-in-the-loop simulation test. It means to verify whether the function implemented by the code is consistent with the requirement definition on the hardware control system. Generally speaking, HIL can be divided into three levels: ECU level, which can also be called signal level, only ECU software and hardware use physical objects, and other components of the closed-loop loop use virtual simulation systems; EPP level, which can also be called driver Level, EPP is the abbreviation of Electrical Power Package, ECU and actuators use physical objects, and other components of the closed-loop loop use virtual simulation systems; System level, also known as mechanical level, system components use physical objects (such as the control of the automotive motor system). circuit), and other components of the closed-loop circuit use a virtual simulation system. HIC testing usually connects a controller under test with an industrial computer, which runs the model of the controlled object and simulates some electrical characteristics of the controlled object. In the HIL scenario, the tested controller does not know that it is connected to an industrial computer, and it will think that the connected object is a real object.
仿真类型,用于区分仿真测试的类型,如上述提到的四种仿真测试类型:MIL、SIL、PIL和HIL。The simulation type is used to distinguish the types of simulation tests, such as the four types of simulation tests mentioned above: MIL, SIL, PIL, and HIL.
仿真软件,运行仿真所使用的软件,本申请中,包括辅助/自动驾驶仿真软件,如CarMaker、PreScan、CARLA等。仿真软件中可包括运行不同仿真类型的不同程序。Simulation software, the software used to run the simulation, in this application, including assisted/autonomous driving simulation software, such as CarMaker, PreScan, CARLA, etc. Simulation software can include different programs that run different simulation types.
仿真工程(project):包括构建仿真所需的资源,资源包括仿真场景、仿真车辆、仿真传感器、仿真用例脚本等,这些资源可预先定义以池的方式存储到文件共享系统中,以供执行仿真任务时加载。Simulation project (project): It includes the resources required for building simulations, including simulation scenarios, simulation vehicles, simulation sensors, simulation use case scripts, etc. These resources can be pre-defined and stored in the file sharing system in the form of a pool for the execution of simulation. Loaded during the task.
其中仿真场景中的仿真对象包括环境对象(建筑、障碍物、道路、交通信号)、天气对象、参与者对象(相关车辆,行人)等。其中各仿真对象有各自的参数,例如,环境对象中的道路参数可包括路面附着系数、水平属性、侧坡属性、凹凸属性、长度属性等。其中,仿真车辆的参数可包括重量、尺寸形状、动力参数、制动参数、满载/轻载、胎压等。其中,仿真传感器的参数可包括传感器类型(如距离传感器、速度传感器、加速度传感器、雨量传感器等)、安装于车辆上的位置、数量等。The simulation objects in the simulation scene include environmental objects (buildings, obstacles, roads, traffic signals), weather objects, participant objects (related vehicles, pedestrians), and the like. Each simulation object has its own parameters. For example, the road parameters in the environment object may include road surface adhesion coefficient, horizontal attribute, side slope attribute, concave-convex attribute, length attribute and so on. The parameters of the simulated vehicle may include weight, size and shape, dynamic parameters, braking parameters, full load/light load, tire pressure, and the like. The parameters of the simulated sensor may include sensor type (eg, distance sensor, speed sensor, acceleration sensor, rain sensor, etc.), location, quantity, etc. installed on the vehicle.
控制模型,即所要待验证的控制模型,也可称为控制算法。可以是传感器、规划或者车辆控制算法等。The control model, that is, the control model to be verified, can also be called a control algorithm. It can be sensors, planning or vehicle control algorithms, etc.
仿真任务入口:用于记载运行仿真时所要使用的仿真用例的脚本名,以用于仿真节点执行仿真任务时据此加载对应的仿真用例脚本,执行相应的仿真过程。Simulation task entry: used to record the script name of the simulation use case to be used when running the simulation, so as to load the corresponding simulation use case script and execute the corresponding simulation process when the simulation node executes the simulation task.
仿真用例,即仿真测试使用的用例,仿真软件运行时基于用例中编排的系列场景执行对应的仿真流程。例如车辆某功能的性能测试:在不同的道路特征下目标车辆处于不同的状态时,执行不同操纵工况(加速、制动、转向等)以检测车辆稳定性的用例。又如,车辆某安全性的诊断测试:在不同工况下进行故障注入,检查故障是否被检测到的用例。The simulation use case is the use case used for the simulation test, and the simulation software runs the corresponding simulation process based on the series of scenarios arranged in the use case. For example, the performance test of a certain function of the vehicle: when the target vehicle is in different states under different road characteristics, different operating conditions (acceleration, braking, steering, etc.) are performed to detect the vehicle stability. Another example is the diagnostic test of a certain safety of a vehicle: the use case of performing fault injection under different working conditions to check whether the fault is detected.
仿真节点,不同仿真节点具有不同标识,仿真节点可以是实体的或虚拟的服务器(如云服务器,或称为云主机)、计算终端等。通过对各个仿真节点进行标签标记,该标签内容包括仿真节点所支持的仿真类型,可以根据标签选择所需的仿真节点。Simulation nodes, different simulation nodes have different identifiers, and simulation nodes may be physical or virtual servers (eg, cloud servers, or cloud hosts), computing terminals, and the like. By marking each simulation node with a label, the content of the label includes the simulation type supported by the simulation node, and the desired simulation node can be selected according to the label.
任务执行单元,一个仿真节点下可包含有多个任务执行单元,执行单元可以是实体的执行单元(例如由多核处理器的一核心、内存、存储器等构成的执行单元),也可以是虚拟的执行单元(如虚拟机)。任务执行单元用于执行仿真软件,且其可被配置有仿真动画传输端口以输出仿真软件运行的仿真图像或视频,还可配置有仿真控 制端口,以接收控制指令控制仿真软件的运行等。Task execution unit. A simulation node can contain multiple task execution units. The execution unit can be a physical execution unit (for example, an execution unit composed of a core, memory, storage, etc. of a multi-core processor), or a virtual execution unit. An execution unit (such as a virtual machine). The task execution unit is used to execute the simulation software, and can be configured with a simulation animation transmission port to output a simulation image or video of the simulation software running, and also be configured with a simulation control port to receive control instructions to control the operation of the simulation software.
CarMaker,德国IPG公司出品的自动驾驶仿真软件。其中CarMaker是针对小型乘用车的车辆动力学仿真软件,应用领域包括高级驾驶员辅助系统、车辆相关控制系统、车辆动力学、燃油经济性和混合动力车辆。CarMaker系统不仅包含必要的车辆环境模型,和I/O接口,而且有许多先进的工具来查看、控制和分析仿真以及处理仿真结果。也可以使用和CarMaker密切耦合的工具Matlab/Simulink来运行、控制和分析仿真。在CarMaker的虚拟车辆环境中能够仿真现实中能够实现的操纵,包括简单操控(如在直道上制动),复杂操控(在弯道上变速、制动、转弯的组合)。CarMaker, an autonomous driving simulation software produced by German IPG company. Among them, CarMaker is a vehicle dynamics simulation software for small passenger cars, and its application areas include advanced driver assistance systems, vehicle-related control systems, vehicle dynamics, fuel economy and hybrid vehicles. The CarMaker system not only contains the necessary vehicle environment models, and I/O interfaces, but also has many advanced tools to view, control and analyze simulations and process simulation results. Simulations can also be run, controlled and analyzed using Matlab/Simulink, a tool closely coupled to CarMaker. In CarMaker's virtual vehicle environment, maneuvers that can be achieved in reality can be simulated, including simple maneuvers (such as braking on a straight), and complex maneuvers (a combination of shifting, braking, and turning on a curve).
IPGMovie,集成于CarMaker中,可用于仿真真实的交通场景动画,该动画可显示到屏幕中进行视景仿真。IPGMovie, integrated in CarMaker, can be used to simulate real traffic scene animation, which can be displayed on the screen for visual simulation.
Matlab,美国MathWorks公司出品的商业数学软件,可用于数据分析、深度学习、图像处理与计算机视觉、信号处理、控制系统等领域。Matlab, a commercial mathematical software produced by MathWorks in the United States, can be used in data analysis, deep learning, image processing and computer vision, signal processing, control systems and other fields.
Simulink,集成于Matlab中,是一种可视化仿真工具。Simulink是一个模块图开发环境,用于多域仿真以及基于模型的设计。它支持系统设计、仿真、自动代码生成以及嵌入式系统的连续测试和验证。Simulink提供图形编辑器、可自定义的模块库以及求解器,能够进行动态系统建模和仿真。Simulink应用领域包括汽车、航空、工业自动化、大型建模、复杂逻辑、物理逻辑,信号处理等方面。Simulink, integrated in Matlab, is a visual simulation tool. Simulink is a block diagram development environment for multi-domain simulation and model-based design. It supports system design, simulation, automatic code generation, and continuous testing and verification of embedded systems. Simulink provides graphical editors, customizable block libraries, and solvers for dynamic system modeling and simulation. Simulink applications include automotive, aviation, industrial automation, large-scale modeling, complex logic, physical logic, signal processing, and more.
下面,首先对现有技术进行分析:Below, the existing technology is firstly analyzed:
现有技术一:如图15示出了一种仿真任务的调度实现方法的流程图,该方法包括以下步骤:获取仿真软件模型的需要批量处理的仿真任务的数量;根据仿真任务的数量确定需要的仿真算法节点的数量;利用许可证对仿真算法节点所在的设备进行验证;控制验证通过的仿真算法节点所在的设备批量地执行仿真任务。该方法可以利用分布在多个设备上的多个仿真算法节点对仿真软件模型的仿真任务进行批量测试,提高仿真效率,适用于具有多仿真场景的复杂情况。Prior art 1: FIG. 15 shows a flowchart of a method for scheduling simulation tasks, the method includes the following steps: obtaining the number of simulation tasks of a simulation software model that need to be batch processed; The number of simulation algorithm nodes that have passed the verification; use the license to verify the equipment where the simulation algorithm nodes are located; control the equipment where the simulation algorithm nodes that have passed the verification are located to perform simulation tasks in batches. The method can use multiple simulation algorithm nodes distributed on multiple devices to perform batch testing on the simulation tasks of the simulation software model, improve the simulation efficiency, and is suitable for complex situations with multiple simulation scenarios.
现有技术一所存在的缺陷:该方法未提出能支持使用多款仿真软件进行调度,且未提出能支持使用MIL、SIL、HIL等多种仿真类型进行混合调度,且未提出能在调度过程中与被调度仿真节点上仿真软件进行实时交互的方案。Defects in the existing technology 1: This method does not propose to support the use of multiple simulation software for scheduling, and does not propose to support the use of MIL, SIL, HIL and other simulation types for mixed scheduling, and does not propose to support the scheduling process. A scheme for real-time interaction with the simulation software on the scheduled simulation node.
基于现有技术所存在的缺陷,提出了本申请的方案,在根据输入的任务元素定义仿真任务时,仿真任务被定义包括有仿真类型和/或仿真软件,从而当进行仿真任务调度和执行时,调度到支持所述仿真类型和/或可运行所述仿真软件的仿真节点,通过该仿真节点使用所述仿真类型和/或运行所述仿真软件执行所述仿真任务。本申请通过仿真任务被定义包括有仿真类型和/或仿真软件,实现了对多种仿真类型、多种软件的支持,从而在仿真任务调度和执行仿真任务时,可以将仿真任务调度给支持所述仿真类型和/或运行所述仿真软件的仿真节点。可见,本申请支持使用多款仿真软件,支持使用MIL、SIL、HIL等多种仿真类型的混合调度。另一方面,本申请仿真节点提供仿真控制端口和仿真动画传输端口以实现在执行仿真任务过程对仿真软件的实时交互控制,以及获取仿真软件的仿真动画数据并通过界面显示给用户。Based on the defects existing in the prior art, the solution of the present application is proposed. When defining a simulation task according to input task elements, the simulation task is defined to include a simulation type and/or simulation software, so that when the simulation task is scheduled and executed , scheduling to a simulation node that supports the simulation type and/or can run the simulation software, and executes the simulation task by using the simulation type and/or running the simulation software through the simulation node. In the present application, simulation tasks are defined to include simulation types and/or simulation software, and support for multiple simulation types and software is realized, so that when simulation tasks are scheduled and executed, simulation tasks can be dispatched to the support institutes. the simulation type and/or the simulation node running the simulation software. It can be seen that this application supports the use of multiple simulation software, and supports the use of mixed scheduling of multiple simulation types such as MIL, SIL, and HIL. On the other hand, the simulation node of the present application provides a simulation control port and a simulation animation transmission port to realize real-time interactive control of the simulation software during the execution of the simulation task, and obtain simulation animation data of the simulation software and display it to the user through the interface.
【仿真的使用场景】【Scenarios of use of simulation】
本申请的仿真任务调度方法、仿真方法可用于各种仿真应用,例如应用于车辆自动驾驶仿真技术上,也可以应用于飞行器、船舶等交通工具的自动驾驶仿真技术上,也可以应用于其他可自动执行的仿真应用上,如风力发电机的运行仿真等。The simulation task scheduling method and simulation method of the present application can be used in various simulation applications, for example, in the automatic driving simulation technology of vehicles, and also in the automatic driving simulation technology of vehicles such as aircraft and ships, and can also be applied in other possible applications. Automatically executed simulation applications, such as the operation simulation of wind turbines, etc.
【仿真任务调度方法的一实施例】[An embodiment of a simulation task scheduling method]
本申请提供了一种仿真任务调度方法,参照图1示出的流程图,对本申请仿真任务调度方法第一实施例进行介绍,包括以下步骤:The present application provides a simulation task scheduling method. Referring to the flowchart shown in FIG. 1 , the first embodiment of the simulation task scheduling method of the present application is introduced, including the following steps:
S110、接收任务元素。S110. Receive a task element.
S120、根据所述任务元素定义一仿真任务的第一内容,所述第一内容包括至少以下之一:仿真类型、仿真软件。这里需说明的是,采用“第一内容”仅用于在本申请描述过程中区别其他的内容(其他的内容例如仿真工程、控制模型、用例脚本等),并非用于归类等其他使用,对本申请保护范围不起到任何限定。S120. Define first content of a simulation task according to the task element, where the first content includes at least one of the following: simulation type and simulation software. It should be noted here that the use of "first content" is only used to distinguish other content (such as simulation engineering, control model, use case script, etc.) in the description process of this application, and is not used for other uses such as classification. It does not limit the protection scope of the present application.
S130、根据所述第一内容中,将所述仿真任务调度至可处理该第一内容的仿真节点。S130. According to the first content, schedule the simulation task to a simulation node that can process the first content.
其中,在一些实施例中,上述步骤S110的实现方式为:可以向用户显示一个或多个界面,接收用户通过界面输入的用于定义仿真任务的任务元素。向用户显示界面的实现方式可以有多种方式,例如在一些实施例中,可以采用基于CS(Client-Server,客户端-服务器)构架的方式实现时,可以通过客户端程序显示供用户操作的界面;在一些实施例中可以采用基于BS(Browser-Server,浏览器-服务器)构架的方式实现,可以通过用户终端设备的网页浏览器来显示供用户操作的界面。在一些实施例中,当采用BS构架的方式实现时,可基于一云仿真服务平台来实现本申请的仿真方法,该云仿真服务平台向客户提供浏览器登录页面,从而客户可以通过可运行浏览器的设备,如电脑、PAD、手机等设备访问该云仿真服务平台。Wherein, in some embodiments, the implementation manner of the above step S110 is: one or more interfaces may be displayed to the user, and task elements for defining a simulation task input by the user through the interface are received. There can be various ways to display the interface to the user. For example, in some embodiments, when it can be implemented in a way based on a CS (Client-Server, client-server) architecture, a client program can be used to display the interface for the user to operate. Interface; in some embodiments, it may be implemented in a manner based on a BS (Browser-Server, browser-server) framework, and an interface for user operation may be displayed through a web browser of a user terminal device. In some embodiments, when implemented in a BS framework, the simulation method of the present application can be implemented based on a cloud simulation service platform, the cloud simulation service platform provides a browser login page to the customer, so that the customer can browse through the executable browser. devices such as computers, PADs, and mobile phones can access the cloud simulation service platform.
在一些实施例中,所述界面显示内容包括供用户操作的内容,可以采用图形用户界面(GUI,Graphical User Interface)的方式呈现,该界面通过相应的控件、窗口、对话框的等实现下述至少之一功能:接收用户通过文字输入方式输入的任务元素、提供可展开的菜单栏接收用户对菜单栏中任务元素的选择、提供交互框使用户可通过交互步骤一步步输入或选择各仿真元素、提供文件上传或下载的控件实现用户上传文件或下载文件等等。In some embodiments, the interface display content includes content for user operation, which may be presented in a graphical user interface (GUI, Graphical User Interface), which implements the following through corresponding controls, windows, dialog boxes, etc. At least one of the functions: Receive task elements input by the user through text input, provide an expandable menu bar to receive user selection of task elements in the menu bar, provide an interactive box so that the user can input or select each simulation element step by step through interactive steps , Provide controls for file uploading or downloading to realize user uploading or downloading files and so on.
在一些实施例中,所述界面所显示的具体内容包括任务元素的选择控件或路径输入框控件,根据所述任务元素定义所述一仿真任务的以下内容的至少之一:仿真类型、仿真软件、仿真工程、控制模型、用例脚本、仿真速率、是否显示仿真动画、是否保存仿真动画。本实施例中至少包括仿真类型和/或仿真软件。In some embodiments, the specific content displayed on the interface includes a task element selection control or a path input box control, and at least one of the following content of the simulation task is defined according to the task element: simulation type, simulation software , Simulation project, control model, use case script, simulation rate, whether to display simulation animation, whether to save simulation animation. This embodiment includes at least a simulation type and/or simulation software.
在一些实施例中,所述仿真类型通过所述任务元素中包含的以下信息中的一个进行定义:模型在环仿真测试MIL、软件在环仿真测试SIL、处理器在环仿真测试PIL、硬件在环仿真测试HIL;仿真软件通过所述任务元素中包含的仿真软件的标识进行定义;所述仿真工程通过所述任务元素中包含的仿真工程的标识进行定义;所述控制模 型通过所述任务元素中包含控制模型的标识进行定义;所述用例脚本通过所述任务元素中包含的用例脚本的标识进行定义。In some embodiments, the simulation type is defined by one of the following information contained in the task element: model-in-the-loop simulation test MIL, software-in-the-loop simulation test SIL, processor-in-the-loop simulation test PIL, hardware-in-the-loop simulation test The loop simulation test HIL; the simulation software is defined by the identification of the simulation software contained in the task element; the simulation project is defined by the identification of the simulation project contained in the task element; the control model is defined by the task element The use case script is defined by the identifier of the use case script contained in the task element.
在一些实施例中,可采用菜单栏式选择控件实现对应仿真类型的任务元素的接收,即通过接收用户在菜单栏选择的MIL类型、SIL类型PIL或HIL等类型实现该对应仿真类型的任务元素的接收。类似的,在一些实施例中,通过接收用户在另一菜单栏选择的如CarMaker、Matlab等仿真软件名称,或对应的ID(如设置的各软件对应的ID)等标识,实现对仿真软件这一任务元素的接收。In some embodiments, a menu bar-type selection control can be used to realize the reception of task elements corresponding to the simulation type, that is, the task elements of the corresponding simulation type are realized by receiving the MIL type, SIL type PIL, or HIL type selected by the user in the menu bar. reception. Similarly, in some embodiments, by receiving the name of the simulation software such as CarMaker, Matlab, etc. selected by the user in another menu bar, or the corresponding ID (such as the ID corresponding to the set software), etc., the simulation software is realized. The receipt of a task element.
另外需要说明的是,本步骤可以同时通过不同用户的终端显示界面,分别接收各个用户通过各界面输入的任务元素,即,本申请可支持多个用户的同时使用。In addition, it should be noted that, in this step, the terminal display interfaces of different users can simultaneously receive the task elements input by each user through each interface, that is, the present application can support the simultaneous use of multiple users.
在一些实施例中,上述步骤S120中仿真任务所要定义的多项内容可以以模板方式存在,模板中包括多项要定义的内容,如仿真类型项、仿真软件项,且分别与界面中的各输入相对应,例如接收到用户通过菜单栏从MIL、SIL、PIL或HIL类型所选择出的一种仿真类型时,将该具体仿真类型定义给仿真类型项;又如接收到用户所选择的软件标识时,将该软件标识定义给仿真软件项。In some embodiments, multiple items of content to be defined in the simulation task in the above step S120 may exist in the form of templates, and the template includes multiple items of content to be defined, such as simulation type items and simulation software items, which are respectively associated with each item in the interface. The input corresponds to, for example, when a simulation type selected by the user from the MIL, SIL, PIL or HIL type is received through the menu bar, the specific simulation type is defined to the simulation type item; for example, the software selected by the user is received. When identifying, define the software identification to the simulation software item.
类似的,在一些实施例中,对于通过步骤S120所接收到的用户通过操作界面选定的仿真工程的标识、控制模型的标识和用例脚本的标识等任务元素,在本步骤中均会定义给仿真任务所对应的项,如对应的仿真工程、控制模型和用例脚本项。这里的标识包括名称、编号、指定的访问目录等。对于通过步骤S120所接收到的用户通过操作界面选定的仿真速率、是否显示仿真动画、和/或是否保存仿真动画项时,也定义到相应的任务中。Similarly, in some embodiments, for task elements such as the identification of the simulation project, the identification of the control model, and the identification of the use case script, which are selected by the user through the operation interface and received in step S120, all of them will be defined in this step. Items corresponding to simulation tasks, such as corresponding simulation projects, control models, and use case script items. The identification here includes name, number, designated access directory, etc. The simulation rate selected by the user through the operation interface, whether to display the simulation animation, and/or whether to save the simulation animation item received through step S120 is also defined in the corresponding task.
另外需要说明的是,当同时通过不同的界面分别接收各个不同用户通过各界面输入的任务元素后,本步骤会分别对接收的各用户输入的任务元素分别定义仿真任务,即,本申请可支持仿真任务定义的并发。In addition, it should be noted that when task elements input by different users through different interfaces are received through different interfaces at the same time, this step will respectively define simulation tasks for the received task elements input by each user, that is, this application can support Simulate task-defined concurrency.
在一些实施例中,由于会接收到多个仿真任务,因此上述步骤S130实现调度时,可通过任务队列对各个任务进行调度,可为:通过与所述仿真任务的第一内容对应的一任务队列,向匹配所述第一内容的一仿真节点调度;其中,至少一个任务队列中的不同的任务队列对应至少以下之一:不同的仿真类型、不同的仿真软件。In some embodiments, since multiple simulation tasks will be received, when the above-mentioned step S130 implements scheduling, each task may be scheduled through a task queue, which may be: through a task corresponding to the first content of the simulation task The queue is scheduled to a simulation node matching the first content; wherein, different task queues in at least one task queue correspond to at least one of the following: different simulation types and different simulation software.
具体来说,该实施例中,采用了多个任务队列,且使不同的任务队列对应不同的仿真类型和/或不同仿真软件,即对应所述仿真任务的第一内容,由于任务队列进行了区分,调度时可以并发外,且在仿真任务调度给仿真节点时,不用判断仿真任务所定义的仿真类型和/或仿真软件,调度下发可以更快。一些实施例中,可以针对不同的仿真类型,设置对应的MIL类型的任务队列、SIL类型的任务队列、HIL类型的任务队列。或者,可以对应不同的仿真软件设置不同的任务队列。又或者,可以针对仿真类型和仿真软件的结合设置不同的任务队列。Specifically, in this embodiment, multiple task queues are used, and different task queues are made to correspond to different simulation types and/or different simulation software, that is, corresponding to the first content of the simulation task. Distinguish, the scheduling can be concurrent, and when the simulation task is scheduled to the simulation node, it is not necessary to judge the simulation type and/or simulation software defined by the simulation task, and the scheduling can be delivered faster. In some embodiments, corresponding MIL-type task queues, SIL-type task queues, and HIL-type task queues may be set for different simulation types. Alternatively, different task queues can be set for different simulation software. Alternatively, different task queues can be set for the combination of simulation type and simulation software.
当针对不同仿真类型和/或不同仿真软件,设置相应的不同任务队列时,将定义的仿真任务根据其被定义的仿真类型和/或仿真软件,分发到对应的任务队列中;当基于各任务队列进行仿真任务调度时,将各任务队列中的仿真任务依次调度给可支持对应仿真类型和/或可运行相应仿真软件的仿真节点。When setting corresponding different task queues for different simulation types and/or different simulation software, the defined simulation tasks are distributed to the corresponding task queues according to their defined simulation types and/or simulation software; When the queue performs simulation task scheduling, the simulation tasks in each task queue are sequentially scheduled to simulation nodes that can support corresponding simulation types and/or can run corresponding simulation software.
在其他一些实施例中,采用了一个任务队列,各个仿真任务采用先进先出的方式 调度到各个仿真节点,调度时先判断出仿真任务所定义的所述仿真类型和/或仿真软件,然后将所述仿真任务调度至可处理该仿真类型和/或可运行该仿真软件的仿真节点。In some other embodiments, a task queue is used, and each simulation task is scheduled to each simulation node in a first-in, first-out manner. During scheduling, the simulation type and/or simulation software defined by the simulation task is first determined, and then the The simulation tasks are dispatched to simulation nodes that can handle the simulation type and/or can run the simulation software.
在其他一些实施例中,采用了多个任务队列,分别依次进行仿真任务的接收与分发,以便于任务的并发调度,以加快调度过程。In some other embodiments, multiple task queues are used to sequentially receive and distribute simulation tasks, so as to facilitate concurrent scheduling of tasks and speed up the scheduling process.
关于调度实现的一些实施例中,可以预先记录各个仿真节点可支持的仿真类型和/或可运行的仿真软件,在调度时,根据所记录的信息执行所述仿真任务的调度,将仿真任务调度到相应的仿真节点。In some embodiments of scheduling implementation, the simulation types and/or runnable simulation software that each simulation node can support may be recorded in advance, and during scheduling, the simulation tasks are scheduled according to the recorded information, and the simulation tasks are scheduled. to the corresponding simulation node.
在一些实施例中,可以根据至少一个仿真节点的注册信息,确定匹配所述第一内容的所述一仿真节点,以将仿真任务调度到相应的仿真节点;其中,所述注册信息包括至少以下之一:可支持的仿真类型、可运行的仿真软件。具体来说,将仿真节点可支持的仿真类型和/或可运行的仿真软件可以作为仿真节点的注册信息注册到注册表中的实现方式可为,当仿真节点安装了一个或多个仿真软件时,则可以将所安装的各仿真软件的名称、各仿真软件可支持的各仿真类型作为注册信息进行上传,以在所述注册表中进行记录。相应的,当仿真节点某仿真软件被卸载、或失效(如使用许可过期,或部分功能的许可过期等)、或故障而导致仿真节点不可运行该仿真软件或处理某仿真类型时,会相应的更新注册表中的信息。In some embodiments, the one emulation node matching the first content may be determined according to the registration information of at least one emulation node, so as to schedule the emulation task to the corresponding emulation node; wherein the registration information includes at least the following One: Supportable simulation types and runnable simulation software. Specifically, the implementation manner of registering the simulation type and/or executable simulation software that the simulation node can support into the registry as the registration information of the simulation node may be, when the simulation node has installed one or more simulation software , the name of each installed simulation software and each simulation type supported by each simulation software may be uploaded as registration information to record in the registry. Correspondingly, when a simulation software of a simulation node is uninstalled, or invalid (for example, the license has expired, or the license of some functions has expired, etc.), or the simulation node cannot run the simulation software or process a certain simulation type due to a failure, it will respond accordingly. Update the information in the registry.
在一些实施例中,也可以以配置文件的方式替代注册表,同样可以实现预先记录各个仿真节点可支持的仿真类型和/或可运行的仿真软件。In some embodiments, the registry can also be replaced by a configuration file, which can also implement pre-recording of the emulation types and/or runnable emulation software that each emulation node can support.
在一些实施例中,可以不采用注册表或配置文件等方式预先记录各个仿真节点可支持的仿真类型和/或可运行的仿真软件,而是当要进行仿真任务调度时,通过与各个仿真节点进行的信息交互,获得各个仿真节点可支持的仿真类型和/或可运行的仿真软件,再从中选出一可执行所定义的仿真任务的仿真节点进行仿真任务调度。In some embodiments, instead of using a registry or a configuration file to pre-record the simulation types and/or runnable simulation software that each simulation node can support, when simulation task scheduling is to be performed, the The information exchange is performed to obtain the simulation types and/or runnable simulation software that each simulation node can support, and then select a simulation node that can execute the defined simulation task for simulation task scheduling.
在一些实施例中,也可以是接收到仿真节点的对仿真任务请求时,再通过信息交互、或通过该仿真任务请求中直接携带仿真节点的可支持的仿真类型和/或可运行的仿真软件,而获得该仿真节点可支持的仿真类型和/或可运行的仿真软件,将相应任务队列中的任务向该节点进行调度。In some embodiments, when a request for a simulation task from a simulation node is received, information exchange or the simulation task request directly carries the supported simulation type and/or executable simulation software of the simulation node. , and obtain the simulation type and/or runnable simulation software that the simulation node can support, and schedule the tasks in the corresponding task queue to the node.
在一些实施例中,在所述调度过程中,还可获取各仿真节点的运行状态,该运行状态包括节点负载能力,例如支持调度的最大执行单元数,或可用执行单元数;执行所述调度时还依据各仿真节点的运行状态,基于负载均衡策略对所述调度进行控制。In some embodiments, during the scheduling process, the running status of each simulation node may also be obtained, where the running status includes node load capacity, such as the maximum number of execution units that support scheduling, or the number of available execution units; execute the scheduling At the same time, the scheduling is also controlled based on the load balancing strategy according to the running state of each simulation node.
【仿真任务执行方法的一实施例】[An embodiment of a simulation task execution method]
本申请还提供了一种仿真任务执行方法,参照图2示出的流程图,对本申请仿真调度方法第一实施例进行介绍,包括以下步骤:The present application also provides a simulation task execution method. Referring to the flowchart shown in FIG. 2 , the first embodiment of the simulation scheduling method of the present application is introduced, including the following steps:
S210、接收调度的仿真任务;接收的该仿真任务的第一内容至少包括有仿真类型、仿真软件;S210. Receive a scheduled simulation task; the received first content of the simulation task at least includes a simulation type and simulation software;
其中,如仿真任务调度方法的第一实施例所述,被定义有仿真类型和/或仿真软件的仿真任务被调度到相应的仿真节点,通过仿真节点接收调度的仿真任务,该仿真节点可支持所述仿真类型和/或可运行所述仿真软件。Wherein, as described in the first embodiment of the simulation task scheduling method, a simulation task defined with a simulation type and/or simulation software is scheduled to a corresponding simulation node, and the scheduled simulation task is received through the simulation node, and the simulation node can support The simulation type and/or the simulation software may be run.
S220、通过匹配所述第一内容的仿真软件执行所述仿真任务。S220. Perform the simulation task by using simulation software matching the first content.
在执行所述仿真任务时,具体的可为:由仿真节点解析所述仿真任务,根据其中的第一内容包含的仿真类型和/或仿真软件,使用所述仿真类型和/或运行所述仿真软件执行所述仿真任务。When executing the simulation task, specifically, the simulation task may be analyzed by a simulation node, and the simulation type and/or the simulation may be run according to the simulation type and/or simulation software contained in the first content. Software performs the simulation task.
在一些实施例中,仿真任务中仅定义有仿真类型,则仿真节点使用仿真节点上所具有的支持该仿真类型的仿真软件执行所述仿真类型的所述仿真任务。如果仿真节点上存在多款支持该仿真类型的仿真软件,则可以择一使用。In some embodiments, only a simulation type is defined in a simulation task, and the simulation node executes the simulation task of the simulation type by using the simulation software on the simulation node that supports the simulation type. If there are multiple simulation softwares that support this simulation type on the simulation node, you can choose one to use.
在一些实施例中,仿真任务中仅定义有仿真软件,则仿真节点使用其所具有的所述仿真软件执行所述仿真任务;In some embodiments, only simulation software is defined in the simulation task, and the simulation node uses the simulation software it has to execute the simulation task;
在一些实施例中,仿真任务中仅定义有仿真类型和仿真软件,则仿真节点使用仿真节点上所具有的支持该仿真类型的该仿真软件执行所述仿真类型的所述仿真任务。In some embodiments, only a simulation type and simulation software are defined in a simulation task, and the simulation node executes the simulation task of the simulation type by using the simulation software on the simulation node that supports the simulation type.
在一些实施例中,当仿真任务的内容还包括仿真工程、控制模型或用例脚本时,可以从文件系统存储的仿真工程、控制模型或用例脚本的实体文件,来获取这些用于执行所述仿真任务的实体文件。这样便于实现仿真工程、控制模型或用例脚本实体文件的共享。In some embodiments, when the content of the simulation task further includes a simulation project, a control model or a use case script, the entity files of the simulation project, control model or use case script stored in the file system may be obtained for executing the simulation The entity file of the task. This facilitates the sharing of simulation projects, control models, or use case script entity files.
在一些实施例中,根据仿真任务还包括的仿真速率、是否显示仿真动画或是否保存仿真动画,执行所述仿真任务。In some embodiments, the simulation task is executed according to the simulation rate further included in the simulation task, whether to display the simulation animation or whether to save the simulation animation.
在一些实施例中,可通过仿真节点的仿真控制端口,接收用户通过步骤S110中所述界面输入的仿真控制指令;并根据所述仿真控制指令控制该仿真节点上的所述仿真软件的运行。这样实现了对仿真软件运行的控制。In some embodiments, the simulation control command input by the user through the interface in step S110 can be received through the simulation control port of the simulation node; and the simulation software running on the simulation node is controlled according to the simulation control command. In this way, the control of the operation of the simulation software is realized.
在一些实施例中,可通过仿真节点从其上的仿真软件获取仿真动画数据,并通过仿真节点的仿真动画传输端口输出到步骤S110中所述界面。这样可以将仿真软件生成的仿真动画通过所述界面显示给用户。In some embodiments, the simulation animation data can be obtained from the simulation software on the simulation node through the simulation node, and output to the interface described in step S110 through the simulation animation transmission port of the simulation node. In this way, the simulation animation generated by the simulation software can be displayed to the user through the interface.
【仿真实现方法的一实施例】[An embodiment of a simulation implementation method]
本申请还提供了一种仿真实现方法,参照图3示出的流程图,由上述仿真任务调度方法和仿真任务实现方法的组合所构成。为了更好的理解本申请,在本实施例中,除了可以完全采用上述仿真任务调度方法和仿真任务实现的方法组合外,这里还使用了一些其他的例子进行介绍,这些例子同样可以应用于上述仿真任务调度方法与仿真任务实现方法中。本实施例包括以下步骤:The present application also provides a simulation implementation method, which is composed of a combination of the above simulation task scheduling method and simulation task implementation method with reference to the flowchart shown in FIG. 3 . In order to better understand the present application, in this embodiment, in addition to the above-mentioned combination of the simulation task scheduling method and the simulation task implementation method, some other examples are also used for introduction, and these examples can also be applied to the above-mentioned methods. Simulation task scheduling method and simulation task realization method. This embodiment includes the following steps:
S310、接收用于定义仿真任务的任务元素。S310. Receive a task element for defining a simulation task.
如图4的示意图中示出了任务定义模板包含的内容的实例,向用户显示的界面所包含的具体内容对应着仿真任务的定义模板的内容,从而可以通过接收用户在该界面的操作,接收用于定义仿真任务的任务元素。An example of the content contained in the task definition template is shown in the schematic diagram of FIG. 4 , and the specific content contained in the interface displayed to the user corresponds to the content of the definition template of the simulation task, so that the user's operation on the interface can be received. Task element used to define simulation tasks.
其中,本步骤中接收到的仿真软件、仿真工程、控制模型、用例脚本的任务元素,并不是指实体文件(实体文件指包含有具体内容的文件,例如包含有代码的仿真软件),而是对应于实体文件的标识,如名称或可加载路径,根据该标识可获取到对应的实体文件。实体文件可以存储于共享的文件系统中,举例说明如下:Among them, the task elements of the simulation software, simulation project, control model, and use case script received in this step do not refer to entity files (entity files refer to files containing specific content, such as simulation software containing codes), but The identifier corresponding to the entity file, such as the name or the loadable path, can obtain the corresponding entity file according to the identifier. Physical files can be stored in a shared file system, examples are as follows:
上述仿真工程和其下的各仿真资源可预先配置、上述已有的控制模型、用例脚本可预先建立,如图3所示,可以由用户通过网页浏览器提供的某界面执行相应操作, 以实现对仿真工程及其下仿真资源的配置或上传、各控制模型的建立或上传,各用例脚本的建立或上传。这里的上传指上传到共享的文件系统中,且可以以池的方式存在,如各种仿真资源构成的仿真资源池、各种仿真工程资源构成仿真工程资源池,各种控制模型构成的控制模型池,各用例脚本构成用例脚本池。在后续步骤执行仿真任务过程中,该文件系统将挂载到仿真节点,以使得仿真节点的相应执行单元可以访问、加载。The above simulation project and each simulation resource under it can be pre-configured, and the above-mentioned existing control model and use case script can be pre-established. As shown in Figure 3, the user can perform corresponding operations through an interface provided by a web browser to achieve Configuration or upload of simulation project and its underlying simulation resources, establishment or upload of each control model, establishment or upload of each use case script. Uploading here refers to uploading to a shared file system, and it can exist in the form of a pool, such as a simulation resource pool composed of various simulation resources, a simulation engineering resource pool composed of various simulation engineering resources, and a control model composed of various control models. Each use case script constitutes a use case script pool. During the execution of the simulation task in the subsequent steps, the file system will be mounted to the simulation node, so that the corresponding execution unit of the simulation node can access and load.
其中,接收仿真工程这一任务元素时,还可接收该任务元素下的子元素,如工程名(即仿真工程的标识)等,工程名对应于该仿真工程下所要使用的各仿真资源的一配置信息。仿真资源可包括仿真场景资源、仿真车辆资源、仿真传感器资源等。仿真资源的创建,可以通过某显示界面接收用户选择或输入的各资源参数,完成仿真资源的创建。另外,对每个仿真资源创建后,可以分别以配置文件方式存储。Among them, when receiving the task element of the simulation project, the sub-elements under the task element can also be received, such as the project name (that is, the logo of the simulation project), etc. The project name corresponds to one of the simulation resources to be used under the simulation project. configuration information. The simulation resources may include simulation scene resources, simulation vehicle resources, simulation sensor resources, and the like. In the creation of simulation resources, various resource parameters selected or input by the user can be received through a certain display interface to complete the creation of simulation resources. In addition, after each simulation resource is created, it can be stored as a configuration file.
这里,进一步对仿真资源举例说明如下:仿真场景的仿真资源包括“雨天环路场景A资源配置文件”、“雨天环路场景B资源配置文件”等仿真资源,每个仿真资源中配置有形成各自仿真场景的各资源参数,如道路参数、天气参数、障碍物参数等。又如,某仿真车辆资源可以是“七座SUV型车辆C资源配置文件”,该仿真资源记载有形成该仿真车辆的各资源参数,如车重量参数、动力参数、胎压参数等。又如某仿真传感器资源可以是“车距传感器A资源配置文件”,其内记载有形成该仿真传感器的各资源参数,如传感器型号、安装位置、数量参数等。其中,一个工程名对应的配置信息中,包括至少一个仿真资源。Here, the simulation resources are further illustrated as follows: The simulation resources of the simulation scene include simulation resources such as "rainy loop scene A resource configuration file", "rainy weather loop scene B resource configuration file", etc. The resource parameters of the simulation scene, such as road parameters, weather parameters, obstacle parameters, etc. For another example, a simulated vehicle resource may be a "seven-seat SUV vehicle C resource configuration file", and the simulated resource records various resource parameters that form the simulated vehicle, such as vehicle weight parameters, power parameters, tire pressure parameters, and the like. For another example, a certain simulated sensor resource may be a "vehicle distance sensor A resource configuration file", which records various resource parameters that form the simulated sensor, such as sensor model, installation location, and quantity parameters. The configuration information corresponding to a project name includes at least one simulation resource.
S320、根据接收的任务元素定义仿真任务。其中,在定义仿真工程时,还包括定义所选仿真类型下所选仿真软件的相关任务元素,这些任务元素是所选仿真软件执行所选类型仿真任务所需的定义,这些任务元素同样在步骤S310中通过界面方式接收到。所述相关任务元素的定义例如:MIL类型时对运行仿真所需的被控对象模型的定义、模型开发环境定义;SIL类型时对运行仿真所需的SIL可执行程序的定义;HIL类型时对HIL实时机的定义(IP、用户名、执行参数)及对实时机要执行的HIL可执行程序的定义等;S320. Define a simulation task according to the received task element. Among them, when defining a simulation project, it also includes defining the relevant task elements of the selected simulation software under the selected simulation type. These task elements are the definitions required by the selected simulation software to perform the selected type of simulation tasks. These task elements are also in the step In S310, it is received through the interface. The definitions of the relevant task elements are, for example: the definition of the controlled object model and the model development environment required for running the simulation in the MIL type; the definition of the SIL executable program required for running the simulation in the SIL type; the HIL type. Definition of the HIL real-time machine (IP, user name, execution parameters) and the definition of the HIL executable program to be executed by the real-time machine;
在本实施例中,定义仿真类型项具体指定义控制模型的名称或加载路径。控制模型可以为预先已经建立的算法模型,例如自动驾驶算法模型。In this embodiment, defining a simulation type item specifically refers to defining the name or loading path of the control model. The control model can be a pre-established algorithm model, such as an automatic driving algorithm model.
在本实施例中,定义用例脚本项具体定义用例脚本名称到仿真任务入口,仿真任务入口是指执行自动化仿真用例的入口。In this embodiment, the definition use case script item specifically defines the use case script name to the simulation task entry, and the simulation task entry refers to the entry for executing the automated simulation use case.
S330、根据所述仿真类型和/或仿真软件,将所述仿真任务调度至可处理该仿真类型和/或可运行该仿真软件的仿真节点。S330. According to the simulation type and/or simulation software, schedule the simulation task to a simulation node that can process the simulation type and/or run the simulation software.
参见图5所示的流程图,及图6A所示的交互示意图,本实施例中该步骤的具体实现方式之一可以采用下述子步骤:Referring to the flowchart shown in FIG. 5 and the schematic diagram of interaction shown in FIG. 6A , one of the specific implementations of this step in this embodiment may adopt the following sub-steps:
S331、预先,将各仿真节点进行注册,将各仿真节点的配置信息注册到仿真任务调度系统(如云平台、服务器等网络侧设备),并根据各仿真节点支持的仿真类型为各仿真节点配置标签,并记录在注册信息中。并且,对应不同的仿真类型,创建有不同的任务队列;S331. Register each simulation node in advance, register the configuration information of each simulation node to the simulation task scheduling system (such as a cloud platform, a server and other network-side devices), and configure each simulation node according to the simulation type supported by each simulation node label and recorded in the registration information. And, corresponding to different simulation types, different task queues are created;
S332、当收到所定义的仿真任务时,给该仿真任务分配一任务ID,并根据仿真 任务中记载的仿真任务类型,分发到对应该仿真任务类型的任务队列中;S332, when receiving the defined simulation task, assign a task ID to this simulation task, and according to the simulation task type recorded in the simulation task, distribute in the task queue corresponding to this simulation task type;
S333、之后,根据上述注册信息中记录的各仿真节点的所支持的仿真类型,确定出可处理该任务类型的仿真节点,将该仿真类型的任务队列中的各仿真任务依次调度给可处理该任务类型的仿真节点。当调度成功后,将仿真任务从相应任务队列中移除。S333. After that, according to the supported simulation types of each simulation node recorded in the above registration information, determine the simulation node that can process the task type, and schedule each simulation task in the task queue of the simulation type to be able to process the task type in turn. Simulation node for task type. When the scheduling is successful, the simulation task is removed from the corresponding task queue.
其中,所述调度过程中,还可包括:获取各仿真节点的运行状态(例如负载能力,即计算节点最大负载(支持调度的最大执行单元数));执行所述调度时还依据各仿真节点的运行状态对所述调度进行控制。本例中,该实现方式可以采用以下方式之一:Wherein, the scheduling process may further include: acquiring the running status of each simulation node (for example, the load capacity, that is, the maximum load of the computing node (the maximum number of execution units that supports scheduling)); and performing the scheduling according to each simulation node. The running state of the scheduler controls the schedule. In this example, the implementation can be one of the following:
第一方式:注册后的各个仿真节点启动调度代理(Agent)程序,通过仿真节点上的调度Agent程序实时反馈节点的负载情况(已调度执行单元数/最大负载)。当队列中存在排队任务,且根据所述反馈获知有可处理该类型任务的(非满负载)仿真节点时,则选择实时负载最小的仿真节点,则将仿真任务调度给该仿真节点Agent程序执行。该仿真节点的Agent接收仿真任务调度系统发送的仿真任务后,启动执行单元执行任务;The first method: each simulation node after registration starts a scheduling agent (Agent) program, and feeds back the load status of the node (number of scheduled execution units/maximum load) in real time through the scheduling Agent program on the simulation node. When there is a queued task in the queue, and according to the feedback, it is known that there is a (non-full load) simulation node that can process this type of task, select the simulation node with the smallest real-time load, and schedule the simulation task to the simulation node Agent program for execution . After receiving the simulation task sent by the simulation task scheduling system, the Agent of the simulation node starts the execution unit to execute the task;
第二方式:在第一方式的基础上,进一步增加仿真节点主动请求仿真任务调度的方案,具体为:由仿真节点判断其负载是否达限值时,未达限值时,可根据节点标签向仿真任务调度系统请求相应类型的任务队列的任务;仿真任务调度时从收到的所述请求的仿真节点中进行所要调度的仿真节点的选择。The second method: on the basis of the first method, the scheme of the simulation node actively requesting simulation task scheduling is further added. Specifically, when the simulation node judges whether its load reaches the limit value, if it does not reach the limit value, it can send a request to the simulation node according to the node label. The simulation task scheduling system requests tasks of a corresponding type of task queue; during simulation task scheduling, the simulation node to be scheduled is selected from the simulation nodes that have received the request.
S340、通过仿真节点接收调度的仿真任务;接收的该仿真任务被定义有仿真类型和/或仿真软件;S340, receiving the scheduled simulation task through the simulation node; the received simulation task is defined with a simulation type and/or simulation software;
S350、通过该仿真节点执行所述仿真任务。S350. Execute the simulation task through the simulation node.
本实施例中,本步骤可包括:通过所述仿真节点根据仿真任务中的定义构建仿真流程,调用并运行定义的所述仿真软件,将定义的所述仿真工程、控制模型和用例脚本的实体文件加载到所述仿真软件,以使所述仿真软件执行所述仿真类型的仿真任务。如下示出了本步骤的一种实现方法,参见图4所示的示意图中执行单元所执行的下述步骤的流程:In this embodiment, this step may include: constructing a simulation process according to the definition in the simulation task through the simulation node, calling and running the defined simulation software, and converting the defined entities of the simulation project, control model and use case script The files are loaded into the simulation software to cause the simulation software to perform simulation tasks of the simulation type. An implementation method of this step is shown as follows, referring to the flowchart of the following steps performed by the execution unit in the schematic diagram shown in FIG. 4 :
S351、根据定义的仿真工程、控制模型,用例脚本,通过挂载的共享文件系统读取对应的仿真工程实体文件、控制模型实体文件、用例脚本实体文件;S351. According to the defined simulation project, control model, and use case script, read the corresponding simulation project entity file, control model entity file, and use case script entity file through the mounted shared file system;
S352、根据定义的仿真类型、仿真软件以及用例脚本,确定需要在本节点上执行的仿真流程;S352, according to the defined simulation type, simulation software and use case script, determine the simulation process that needs to be executed on the node;
S353、调用仿真节点上的仿真软件,执行所确定出的仿真流程。该仿真软件运行过程会载人运行仿真所需的所述仿真工程实体文件、控制模型实体文件、用例脚本实体文件。S353: Call the simulation software on the simulation node to execute the determined simulation process. The simulation software running process will carry the simulation project entity files, control model entity files, and use case script entity files required for the simulation.
S354、当仿真执行结束后存储任务日志、仿真结果和仿真日志等数据到共享文件系统。S354 , after the execution of the simulation is completed, data such as the task log, the simulation result, and the simulation log are stored in the shared file system.
在一些实施例中,用户可以与执行该仿真任务的仿真节点进行实时交互,进行仿真控制或获取仿真动画时,实现方式可具体如下:In some embodiments, the user can interact in real time with the simulation node that executes the simulation task, and when performing simulation control or acquiring simulation animation, the implementation can be as follows:
收到定义的仿真任务时,每个仿真任务会被分配一任务ID,用于区分各个仿真任。调度任务给仿真节点时,同时会将任务ID提供给仿真节点(或仿真节点请求仿真任务时会得到任务ID)。当仿真节点开始执行该任务时,仿真节点可获取该任务执 行的相关数据(节点IP,仿真状态,仿真控制和动画传输端口等)。在一些实施例中,当用户与执行仿真任务中的仿真节点进行交互时,可以采用如图6B示出的实时交互的步骤,包括:When the defined simulation tasks are received, each simulation task will be assigned a task ID to distinguish each simulation task. When scheduling a task to a simulation node, the task ID will be provided to the simulation node at the same time (or the simulation node will get the task ID when requesting a simulation task). When the simulation node starts to execute the task, the simulation node can obtain the relevant data (node IP, simulation status, simulation control and animation transmission port, etc.) In some embodiments, when a user interacts with a simulation node performing a simulation task, the real-time interaction steps shown in FIG. 6B may be adopted, including:
首先、接收用户通过界面请求某任务执行状态和数据的指令时,根据该任务的任务ID可获知对应的处理该任务的仿真节点的IP地址;First, when receiving an instruction from the user to request the execution status and data of a certain task through the interface, the IP address of the corresponding simulation node processing the task can be obtained according to the task ID of the task;
然后、根据仿真节点IP地址和仿真控制端口调用实时仿真API向仿真节点发送仿真控制指令,实时仿真API将仿真控制指令发送到所述IP地址的仿真节点的仿真控制端口,由仿真节点的执行单元解析指令并对仿真软件进行控制。该仿真控制指令包括:暂停、中止、继续,请求数据、请求仿真状态和动画等指令,仿真节点可进行相应指令的执行或反馈数据。Then, according to the IP address of the simulation node and the simulation control port, the real-time simulation API is called to send the simulation control command to the simulation node, and the real-time simulation API sends the simulation control command to the simulation control port of the simulation node of the IP address. Parse the instructions and control the simulation software. The simulation control instructions include: pause, abort, continue, request data, request simulation state and animation and other instructions, and the simulation node can execute corresponding instructions or feed back data.
例如,当为请求实时动画时,可具体为:根据仿真节点IP地址和仿真动画传输端口调用实时仿真API请求实时仿真动画,API监听该IP地址仿真节点的仿真动画传输端口,获取仿真软件发送的仿真动画,并将实时动画回传到用户侧界面(如浏览器界面)显示给用户。其中,仿真动画传输端口数据由执行单元从仿真软件实时获取。For example, when requesting real-time animation, it can be specifically: calling the real-time simulation API to request real-time simulation animation according to the IP address of the simulation node and the simulation animation transmission port, and the API monitors the simulation animation transmission port of the simulation node with the IP address, and obtains the information sent by the simulation software. Simulate animation, and send real-time animation back to the user interface (such as browser interface) to display to the user. Among them, the simulation animation transmission port data is acquired by the execution unit in real time from the simulation software.
【仿真实现方法的一具体实施方式】[A specific implementation of the simulation implementation method]
图7为仿真实现方法的第一具体实施方式的示意图中,该具体实施方式中,仿真软件采用了CarMaker、开发环境采用了Matlab,要进行MIL仿真类型的仿真,该实施方式包括以下步骤:7 is a schematic diagram of a first specific embodiment of the simulation implementation method. In this specific embodiment, the simulation software adopts CarMaker, and the development environment adopts Matlab. To carry out the simulation of the MIL simulation type, the embodiment includes the following steps:
S710:用户通过浏览器登录页面,其登录过程包括对用户的认证过程,认证通过后,可以通过浏览器显示第一界面,该第一界面具有供用户点选或输入的控件,用户可以选择或输入执行仿真任务所需要的任务元素,通过浏览器界面接收用户提交的所述任务元素。S710: The user logs in to the page through a browser, and the login process includes an authentication process for the user. After the authentication is passed, a first interface can be displayed through the browser, and the first interface has controls for the user to click or input. Input the task elements required to execute the simulation task, and receive the task elements submitted by the user through the browser interface.
根据接收的各任务元素定义仿真任务,所形成任务定义如下:The simulation tasks are defined according to the received task elements, and the resulting task definitions are as follows:
任务定义task definition
仿真任务类型-MIL【对应用户选定的仿真任务类型】Simulation task type - MIL [corresponding to the simulation task type selected by the user]
仿真软件-CarMaker【对应用户选定的仿真软件的名称】Simulation software - CarMaker [corresponding to the name of the simulation software selected by the user]
仿真工程Simulation Engineering
-CarMaker工程名【对应用户选定的工程名,根据工程名可从文件系统中获取为该工程所配置的各仿真资源】-CarMaker project name [corresponding to the project name selected by the user, according to the project name, each simulation resource configured for the project can be obtained from the file system]
-CarMaker模型名称【对应用户选定的被控模型的模型名称】-CarMaker model name [corresponding to the model name of the controlled model selected by the user]
-初始化Matlab脚本【对应用户选定的用于启动初始化Matlab的脚本】-Initialize Matlab script [corresponds to the script selected by the user to start the initialization Matlab]
-Matlab路径【即模型开发环境的定义,对应用户选定Matlab时根据注册信息的记录而自动生成的Matlab的加载路径】-Matlab path [that is, the definition of the model development environment, corresponding to the Matlab loading path automatically generated according to the registration information record when the user selects Matlab]
待验证算法(Simulink模型)Algorithm to be verified (Simulink model)
-Simulink工程路径【对应用户选定控制模型时,根据控制模型名称自动生成的该控制模型的加载路径】-Simulink project path [corresponding to the loading path of the control model automatically generated according to the name of the control model when the user selects the control model]
仿真任务入口-MIL用例TCL脚本【对应用户选定的用例脚本名称,该用例脚本是用TCL语言编写的MIL类型的仿真任务的用例脚本】Simulation task entry - MIL use case TCL script [corresponding to the name of the use case script selected by the user, the use case script is the use case script of the MIL type simulation task written in TCL language]
S720:根据仿真任务中的任务类型MIL,将该仿真任务分发到对应该仿真任务类型的任务队列中,通过任务队列,并根据相应各仿真节点的负载情况,基于负载均衡策略,调度给可处理该MIL任务类型的一仿真节点,即调度给具有标签为MIL类型,且可运行CarMaker软件的仿真节点。S720: According to the task type MIL in the simulation task, distribute the simulation task to the task queue corresponding to the simulation task type, and schedule the simulation task to the task queue according to the load situation of the corresponding simulation nodes and based on the load balancing strategy. A simulation node of the MIL task type is dispatched to a simulation node with a label of MIL type and capable of running the CarMaker software.
S730:所述仿真节点通过其空闲的执行单元解析定义的仿真任务,根据任务定义中的MIL仿真类型、仿真软件CarMaker、仿真工程、控制模型以及仿真任务入口对应的MIL用例TCL脚本,确定出需要在该执行单元执行的仿真流程并执行,执行的仿真流程包括下述子步骤:S730: The simulation node parses the defined simulation task through its idle execution unit, and determines the needs according to the MIL simulation type in the task definition, the simulation software CarMaker, the simulation project, the control model, and the MIL use case TCL script corresponding to the simulation task entry The simulation process executed by the execution unit is executed, and the executed simulation process includes the following sub-steps:
S731、开发环境(Matlab)的启动:启动Matlab,并根据定义的控制模型(即验证算法Simulink模型)打开Simulink工程;S731. Start of the development environment (Matlab): Start Matlab, and open the Simulink project according to the defined control model (ie, the verification algorithm Simulink model);
加载Matlab,在Matlab环境下依次执行下述步骤:Load Matlab and perform the following steps in sequence in the Matlab environment:
S732、依次执行控制模型(即待验证模型算法)和被控对象模型(即CarMaker模型)的初始化脚本;S732, execute the initialization script of the control model (that is, the model algorithm to be verified) and the controlled object model (that is, the CarMaker model) in turn;
S733、打开被控对象模型(CarMaker模型),启动CarMaker软件并监听仿真控制端口;S733, open the controlled object model (CarMaker model), start the CarMaker software and monitor the simulation control port;
S734、打开IPGMovie监听VDS仿真动画传输端口;S734, open IPGMovie to monitor the VDS simulation animation transmission port;
S735、执行MIL用例TCL脚本,在CarMaker软件下运行TCL脚本中的各个场景的仿真。S735. Execute the TCL script of the MIL use case, and run the simulation of each scene in the TCL script under the CarMaker software.
仿真过程中,可以通过实时仿真API通过仿真控制端口、仿真动画传输端口实现通过平台(web界面)与仿真节点的实时交互。仿真执行结束后存储仿真结果到共享文件系统。During the simulation process, the real-time interaction with the simulation node through the platform (web interface) can be realized through the simulation control port and the simulation animation transmission port through the real-time simulation API. After the simulation execution is completed, the simulation results are stored in the shared file system.
【仿真实现方法的第二具体实施方式】[Second Embodiment of Simulation Implementation Method]
图8为仿真实现方法的第二具体实施方式的示意图中,该具体实施方式中,仿真软件采用了CarMaker,要进行SIL仿真类型的仿真,与上述图7示出的MIL类型的仿真的主要区别在于,所形成的任务定义是基于SIL类型生成的,以及仿真节点执行的仿真任务是针对SIL仿真类型的流程,下面对不同之处简述如下:FIG. 8 is a schematic diagram of a second specific embodiment of the simulation implementation method. In this specific embodiment, the simulation software adopts CarMaker, and the SIL simulation type simulation is to be performed, and the main difference from the MIL type simulation shown in FIG. 7 is described above. It is that the formed task definition is generated based on the SIL type, and the simulation task executed by the simulation node is for the flow of the SIL simulation type. The differences are briefly described as follows:
S810:与上述步骤S710基本相同,主要不同在于该步骤中所形成任务定义如下:S810: Basically the same as the above step S710, the main difference is that the tasks formed in this step are defined as follows:
任务定义task definition
仿真任务类型-SIL【对应用户选定的仿真任务类型】Simulation task type - SIL [corresponding to the simulation task type selected by the user]
仿真软件-CarMaker【对应用户选定的仿真软件的名称】Simulation software - CarMaker [corresponding to the name of the simulation software selected by the user]
仿真工程Simulation Engineering
-CarMaker工程名【对应用户选定的工程名,根据工程名可从文件系统中获取为该工程所配置的各仿真资源】-CarMaker project name [corresponding to the project name selected by the user, according to the project name, each simulation resource configured for the project can be obtained from the file system]
-CarMaker工程框架代码【对应用户选定的SIL的工程框架源代码名称,根据该名称可从文件系统中获取对应的源代码文件】-CarMaker engineering framework code [corresponding to the name of the engineering framework source code of the SIL selected by the user, according to which the corresponding source code file can be obtained from the file system]
待验证算法Algorithm to be verified
-算法工程路径【对应用户选定控制模型时,根据控制模型名称自动生成的该控制模型的加载路径】-Algorithm engineering path [corresponding to the loading path of the control model automatically generated according to the name of the control model when the user selects the control model]
仿真任务入口-SIL用例TCL脚本【对应用户选定的用例脚本名称,该用例脚本是用TCL语言编写的SIL类型的仿真任务的用例脚本】Simulation task entry - SIL use case TCL script [corresponding to the name of the use case script selected by the user, the use case script is the use case script of the SIL type simulation task written in TCL language]
S820:与上述步骤S720基本相同,不再赘述。S820: It is basically the same as the above-mentioned step S720, and will not be repeated.
S830:与上述步骤S730基本相同,不同在于执行的是SIL类型的仿真流程,该流程包括下述子步骤:S830: It is basically the same as the above step S730, the difference is that the simulation flow of the SIL type is executed, and the flow includes the following sub-steps:
S831、启动CarMaker软件并监听仿真控制端口;S831. Start the CarMaker software and monitor the simulation control port;
S832、结合工程框架代码和控制模型(待验证算法)由CarMaker编译生成CarMaker SIL可执行程序;S832, combine the engineering framework code and the control model (algorithm to be verified) to compile and generate the CarMaker SIL executable program by CarMaker;
S833、启动SIL可执行程序并连接到CarMaker;即实现SIL可执行程序运行的进程与CarMaker运行的进程间的通信;S833. Start the SIL executable program and connect to CarMaker; that is, realize the communication between the process running the SIL executable program and the process running by CarMaker;
S834、打开IPGMovie监听VDS仿真动画传输端口;S834. Open IPGMovie to monitor the VDS simulation animation transmission port;
S835、执行SIL用例TCL脚本,在CarMaker软件下运行TCL脚本中的各个场景的仿真。S835. Execute the TCL script of the SIL use case, and run the simulation of each scene in the TCL script under the CarMaker software.
仿真过程中,可以通过实时仿真API通过仿真控制端口、仿真动画传输端口实现通过平台(web界面)与仿真节点的实时交互。仿真执行结束后存储仿真结果到共享文件系统。During the simulation process, the real-time interaction with the simulation node through the platform (web interface) can be realized through the simulation control port and the simulation animation transmission port through the real-time simulation API. After the simulation execution is completed, the simulation results are stored in the shared file system.
在另一个实施例中,步骤S810中任务定义时CarMaker工程框架代码处更改为SIL可执行程序名,则不需要步骤S832,步骤833中的SIL可执行程序是根据SIL可执行程序名从文件系统中获取的。即SIL可执行程序可预先单独编译存储。In another embodiment, when the task is defined in step S810, the CarMaker engineering framework code is changed to the SIL executable program name, then step S832 is not required, and the SIL executable program in step 833 is obtained from the file system according to the SIL executable program name. obtained from. That is, the SIL executable program can be compiled and stored separately in advance.
【仿真实现方法的第三具体实施方式】[The third specific embodiment of the simulation implementation method]
图9为仿真实现方法的第二具体实施方式的示意图中,该具体实施方式中,仿真软件采用了CarMaker,要进行HIL仿真类型的仿真,与上述图7示出的MIL类型的仿真的主要区别在于,所形成的任务定义是基于SIL类型生成的,以及仿真节点执行的仿真任务是针对SIL仿真类型的流程,下面对不同之处简述如下:FIG. 9 is a schematic diagram of a second specific embodiment of the simulation implementation method. In this specific embodiment, the simulation software adopts CarMaker, and the simulation of the HIL simulation type is to be performed. The main difference with the MIL type simulation shown in FIG. 7 above is It is that the formed task definition is generated based on the SIL type, and the simulation task executed by the simulation node is for the flow of the SIL simulation type. The differences are briefly described as follows:
该实施方式包括以下步骤:This embodiment includes the following steps:
S910:与上述步骤S710基本相同,主要不同在于该步骤中所形成任务定义如下:S910: Basically the same as the above step S710, the main difference is that the tasks formed in this step are defined as follows:
任务定义task definition
仿真任务类型-HIL【对应用户选定的仿真任务类型】Simulation task type - HIL [corresponding to the simulation task type selected by the user]
仿真软件-CarMaker【对应用户选定的仿真软件的名称】Simulation software - CarMaker [corresponding to the name of the simulation software selected by the user]
仿真工程Simulation Engineering
-CarMaker工程名【对应用户选定的工程名,根据工程名可从文件系统中获取为该工程所配置的各仿真资源】-CarMaker project name [corresponding to the project name selected by the user, according to the project name, each simulation resource configured for the project can be obtained from the file system]
-CarMaker工程框架代码名称【对应用户选定的HIL工程框架源代码名称,根据该名称可从文件系统中获取对应的源代码文件】- Code name of CarMaker engineering framework [corresponding to the name of the source code of the HIL engineering framework selected by the user, according to which the corresponding source code file can be obtained from the file system]
-HIL程序执行参数【对应用户选定的运行HIL仿真所需配置参数】-HIL program execution parameters [corresponding to the configuration parameters required by the user to run the HIL simulation]
-HIL实时机IP地址【对应用户输入的用于HIL仿真的实时机(如工控机)的IP地址】-IP address of HIL real-time machine [corresponding to the IP address of the real-time machine (such as industrial computer) input by the user for HIL simulation]
-HIL实时机用户名【对应用户输入的用于HIL仿真的实时机(如工控机)的 用户名】-HIL real-time machine username [corresponding to the username of the real-time machine (such as an industrial computer) entered by the user for HIL simulation]
待验证算法Algorithm to be verified
-算法工程路径【对应用户选定控制模型时,根据控制模型名称自动生成的该控制模型的加载路径】-Algorithm engineering path [corresponding to the loading path of the control model automatically generated according to the name of the control model when the user selects the control model]
仿真任务入口-HIL用例TCL脚本【对应用户选定的用例脚本名称,该用例脚本是用TCL语言编写的HIL类型的仿真任务的用例脚本】Simulation task entry - HIL use case TCL script [corresponding to the name of the use case script selected by the user, the use case script is the use case script of the HIL type simulation task written in TCL language]
S920:与上述步骤S720基本相同,不再赘述。S920: It is basically the same as the above-mentioned step S720, and will not be repeated.
S930:与上述步骤S730基本相同,不同在于执行的是SIL类型的仿真流程,该流程包括下述子步骤:S930: It is basically the same as the above-mentioned step S730, except that the simulation flow of the SIL type is executed, and the flow includes the following sub-steps:
S931、启动CarMaker软件并监听仿真控制端口;S931. Start the CarMaker software and monitor the simulation control port;
S932、结合工程框架代码和控制模型(待验证算法)由CarMaker编译生成HIL可执行程序;S932, combine the engineering framework code and the control model (algorithm to be verified) to compile and generate the HIL executable program by CarMaker;
S933、配置HIL程序执行参数、实时机的IP和用户名;S933, configure the execution parameters of the HIL program, the IP and user name of the real-time machine;
S934、在实时机启动所生成的HIL可执行程序,并连接到CarMaker;即实现实时机上的HIL可执行程序运行时与CarMaker运行的进程间的通信;S934, start the generated HIL executable program on the real-time machine, and connect it to CarMaker; that is, to realize the communication between the HIL executable program on the real-time machine and the process running by CarMaker;
S935、打开IPGMovie监听VDS仿真动画传输端口;S935, open IPGMovie to monitor the VDS simulation animation transmission port;
S936、执行HIL用例TCL脚本,在CarMaker软件下运行TCL脚本中的各个场景的仿真。S936. Execute the TCL script of the HIL use case, and run the simulation of each scene in the TCL script under the CarMaker software.
仿真任务执行过程中,可以通过实时仿真API通过仿真控制端口、仿真动画传输端口实现通过平台(web界面)与仿真节点的仿真软件实时交互。仿真执行结束后存储仿真结果到共享文件系统。During the execution of the simulation task, the real-time interaction with the simulation software of the simulation node through the platform (web interface) can be realized through the real-time simulation API through the simulation control port and the simulation animation transmission port. After the simulation execution is completed, the simulation results are stored in the shared file system.
在另一个实施例中,步骤S910中任务定义时CarMaker工程框架代码处更改为HIL可执行程序名,则不需要步骤S932,步骤933中的HIL可执行程序是根据HIL可执行程序名从文件系统中获取的。即HIL可执行程序可预先单独编译存储。In another embodiment, when the task definition in step S910 is changed to the name of the HIL executable program in the CarMaker engineering framework code, step S932 is not required, and the HIL executable program in step 933 is obtained from the file system according to the name of the HIL executable program. obtained from. That is, the HIL executable program can be compiled and stored separately in advance.
由上三个仿真实现方法的三个具体实施方式可以看出,本申请可支持多种仿真类型。也可以看出,任务定义仅需仅少的元素,而这些元素可通过向用户提供的界面获得,可见对于用户来说,不必关系仿真软件的具体内部情况,而相关资源都可以通过界面输入或选择,当仿真节点需要资源时则会从文件系统获得,且各资源以池的方式存在,可以一定程度上不需用户对每个工程资源、控制模型、被控模型都去重新编写、创建,降低了劳动量。It can be seen from the three specific implementation manners of the above three simulation implementation methods that the present application can support various simulation types. It can also be seen that the task definition requires only a few elements, and these elements can be obtained through the interface provided to the user. It can be seen that for the user, the specific internal situation of the simulation software does not need to be related, and the relevant resources can be input through the interface or Select, when the simulation node needs resources, it will be obtained from the file system, and each resource exists in the form of a pool, which can eliminate the need for users to rewrite and create each engineering resource, control model, and controlled model to a certain extent. Reduced labor.
下面涉及装置的实施例,关于各装置的有益效果或解决的技术问题,可以参见与各装置分别对应的方法中的描述,或者参见发明内容中的描述,此处不再一一赘述。The following relates to the embodiments of the devices. For the beneficial effects or technical problems solved by the devices, reference may be made to the descriptions in the methods corresponding to the devices, or the descriptions in the Summary of the Invention, which will not be repeated here.
【仿真任务调度装置的一实施例】[An embodiment of a simulation task scheduling device]
如图10示出了仿真任务调度装置的第一实施例,该仿真任务调度装置包括:FIG. 10 shows the first embodiment of the simulation task scheduling apparatus, and the simulation task scheduling apparatus includes:
接收模块1010,用于接收任务元素,该任务元素;A receiving module 1010, configured to receive a task element, the task element;
处理模块1020,用于根据所述任务元素定义一仿真任务的第一内容,所述第一内容包括至少以下之一:仿真类型、仿真软件。在一些实施例中,以及,用于将所述仿真任务向匹配所述第一内容的一仿真节点调度。The processing module 1020 is configured to define first content of a simulation task according to the task element, where the first content includes at least one of the following: simulation type and simulation software. In some embodiments, and for scheduling the simulation task to a simulation node matching the first content.
所述处理模块1020还用于根据所述任务元素还定义所述一仿真任务的至少以下之一的内容:仿真工程、控制模型、用例脚本、仿真速率、是否显示仿真动画、是否保存仿真动画。The processing module 1020 is further configured to define at least one of the following content of the simulation task according to the task element: simulation project, control model, use case script, simulation rate, whether to display simulation animation, and whether to save simulation animation.
其中,上述仿真类型通过所述任务元素中包含的以下信息中的一个进行定义:模型在环仿真测试MIL、软件在环仿真测试SIL、处理器在环仿真测试PIL、硬件在环仿真测试HIL。仿真软件通过所述任务元素中包含的仿真软件的标识进行定义;所述仿真工程通过所述任务元素中包含的仿真工程的标识进行定义;所述控制模型通过所述任务元素中包含控制模型的标识进行定义;所述用例脚本通过所述任务元素中包含的用例脚本的标识进行定义。The above-mentioned simulation type is defined by one of the following information contained in the task element: model-in-the-loop simulation test MIL, software-in-the-loop simulation test SIL, processor-in-the-loop simulation test PIL, and hardware-in-the-loop simulation test HIL. The simulation software is defined by the identification of the simulation software contained in the task element; the simulation project is defined by the identification of the simulation project contained in the task element; the control model is defined by the identification of the control model contained in the task element. The use case script is defined by the identifier of the use case script contained in the task element.
在一些实施例中,所述处理模块用于:通过与所述仿真任务的第一内容对应的一任务队列,向匹配所述第一内容的一仿真节点调度;其中,至少一个任务队列中的不同的任务队列对应至少以下之一:不同的仿真类型、不同的仿真软件。In some embodiments, the processing module is configured to: through a task queue corresponding to the first content of the simulation task, schedule to a simulation node matching the first content; wherein, at least one task queue in the Different task queues correspond to at least one of the following: different simulation types and different simulation software.
在一些实施例中,所述处理模块1020还用于根据至少一个仿真节点的注册信息,确定匹配所述第一内容的所述一仿真节点;其中,所述注册信息包括至少以下之一:可支持的仿真类型、可运行的仿真软件。In some embodiments, the processing module 1020 is further configured to determine, according to registration information of at least one simulation node, the one simulation node that matches the first content; wherein the registration information includes at least one of the following: Supported simulation types and runnable simulation software.
【仿真任务执行装置的一实施例】[An embodiment of a simulation task execution device]
如图11示出了仿真任务执行装置的一实施例,该仿真任务执行装置包括:FIG. 11 shows an embodiment of a simulation task execution apparatus, and the simulation task execution apparatus includes:
接收模块1110,用于接收调度的仿真任务;所述仿真任务的第一内容包括至少以下之一:仿真类型、仿真软件;A receiving module 1110, configured to receive a scheduled simulation task; the first content of the simulation task includes at least one of the following: simulation type and simulation software;
处理模块1120,用于通过匹配所述第一内容的仿真软件执行所述仿真任务。The processing module 1120 is configured to perform the simulation task by using simulation software matching the first content.
在一些实施例中,所述仿真任务还包括仿真工程、控制模型或用例脚本;所述处理模块1120还用于从文件系统获取对应的用于执行所述仿真任务的实体文件。In some embodiments, the simulation task further includes a simulation project, a control model or a use case script; the processing module 1120 is further configured to obtain a corresponding entity file for executing the simulation task from a file system.
在一些实施例中,所述仿真任务还包括的仿真速率、是否显示仿真动画或是否保存仿真动画。In some embodiments, the simulation task further includes the simulation rate, whether to display the simulation animation or whether to save the simulation animation.
在一些实施例中,所述接收模块1110还用于通过仿真控制端口接收仿真控制指令;所述处理模块1120还用于根据所述仿真控制指令控制所述仿真软件的运行。In some embodiments, the receiving module 1110 is further configured to receive an emulation control instruction through an emulation control port; the processing module 1120 is further configured to control the running of the emulation software according to the emulation control instruction.
在一些实施例中,所述装置还包括:发送模块1130,用于从所述仿真软件获取仿真动画数据,并通过仿真动画传输端口输出所述仿真动画数据。In some embodiments, the apparatus further includes: a sending module 1130, configured to acquire simulation animation data from the simulation software, and output the simulation animation data through a simulation animation transmission port.
【仿真实现装置的一实施例】[An embodiment of a simulation implementation device]
如图12示出了仿真实现装置的一实施例,包括上述仿真调度装置的任一实施例和上述仿真任务执行装置的任一实施例。FIG. 12 shows an embodiment of a simulation implementation apparatus, including any embodiment of the above-mentioned simulation scheduling apparatus and any embodiment of the above-mentioned simulation task execution apparatus.
【仿真实现装置的一具体实施方式】[A specific implementation of the simulation realization device]
如图13示出了本发明仿真实现装置的一具体实施方式,用于车辆自动驾驶仿真。其中,通过用户终端的浏览器显示提供给用户登陆即操作界面,界面上对应以任务模板模式显示给用户,并用来接收用户输入的所需的各任务元素。多个仿真节点构成仿真节点集群,每个仿真节点上具有多个执行单元,每个仿真节点上具有仿真软件。定 义的仿真任务被分配到不同仿真类型的任务队列,并调度给可处理该任务类型的仿真节点。仿真节点实现调用其空闲的执行单元生成仿真流程并执行,例如调用图中示出的最上面的执行单元。并通过共享文件系统存储仿真结果数据,以及存储工程实体文件、控制模型实体文件、用例脚本实体文件等。用户可通过用户终端浏览器实时与仿真节点交互,发送指令或接收仿真动画并可从共享文件系统获取仿真结果数据。FIG. 13 shows a specific embodiment of the simulation implementation device of the present invention, which is used for vehicle automatic driving simulation. Wherein, the user terminal's browser displays an interface for logging in, that is, an operation provided to the user, and the interface is correspondingly displayed to the user in a task template mode and used to receive required task elements input by the user. Multiple simulation nodes form a simulation node cluster, each simulation node has multiple execution units, and each simulation node has simulation software. The defined simulation tasks are assigned to task queues of different simulation types, and scheduled to simulation nodes that can process the task type. The simulation node implements calling its idle execution unit to generate and execute the simulation process, for example, calling the uppermost execution unit shown in the diagram. And through the shared file system to store simulation result data, as well as project entity files, control model entity files, use case script entity files, etc. Users can interact with simulation nodes in real time through the user terminal browser, send commands or receive simulation animations, and obtain simulation result data from the shared file system.
图14是本申请实施例提供的一种计算设备1500的结构性示意性图。该计算设备1500包括:处理器1510和通信接口1530。FIG. 14 is a schematic structural diagram of a computing device 1500 provided by an embodiment of the present application. The computing device 1500 includes a processor 1510 and a communication interface 1530 .
应理解,图14所示的计算设备1500中的通信接口1530可以用于与其他设备之间进行通信。It should be understood that the communication interface 1530 in the computing device 1500 shown in FIG. 14 may be used to communicate with other devices.
可选的,计算设备1500还可以包括存储器1520,与所述处理器1510连接。该存储器1520可以用于存储该程序代码和数据。因此,该存储器1520可以是处理器1510内部的存储单元,也可以是与处理器1510独立的外部存储单元,还可以是包括处理器1510内部的存储单元和与处理器1510独立的外部存储单元的部件。Optionally, the computing device 1500 may further include a memory 1520 connected to the processor 1510 . The memory 1520 may be used to store the program codes and data. Therefore, the memory 1520 may be a storage unit inside the processor 1510 , or an external storage unit independent from the processor 1510 , or may include a storage unit inside the processor 1510 and an external storage unit independent from the processor 1510 . part.
可选的,计算设备1500还可以包括总线。其中,存储器1520、通信接口1530可以通过总线与处理器1510连接。总线可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图14中仅用一条线表示,但并不表示仅有一根总线或一种类型的总线。Optionally, computing device 1500 may also include a bus. The memory 1520 and the communication interface 1530 may be connected to the processor 1510 through a bus. The bus may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus or the like. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one line is shown in FIG. 14, but it does not mean that there is only one bus or one type of bus.
应理解,在本申请实施例中,该处理器1510可以采用中央处理单元(central processing unit,CPU)。该处理器还可以是其它通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现成可编程门阵列(field programmable gate Array,FPGA)或者其它可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。或者该处理器1510采用一个或多个集成电路,用于执行相关程序,以实现本申请实施例所提供的技术方案。It should be understood that, in this embodiment of the present application, the processor 1510 may adopt a central processing unit (central processing unit, CPU). The processor may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. Alternatively, the processor 1510 uses one or more integrated circuits to execute related programs to implement the technical solutions provided by the embodiments of the present application.
该存储器1520可以包括只读存储器和随机存取存储器,并向处理器1510提供指令和数据。处理器1510的一部分还可以包括非易失性随机存取存储器。例如,处理器1510还可以存储设备类型的信息。The memory 1520 may include read only memory and random access memory and provides instructions and data to the processor 1510 . A portion of the processor 1510 may also include non-volatile random access memory. For example, the processor 1510 may also store device type information.
在计算设备1500运行时,所述处理器1510执行所述存储器1520中的计算机执行指令执行上述方法的操作步骤。When the computing device 1500 is running, the processor 1510 executes the computer-implemented instructions in the memory 1520 to perform the operation steps of the above-described method.
应理解,根据本申请实施例的计算设备1500可以对应于执行根据本申请各实施例的方法中的相应主体,并且计算设备1500中的各个模块的上述和其它操作和/或功能分别为了实现本实施例各方法的相应流程,为了简洁,在此不再赘述。It should be understood that the computing device 1500 according to the embodiments of the present application may correspond to corresponding subjects in executing the methods according to the various embodiments of the present application, and the above-mentioned and other operations and/or functions of the modules in the computing device 1500 are respectively for the purpose of realizing the present application. For the sake of brevity, the corresponding processes of each method in the embodiment will not be repeated here.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described systems, devices and units may refer to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The functions, if implemented in the form of software functional units and sold or used as independent products, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program codes .
本申请实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时用于执行一种多样化问题生成方法,该方法包括上述各个实施例所描述的方案中的至少之一。Embodiments of the present application further provide a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, is used to execute a method for generating diverse problems, and the method includes the methods described in the foregoing embodiments. at least one of the options.
本申请实施例的计算机存储介质,可以采用一个或多个计算机可读的介质的任意组合。计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质。计算机可读存储介质例如可以是,但不限于,电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本文件中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。The computer storage medium of the embodiments of the present application may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination of the above. More specific examples (a non-exhaustive list) of computer readable storage media include: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), Erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。A computer-readable signal medium may include a propagated data signal in baseband or as part of a carrier wave, with computer-readable program code embodied thereon. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device .
计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括、但不限于无线、电线、光缆、RF等等,或者上述的任意合适的组合。Program code embodied on a computer readable medium may be transmitted using any suitable medium including, but not limited to, wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
可以以一种或多种程序设计语言或其组合来编写用于执行本申请操作的计算机程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN),连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。Computer program code for performing the operations of the present application may be written in one or more programming languages, including object-oriented programming languages—such as Java, Smalltalk, C++, but also conventional Procedural programming language - such as the "C" language or similar programming language. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or wide area network (WAN), or may be connected to an external computer (eg, through the Internet using an Internet service provider) connect).
注意,上述仅为本申请的较佳实施例及所运用的技术原理。本领域技术人员会理解,本申请不限于这里所述的特定实施例,对本领域技术人员来说能够进行各种明显的变化、重新调整和替代而不会脱离本申请的保护范围。因此,虽然通过以上实施例对本申请进行了较为详细的说明,但是本申请不仅仅限于以上实施例,在不脱离本申请的构思的情况下,还可以包括更多其他等效实施例,均属于本申请的保护范畴。Note that the above are only the preferred embodiments of the present application and the applied technical principles. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the protection scope of the present application. Therefore, although the present application has been described in detail through the above embodiments, the present application is not limited to the above embodiments, and can also include more other equivalent embodiments without departing from the concept of the present application, all of which belong to The scope of protection of this application.

Claims (24)

  1. 一种仿真任务调度方法,其特征在于,包括:A simulation task scheduling method, comprising:
    接收任务元素;receive task element;
    根据所述任务元素定义一仿真任务的第一内容,所述第一内容包括至少以下之一:仿真类型、仿真软件;First content of a simulation task is defined according to the task element, and the first content includes at least one of the following: simulation type and simulation software;
    将所述仿真任务向匹配所述第一内容的一仿真节点调度。The simulation task is scheduled to a simulation node matching the first content.
  2. 根据权利要求1所述的方法,其特征在于,所述将所述仿真任务向匹配所述第一内容的一仿真节点调度包括:The method according to claim 1, wherein the scheduling the simulation task to a simulation node matching the first content comprises:
    通过与所述仿真任务的第一内容对应的一任务队列,向匹配所述第一内容的一仿真节点调度;scheduling to a simulation node matching the first content through a task queue corresponding to the first content of the simulation task;
    其中,至少一个任务队列中的不同的任务队列对应至少以下之一:不同的仿真类型、不同的仿真软件。Wherein, different task queues in at least one task queue correspond to at least one of the following: different simulation types and different simulation software.
  3. 根据权利要求1或2所述的方法,其特征在于,所述方法还包括:The method according to claim 1 or 2, wherein the method further comprises:
    根据至少一个仿真节点的注册信息,确定匹配所述第一内容的所述一仿真节点;determining the one emulation node matching the first content according to the registration information of at least one emulation node;
    其中,所述注册信息包括至少以下之一:可支持的仿真类型、可运行的仿真软件。Wherein, the registration information includes at least one of the following: a supported emulation type and an executable emulation software.
  4. 根据权利要求1至3任一所述的方法,其特征在于,根据所述任务元素还定义所述一仿真任务的至少以下之一的内容:仿真工程、控制模型、用例脚本、仿真速率、是否显示仿真动画、是否保存仿真动画。The method according to any one of claims 1 to 3, wherein content of at least one of the following simulation tasks is further defined according to the task element: simulation engineering, control model, use case script, simulation rate, whether Display simulation animation, whether to save simulation animation.
  5. 根据权利要求4所述的方法,其特征在于,The method of claim 4, wherein:
    所述仿真类型通过所述任务元素中包含的以下信息中的一个进行定义:模型在环仿真测试MIL、软件在环仿真测试SIL、处理器在环仿真测试PIL、硬件在环仿真测试HIL;The simulation type is defined by one of the following information contained in the task element: model-in-the-loop simulation test MIL, software-in-the-loop simulation test SIL, processor-in-the-loop simulation test PIL, hardware-in-the-loop simulation test HIL;
    仿真软件通过所述任务元素中包含的仿真软件的标识进行定义;The simulation software is defined by the identification of the simulation software contained in the task element;
    所述仿真工程通过所述任务元素中包含的仿真工程的标识进行定义;The simulation project is defined by the identification of the simulation project contained in the task element;
    所述控制模型通过所述任务元素中包含控制模型的标识进行定义;The control model is defined by including the identification of the control model in the task element;
    所述用例脚本通过所述任务元素中包含的用例脚本的标识进行定义。The use case script is defined by the identifier of the use case script contained in the task element.
  6. 一种仿真任务执行方法,其特征在于,包括:A method for performing a simulation task, comprising:
    接收调度的仿真任务;所述仿真任务的第一内容包括至少以下之一:仿真类型、仿真软件;receiving a scheduled simulation task; the first content of the simulation task includes at least one of the following: simulation type, simulation software;
    通过匹配所述第一内容的仿真软件执行所述仿真任务。The simulation task is performed by simulation software matching the first content.
  7. 根据权利要求6所述的方法,其特征在于,所述仿真任务还包括仿真工程、控制模型或用例脚本;所述方法还包括:The method according to claim 6, wherein the simulation task further comprises a simulation project, a control model or a use case script; the method further comprises:
    从文件系统获取对应的用于执行所述仿真任务的实体文件。The corresponding entity file for executing the simulation task is obtained from the file system.
  8. 根据权利要求6或7所述的方法,其特征在于,所述仿真任务还包括仿真速率、是否显示仿真动画或是否保存仿真动画。The method according to claim 6 or 7, wherein the simulation task further includes a simulation rate, whether to display the simulation animation or whether to save the simulation animation.
  9. 根据权利要求6至8任一所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 6 to 8, wherein the method further comprises:
    通过仿真控制端口接收仿真控制指令;Receive simulation control commands through the simulation control port;
    根据所述仿真控制指令控制所述仿真软件的运行。The operation of the simulation software is controlled according to the simulation control instruction.
  10. 根据权利要求6至9任一所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 6 to 9, wherein the method further comprises:
    从所述仿真软件获取仿真动画数据,并通过仿真动画传输端口输出所述仿真动画数据。The simulation animation data is acquired from the simulation software, and the simulation animation data is output through the simulation animation transmission port.
  11. 一种仿真实现方法,其特征在于,包括:A simulation implementation method, characterized in that, comprising:
    权利要求1至5任一所述的仿真任务调度方法;和The simulation task scheduling method of any one of claims 1 to 5; and
    权利要求6至10任一所述的仿真任务执行方法。The simulation task execution method according to any one of claims 6 to 10.
  12. 一种仿真任务调度装置,其特征在于,包括:A simulation task scheduling device, comprising:
    接收模块,用于接收任务元素;The receiving module is used to receive task elements;
    处理模块,用于根据所述任务元素定义一仿真任务的第一内容,所述第一内容包括至少以下之一:仿真类型、仿真软件;以及用于将所述仿真任务向匹配所述第一内容的一仿真节点调度。a processing module, configured to define a first content of a simulation task according to the task element, the first content including at least one of the following: simulation type, simulation software; and for matching the simulation task to the first content An emulation node scheduler for content.
  13. 根据权利要求12所述的装置,其特征在于,所述处理模块用于:The apparatus according to claim 12, wherein the processing module is configured to:
    通过与所述仿真任务的第一内容对应的一任务队列,向匹配所述第一内容的一仿真节点调度;scheduling to a simulation node matching the first content through a task queue corresponding to the first content of the simulation task;
    其中,至少一个任务队列中的不同的任务队列对应至少以下之一:不同的仿真类型、不同的仿真软件。Wherein, different task queues in at least one task queue correspond to at least one of the following: different simulation types and different simulation software.
  14. 根据权利要求12或13所述的装置,其特征在于,所述处理模块还用于根据至少一个仿真节点的注册信息,确定匹配所述第一内容的所述一仿真节点;The apparatus according to claim 12 or 13, wherein the processing module is further configured to determine, according to registration information of at least one simulation node, the one simulation node that matches the first content;
    其中,所述注册信息包括至少以下之一:可支持的仿真类型、可运行的仿真软件。Wherein, the registration information includes at least one of the following: a supported emulation type and an executable emulation software.
  15. 根据权利要求12至14任一所述的装置,其特征在于,所述处理模块还用于根据所述任务元素还定义所述一仿真任务的至少以下之一的内容:仿真工程、控制模型、用例脚本、仿真速率、是否显示仿真动画、是否保存仿真动画。The device according to any one of claims 12 to 14, wherein the processing module is further configured to further define the content of at least one of the following of the simulation task according to the task element: simulation engineering, control model, Use case script, simulation rate, whether to display simulation animation, whether to save simulation animation.
  16. 根据权利要求15所述的装置,其特征在于,所述仿真类型通过所述任务元素中包含的以下信息中的一个进行定义:模型在环仿真测试MIL、软件在环仿真测试SIL、处理器在环仿真测试PIL、硬件在环仿真测试HIL;The apparatus according to claim 15, wherein the simulation type is defined by one of the following information contained in the task element: a model-in-the-loop simulation test MIL, a software-in-the-loop simulation test SIL, a processor-in-the-loop simulation test Loop simulation test PIL, hardware-in-the-loop simulation test HIL;
    仿真软件通过所述任务元素中包含的仿真软件的标识进行定义;The simulation software is defined by the identification of the simulation software contained in the task element;
    所述仿真工程通过所述任务元素中包含的仿真工程的标识进行定义;The simulation project is defined by the identification of the simulation project contained in the task element;
    所述控制模型通过所述任务元素中包含控制模型的标识进行定义;The control model is defined by including the identification of the control model in the task element;
    所述用例脚本通过所述任务元素中包含的用例脚本的标识进行定义。The use case script is defined by the identifier of the use case script contained in the task element.
  17. 一种仿真任务执行装置,其特征在于,包括:A simulation task execution device is characterized in that, comprising:
    接收模块,用于接收调度的仿真任务;所述仿真任务的第一内容包括至少以下之一:仿真类型、仿真软件;a receiving module, configured to receive a scheduled simulation task; the first content of the simulation task includes at least one of the following: simulation type and simulation software;
    处理模块,用于通过匹配所述第一内容的仿真软件执行所述仿真任务。A processing module, configured to execute the simulation task by using simulation software matching the first content.
  18. 根据权利要求17所述的装置,其特征在于,所述仿真任务还包括仿真工程、控制模型或用例脚本;The apparatus according to claim 17, wherein the simulation task further comprises a simulation project, a control model or a use case script;
    所述处理模块还用于从文件系统获取对应的用于执行所述仿真任务的实体文件。The processing module is further configured to obtain the corresponding entity file for executing the simulation task from the file system.
  19. 根据权利要求17或18所述的装置,其特征在于,所述仿真任务还包括的仿真速率、是否显示仿真动画或是否保存仿真动画。The device according to claim 17 or 18, wherein the simulation task further includes the simulation speed, whether to display the simulation animation or whether to save the simulation animation.
  20. 根据权利要求17至19任一所述的装置,其特征在于:The device according to any one of claims 17 to 19, characterized in that:
    所述接收模块还用于通过仿真控制端口接收仿真控制指令;The receiving module is also used to receive the simulation control command through the simulation control port;
    所述处理模块还用于根据所述仿真控制指令控制所述仿真软件的运行。The processing module is further configured to control the running of the simulation software according to the simulation control instruction.
  21. 根据权利要求17至20任一所述的装置,其特征在于,所述装置还包括:The device according to any one of claims 17 to 20, wherein the device further comprises:
    发送模块,用于从所述仿真软件获取仿真动画数据,并通过仿真动画传输端口输出所述仿真动画数据。The sending module is used for acquiring simulation animation data from the simulation software, and outputting the simulation animation data through the simulation animation transmission port.
  22. 一种仿真实现装置,其特征在于,包括:A simulation implementation device, characterized in that, comprising:
    权利要求12至16任一所述仿真任务调度装置;和The simulation task scheduling device according to any one of claims 12 to 16; and
    权利要求17至21任一所述仿真任务执行装置。The simulation task execution device according to any one of claims 17 to 21.
  23. 一种计算设备,其特征在于,包括:A computing device, comprising:
    通信接口,以及至少一个处理器,a communication interface, and at least one processor,
    其中,所述至少一个处理器用于执行程序指令,所述程序指令当被所述至少一个处理器执行时使得所述计算设备实现权利要求1至5任一所述的方法,或者,所述程序指令当被所述至少一个处理器执行时使得所述计算设备实现权利要求6-10任一所述的方法。Wherein, the at least one processor is configured to execute program instructions, and when executed by the at least one processor, the program instructions cause the computing device to implement the method of any one of claims 1 to 5, or the program The instructions, when executed by the at least one processor, cause the computing device to implement the method of any of claims 6-10.
  24. 一种计算机可读存储介质,其上存储有程序指令,其特征在于,所述程序指令当被计算机执行时使得所述计算机实现权利要求1至5任一所述的方法,或者,所述程序指令当被所述计算机执行时使得所述计算机实现权利要求6-10任一所述的方法。A computer-readable storage medium on which program instructions are stored, wherein the program instructions, when executed by a computer, cause the computer to implement the method of any one of claims 1 to 5, or the program The instructions, when executed by the computer, cause the computer to implement the method of any of claims 6-10.
PCT/CN2020/135262 2020-12-10 2020-12-10 Simulation task scheduling method, execution method, simulation implementation method and device WO2022120717A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202080004954.3A CN112639734B (en) 2020-12-10 2020-12-10 Simulation task scheduling method, execution method, simulation implementation method and device
PCT/CN2020/135262 WO2022120717A1 (en) 2020-12-10 2020-12-10 Simulation task scheduling method, execution method, simulation implementation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/135262 WO2022120717A1 (en) 2020-12-10 2020-12-10 Simulation task scheduling method, execution method, simulation implementation method and device

Publications (1)

Publication Number Publication Date
WO2022120717A1 true WO2022120717A1 (en) 2022-06-16

Family

ID=75291243

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/135262 WO2022120717A1 (en) 2020-12-10 2020-12-10 Simulation task scheduling method, execution method, simulation implementation method and device

Country Status (2)

Country Link
CN (1) CN112639734B (en)
WO (1) WO2022120717A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117472530A (en) * 2023-10-25 2024-01-30 上海宽睿信息科技有限责任公司 Centralized management-based data intelligent scheduling method and system
CN117131076B (en) * 2023-09-20 2024-04-30 北京华如科技股份有限公司 Data processing method and device for simulation

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113467276B (en) * 2021-09-03 2021-12-07 中国汽车技术研究中心有限公司 Intelligent driving simulation method based on intelligent driving simulation event cloud platform
CN114004113B (en) * 2021-12-30 2022-05-03 佛山仙湖实验室 Interactive intelligent vehicle traffic simulation test method and system based on cloud service

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180095467A1 (en) * 2006-02-27 2018-04-05 Perrone Robotics, Inc. General purpose robotics operating system with unmanned and autonomous vehicle extensions
CN109359405A (en) * 2018-10-30 2019-02-19 四川航天系统工程研究所 The big data battlefield surroundings semi-matter simulating system of space-air-ground integration
CN110781576A (en) * 2019-09-09 2020-02-11 腾讯科技(深圳)有限公司 Simulation node scheduling method, device and equipment
CN111625949A (en) * 2020-05-20 2020-09-04 北京百度网讯科技有限公司 Simulation engine system, simulation processing method, device and medium
CN111879327A (en) * 2020-06-18 2020-11-03 北京九曜智能科技有限公司 Space configuration and time sequence planning method for cluster automatic driving vehicle berthing operation

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102708232B (en) * 2012-04-24 2013-06-19 中国人民解放军国防科学技术大学 Processing method and device for distributed simulation data
CN105677446B (en) * 2016-01-28 2019-05-28 中国电子科技集团公司第十研究所 The visual modeling method of Distributed Simulation Platform
CN106951627A (en) * 2017-03-15 2017-07-14 北京百度网讯科技有限公司 Emulation test method, device, equipment and the computer-readable recording medium of Vehicular automatic driving
CN111199079B (en) * 2018-10-30 2023-12-19 阿波罗智能技术(北京)有限公司 Simulation task scheduling method and device
CN111124592B (en) * 2018-10-31 2023-07-28 阿波罗智能技术(北京)有限公司 Simulation task execution method and device
CN111125857A (en) * 2018-10-31 2020-05-08 百度在线网络技术(北京)有限公司 Distributed simulation method and device
CN117872795A (en) * 2019-02-06 2024-04-12 弗泰里克斯有限公司 Electronic simulation method and system
CN110794810B (en) * 2019-11-06 2020-07-28 安徽瑞泰智能装备有限公司 Method for carrying out integrated test on intelligent driving vehicle
CN111177899A (en) * 2019-12-16 2020-05-19 北京航天智造科技发展有限公司 Multidisciplinary collaborative simulation method and system based on cloud platform
CN111506401B (en) * 2020-03-27 2023-11-21 北京百度网讯科技有限公司 Automatic driving simulation task scheduling method and device, electronic equipment and storage medium
CN111796530A (en) * 2020-05-26 2020-10-20 北京智行者科技有限公司 Automatic driving software in-loop simulation method
CN111859638A (en) * 2020-07-06 2020-10-30 中国人民解放军海军航空大学航空作战勤务学院 Real-time efficient distributed virtual-real combined simulation system and construction method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180095467A1 (en) * 2006-02-27 2018-04-05 Perrone Robotics, Inc. General purpose robotics operating system with unmanned and autonomous vehicle extensions
CN109359405A (en) * 2018-10-30 2019-02-19 四川航天系统工程研究所 The big data battlefield surroundings semi-matter simulating system of space-air-ground integration
CN110781576A (en) * 2019-09-09 2020-02-11 腾讯科技(深圳)有限公司 Simulation node scheduling method, device and equipment
CN111625949A (en) * 2020-05-20 2020-09-04 北京百度网讯科技有限公司 Simulation engine system, simulation processing method, device and medium
CN111879327A (en) * 2020-06-18 2020-11-03 北京九曜智能科技有限公司 Space configuration and time sequence planning method for cluster automatic driving vehicle berthing operation

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117131076B (en) * 2023-09-20 2024-04-30 北京华如科技股份有限公司 Data processing method and device for simulation
CN117472530A (en) * 2023-10-25 2024-01-30 上海宽睿信息科技有限责任公司 Centralized management-based data intelligent scheduling method and system
CN117472530B (en) * 2023-10-25 2024-04-05 上海宽睿信息科技有限责任公司 Centralized management-based data intelligent scheduling method and system

Also Published As

Publication number Publication date
CN112639734A (en) 2021-04-09
CN112639734B (en) 2022-02-11

Similar Documents

Publication Publication Date Title
CN107784152B (en) Simulation comprising a plurality of simulators
WO2022120717A1 (en) Simulation task scheduling method, execution method, simulation implementation method and device
TWI757743B (en) Mini program generation method and device
US9262373B2 (en) Cloud-based software eco-system
US11087049B2 (en) Online self-driving car virtual test and development system
CN110442041B (en) Simulation platform construction method and simulation system based on heterogeneous cloud computing framework
CN103092751B (en) Web application performance test system based on customer behavior model in cloud environment
US20180357078A1 (en) Device with extensibility
JP2007528069A5 (en)
EP4002189A1 (en) Industrial network communication emulation
CN105393226A (en) Automated Generation Of Scripted And Manual Test Cases
CN110991040A (en) Complex product collaborative simulation environment construction method
CN113468070A (en) Consistency test method for vehicle-mounted Ethernet
CN116028025A (en) Method, device, equipment and medium for generating automobile service model frame
CN108959805B (en) Automatic-driving hardware-in-loop simulation cloud platform and method
CN115934263A (en) Data processing method and device, computer equipment and storage medium
Fant et al. Architectural design patterns for flight software
US11750471B2 (en) Method and apparatus for determining resource configuration of cloud service system
CN101969442B (en) Process running environment perception and migration based network analog framework implementation method
CN115795845A (en) Construction method, device, equipment and storage medium of integrated test simulation platform
EP3982268B1 (en) Chassis simulation method and apparatus, server, storage medium and program product
CN113987840B (en) Modelica-based model splitting method, Modelica-based model splitting equipment and storage medium
WO2017054586A1 (en) Article inspection and examination system and method
Langner et al. Framework for using real driving data in automotive feature development and validation
Soubra et al. Functional size measurement for processor load estimation in AUTOSAR

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20964655

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20964655

Country of ref document: EP

Kind code of ref document: A1