Multi-agent collaborative automation modeling method and system oriented to mbse

By adopting a multi-agent collaborative automated modeling method for MBSE, and combining the generation, verification, and repair of agents with domain knowledge graphs, the problem of large language models being syntactically correct but semantically invalid in complex system scenarios is solved. This enables reliable generation and repair of SysML v2 models, improving the usability and consistency of modeling.

CN121638475BActive Publication Date: 2026-05-08CHANGCHUN UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHANGCHUN UNIV OF SCI & TECH
Filing Date
2026-02-04
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing automatic modeling techniques based on large language models suffer from grammatical correctness but engineering semantic failure in complex system scenarios. They are difficult to guarantee interface matching, topological legality, and constraint consistency of the model, and the closed-loop repair process is unstable and prone to iteration errors.

Method used

We adopt a multi-agent collaborative automated modeling method oriented towards MBSE. By retrieving knowledge subgraphs related to natural language modeling needs in a shared knowledge environment, we construct a modeling context and use generating, validating, and repairing agents to generate SysML v2 models. We combine domain knowledge graphs for syntactic and semantic verification and perform deterministic repair to ensure the correctness of the model.

Benefits of technology

It improves the reliability and stability of the model generation process, reduces the probability of iteration errors, enhances the usability and interpretability of the model, ensures the correctness of interface matching and topological relationships, and improves the reliability and consistency of complex system modeling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121638475B_ABST
    Figure CN121638475B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of model-driven system engineering modeling, in particular to a multi-agent collaborative automatic modeling method and system for MBSE. The method obtains user natural language modeling requirements, retrieves and obtains a knowledge subgraph related to the requirements in a shared knowledge environment, constructs a modeling context, calls a generation agent to generate a current SysML v2 model, calls a verification agent to perform syntax verification and semantic verification based on a domain knowledge graph, and outputs a verification result; when the verification result represents that syntax is not passed or there is semantic inconsistency or violation of engineering constraint rules, a repair agent is called to perform deterministic repair according to the domain knowledge graph and iterative verification until a preset condition is met to output a final SysML v2 model; in the case of coverage gaps, gap marking or bottom repair can be performed. The application improves the correctness, explainability and convergence efficiency of complex system modeling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of model-driven system engineering modeling technology, specifically to a multi-agent collaborative automated modeling system for MBSE. Background Technology

[0002] As Model-Driven Systems Engineering (MBSE) gradually replaces traditional document-based systems engineering, system models, as formal carriers throughout the entire lifecycle, are used for requirements analysis, architecture design, verification, and collaborative delivery. Around this paradigm, SysML has continuously evolved since its adoption by the OMG in 2007. The OMG adopted SysML v1.7 in June 2024 and the next-generation SysML v2.0 in June 2025, laying a standard foundation for the accurate representation, interoperability, and automation of models. In recent years, the natural language understanding and code generation capabilities of large language models have made automated modeling from natural language to SysML a realistic direction. Related research has gradually evolved from early reliance on static constraints of structured templates to a generative closed loop combining retrieval enhancement and parsers, and is further moving towards an automated modeling paradigm of multi-agent collaboration to lower the modeling threshold and improve modeling efficiency.

[0003] While existing automated modeling techniques based on large language models can improve generation efficiency, they still face the common problem of "syntactically correct but semantically ineffective" in complex system scenarios. This means that while the model text is parsable, hidden errors exist in interface matching, constraint consistency, and topological legality, leading to uncontrollable engineering risks. On one hand, traditional Text RAGs primarily rely on vector similarity to recall text fragments, making it difficult to preserve system topology and constraint information. Destructured context amplifies the risk of semantic illusions, resulting in unreliable connection and constraint inferences. On the other hand, many closed-loop repair processes still heavily rely on probabilistic trial-and-error using large models, easily leading to high iteration counts, unstable convergence, and the introduction of new errors after correcting one, especially when dealing with semantic violations involving domain constraints or cross-element relationships. Furthermore, when domain knowledge is incomplete, the system often has to resort to degenerate processing and weakly effective strategies, further reducing decideability and interpretability. Therefore, multi-agent collaborative automated modeling methods and systems oriented towards MBSE (Massively Multilingual Semantics and Logic) are needed to address these problems. Summary of the Invention

[0004] (a) Technical problems to be solved

[0005] To address the shortcomings of existing technologies, this invention provides a multi-agent collaborative automated modeling method and system for MBSE, thus solving the aforementioned problems.

[0006] (II) Technical Solution

[0007] To achieve the above objectives, the present invention provides the following technical solution: a multi-agent collaborative automated modeling method for MBSE, the method comprising the following steps: Step S1, obtaining the natural language modeling requirements input by the user.

[0008] Step S2: Based on the natural language modeling requirements, retrieve the knowledge subgraph related to the natural language modeling requirements in the shared knowledge environment, and construct a modeling context based on the knowledge subgraph; wherein the shared knowledge environment includes at least a domain knowledge graph, which is used to represent the SysML v2 metamodel, domain ontology, and engineering constraint rules.

[0009] Step S3: Invoke the generated agent to generate the current SysML v2 model based on the modeling context.

[0010] Step S4: Invoke the verification agent to perform syntactic verification and semantic verification based on the domain knowledge graph of the current SysML v2 model, and output the verification results.

[0011] Step S5: When the verification result indicates that the current SysML v2 model has failed the syntax verification, has semantic inconsistencies, or violates the engineering constraint rules, the repair agent is invoked to perform deterministic repair based on the domain knowledge graph to obtain the repaired SysML v2 model, and the process returns to step S4 until the verification result indicates that the repaired SysML v2 model meets the preset conditions, and the final SysML v2 model is output.

[0012] Furthermore, in step S2: graph retrieval enhancement is performed in the shared knowledge environment based on the natural language modeling requirements to obtain the knowledge subgraph.

