Sequence diagram simulation execution visualization method and system based on UML (Unified Modeling Language) specification driving
By using a sequence diagram simulation method based on UML specifications, SysML data is extracted and converted into a standard UML Interaction semantic structure. Semantic verification and compilation are performed, and an event-driven simulation engine is used to execute and generate animation events. This solves the problem of SysML sequence diagrams lacking executable capabilities, and achieves efficient and intuitive simulation and visualization, thereby improving the verification efficiency of complex system designs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-11
- Publication Date
- 2026-04-07
AI Technical Summary
In existing technologies, SysML sequence diagrams lack direct executable capability, simulation tools lack adherence to UML standard semantics, making it difficult to accurately compile complex control flows, resulting in distorted and inefficient simulation logic, a lack of intuitive visual feedback, and difficulty in supporting rapid verification of large-scale interactive scenarios.
By using a sequence diagram simulation method driven by UML specifications, SysML data is extracted and converted into the UML standard Interaction semantic structure. Semantic verification and compilation are performed, and an event-driven simulation engine is used to execute and generate animation events to drive the synchronous visualization display of the user interface.
It achieves high compliance with UML standards and efficient simulation, improves the universality of simulation and the efficiency of logic verification, ensures the consistency between simulation and modeling intent, and provides intuitive dynamic visualization feedback.
Smart Images

