A method and system for automatically generating a three-dimensional simulation scene based on a large language model and SysML, and a medium
By parsing SysML v2 scene description information and introducing a multi-agent collaborative generation mechanism driven by a large language model, the efficiency and consistency issues in the generation of 3D simulation scenes are solved, automatic verification and iterative correction are realized, and the generation quality of complex system simulation scenes is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUAZHONG UNIV OF SCI & TECH
- Filing Date
- 2026-04-03
- Publication Date
- 2026-07-28
AI Technical Summary
Existing technologies for generating 3D simulation scenes suffer from low modeling efficiency, high rule maintenance costs, and poor adaptability to model changes. Furthermore, they lack multi-agent collaborative generation mechanisms and automatic verification and feedback adjustment processes for generated results, making it difficult to meet the reliability and engineering usability requirements of automatic generation of 3D simulation scenes for complex systems.
By parsing the SysML v2 scene description information and utilizing a multi-agent collaborative generation mechanism driven by a large language model, a 3D simulation scene is generated, including scene analysis, component generation, and connection relationship generation. Combined with syntax consistency checks and error correction, automatic verification and iterative correction are achieved.
It improves the efficiency of simulation modeling, enhances the semantic consistency and adaptability of the generated results, reduces human intervention, and improves the correctness and stability of the generated results, making it suitable for digital twin and co-simulation applications of complex systems.
Smart Images