[0013] The graph retrieval enhancement includes: determining retrieval elements based on the natural language modeling requirements, and then matching seed nodes with the retrieval elements in the domain knowledge graph before proceeding. Skip neighborhood expansion to form a locally connected subgraph relevant to the natural language modeling requirements as the knowledge subgraph.

[0014] The knowledge subgraph is serialized to construct the modeling context.

[0015] Furthermore, the shared knowledge environment also includes a vector database, which stores semantic vector representations of nodes and / or relationships in the domain knowledge graph; the graph retrieval enhancement includes vectorizing the natural language modeling requirements, performing similarity retrieval based on the semantic vectors of the natural language modeling requirements and the semantic vectors in the vector database to obtain candidate seed nodes, and then using the candidate seed nodes to perform neighborhood expansion in the domain knowledge graph to obtain the knowledge subgraph.

[0016] Furthermore, the verification result includes at least the semantic determination result of the current SysML v2 model, which is one of three states: strictly valid, weakly valid, or invalid. Strictly valid indicates that the syntax verification passed and the semantic verification did not detect any conflict that violates the engineering constraint rules; weakly valid indicates that the syntax verification passed and the semantic verification did not detect any conflict, but there is a gap in the domain knowledge graph coverage; and invalid indicates that the syntax verification failed or the semantic verification detected a conflict that violates the engineering constraint rules.

[0017] Furthermore, the semantic verification includes: converting the current SysML v2 model into a temporary model graph, wherein the nodes of the temporary model graph represent system components and their interfaces or ports, and the edges of the temporary model graph represent interface connection relationships; and performing constraint consistency verification based on the temporary model graph and the domain knowledge graph, wherein the constraint consistency verification includes determining the subgraph matching relationship and checking the engineering constraint rules, so as to output the verification result.

[0018] Furthermore, the syntax verification includes: parsing the current SysML v2 model based on SysML v2 syntax rules to determine whether the current SysML v2 model meets preset syntax constraints, and outputting syntax error information when it does not meet the constraints; the syntax error information includes at least the error location and error type, and the deterministic repair in step S5 includes performing syntax correction on the current SysML v2 model based on the syntax error information.

[0019] Furthermore, when the semantic determination result is weakly valid and the verification result indicates the existence of a domain knowledge graph coverage gap, the method further includes at least one of the following: marking the current SysML v2 model for coverage gaps, and simultaneously outputting the coverage gap markings when outputting the final SysML v2 model.

[0020] The repair agent is invoked to perform fallback repair to update the current SysML v2 model, and the process returns to step S4 for verification again, wherein the fallback repair includes filling in or rewriting the relevant parts of the coverage gap based on the large language model.

[0021] Furthermore, the deterministic repair in step S5 includes: generating a structured error report based on the verification result, and determining the error type according to the structured error report; for the error type, searching the domain knowledge graph for a repair path or alternative structure that satisfies the engineering constraint rules; and performing the corresponding repair operation on the current SysML v2 model according to the search results to obtain the repaired SysML v2 model.

[0022] Furthermore, the preset condition includes at least one of the following: the semantic determination result obtained in step S4 is strictly valid.

[0023] The semantic determination result obtained in step S4 is weakly valid and a coverage gap marker has been generated. The coverage gap marker is then associated with the final SysML v2 model and output.

[0024] The iteration of the deterministic repair reaches a preset upper limit, or the structured error report no longer changes in a preset number of consecutive iterations, thereby terminating the iteration and outputting the current SysML v2 model as the final SysML v2 model.

[0025] The present invention also provides a multi-agent collaborative automated modeling system for MBSE, the system comprising: a requirement acquisition module for acquiring natural language modeling requirements input by the user.

[0026] The subgraph retrieval and context construction module is used to retrieve knowledge subgraphs related to the natural language modeling requirements in a shared knowledge environment based on the natural language modeling requirements, and to construct a modeling context based on the knowledge subgraphs; wherein the shared knowledge environment includes at least a domain knowledge graph, which is used to represent the SysML v2 metamodel, the domain ontology, and engineering constraint rules.

[0027] The model generation module is used to call the generation agent to generate the current SysML v2 model based on the modeling context.

[0028] The model verification module is used to call the verification agent to perform syntactic verification and semantic verification based on the domain knowledge graph of the current SysML v2 model, and output the verification results.

[0029] The model repair and output module is used to call the repair agent to perform deterministic repair based on the domain knowledge graph when the verification result indicates that the current SysML v2 model has failed the syntax verification, has semantic inconsistencies, or violates the engineering constraint rules, so as to obtain the repaired SysML v2 model. The repaired SysML v2 model is then returned to the model verification module for re-verification until the verification result indicates that the repaired SysML v2 model meets the preset conditions, and the final SysML v2 model is output.

[0030] (III) Beneficial Effects

[0031] Compared with existing technologies, this invention provides a multi-agent collaborative automated modeling method and system for MBSE, which has the following beneficial effects: 1. This multi-agent collaborative automated modeling method and system for MBSE obtains knowledge subgraphs related to natural language modeling needs by retrieving them from a shared knowledge environment and constructing a modeling context. This transforms the generation process from "unstructured context relying solely on text similarity retrieval" to "engineering knowledge and constraint context driven by graph structure". Thus, SysML v2 meta-model, domain ontology, and engineering constraint rules are explicitly introduced at the beginning of the modeling stage, reducing the risk of semantic illusion caused by missing context or structure loss, improving the accuracy of the generated model in terms of interface matching, topological relationships, and constraint consistency, thereby alleviating the problem of "grammatically correct but engineering semantic failure" in existing technologies, and improving the usability and stability of the generated results.

