Static alignment verification method for functional requirements of sysml state machine diagram based on large language model

By using a large language model-based approach to perform structured parsing and alignment of SysML state machine diagrams and requirement texts, this method solves the problems of limited verification capabilities and lengthy processes in existing technologies. It achieves efficient and accurate alignment verification of SysML state machine diagrams and functional requirements, and is suitable for complex systems such as radar systems.

CN119377088BActive Publication Date: 2026-01-06HARBIN INST OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411502946.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-25
Publication Date
2026-01-06
Estimated Expiration
2044-10-25

AI Technical Summary

Technical Problem

Existing technologies for verifying the alignment of SysML state machine diagrams with functional requirements suffer from issues such as high skill requirements for testers, limited verification capabilities, lengthy and inflexible processes. In particular, when dealing with complex systems such as radar systems, it is difficult to fully cover all requirement levels.

Method used

By employing a large language model-based approach, a general framework was designed to align and validate requirements with state machine diagrams by performing structured analysis and parsing of requirement texts and combining the elements and transformation relationships of SysML state machine diagrams. This framework includes requirement classification, condition filtering, and bidirectional transformation checks.

Benefits of technology

It improves the efficiency and accuracy of verification, reduces the professional skills required of testers, has high scalability and customizability, can fully cover system functional requirements, and ensures the correctness and consistency of the design.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure HDA0005103060570000011
    Figure HDA0005103060570000011
  • Figure HDA0005103060570000012
    Figure HDA0005103060570000012
  • Figure HDA0005103060570000021
    Figure HDA0005103060570000021
Patent Text Reader

Abstract

The application discloses a kind of based on big language model's SysML state machine chart functional requirement static alignment verification method, the method includes the following steps: step S1: unified representation is carried out to requirement text, based on the similarity on structure of requirement sentence, all basic requirements are classified systematically;Step S2: based on LTP big language model, the requirement text that has been processed is parsed;Step S3: parsing SysML graph, the element in SysML graph and its conversion relationship are analyzed systematically;Step S4: for different sentence type and requirement type, the consistency of SysML state machine chart and its corresponding requirement text is verified.The method of the application not only realizes the alignment of requirement and state machine chart by text parsing and graphic element extraction, but also provides a variety of functions such as requirement text classification, condition screening and bidirectional conversion check, to ensure the accurate verification of system functional requirement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer software development technology, and relates to a static alignment verification method for functional requirements of SysML state machine diagrams, specifically a static alignment verification method for functional requirements of SysML state machine diagrams based on large language models. Background Technology

[0002] In the field of systems engineering (SE), a paradigm shift has occurred from document-based systems development to model-based systems development. Model-based systems engineering (MBSE) introduces enhanced capabilities to systems engineering practice, defined by INCOSE as "the formal application of modeling to support system requirements, design, analysis, verification, and validation activities, starting from the conceptual design phase and throughout the development and subsequent lifecycle phases." In aerospace and astronomy, the accuracy of systems engineering models is paramount. This is due to the high design, development, and operational costs of these systems, their long-term use, and their safety-critical attributes. State machine diagrams are graphical representations used to describe the dynamic behavior of a system, achieved by illustrating states, transitions, and events. Verifying the correspondence between SysML state machine diagrams and requirements is crucial to ensuring that the system design accurately reflects its intended functionality and behavior. This goal-oriented activity focuses on aligning models with system requirements, confirming that they accurately describe the system's expected outcomes. Systems engineering practice and experience show that the cost of troubleshooting and fixing faults increases rapidly as development progresses, clearly demonstrating a strong incentive to bring verification and validation (V&V) activities forward rather than postpone them.

[0003] Therefore, the alignment and verification between functional requirements and SysML state machine diagrams become particularly important, especially in the development of complex systems such as radar systems. Several techniques are available for verifying designs. During manual review, engineers examine models and documentation. Static verification rules are used to check the structural consistency of the model, while simulation is used to evaluate the execution of behavior or test cases. The main result of simulation is one or more execution trajectories, which can be used to analyze different qualitative and quantitative properties. Simulation methods can also rely on formal verification techniques, which can be viewed as automated, highly optimized exploratory simulations driven by declaratively specified objectives. Traditionally, the goal of this approach is to demonstrate the satisfaction or violation of requirements through appropriate execution (i.e., evidence). However, this approach has several significant problems:

