Automatic building method of SysML model library

By combining structured model library and prompt engineering, using large language models to generate SysML models, the problems of low efficiency and poor reusability in the SysML modeling process are solved, and efficient and accurate model automatic construction and knowledge expansion are achieved, which is suitable for modeling tasks of complex systems.

CN120447884APending Publication Date: 2025-08-08HARBIN INST OF TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510581572.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-07
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

The existing SysML modeling process relies on manual operations, resulting in low modeling efficiency, poor reusability, lack of intelligent assistance, insufficient organization and retrieval capabilities of model library, difficult to quickly locate suitable model structures and elements, and the quality of the generation results of large language models is difficult to control, and there is a lack of a closed-loop mechanism to expand model knowledge.

Method used

Combining the structured model library and prompt engineering, a SysML model is generated through a large language model, a database retrieval and automatic scoring mechanism is introduced, a model relationship network is built, and the automatic construction of the system model is realized, including model evaluation and recursive modeling mechanisms, and the dynamic generation and termination judgment of the subsystem structure are supported.

Benefits of technology

The automatic construction of SysML model is realized, the modeling efficiency and consistency is improved, the accuracy and controllability of model construction is enhanced, and the recursive modeling of multi-level system-subsystem structures is supported and the self-scaling of knowledge bases is suitable for complex engineering modeling scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120447884A_ABST
    Figure CN120447884A_ABST
Patent Text Reader

Abstract

The invention discloses a SysML model library automatic construction method, which comprises the following steps of S1, providing a retrieval capability of model element information and structure context based on a SysML model library database support of a model name and a system hierarchical relationship; s2, based on SysML model recommendation generation of a prompt project, constructing a structured context prompt, and guiding a language model to generate a target system model; s3, realizing multi-level semantic connection between the system model and the subsystem model based on SysML model relation construction and knowledge base expansion of a structure matching and context connection relation; and S4, orderly expansion and reasonable convergence of an automatic model construction process are ensured based on a subdivided recursive modeling and modeling termination judgment mechanism of a subsystem structure. The method has the advantages of being high in modeling efficiency, clear in structural association, continuous in knowledge extension and the like, is suitable for automatic model generation and evolution of a complex system, and has a wide application prospect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer software technology and relates to a SysML model library construction method, and in particular to a large model-driven automatic construction method of a SysML model library based on a combination of a structured model library and a prompting project. Background Art

[0002] In modern engineering, a system is typically composed of a set of interacting components designed to achieve specific goals or solve complex problems. As a complex collection of systems that meet human needs, engineering systems encompass physical entities, information, human resources, procedures, facilities, and their relationships with the natural and social environment. Their lifecycles include creation, operation, maintenance, and optimization, driven by multi-party needs and the external environment. With the development of systems engineering, the design and development of complex systems are increasingly dependent on models, and model-driven engineering and model-based systems engineering have become mainstream approaches in modern engineering practice. As the core modeling language of MBSE, SysML has excellent expressiveness and standardization, and is widely used in a variety of fields, including aerospace, automotive electronics, and rail transit, to describe system requirements, structure, behavior, and constraints.

[0003] In the actual modeling process, system engineers often need to build SysML models from scratch or reuse modeling experience from previous projects. However, the current SysML modeling process still relies heavily on manual operations and lacks intelligent assistance mechanisms. On the one hand, when faced with complex systems, modelers find it difficult to quickly identify the appropriate model structure and modeling elements, often resulting in inefficient model construction and poor reusability. On the other hand, existing model libraries often lack systematic organization and intelligent retrieval capabilities, and the storage and management of model relationships are relatively extensive, which is not conducive to the accumulation and reuse of model knowledge.

[0004] The rapid development of large language models in recent years has opened up new possibilities for intelligent model generation and automated knowledge expansion. Prompt engineering techniques can leverage existing modeling experience to construct contextual information, guiding large models to generate new model content, significantly improving modeling efficiency and intelligence. However, effectively integrating LLM with structured SysML model libraries to achieve automated recommendation and construction from requirements to models still faces the following challenges:

[0005] 1. Lack of structured model library support, and the system-subsystem semantic relationship between model elements is not effectively organized;

[0006] 2. The quality of the generated results of large models is difficult to control, and contextual prompts and scoring mechanisms need to be introduced to assist in generation;

[0007] 3. The expansion of the model knowledge base lacks a closed-loop mechanism and cannot automatically complete subsystem association and recursive generation.