[0032] 2. This multi-agent collaborative automated modeling method and system for MBSE simultaneously performs grammatical verification and semantic verification based on domain knowledge graphs during the verification process, and outputs semantic judgment results. This enables model errors to be clearly identified and classified, thereby avoiding repeated trial and error and unstable convergence caused by relying solely on the probabilistic self-correction of large language models. It improves the determinability and traceability of iterative repair, reduces the probability of "correcting one error introducing a new error", significantly reduces the number of repair rounds, and improves the closed-loop convergence efficiency.

[0033] 3. This multi-agent collaborative automated modeling method and system for MBSE converts the current SysML v2 model into a temporary model graph during the semantic verification phase. Constraint consistency checks are then performed based on the temporary model graph and the domain knowledge graph, enabling semantic violations to be accurately located through graph structure matching and engineering constraint rule checks. Simultaneously, during the repair phase, the error type is determined based on structured error reports, and repair paths or alternative structures that satisfy engineering constraint rules are retrieved from the domain knowledge graph for deterministic repair. This transforms semantic violation correction from "fuzzy rewriting at the language level" to "constraint-driven structured repair," enhancing the determinism and engineering interpretability of repair actions and improving reliability and consistency in complex system modeling scenarios.

[0034] 4. This multi-agent collaborative automated modeling method and system for MBSE introduces weakly effective states, coverage gap marking, and a fallback repair mechanism. This enables the system to avoid misjudging knowledge blind spots as inevitable errors and leading to meaningless iterations when the domain knowledge graph coverage is incomplete or out of distribution. On the one hand, coverage gaps can be explicitly marked and included in the final model output, improving the interpretability of the results and the visibility of risks. On the other hand, fallback repair can be performed when trigger conditions are met and the system can return to the verification stage, thereby enhancing the adaptability to new domains, new components, or new constraint scenarios while ensuring closed-loop controllability. Attached Figure Description

[0035] Figure 1 The overall flowchart of the multi-agent collaborative automated modeling method for MBSE provided by this invention is shown in the figure.

[0036] Figure 2 This is a schematic diagram of the framework of the multi-agent cooperative automated modeling method for MBSE provided by the present invention.

[0037] Figure 3 This is a schematic diagram of the modules of the multi-agent collaborative automated modeling system for MBSE provided by the present invention.

[0038] Figure 4 This is a schematic diagram of the manual mass fraction distribution histogram of the present invention. Detailed Implementation

[0039] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0040] To enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0041] Please see Figure 1-2 , Figure 1 The overall flowchart of the multi-agent cooperative automated modeling method for MBSE provided by the present invention; Figure 2 This is a schematic diagram of the framework of the multi-agent collaborative automated modeling method for MBSE provided by the present invention; the multi-agent collaborative automated modeling method for MBSE includes the following steps: Step S1, obtaining the natural language modeling requirements input by the user.

[0042] Step S2: Based on the natural language modeling requirements, retrieve the knowledge subgraph related to the natural language modeling requirements in the shared knowledge environment, and construct a modeling context based on the knowledge subgraph; wherein the shared knowledge environment includes at least a domain knowledge graph, which is used to represent the SysML v2 metamodel, domain ontology, and engineering constraint rules.

[0043] Step S3: Invoke the generated agent to generate the current SysML v2 model based on the modeling context.

[0044] Step S4: Invoke the verification agent to perform syntactic verification and semantic verification based on the domain knowledge graph of the current SysML v2 model, and output the verification results.

[0045] Step S5: When the verification result indicates that the current SysML v2 model has failed the syntax verification, has semantic inconsistencies, or violates the engineering constraint rules, the repair agent is invoked to perform deterministic repair based on the domain knowledge graph to obtain the repaired SysML v2 model, and the process returns to step S4 until the verification result indicates that the repaired SysML v2 model meets the preset conditions, and the final SysML v2 model is output.

[0046] In this embodiment, the multi-agent collaborative automated modeling method for MBSE takes natural language requirements as the modeling entry point and couples the generation capability of large language models with domain engineering semantic constraints through a shared knowledge environment, thereby achieving convergent and verifiable SysML v2 automatic modeling: First, in step S1, the modeling requirements described by the user in natural language are obtained. The requirements may come from system engineering requirements documents, review records or interactive input.

[0047] Subsequently, in step S2, knowledge subgraphs related to the requirement are retrieved from the shared knowledge environment based on the requirement, and a modeling context is constructed accordingly. The domain knowledge graph represents the SysML v2 metamodel, domain ontology, and engineering constraint rules in a structured manner, so that the context not only includes concept explanations, but also computable engineering semantic basis such as component relationships, interface compatibility, and attribute consistency, avoiding the lack of structural information caused by relying solely on text fragments.

[0048] In step S3, the agent is generated. Under the constraints of the modeling context, the agent outputs the current SysML v2 model, making the initial model closer to the domain knowledge in terms of element type, relation pattern and constraint boundary, and reducing the arbitrariness and semantic deviation of the generation.

[0049] In step S4, the verification agent is invoked to perform joint verification of the current SysML v2 model. The joint verification includes syntax verification and semantic verification. Syntax verification is used to determine whether the model expression meets the SysML v2 syntax rules and to locate the source of syntax errors. Semantic verification is based on the domain knowledge graph to check the consistency of key connection relationships, attribute constraints and structural dependencies in the model, thereby giving a verifiable verification result.

[0050] When the verification result output in step S4 represents a syntax failure, semantic inconsistency, or violation of engineering constraint rules, step S5 triggers the repair agent to perform deterministic repair. The repair agent uses a traceable, structured repair method to complete, replace, or adjust the model based on the engineering rules and compatibility relationships encoded in the domain knowledge graph. For example, it performs rule-driven corrections for issues such as missing connections, interface mismatches, and attribute mismatches. The repaired model is then returned to step S4 for verification again until the verification result meets the preset conditions, at which point the final SysML v2 model is output.

