Joint simulation system, method, device cluster, storage medium and program product

Through a distributed joint simulation system and a unified simulation interface protocol, the problem of inconsistent performance limitations and interface protocols of a single device is solved, efficient simulation data interaction and system scalability are achieved, and simulation efficiency and scalability are improved.

CN118520706BActive Publication Date: 2024-11-12ALIBABA CLOUD FEITIAN (HANGZHOU) CLOUD COMPUTING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410985350.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-22
Publication Date
2024-11-12
Estimated Expiration
2044-07-22

AI Technical Summary

Technical Problem

The existing joint simulation technology is limited by the performance of a single device, resulting in poor simulation efficiency and scalability, and the interface protocols of different simulation examples are inconsistent, resulting in difficult data interaction, which in turn reduces simulation efficiency.

Method used

Adopting a distributed joint simulation system, the simulation management module and the distributed protocol of the main control node and the simulation interface protocol of the work node and the distributed computing power are communicated, so that the collaborative simulation between multiple devices is realized, and the unified interface facilitates different simulation examples. access and data interaction.

Benefits of technology

It improves simulation efficiency and scalability, reduces resource conflicts, improves data interaction efficiency between different simulation examples, and reduces access costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118520706B_ABST
    Figure CN118520706B_ABST
Patent Text Reader

Abstract

The present application provides a joint simulation system, method, device cluster, storage medium and program product. The joint simulation system includes: a simulation management module, which is used to manage the startup and / or shutdown of a master control node and multiple working nodes when a joint simulation request is received; a master control node, which is used to control multiple working nodes; multiple working nodes and the simulation management module are all connected to the master control node in communication, and each working node is provided with a first interface; the first interface is defined by a simulation interface protocol using a distributed protocol and distributed computing capabilities; multiple working nodes are used to access the simulation instance specified by the joint simulation request through their respective first interfaces based on the control of the master control node, and jointly simulate each simulation instance based on the dependency relationship between the simulation instances. According to the embodiments of the present application, the simulation efficiency and scalability of the joint simulation system can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud computing and simulation technology, and in particular to a joint simulation system, method, device cluster, storage medium and program product. Background Art

[0002] Co-simulation technology can combine different simulation instances (including simulation models, simulation software, simulation methods, simulation systems, etc.) to better simulate and predict the behavior of the system. It can be applied to various application fields, such as mechanical engineering, aerospace, automotive engineering, energy, biomedicine and environmental science. The core of co-simulation technology is to connect different simulation instances to achieve data and information sharing. Some existing co-simulation technologies usually connect and share different simulation instances on a single device. The performance of a single device has a great impact and limitation on the co-simulation capability, and the efficiency and scalability of co-simulation are poor. In some co-simulation technologies, the protocols of the interfaces used to access the subsystems of each simulation instance are inconsistent, such as FMI (Functional Mock-up Interface), RTI / HLA (Run-Time Infrastructure / High Level Architecture), etc., which makes it difficult for each simulation instance to interact with each other, and thus the efficiency of co-simulation is poor. Summary of the invention

[0003] The embodiments of the present application provide a joint simulation system, method, device cluster, storage medium and program product to solve the above-mentioned technical problems.

[0004] In the first aspect, an embodiment of the present application provides a joint simulation system including: a simulation management module, which is used to manage the startup and / or shutdown of a master control node and multiple working nodes when a joint simulation request is received; a master control node, which is used to control multiple working nodes; multiple working nodes and the simulation management module are all communicated with the master control node, and each working node is provided with a first interface; the first interface is defined by a simulation interface protocol that uses a distributed protocol and distributed computing capabilities; multiple working nodes are used to access the simulation instance specified by the joint simulation request through their respective first interfaces based on the control of the master control node, and jointly simulate each simulation instance based on the dependency relationship between the simulation instances.

[0005] In a second aspect, an embodiment of the present application provides a joint simulation method, which is applied to the joint simulation system provided in the first aspect of the embodiment of the present application, the method comprising: when the simulation management module receives a joint simulation request, starting a master control node and multiple working nodes; the started master control node controls the started multiple working nodes, so that the started multiple working nodes access the simulation instance specified by the joint simulation request through their respective first interfaces, and jointly simulate each simulation instance based on the dependency relationship between the simulation instances; the first interface is defined by a simulation interface protocol that uses a distributed protocol and distributed computing capabilities.

[0006] In a third aspect, an embodiment of the present application provides a joint simulation method, which is applied to a simulation management module in a joint simulation system provided in the first aspect of the embodiment of the present application, and the method includes:

[0007] When receiving a joint simulation request, start the master control node and multiple working nodes, so that the started master control node controls the started multiple working nodes to implement the following operations: access the simulation instance specified by the joint simulation request through their respective first interfaces, and perform joint simulation on each simulation instance based on the dependency relationship between the simulation instances;

[0008] The first interface is defined by a simulation interface protocol using a distributed protocol and distributed computing capabilities.

[0009] In a fourth aspect, an embodiment of the present application provides a joint simulation method, which is applied to a working node in the joint simulation system provided in the first aspect of the embodiment of the present application, and the method includes:

