Rule-based UML (Unified Modeling Language) model attribute tabulation display method and equipment and storage medium
By using a builder-filtered, converter-parsed, and rule-transformation-engine-generated cell value method, the problem of multi-dimensional information display in traditional UML model tabular display methods is solved, realizing multi-dimensional model attribute display and data consistency management.
Patent Information
- Application Number
- CN202511789438.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-01
- Publication Date
- 2026-02-24
AI Technical Summary
In existing technologies, traditional tabular representation methods of UML models can only display information in a single dimension, making it difficult to fully display the multidimensional attributes and complex relationships of the model, and lacking flexibility and adaptability.
A rule-based UML model attribute tabular display method is adopted. The builder filters row elements, the converter parses column attribute expressions, and the rule conversion engine generates cell values to achieve multi-dimensional tabular display.
It enables comprehensive and flexible display of complex models, improves the flexibility and adaptability of model management, ensures data consistency and synchronization, and enhances the scalability of the system.
Smart Images

Figure CN121560281A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of MBSE complex software system model management technology, and particularly relates to a rule-based UML model attribute tabular display method, device and storage medium. Background Technology
[0002] MBSE (Model-Based System Design) is an important method for modeling complex software systems, and it is widely used in various industrial sectors, such as aerospace and automotive. Unified Modeling Language (UML) is a standard language for visualizing, describing, constructing, and documenting software systems. UML models play a crucial role in software development, helping developers better understand system structure and behavior. Modeling languages support a wide variety of elements with complex relationships, making effective model management a significant challenge in engineering. Currently, in large systems built using modeling methods, traditional tabular representations typically only display single-dimensional information, such as fixed lists of attributes or relationships, failing to comprehensively showcase the model's multidimensional attributes and complex relationships. Summary of the Invention
[0003] The present invention aims to solve at least one of the technical problems existing in the prior art.
[0004] According to one aspect of the present invention, a rule-based method for tabulating the attributes of a UML model is provided, the rule-based method for tabulating the attributes of a UML model includes: S1 uses a builder approach to filter row elements displayed in a tabular format; S2, parses the column attribute expression of the travel element type using a converter: S21, use a converter to parse column attribute expressions of row element types; S22, the IFeatureInterpreter interface parses the column attribute expression parsed by the converter according to the expression prefix and uses the column attribute parser supported by the IFeatureInterpreter interface to obtain the column attribute expression of the row element type; The IFeatureInterpreter interface supports column attribute expression types including general columns, system-defined columns, and custom columns. Custom columns are expressions that start with QPROCST:: and are defined through structured expressions. Custom columns define relational and attribute or meta-chain structured expressions. S3 uses a rule transformation engine to parse column attribute expressions, generate cell values, and achieve tabular display.
[0005] Furthermore, in S22, custom columns are implemented based on relationships and metachains, where relationships include: 1.1 Type, used to specify the type of the elements at both ends of the relationship line; 1.2 Direction, used to specify the current row as the source, destination, or bidirectional; 1.3 The key-value pair for attribute value filtering is used to specify the attribute value conventions for the other end of the relationship; 1.4 Filter the element types of the results elements to ensure that only the element types required by the user are retained among various element types.
[0006] Furthermore, for meta-chains: element types and attributes are defined and linked in an ordered manner; the value of the previous element's attribute is used as the starting condition for the next element, and so on, to establish relationships and define filtering conditions for the resulting elements; during parsing, the row element is used as the starting point of the chain, the actual value of the row element is obtained according to the meta-chain relationship, and result matching and filtering are limited to reference attributes.
[0007] Furthermore, the general columns are expressions that begin with QPRO::Element::, including the EStructureFeature of UML and the Property property of Stereotype.
[0008] Furthermore, system-defined columns are expressions that begin with QPROEX::, which are extended properties defined by the system and are expressions other than the element type.
[0009] Furthermore, S3 specifically includes: the rule transformation engine parses column attribute expressions according to predefined rules and algorithms, and generates corresponding cell values by combining row elements; when generating cell content, it traverses each cell in the table by intersecting rows and columns.
[0010] Furthermore, the rule transformation engine's parsing of different types of column attribute expressions specifically includes: (1) For expressions starting with QPRO::Element::: the rule transformation engine parses the Property property of UML's EStructureFeature or Stereotype, obtains the element's property through the line element and expression, and then obtains the corresponding property value of the element through the property. (2) For expressions starting with QPROEX::: the rule transformation engine uses the system-extended logic to parse the column attribute values corresponding to the row elements; (3) For expressions starting with QPROCST:: the rule transformation engine calculates the cell value corresponding to the row element through the algorithm defined by the structured expression.
[0011] Furthermore, S1 specifically includes: S11, using a builder to filter matching row elements: the builder iterates through the target elements to be filtered, and different builders are used to construct the target elements for different display modes; related elements that are directly related to the target elements or child elements that have a child element type relationship are filtered, and the filtered target elements, related elements and child elements form a row element displayed in a table. S12, sort the selected row elements.
[0012] According to another aspect of the present invention, a computer device is provided, the computer device including a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the rule-based UML model attribute tabulation method as described above.
[0013] According to another aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the rule-based UML model attribute tabulation method as described above.
[0014] This invention provides a rule-based method, device, and storage medium for tabular display of UML model attributes. This method achieves flexible column attribute definitions through different column attribute expressions, enabling comprehensive and flexible tabular display of complex models. A rule conversion engine parses the column attribute expressions, mapping the attribute values of model elements to the columns of the table, ensuring accurate display of attribute values. This invention allows for customization of table column attributes according to different needs and model element types, achieving multi-dimensional display and improving the flexibility and adaptability of model management. Compared with existing technologies, this invention solves the technical problem of the inability to customize multi-dimensional column attributes in complex system tabular model display scenarios. Attached Figure Description
[0015] The accompanying drawings, which form part of this specification, are provided to further illustrate embodiments of the invention and, together with the textual description, explain the principles of the invention. It is obvious that the drawings described below are merely some embodiments of the invention, and those skilled in the art can obtain other drawings based on these drawings without any creative effort.
[0016] Figure 1 A flowchart illustrating a rule-based UML model attribute tabular representation method provided according to a specific embodiment of the present invention is shown. Figure 2The diagram illustrates the specific implementation flow of the rule-based UML model attribute tabulation method provided by a specific embodiment of the present invention. Detailed Implementation
[0017] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit the present invention or its application or use. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments according to this application. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0019] Unless otherwise specifically stated, the relative arrangement, numerical expressions, and values of the components and steps described in these embodiments do not limit the scope of the invention. It should also be understood that, for ease of description, the dimensions of the various parts shown in the accompanying drawings are not drawn to actual scale. Techniques, methods, and devices known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and devices should be considered part of the specification. In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values.
[0020] like Figure 1 and Figure 2 As shown in the figure, a rule-based method for tabulating the attributes of a UML model is provided according to a specific embodiment of the present invention. The method includes: S1 uses a builder approach to filter row elements displayed in a tabular format; S2, parses the column attribute expression of the travel element type using a converter: S21, use a converter to parse column attribute expressions of row element types; S22, the IFeatureInterpreter interface parses the column attribute expression parsed by the converter according to the expression prefix and uses the column attribute parser supported by the IFeatureInterpreter interface to obtain the column attribute expression of the row element type; The IFeatureInterpreter interface supports column attribute expression types including general columns, system-defined columns, and custom columns. Custom columns are expressions that start with QPROCST:: and are defined through structured expressions. Custom columns define relational and attribute or meta-chain structured expressions. S3 uses a rule transformation engine to parse column attribute expressions, generate cell values, and achieve tabular display.
[0021] This configuration method provides a rule-based approach to tabularizing UML model attributes. It allows for flexible column attribute definitions through different column attribute expressions, enabling comprehensive and flexible tabular display of complex models. A rule transformation engine parses the column attribute expressions, mapping the attribute values of model elements to the table columns, ensuring accurate display of attribute values. This invention allows for customization of table column attributes based on different needs and model element types, achieving multi-dimensional display and improving the flexibility and adaptability of model management.
[0022] In complex modeling systems, modeling languages support a wide variety of elements with intricate relationships. The row element types in rule-based model attribute tables include UML 2.5 metamodels, SysML 1.6 metamodels, and custom domain models of the current working model.
[0023] First, a builder method is used to filter the row elements displayed in a tabular format. This includes the following steps: S11 uses a builder approach to filter matching row elements: Based on one or more user-defined element types and ranges, a builder approach is used to traverse and filter target elements. Different display modes (list, full tree, and compact tree) use different builder approaches to construct the target elements. Related elements that are directly related to the target elements or child elements with child element type relationships are filtered. The filtered target elements, related elements, and child elements are grouped into row elements for tabular display. The specific implementation is as follows: Different tables use the Factory to generate different builders IRowElementBuilder based on the table ID. Among them, the list uses the list builder instance to build all matching row elements in a linear data structure; the full tree can build matching row elements and contain depth path elements; the compact tree can build matching row elements and the nearest parent row element, filtering out redundant depth path elements.
[0024] The table is marked by the attribute TypesIncludeSubTypes. If the value is True, elements of its subtypes need to be constructed recursively.
[0025] S12, sort the row elements: The filtered row elements are sorted to ensure their orderly display. Sorting is based on user-defined or default rules, ensuring the logical consistency and readability of the tabular display. By default, sorting is done by text; if a column is for row elements, sorting is done only by the cell values corresponding to that column.
[0026] By following the steps above, row elements that meet the user's needs can be efficiently filtered out and displayed in an orderly manner in the table.
[0027] Furthermore, in this invention, a converter parses the column attribute expressions of the line element type. In complex modeling systems, to achieve a tabular display of rule-based model attributes, it is necessary to search for matching column attribute expressions by element type; different element types correspond to different column attribute expressions. Specifically, this includes the following steps: S21, the converter is used to parse the column attribute expression of the row element type (Class|Stereotype), where the parsed column attribute expression includes information such as name, icon and attribute itself; S22, the IFeatureInterpreter interface parses the column attribute expressions parsed by the converter according to the expression prefix and the Parser supported by the IFeatureInterpreter interface to obtain the column attribute expressions of the row element type. The IFeatureInterpreter interface, by passing in the column attribute expressions and combining them with the model represented by the table row elements, parses out the model attributes represented by that column, and then displays and edits the model values in that column.
[0028] The column attribute expression types supported by the IFeatureInterpreter interface are as follows: (1) General columns are expressions that begin with QPRO::Element::: including the EStructureFeature of UML and the Property property of Stereotype. Example: QPRO::Element::Name.
[0029] (2) System-defined columns are expressions that begin with QPROEX::: These are extended properties that are expressions defined by the system and are outside the element type. Example: QPROEX::Image.
[0030] (3) Custom columns are expressions that begin with QPROCST::: These are expressions defined using structured expressions. Custom columns can be used to define relational and attribute or meta-chain structured expressions (models). Examples: QPROCST::column1, QPROCST::column2.
[0031] Commonly used general-purpose columns and system-defined columns can only implement predefined semantic logic and cannot implement user-defined semantics. Custom columns are implemented based on relations and meta-chains, as detailed below.
[0032] 1. Relationship: 1.1 Define the element type of the line, specifying the type of elements in the Relation line.
[0033] 1.2 By defining the association direction, specify the current row as the source, target, or both.
[0034] 1.3 Define the key-value pairs for filtering attribute values (0-*), specifying the attribute value conventions for the other end of the relationship.
[0035] 1.4 Define the element types (0-*) for filtering the results elements to ensure that only the element types required by the user are retained among various element types.
[0036] 2. Metachain: By defining element types and attributes and linking them in an ordered manner, referenced attributes can continue to be linked as long as they are semantically correct. Meta-chains establish relationships by using the value of the previous element's attribute as the starting condition for the next, and so on, defining filtering conditions (0-*) for the resulting elements. During parsing, the row element is used as the starting point of the chain, and its actual value is obtained according to the meta-chain relationship, with result matching and filtering limited to referenced attributes.
[0037] By concatenating the attributes of the current row elements and connecting them in a chain (such as abcd), deep tracing of the model can be achieved; at the same time, element type filtering and matching can be performed on specified result elements to ensure that only the element types required by the user are retained among various types of elements.
[0038] Relationships and metachains are structured using a specified data structure called a structured expression, which is recorded in the `customColumns` attribute of the table as XML / XMI text. A `name` attribute is added to this data structure to identify the expression it defines.
[0039] In this way, the system can efficiently find suitable column attribute expressions, thereby enabling flexible customization of columns.
[0040] Furthermore, in this invention, a rule conversion engine is used to parse column attribute expressions and generate cell values to achieve tabular display.
[0041] When generating cell content, a row-column intersection method is used, specifically employing the TableAxisElement data structure constraint, to traverse each cell in the table, ensuring that the data in each cell is correctly retrieved. The cell data retrieval process is handled by the rule transformation engine. The engine parses column attribute expressions based on predefined rules and algorithms (i.e., recursively matching the Property properties of the corresponding element types EStructureFeature or Stereotype) and combines this with row elements to generate the corresponding cell values.
[0042] Different types of column attribute expressions require different expression rule conversion engines for parsing. The specific parsing method is as follows: (1) Expressions starting with QPRO::Element::: The rule transformation engine parses the Property property of UML's EStructureFeature or Stereotype, obtains the element's property through the line element and the expression, and then obtains the corresponding property value of the element through the property.
[0043] Example: QPRO::Element::Name, the parsing process is as follows: the rule transformation engine recognizes QPRO::Element::Name in the expression and extracts the value of the Name attribute from the row element.
[0044] (2) Expressions starting with QPROEX::: The rule transformation engine uses the system's extended logic to parse the column attribute values corresponding to the row elements.
[0045] Example: QPROEX::Image, the parsing process is as follows: the rule transformation engine recognizes QPROEX::Image in the expression and extracts the value of the Image attribute from the row element.
[0046] (3) Expressions starting with QPROCST:: The rule transformation engine calculates the cell value corresponding to the row element through the algorithm defined by the structured expression (such as the association of lines and the attribute linking of elements).
[0047] Example: QPROCST::Value indicates that the value of an element is calculated using a user-defined structured expression.
[0048] In this way, the rule transformation engine can efficiently parse column attribute expressions and generate corresponding cell values based on row elements, thereby achieving flexible tabular display.
[0049] This invention innovatively proposes: (1) Customization of multi-dimensional column attributes: The method proposed in this invention breaks through the limitation of traditional methods that only support a single attribute column. It achieves flexible column attribute definition through different column attribute expressions, and realizes a comprehensive and flexible display of complex model tables.
[0050] (2) Parsing of column attribute expressions: The column attribute expressions are parsed by the rule transformation engine, and the attribute values of the model elements are mapped to the columns of the table to ensure that the attribute values can be accurately displayed in the table.
[0051] Compared with the prior art, the present invention has the following beneficial effects: (1) Enhance the flexibility of complex model management: Users can customize the column attributes of the table according to different needs and model element types to achieve multi-dimensional display and improve the flexibility and adaptability of model management.
[0052] (2) Improve data consistency and synchronization: Through the rule transformation engine, the system can ensure data consistency and synchronization. In a multi-user collaborative environment, the system can effectively manage data consistency and synchronization, avoiding data conflicts and inconsistencies.
[0053] (3) Enhanced scalability: The ability to customize multi-dimensional column attributes enhances scalability. When the model size increases or the types of model elements increase, the system can effectively expand, ensuring the efficiency and flexibility of model management.
[0054] According to another aspect of the present invention, a computer device is provided, the computer device including a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the rule-based UML model attribute tabulation method as described above.
[0055] According to another aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the rule-based UML model attribute tabulation method as described above.
[0056] In summary, this invention provides a rule-based method, device, and storage medium for tabular display of UML model attributes. This method achieves flexible column attribute definitions through different column attribute expressions, enabling comprehensive and flexible tabular display of complex models. A rule conversion engine parses the column attribute expressions, mapping the attribute values of model elements to the columns of the table, ensuring that the attribute values are accurately displayed. This invention allows for customization of table column attributes according to different needs and model element types, achieving multi-dimensional display and improving the flexibility and adaptability of model management.
[0057] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A rule-based method for tabularizing the attributes of a UML model, characterized in that, The rule-based method for tabulating UML model attributes includes: S1 uses a builder approach to filter row elements displayed in a tabular format; S2, parses the column attribute expression of the travel element type using a converter: S21, use a converter to parse column attribute expressions of row element types; S22, the IFeatureInterpreter interface parses the column attribute expression parsed by the converter according to the expression prefix and uses the column attribute parser supported by the IFeatureInterpreter interface to obtain the column attribute expression of the row element type; The column attribute expression types supported by the IFeatureInterpreter interface include general columns, system-defined columns, and custom columns. General columns begin with QPRO::Element::, system-defined columns begin with QPROEX::, and custom columns begin with QPROCST::. S3 uses a rule transformation engine to parse column attribute expressions, generate cell values, and achieve tabular display.
2. The rule-based UML model attribute tabular display method according to claim 1, characterized in that, In S22, custom columns are implemented based on relationships and metachains. The relationships include: 1.1 Type, used to specify the type of the elements at both ends of the relationship line; 1.2 Direction, used to specify the current row as the source, destination, or bidirectional; 1.3 The key-value pair for attribute value filtering is used to specify the attribute value conventions for the other end of the relationship; 1.4 Filter the element types of the results elements to ensure that only the element types required by the user are retained among various element types.
3. The rule-based UML model attribute tabular display method according to claim 2, characterized in that, For metachains: elements are defined by type and attributes and linked in an ordered manner; Metachains establish relationships and define filtering conditions for result elements by using the value of the previous element's attribute as the starting condition for the next element, and so on. During parsing, the row element is used as the starting point of the chain, and the actual value of the row element is obtained according to the metachain relationship. Result matching and filtering are limited to reference attributes.
4. The rule-based UML model attribute tabular display method according to claim 1, characterized in that, The general columns are expressions that begin with QPRO::Element:::, including the EStructureFeature of UML and the Property property of Stereotype.
5. The rule-based UML model attribute tabular display method according to claim 4, characterized in that, System-defined columns are expressions that begin with QPROEX::: which are extended properties defined by the system and are expressions other than the element type.
6. The rule-based UML model attribute tabular display method according to claim 1, characterized in that, S3 specifically includes: a rule transformation engine that parses column attribute expressions according to predefined rules and algorithms, and generates corresponding cell values by combining row elements; when generating cell content, it traverses each cell in the table by intersecting rows and columns.
7. The rule-based UML model attribute tabular display method according to claim 6, characterized in that, The rule transformation engine's parsing of different types of column attribute expressions specifically includes: (1) For expressions starting with QPRO::Element::: the rule transformation engine parses the Property property of UML's EStructureFeature or Stereotype, obtains the element's property through the line element and expression, and then obtains the corresponding property value of the element through the property. (2) For expressions starting with QPROEX::: the rule transformation engine uses the system-extended logic to parse the column attribute values corresponding to the row elements; (3) For expressions starting with QPROCST:: the rule transformation engine calculates the cell value corresponding to the row element through the algorithm defined by the structured expression.
8. The rule-based UML model attribute tabular display method according to claim 1, characterized in that, S1 specifically includes: S11, using a builder to filter matching row elements: the builder iterates through the target elements to be filtered, and different builders are used to construct the target elements for different display modes; related elements that are directly related to the target elements or child elements that have a child element type relationship are filtered, and the filtered target elements, related elements and child elements form a row element displayed in a table. S12, sort the selected row elements.
9. A computer device, characterized in that, The computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the rule-based UML model attribute tabulation method as described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the rule-based UML model attribute tabulation method as described in any one of claims 1 to 8.