[0004] (1) Formal verification places high demands on the professional skills of testers. Testers not only need in-depth knowledge of systems engineering, but also must be proficient in the specific language and rules of formal verification tools. This learning curve is steep, and due to the abstractness and complexity of formal languages, misunderstandings or misuse can easily occur during model development and verification. At the same time, in practical applications, the rules and usage methods of different tools may vary, which increases the complexity and cost of the verification process.

[0005] (2) Formal verification tools often exhibit limitations when dealing with basic requirements. For example, formal tools struggle to effectively verify relatively simple functional requirements such as "the system should have a working state and a maintenance state." This is because formal tools are typically adept at verifying complex logic and algorithms, but their verification capabilities are limited for such high-level structural requirements. This makes formal tools less flexible in some situations, especially when dealing with functional requirements such as state existence and mode switching. Testers may need to rely on other methods or manual checks to complete the verification.

[0006] (3) Formal verification processes are typically lengthy, involving multiple steps such as model transformation, writing formal languages, and tool configuration. For complex systems with high demands, the method is inefficient, and the maintenance cost of formal models is relatively high when facing frequent changes in requirements. Especially in complex projects like radar systems, where there are many functional modules and frequent interactions, formal tools can verify some complex logic, but they cannot cover all levels of requirements, especially those operation modes and state transitions closely related to specific business scenarios. Therefore, most solutions only handle some modeling elements.

[0007] To address these issues, there is an urgent need to explore a more intuitive and efficient method to align and verify the correspondence between SysML state machine diagrams and functional requirements. Summary of the Invention

[0008] This invention provides a static alignment verification method for functional requirements based on SysML state machine diagrams using a large language model. The method aims to verify the consistency between requirement text and elements of the SysML state machine diagram, as well as their transformation relationships. This invention not only achieves alignment between requirements and state machine diagrams through text parsing and graphical element extraction, but also provides multiple functions such as requirement text classification, conditional filtering, and bidirectional transformation checks, ensuring accurate verification of system functional requirements.

[0009] The objective of this invention is achieved through the following technical solution:

[0010] A static alignment verification method for functional requirements based on SysML state machine diagrams of large language models includes the following steps:

[0011] Step S1: Standardize the representation of the requirement text and systematically classify all basic requirements based on the structural similarity of the requirement statements;

[0012] Step S2: Parse the processed requirement text based on the LTP large language model;

[0013] Step S3: Parse the SysML diagram and systematically analyze the elements and their transformation relationships in the SysML diagram;

[0014] Step S4: For different sentence structures and requirement types, verify the consistency between the SysML state machine diagram and its corresponding requirement text.

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

[0016] 1. This invention proposes a method for verifying sysml state machine diagrams by analyzing requirement items based on large language models, which solves the problems of high requirements for the professional skills of testers and limited verification capabilities of traditional formal methods.

[0017] 2. This invention designs a general framework for verifying basic functional requirements. This framework has high scalability and customizability, and the rules can be supplemented and extended according to requirements.

[0018] 3. This invention not only achieves alignment between requirements and state machine diagrams through text parsing and graphical element extraction, but also provides multiple functions such as requirement text classification, condition filtering, and bidirectional conversion checks to ensure accurate verification of system functional requirements.

[0019] 4. This invention not only provides a solution for current system design verification, but also injects new vitality into the development of the field of system design verification by exploring new technical paths.

[0020] 5. This invention not only proposes innovative verification methods and frameworks in theory, but also verifies their effectiveness and practicality through specific cases or experiments, achieving a close integration of theory and practice, and providing strong support for the practical application of system design verification. Attached Figure Description

[0021] Figure 1 This is a flowchart of a static alignment verification method for functional requirements based on SysML state machine diagrams of large language models;

[0022] Figure 2 This is a schematic diagram illustrating the LTP model for parsing requirement text.

[0023] Figure 3 This is a flowchart of a requirement text and sysml diagram verification example with "possessing" as the core word;

[0024] Figure 4 This is a schematic diagram illustrating a requirement text and sysml diagram verification example with "to carry out" as the core word and "to process" as the object type.