[0010] Based on the control of the started master control node, access the simulation instance specified by the joint simulation request through the current first interface, and simulate the current simulation instance based on the dependency relationship between the current simulation instance and other simulation instances;

[0011] The joint simulation request is received by a simulation management module in the joint simulation system. The current first interface is defined by a simulation interface protocol using a distributed protocol and distributed computing capabilities.

[0012] In a fifth aspect, an embodiment of the present application provides a device cluster, including multiple distributed electronic devices, on which the joint simulation system provided in the first aspect of the embodiment of the present application is deployed.

[0013] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, any one of the joint simulation methods provided in the embodiments of the present application is implemented.

[0014] In a seventh aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements any one of the joint simulation methods provided in the embodiments of the present application.

[0015] Compared with the related art, this application has the following advantages:

[0016] The technology provided in the embodiment of the present application adopts a distributed joint simulation system to access and run simulation instances in a distributed manner. The entire joint simulation system may not be limited to one device, but may be deployed on different devices. This distributed deployment method may fully utilize the performance of each device, reduce resource conflicts between different simulation instances, and improve overall simulation efficiency and scalability. The simulation interface protocol based on the use of distributed protocols and distributed computing capabilities can unify each first interface, facilitate the access of different simulation instances to the current joint simulation system, strengthen data interaction between different simulation instances, and thereby improve the efficiency of data interaction, improve joint simulation efficiency, and reduce access costs.

[0017] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the multiple drawings represent the same or similar parts or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings only depict some embodiments according to the present application and should not be regarded as limiting the scope of the present application.

[0019] Figure 1 A schematic diagram of the structural framework of a joint simulation system provided in an embodiment of the present application is shown;

[0020] Figure 2 A schematic diagram of the structural framework of another joint simulation system provided in an embodiment of the present application is shown;

[0021] Figure 3 A schematic diagram of a joint simulation method provided in an embodiment of the present application is shown;

[0022] Figure 4 An example diagram showing a specific application of the joint simulation solution provided in the embodiments of the present application;

[0023] Figure 5 A block diagram of an electronic device used to implement an embodiment of the present application is shown. DETAILED DESCRIPTION

[0024] In the following, only some exemplary embodiments are briefly described. As those skilled in the art will appreciate, the described embodiments may be modified in various ways without departing from the concept or scope of the present application. Therefore, the drawings and descriptions are considered to be exemplary in nature and not restrictive.

[0025] To facilitate understanding of the technical solutions of the embodiments of the present application, the following describes the related technologies of the embodiments of the present application. The following related technologies can be combined with the technical solutions of the embodiments of the present application as optional solutions, and they all belong to the protection scope of the embodiments of the present application.

[0026] First, some technical terms involved in the embodiments of the present application are explained as follows:

[0027] Joint simulation: refers to combining multiple simulation instances (including simulation models, simulation software, simulation methods, simulation systems, etc.) to perform simulation in order to improve simulation efficiency and accuracy.

[0028] FMI-like (Functional Mock-up Interface) protocol: A simulation interface protocol that uses distributed protocols and distributed computing capabilities. It is an open, standard, and extensible simulation interface protocol that can support data exchange and collaborative simulation between different simulation instances.

[0029] SDK (Software Development Kit): Used to develop applications based on a specific platform.

[0030] Cloud native technology: An application development paradigm based on cloud computing technology that aims to improve the scalability, maintainability, and deployability of applications.

[0031] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The several specific embodiments listed can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0032] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0033] The present application embodiment provides a joint simulation system, such as Figure 1 As shown, the system is a distributed system, which includes a simulation management module, a master node and multiple worker nodes. The multiple worker nodes and the simulation management module are all connected to the master node in communication, and each worker node is provided with a first interface. The number of simulation management modules and the number of master nodes can be at least one. Figure 1 A simulation management module, a master control node and two working nodes are taken as examples.

[0034] The simulation management module can be used to manage the startup and / or shutdown of the master control node and multiple working nodes when a joint simulation request is received. The simulation management module can be connected to the client for communication, and the joint simulation request can be sent by the client to the simulation management module; the master control node can be used to control multiple working nodes; the multiple working nodes can be used to access the simulation instance specified by the joint simulation request through their respective first interfaces based on the control of the master control node, and jointly simulate each simulation instance based on the dependency relationship between the simulation instances.

[0035] The above-mentioned simulation instance may include a simulation model, simulation software, simulation method, simulation system, etc. customized by the developer. The above-mentioned first interface is defined by a simulation interface protocol using a distributed protocol and distributed computing capabilities. For example, the first interface may be defined by a class FMI protocol. Compared with protocols such as FMI, RTI / HLA, the class FMI protocol is a multi-language class protocol that can provide protocols in multiple languages ​​such as python and java. Users do not need to modify the underlying code, which is convenient for user integration. The first interface may be an SDK interface.

[0036] The above-mentioned joint simulation system provided in the embodiment of the present application is a distributed system including a simulation management module, a master control node and multiple working nodes. The operation of multiple simulation instances is achieved by the simulation management module controlling the master control node, and then the master control node controlling each working node. The entire joint simulation system may not be limited to one device, but may be deployed on different devices. This distributed deployment method may make full use of the performance of each device, effectively improve the joint simulation capability, and then improve the efficiency and scalability of the joint simulation. The simulation interface protocol based on the use of distributed protocols and distributed computing capabilities can unify each first interface, facilitate the access of different simulation instances to the current joint simulation system, strengthen the data interaction between different simulation instances, and then improve the efficiency of data interaction, improve the efficiency of joint simulation, and reduce access costs.