[0051] In terms of application, this method can be embedded into the MBSE modeling toolchain as a modeling assistant to realize the automatic construction and iterative error correction of SysML v2 models that can be used for subsequent simulation, analysis and review, from natural language requirements. Its technical principle lies in providing authoritative semantic benchmarks and constraint reasoning capabilities with domain knowledge graphs, improving the correctness of the model from "only parsable" to "engineering semantic usable", thereby improving the stability, interpretability and reusability of collaborative modeling of complex systems.

[0052] Furthermore, in step S2: graph retrieval enhancement is performed in the shared knowledge environment based on the natural language modeling requirements to obtain the knowledge subgraph.

[0053] The graph retrieval enhancement includes: determining retrieval elements based on the natural language modeling requirements, and then matching seed nodes with the retrieval elements in the domain knowledge graph before proceeding. Skip neighborhood expansion to form a locally connected subgraph relevant to the natural language modeling requirements as the knowledge subgraph.

[0054] The knowledge subgraph is serialized to construct the modeling context.

[0055] In this embodiment, step S2 constructs a knowledge subgraph with a topological structure that is consistent with the semantics of natural language requirements within a shared knowledge environment through graph retrieval enhancement, thereby providing a constrained structured context for the subsequent generation of intelligent agents. The technical principle is to map the requirements from "text description" to "graph retrieval entry point" and use the connectivity and engineering constraint relationships of the knowledge graph to obtain a local subgraph that is strongly related to the requirements: First, the retrieval elements are determined based on the natural language modeling requirements. The retrieval elements can represent the semantics of system components, interfaces or ports, key attributes, and constraint intentions, etc., and are used to locate the seed nodes corresponding to the requirements in the domain knowledge graph.

[0056] Then execute with the seed node as the center. Skip-neighbor expansion aggregates information such as component relationships, connection constraints, attribute constraints, and alternative structures related to requirements by expanding layer by layer along nodes and their relational edges. This results in a locally connected subgraph as a knowledge subgraph, ensuring that the retrieval results maintain the integrity of the engineering topology and constraint links, and avoiding the loss of structural information caused by recalling only discrete text fragments.

[0057] Finally, the knowledge subgraph is serialized, converting the node types, relation types, and key attributes in the graph structure into a modeling context that can be consumed by the generating agent according to a preset format, such as a structured fragment description of "component, port, constraint, connection candidate". This enables a constraint generation path of "first retrieve the graph, then generate the model" in terms of application, making the generation stage naturally subject to the constraints of graph semantics and engineering rules, thereby improving the correctness of the initial model draft and the convergence efficiency of subsequent verification and repair.

[0058] Furthermore, the shared knowledge environment also includes a vector database, which stores semantic vector representations of nodes and / or relationships in the domain knowledge graph; the graph retrieval enhancement includes vectorizing the natural language modeling requirements, performing similarity retrieval based on the semantic vectors of the natural language modeling requirements and the semantic vectors in the vector database to obtain candidate seed nodes, and then using the candidate seed nodes to perform neighborhood expansion in the domain knowledge graph to obtain the knowledge subgraph.

[0059] In this embodiment, to improve retrieval efficiency and semantic recall capabilities in large-scale domain knowledge graphs, the shared knowledge environment further introduces a vector database and works in conjunction with graph retrieval enhancement. The technical principle is to achieve rapid coarse recall at the semantic level using vector similarity, and then achieve structured fine retrieval using knowledge graph neighborhood expansion: First, the vector database stores the semantic vector representations of nodes and / or relationships in the domain knowledge graph. The semantic vectors can be encoded by information such as node name, type description, port semantics, constraint text, or relationship semantics, so that engineering entities and constraint relationships in the graph have comparable semantic distances in the vector space.

[0060] Secondly, the natural language modeling requirements are vectorized to generate requirement semantic vectors, and similarity searches are performed with the semantic vectors in the vector database to obtain a set of candidate seed nodes that are most relevant to the requirement semantics. This allows for accurate location of potential related entities even when there are synonymous rewritings, abbreviations, or cross-domain terminology differences in the requirement expression, avoiding missed recalls caused by relying solely on symbol matching.

[0061] Subsequently, starting from the candidate seed node, a neighborhood expansion is performed in the domain knowledge graph, aggregating the component relationships, connection constraints, and attribute constraints related to the candidate node to form a knowledge subgraph consistent with the requirements, and a modeling context is constructed based on this.

[0062] In this way, the vector database serves as the "semantic retrieval entry point," while the knowledge graph serves as the "topological and constraint reasoning carrier." The combination of the two ensures both the coverage and robustness of the retrieval, as well as the structural integrity and engineering interpretability of the final context. This approach is suitable for collaborative modeling scenarios with large-scale engineering knowledge, diverse requirements, and the need for rapid response.

[0063] Furthermore, the verification result includes at least the semantic determination result of the current SysML v2 model, which is one of three states: strictly valid, weakly valid, or invalid. Strictly valid indicates that the syntax verification passed and the semantic verification did not detect any conflict that violates the engineering constraint rules; weakly valid indicates that the syntax verification passed and the semantic verification did not detect any conflict, but there is a gap in the domain knowledge graph coverage; and invalid indicates that the syntax verification failed or the semantic verification detected a conflict that violates the engineering constraint rules.

[0064] In this embodiment, the verification agent further provides a three-valued semantic judgment result when outputting the verification result. The technical principle is to expand the judgment of "whether the model is usable" from a single binary value to three states that simultaneously characterize "engineering semantic conflict" and "knowledge coverage boundary", thereby avoiding misjudgment and meaningless iteration when knowledge is incomplete: when the syntax verification passes and the semantic verification does not detect any conflict that violates the engineering constraint rules, it is judged to be strictly valid, indicating that the current SysML v2 model satisfies the consistency of syntax and engineering semantics within the scope of the covered domain knowledge and constraints, and can be used as the final model or directly enter the subsequent analysis toolchain.