[0025] Figure 5 This is a schematic diagram of a requirement text and sysml diagram verification example with "convert" as the core word and "transformation" as the object type. Detailed Implementation

[0026] The technical solution of the present invention will be further described below with reference to the accompanying drawings, but it is not limited thereto. Any modifications or equivalent substitutions to the technical solution of the present invention that do not depart from the spirit and scope of the technical solution of the present invention should be covered within the protection scope of the present invention.

[0027] This invention provides a static alignment verification method for functional requirements of a SysML state machine diagram based on a large language model. First, the natural language requirements of the radar system are structurally analyzed. Then, these requirements are compared with the SysML state machine diagram. By applying natural language processing techniques (such as dependency parsing and named entity recognition), key elements in the requirements are extracted and associated with states, transitions, and events in the state machine diagram. This process not only ensures that the requirements are accurately implemented but also identifies potential inconsistencies or omissions between the requirements and the design model. This method can systematically verify whether the SysML state machine diagram of the radar system meets its functional requirements, providing strong support for the correctness of the system design. Figure 1 As shown, the method includes the following steps:

[0028] Step S1: Standardize the representation of the requirement text. Based on the structural similarity of the requirement statements, systematically classify all basic requirements. The specific steps are as follows:

[0029] Step S101: SBV should have (string or list) VOB (function / substate / mode), which describes the requirements for the functions, substates or operating modes that the system or subsystem should have, and is classified into requirement text with "have" as the core word;

[0030] Step S102: The SBV should be able to perform (string or list) VOB (processing / conversion). Requirements regarding the system's required processing capabilities or conversion functions are categorized into requirement texts with "perform" as the core word. Specific steps are as follows:

[0031] Step S10201: The SBV should be able to perform (string or list) VOB based on (string) and separately categorize requirement text that emphasizes the system performing certain operations based on certain conditions or inputs;

[0032] Step S10202: SBV should be able to perform (string or list) VOB in the case of (string), and separately classify the requirement text that emphasizes the behavior of the system under specific conditions or states;

[0033] Step S10203: In the case of (string), SBV should be able to perform (string or list) VOB based on (string), and separately classify the requirement text that requires the system to perform a certain operation based on other inputs under specific conditions.

[0034] This invention categorizes all requirement items into the aforementioned patterns to facilitate subsequent automated processing and analysis. This categorization not only enhances the readability of the requirements but also facilitates further processing of the logical relationships and corresponding state machine diagram elements within the requirements by the model. The next step is to design a series of templates to match these requirement structures with the nodes and transition operations in the state machine diagram, thereby achieving a precise mapping between requirements and the model.

[0035] Step S2: Parse the processed requirement text based on the LTP large language model.

[0036] For each processed requirement text, this step employs the Harbin Institute of Technology's (HIT) LTP (Language Technology Platform) model for in-depth sentence analysis to comprehensively analyze its main content. LTP is a complete Chinese language processing system developed by the HIT Social Computing and Information Retrieval Research Center. This platform establishes an XML-based standard for representing language processing results and provides a comprehensive and efficient set of bottom-up Chinese language processing modules, including core technologies such as lexical analysis, syntactic analysis, and semantic analysis. Furthermore, LTP provides application programming interfaces based on dynamic link libraries (DLLs), visualization tools, and supports use as a web service.

[0037] Step S201: Break the text down into individual words, thereby converting a continuous sequence of words into lexical units;

[0038] Step S202: Perform part-of-speech tagging and assign corresponding part-of-speech tags to each word;

[0039] Step S203: Determine the dependency relationships between words and reveal the structural and semantic relationships of words in the sentence.

[0040] Figure 2The analysis results show the word segmentation, part-of-speech tagging, and dependency parsing of the sentence "The working state of a radar system should have three sub-states: combat state, training state, and maintenance state." The sentence is divided into multiple words, including "radar system," "working state," "should," "have," "combat state," "training state," "and," "maintenance state," "three," and "sub-state." Part-of-speech tagging (pos) marks the part of speech of each word; for example, "radar system" and "working state" are tagged as nouns (n), "should" as a verb (v), and "and" as a conjunction (c), etc. Dependency parsing (dep) results show the grammatical relationships between each word; for example, there is an attributive-head relation (ATT) between "radar system" and "working state," with "working state" as the subject (SBV) associated with the verb "should."