[0037] In one possible implementation, Figure 2As shown, the simulation management module may include a second interface and a joint scene controller. The second interface is used to implement data interaction with the joint scene controller; the joint scene controller may be used to start or shut down the master node and multiple working nodes based on the data interaction between the second interface and the joint scene controller.

[0038] Exemplarily, the second interface may be defined by a FMI-like protocol. Based on the FMI-like protocol, the second interface may exchange control data of simulation instances in different fields and languages ​​with the joint scene controller.

[0039] The joint scene controller may be a custom controller (Operator), which is a tool for managing the simulation environment and can automatically perform some common tasks, such as parameter configuration, address configuration, monitoring node loading, and health check.

[0040] In a possible implementation, the joint scene controller can be used to: configure the timing synchronizer and timing message queue of the master control node when starting the master control node, and start the timing synchronizer and the timing message queue. Among them, the timing synchronizer can be used to synchronize the time of each working node, and the timing message queue can be used to store the timing relationship of the events of each working node. Correspondingly, when jointly simulating each simulation instance based on the dependency relationship between each simulation instance, multiple working nodes can be used to: run the simulation instance connected to each other based on the timing relationship of each event in the timing message queue.

[0041] There is usually an input-output dependency between simulation instances in different fields that need to be jointly simulated. For example, the output of simulation instance A may be the input of simulation instance B, that is, the operation of simulation instance B depends on the output of simulation instance A. For another example, the outputs of simulation instance A and simulation instance B may be used as the input of simulation instance C together, that is, the operation of simulation instance C depends on the outputs of simulation instance A and simulation instance B. After configuring and starting the timing message queue, the above dependency can be stored in the timing message queue in the form of a timing relationship. Based on this timing relationship, each simulation instance can be run in order without causing confusion in the running order of each simulation instance. After configuring and starting the timing synchronizer, the timing of each working node can be synchronized. In some simulation scenarios, the timing of each working node can be synchronized at the ms (millisecond) level. On this basis, the timing relationship in the timing message queue is an accurate timing relationship established on the basis of timing synchronization. Running each simulation instance based on this accurate timing relationship can improve the accuracy of joint simulation.

[0042] In a possible implementation, the joint scenario controller can be used to: configure the event publisher and event subscriber of each working node when starting multiple working nodes. Correspondingly, each working node can be used to: when running the respective connected simulation instance based on the timing relationship of each event in the timing message queue, subscribe to the first event from the timing message queue through the event subscriber in the working node, and run the current simulation instance based on the first event; when the current simulation instance is completed, publish the second event to the timing message queue through the event publisher in the working node.

[0043] For example, the output result of the current simulation instance may be published as a second event to a time series message queue, so that an event subscriber in another working node may subscribe to the second event.

[0044] The first event and the second event are used to distinguish the subscribed events and the published events in the process of one subscription and publication. That is, in the process of one subscription and publication, the first event and the second event are used to indicate that the subscribed events and the published events are different events. It does not mean that in the process of multiple subscriptions and publications, the events subscribed each time are the same and the events published each time are the same. In the process of multiple subscriptions and publications, the events subscribed each time are different, and they can also be called first events, and the events published each time are different, and they can also be called second events.

[0045] Based on event subscribers and event publishers, the working nodes of the embodiments of the present application can adopt an event-driven architecture to achieve efficient transmission and processing of messages between different simulation instances. When the master control node synchronizes the timing of each working node, for example, synchronization at the ms level, the message transmission between the working nodes can also be controlled at the ms to 10ms level according to timeliness requirements and data volume, thereby reducing simulation time and reducing simulation overhead.

[0046] In another possible implementation, the timing synchronizer and timing message queue in the master control node, as well as the event publisher and event subscriber in the working node, can be pre-configured. When starting the control node and multiple working nodes, the joint scene controller can directly start the timing synchronizer and timing message queue pre-configured in the master control node, and directly start the event publisher and event subscriber pre-configured in the working node, without the need to configure them each time they are started.

[0047] In one example, TISC (a multi-physics collaborative simulation environment platform) can be used as a timing simulation engine, which can provide a timing synchronizer and a timing message queue, and can support efficient processing and analysis of timing data.

[0048] In another example, COSIM (a collaborative simulation platform based on component technology) can be used as a simulation engine. The simulation engine can provide the above-mentioned first interface to support the access of simulation instances in multiple simulation fields. The simulation engine can provide an event publisher and an event subscriber, and adopt an event-driven architecture to achieve efficient message transmission and processing, thereby realizing the operation of each simulation instance.

[0049] In a possible implementation, the joint scene controller may also be used to configure running resources, initialization states, and auxiliary functions for multiple simulation instances when starting the master node and multiple working nodes.