[0065] When the syntax validation passes and the semantic validation does not detect any conflicts, but the validation process finds that the entities, relationships, or constraints involved are not covered by the domain knowledge graph and cannot complete the deterministic verification, it is judged as weakly valid. This means that the model has not found any conflicts under known constraints, but there are still parts that have not been validated by authoritative knowledge. This makes it easier for the system to mark the coverage gaps, prompt for supplementary knowledge, or trigger fallback processing.

[0066] When syntax validation fails or semantic validation detects a clear conflict that violates engineering constraints, the model is deemed invalid, indicating that there is a locatable problem that must be corrected, and the deterministic repair process should begin.

[0067] Through the above three-value judgment, the system can distinguish and handle different types of problems in terms of functionality, and improve the convergence and interpretability of closed-loop repair in terms of function, so that the verification results can directly drive the selection of subsequent repair strategies and reduce unnecessary repeated iterations.

[0068] Furthermore, the semantic verification includes: converting the current SysML v2 model into a temporary model graph, wherein the nodes of the temporary model graph represent system components and their interfaces or ports, and the edges of the temporary model graph represent interface connection relationships; and performing constraint consistency verification based on the temporary model graph and the domain knowledge graph, wherein the constraint consistency verification includes determining the subgraph matching relationship and checking the engineering constraint rules, so as to output the verification result.

[0069] In this embodiment, the semantic verification achieves a computable determination of the engineering semantic consistency of the SysML v2 model through a "model graph representation + graph constraint verification" approach. The technical principle is to convert the text-based SysML v2 model into a temporary model graph suitable for structured reasoning, and to establish a comparable structural mapping between the temporary model graph and the domain knowledge graph, thereby systematically checking the connection legality and constraint satisfaction. Specifically, when the current SysML v2 model is converted into a temporary model graph, the nodes of the temporary model graph are used to represent system components and corresponding interface or port entities, and the edges of the temporary model graph are used to represent the connection relationships between interfaces or ports, so that the topology, port type and key attributes in the model are elevated from the text symbol level to the graph structure level.

[0070] Subsequently, a constraint consistency check is performed based on the temporary model graph and the domain knowledge graph. The check prioritizes subgraph matching relationship determination between the local structure in the temporary model graph and the legal structural patterns in the domain knowledge graph to identify whether the model topology satisfies the relational paradigm defined by the domain ontology. It further checks engineering constraint rules, such as interface type compatibility, connection direction constraints, attribute value range or consistency constraints, thereby outputting the verification result and locating the specific node, edge or attribute position that causes semantic conflict. Through this semantic verification mechanism, the system can functionally transform "semantic correctness" into a reproducible graph matching and rule checking process. In terms of function, it can effectively discover hidden engineering errors that are difficult to expose by traditional syntax parsing alone, providing a structured and traceable error location basis for subsequent deterministic repair.

[0071] Furthermore, the syntax verification includes: parsing the current SysML v2 model based on SysML v2 syntax rules to determine whether the current SysML v2 model meets preset syntax constraints, and outputting syntax error information when it does not meet the constraints; the syntax error information includes at least the error location and error type, and the deterministic repair in step S5 includes performing syntax correction on the current SysML v2 model based on the syntax error information.

[0072] In this embodiment, the syntax verification is used to ensure the parsability and formal correctness of the SysML v2 model before entering semantic verification. Its technical principle is to parse the current SysML v2 model according to the preset SysML v2 syntax rules, thereby converting whether the model text meets the syntax constraints into an automatically judgeable parsing result: Specifically, the verification agent calls the syntax parsing mechanism to check the model at the lexical and syntactic levels, and determines whether the model meets the preset syntax constraints such as keyword usage, structural hierarchy, pairing of brackets and delimiters, and consistency of declarations and references; when the syntax constraints are not met, syntax error information is output. The syntax error information includes at least the error location and error type, so that the error can be accurately located and can be used for automatic repair.

[0073] In step S5, deterministic repair further corrects the model's syntax based on the syntax error information. For example, it rewrites and completes issues such as missing symbols, incorrect keywords, missing declarations, or inconsistent references, giving the repair action a definite triggering condition and repair target. This avoids misjudgment or invalid iteration caused by directly performing semantic reasoning when the syntax fails. Through the above mechanism, syntax verification functionally ensures whether the model can be parsed by the toolchain, and improves stability and convergence efficiency.

[0074] Furthermore, when the semantic determination result is weakly valid and the verification result indicates the existence of a domain knowledge graph coverage gap, the method further includes at least one of the following: marking the current SysML v2 model for coverage gaps, and simultaneously outputting the coverage gap markings when outputting the final SysML v2 model.

[0075] The repair agent is invoked to perform fallback repair to update the current SysML v2 model, and the process returns to step S4 for verification again, wherein the fallback repair includes filling in or rewriting the relevant parts of the coverage gap based on the large language model.

[0076] In this embodiment, when the semantic judgment result given by the verification agent is weakly valid and the verification result indicates that there is a gap in the domain knowledge graph coverage, in order to avoid misjudging the knowledge blind spot as a necessary error in the model and causing meaningless iterations, the system adopts at least one of the two handling paths of "gap explicitization + controllable fallback" to improve interpretability and robustness: First, the current SysML v2 model is marked with coverage gaps, that is, the positions of elements, relations or constraints that cannot be deterministically verified by the domain knowledge graph are associated with the model in a preset marking method, and the coverage gap mark is output synchronously when the final SysML v2 model is output, so that the user can clearly know the parts of the model that have not been verified by authoritative knowledge, which is convenient for subsequent supplementation of graph knowledge, manual review or risk assessment.