[0008] Therefore, there is an urgent need for an automatic SysML model construction method that combines a structured model library, prompt engineering and automatic evaluation mechanism to achieve an intelligent, structured and scalable closed-loop process from demand-driven to system modeling. Summary of the Invention

[0009] In order to solve the problems of low modeling efficiency, weak reuse capability and lack of intelligent assistance in the current SysML model construction process, especially when facing the technical bottleneck of complex system modeling tasks, modelers find it difficult to quickly obtain suitable model structures and components, the present invention provides a method for automatically constructing a SysML model library. The present invention provides a method for automatically constructing a SysML model library by constructing contextual prompt information to guide the language model to generate a system model based on model requirement input, and combines the model library data to achieve structural matching and semantic connection, build a model relationship network, and automatically expand the modeling knowledge system. The present invention also introduces model evaluation and recursive modeling mechanisms to support the dynamic generation and termination judgment of subsystem structures, thereby realizing a closed-loop process from demand identification to automatic construction of system models, improving the intelligence level and engineering application efficiency of SysML modeling, and filling the technical gaps in automation and knowledge linkage of existing model construction methods. The present invention has the advantages of high modeling efficiency, clear structural associations, and continuous expansion of knowledge. It is suitable for the automatic generation and evolution of models of complex systems and has broad application prospects.

[0010] The purpose of the present invention is achieved through the following technical solutions:

[0011] A method for automatically constructing a SysML model library comprises the following steps:

[0012] Step S1: Based on the SysML model library database support of the relationship between model name and system hierarchy, the model element information and structural context retrieval capability is provided. The specific steps are as follows:

[0013] A database system that supports SysML model element storage and relationship management is pre-built. This system integrates key-value database and graph database technologies to enable efficient query of model element attributes and traceability analysis of system structure hierarchical relationships, providing a stable data foundation and contextual support for subsequent model generation, intelligent recommendation, and structural organization processes.

[0014] Step S2: Generate SysML model recommendations based on prompt engineering, construct structured context prompts, and guide the language model to generate the target system model. The specific steps are as follows:

[0015] Step S201: The user inputs the name of the target model and a brief modeling requirement;

[0016] Step S202: The system searches the model library based on the model name. If the corresponding model already exists, it is directly returned as a recommendation result. If not found, the system searches for the reference model node with the finest granularity and closest semantics.

[0017] Step S203: The system constructs a structured prompt context based on the reference node, including information about the reference node, its parent node, child nodes, and sibling nodes;

[0018] Step S204: The large language model generates a requirement-SysML model pair;

[0019] Step S205: Introduce an automatic scoring agent to perform quality assessment on the generated results, which will serve as the basis for subsequent database construction decisions;

[0020] Step S3: Based on the SysML model relationship construction and knowledge base expansion based on the structure matching and context connection relationship, a multi-level semantic connection between the system model and the subsystem model is achieved. The specific steps are as follows:

[0021] Step S301: System model storage and connection: add the system model node generated in step S2 to the model library and establish a structural connection relationship with the parent node of the reference model to ensure that the newly generated model has complete structural context dependencies;

[0022] Step S302: Subsystem node extraction: Analyze the internal structure of the system model, identify and extract subsystem nodes with modular characteristics, mainly including structural modeling elements in the form of blocks and packages;

[0023] Step S303: Subsystem matching association: For subsystem nodes, a structural matching operation is performed in the model library, and nodes with the same name are searched first. If no match is found, a semantic analysis tool is called to determine whether there are nodes with similar semantics. The matched nodes and the nodes with similar semantics are called matching nodes, and a parent-child structural association is established between the system model and the matching nodes.

[0024] Step S304: Subsystem addition and expansion: If no matching node is found in the model library, a new subsystem node is automatically created and a structural connection relationship is established with the current system model to achieve the supplementation of model relationships and the dynamic expansion of the knowledge base;

[0025] Step S4: Recursive modeling and modeling termination judgment mechanism based on the subdivision of the subsystem structure ensures the orderly development and reasonable convergence of the automatic model construction process. The specific steps are as follows:

[0026] For each newly generated subsystem node, the system automatically determines whether it can be further refined, that is, whether its "isSubsystem" attribute is true. If it is true, steps S2 and S3 are recursively called to further expand the modeling process; if it is false, it is regarded as the modeling termination node and stops expanding downward.

[0027] Compared with the prior art, the present invention has the following advantages:

[0028] 1. This paper implements an automated SysML model construction process, improving modeling efficiency and consistency. By combining prompt engineering technology with model library context information, this paper guides the language model to automatically generate SysML model nodes and structural relationships, significantly reducing manual modeling costs and effectively avoiding model inconsistencies, omissions, and duplications that are prone to occur in traditional manual modeling.

[0029] 2. The integration of language model intelligent recommendation and database semantic retrieval mechanisms enhances the accuracy and controllability of model construction. This invention utilizes existing model structures and hierarchical information in the database to construct prompt contexts, ensuring that the results generated by large language models have clear structural constraints and engineering semantics. It also introduces automatic scoring mechanisms and manual intervention methods to ensure the reliability and engineering applicability of the recommendation model.

[0030] 3. Support for recursive modeling of multi-level system-subsystem structures and self-expansion of the knowledge base enhances the systematicity and flexibility of model organization. This invention can automatically identify subdividable subsystems within a system structure and automatically expand the model hierarchy through a recursive mechanism, achieving a complete structural expression from system to subsystem. It also dynamically expands the knowledge base content to support the continuous evolution and reuse of the model.

[0031] 4. Applicable to a variety of complex engineering modeling scenarios, with good scalability and engineering implementation value. This invention is applicable to model building and management tasks in complex system engineering projects such as aviation, aerospace, and automotive. It has good versatility and portability and can serve as an intelligent enhancement module for existing MBSE tool systems, significantly improving the intelligence level of system engineering modeling tools. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 Automatically build method flow charts for SysML model libraries;

[0033] Figure 2 The overall process diagram of the automatic construction method of SysML model library is shown;

[0034] Figure 3 Automatically construct a sub-step flow chart of method step S2 for the SysML model library;

[0035] Figure 4Provides a pseudo-code description of the SysML model node similarity search algorithm in the SysML model library automatic construction method;

[0036] Figure 5 Flowchart of sub-steps of step S3 of the method for automatically building a SysML model library. DETAILED DESCRIPTION

[0037] The technical solution of the present invention is further described below with reference to the accompanying drawings, but is not limited thereto. Any modification or equivalent replacement of the technical solution of the present invention that does not depart from the spirit and scope of the technical solution of the present invention should be included in the scope of protection of the present invention.

[0038] The present invention provides a method for automatically constructing a SysML model library, such as Figure 1 and Figure 2 As shown, the specific steps include:

[0039] Step S1: Based on the SysML model library database support of the relationship between model name and system hierarchy, the retrieval capability of model element information and structural context is provided.

[0040] In this step, the SysML model library database stores the content of requirement-SysML model data pairs.

[0041] In this step, the SysML model library database integrates key-value database and graph database technologies, enabling efficient querying of model element attributes and traceability analysis of system structure hierarchical relationships. This database provides a stable data foundation and contextual support for subsequent model generation, intelligent recommendation, and structural organization processes.

[0042] Step S2: Based on the SysML model recommendation generation of the prompt engineering, a structured context prompt is constructed to guide the language model to generate the target system model. Figure 3 The specific steps are as follows:

[0043] Step S201: The user inputs the name of the target model and brief modeling requirements.

[0044] Step S202: The system searches the model library according to the model name. If the corresponding model already exists, it is directly returned as a recommendation result. If not found, the reference model node with the finest granularity and closest semantics is retrieved.

[0045] In this step, the recommendation result retrieved according to the user's target model name is called a reference model node.

[0046] like Figure 4As shown in Figure 1, the retrieval process in this step relies on the SysML model node similarity search algorithm. This method searches the model library based on the model name. The input is the system node inputNode provided by the user to construct the query, and the output is the matchedNode with the closest semantics and the finest granularity in the model library. Specifically, it includes the following steps:

[0047] Step S20201: Obtain the root node from the model library and initialize it as the current traversal node and the default matching node. Obtain the root node of the entire knowledge structure from the model library and use it as the starting node currentNode for the current traversal. Simultaneously, initialize the matching result node matchedNode as the root node to indicate that a better match has not yet been found.