[0050] Among them, the running resources may include the resources of the master node and the resources of the working nodes. The configuration of the running resources may include allocating corresponding master nodes and working nodes to each simulation instance at startup, which master node or nodes control the simulation of the working nodes, which working nodes implement the simulation, and configuring corresponding timing synchronizers, timing message queues, event publishers, event subscribers and other functional modules in the master node and the working node.

[0051] The configuration of the initialization state may include pulling up the simulation instance in the container of the working node and starting the simulation instance and its operating environment. Auxiliary functions may include health checks or other auxiliary functions required in actual simulation scenarios. After configuring the health check function, the quality of the simulation instance connected to each working node can be checked to determine whether it has defects. The quality of the simulation instance connected to the current joint simulation system is usually uncontrollable, and there may be problems that cannot run normally after only running for a few seconds or minutes. Checking the quality of the simulation instance can troubleshoot possible problems so that the problems can be solved in time to ensure the normal operation of the simulation instance.

[0052] Based on the second interface and the joint scenario controller, personalized configuration can be performed according to the needs of the simulation instance, making the joint simulation capabilities more flexible and adjustable, and flexibly meeting the simulation needs of different application scenarios.

[0053] In one possible implementation, the joint scene controller can also be used to: when starting the master control node and multiple working nodes, configure at least one functional module or indicator such as the variable management module, event management module, time management module, simulation control module, state management module, timing indicator, etc. in the master control node and each working node.

[0054] Among them, the variable management module can be used to manage the variables interacting between simulation instances. Taking the joint simulation of traffic micro-simulation and passenger flow simulation of high-speed railway stations as an example, the variables can include the data that changes in real time, such as the time when vehicles arrive at the boarding point and the time when people arrive at the boarding point during the traffic micro-simulation process. The event management module can be used to manage events. The time management module can be used to manage time to ensure that all simulation instances run under the same time reference. The time management module of the master node can manage the time of the timing synchronizer, and then synchronize the time of the working node through the timing synchronizer. The simulation control module can be used to control the running process of the simulation instance, for example, the running process of the simulation instance can be controlled based on the simulation speed, simulation parameters, simulation indicators, etc. input or modified by the user. The state management module can be used to manage the real-time simulation state. Taking the joint simulation of traffic micro-simulation and passenger flow simulation of high-speed railway stations as an example, the simulation state can be the real-time state of people and vehicles at each moment, such as how many people are waiting in line for the bus. Timing indicators may include the timing relationships involved in the running process of a simulation instance. Taking the joint simulation of traffic micro-simulation and passenger flow simulation of a high-speed railway station as an example, timing indicators may include the time-based timing relationship between personnel and vehicles. This timing relationship can be used to analyze the simulation effect of the entire simulation instance, and then to analyze the simulation effect of the entire joint simulation.

[0055] In one possible implementation, Figure 2 As shown, in the joint simulation system provided in an embodiment of the present application, the simulation management module may include a third interface for interacting with the client during the operation of the simulation instance, so as to facilitate the user to timely understand the operation data generated during the operation of the simulation instance and manage the operation data.

[0056] The interactive data may include simulation speed, simulation parameters, simulation indicators and other data. Users can control the simulation process through these data. Simulation parameters may include parameters that can be modified during the running of the simulation instance, and simulation indicators may include indicator results during the running of the simulation instance.

[0057] In one example, the joint simulation system can send the current simulation speed, simulation parameters, and simulation indicators to the client through a third interface, and the user can modify the received simulation speed, simulation parameters, and simulation indicators through the client and the data interaction function of the third interface to achieve simulation control.

[0058] Exemplarily, the third interface can be defined by a class FMI protocol. The number of the third interface can be one or more, and different data can be exchanged through one interactive server interface, or different data can be exchanged through multiple third interfaces. Based on the class FMI protocol, the third interface can exchange running data of simulation instances in different fields and languages ​​with the client.

[0059] In one possible implementation, the joint simulation system provided in the embodiment of the present application may also include a visualization tool, which can be used to provide a visualization interface to the client, and the visualization interface can be used to display the joint simulation process and joint simulation results of each simulation instance, so that users can view and manage the joint simulation process and joint simulation results of each simulation instance.

[0060] The visualization interface may include a visualization simulation monitoring interface, a simulation result analysis interface, etc. The simulation monitoring interface may display the simulation process of the joint simulation, so that users can conveniently view the running status and performance indicators of each simulation instance in the joint scenario. For example, the above-mentioned simulation speed, simulation parameters and simulation indicators may be viewed. The simulation result analysis interface may display the simulation results of the joint simulation, so that users can conveniently view the output results of each simulation instance in the joint scenario and conduct in-depth analysis and mining.

[0061] The visualization interface can combine multiple simulation scenarios together and present them to the user. As a configurable joint simulation scenario debugging page, it improves the scene visualization arrangement and construction capabilities of the joint simulation system. Users can edit and manage the simulation process and simulation results through the visualization interface.

[0062] In one possible implementation, Figure 2 As shown, the simulation management module may further include a fourth interface, which may be used to interact with the scene controller for data and manage the simulation state of each simulation instance. The fourth interface may be defined by a class FMI protocol. In practical applications, the fourth interface and the second interface may be different interfaces or may share one interface.

[0063] In a possible implementation, the joint simulation system may be a container orchestration system, and each functional module in the joint simulation system may be deployed in the container orchestration system in a microservice architecture.