[0077] Secondly, the repair agent is invoked to perform fallback repair to update the current SysML v2 model and return to step S4 for re-verification. The fallback repair includes supplementing or rewriting the relevant parts of the coverage gap based on the large language model. For example, when the map lacks a certain type of port compatibility relationship or new component attribute constraint, the large language model combines the requirement context to generate candidate supplementation schemes and screens acceptable results through re-verification. This improves the adaptability to new domains, new components or new constraint scenarios without compromising the controllability of the verification closed loop. Through the above mechanism, the system functionally achieves differentiated processing of "decidable conflicts" and "undecidable gaps", and in terms of function, it reduces the risk of mis-repair and improves the transparency and engineering usability of the output model.

[0078] Furthermore, the deterministic repair in step S5 includes: generating a structured error report based on the verification result, and determining the error type according to the structured error report; for the error type, searching the domain knowledge graph for a repair path or alternative structure that satisfies the engineering constraint rules; and performing the corresponding repair operation on the current SysML v2 model according to the search results to obtain the repaired SysML v2 model.

[0079] In this embodiment, the deterministic repair is based on the principles of "determinable error type, searchable repair path, and reproducible repair action." It transforms the traditional error correction process, which relies on probabilistic trial and error based on large language models, into a structured repair process driven by domain knowledge graph constraints. The technical principle is to utilize the engineering constraint rules, interface compatibility relationships, and alternative structural patterns encoded in the domain knowledge graph to provide traceable repair basis for each type of semantic violation: First, a structured error report is generated based on the verification results. The structured error report at least includes error location information and conflict description, and the error type is determined accordingly. This allows subsequent repairs to select a repair strategy that matches the error type. For example, errors can be classified as missing connections, incompatible interface or port types, attribute values ​​that do not meet constraints, or topological structures that do not meet domain relationship paradigms.

[0080] Subsequently, for the error type, a repair path or alternative structure that satisfies the engineering constraint rules is retrieved from the domain knowledge graph. The repair path is used to characterize the feasible transformation sequence from the existing model structure to the constraint-satisfied structure, and the alternative structure is used to provide standard topology or component replacement schemes that satisfy the constraints, so that the repair decision comes from an authoritative semantic benchmark rather than subjective generation.

[0081] Finally, based on the search results, the corresponding repair operations are performed on the current SysML v2 model to obtain the repaired SysML v2 model. The repair operations may include inserting or completing missing connections, replacing incompatible ports or intermediate components, adjusting attribute values ​​to meet the constraint range, reconstructing local topological relationships, etc. The repaired model is then returned to the verification stage for further verification, thereby realizing an automated and interpretable error correction closed loop in terms of functionality, improving the repair convergence efficiency and significantly reducing the risk of "introducing new errors by fixing one error".

[0082] Furthermore, the preset condition includes at least one of the following: the semantic determination result obtained in step S4 is strictly valid.

[0083] The semantic determination result obtained in step S4 is weakly valid and a coverage gap marker has been generated. The coverage gap marker is then associated with the final SysML v2 model and output.

[0084] The iteration of the deterministic repair reaches a preset upper limit, or the structured error report no longer changes in a preset number of consecutive iterations, thereby terminating the iteration and outputting the current SysML v2 model as the final SysML v2 model.

[0085] In this embodiment, to ensure that the generation, verification, and repair closed loop has a controllable termination mechanism and an interpretable output strategy in engineering applications, the method sets preset conditions to determine when to stop iteration and output the final SysML v2 model. Its technical principle is to use the verification status and iteration convergence characteristics as the termination basis, thereby achieving a balance between "result reliability" and "computational cost": when the semantic determination result obtained in step S4 is strictly valid, it indicates that the current model has simultaneously satisfied the grammatical constraints and the engineering constraint rules within the scope of the domain knowledge graph, and the iteration can be directly terminated and output as the final model to ensure that the output model has engineering semantic consistency within the scope of determination.

[0086] When the semantic determination result obtained in step S4 is weakly valid and a coverage gap marker has been generated, it indicates that the current model has not detected a clear conflict but there is a knowledge coverage boundary. The system achieves "available output with risk warning" by associating the coverage gap marker with the final SysML v2 model output, so that users can supplement knowledge or manually review the unverified parts, thereby avoiding excessive iteration due to incomplete knowledge.

[0087] In addition, to avoid situations where convergence fails for a long time or repeated repairs occur in complex scenarios, the preset conditions also include convergence criteria such as the number of iterations reaching a preset upper limit, or the structured error report no longer changing in a preset number of consecutive iterations. At this point, the system terminates the iteration and outputs the current SysML v2 model as the final SysML v2 model. This provides an executable stopping rule in terms of functionality, and prevents the closed loop from falling into an invalid loop and improves the stability and predictability of engineering deployment.

[0088] Please see Figure 3 The present invention also provides a multi-agent collaborative automated modeling system for MBSE, the system comprising: a requirement acquisition module for acquiring natural language modeling requirements input by the user.

[0089] The subgraph retrieval and context construction module is used to retrieve knowledge subgraphs related to the natural language modeling requirements in a shared knowledge environment based on the natural language modeling requirements, and to construct a modeling context based on the knowledge subgraphs; wherein the shared knowledge environment includes at least a domain knowledge graph, which is used to represent SysML v2 metamodels, domain ontology, and engineering constraint rules.

[0090] The model generation module is used to call the generation agent to generate the current SysML v2 model based on the modeling context.

[0091] The model verification module is used to call the verification agent to perform syntactic verification and semantic verification based on the domain knowledge graph of the current SysML v2 model, and output the verification results.