[0048] Step S20202: Based on the language model, iteratively determine whether the input node semantically belongs to the child node of the current node. If it does, go deeper into the next layer of traversal; if not, go to step S20203; if it goes deeper into the next layer of traversal process, enter the iterative search process, as long as the current traversal node is not empty and a match result better than the root node has not been found, the system will continue to traverse and semantically judge the child nodes of the current node. First, get all the child nodes childNodes of the current node, and try to find a child node that semantically contains the user input node. The judgment standard relies on the large language model to analyze whether the inputNode semantically belongs to a child node child. Once a child node that meets the conditions is found, it is considered that it is possible to continue to go deeper in a more fine-grained direction, and the system will set the child node as the currentNode for the next round of iteration.

[0049] Step S20203: If there is no child node that satisfies the containment relationship, then determine whether the input node is semantically synonymous with the current node. If it is synonymous, set the current node as a matching node, otherwise terminate the traversal. If no containment relationship is found in the child nodes of the current level, the system will call LLM to determine whether inputNode has a semantic synonymous relationship with the current node currentNode. If there is a synonymous relationship, it means that the current node is the reference node closest to the user's intention. The system records it as the final matching node matchedNode and terminates the traversal; if there is no synonymous relationship and there are no further child nodes to go deeper, it means that the search is over, the match fails, and the return result is the root node, indicating that no better candidate is matched. The LLM can complete semantic discrimination through remote API calls (such as OpenAI, Baichuan, etc.) and cache the intermediate results of semantic comparison locally to improve performance.

[0050] Step S203: The system constructs a structured prompt context based on the reference node.

[0051] In this step, the structured hint context includes information about the reference node, its parent node, child nodes, and sibling nodes. The requirement-SysML model pairs of these nodes are integrated into the contextual hint as structured supplementary information. The structured hint context can be represented as a JSON structure containing key values such as {"reference node":"...","parent node":"...","child node":"..."}, which is used to feed the language model.

[0052] Step S204: The large language model generates a requirement-SysML model pair.

[0053] Step S205: Introduce an automatic scoring agent to evaluate the generated results as a basis for subsequent database construction decisions.

[0054] In this step, the automated scoring agent assesses the quality of the generated results against a predefined threshold. If the score is above the threshold, the result passes; otherwise, it fails, and the reason for the low score is fed back to the large language model that generates the requirement-SysML model pair until the score passes the threshold.

[0055] Step S3: Based on the SysML model relationship construction and knowledge base expansion based on the structure matching and context connection relationship, the multi-level semantic connection between the system model and the subsystem model is realized. Figure 5 As shown, the specific steps include:

[0056] Step S301: System model storage and connection: add the system model node generated in step S2 to the model library and establish a structural connection relationship with the parent node of the reference model to ensure that the newly generated model has complete structural context dependencies.

[0057] Step S302: Subsystem node extraction: Analyze the internal structure of the system model, identify and extract subsystem nodes with modular characteristics, mainly including structural modeling elements in the form of Block and Package.

[0058] Step S303: Subsystem matching association: For the subsystem nodes, a structural matching operation is performed in the model library, and nodes with the same name are searched first; if no hit is found, the semantic analysis tool is called to determine whether there are nodes with similar semantics. The hit nodes and the nodes with similar semantics are called matching nodes, and a parent-child structural association is established between the system model and the matching nodes.

[0059] Step S304: Subsystem addition and expansion: If no matching node is retrieved in the model library, a new subsystem node is automatically created and a structural connection relationship is established with the current system model to achieve the supplement of model relationships and dynamic expansion of the knowledge base.

[0060] Step S4: Recursive modeling and modeling termination determination based on the subdivision of the subsystem structure ensure orderly expansion and reasonable convergence of the automatic model building process: For each newly generated subsystem node, the system automatically determines whether it can be further refined, that is, whether its "isSubsystem" attribute is true. If true, steps S2 and S3 are recursively called to further expand the modeling process; if false, it is considered a modeling termination node and further expansion is stopped.

[0061] During the entire automatic modeling process, the system allows manual intervention and dynamic adjustment of the "isSubsystem" status of subsystem nodes, thereby enhancing the controllability and engineering adaptability of the modeling process.

Claims

1. A method for automatically constructing a SysML model library, characterized in that The method comprises the following steps: Step S1: Based on the SysML model library database support of the relationship between model name and system hierarchy, it provides the retrieval capability of model element information and structural context; Step S2: Generate SysML model recommendations based on prompt engineering, construct structured context prompts, and guide the language model to generate the target system model; Step S3: Based on the SysML model relationship construction and knowledge base expansion based on the structure matching and context connection relationship, a multi-level semantic connection between the system model and the subsystem model is realized; Step S4: Recursive modeling and modeling termination judgment mechanism based on the subdivision of the subsystem structure to ensure the orderly development and reasonable convergence of the automatic model construction process.