Figure CN122473336A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of digital twins, systems engineering modeling and artificial intelligence, and specifically designs a method, system and medium for automatically generating three-dimensional simulation scenes based on large language models and SysML. Background Technology
[0002] With the development of complex engineering system design and digital twin applications, model-based systems engineering methods have gradually become an important technical path for system modeling and simulation. SysML and its next-generation version, SysML v2, provide a solid foundation for the formal description of system structure, attributes, and connections through a unified semantic model and an API-first design philosophy. However, in 3D simulation applications, efficiently and accurately converting SysML v2 scene description information into executable 3D simulation scenes still mainly relies on manual modeling or model conversion methods based on fixed rules, which suffer from low modeling efficiency, high rule maintenance costs, and poor adaptability to model changes.
[0003] In recent years, large language models have demonstrated strong capabilities in code generation and complex semantic understanding. However, existing methods for generating 3D simulation scenes based on large language models mostly generate scripts directly from natural language, lacking full utilization of structural information and semantic constraints in system engineering models such as SysML v2. The generated results still suffer from deficiencies in consistency, correctness, and executability. Furthermore, existing technologies generally lack multi-agent collaborative generation mechanisms and automatic verification and feedback adjustment processes for the generated results, making it difficult to meet the reliability and engineering usability requirements of automatic generation of 3D simulation scenes for complex systems. Summary of the Invention
[0004] The purpose of this invention is to provide a method, system, and medium for automatically generating 3D simulation scenes based on a large language model and SysML, which makes full use of SysML v2 scene description information to achieve automatic generation of 3D simulation scenes.
[0005] To achieve the above objectives, this application provides the following technical solution:
[0006] In a first aspect, embodiments of this application provide a method for automatically generating 3D simulation scenes based on large language models and SysML, including the following steps:
[0007] S1: Obtain and parse SysML v2 scene description information to obtain structural and semantic information used to describe the 3D simulation scene;
[0008] S2: The acquired scene description information is used to generate a scene framework and code snippets through a multi-Agent workflow. The Agent is an intelligent agent driven by a large language model that can understand instructions, plan steps, and call tools to execute complex tasks.
[0009] S3: Integrate the generated code snippets and perform syntax cleaning and error correction to obtain an executable 3D simulation scene script;
[0010] S4: Load and run the obtained 3D simulation scene script into the simulation environment to generate a 3D simulation scene.
[0011] In step S1, the SysML v2 scene description information is parsed using the SysML_v2_API, converting the text descriptions and model elements in the SysMLv2 model into structured data. The SysML v2 scene description information includes system components defined based on the part def element, component attribute information defined based on the attribute element, and connection relationships between components defined based on the connect element. By parsing the SysML v2 scene description information, hierarchical relationships, attribute constraints, and connection semantics, entity structures, attribute parameters, and interaction relationships used to characterize the 3D simulation scene are extracted, thereby forming standardized scene structure information and semantic information that can be used for subsequent model conversion.
[0012] The multi-agent workflow in step S2 is used to automatically generate 3D simulation scene code from SysML v2 scene description under the constraints of the structural and semantic information. Specifically, it includes:
[0013] The scene analysis agent performs overall semantic understanding and reasoning on the SysML v2 scene description information, analyzes the overall composition of the system, the hierarchical relationship of components, and global constraints, and generates an overall structural framework of the 3D simulation scene to guide subsequent code generation.
[0014] Under the constraints of the overall framework of the simulation scene, the Agent generated by the component processes the information of each part element and its attribute, maps the system components and their attributes to entity definition code fragments in the three-dimensional simulation environment, and assigns corresponding attribute parameters to each entity.
[0015] The Agent generates a connection relationship by parsing the component connection relationship described by the connect element. Based on the semantic type of the connection, it generates corresponding code snippets of spatial constraints, assembly relationships or interaction relationships to ensure that the generated 3D simulation scene is consistent with the SysML v2 scene description in terms of structure and behavior.
[0016] In the above generation process, each Agent works collaboratively on the basis of sharing a unified scenario context. Its reasoning, planning and code generation processes are driven by a large language model, thereby realizing the automatic generation of multiple code fragments under the constraints of semantic consistency and structural integrity.
[0017] Step S3 involves integrating the multiple code snippets generated in step S2 and performing post-processing operations, including syntax consistency checks, dependency verification, and error correction. When a syntax error, missing dependency, or runtime anomaly is detected, the corresponding code snippet and its error cause are fed back to the multi-Agent workflow in step S2. The Agent then re-reasons and generates the relevant code snippets under the original scene context and the newly added error constraints, and repeats the above integration and detection process until the generated 3D simulation scene script meets the preset correctness and executability requirements.
[0018] In step S4, the simulation engine loads, initializes, and executes the 3D simulation scene script, and automatically generates a 3D simulation scene corresponding to the SysML v2 scene description information based on the entities, attributes, and constraint relationships defined in the script.
[0019] Secondly, embodiments of this application provide an automatic generation system for 3D simulation scenes based on large language models and SysML. The system includes a memory and a processor. The memory includes a program for an automatic generation method of 3D simulation scenes based on large language models and SysML. When the program for an automatic generation method of 3D simulation scenes based on large language models and SysML is executed by the processor, it implements the steps of the automatic generation method of 3D simulation scenes based on large language models and SysML as described above.
[0020] Thirdly, embodiments of this application provide a computer-readable storage medium, characterized in that the computer-readable storage medium stores program code, which, when executed by a processor, implements the steps of the above-described method for automatically generating a three-dimensional simulation scene based on a large language model and SysML.
[0021] Compared with existing technologies, the beneficial effects of this invention are as follows: This invention achieves automatic generation of 3D simulation scenes from system engineering models to simulation scripts by programmatically parsing SysML v2 scene description information and introducing a multi-agent collaborative generation mechanism driven by a large language model. This effectively reduces the dependence on manual modeling and rule maintenance in the 3D simulation scene construction process, improves simulation modeling efficiency and semantic consistency between system models and simulation scenes. By introducing collaborative intelligent agents such as scene overall analysis, component generation, and connection relationship generation during the generation process, the generated 3D simulation scene can be automatically formed under the constraints of structural integrity and semantic correctness, enhancing the adaptability and scalability of complex system simulation scene generation. In addition, by constructing an automatic verification and error feedback adjustment mechanism for the generated results, the generated simulation scene script can be automatically iteratively corrected when errors are found, reducing manual intervention and improving the correctness, stability, and engineering usability of the generated 3D simulation scene results. It is suitable for application scenarios such as digital twins and co-simulation of complex systems. Attached Figure Description
[0022] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0023] Figure 1 This is a flowchart of a method for automatically generating 3D simulation scenes based on a large language model and SysML, according to an embodiment of the present invention.
[0024] Figure 2 This is a software architecture diagram of an embodiment of the present invention.
[0025] Figure 3 This is a flowchart of steps S2 and S3 in an embodiment of the present invention. Detailed Implementation
[0026] The technical solutions of the embodiments of this application will now be described with reference to the accompanying drawings. It should be noted that similar reference numerals and letters in the following drawings indicate similar items; therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.
[0027] The terms “comprising,” “including,” or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase “comprising one…” does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0028] The terms “first,” “second,” etc., are used only to distinguish one entity or operation from another, and should not be construed as indicating or implying relative importance, nor as requiring or implying any such actual relationship or order between these entities or operations.
[0029] like Figures 1 to 3 As shown, this application discloses a method for automatically generating 3D simulation scenes based on a large language model and SysML, including:
[0030] Step S1: Parse the SysML v2 scene description information using the SysML_v2_API, converting the text descriptions and model elements in the SysML v2 model into structured data. The SysML v2 scene description information includes at least system components defined based on the `part def` element, component attribute information defined based on the `attribute` element, and connection relationships between components defined based on the `connect` element. By parsing the aforementioned SysML v2 elements and their hierarchical relationships, attribute constraints, and connection semantics, the entity structure, attribute parameters, and interaction relationships used to characterize the 3D simulation scene are extracted, thereby forming standardized scene structure and semantic information that can be used for subsequent model conversion.
[0031] Step S2: Based on the information parsed in the previous step, and under the constraints of the structural and semantic information, a multi-agent workflow is used to automatically generate the code from the SysML v2 scene description to the 3D simulation scene. This specifically includes:
[0032] The scene analysis agent performs overall semantic understanding and reasoning on the SysML v2 scene description information, analyzes the overall composition of the system, the hierarchical relationship of components, and global constraints, and generates an overall structural framework of the 3D simulation scene to guide subsequent code generation.
[0033] Under the constraints of the overall framework of the simulation scene, the Agent generated by the component processes the information of each part element and its attribute, maps the system components and their attributes to entity definition code fragments in the three-dimensional simulation environment, and assigns corresponding attribute parameters to each entity.
[0034] The Agent generates a connection relationship by parsing the component connection relationship described by the connect element. Based on the semantic type of the connection, it generates corresponding code snippets of spatial constraints, assembly relationships or interaction relationships to ensure that the generated 3D simulation scene is consistent with the SysML v2 scene description in terms of structure and behavior.
[0035] In the above generation process, each Agent works collaboratively on the basis of sharing a unified scenario context. Its reasoning, planning and code generation processes are driven by a large language model, thereby realizing the automatic generation of multiple code fragments under the constraints of semantic consistency and structural integrity.
[0036] Step S3: Integrate the multiple code snippets generated in Step S2 and perform post-processing operations including syntax consistency checks, dependency verification, and error correction. When a syntax error, missing dependency, or runtime anomaly is detected, the corresponding code snippet and its error cause are fed back to the multi-Agent workflow in Step S2. The Agent then re-reasons and generates the relevant code snippets under the original scene context and the newly added error constraints, and repeats the above integration and detection process until the generated 3D simulation scene script meets the preset correctness and executability requirements.
[0037] Step S4: Load, initialize, and execute the 3D simulation scene script through the simulation engine, and automatically generate a 3D simulation scene corresponding to the SysML v2 scene description information based on the entities, attributes, and constraint relationships defined in the script.
[0038] After multiple rounds of testing, the six-degree-of-freedom robotic arm took only 8 minutes to deploy a 3D scene from a SysML v2 model to Issac Sim, a significant improvement in efficiency compared to manual modeling.
[0039] This invention achieves automatic generation of 3D simulation scenes from system engineering models to simulation scripts by programmatically parsing SysML v2 scene description information and introducing a multi-agent collaborative generation mechanism driven by a large language model. This effectively reduces the dependence on manual modeling and rule maintenance in the 3D simulation scene construction process, improves simulation modeling efficiency, and enhances the semantic consistency between the system model and the simulation scene. By introducing collaborative intelligent agents such as scene overall analysis, component generation, and connection relationship generation during the generation process, the generated 3D simulation scene can be automatically formed under the constraints of structural integrity and semantic correctness, enhancing the adaptability and scalability of complex system simulation scene generation. Furthermore, by constructing an automatic verification and error feedback adjustment mechanism for the generated results, the generated simulation scene script can be automatically iteratively corrected when errors are detected, reducing manual intervention and improving the correctness, stability, and engineering usability of the generated 3D simulation scene results. It is suitable for application scenarios such as digital twins and co-simulation of complex systems.
[0040] This application provides an automatic generation system for 3D simulation scenes based on large language models and SysML. The system includes a memory and a processor. The memory includes a program for an automatic generation method of 3D simulation scenes based on large language models and SysML. When the program for an automatic generation method of 3D simulation scenes based on large language models and SysML is executed by the processor, it implements the steps of the automatic generation method of 3D simulation scenes based on large language models and SysML as described above.
[0041] This application provides a computer-readable storage medium, characterized in that the computer-readable storage medium stores program code, which, when executed by a processor, implements the steps of the above-described method for automatically generating a 3D simulation scene based on a large language model and SysML.
[0042] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0043] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0044] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0045] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0046] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0047] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0048] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0049] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method for automatically generating 3D simulation scenes based on large language models and SysML, characterized in that, Including the following steps: S1: Obtain and parse SysML v2 scene description information to obtain structural and semantic information used to describe the 3D simulation scene; S2: The acquired scene description information is used to generate a scene framework and code snippets through a multi-Agent workflow. The Agent is an intelligent agent driven by a large language model that can understand instructions, plan steps, and call tools to execute complex tasks. S3: Integrate the generated code snippets and perform syntax cleaning and error correction to obtain an executable 3D simulation scene script; S4: Load and run the obtained 3D simulation scene script into the simulation environment to generate a 3D simulation scene.
2. The method for automatically generating 3D simulation scenes based on a large language model and SysML as described in claim 1, characterized in that, In step S1, the SysML v2 scene description information is parsed using the SysML_v2_API, converting the text descriptions and model elements in the SysMLv2 model into structured data. The SysML v2 scene description information includes system components defined based on the part def element, component attribute information defined based on the attribute element, and connection relationships between components defined based on the connect element. By parsing the SysML v2 scene description information, hierarchical relationships, attribute constraints, and connection semantics, entity structures, attribute parameters, and interaction relationships used to characterize the 3D simulation scene are extracted, thereby forming standardized scene structure information and semantic information that can be used for subsequent model conversion.
3. The method for automatically generating 3D simulation scenes based on a large language model and SysML as described in claim 1, characterized in that, The multi-agent workflow in step S2 is used to automatically generate 3D simulation scene code from SysML v2 scene description under the constraints of the structural and semantic information. Specifically, it includes: The scene analysis agent performs overall semantic understanding and reasoning on the SysML v2 scene description information, analyzes the overall composition of the system, the hierarchical relationship of components, and global constraints, and generates an overall structural framework of the 3D simulation scene to guide subsequent code generation. Under the constraints of the overall framework of the simulation scene, the Agent generated by the component processes the information of each part element and its attribute, maps the system components and their attributes to entity definition code fragments in the three-dimensional simulation environment, and assigns corresponding attribute parameters to each entity. The Agent generates a connection relationship by parsing the component connection relationship described by the connect element. Based on the semantic type of the connection, it generates corresponding code snippets of spatial constraints, assembly relationships or interaction relationships to ensure that the generated 3D simulation scene is consistent with the SysML v2 scene description in terms of structure and behavior. In the above generation process, each Agent works collaboratively on the basis of sharing a unified scenario context. Its reasoning, planning and code generation processes are driven by a large language model, thereby realizing the automatic generation of multiple code fragments under the constraints of semantic consistency and structural integrity.
4. The method for automatically generating 3D simulation scenes based on a large language model and SysML as described in claim 1, characterized in that, Step S3 involves integrating the multiple code snippets generated in step S2 and performing post-processing operations, including syntax consistency checks, dependency verification, and error correction. When a syntax error, missing dependency, or runtime anomaly is detected, the corresponding code snippet and its error cause are fed back to the multi-Agent workflow in step S2. The Agent then re-reasons and generates the relevant code snippets under the original scene context and the newly added error constraints, and repeats the above integration and detection process until the generated 3D simulation scene script meets the preset correctness and executability requirements.
5. The method for automatically generating 3D simulation scenes based on a large language model and SysML as described in claim 1, characterized in that, In step S4, the simulation engine loads, initializes, and executes the 3D simulation scene script, and automatically generates a 3D simulation scene corresponding to the SysML v2 scene description information based on the entities, attributes, and constraint relationships defined in the script.
6. A system for automatically generating 3D simulation scenes based on large language models and SysML, characterized in that, The system includes a memory and a processor. The memory includes a program for an automatic generation method of a 3D simulation scene based on a large language model and SysML. When the program for an automatic generation method of a 3D simulation scene based on a large language model and SysML is executed by the processor, it implements the steps of the automatic generation method of a 3D simulation scene based on a large language model and SysML as described in any one of claims 1 to 5.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program code, which, when executed by a processor, implements the steps of the automatic generation method for three-dimensional simulation scenes based on a large language model and SysML as described in any one of claims 1 to 5.