Figure CN121807436A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of UML / SysML modeling and simulation verification technology, specifically to a UML specification-driven sequence diagram simulation execution visualization method and system. Background Technology
[0002] In the design and development of modern complex systems (such as intelligent vehicles, aerospace electronic systems, and the Industrial Internet of Things), early verification of system architecture and behavioral logic is crucial. SysML, as a standardized modeling language for systems engineering, uses sequence diagrams as a core dynamic view to describe the chronological message interactions between system components, used to analyze system behavior and verify interface protocols and interaction logic. However, current widely used modeling practices have significant limitations: sequence diagrams are typically only static, graphical design documents, lacking direct executable capabilities. Although some tools and research have attempted to add simulation capabilities to sequence diagrams, the following problems are common: First, existing simulation solutions often rely on specific modeling tools or proprietary execution engines, lacking strict adherence to UML / SysML standard semantics. This can lead to discrepancies between simulation behavior and the model's design intent, resulting in poor model versatility and portability. Second, when dealing with sequence diagrams containing complex combinations of conditional branches (alt), loops (loop), and parallelism (par), existing methods often struggle to accurately compile and execute their complex control flow semantics, easily distorting the simulation logic. Third, many methods employ interpreted execution or simple event replay, resulting in high runtime computational overhead and low execution efficiency, making it difficult to support rapid verification in large-scale interactive scenarios. Finally, the simulation process lacks intuitive, real-time, and tightly coupled visualization feedback with model elements, preventing designers from effectively observing dynamic processes such as message flow and lifeline state transitions, making interactive debugging difficult. Therefore, there is an urgent need for a sequence diagram simulation method that strictly adheres to UML standard semantics, compiles and executes efficiently, and supports intuitive animation demonstrations. This method aims to bridge the gap between static modeling and dynamic logic verification, enabling high-confidence verification of the correctness and completeness of interactions in the early stages of system design. This invention aims to solve the above problems. Summary of the Invention
[0003] To address the shortcomings of existing technologies, the present invention aims to provide a UML-based sequence diagram simulation execution visualization method and system. Through rigorous semantic transformation and a compiled execution architecture, it ensures high compliance of the simulation with the UML standard and high execution efficiency.
[0004] To achieve the above objectives, the embodiments of this invention provide the following technical solutions:
[0005] This application provides a UML-based sequence diagram simulation execution visualization method, comprising the following steps: S1, extracting lifelines, messages, and composite fragment data from the SysML sequence diagram model, and converting the lifelines, messages, and composite fragment data into an Interaction semantic structure conforming to the UML standard; S2, validating the Interaction semantic structure, and compiling the validated Interaction semantic structure into an executable simulation step network with dependencies; S3, executing the simulation step network through an event-driven simulation engine, and generating animation events based on the execution process to drive the user interface for synchronous visualization.
[0006] Further, step S1 includes: S11, extracting the simulation data required for the sequence diagram from the SysML project, wherein the simulation data includes lifeline and corresponding object data, message type and interaction data, and structure and guard condition data of combined fragments; S12, mapping the extracted simulation data to Interaction instances, Lifeline instances, Message instances and CombinedFragment instances, and constructing semantic associations between the Interaction instances, Lifeline instances, Message instances and CombinedFragment instances.
[0007] Furthermore, in step S2, the semantic verification includes structural integrity verification and semantic consistency verification, and the compilation includes an executable simulation step that decomposes the Interaction semantic structure into linear or branched components.
[0008] Furthermore, when the Interaction semantic structure contains composite fragments, it is decomposed according to the semantics of the corresponding interaction operators in the UML specification. The composite fragments include at least one of conditional fragments, loop fragments, and parallel fragments.
[0009] Furthermore, in step S3, the event-driven simulation engine includes a central scheduler, a lifeline state manager, and an event bus. The central scheduler is used to manage the execution order of simulation steps, the lifeline state manager is used to track the activation status of each lifeline, and the event bus is used to transmit messages and events within the engine and between the engine and the user interface.
[0010] Furthermore, the animation events include lifeline activation events and message sending / receiving events; the user interface responds to the animation events by updating the graphical elements by highlighting the lifeline, displaying message transmission with dynamic arrows, and highlighting the currently executing branch.
[0011] Accordingly, this application also provides a UML-based sequence diagram simulation execution visualization system, comprising: a semantic conversion module configured to extract lifelines, messages, and composite fragment data from a SysML sequence diagram model, and convert the lifelines, messages, and composite fragment data into an Interaction semantic structure conforming to the UML standard; a simulation compilation module configured to verify the Interaction semantic structure and compile the verified Interaction semantic structure into an executable simulation step network with dependencies; and a simulation execution and display module configured to execute the simulation step network through an event-driven simulation engine, and generate animation events based on the execution process to drive the user interface for synchronous visualization.
[0012] Furthermore, the simulation compilation module includes a control flow compilation unit for performing control flow linearization processing on the combined fragments in accordance with UML semantics.
[0013] Furthermore, the simulation execution and animation module includes a decoupled communication event bus for connecting the internal simulation engine core with the external user interface display components.
[0014] The beneficial effects of this invention are as follows: By standardizing semantic verification and step compilation, the error rate of simulation logic is reduced, ensuring the consistency between simulation and modeling intent; a unified mapping between SysML sequence diagrams and UML standard semantics is achieved, breaking down the barriers between different modeling tools and improving the universality of simulation; and the simulation execution and visualization are synchronized in real time, allowing modelers to intuitively track each step of the interaction process, greatly improving the efficiency of logic verification. Attached Figure Description
[0015] Figure 1 This is a flowchart illustrating a UML specification-driven sequence diagram simulation execution visualization method provided in an embodiment of this application.
[0016] Figure 2 This is a schematic diagram of the structure of a UML specification-driven sequence diagram simulation execution visualization system provided in an embodiment of this application. Detailed Implementation
[0017] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit the scope of the present invention.
[0018] In this invention, the terms "system" and "network" are used interchangeably. "Multiple" refers to two or more; therefore, in this invention, "multiple" can also be understood as "at least two." "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. Additionally, the character " / ", unless otherwise specified, generally indicates that the preceding and following related objects have an "or" relationship. Furthermore, it should be understood that in the description of this invention, terms such as "first" and "second" are used only for descriptive purposes and should not be construed as indicating or implying relative importance or order.
[0019] Example 1:
[0020] In existing technologies, SysML sequence diagrams are mostly used only as static graphics tools. They lack a unified mapping mechanism with UML standard semantics, which makes it impossible to simulate sequence diagrams generated by different modeling tools in a universal manner. At the same time, traditional simulation tools often skip the specification semantic verification and directly generate simulation steps, which is prone to logical deviations. Furthermore, the simulation process is separated from the visualization display, and modelers cannot verify the correctness of the interaction logic in real time.
[0021] like Figure 1 As shown, this application provides a UML-driven sequence diagram simulation execution visualization method, including the following steps: S1, extracting lifelines, messages, and composite fragment data from the SysML sequence diagram model, and converting the lifelines, messages, and composite fragment data into an Interaction semantic structure conforming to the UML standard; S2, validating the Interaction semantic structure, and compiling the validated Interaction semantic structure into an executable simulation step network with dependencies; S3, executing the simulation step network through an event-driven simulation engine, and generating animation events based on the execution process to drive the user interface for synchronous visualization.
[0022] In another possible implementation, the core interaction data of lifelines, messages, and composite fragments are first accurately extracted from the SysML sequence diagram model. Redundant attributes used only for interface layout are filtered out, and this data is strictly converted into a structured interaction semantic structure according to the UML standard to ensure the semantic compliance of all interaction elements. Next, the constructed interaction semantic structure is fully validated. First, the structural integrity is verified to confirm that all lifelines are associated with valid objects, messages have clear senders and receivers, and composite fragments contain valid child elements. Then, the semantic consistency is verified to ensure that the message order conforms to the modeling logic and the guard condition syntax is valid. After the validation is passed, it is compiled into an executable simulation step network containing a clear execution order and dependencies. Finally, the event-driven simulation engine is started to load the step network. During the execution process, the engine generates various animation events in real time and synchronously transmits them to the user interface to drive the interface to dynamically display the entire interaction process, realizing real-time linkage between simulation execution and visualization.
[0023] By constructing a unified mapping system between SysML sequence diagrams and UML standard semantics, redundant attributes are filtered out, retaining only core interaction data. This breaks down the compatibility barriers between different modeling tools, significantly improving the versatility of simulation and the reusability of modeling results. Through standardized semantic verification and compilation processes, problems such as incomplete structures and logical inconsistencies are avoided in advance, ensuring a high degree of consistency between the simulation step network and the modeling intent, greatly improving simulation fidelity. Real-time synchronization of simulation execution and visualization is achieved, transforming abstract interaction logic into intuitive dynamic animations, allowing modelers to clearly track each step of the interaction process, significantly reducing the difficulty of logic verification and improving verification efficiency. A generalized event-driven simulation engine is adopted, which does not depend on a specific modeling platform, reducing the cost of modeling and verification, and adapting to various complex system interaction verification scenarios.
[0024] When extracting data from SysML sequence diagrams, a lot of redundant information such as interface layout is often included, which increases the complexity of subsequent processing. At the same time, the mapping between data and UML instances lacks strong semantic association. For example, messages are not explicitly bound to send and receive lifelines, which leads to the problem of confused element associations in subsequent simulation logic.
[0025] In the embodiments of this application, step S1 includes: S11, extracting the simulation data required for the sequence diagram from the SysML project, wherein the simulation data includes lifeline and corresponding object data, message type and interaction data, and structure and guard condition data of combined fragments; S12, mapping the extracted simulation data to Interaction instances, Lifeline instances, Message instances and CombinedFragment instances, and constructing semantic associations between the Interaction instances, Lifeline instances, Message instances and CombinedFragment instances.
[0026] In another possible implementation, the core data required for simulation is extracted from the sequence diagram module of the SysML project, including the object identifier and type information corresponding to each lifeline, the message type (synchronous / asynchronous), sender and receiver and interaction content, the hierarchical structure of combined fragments, interaction operators and corresponding guard conditions. Then, the extracted core data is mapped to Interaction instances, Lifeline instances, Message instances and CombinedFragment instances defined by the UML standard, where the entire interaction scenario corresponds to one Interaction instance, the interaction carrier of each object corresponds to one Lifeline instance, each interaction instruction corresponds to one Message instance, and each complex control logic corresponds to one CombinedFragment instance. Finally, strong semantic associations are constructed between the instances, binding the Message instance with the corresponding sender and receiver Lifeline instance, and associating the CombinedFragment instance with the contained sub-interaction elements (messages, sub-fragments), forming a complete UML standard semantic structure.
[0027] By clearly defining the scope of core data extraction required for simulation, and selectively filtering lifelines and objects, message interactions, combined fragments, and guard condition data, redundant information was completely eliminated, significantly reducing data processing complexity and improving processing efficiency. Data mapping was performed based on UML standard instances to ensure that each core data corresponds to a clear UML semantic entity. Furthermore, by constructing strong semantic associations, the roles and interaction relationships of each instance were made clear and explicit, providing a precise and reliable semantic foundation for subsequent simulation compilation and execution. The standardized semantic mapping and association methods further enhanced the model's cross-platform adaptability and provided data support for subsequent generalized simulations.
[0028] Existing technologies lack a systematic verification mechanism for processing the semantic structure of Interaction. They fail to verify structural integrity, which can lead to problems such as lifelines not having corresponding objects or messages not having clear senders and receivers. They also fail to verify semantic consistency, which can result in contradictory message order and syntax errors in guard conditions. Furthermore, the compilation process uses a single linear decomposition method, which cannot adapt to complex combinations of fragments containing branching logic. This results in the simulation step network being unable to accurately reproduce the original modeling logic and can only handle simple sequential interaction scenarios.
[0029] In the embodiments of this application, in step S2, the semantic verification includes structural integrity verification and semantic consistency verification, and the compilation includes an executable simulation step of decomposing the Interaction semantic structure into linear or branched components.
[0030] In another possible implementation, the semantic structure of the interaction is first checked for structural integrity, confirming that each lifeline is associated with a valid object, each message has a clear sender and receiver, and each combined fragment contains valid sub-interaction elements, with no missing or invalid associations. Then, semantic consistency is checked to verify that the message delivery order conforms to the modeling intent, the guard condition syntax is compliant, and matches the interaction scenario, with no logical contradictions or syntax errors. After passing the checks, the semantic structure is compiled and decomposed according to its complexity. For simple interaction sequences without combined fragments, they are directly decomposed into a linear step queue arranged in the original message order. For complex semantic structures containing combined fragments, they are decomposed into a branch step network with clear triggering conditions and execution dependencies, ensuring that the logic of each branch is consistent with the original combined fragment. Figure 1 To.
[0031] By employing a dual verification mechanism of structural integrity and semantic consistency, it comprehensively covers issues at the data structure and interaction logic levels, eliminating potential risks such as element failures and logical conflicts that may occur during simulation, thus providing dual assurance for simulation accuracy. It supports both linear and branching compilation and decomposition methods, which are suitable for simple sequential interaction scenarios as well as accurately reproducing complex branching logic containing combined fragments, greatly improving the adaptability of the technical solution to sequence graphs of different complexities.
[0032] If the decomposition of combined segments does not strictly follow the UML specification, for example, conditional segments (alt) may execute multiple branches simultaneously, and loop segments (loop) may fail to correctly identify termination conditions, resulting in a large deviation between the simulation logic of complex interactive scenarios and the modeling intent.
[0033] In the embodiments of this application, when the Interaction semantic structure contains a composite fragment, it is decomposed according to the semantics of the corresponding interaction operator in the UML specification. The composite fragment includes at least one of conditional fragments, loop fragments, and parallel fragments.
[0034] In another possible embodiment, when the Interaction semantic structure contains composite fragments, it is specifically decomposed according to the semantics of the corresponding interaction operators in the UML specification: For conditional fragments (alt), the guard conditions of each branch are first parsed, sorted by priority, and the branches with true conditions are decomposed into executable steps to ensure that only one branch that meets the condition is executed at the same time; For loop fragments (loop), it is decomposed into a closed-loop step structure of loop condition verification, loop body execution, and termination judgment. First, it is checked whether the loop condition is met. If it is met, the steps inside the loop body are executed. After execution, it returns to condition verification again until the condition is not met, then it exits the loop and enters the subsequent steps; For parallel fragments (par), it is decomposed into multiple independent parallel sub-step networks. The execution progress of each sub-network is managed by the synchronization control step. After all sub-networks have been executed, they are merged into a unified process and enter the subsequent main step execution.
[0035] By strictly adhering to the interactive semantics of UML specifications for different types of combined fragments, the correct selection of conditional branches, accurate termination of loops, and synchronous execution of parallel steps are ensured, significantly improving the fidelity of simulations in complex interactive scenarios.
[0036] Existing simulation engines are mostly single-component designs, which are unable to efficiently manage the execution order of complex steps or accurately track lifeline state changes. At the same time, the direct coupling and communication between the engine and the user interface can easily lead to problems such as simulation execution lag and asynchronous interface display. The standardized method of decomposing combined fragments allows combined fragments generated by different modeling tools to be processed uniformly, further enhancing the versatility of simulation.
[0037] In the embodiments of this application, in step S3, the event-driven simulation engine includes a central scheduler, a lifeline state manager, and an event bus. The central scheduler is used to manage the execution order of simulation steps, the lifeline state manager is used to track the activation status of each lifeline, and the event bus is used to transmit messages and events within the engine and between the engine and the user interface.
[0038] In another possible embodiment, after the event-driven simulation engine starts, the central scheduler first loads the compiled executable simulation step network, parses the dependencies between steps, constructs an execution queue, schedules linear steps sequentially, and schedules parallel steps synchronously through a multi-threading mechanism to ensure that the execution timing of each step meets the logical requirements. During the execution of the steps, the lifeline state manager tracks the activation status of each lifeline in real time, records the activation start time, activation duration, and interactive behaviors during activation, and updates the "inactive / activating / completed" status flags in a timely manner to ensure accurate synchronization of status information. The event bus acts as a communication hub, transmitting status notifications and control commands of each component within the engine, and simultaneously transmitting animation events generated during the execution of steps to the user interface in real time, achieving efficient decoupling communication between the engine and the interface, and ensuring the synchronization of simulation execution and visualization display.
[0039] With clearly defined modular engine components, a central scheduler ensures the orderly execution of steps, a lifeline state manager enables precise state tracking, and an event bus facilitates decoupled communication between internal engine components and between the engine and the interface, avoiding mutual interference between components. This allows engine execution and interface rendering to proceed independently, ensuring the smoothness of the simulation and the synchronization of the display. Precise lifeline state tracking provides support for interactive logic tracing, making it easier for modelers to locate logical problems in the simulation process.
[0040] Existing simulation visualizations simply display the execution order of steps, lacking dynamic identification of core interactive elements. Modelers cannot quickly distinguish the currently active lifeline, the message transmission process, and the branches of the combined fragments being executed, resulting in low efficiency of logic verification.
[0041] In embodiments of this application, the animation events include lifeline activation events and message sending / receiving events; the user interface responds to the animation events by updating graphical elements by highlighting the lifeline, displaying message transmission with dynamic arrows, and highlighting the current execution branch.
[0042] In another possible embodiment, during the execution of the step network, when the lifeline state changes, the simulation engine immediately generates a lifeline activation event, clearly identifying the currently active lifeline and its activation status. When a message is sent or received, a message sending / receiving event is generated, recording the message type, sender, receiver, and transmission sequence. The user interface listens for and receives these animation events in real time. Upon receiving a lifeline activation event, the currently active lifeline is highlighted with a high-key color to visually represent its working status. Upon receiving a message sending / receiving event, a dynamically moving arrow displays the message transmission process from sender to receiver, with the arrow's movement speed matching the simulation sequence. When a combined fragment branch execution event is received, the currently executing branch area is highlighted with a bold border or a special color, allowing modelers to clearly understand the branch execution status and achieving intuitive visualization of the entire simulation process.
[0043] By defining targeted animation event types, the system accurately covers core interaction scenarios such as lifeline activation and message sending and receiving, providing a clear event-driven basis for visualization. The interface uses intuitive response methods such as highlighting and dynamic arrows to transform abstract interaction logic into concrete visual effects, allowing modelers to quickly identify the currently active lifeline, message passing path, and execution branch, significantly improving the efficiency and accuracy of logic verification.
[0044] Example 2:
[0045] like Figure 2 As shown, this application also provides a UML-based sequence diagram simulation execution visualization system, comprising: a semantic conversion module configured to extract lifelines, messages, and composite fragment data from a SysML sequence diagram model, and convert the lifelines, messages, and composite fragment data into an Interaction semantic structure conforming to the UML standard; a simulation compilation module configured to verify the Interaction semantic structure and compile the verified Interaction semantic structure into an executable simulation step network with dependencies; and a simulation execution and display module configured to execute the simulation step network through an event-driven simulation engine, and generate animation events based on the execution process to drive the user interface for synchronous visualization.
[0046] In another possible embodiment, after the system starts, the semantic conversion module first receives SysML sequence diagram model data, extracts core interaction data according to the pre-defined process, filters redundant attributes, maps it to an Interaction semantic structure conforming to the UML standard, and builds strong semantic relationships between instances. After completion, the semantic structure is passed to the simulation compilation module through a standardized interface. After receiving the semantic structure, the simulation compilation module performs structural integrity and semantic consistency verification according to the pre-defined rules. After the verification passes, the semantic structure is compiled and decomposed to generate an executable simulation step network containing execution dependencies. The step network is then passed to the simulation execution and display module. After receiving the step network, the simulation execution and display module starts the event-driven simulation engine to load and execute it. According to the pre-defined rules, it generates animation events in real time to drive the user interface to synchronously display the dynamic interaction process, completing the entire simulation and visualization process.
[0047] If the simulation compilation module lacks a dedicated control flow processing unit, the control flow decomposition of combined segments is not standardized enough, resulting in the inability to accurately linearize the control logic of complex interactions into executable steps, thus affecting the correctness of the simulation.
[0048] In embodiments of this application, the simulation compilation module includes a control flow compilation unit for performing control flow linearization processing on the combined fragments in accordance with UML semantics.
[0049] In another possible embodiment, after receiving the Interaction semantic structure, the simulation compilation module first performs structural integrity and semantic consistency verification by the general verification unit, and then passes the semantic structure containing the combined fragments to the control flow compilation unit. The control flow compilation unit first parses the type of the combined fragments and the corresponding UML interaction operators, and identifies core control flow types such as conditional fragments (alt), loop fragments (loop), and parallel fragments (par). Then, for different types of combined fragments, according to the interaction semantics in the UML specification, it performs control flow linearization processing, transforming the multi-branch logic of the conditional fragments into an ordered sequence of steps of "condition judgment → branch execution", transforming the loop fragments into a closed-loop sequence of steps of "condition verification → loop body execution → termination judgment", and transforming the parallel fragments into a sequence of steps of "sub-step start → synchronization control → main flow merging", ensuring that the linearized steps completely restore the control logic of the original combined fragments.
[0050] By using a dedicated control flow compilation unit, the control flow of the combined segments is linearized in accordance with UML semantics, ensuring that the simulation steps of complex control logic are completely consistent with the control intent of the original sequence diagram.
[0051] If the simulation engine and the user interface use a direct call coupled communication method, the engine execution process is easily affected by the interface rendering, causing the simulation to lag, and the interface cannot display the simulation status in real time.
[0052] In embodiments of this application, the simulation execution and animation module includes a decoupled communication event bus for connecting the internal simulation engine core with the external user interface display components.
[0053] In another possible embodiment, during the initialization of the simulation execution and display module, the event bus completes the connection configuration with the simulation engine core and the user interface display components, establishing an independent communication channel. When the simulation engine core executes the step network, it generates animation events such as lifeline activation and message sending / receiving in real time and sends these events to the event bus. The event bus adopts an asynchronous communication mechanism, immediately performing format standardization processing upon receiving the animation events to ensure that the interface components can accurately parse them. Subsequently, the event bus transmits the standardized animation events to the user interface display components. After receiving the events, the interface components update the graphic elements according to preset visualization rules, achieving real-time synchronization between the simulation execution process and the visualization display. Throughout the entire communication process, the simulation engine core and the interface components do not interact directly; data transmission is entirely achieved through the event bus, ensuring that both operate independently and efficiently.
[0054] By decoupling the communication event bus, the simulation engine core and the user interface display components can operate independently, which not only improves the efficiency of simulation execution, but also ensures real-time synchronization between visualization and simulation process.
[0055] The optional embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the embodiments of the present invention are not limited to the specific details in the above embodiments. Within the scope of the technical concept of the embodiments of the present invention, various simple modifications can be made to the technical solutions of the embodiments of the present invention, and these simple modifications all fall within the protection scope of the embodiments of the present invention.
[0056] It should also be noted that the various specific technical features described in the above embodiments can be combined in any suitable manner without contradiction. To avoid unnecessary repetition, the embodiments of the present invention will not describe the various possible combinations separately.
[0057] Furthermore, various different implementations of the present invention can be combined arbitrarily, as long as they do not violate the spirit of the present invention, they should also be regarded as the content disclosed in the present invention.
Claims
1. A UML specification-driven sequence diagram simulation execution visualization method, characterized in that, Includes the following steps: S1. Extract lifeline, message, and composite fragment data from the SysML sequence diagram model, and convert the lifeline, message, and composite fragment data into an Interaction semantic structure that conforms to the UML standard. S2. Verify the Interaction semantic structure and compile the verified Interaction semantic structure into an executable simulation step network with dependencies; S3. The simulation steps network is executed through an event-driven simulation engine, and animation events are generated based on the execution process to drive the user interface for synchronous visualization.
2. The UML specification-driven sequence diagram simulation execution visualization method according to claim 1, characterized in that, Step S1 includes: S11. Extract the simulation data required for the sequence diagram from the SysML project. The simulation data includes lifeline and corresponding object data, message type and interaction data, and structure and guard condition data of combined fragments. S12. Map the extracted simulation data to Interaction instances, Lifeline instances, Message instances, and CombinedFragment instances, and construct semantic relationships between the Interaction instances, Lifeline instances, Message instances, and CombinedFragment instances.
3. The UML specification-driven sequence diagram simulation execution visualization method according to claim 2, characterized in that, In step S2, the semantic verification includes structural integrity verification and semantic consistency verification, and the compilation includes an executable simulation step that decomposes the Interaction semantic structure into linear or branched components.
4. The UML specification-driven sequence diagram simulation execution visualization method according to claim 3, characterized in that, When the Interaction semantic structure contains composite fragments, it is decomposed according to the semantics of the corresponding interaction operator in the UML specification. The composite fragments include at least one of conditional fragments, loop fragments, and parallel fragments.
5. The UML specification-driven sequence diagram simulation execution visualization method according to claim 1, characterized in that, In step S3, the event-driven simulation engine includes a central scheduler, a lifeline state manager, and an event bus. The central scheduler is used to manage the execution order of simulation steps, the lifeline state manager is used to track the activation status of each lifeline, and the event bus is used to transmit messages and events within the engine and between the engine and the user interface.
6. The UML specification-driven sequence diagram simulation execution visualization method according to claim 5, characterized in that, The animation events include lifeline activation events and message sending / receiving events; The user interface responds to the animation event by updating graphical elements by highlighting the lifeline, displaying message passing with dynamic arrows, and highlighting the currently executing branch.
7. A sequence diagram simulation execution visualization system driven by UML specifications, characterized in that, include: The semantic transformation module is configured to extract lifeline, message, and composite fragment data from the SysML sequence diagram model and convert the lifeline, message, and composite fragment data into an Interaction semantic structure that conforms to the UML standard. The simulation compilation module is configured to verify the Interaction semantic structure and compile the verified Interaction semantic structure into an executable simulation step network with dependencies. The simulation execution and display module is configured to execute the simulation step network through an event-driven simulation engine, and generate animation events based on the execution process to drive the user interface for synchronous visualization.
8. The UML specification-driven sequence diagram simulation execution visualization system according to claim 7, characterized in that, The simulation compilation module includes a control flow compilation unit, which is used to perform control flow linearization processing on the combined fragments in accordance with UML semantics.
9. The UML specification-driven sequence diagram simulation execution visualization system according to claim 7, characterized in that, The simulation execution and animation module includes a decoupled communication event bus for connecting the internal simulation engine core with the external user interface display components.
Citation Information
Patent Citations
Active graph simulation execution visualization method and system based on fUML specification driving
CN121582425A