[0092] The model repair and output module is used to call the repair agent to perform deterministic repair based on the domain knowledge graph when the verification result indicates that the current SysML v2 model has failed the syntax verification, has semantic inconsistencies, or violates the engineering constraint rules, so as to obtain the repaired SysML v2 model. The repaired SysML v2 model is then returned to the model verification module for re-verification until the verification result indicates that the repaired SysML v2 model meets the preset conditions, and the final SysML v2 model is output.

[0093] To further illustrate the effectiveness of this method, this invention also provides experimental analysis: Referring to Table 1, from an engineering usability (SVR) perspective, the original LLM is almost unable to generate models that can be parsed by the SysML v2 toolchain, indicating that without any formal constraints, large language models struggle to stably meet the basic requirements of formal languages. After introducing multi-agent loop closure and grammatical verification, the SVR of the agent (without RAG) is significantly improved, demonstrating that grammatical gating is a necessary condition for "pulling the generated results into the engineering usability range." However, relying solely on grammatical verification is still insufficient to guarantee stable convergence of the model in complex tasks.

[0094] With the further introduction of text retrieval enhancement, the agent (text RAG) improved both the resolution rate and SVR metric, indicating that the example context can effectively improve the structural rationality of the initial candidates, making it easier for the multi-agent loop to converge within a limited number of rounds. However, the improvement of this system is mainly reflected in "easier generation of a grammatically correct model" rather than "easier generation of an engineering semantically correct model".

[0095] This difference is particularly evident in semantic rigor metrics. The OC of the agent (text RAG) remains low, indicating that syntactic validation alone cannot identify logical errors that violate domain ontology or engineering constraints (such as interface direction mismatch, constraint conflicts, etc.). In contrast, the OC of our method is significantly improved, demonstrating that explicitly incorporating semantic consistency judgment into the validation process and providing structured symbolic context through graph retrieval enhancement can effectively suppress "reasonable but incorrect" generated results at the engineering semantic level.

[0096] Table 1. Comparison of Task Resolution Rate, Semantic Rigor, and Human Quality of Different Systems

[0097]

[0098] The human quality scoring further validated the above conclusions from an expert perspective. Figure 4 The distribution of different systems across scores of 1, 2, and 3 is shown. It can be seen that the output of the original LLM is almost entirely concentrated in the low-fidelity range; while the agent (text RAG) improves the average score, there are still significant omissions and redundancies; and the proposed method has a significantly higher proportion in the high-fidelity (3-point) model, indicating that its advantages lie not only in parsingability but also in the complete expression of user needs semantics and consistency with engineering constraints.

[0099] Furthermore, to analyze the efficiency and stability of different systems in the generation-repair loop, this paper compares the average number of repair rounds required to reach a semantically acceptable solution for three systems incorporating iterative mechanisms. For the original LLM, this metric is not applicable since no repair loop exists.

[0100] Table 2 compares the average number of iterations required for our method to reach an effective solution with that of an agent (without RAG) and an agent (with text RAG).

[0101] Table 2. Comparison of Iteration Count and Convergence Rate of Different Systems

[0102]

[0103] The results show that our proposed method significantly outperforms the baseline system in both average repair rounds and convergence rate. Although the agent (text RAG) can improve the initial generation quality through example context, its repair process still heavily relies on the probabilistic trial-and-error nature of LLM, causing some complex prompts to fail to converge before reaching the round limit. In contrast, our method uses graph-guided deterministic repair, transforming the correction of semantic violations into traceable graph structure operations, thereby significantly reducing the variance of repair rounds and improving overall convergence stability.

[0104] The working principle of this invention is as follows: In a typical complex equipment collaborative modeling scenario, such as the system engineering modeling of a UAV power supply and control system, after the user expresses requirements in natural language such as "the battery outputs 24V, the flight controller requires 5V power, redundancy of primary and backup power supplies with automatic switching, and interface compatibility," the system first uses these requirements as search clues to obtain knowledge subgraphs related to "battery, DC-DC, power switching, flight controller port type, voltage matching, redundancy rules," etc., in the shared knowledge environment. Based on this, it constructs a modeling context containing meta-model constraints, port semantics, and engineering rules. The generating agent then generates SysML under the constraints of this context. The initial draft of the v2 model was then validated by an agent that performed syntactic parsing and semantic consistency checks. If semantic issues violating engineering constraints were found, such as "a 24V power port directly connected to a 5V load port" or "redundancy switching lacking arbitration / switching components," a structured error report was output and the model was deemed invalid. The repair agent then retrieved a repair path or alternative structure that met the constraints based on the domain knowledge graph. For example, it automatically inserted a DC-DC conversion module, completed the master / slave switching module, and reconnected the port relationships. The repaired model was then sent back for validation until the preset conditions were met, at which point the final model was output. If a parameter of a new device was missing in the knowledge graph, resulting in weak validity, the system marked the gap and output it with the model. Alternatively, under controlled conditions, a large language model was called to complete the gap and validate it again. This achieved closed-loop modeling and interpretable error correction from natural language requirements to a SysML v2 model that is semantically usable in engineering applications.

[0105] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover 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 limitations, 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.

[0106] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A multi-agent cooperative automated modeling method for MBSE, characterized by: The method includes the following steps: Step S1: Obtain the natural language modeling requirements input by the user; Step S2: Based on the natural language modeling requirements, retrieve the knowledge subgraph related to the natural language modeling requirements in the shared knowledge environment, and construct a modeling context based on the knowledge subgraph; wherein the shared knowledge environment includes at least a domain knowledge graph, which is used to represent the SysML v2 metamodel, domain ontology, and engineering constraint rules. Step S3: Invoke the generated agent to generate the current SysML v2 model based on the modeling context; Step S4: Invoke the verification agent to perform syntactic verification and semantic verification based on the domain knowledge graph on the current SysML v2 model, and output the verification results; Step S5: When the verification result indicates that the current SysML v2 model has failed the syntax verification, has semantic inconsistencies, or violates the engineering constraint rules, the repair agent is invoked to perform deterministic repair based on the domain knowledge graph to obtain the repaired SysML v2 model, and the process returns to step S4 until the verification result indicates that the repaired SysML v2 model meets the preset conditions, and the final SysML v2 model is output.