[0041] Step S3: Parse the SysML diagram and systematically analyze the elements and their transformation relationships in the SysML diagram. The specific steps are as follows:

[0042] Step S301: Export the SysML diagram as an XML file;

[0043] Step S302: XML is an inherited hierarchical data format, and its most natural representation is a tree structure. Use Python's xml.etree.ElementTree module to parse and create XML data, extract and analyze the attributes and content of each element;

[0044] Step S303: Perform a systematic analysis of the elements and their transformation relationships in the SysML diagram. The specific steps are as follows:

[0045] Step S30301: Recursively search for matching child nodes in the XML node, check whether the node name contains the target name, and build a list of matching nodes by iterating through the child nodes;

[0046] Step S30302: Extract the transitions containing specific guard conditions from the XML model, and identify the relevant state transitions by checking whether the guard conditions of the transition elements contain the specified phrases;

[0047] Step S30303: Extract the IDs of all nodes and check whether there is a bidirectional transformation between them, and generate the corresponding result list.

[0048] By extracting the tags, attributes, and relationships of these XML elements, each component in the SysML diagram can be analyzed one by one. This process includes identifying the states, transition conditions, events, and their corresponding actions in the state machine, thus laying the foundation for verifying the consistency between system requirements and the model. This method ensures the accurate fulfillment of requirements while maintaining the integrity of the model.

[0049] These algorithms effectively utilize XML parsing technology to achieve systematic analysis of elements and their transformation relationships in SysML diagrams, providing important support for further verification and consistency checks.

[0050] Step S4: For different sentence structures and requirement types, verify the consistency between the SysML state machine diagram and its corresponding requirement text. The specific steps are as follows:

[0051] Step S401: Use the LTP toolkit to extract the core words of the target text;

[0052] Step S402: Rule 1: SBV should possess (string or list) VOB (function / substate / pattern). For requirement text with "possess" as the core word, check whether the text accurately describes the characteristics or capabilities of a node in the state machine diagram. The specific steps are as follows:

[0053] Step S40201: Extract the subject and substate from the input text, and locate the node related to the subject in the XML document;

[0054] Step S40202: For each substate, recursively traverse the subject node and all its child nodes, and check if there is a node whose name contains the name of the substate.

[0055] Step S40203: If a substate fails to find a matching item in a node, then record the substate;

[0056] Step S40204: Output the corresponding feedback based on the matching results of the sub-states: if all sub-states are found, output "Meets requirements"; otherwise, output a list of sub-states that were not found.

[0057] In the design and verification of complex systems, radar systems, as a typical example, are often used to verify the rationality and consistency of state machine diagrams due to their multiple operating states and complex state transition logic. Therefore, this invention selects a radar system as an example, aiming to demonstrate how to automatically verify the states and transition relationships of a state machine diagram in practical applications by applying the aforementioned algorithm. The goal of this example is to ensure that the transition paths between various operating states of the radar system, such as operational, training, and maintenance states, meet system requirements.

[0058] Figure 3The document demonstrates an example application of a radar system implemented using the algorithm designed according to Rule 1. For the requirement statement "The radar system's operating states should include combat, training, and maintenance states," the system first uses LTP parsing to extract the subject (operating state), core verbs, and objects (combat, training, and maintenance states) from the input text. Second, it uses ElementTree to parse the XML file, performing node matching on the parsed text information, aligning the subject node with the corresponding node in the XML file, and further analyzing whether its child nodes contain each extracted sub-state. Third, it compares the parsed XML nodes with the expected states. It finds the "operating state" node in the subject, searches its child nodes, and determines whether they contain "combat," "training," and "maintenance" states. If all expected states are found, the system returns "meets requirements"; if a state is not found, it records the unmatched state and returns a result indicating non-compliance.

[0059] Step S403: Rule 2: SBV should be able to perform (string or list) VOB (processing / conversion). For requirement text with "perform" as the core word, output a prompt message indicating the verification result; to demonstrate the experimental effect of Rule 2, this invention provides two specific examples.

