Distributed simulation method and system based on model splitting and electronic equipment
By splitting the simulation model into subsystem modules and simulating it on distributed computing nodes, the problem of huge computing resources and inefficient centralized processing of the simulation model is solved, and efficient simulation efficiency and scalability are achieved.
Patent Information
- Application Number
- CN202510556620.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-29
- Publication Date
- 2025-08-12
AI Technical Summary
In the prior art, simulation models have huge computing resources and low centralized processing efficiency, resulting in increased simulation time and difficulty in meeting real-time requirements. They also have high dependence on a single computing node, increased hardware cost and system complexity, and insufficient fault tolerance and scalability.
Through a distributed simulation method based on model splitting, the simulation model is split into multiple subsystem modules and deployed to different computing nodes for simulation, model structure information is used for effectiveness detection and accuracy verification, and distributed computing resources are used for parallel processing.
It improves simulation efficiency, reduces dependence on a single computing node, improves the scalability of the simulation model and the utilization efficiency of computing resources, and ensures the stability and data consistency of the simulation process.
Smart Images

Figure CN120469802A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of simulation testing technology, and in particular to a distributed simulation method, system and electronic equipment based on model splitting. Background Art
[0002] In the field of modern simulation technology, the complexity and scale of simulation models are increasing, especially in the simulation of complex systems involving multiple disciplines and fields, such as aerospace system simulation, large-scale industrial production process simulation, and complex transportation network simulation. Simulation models often contain a large number of subsystems and components, and there are complex interactions between the subsystems, resulting in extremely large computing resources required for the simulation process.
[0003] As the scale of simulation models continues to expand, the efficiency of traditional centralized simulation methods for processing complex models has plummeted. This not only significantly increases simulation time but also makes it difficult to meet the requirements of real-time or rapid iteration simulations. Furthermore, these methods place extremely high performance demands on individual computing nodes, increasing hardware costs and system complexity. Furthermore, centralized processing methods also lack fault tolerance and scalability. Failure of a central computing node can disrupt the entire simulation process. Therefore, to improve simulation efficiency and reduce reliance on a single computing node, a simulation method that effectively utilizes distributed computing resources is urgently needed. Summary of the Invention
[0004] The purpose of the embodiments of the present invention is to provide a distributed simulation method, system and electronic equipment based on model splitting, which solves the problems of huge simulation model computing resources and low centralized processing efficiency in the existing technology and improves the simulation efficiency of the simulation model.
[0005] To solve the above technical problems, an embodiment of the present invention provides a distributed simulation method based on model splitting, including: building a simulation model according to the user's simulation requirements, the top level of the simulation model including at least multiple subsystems; obtaining model structure information of the simulation model, performing validity detection on the simulation model according to the model structure information, and determining whether the simulation model is valid; when the simulation model is valid, splitting the simulation model into multiple subsystem modules corresponding to the subsystems according to the model structure information, and deploying each subsystem module to different computing nodes for simulation.
[0006] An embodiment of the present invention also provides a distributed simulation system based on model splitting, including: a model building module, used to build a simulation model according to the user's simulation requirements, and the top level of the simulation model includes at least multiple subsystems; a model verification module, used to obtain model structure information of the simulation model, and perform validity detection on the simulation model according to the model structure information to determine whether the simulation model is valid; a model splitting module, which splits the simulation model into multiple subsystem modules corresponding to the subsystems according to the model structure information, and deploys each subsystem module to different computing nodes for simulation.
[0007] An embodiment of the present invention also provides an electronic device, characterized in that it includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the steps of the distributed simulation method based on model splitting as described above.
[0008] In addition, in the method described above, the model structure information includes: topology structure information and data structure information; the validity check of the simulation model based on the model configuration information to determine whether the simulation model is valid includes: before the simulation model performs offline simulation, obtaining the topology structure information, and judging whether the simulation model satisfies a first preset rule based on the topology structure information; when the simulation model performs offline simulation, obtaining the data structure information, and judging whether the simulation model satisfies a second preset rule based on the data structure information; when the simulation model satisfies the first preset rule and the second preset rule, the simulation model is valid.
[0009] In addition, in the method described above, the topology information includes: any one of the number of subsystems in the simulation model, the connection relationship between the subsystems, the step size of the simulation model, and the number of data ports of each subsystem, or any combination thereof; the first preset rule includes at least: there is only one master subsystem and at least one slave subsystem among the multiple subsystems, and the step size of the simulation model is the same as the simulation step size of the master subsystem.
[0010] In addition, in the above method, the data structure information includes: the width and dimension of the transmission data between the subsystems.
[0011] In addition, in the method described above, before deploying each of the subsystem modules to different computing nodes for simulation, the method also includes: numbering each of the subsystem modules and verifying their accuracy one by one; after each of the subsystem modules passes the accuracy verification, generating a function code corresponding to the subsystem module based on the subsystem module.
[0012] In addition, the method described above also includes: if there is a target subsystem module that fails to pass the accuracy verification, the number of the target subsystem module is recorded, and the target subsystem corresponding to the target subsystem module in the simulation model is modified to obtain an updated simulation model; according to the model structure information of the updated simulation model and the number of the target subsystem module, the updated target subsystem module is split out in the updated simulation model; and the accuracy of the updated target subsystem module is verified.
[0013] In addition, in the method described above, each of the subsystem modules is deployed to a different computing node for simulation, including: compiling the functional codes corresponding to each of the subsystem modules into executable programs to obtain multiple executable programs; distributing the multiple executable programs to different computing nodes; running the executable programs, and buffering and synchronizing the simulation data generated by the execution of the executable programs on different computing nodes.
[0014] In addition, in the method described above, after the updated target subsystem module passes the accuracy verification, the subsystem modules are deployed to different computing nodes for simulation, including: the subsystem modules other than the target subsystem module in each subsystem module and the updated target subsystem module are deployed to different computing nodes for simulation.
[0015] The embodiment of the present invention decomposes complex simulation models into functionally independent subsystem modules and distributes them to different computing nodes through a hierarchical splitting and distributed deployment mechanism based on model structure information, effectively avoiding the performance limitations of a single node, realizing parallel processing of computing tasks and coordinated utilization of distributed resources, and significantly improving the efficiency and scalability of large-scale complex system simulation. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] One or more embodiments are exemplarily illustrated by pictures in the corresponding drawings. These exemplifications do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings are represented as similar elements. Unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0017] Figure 1 This is a distributed simulation method process based on model splitting according to an embodiment of the present invention Figure 1;
[0018] Figure 2 This is a distributed simulation method process based on model splitting according to an embodiment of the present invention Figure 2 ;
[0019] Figure 3 This is a distributed simulation method process based on model splitting according to an embodiment of the present invention Figure 3 ;
[0020] Figure 4 This is a distributed simulation method process based on model splitting according to an embodiment of the present invention Figure 4 ;
[0021] Figure 5 FIG. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0022] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, each embodiment of the present invention will be described in detail below with reference to the accompanying drawings. However, it will be understood by those skilled in the art that in each embodiment of the present invention, many technical details are provided to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical solutions claimed in this application can be implemented. The division of the following embodiments is for convenience of description and should not constitute any limitation on the specific implementation of the present invention. The various embodiments can be combined with each other and referenced to each other under the premise that there is no contradiction.
[0023] The terms "first" and "second" in the embodiments of the present application are only used for descriptive purposes and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present application, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusions. For example, a system, product or device comprising a series of components or units is not limited to the listed components or units, but may optionally also include components or units that are not listed, or may optionally also include other components or units that are inherent to these products or devices. In the description of the present application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0024] The embodiment of the present invention provides a distributed simulation method based on model splitting, such as Figure 1 As shown in , the specific steps include the following.
[0025] Step 101: Build a simulation model according to the user's simulation requirements. The top level of the simulation model includes at least multiple subsystems.
[0026] In this embodiment, the top level of the simulation model refers to the model's root level, which is the main canvas that users see when they first create or open a model. A subsystem encapsulates specific functional logic (such as controllers, motor models, and sensors) to achieve modular design.
[0027] Specifically, the user's simulation requirements can be obtained through options or text input, and a simulation model can be built according to the user's simulation requirements, or the user can build it according to the requirements. This embodiment does not impose any specific restrictions on the building process. The simulation model can use professional simulation software (such as MATLAB / Simulink, etc.). According to the building requirements, multiple subsystems are selected to build the simulation model. Each subsystem corresponds to a relatively independent functional area in the actual system. At the same time, the interface definition between the subsystems is ensured to be clear to facilitate subsequent splitting and interaction. For example, in a vehicle dynamics simulation model, the top-level subsystem can be divided into an engine subsystem, a chassis subsystem, a body subsystem, etc., and each subsystem simulates the dynamic characteristics of the corresponding part. In addition, when building simulation models for certain specific areas or functions, in addition to containing multiple subsystems, the top-level simulation model also needs to include functional modules. Functional modules refer to a type of module that does not directly implement the algorithm or physical model logic, but provides initial parameters, interfaces, etc. for the simulation model. For example, when building a simulation model involving electricity, the top-level simulation model also needs to set up a functional module powergui in addition to multiple subsystems. This functional module is used to provide power system simulation parameters. Functional modules may also include global control modules (such as System Enable, enabling / disabling subsystems), signal interface modules (such as System Outputs, defining model output signals), data management (such as To Workspace, exporting data to the MATLAB workspace), and basic signal sources / receivers (such as Ground, Terminator, etc. to avoid floating signals). This embodiment does not impose specific restrictions on functional modules, and you can choose according to the construction requirements.
[0028] Step 102: Obtain model structure information of the simulation model, perform validity detection on the simulation model according to the model structure information, and determine whether the simulation model is valid.
[0029] Among them, the model structure information covers the composition architecture of the simulation model, the connection relationship between subsystems, input and output interfaces, data interaction methods, and functional definitions of each subsystem. It is a description of the overall architecture and internal logic of the simulation model, and is used to clarify the composition of the model and the interaction rules between its parts.
[0030] Specifically, obtaining model structure information can be achieved by parsing the model file generated by the modeling tool, reading the metadata of the model, or utilizing the interface provided by the model itself, and this embodiment does not impose any restrictions on this. After obtaining the model structure information, the simulation model is subjected to validity testing. The purpose of the validity testing is to ensure that the simulation model can accurately reflect the behavior and characteristics of the actual system. The detection content may include the integrity of the model (whether it contains all necessary subsystems and components), consistency (whether the interfaces between subsystems match, whether the data interaction rules are unified), rationality (whether the parameter settings of the model conform to the actual physical laws, whether the logical flow is correct), etc., and this embodiment does not impose any specific restrictions on this. The validity test can use an automated detection tool to analyze the model structure information through preset detection rules, or it can be combined with manual review to verify the key parts of the model. For example, check whether the input and output data types between subsystems match, whether there are circular dependencies or logical errors in the connection relationship, and ensure that the model is structurally reasonable and feasible, thereby ensuring that the model can be normally split without affecting the overall simulation.
[0031] In one example, the model structure information includes: topology structure information and data structure information;
[0032] In this case, if Figure 2 As shown, step 102 may specifically include the following steps:
[0033] Step 1021: Before the simulation model performs offline simulation, topology structure information is obtained, and whether the simulation model satisfies a first preset rule is determined based on the topology structure information.
[0034] Step 1022: When the simulation model performs offline simulation, data structure information is obtained, and whether the simulation model satisfies a second preset rule is determined based on the data structure information.
[0035] Step 1023: When the simulation model satisfies the first preset rule and the second preset rule, the simulation model is valid.
[0036] Specifically, model structure information can be divided into topology information and data structure information. Topology information is used to characterize the connection relationship, hierarchical architecture and interaction logic of each subsystem in the simulation model, such as the signal transmission path, control flow direction or physical connection relationship between subsystems; data structure information includes the format, type, dimension and data interaction protocol of the input and output data of each subsystem, such as the accuracy requirements of numerical data, the timestamp rules of signal data or the data encapsulation format.
[0037] Corresponding to the division of model structure information, validity detection can be divided into two dimensions, namely topology structure validity detection and data structure validity detection. Before the simulation model is simulated offline in the simulation tool, the topology structure information is obtained for detection. The topology structure validity detection obtains the connection relationship between subsystems, the number of input and output ports, port connections, dependency trees and other topology structure information, and verifies based on the first preset rule (such as no circular dependency, no isolated nodes, interface matching rules, etc. in the subsystem connection). For example, if the output port of a subsystem is not connected to the input port of any other subsystem, or there are multiple subsystems forming a closed-loop call link, it is determined that the topology structure does not meet the first preset rule. This embodiment does not make specific restrictions on the first preset rule, and it can be set based on actual needs.
[0038] In one example, the topology information includes any one or any combination of the number of subsystems in the simulation model, the connections between the subsystems, the step size of the simulation model, and the number of data ports in each subsystem. In this case, the first preset rule includes at least the following: among the multiple subsystems, there is one and only one master subsystem and at least one slave subsystem, and the step size of the simulation model is the same as the simulation step size of the master subsystem. In this embodiment, the master subsystem can be manually set, or conditions for selecting the master subsystem can be set. For example, the subsystem with the shortest number of simulation steps in the simulation model is set as the master subsystem, and the step sizes of the slave subsystems are all integer multiples of the master subsystem.
[0039] When the simulation model is simulated offline in a simulation tool, data structure information generated during the offline simulation process is obtained and the validity of the data structure information is checked. This can be done by reading the model data dictionary, interface definition file, or metadata description to obtain data structure information such as the type, width, and dimension (e.g., scalar, vector, matrix) of each subsystem's data input and output, and data transmission frequency. Verification is then performed based on second preset rules (e.g., data type consistency, unit compatibility, data transmission timing matching, etc.). For example, if the speed data output by the power subsystem is floating point, while the input speed data required by the control subsystem is integer, or if only one-dimensional data transmission is supported between subsystems and the transmitted data is larger than one dimension, the second preset rule is not satisfied. This embodiment does not impose specific restrictions on the second preset rule.
[0040] Only when both of these dimensions pass testing—that is, the simulation model's topology conforms to logical interaction rules and its data interaction meets format and protocol requirements—is the model considered valid and can proceed to the subsequent splitting and distributed deployment process. This layered testing mechanism ensures that the model is feasible for distributed simulation at both the structural and data levels, avoiding distributed simulation failures caused by underlying connectivity or data incompatibilities.
[0041] Step 103: When the simulation model is valid, the simulation model is split into subsystem modules corresponding to multiple subsystems according to the model structure information, and each subsystem module is deployed to a different computing node for simulation.
[0042] Specifically, when splitting according to the model structure information, the principles to be followed can be the functional independence of the subsystem, the balance of computational complexity, and the locality of data interaction. For subsystems with strong functional independence, they are split into independent subsystem modules to reduce the coupling between modules. After splitting, the split subsystem modules are deployed. When deploying the subsystem modules, a distributed computing framework (such as Hadoop, Spark, MPI, etc.) can be used to perform reasonable task allocation based on the performance parameters of the computing nodes (such as CPU processing power, memory size, network bandwidth, etc.) and the computing requirements of the subsystem modules. The computing nodes in this embodiment can be physical devices with independent computing capabilities, such as servers, workstations, personal computers, etc., or virtual computing units, such as virtual machines and containers in a cloud computing environment. In a distributed system, multiple computing nodes work together through network connections to complete the simulation task together. When deploying, a static deployment method can be used to predetermine the computing nodes corresponding to each subsystem module before the simulation begins; a dynamic deployment method can also be used to adjust the deployment scheme in real time according to the load of each computing node during the simulation to achieve optimal utilization of computing resources. For example, subsystem modules with higher computational complexity are deployed to server nodes with higher performance, and subsystem modules with frequent data interactions are deployed on computing nodes with closer network connections to reduce data transmission delays and improve the efficiency of distributed simulation. This embodiment does not impose specific restrictions on this.
[0043] In one example, before deploying each subsystem module to different computing nodes for simulation in step 103, the method of this embodiment further includes:
[0044] Each subsystem module is numbered and accuracy is verified one by one; after each subsystem module has passed the accuracy verification, a function code corresponding to the subsystem module is generated based on the subsystem module.
[0045] Specifically, after the simulation model is split and formed into independent subsystem modules, the subsystem modules need to be numbered before deployment. Specifically, a systematic coding rule can be used to assign a unique identifier to each subsystem module. The coding rule can be set in combination with the model hierarchy, subsystem function type, and split order. This embodiment does not impose specific restrictions on the coding rule. The coding mechanism must be scalable to support the orderly management of newly added modules during subsequent model iterations. At the same time, it is convenient for computing nodes in the distributed system to quickly identify module functions and interactions through numbering, reducing matching costs during deployment.
[0046] After the modules are numbered, verification cases are developed for each subsystem module based on its design specifications and simulation requirements. The module functions are verified to be as expected by inputting preset stimulus signals and observing output responses. Verification methods include, but are not limited to: isolated testing of individual modules to verify their internal algorithm logic, boundary condition processing, and abnormal input responses (e.g., whether the error handling mechanism is triggered when the subsystem module receives an out-of-range value); checking whether the module input and output interfaces are consistent with the data structure definitions in the model structure information, such as whether the input port data type matches and whether the output port data unit complies with the simulation protocol; Model-in-the-Loop (MiL) testing: connecting the subsystem module with the virtual models of other related modules to verify the data interaction logic and functional linkage effects when multiple modules work together (e.g., whether the output torque data of the power subsystem module can be correctly parsed and the speed calculated by the transmission subsystem module). The verification process can be implemented in batches with the help of automated testing tools (e.g., Python unittest, Simulink Verification and Validation modules), generating a verification report and marking failed items until all subsystem modules pass the accuracy verification. This embodiment does not impose any specific restrictions on the specific accuracy verification methods and means. After verification, model-driven development (MBD) and other methods are used to generate functional code that can run on the target computing node for the verified subsystem modules. The generated functional code must include subsystem module initialization functions, data interaction interface functions, and core algorithm execution functions to meet the distributed computing framework's requirements for calling node executable files. Through the verification-first, then-coding process, the stability of the distributed simulation is guaranteed from the perspectives of subsystem module functional correctness and code executableness, preventing the failure of the entire distributed system due to the failure of a single subsystem module.
[0047] In one example, Figure 3 As shown, step 103 may specifically include the following steps:
[0048] Step 1031: Compile the function codes corresponding to the subsystem modules into executable programs respectively to obtain multiple executable programs.
[0049] Step 1032: Allocate multiple executable programs to different computing nodes respectively.
[0050] Step 1033: Run the executable program, and perform data buffering and synchronization on simulation data generated by the execution of the executable program on different computing nodes.
[0051] Specifically, after completing the accuracy verification of the subsystem module and generating the functional code, these codes need to be converted into executable programs that can be run directly on the target computing node. The compilation process needs to be configured specifically according to the hardware architecture of the computing node, the type of operating system, and the programming language and compiler used. For example, if the computing node is an x86 architecture server based on the Linux system and the functional code is written in C++, then the GCC compiler can be used for compilation. This embodiment does not limit the specific method of compilation. After compilation, the compiled executable program is distributed. The distribution needs to comprehensively consider multiple factors to achieve the rational use of computing resources and maximize the simulation efficiency. Specifically, this can be achieved by evaluating the performance indicators of each computing node, such as the number of CPU cores, memory size, storage capacity, and network bandwidth. For executable programs corresponding to subsystem modules with higher computational complexity, they should be allocated to computing nodes with stronger performance; for executable programs with frequent data interaction, they should be preferentially allocated to nodes with fast network connection speeds. A static allocation strategy can be used to assign executable programs to designated compute nodes according to pre-defined rules before the simulation begins. Alternatively, a dynamic allocation strategy can be used to dynamically adjust the allocation based on the real-time load of each compute node during the simulation. After allocation, when the executable programs are successfully launched on each compute node, they will begin simulation calculations and generate a large amount of simulation data. Because the computing speed and data generation frequency of different subsystem modules may vary, data buffering and synchronization operations are required to ensure the consistency and integrity of the simulation data.
[0052] In another example, Figure 4 As shown, after numbering each subsystem module and verifying its accuracy one by one, the method of this embodiment further includes:
[0053] Step 201: If a target subsystem module fails the accuracy verification, the target subsystem module number is recorded, and the target subsystem corresponding to the target subsystem module is modified in the simulation model to obtain an updated simulation model;
[0054] Step 202: splitting the updated target subsystem module in the updated simulation model according to the updated simulation model structure information and the number of the target subsystem module;
[0055] Step 203: Verify the accuracy of the updated target subsystem module.
[0056] Specifically, in the process of verifying the multiple subsystem modules separated in step 103 one by one, if there is a subsystem module that fails to pass the verification, it is proved that the subsystem module does not have the ability to directly execute the simulation task, and the subsystem needs to be manually modified and the updated target subsystem module needs to be verified again after the modification. It should be noted that in this embodiment, the separation of multiple subsystem modules does not mean that they are physically separated, but rather that they are divided into independent parts, copied, and then the copied subsystem modules are verified one by one. When it is verified that some subsystem modules fail to pass the verification, they are modified and updated in the constructed simulation model, and steps similar to steps 102 and 103 are performed here to split the updated simulation model again. It should be noted that since the modification is only for the subsystem modules that failed the verification, the subsystem modules that passed the verification do not need to be verified again. Therefore, for the updated simulation model, only the subsystem modules that failed the previous verification, that is, the target subsystem modules, can be split. It is also possible to perform all the splitting again, and this embodiment does not impose specific restrictions on this. The splitting can be based on the model structure information of the updated simulation model and the number of the target subsystem module, and the updated target subsystem module can be split out in the updated simulation model, and the accuracy of the updated target subsystem module can be verified. If the verification is passed, it proves that the updated target subsystem module can perform subsequent simulation tasks.
[0057] In another example, after the simulation model is updated, step 103 may specifically include: deploying the subsystem modules other than the target subsystem module and the updated target subsystem module in each subsystem module to different computing nodes for simulation.
[0058] Specifically, since the subsystem modules other than the target subsystem module in each subsystem module can be simulated after accuracy verification, they can be directly used for deployment. After the target subsystem module is modified, the updated target subsystem module is split out, and the accuracy of the updated target subsystem module is verified again. If the updated target subsystem module passes the verification, the subsequent code generation, compilation and allocation to the computing node for simulation can be carried out together with the subsystem modules other than the target subsystem module in each subsystem module split out for the first time. The specific process is recorded in the above embodiments and will not be repeated here in this embodiment.
[0059] Compared with related technologies, the embodiments of the present invention decompose complex simulation models into functionally independent subsystem modules and distribute them to different computing nodes through a hierarchical splitting and distributed deployment mechanism based on model structure information, effectively avoiding the performance limitations of a single node, realizing parallel processing of computing tasks and coordinated utilization of distributed resources, and significantly improving the efficiency and scalability of large-scale complex system simulation. By dual validity detection of the model topology structure and data structure, the logical consistency and data compatibility of the interaction of subsystem modules in a distributed environment are ensured, avoiding simulation failures caused by structural mismatch or data format conflicts; the module numbering and accuracy verification mechanism combined with model-driven code generation technology ensures the reliability of distributed nodes in terms of functional correctness and code executableness, reducing manual coding errors and debugging costs. The dynamic allocation strategy and data buffer synchronization mechanism further optimize the load balancing and data interaction efficiency between computing nodes, while reducing the dependence on hardware resources, improving the real-time performance and data consistency of the simulation process, and can better meet the needs of aerospace, industrial manufacturing and other fields for high-precision, large-scale complex system simulation, and improve the convenience and efficiency of complex model simulation.
[0060] Another embodiment of the present invention relates to a distributed simulation system based on model splitting, comprising:
[0061] A model building module is used to build a simulation model according to the user's simulation requirements. The top level of the simulation model includes at least multiple subsystems.
[0062] The model verification module is used to obtain the model structure information of the simulation model, perform validity detection on the simulation model according to the model structure information, and determine whether the simulation model is valid;
[0063] The model splitting module splits the simulation model into subsystem modules corresponding to multiple subsystems according to the model structure information, and deploys each subsystem module to different computing nodes for simulation.
[0064] It is not difficult to find that this embodiment is an embodiment of a system corresponding to the aforementioned method embodiments. The relevant technical details mentioned in the aforementioned embodiments are still valid in this embodiment. In order to reduce repetition, they will not be repeated here.
[0065] Another embodiment of the present invention relates to an electronic device, such as Figure 5 As shown, Figure 5 This is a principle block diagram of the electronic device 30 of this embodiment, which includes a processor 31, a memory 32, and a program or instruction stored in the memory 32 and executable on the processor 31. When the program or instruction is executed by the processor, the steps in the distributed simulation method based on model splitting recorded in any embodiment of the present invention are implemented.
[0066] The steps of the various methods above are divided only for the purpose of clear description. During implementation, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this patent. Adding insignificant modifications or introducing insignificant designs to the algorithm or process without changing the core design of the algorithm and process are all within the scope of protection of this patent.
[0067] That is, those skilled in the art will understand that all or part of the steps in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a program, which is stored in a storage medium and includes a number of instructions for causing a device (which may be a single-chip microcomputer, chip, etc.) or a processor 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: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc., various media that can store program code.
[0068] Those skilled in the art will appreciate that the above-mentioned embodiments are specific examples for implementing the present invention, and that in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present invention.
Claims
1. A distributed simulation method based on model splitting, characterized in that: include: Building a simulation model according to the user's simulation requirements, wherein the top layer of the simulation model includes at least a plurality of subsystems; Acquiring model structure information of the simulation model, and performing validity detection on the simulation model according to the model structure information to determine whether the simulation model is valid; When the simulation model is valid, the simulation model is split into multiple subsystem modules corresponding to the subsystems according to the model structure information, and each subsystem module is deployed to a different computing node for simulation.
2. The method according to claim 1, characterized in that The model structure information includes: topology structure information and data structure information; The performing validity detection on the simulation model according to the model configuration information to determine whether the simulation model is valid includes: Before the simulation model performs offline simulation, obtaining the topology structure information, and determining whether the simulation model satisfies a first preset rule according to the topology structure information; When the simulation model performs offline simulation, obtaining the data structure information, and determining whether the simulation model satisfies a second preset rule according to the data structure information; In the case that the simulation model satisfies the first preset rule and the second preset rule, the simulation model is valid.
3. The method according to claim 2, wherein the topology information comprises: Any one of the number of the subsystems in the simulation model, the connection relationship between the subsystems, the step size of the simulation model, and the number of data ports of each subsystem, or any combination thereof; The first preset rule at least includes: there is only one master subsystem and at least one slave subsystem among the multiple subsystems, and the step length of the simulation model is the same as the simulation step length of the master subsystem.
4. The method according to claim 2, wherein the data structure information comprises: The width and dimension of the data transmitted between the subsystems.
5. The method according to claim 1, wherein Before deploying each of the subsystem modules to different computing nodes for simulation, the method further includes: Numbering each of the subsystem modules and verifying their accuracy one by one; After each of the subsystem modules passes accuracy verification, a function code corresponding to the subsystem module is generated according to the subsystem module.
6. The method according to claim 5, characterized in that The method further comprises: If there is a target subsystem module that fails to pass the accuracy verification, the serial number of the target subsystem module is recorded, and the target subsystem corresponding to the target subsystem module is modified in the simulation model to obtain an updated simulation model; Splitting out an updated target subsystem module in the updated simulation model according to the model structure information of the updated simulation model and the number of the target subsystem module; The updated target subsystem module is verified for accuracy.
7. The method according to claim 5, characterized in that The deploying each of the subsystem modules to different computing nodes for simulation includes: Compiling the function codes corresponding to the subsystem modules into executable programs respectively to obtain multiple executable programs; Allocating multiple executable programs to different computing nodes respectively; The executable program is run, and data buffering and synchronization are performed on simulation data generated by the execution of the executable program on different computing nodes.
8. The method according to claim 6, characterized in that After the updated target subsystem modules pass accuracy verification, deploying each of the subsystem modules to different computing nodes for simulation includes: The subsystem modules other than the target subsystem module in each of the subsystem modules and the updated target subsystem module are deployed to different computing nodes for simulation.
9. A distributed simulation system based on model splitting, characterized in that: include: A model building module is used to build a simulation model according to the simulation requirements of the user, wherein the top layer of the simulation model includes at least a plurality of subsystems; A model verification module is used to obtain model structure information of the simulation model, perform validity detection on the simulation model according to the model structure information, and determine whether the simulation model is valid; A model splitting module splits the simulation model into multiple subsystem modules corresponding to the subsystems according to the model structure information, and deploys each subsystem module to a different computing node for simulation.
10. An electronic device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the steps of the distributed simulation method based on model splitting according to any one of claims 1 to 8.
Citation Information
Cited By
Containerized communication networking simulation acceleration method and system
CN121357000A
A containerized communication networking simulation acceleration method and system
CN121357000B