Model definition method for reasonably arranging drawing elements based on system modeling tool
By defining basic graphic data, graphic metamodels and graphic data architecture in the SysML modeling tool, the automatic layout of the graph is realized, solving the challenge of rational definition of model layout data in the SysML modeling tool, and improving the modeling efficiency and the quality of automatic layout.
Patent Information
- Application Number
- CN202411950141.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-04-15
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the SysML modeling tool, how to define reasonable, compliant with SysML specifications and efficient model layout data to achieve automatic layout of the graph and reduce the time for system engineers to manually adjust model elements.
A model definition method based on system modeling tools is proposed to rationally arrange drawing elements, including creating basic graphic data, graphic element model definition and graphic data architecture application, and designing and implementing the basic data definition of automatic optimization layout algorithm for graph modeling elements.
The automatic layout function of graphs in SysML modeling tool is realized, which improves modeling efficiency, simplifies the workflow of system engineers, and provides a good layout for modelers to read and understand graphs.
Smart Images

Figure CN119829043A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of research and development of system modeling tools based on SysML, and in particular to a model definition method based on reasonable arrangement of drawing elements of system modeling tools. Background Art
[0002] In the field of MBSE (Model-Based Systems Engineering), modeling tools for complex systems play an important supporting role in digital infrastructure, complex high-end system development, etc. However, with the increasing uncertainty in the international environment, the uncertainty issues of this type of industrial software have gradually become prominent, such as data security, core algorithms, and basic data definitions. In this context, enterprises or organizations urgently need to ensure the independent research and development of complex system modeling software, especially to accelerate the research and development of core technologies for this type of modeling software, and reduce dependence on external suppliers and technologies to cope with international competition and market changes.
[0003] UML (Unified Modeling Language) is a universal visual modeling language for MBSE and a standard released by OMG (Object Management Group). It is a graphical modeling language that can be used to describe and visualize software and to construct and generate documentation for software system artifacts. UML is applicable to various software development methods and can be used in all stages of the software life cycle.
[0004] SysML (Systems Modeling Language) was also proposed by OMG based on UML to follow the development of system engineering. It is a general modeling language that supports the application of system engineering well. Similar to UML, SysML is also a unified modeling language for system engineering. When a designer creates a SysML diagram, he will also arrange a suitable position for it according to the characteristics of the model elements and the relationship between the model elements, so that the entire diagram is more in line with the modeling habits of designers and important information is more prominent. If the designer does not want to do this work by himself, he also hopes that the modeling tool can automatically give a more reasonable layout choice, or can give a series of layout methods to choose from. To achieve a scientific and reasonable layout of the modeling elements of the SysML modeling tool, its basis is to reasonably represent the basic model data of the layout algorithm. How to define a reasonable, SysML-compliant, and efficient model layout data is a challenging problem. Summary of the invention
[0005] In order to solve the above technical problems, the present invention sorts out the basic data definition, graphic metamodel definition, graphic data architecture application technology, etc. of the reasonable arrangement of SysML modeling tool models, and proposes a model definition method based on the reasonable arrangement of drawing elements of system modeling tools.
[0006] The technical solution of the present invention is: a model definition method based on the reasonable arrangement of drawing elements of a system modeling tool, comprising the following steps:
[0007] Step 1: Create basic graphic data according to the implementation requirements of the reasonable arrangement of model elements of the SysML system modeling tool;
[0008] Step 2: Based on the basic graphic data reasonably arranged by the created SysML system modeling tool, define the graphic metamodel;
[0009] Step 3: Apply the graph data architecture based on the created reasonable arrangement graph metamodel.
[0010] Beneficial effects:
[0011] In a mature SysML system modeling software, the automatic layout function of the diagram is indispensable, because the automatic layout of the diagram saves the time of system engineers to manually adjust the model elements in the diagram, and the good layout provided can also make it easier for modelers to read and understand the diagram. This method is based on the characteristics of SysML related diagram models and the model elements they contain, and designs and implements the basic data definition of the automatic optimization layout algorithm for diagram modeling elements. Through the analysis of the automatic layout function of SysML diagrams and the semantic structure of the diagrams defined in SysML, the basic data of the reasonable layout algorithm is defined, which has high versatility. Combined with the corresponding layout algorithm, a good reasonable layout effect can be achieved in the SysML modeling tool. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] FIG1 shows the business application architecture of a model definition method based on a reasonable arrangement of drawing elements of a system modeling tool according to an embodiment of the present invention;
[0013] FIG2 shows a graphical metamodel definition architecture according to an embodiment of the present invention;
[0014] FIG. 3 shows an example of application of a graph data architecture according to an embodiment of the present invention. DETAILED DESCRIPTION
[0015] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of the present invention.
[0016] According to an embodiment of the present invention, a model definition method based on reasonable arrangement of drawing elements of a system modeling tool is proposed, comprising the following steps:
[0017] Step 1: Define basic graphic data according to the implementation requirements of the reasonable arrangement of model elements of the SysML system modeling tool;
[0018] Step 2: Based on the basic graphic data reasonably arranged by the created SysML system modeling tool, define the graphic metamodel;
[0019] Step 3: Apply the graph data architecture based on the created graph metamodel.
[0020] The business application architecture of the embodiment of the present invention is as follows Figure 1 In the unified SysML modeling tool, the SysML diagram information is modeled through the graphical editing module. The application module of the method of the present invention first organizes the extracted SysML diagram information through the defined basic model data structure, and then reasonably lays out the SysML model information according to the layout algorithm provided by the layout algorithm module, and finally presents the information of the reasonable layout of the SysML diagram in the graphical editing module.
[0021] Specifically, the step 1 defines basic graphic data according to the implementation requirements of the reasonable arrangement of model elements of the SysML system modeling tool, specifically including: defining the tree structure of basic data, defining graphic information, defining the root node information of the graph, defining the child node information of the graph, defining the edge information of the graph and defining the port information of the graph.
[0022] Define the tree structure of basic data: All nodes and parent-child relationships of the tree structure basically contain the SysML model data structure. The tree always has a root node representing the drawing area. The top-level nodes are the child nodes of the root node;
[0023] Define the graph information: a set of nodes and edges and anything else that belongs to them (labels, ports, etc.). This includes all the children of a single node. A node represents this simple graph. If you want to pass objects that contain the graph to the layout algorithm, you only need to pass the node object that represents the graph;
[0024] Define the root node information of the graph: it represents the root of the tree structure, the lowest common node of all nodes in the graph;
[0025] Define the sub-node information of the graph: including defining simple nodes without sub-nodes and hierarchical nodes with sub-nodes;
[0026] Define the edge information of the graph: an edge connecting two nodes in the same simple graph, where both the source node and the target node of the edge have a simple structure formed by the same parent node; a hierarchical edge that only needs to leave (or enter) a single hierarchical node to reach the target, connecting nodes in adjacent hierarchies; an edge where both the source node and the target node of the edge have a hierarchical structure formed by the same parent node;
[0027] Defines the port information of the graph: connection points on nodes for edge connections, ports on simple nodes, or ports without associated hierarchical edges; ports on hierarchical nodes with associated hierarchical edges.
[0028] Step 2: Based on the basic graphic data reasonably arranged by the created SysML system modeling tool, define the graphic metamodel. The defined graphic metamodel architecture is as follows: Figure 2 As shown, specifically including:
[0029] Define a collection of attributes: An instance of a defined type holds a mapping of attributes to values. A common use case is that the client sets attributes on an element that affect the behavior of the layout algorithm, and the layout algorithm calls the attributes used internally;
[0030] Define graph elements: All graph elements contain a list of attributes and labels;
[0031] Defines graph shapes: supertype of every graph element that can be described by a rectangular area: nodes, ports, and labels. Shapes have x and y coordinates as well as width and height;
[0032] Define labels: Labels are used to represent text in a diagram and can be attached to all other elements, including other labels, each label has the text that should be displayed as an attribute;
[0033] Define graph connection shapes: Edges can be connected to ports belonging to nodes, or directly to nodes. Both are connectable shapes and can be the source or target of an edge;
[0034] Define ports: Ports represent distinct attachment points provided by nodes, and each port belongs to only one node;
[0035] Defining Graph Nodes: Graph nodes can be thought of as the main building blocks of a SysML diagram. They can contain child nodes, and nodes can contain ports to which edges can connect. They also contain a list of edges. These edges are not the ones connected to the node itself, but the edges that connect its child nodes;
[0036] Defining an edge: An edge connects at least one source to at least one target, which means they are always directed and can be hyperedges (multiple sources or targets). The path of an edge through the graph is described by its list of "edge parts" instances;
[0037] Defines the part of an edge: describes the part of the path that an edge in the graph goes through; first of all, each edge has a parent edge; routing-wise, its start and end points have x and y coordinates, the list of inflections may be empty, and edges that only connect one source to one target have a single edge; superclass edges will have more, and in order to be able to construct them correctly, an edge part has a start and an end, both of which can be connectable shapes (if the part is external to the edge) or parts of another edge.
[0038] Step 3: Apply the graph data architecture based on the created graph metamodel, including:
[0039] Graph creation: Based on the created basic graph data and graph metamodel, graph elements are created and initialized, and their source and target are set, and graph elements are added to the included edge list of the correct node, all in a single method call. For example, for layout algorithm developers, the initialization edge part method, which returns the first edge part of a given edge, can optionally reset its layout data and delete all other edge parts. If this edge does not have any edges yet, an edge is created and added to the corresponding list. Such a method is convenient for applying layout;
[0040] Containment of edges: Based on the basic graph data created and the graph metamodel, the method automatically calculates the best containment and places the edge there. This requires setting at least one of the edge's endpoints. While calculating containment is a bit complex, the actual rule for determining the best containment is fairly simple: it is the lowest common denominator of all endpoints, where the root of a node is defined as the sequence of nodes from the node itself to the root node of the graph, and finally an example result of the graph data schema application is shown below. Figure 3 shown.
[0041] Although the above describes the illustrative specific embodiments of the present invention to facilitate those skilled in the art to understand the present invention, and it should be clear that the present invention is not limited to the scope of the specific embodiments, for those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations using the concept of the present invention are protected.
Claims
1. A model definition method based on reasonable arrangement of drawing elements of a system modeling tool, characterized in that: The steps include: Step 1: Create basic graphic data according to the implementation requirements of the reasonable arrangement of model elements of the SysML system modeling tool; Step 2: Based on the basic graphic data reasonably arranged by the created SysML system modeling tool, define the graphic metamodel; Step 3: Apply the graph data architecture based on the created graph metamodel.
2. The model definition method based on the reasonable arrangement of drawing elements of the system modeling tool according to claim 1 is characterized in that: Step one includes: defining basic graphic data according to the implementation requirements of the reasonable arrangement of model elements of the SysML-oriented system modeling tool, including: defining the tree structure of basic data, defining graphic information, defining the root node information of the graph, defining the child node information of the graph, defining the edge information of the graph and defining the port information of the graph.
3. The model definition method based on the reasonable arrangement of drawing elements of the system modeling tool according to claim 1 is characterized in that: Step 2 includes: based on the basic graphic data reasonably arranged by the created SysML system modeling tool, define the graphic metamodel: define attribute sets, define graph elements, define graph shapes, define labels, define graph connection shapes, define ports, define graph nodes, define edges, and define edge parts.
4. The model definition method based on the reasonable arrangement of drawing elements of the system modeling tool according to claim 1 is characterized in that: Step three includes: Based on the created graph metamodel, the graph data architecture is applied including: creating a graph and calculating edge inclusion.
Citation Information
Patent Citations
Information physical fusion system modeling method based on SysML / MARTE
CN106096126A
Integrated model construction method, device and system based on multi-architecture modeling language
CN115840564A
SysML model collaborative development system supporting data interoperability of heterogeneous modeling tool
CN116610380A