2. The multi-agent cooperative automated modeling method for MBSE according to claim 1, characterized in that, In step S2: Based on the natural language modeling requirements, graph retrieval enhancement is performed in the shared knowledge environment to obtain the knowledge subgraph; The graph retrieval enhancement includes: determining retrieval elements based on the natural language modeling requirements, and then matching seed nodes with the retrieval elements in the domain knowledge graph before proceeding. Skip neighborhood expansion to form a locally connected subgraph related to the natural language modeling requirements as the knowledge subgraph; The knowledge subgraph is serialized to construct the modeling context.

3. The multi-agent cooperative automated modeling method for MBSE according to claim 2, characterized in that: The shared knowledge environment also includes a vector database, which stores semantic vector representations of nodes and / or relationships in the domain knowledge graph. The graph retrieval enhancement includes vectorizing the natural language modeling requirements, performing similarity retrieval based on the semantic vectors of the natural language modeling requirements and the semantic vectors in the vector database to obtain candidate seed nodes, and then using the candidate seed nodes to expand the neighborhood of the domain knowledge graph to obtain the knowledge subgraph.

4. The multi-agent cooperative automated modeling method for MBSE according to claim 1, characterized in that: The verification result includes at least the semantic determination result of the current SysML v2 model, which is one of three states: strictly valid, weakly valid, or invalid. Strictly valid indicates that the syntax verification passed and the semantic verification did not detect any conflict that violates the engineering constraint rules. Weakly valid indicates that the syntax verification passed and the semantic verification did not detect any conflict, but there is a gap in the domain knowledge graph coverage. Invalid indicates that the syntax verification failed or the semantic verification detected a conflict that violates the engineering constraint rules.

5. The multi-agent cooperative automated modeling method for MBSE according to claim 1, characterized in that, The semantic verification includes: converting the current SysML v2 model into a temporary model graph, where the nodes of the temporary model graph represent system components and their interfaces or ports, and the edges of the temporary model graph represent interface connection relationships; and performing constraint consistency verification based on the temporary model graph and the domain knowledge graph, whereby the constraint consistency verification includes determining the subgraph matching relationship and checking the engineering constraint rules, so as to output the verification result.

6. The multi-agent cooperative automated modeling method for MBSE according to claim 1, characterized in that, The syntax verification includes: parsing the current SysML v2 model based on SysML v2 syntax rules to determine whether the current SysML v2 model meets preset syntax constraints, and outputting syntax error information when it does not meet the constraints; the syntax error information includes at least the error location and error type, and the deterministic repair in step S5 includes performing syntax correction on the current SysML v2 model based on the syntax error information.

7. The multi-agent cooperative automated modeling method for MBSE according to claim 4, characterized in that, When the semantic determination result is weakly valid and the verification result indicates a gap in domain knowledge graph coverage, the method further includes at least one of the following: The current SysML v2 model is marked with a coverage gap, and the coverage gap is output synchronously when the final SysML v2 model is output. The repair agent is invoked to perform fallback repair to update the current SysML v2 model, and the process returns to step S4 for verification again, wherein the fallback repair includes filling in or rewriting the relevant parts of the coverage gap based on the large language model.

8. The multi-agent cooperative automated modeling method for MBSE according to claim 4, characterized in that: The deterministic repair in step S5 includes: generating a structured error report based on the verification results, and determining the error type based on the structured error report; for the error type, searching the domain knowledge graph for a repair path or alternative structure that satisfies the engineering constraint rules; and performing the corresponding repair operation on the current SysML v2 model based on the search results to obtain the repaired SysML v2 model.

9. The multi-agent cooperative automated modeling method for MBSE according to claim 8, characterized in that, The preset conditions include at least one of the following: The semantic determination result obtained in step S4 is strictly valid; The semantic determination result obtained in step S4 is weakly valid and a coverage gap marker has been generated. The coverage gap marker is then associated with the final SysML v2 model and output. The iteration of the deterministic repair reaches a preset upper limit, or the structured error report no longer changes in a preset number of consecutive iterations, thereby terminating the iteration and outputting the current SysML v2 model as the final SysML v2 model.

10. A multi-agent collaborative automated modeling system for MBSE, characterized in that, The system includes: The requirement elicitation module is used to obtain the natural language modeling requirements input by the user. The subgraph retrieval and context construction module is used to retrieve knowledge subgraphs related to the natural language modeling requirements in a shared knowledge environment based on the natural language modeling requirements, and to construct a modeling context based on the knowledge subgraphs; wherein the shared knowledge environment includes at least a domain knowledge graph, which is used to represent SysML v2 metamodels, domain ontology, and engineering constraint rules. The model generation module is used to call the generation agent to generate the current SysML v2 model based on the modeling context. The model verification module is used to call the verification agent to perform syntactic verification and semantic verification based on the domain knowledge graph of the current SysML v2 model, and output the verification results. The model repair and output module is used to call the repair agent to perform deterministic repair based on the domain knowledge graph when the verification result indicates that the current SysML v2 model has failed the syntax verification, has semantic inconsistencies, or violates the engineering constraint rules, so as to obtain the repaired SysML v2 model. The repaired SysML v2 model is then returned to the model verification module for re-verification until the verification result indicates that the repaired SysML v2 model meets the preset conditions, and the final SysML v2 model is output.

Citation Information

Patent Citations

  • System and method for automatically generating SysML model based on mixed AI and domain knowledge

    CN120911452A

  • Complex system comprehensive multi-view consistency detection method based on large model

    CN121300747A