[0060] Step S404: Verify that the object type of the requirement text is "processing", and check whether the state machine diagram contains the corresponding operation or transition logic. The specific steps are as follows:

[0061] Step S40401: Use LTP to perform word segmentation, part-of-speech tagging, and dependency analysis on the text;

[0062] Step S40402: Determine whether the request is a conditional sentence by directly searching whether the sentence contains the keyword "according to" and filtering out the keyword "condition" for the judgment condition.

[0063] Step S40403: Filter out all state transitions with condition as the guard condition parameter and save them as trans_list;

[0064] Step S40404: Output the verification result based on the found result;

[0065] Figure 4Similar to the previous example, this instance first generates a tree structure, then locates and parses the transformation relationships between each node. Specifically, it traverses each node in the tree, extracting the transformation conditions between it and other nodes. Next, these conditions are matched against the list of subjects in the requirement text to determine if a transformation path exists between nodes that meets the requirements. If the transformation path in the tree structure matches the requirement text, it means the node transformations in the SysML state machine diagram meet the expected requirements; if no matching path is found, it indicates that the diagram does not meet the requirements. Through this process, the compliance of the state machine diagram with the requirements is ultimately verified.

[0066] Step S405: Verify that the object type of the requirement text is "conversion", and check whether the state machine diagram contains the corresponding operation or conversion logic. The specific steps are as follows:

[0067] Step S40501: Find the subject word and locate the child node of the subject in the model node;

[0068] Step S40502: Check if there is a conditional statement in the text. If it exists, extract the conditional words that follow it and filter out all state transitions with condition as the guard condition parameter.

[0069] Step S40503: Based on the matching result, output whether the corresponding state transition can be performed according to the conditions;

[0070] Step S40504: If the text does not contain conditional statements, extract the node IDs associated with the object, check the conversion between nodes, and output the verification results.

[0071] Examples of conversion under specified conditions Figure 5 As shown, in the generated tree structure, the first step is to locate all nodes related to the "target state." These nodes typically appear as parameters of guard conditions in state transitions. Specifically, the algorithm examines these state transitions one by one, searching for transition paths with the "target state" as a condition. After finding the relevant state transitions, the algorithm further analyzes whether these paths allow the "combat state" to perform operations such as search, interception, tracking, and transition. For each operation, the algorithm progressively verifies whether the operation conforms to the logic and conditions defined in the requirements text. For example, if it is detected in the state transition path that the "combat state" can enter the "search" state, and the guard condition meets the requirements of the "target state," then the path is considered a path that meets the requirements. This process verifies all relevant operations (search, interception, tracking, transition) sequentially. Finally, based on the results of these verifications, the system comprehensively outputs a verification result indicating whether the requirements are met, thereby ensuring that the design of the state machine diagram is consistent with the actual requirements.

[0072] This invention assists developers in statically aligning functional requirements using SysML state machine diagrams, leveraging a large model to parse the requirement text. Through systematic analysis of elements and their transformation relationships in the SysML state machine diagram's XML file, and a refined verification process centered on the LTP toolkit to deeply analyze the semantic structure of the text, it achieves consistency verification between the state machine diagram and its corresponding requirement text. This reduces manual intervention and avoids the high skill requirements of traditional formal methods for testers. To ensure the method's universality and enhance its verification capabilities, this invention designs a general framework for verifying basic functional requirements, possessing high scalability and customizability. Addressing the diversity of different sentence structures and requirement types, this invention specifically designs a verification algorithm, aiming to ensure that each requirement point finds an accurate mapping in the state machine diagram through automation. The algorithm internally includes detailed verification logic for specific operation types, ensuring that the operations described in the text are accurately represented in the state machine diagram.

Claims