[0064] Deploying a joint simulation system in a container orchestration system is an application of cloud native technology in joint simulation. The application of the joint simulation system and its dependencies can be packaged into lightweight, portable containers. This deployment method achieves environmental consistency and ensures the same behavior no matter where it is deployed. It can also make better use of cloud resources and ensure the high availability and scalability of the joint simulation system. For example, cloud resources can be dynamically scheduled based on the number of simulation instances and simulation requirements to improve the high concurrency capability of the joint simulation system (the ability of the application to process multiple requests simultaneously). In some application scenarios, the joint simulation system can have a simulation capability of more than 1,000 concurrent requests.

[0065] The microservice architecture can be used to split the application of the joint simulation system into independent, reusable services or functional modules. For example, each service or functional module can be responsible for a specific function and deployed in different container groups or different containers to achieve better management and deployment of the joint simulation system, thereby improving the maintainability, scalability and deployment flexibility of the joint simulation system.

[0066] The container orchestration system may be a Kubernetes cluster (used to manage containerized applications on multiple hosts in a cloud platform). Using a Kubernetes cluster to automatically deploy, manage, and adjust services for containerized applications can ensure high availability and resource optimization.

[0067] Based on the same technical concept, the embodiment of the present application also provides a joint simulation method, which can be applied to the above-mentioned joint simulation system, such as Figure 3 As shown, the method may include the following steps S301 and S302:

[0068] S301, when receiving a joint simulation request, the simulation management module starts a master control node and multiple working nodes.

[0069] S302, the started master control node controls the started multiple working nodes, so that the started multiple working nodes access the simulation instance specified by the joint simulation request through their respective first interfaces, and jointly simulate the simulation instances based on the dependency relationship between the simulation instances.

[0070] The first interface can be defined by a simulation interface protocol that uses a distributed protocol and distributed computing capabilities, for example, it can be defined by a class FMI protocol. The simulation instance specified by the joint simulation request can be simulation instances in multiple different fields, so that the first interfaces of different working nodes can access simulation instances in different fields.

[0071] In combination with the above-mentioned joint simulation system, the joint simulation method provided by the embodiment of the present application can access and run simulation instances in a distributed manner, can utilize more resources to realize joint simulation, reduce resource conflicts between different simulation instances, and improve overall simulation efficiency and scalability. The simulation interface protocol using distributed protocols and distributed computing capabilities can unify the interface of each working node for accessing the simulation instance, i.e., the first interface, to facilitate accessing different simulation instances to the current joint simulation system, can strengthen the data interaction between different simulation instances, thereby improving the efficiency of data interaction, improving the efficiency of joint simulation, and reducing access costs.

[0072] In a possible implementation, in step S301, the startup process of the master control node may include: configuring the timing synchronizer and timing message queue of the master control node, and starting the timing synchronizer and timing message queue. Among them, the timing synchronizer can be used to synchronize the time of each working node, and the timing message queue can be used to store the timing relationship of the events of each working node. Correspondingly, in step S302, the joint simulation of each simulation instance based on the dependency relationship between the simulation instances may include: running the respective connected simulation instances based on the timing relationship of each event in the timing message queue.

[0073] In a possible implementation, in step S301, the startup process of multiple working nodes may include: configuring the event publisher and event subscriber of each working node. Correspondingly, running the simulation instances connected to each other based on the timing relationship of each event in the timing message queue may include: for each started working node, the event subscriber in the working node subscribes to the first event from the timing message queue, and runs the current simulation instance based on the first event; when the current simulation instance is completed, the event publisher in the working node publishes the second event to the timing message queue, for example, the output result of the current simulation instance can be published as the second event to the timing message queue, so that the event subscribers in other working nodes can subscribe to the second event.

[0074] In another possible implementation, in step S301, starting the master control node and multiple working nodes may include: starting the pre-configured timing synchronizer and timing message queue in the master control node, and starting the pre-configured event publisher and event subscriber in each working node, without the need to configure each time the nodes are started.

[0075] In a possible implementation, in step S301, starting the master control node and multiple working nodes may include: in response to data interaction between the second interface in the simulation management module and the joint scene controller, the joint scene controller configures running resources, initialization states, and auxiliary functions for multiple simulation instances. The running resources may include resources of the master control node and resources of the working nodes.

[0076] In a possible implementation, in step S301, starting the master control node and multiple working nodes may also include: configuring at least one functional module or indicator such as a variable management module, an event management module, a time management module, a simulation control module, a state management module, and a timing indicator in the master control node and each working node, so as to facilitate the management of various parameters, variables, etc. of the joint simulation.

[0077] In a possible implementation, the joint simulation method provided in the embodiment of the present application may further include: interacting with the client through a third interface during the operation of the simulation instance. The interacted data may include simulation speed, simulation parameters, simulation indicators and other data.

[0078] In a possible implementation, the joint simulation method provided in the embodiment of the present application further includes: providing a visualization interface to the client through a visualization tool, and the visualization interface can be used to display the joint simulation process and joint simulation results of each simulation instance. So that the user can view and manage the joint simulation process and joint simulation results of each simulation instance. The visualization interface may include a visualization simulation monitoring interface, a simulation result analysis interface, etc., and the specific interface type can be set according to actual needs.