2. The method for automatically constructing a SysML model library according to claim 1, characterized in that The specific steps of step S1 are as follows: A database system that supports SysML model element storage and relationship management is pre-built. This system integrates key-value database and graph database technologies, enabling efficient query of model element attributes and traceability analysis of system structure hierarchical relationships, providing a stable data foundation and contextual support for subsequent model generation, intelligent recommendation, and structural organization processes.

3. The method for automatically constructing a SysML model library according to claim 1, characterized in that In step S1, the SysML model library database stores the content of requirement-SysML model data pairs.

4. The method for automatically constructing a SysML model library according to claim 1, characterized in that The specific steps of step S2 are as follows: Step S201: The user inputs the name of the target model and a brief modeling requirement; Step S202: The system searches the model library based on the model name. If the corresponding model already exists, it is directly returned as a recommendation result. If not found, the reference model node with the finest granularity and closest semantics is retrieved; Step S203: the system constructs a structured prompt context based on the reference node; Step S204: The large language model generates a requirement-SysML model pair; Step S205: Introduce an automatic scoring agent to perform quality assessment on the generated results, which will serve as a basis for subsequent database construction decisions.

5. The method for automatically constructing a SysML model library according to claim 4, characterized in that The step S202 searches the model library according to the model name, inputs the system node inputNode provided by the user to be queried, and outputs the matched node matchedNode with the closest semantics and the finest granularity in the model library. Specifically, the steps include: Step S20201: Get the root node from the model library and initialize it to the current traversal node and the default matching node; Step S20202: Based on the language model, iteratively determine whether the input node semantically belongs to the child node of the current node. If so, traverse to the next layer. If not, jump to step S20203. Step S20203: If there is no child node that satisfies the containment relationship, determine whether the input node is semantically synonymous with the current node. If so, set the current node as the matching node; otherwise, terminate the traversal.

6. The method for automatically constructing a SysML model library according to claim 4, characterized in that In step S203, the structured prompt context includes the reference node, its parent node, child node and sibling node information, and the requirement-SysML model pairs of these nodes are integrated into the context prompt as structured supplementary information.

7. The method for automatically constructing a SysML model library according to claim 4, characterized in that In step S205, when the automatic scoring agent performs a quality assessment on the generated results, a threshold is predefined and the automatic scoring agent is instructed to score. If the score is higher than the threshold, the assessment passes; otherwise, it fails, and the reason for the low score is fed back to the large language model that generates the requirement-SysML model pair until the score passes the threshold.

8. The method for automatically constructing a SysML model library according to claim 1, characterized in that The specific steps of step S3 are as follows: Step S301: System model storage and connection: add the system model node generated in step S2 to the model library and establish a structural connection relationship with the parent node of the reference model to ensure that the newly generated model has complete structural context dependencies; Step S302: Subsystem node extraction: Analyze the internal structure of the system model, identify and extract subsystem nodes with modular characteristics, mainly including structural modeling elements in the form of blocks and packages; Step S303: Subsystem matching association: for the subsystem nodes, perform a structure matching operation in the model library, and prioritize searching for nodes with the same name; If no hit is found, the semantic analysis tool is called to determine whether there are nodes with similar semantics. The hit node and the nodes with similar semantics are called matching nodes, and a parent-child structure association is established between the system model and the matching nodes. Step S304: Subsystem addition and expansion: If no matching node is retrieved in the model library, a new subsystem node is automatically created and a structural connection relationship is established with the current system model to achieve the supplement of model relationships and dynamic expansion of the knowledge base.

9. The method for automatically constructing a SysML model library according to claim 1, characterized in that The specific steps of step S4 are as follows: For each newly generated subsystem node, the system automatically determines whether it can be further refined, that is, whether its "isSubsystem" attribute is true. If it is true, steps S2 and S3 are recursively called to further expand the modeling process; if it is false, it is regarded as the modeling termination node and stops expanding downward.

10. The method for automatically constructing a SysML model library according to claim 1 or 9, characterized in that In step S4, manual intervention and dynamic adjustment of the "isSubsystem" status of the subsystem node are allowed, thereby enhancing the controllability and engineering adaptability of the modeling process.

Citation Information

Cited By

  • SysML meta-model semantic packaging method and device and electronic equipment

    CN121052027A