1. A method for static alignment verification of SysML state machine diagram functional requirements based on large language models, characterized in that The method comprises the following steps: Step S1: uniform representation of the demand text, based on the similarity of the structure of the demand sentence, all basic demands are classified systematically; Step S2: based on the LTP large language model, the demand text which has been processed is parsed; Step S3: parse the SysML diagram, analyze the elements and their conversion relationship in the SysML diagram, the specific steps are as follows: Step S301: export the SysML diagram into an XML file; Step S302: parse and create XML data using Python's xml.etree.ElementTree module, extract and analyze the attributes and contents of each element; Step S303: analyze the elements and their conversion relationship in the SysML diagram, the specific steps are as follows: Step S30301: recursively find matching child nodes in the XML node, check if the node name contains the target name, and build a list of matching nodes by iterating the child nodes; Step S30302: extract the conversion containing specific guard conditions from the XML model, identify the relevant state conversion by checking if the guard condition of the conversion element contains the specified phrase; Step S30303: extract the ID of all nodes and check if there is a bidirectional conversion between them, generate the corresponding result list; Step S4: verify the consistency of the SysML state machine diagram and its corresponding demand text for different sentence patterns and demand types, the specific steps are as follows: Step S401: use LTP toolkit to extract the core words of the demand text; Step S402: for the demand text with "have" as the core word, check if the text accurately describes the characteristics or capabilities of a node in the state machine diagram; Step S403: for the demand text with "do" as the core word, output prompt information for verification results; Step S404: for the demand text with "handle" as the object type, check if the state machine diagram contains the corresponding operation or conversion logic; Step S405: for the demand text with "conversion" as the object type, check if the state machine diagram contains the corresponding operation or conversion logic.

2. The method of claim 1, wherein the method further comprises: determining a SysML state machine diagram based on the functional requirements; and generating a SysML state machine diagram based on the functional requirements. The specific steps of step S1 are as follows: Step S101: for the demand that describes the functions, sub-states or operation modes that the system or subsystem should have, classify it as demand text with "have" as the core word; Step S102: for the demand related to the processing capacity or conversion function that the system should have, classify it as demand text with "do" as the core word.

3. The static alignment verification method of functional requirements of SysML state machine diagram based on large language model according to claim 1, characterized in that The specific steps of step S2 are as follows: Step S201: split the text into individual words, thereby converting continuous text sequences into lexical units; Step S202: perform part-of-speech tagging, assign appropriate part-of-speech tags to each word; Step S203: determine the dependency relationship between words, reveal the structure and semantic relationship of words in the sentence.

4. The method of claim 1, wherein the method further comprises: determining a SysML state machine diagram based on the functional requirements; and generating a SysML state machine diagram based on the functional requirements. The specific steps of step S402 are as follows: Step S40201: extract the subject and sub-state from the input text, and locate the nodes related to the subject in the XML document; Step S40202: For each sub-state, recursively traverse the subject node and all its child nodes to check if there is a node whose name contains the sub-state; Step S40203: If a sub-state fails to find a match in the nodes, record the sub-state; Step S40204: Output the corresponding feedback according to the matching results of the sub-states: if all sub-states are found, output "meets the requirements"; Otherwise, output the list of sub-states that are not found.

5. The method of claim 1, wherein the method further comprises: determining a set of SysML state machine diagram elements in the SysML state machine diagram; determining a set of corresponding elements in the large language model; and determining a set of corresponding elements in the SysML state machine diagram. The specific steps of step S404 are as follows: Step S40401: Use LTP to perform word segmentation, part-of-speech tagging, and dependency relationship analysis on the text; Step S40402: Determine whether the requirement is a conditional sentence, directly search for whether the keyword "according to" is contained in the sentence, and filter out the keyword condition that determines the condition; Step S40403: Filter out all state transitions that use condition as the guard condition parameter and store them as trans_list; Step S40404: Output the verification result according to the found results.

6. The method of claim 1, wherein the method further comprises: determining a set of SysML state machine diagram elements in the SysML state machine diagram; determining a set of corresponding elements in the large language model; and determining a set of corresponding elements in the SysML state machine diagram. The specific steps of step S405 are as follows: Step S40501: Find the subject word and locate the child nodes of the subject in the model node; Step S40502: Check if there is a conditional sentence in the text, if there is, extract the condition word after it and filter out all state transitions that use condition as the guard condition parameter; Step S40503: Output whether the corresponding state transition can be performed according to the condition according to the matching results; Step S40504: If the text does not contain a conditional sentence, extract the node ID related to the object, check the conversion between nodes, and output the verification result.

Citation Information

Patent Citations

  • Templated document automatic generation method based on SysML meta-model

    CN115358200A

  • Method and system for converting SysML model into structure model

    CN115906491A