[0079] Based on the same technical concept, the embodiment of the present application also provides a joint simulation method, which can be applied to the simulation management module in the joint simulation system provided by the embodiment of the present application. The method includes: when receiving a joint simulation request, starting a master control node and multiple working nodes, so that the started master control node controls the started multiple working nodes to implement the following operations: access the simulation instance specified by the joint simulation request through their respective first interfaces, and perform joint simulation on each simulation instance based on the dependency relationship between the simulation instances. The first interface is defined by a simulation interface protocol that uses a distributed protocol and distributed computing capabilities, for example, it can be defined by a class FMI protocol.

[0080] In an optional implementation, starting the master control node and multiple working nodes may include: configuring a timing synchronizer and a timing message queue of the master control node, and starting the timing synchronizer and the timing message queue; configuring an event publisher and an event subscriber of each working node.

[0081] In another optional implementation, starting the master node and multiple working nodes may include: starting the pre-configured timing synchronizer and timing message queue in the master node, and starting the pre-configured event publisher and event subscriber in each working node, without the need to configure each time the node is started.

[0082] In an optional implementation, starting the master control node and multiple working nodes may also include: configuring at least one functional module or indicator such as a variable management module, an event management module, a time management module, a simulation control module, a state management module, and a timing indicator in the master control node and each working node, so as to facilitate the management of various parameters, variables, etc. of the joint simulation.

[0083] In an optional implementation, starting the master control node and multiple working nodes may include: in response to the data interaction between the second interface and the joint scene controller in the simulation management module, the joint scene controller configures the running resources, initialization state and auxiliary functions for multiple simulation instances. The running resources may include the resources of the master control node and the resources of the working nodes. The startup of the master control node and the multiple working nodes can be controlled and implemented by the joint scene controller in the simulation management module, and the control of the startup by the joint scene controller can be executed based on the data interaction between it and the second interface. In terms of the startup sequence, the master control node can be started first and then the working node.

[0084] In an optional implementation, the above-mentioned joint simulation method applied to the simulation management module may further include: interacting with the client through a third interface during the operation of the simulation instance. The interacted data may include simulation speed, simulation parameters, simulation indicators and other data.

[0085] In an optional implementation, the above-mentioned joint simulation method applied to the simulation management module may further include: providing a visualization interface to the client through a visualization tool, and the visualization interface may be used to display the joint simulation process and joint simulation results of each simulation instance, so that the user can view and manage the joint simulation process and joint simulation results of each simulation instance.

[0086] Based on the same technical concept, the embodiment of the present application also provides a joint simulation method, which can be applied to the working node in the joint simulation system provided by the embodiment of the present application. The method may include: based on the control of the started master node, accessing the simulation instance specified by the joint simulation request through the current first interface, and simulating the current simulation instance based on the dependency relationship between the current simulation instance and other simulation instances. Wherein, the joint simulation request is received by the simulation management module in the joint simulation system, the current first interface is the first interface in the current working node, the current first interface can be defined by a simulation interface protocol using a distributed protocol and distributed computing capabilities, and the current simulation instance is a simulation instance of a field accessed by the current first interface.

[0087] In an optional implementation, simulating the current simulation instance based on the dependency relationship between the current simulation instance and other simulation instances may include: running the current simulation instance based on the timing relationship of events in the timing message queue. For example, a first event may be subscribed to from the timing message queue by an event subscriber in the current working node, and the current simulation instance may be run based on the first event; when the current simulation instance is finished running, the event publisher in the current working node may publish a second event to the timing message queue, for example, the output result of the current simulation instance may be published as a second event to the timing message queue, so that the event subscribers in other working nodes may subscribe to the second event.

[0088] The implementation principle and beneficial effects of the joint simulation method provided in the embodiment of the present application can be referred to the relevant contents of the joint simulation system embodiment, which will not be elaborated here.

[0089] Figure 4 An example of a specific application scenario of the joint simulation solution provided in the embodiment of the present application is shown. In this example, a joint simulation of traffic micro-simulation (simulating the movement of vehicles) and crowd flow simulation (simulating the movement of people) for evacuating passengers from a high-speed railway station is implemented. Figure 4 The overall principle of the joint simulation solution provided in the embodiment of the present application is introduced with the help of examples.

[0090] Reference Figure 4 The simulation management module includes multiple service interfaces (as the entrance to external services) and a joint scene controller. The service interface includes a second interface, a third interface and a fourth interface. The second interface can interact with the joint scene controller to realize the control of simulation start and stop. The fourth interface can interact with the joint scene controller to realize the management of simulation status. The third interface can interact with the client to exchange simulation speed, simulation parameters, simulation indicators and other data during the operation of a custom simulation model (hereinafter referred to as a custom model). When the joint simulation system receives a joint simulation request for traffic micro-simulation and crowd flow simulation sent by the user through the client, it can interact with the joint scene controller through the second interface to enable the joint scene controller to start the master node and the working node.

[0091] The master node is responsible for coordinating and managing the simulation process. After allocating resources and allocating corresponding nodes to the respective defined simulation models (hereinafter referred to as custom models), the master node is started first. In the process of starting the master node, the timing synchronizer, timing message queue, variable management, event management, time management, simulation control, state management, timing indicators, etc. in the master node can be automatically configured. The working node is responsible for executing the simulation task. After the master node is started, two working nodes are started. In the process of starting the working node, the event publisher, event subscriber, first interface, variable management, event management, time management, simulation control, state management, timing indicators, etc. in the working node can be automatically configured. The corresponding custom model 1 is connected through the first interface. Figure 4 Working node 1 in the system can be connected to custom model 1 for realizing traffic micro-simulation, and working node 2 can be connected to custom model 2 for realizing crowd flow simulation. Custom model 1 is pulled up in the container of working node 1 through the initialization operation, and custom model 2 is pulled up in the container of working node 2, so that custom model 1 can run in the container of working node 1, and custom model 2 can run in the container of working node 2. Health check can be used to check whether custom model 1 and custom model 2 can run normally.

[0092] After confirming that both custom models can run normally and the timing synchronizer of the master node has synchronized the timing of the two working nodes, the simulation engine of the working node 1 can request execution permission from the timing synchronizer of the master node. Step), after obtaining permission, the event subscriber in the working node one can subscribe to an event (hereinafter referred to as event one) from the time message queue of the master node. This event one shows that the passenger has arrived at the station. Based on this event one, the custom model one is run to make the vehicle start to enter the station. After the custom model one is run and the output result is obtained, the event publisher of the working node one can publish an event (hereinafter referred to as event two) to the timing message queue. This event two shows that the vehicle has arrived at the boarding point. The simulation engine of the working node two can request execution permission from the timing synchronizer of the master node. After obtaining permission, the event subscriber in the working node two can subscribe to this event two from the timing message queue. Based on this event two, the custom model two is run to make the passenger move to the boarding point to prepare to board the bus. After the custom model two is run and the output result is obtained, the event publisher of the working node two can publish an event (hereinafter referred to as event three) to the timing message queue. The event subscriber of the working node one can subscribe to this event three to realize a new round of subscription and publication.

[0093] In the first subscription and publishing process of working node 1, event 1 is used as the first event and event 2 is used as the second event. In the first subscription and publishing process of working node 2, event 2 is used as the first event and event 3 is used as the second event. In the second subscription and publishing process of working node 1, event 3 is used as the first event and the newly published event is used as the second event. Based on such multiple subscription and publishing message transmission, the master control node can coordinate the traffic micro-simulation of working node 1 and the pedestrian flow simulation of working node 2 to achieve joint simulation, which has good joint versatility.

[0094] After being displayed to the user through the simulation monitoring interface, the user can observe in real time when the vehicle moves to where and when the person moves to where. If there are 1,000 people and 100 vehicles in the public place, how long will it take for the 100 vehicles to pick up the 1,000 people? Can all 1,000 people be evacuated within the expected time period? If the joint simulation shows that the people cannot be evacuated within the expected time, the user can modify the corresponding variables through the simulation monitoring interface, for example, the number of vehicles can be modified, increasing from 100 to 200 vehicles; if the user thinks the simulation speed is too slow, the simulation speed can be modified through the simulation monitoring interface to speed up the simulation. Other simulation parameters and simulation indicators can also be modified in a similar way.

[0095] Based on the same technical concept, the present application also provides a device cluster, which includes multiple distributed electronic devices, each of which can deploy at least one container group, each container group includes at least one container, so as to form a container orchestration system. The joint simulation system provided by the embodiment of the present application can be deployed on the device cluster.

[0096] like Figure 5 As shown, the electronic device in the above device cluster may include: a memory 501 and a processor 502, wherein the memory 501 stores a computer program that can be run on the processor 502. When the processor 502 executes the computer program, the method in the above embodiment is implemented. The number of the memory 501 and the processor 502 may be one or more.

[0097] The electronic device also includes: a communication interface 503, which is used to communicate with external devices and perform data exchange transmission.

[0098] If the memory 501, the processor 502 and the communication interface 503 are implemented independently, the memory 501, the processor 502 and the communication interface 503 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0099] Optionally, in a specific implementation, if the memory 501, the processor 502 and the communication interface 503 are integrated on a chip, the memory 501, the processor 502 and the communication interface 503 can communicate with each other through an internal interface.

[0100] An embodiment of the present application provides a computer-readable storage medium storing a computer program, which implements the method provided in the embodiment of the present application when the program is executed by a processor.

[0101] An embodiment of the present application provides a computer program product, which may include a computer program, which, when executed by a processor, can implement the method provided in the embodiment of the present application.

[0102] An embodiment of the present application also provides a chip, which includes a processor for calling and executing instructions stored in the memory from the memory, so that a communication device equipped with the chip executes the method provided by the embodiment of the present application.

[0103] An embodiment of the present application also provides a chip, including: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected via an internal connection path, and the processor is used to execute the code in the memory. When the code is executed, the processor is used to execute the method provided in the embodiment of the application.

[0104] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor that supports the Advanced RISC Machines (ARM) architecture.

[0105] Further, optionally, the above-mentioned memory may include a read-only memory and a random access memory. The memory may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory. Among them, the non-volatile memory may include a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may include a random access memory (RAM), which is used as an external cache. By way of exemplary but not limiting description, many forms of RAM are available. For example, static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct memory bus random access memory (DR RAM).

[0106] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.

[0107] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples, unless they are contradictory.

[0108] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0109] Any process or method described in the flow chart or otherwise described herein can be understood as a module, fragment or portion of a code representing one or more executable instructions for implementing the steps of a specific logical function or process. And the scope of the preferred embodiment of the present application includes other implementations, in which the functions may not be performed in the order shown or discussed, including in a substantially simultaneous manner or in a reverse order according to the functions involved.

[0110] The logic and / or steps described in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, which can be embodied in any computer-readable medium for use by an instruction execution system, apparatus or device (such as a computer-based system, a system including a processor or other system that can fetch instructions from an instruction execution system, apparatus or device and execute instructions), or used in combination with these instruction execution systems, apparatuses or devices.

[0111] It should be understood that the various parts of the present application can be implemented with hardware, software, firmware or a combination thereof. In the above embodiments, multiple steps or methods can be implemented with software or firmware stored in a memory and executed by a suitable instruction execution system. All or part of the steps of the above embodiment method can be completed by instructing the relevant hardware through a program, which can be stored in a computer-readable storage medium, and when the program is executed, it includes one of the steps of the method embodiment or a combination thereof.

[0112] In addition, each functional unit in each embodiment of the present application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. If the above-mentioned integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. The storage medium can be a read-only memory, a disk or an optical disk, etc.

[0113] The above is only an exemplary embodiment of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various changes or substitutions within the technical scope recorded in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A joint simulation system, comprising: A simulation management module, used to manage the startup and / or shutdown of the master node and multiple working nodes when a joint simulation request is received; The master control node is used to control the multiple working nodes; The multiple working nodes and the simulation management module are all connected to the master control node in communication, and each working node is provided with a first interface; the first interface is defined by a simulation interface protocol using a distributed protocol and distributed computing capabilities; the multiple working nodes are used to access the simulation instance specified by the joint simulation request through their respective first interfaces based on the control of the master control node, and perform joint simulation on each simulation instance based on the dependency relationship between the simulation instances; The simulation management module includes: a second interface for realizing data interaction with the joint scene controller; the joint scene controller is used to start or shut down the master control node and the plurality of working nodes based on the data interaction between the second interface and the joint scene controller; The joint scene controller is also used to: when starting the master control node, configure the timing synchronizer and the timing message queue of the master control node, and start the timing synchronizer and the timing message queue; the timing synchronizer is used to synchronize the time of each working node, and the timing message queue is used to store the timing relationship of the events of each working node; The multiple working nodes are used to: when performing joint simulation on the simulation instances based on the dependency relationship between the simulation instances, run the simulation instances connected to them based on the timing relationship of the events in the timing message queue; The joint scene controller is also used to: configure the event publisher and event subscriber of each working node when starting the multiple working nodes; Each working node is also used for: when running the respective connected simulation instance based on the timing relationship of each event in the timing message queue, subscribing to a first event from the timing message queue through an event subscriber in the working node, and running the current simulation instance based on the first event; and when the current simulation instance is completed, publishing a second event to the timing message queue through an event publisher in the working node; The joint scene controller is also used to: configure the running resources, initialization state and auxiliary functions for the multiple simulation instances when starting the master control node and the multiple working nodes; the running resources include the resources of the master control node and the resources of the working nodes, and the auxiliary functions include health checks for checking the quality of the simulation instances; The joint scene controller is also used to: when starting the master control node and the multiple working nodes, configure at least one of the variable management module, event management module, time management module, simulation control module, state management module, and timing indicator in the master control node and each of the working nodes.

2. According to any one of the joint simulation systems of claim 1, the simulation management module comprises: The third interface is used to perform data interaction with the client during the running of the simulation instance.

3. The joint simulation system according to any one of claims 1, further comprising: The visualization tool is used to provide a visualization interface to the client, and the visualization interface is used to display the joint simulation process and joint simulation results of each simulation instance.

4. The joint simulation system according to any one of claims 1, wherein: The joint simulation system is a container orchestration system, and each functional module in the joint simulation system is deployed in the container orchestration system using a microservice architecture.

5. A joint simulation method, applied to the joint simulation system according to any one of claims 1 to 4, the method comprising: The simulation management module starts the master node and multiple working nodes when receiving the joint simulation request; The started master control node controls the started multiple working nodes, so that the started multiple working nodes access the simulation instance specified by the joint simulation request through their respective first interfaces, and perform joint simulation on each simulation instance based on the dependency relationship between the simulation instances; The first interface is defined by a simulation interface protocol using a distributed protocol and distributed computing capabilities.

6. The joint simulation method according to claim 5, further comprising at least one of the following operations: During the operation of the simulation instance, data is exchanged with the client through the third interface; A visualization interface is provided to the client; the visualization interface is used to display the joint simulation process and joint simulation results of each simulation instance.

7. A device cluster, comprising a plurality of distributed electronic devices, wherein the joint simulation system according to any one of claims 1 to 4 is deployed on the device cluster.

8. A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the joint simulation method according to any one of claims 5 to 6 is implemented.

9. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the joint simulation method according to any one of claims 5 to 6.