Method and device for supporting REQIF demand model conversion

By designing the metamodel of the REQIF requirement model and building a metamodel library for transforming the target model, the transformation from the REQIF requirement model to multiple system architecture models is realized, and the limitations and data consistency problems of REQIF requirement model conversion in the existing technology are solved. , improves design efficiency and traceability.

CN119106602APending Publication Date: 2024-12-10BEIJING INST OF TECH

Patent Information

Application Number
CN202411073366.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-06
Publication Date
2024-12-10

AI Technical Summary

Technical Problem

Existing technologies are difficult to achieve the transformation of REQIF requirements model to multiple system architecture models, and it is difficult to ensure data consistency and traceability of requirements analysis and system architecture design processes, resulting in inconsistent design information and increasing design risks.

Method used

Design the metamodel of the REQIF requirement model, build a metamodel library for the transformation target model, and through configuring the transformation process, parsing the REQIF requirement model, matching and converting requirements entries and relationship instances, using KARMA language to support the conversion of multiple modeling languages ​​to ensure data Consistency and traceability.

Benefits of technology

Automatic or semi-automatic conversion of REQIF requirements model to multiple system architecture models is realized, which improves the data consistency between requirements analysis and architecture design, reduces human errors, and improves design efficiency and traceability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119106602A_ABST
    Figure CN119106602A_ABST
Patent Text Reader

Abstract

The invention provides a method and device for supporting REQIF demand model conversion. According to the method, a meta-model of an REQIF demand model is designed, an object meta-model of the meta-model is used for describing the hierarchy and attributes of demand entries, and a relation meta-model is used for describing the superior-subordinate relation of the demand entries; constructing a meta-model library of the conversion target model; then configuring a conversion process, wherein a conversion source configures a source meta-model; the conversion target is configured with a target meta-model and a conversion rule, and the conversion rule specifies information transmission between the source meta-model and the target meta-model. The REQIF demand model to be converted is analyzed, and an object instance and a relation instance are obtained by instantiating a meta-model of the REQIF demand model; and according to the conversion configuration, converting the object instance and the relationship instance in the REQIF demand model into a target meta-model instance, and transmitting meta-model instance information at the same time. According to the method, conversion from the REQIF demand model to different modeling language description system architecture models is supported, and the data consistency of demand analysis and architecture design is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of system engineering and demand engineering, and in particular relates to a method and device supporting REQIF demand model conversion. Background Art

[0002] With the increasing complexity of systems, Model-Based System Engineering (MBSE) is increasingly being used in the architectural design process of complex systems. MBSE integrates system engineering activities such as requirements, design, analysis, verification, and maintenance into a common framework by establishing a unified system model, significantly improving the efficiency and quality of system development. In the application process of MBSE, requirements management is a crucial link. The core task of requirements management is to ensure that system design accurately reflects user and business requirements and maintains consistency throughout the system life cycle. To achieve this goal, the industry has proposed and widely adopted the Requirements Interchange Format (REQIF). REQIF is a standardized requirements description and exchange format that defines a unified set of syntax and semantics for transmitting requirements information between different tools and platforms. The standardized characteristics of REQIF make it widely used in the development of complex systems across organizations and teams.

[0003] However, in the actual system design process, the REQIF requirement model is usually used for requirement analysis, and modeling languages ​​such as SysML are used for system architecture design. There is a problem of design information separation between requirement analysis and system architecture design. In the past, engineers manually transferred requirements to the system architecture design process, which was time-consuming and laborious and prone to errors, affecting the accuracy of system design. Therefore, ensuring the integration of requirement design and system architecture design has become an important requirement in MBSE practice, that is, by efficiently converting the REQIF requirement model into the system architecture model, ensuring the seamless connection and consistency between requirements and system design, thereby improving the overall efficiency and quality of system development.

[0004] The Chinese invention patent with the patent publication number CN118070536A discloses a heterogeneous model conversion method, device, electronic device and storage medium. The method includes: obtaining the system design model of the target project, parsing the system design model, determining and displaying the model structure framework corresponding to the system design model, wherein the model structure framework includes multiple design meta-models and the structural relationship between each design meta-model; in response to the configuration operation for the design meta-model, determining the model filling data of the design meta-model, generating and displaying the simulation stand-alone model corresponding to the design meta-model according to the model filling data and the simulation model library; in response to the model conversion operation, generating and displaying the system simulation model corresponding to the system design model based on the organizational structure and the simulation stand-alone model. Based on the technical solution of the embodiment of the present invention, it is possible to realize the conversion of the basic structural framework between heterogeneous models and the conversion of model-related filling information, thereby improving the perfection of model conversion.

[0005] By analyzing the above methods, we found the following problems to be solved in the current technology:

[0006] (1) It is difficult to achieve the conversion from REQIF requirement model to system architecture model: The above patent can only support the conversion from SysML system design model to Modelica simulation model. The limitations of model conversion are relatively large. It is difficult to achieve the conversion from REQIF requirement model to system architecture model described in multiple heterogeneous modeling languages.

[0007] (2) It is difficult to ensure the consistency and traceability of the demand analysis and system architecture design process: The model conversion simulation proposed in the above patent ensures the consistency of data transmission between the system design and simulation processes, and solves problems such as data loss. However, it is difficult to ensure the consistency and traceability of data transmission in the demand analysis and system architecture design process in the system design process. The process still relies on engineers to manually transfer data. The manually transferred design information and data may be omitted or misunderstood during multiple conversions, resulting in inconsistent design information at different design stages, which increases design risks. Summary of the invention

[0008] In view of this, the present invention provides a method and device that supports REQIF requirement model conversion, supports automatic or semi-automatic conversion of REQIF requirement models to system architecture models described in multiple different modeling languages, improves data consistency between requirement analysis and architecture design, and improves the design efficiency of engineers.

[0009] In order to solve the above technical problems, the present invention is implemented as follows.

[0010] A method for supporting REQIF requirement model transformation, comprising:

[0011] Step 1: Design the metamodel of the REQIF requirement model. Its graph metamodel includes the object metamodel and the relational metamodel. The object metamodel is used to describe the hierarchy and attributes of the requirement items in the REQIF requirement model. The relational metamodel is used to describe the hierarchical relationship between the requirement items in the REQIF requirement model.

[0012] Step 2: Build a metamodel library of the conversion target model, whose graph metamodel includes object metamodel and relational metamodel;

[0013] Step 3: Configure the conversion process: The conversion configuration includes the conversion declaration, conversion source, and conversion target;

[0014] The conversion declaration configures the REQIF requirement model to be converted and the diagram metamodel type of the target model; the conversion source configures the structure to be converted of the REQIF requirement model to be converted described by the metamodel, i.e., the source metamodel; the conversion target configures the structure of the conversion target model described by the metamodel, i.e., the target metamodel, and the conversion rules. The conversion rules include the source metamodel and the target metamodel of the conversion, as well as the information transfer between them.

[0015] Step 4: Parse the REQIF demand model to be converted, obtain the demand items, levels and attributes in the REQIF demand model to be converted, combine the REQIF demand model metamodel, and obtain object instances and relationship instances through instantiation;

[0016] Step 5: Execute the conversion process: According to the structure to be converted declared by the conversion source, match the object instance and relationship instance of the REQIF requirement model to be converted in the parsing result of step 4; according to the structure and conversion rules in the conversion target model defined by the conversion target, convert the object instance and relationship instance in the REQIF requirement model into the target metamodel instance, and transfer the metamodel instance information at the same time.

[0017] Preferably, in step 4, the REQIF demand model to be converted is parsed to obtain the demand items, levels and attributes in the REQIF demand model to be converted as follows:

[0018] Use the dom4j API interface to parse the REQIF requirement model in the XML data format;

[0019] Extract the information under the "SPEC-ATTRIBUTES" element in the XML file. This information is the name of all the attributes of the requirement items and serves as the attributes of the object metamodel of the requirement items at each level.

[0020] Extract the information under the "SPEC-OBJECTS" element in the XML file. This information is all the requirement item instances, and the requirement item hierarchy has not yet been divided;

[0021] Extract the "CHILDREN" information in the "SPECIFICATION" under the "SPECIFICATIONS" element in the XML file. This information describes the hierarchical relationship between each requirement item instance. According to the hierarchical relationship between all the obtained requirement items, the requirement item level N contained in the REQIF requirement model is obtained. At the same time, the level of each requirement item is determined according to the "CHILDREN" information.

[0022] Preferably, after the object instance and the relationship instance are obtained in step 4, they are further stored in a linked list to obtain an object metamodel linked list and a relationship metamodel linked list;

[0023] The step 5 matches the object instance and the relationship instance of the REQIF requirement model to be converted in the object metamodel linked list and the relationship metamodel linked list according to the structure to be converted declared by the conversion source.

[0024] Preferably, in step 2, the metamodel library of the conversion target model is constructed based on the multi-architecture modeling language KARMA;

[0025] The graph metamodel of the conversion target model includes object metamodel and relational metamodel;

[0026] The object metamodel includes module object metamodel and configuration name attribute metamodel;

[0027] The relationship metamodel includes the association relationship metamodel, the association relationship start-end binding module object metamodel, and the association relationship terminal binding use case object metamodel; the configuration start-end role is the association start-end role metamodel, and the configuration terminal is the association terminal role metamodel.

[0028] Preferably, the structure to be converted of the configuration of the conversion source is described by a metamodel, which is divided into two modes: a single element mode and a simple mode;

[0029] The single element mode means that only one object metamodel is converted;

[0030] The simple pattern represents the transformation structure as a binary chain relationship of n objects bound by n-1 relationships.

[0031] The present invention also provides a device supporting REQIF demand model conversion, the device comprising a REQIF demand model construction module, a metamodel construction module, and a model conversion module; the model conversion module comprises a REQIF demand model parsing module, a model conversion configuration module, and a model conversion execution module;

[0032] The REQIF demand model building module is used to build the REQIF demand model to be converted;

[0033] The metamodel library construction unit is used to construct the metamodel of the REQIF demand model, and its graphic metamodel includes an object metamodel and a relationship metamodel. The object metamodel is used to describe the hierarchy and attributes of the demand items in the REQIF demand model, and the relationship metamodel is used to describe the superior-subordinate relationship of the demand items in the REQIF demand model. The metamodel library construction unit is also used to construct the metamodel library of the conversion target model, and its graphic metamodel includes an object metamodel and a relationship metamodel;

[0034] The model conversion configuration module is used to configure the conversion process. The conversion configuration includes a conversion statement, a conversion source, and a conversion target. The conversion statement configures the REQIF demand model to be converted and the graph metamodel type of the target model. The conversion source configures the structure to be converted described by the metamodel in the REQIF demand model to be converted. The conversion target configures the structure in the conversion target model and the conversion rules. The conversion rules include the source metamodel and the target metamodel of the conversion, and the information transfer between them.

[0035] The REQIF requirement model parsing module is used to parse the REQIF requirement model to be converted, obtain the requirement items, levels and attributes in the REQIF requirement model to be converted, and obtain object instances and relationship instances through instantiation in combination with the REQIF requirement model metamodel;

[0036] The model conversion execution module is used to match the object instances and relationship instances of the REQIF requirement model to be converted in the parsing results of the REQIF requirement model parsing module according to the structure to be converted declared by the conversion source; convert the object instances and relationship instances in the REQIF requirement model into target metamodel instances according to the structure and conversion rules in the conversion target model defined by the conversion target, and transfer the metamodel instance information at the same time.

[0037] Preferably, the REQIF requirement model parsing module uses the dom4j API interface to parse the REQIF requirement model in the XML data format, specifically including:

[0038] Extract the information under the "SPEC-ATTRIBUTES" element in the XML file. This information is the name of all the attributes of the requirement items and serves as the attributes of the object metamodel of the requirement items at each level.

[0039] Extract the information under the "SPEC-OBJECTS" element in the XML file. This information is all the requirement item instances, and the requirement item hierarchy has not yet been divided;

[0040] Extract the "CHILDREN" information in the "SPECIFICATION" under the "SPECIFICATIONS" element in the XML file. This information describes the hierarchical relationship between each requirement item instance. According to the hierarchical relationship between all the obtained requirement items, the requirement item level N contained in the REQIF requirement model is obtained. At the same time, the level of each requirement item is determined according to the "CHILDREN" information.

[0041] In combination with the REQIF requirement model metamodel, object instances and relationship instances are obtained through instantiation.

[0042] Preferably, after obtaining the object instance and the relationship instance, the REQIF requirement model parsing module further stores them in a linked list to obtain an object metamodel linked list and a relationship metamodel linked list.

[0043] Preferably, the meta-model library construction unit constructs the meta-model library of the conversion target model based on the multi-architecture modeling language KARMA;

[0044] The graph metamodel of the conversion target model includes object metamodel and relational metamodel;

[0045] The object metamodel includes module object metamodel and configuration name attribute metamodel;

[0046] The relationship metamodel includes the association relationship metamodel, the association relationship start-end binding module object metamodel, and the association relationship terminal binding use case object metamodel; the configuration start-end role is the association start-end role metamodel, and the configuration terminal is the association terminal role metamodel.

[0047] Preferably, the structure to be converted in the conversion source configured by the model conversion configuration module is described by a metamodel, which is divided into two modes: a single element mode and a simple mode; the single element mode means that only a certain object metamodel is converted; the simple mode means that the conversion structure is a binary chain relationship in which n objects are bound by n-1 relationships.

[0048] Beneficial effects:

[0049] (1) The model conversion method of the present invention extracts information from the source REQIF demand model through model query, and converts the extracted information into the target model according to the conversion rules. In the process of automatically generating the target model, the traceability information is retained. When the REQIF demand model changes, the information of the target model can be synchronously updated by reapplying the conversion rules, ensuring the traceability of the model information.

[0050] (2) The present invention can improve the consistency between demand analysis and system architecture design. Through the model conversion method and device proposed in the present invention, it is possible to convert the REQIF demand model in demand analysis into a system architecture model, effectively eliminating the information gap between demand and design. The method ensures the accurate and efficient transmission of demand information in system architecture design through an automated conversion process, thereby reducing human errors and improving design efficiency.

[0051] (3) The model conversion technology in the present invention is developed based on the KARMA language. The KARMA language can support the construction of a metamodel library to express multiple modeling languages, and the model conversion is a conversion at the metamodel level. Therefore, it can support the generation of system architecture models described in multiple modeling languages ​​from the REQIF requirement model. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 A flowchart of a method for supporting REQIF demand model conversion according to an embodiment of the present invention;

[0053] Figure 2 A schematic diagram of a method framework supporting REQIF demand model conversion according to an embodiment of the present invention;

[0054] Figure 3 A schematic diagram of the structure of a device supporting REQIF demand model conversion according to an embodiment of the present invention;

[0055] Figure 4 This is a case diagram of the REQIF demand model of the present invention;

[0056] Figure 5 It is a schematic diagram of the configuration conversion process;

[0057] Figure 6 This is the converted UseCase model case diagram. DETAILED DESCRIPTION

[0058] The present invention is described in detail below with reference to the accompanying drawings and embodiments.

[0059] like Figure 1 As shown, the present invention proposes a method for supporting REQIF demand model conversion, comprising the following steps:

[0060] Step S1: Construct a REQIF demand model based on the product development requirements.

[0061] First, determine the architecture of the requirements, that is, the content of the requirement items and the hierarchical relationship between the requirement items; then, determine the attributes of the requirement items, such as ID, content, description, etc.; finally, combine the architecture of the requirements and the attributes of the requirement items to build the REQIF requirement model.

[0062] like Figure 4 The following is an example of a REQIF requirement model, which contains five requirement items, each of which has ID, name, and description attributes. The requirement item with ID "REQ-3" can be decomposed into four requirement items, namely: requirement item with ID "REQ-3.1", requirement item with ID "REQ-3.2", requirement item with ID "REQ-3.3", and requirement item with ID "REQ-3.4". Among them, the name attribute of the requirement item with ID "REQ-3" is "Braking Force", and the description attribute is "The operator should be able to change the required braking force using the brake pedal. Fully pressing the pedal means maximum braking force."; the name attribute of the requirement item with ID "REQ-3.1" is "Driving Situation 1", and the description attribute is "The brake shall not be activated when the brake pedal is not pressed."; the name attribute of the requirement item with ID "REQ-3.2" is "Driving Situation 2", and the description attribute is "If the brake pedal is pressed and the wheel speed is greater than zero, the braking torque value applied to the wheel by the corresponding ABS component shall eventually be greater than 0."; the name attribute of the requirement item with ID "REQ-3.3" is "Driving Situation 3", and the description attribute is "If the brake pedal is pressed, the actual speed of the vehicle is greater than 10km / h, and one wheel slips, the braking torque corresponding to the wheel is zero."; the name attribute of the requirement item with ID "REQ-3.4" is "Driving Situation 4", and the description attribute is "If the brake pedal and the accelerator pedal are pressed at the same time, the actual vehicle speed will decrease.".

[0063] Step S2: Design the metamodel of the REQIF requirement model, which includes the object metamodel and the relationship metamodel.

[0064] Since the hierarchy of requirement items in the REQIF requirement model is variable, the object metamodel of the REQIF requirement model is not fixed. The object metamodel is defined according to the hierarchy of requirement items. For example, the object metamodel of the first-level requirement items is set to "REQU_0", and the object metamodel of the second-level requirement items is set to "REQU_1", etc. Each object metamodel contains some attributes, which are also variable because the attributes of requirement items in the REQIF requirement model are customizable, such as: "ID", "content", "description", "priority", "type", etc. There is only one relational metamodel, that is, the "decomposition" relationship between upper and lower level requirement items. By constructing the object metamodel and the relational metamodel, the metamodel library of the REQIF requirement model is formed. It supports subsequent model conversion. As in this case, it includes the "REQU_0" object metamodel, which includes an ID attribute and a description attribute, the "REQU_1" object metamodel, which includes an ID attribute and a description attribute, and the "decomposition" relationship metamodel. The beginning of the relationship metamodel is bound to the "REQU_0" object metamodel, and the end is bound to the "REQU_1" object metamodel.

[0065] Step S3: Construct a meta-model library for the conversion target model.

[0066] Because the transformation proposed in the present invention is a transformation at the metamodel level, it is necessary to build a metamodel library of the target model based on the multi-architecture modeling language KARMA, and the metamodel library contains six types of metamodels: graph, object, relationship, point, attribute, and role. The relationship between these six metamodels is: the graph metamodel includes the object metamodel and the relationship metamodel; the object metamodel includes the attribute metamodel and the point metamodel; the relationship metamodel includes the attribute metamodel, and the role metamodel is bound to both ends; the point metamodel exists in dependence on the object metamodel; the attribute metamodel is an attribute of the object metamodel and the relationship metamodel; the role metamodel is bound to both ends of the relationship metamodel. The role library provides a basis for the construction of the model, and users can build models by instantiating metamodels.

[0067] In this case, the meta-models include:

[0068] (1) Element model:

[0069] The diagram metamodel includes a use case diagram metamodel: the ID is "UseCase_Diagram", which is used to build a system use case analysis model; the configuration object metamodel includes: a use case object metamodel and a module object metamodel; the configuration relationship metamodel includes an association relationship metamodel; the configuration attribute metamodel includes: none; the configuration control flow relationship start end can be connected to the module object metamodel, and the configuration control flow relationship terminal can be connected to the use case object metamodel;

[0070] (2) Object metamodel: including use case object metamodel and module object metamodel;

[0071] Use case object metamodel: ID is "Block", configuration style is "circle", configuration attribute metamodel includes: name attribute metamodel, configuration color is "default";

[0072] Module object metamodel: ID is "Usecase", configuration style is "Rounded rectangle", configuration attribute metamodel includes: name attribute metamodel, configuration color is "Default";

[0073] (3) Relationship metamodel includes: Association relationship metamodel

[0074] Association metamodel: ID is "Connect", the starting end of the association is bound to the module object, the end of the association is bound to the use case object, and the configuration attribute metamodel includes: None, the configuration starting end role is the association starting end role metamodel, the configuration end is the association end role metamodel, and the configuration style is "bold straight line";

[0075] (4) Attribute metamodel: including name attribute metamodel

[0076] Name attribute metamodel, with ID "Name", is used to describe the name of the module object metamodel and the use case object metamodel. The attribute value type is configured as String type and the unit is configured as "None";

[0077] (5) Role metamodel: including the control flow start role metamodel and the association terminal role metamodel

[0078] Control flow start role metamodel: The ID is "Connect_start", which is used to bind the start of the association. The direction of the association start role metamodel is configured as "start" and the style is "arrow";

[0079] Associated terminal role metamodel: The ID is "Connect_end", which is used to bind the associated terminal. The direction of the control flow terminal role metamodel is configured as "terminal" and the style is "diamond".

[0080] Step S4: Configure the conversion process.

[0081] The conversion process in the present invention is a conversion at the metamodel level, so when configuring model conversion, the conversion is also performed on the metamodel. The conversion configuration consists of several rules, each of which contains three parts: conversion declaration, conversion source, and conversion target.

[0082] The conversion declaration configures the REQIF requirement model to be converted and the graphic element model type of the target model;

[0083] The conversion source configures the structure to be converted in the REQIF requirement model, where the structure is described by the metamodel and is divided into two modes: single element mode and simple mode. The single element mode refers to converting only a certain object metamodel, such as the "REQU_1" object metamodel; the simple mode refers to converting a binary chain relationship in which the conversion structure is n objects bound to n-1 relationships. For example, a conversion structure is: "REQU_0" object metamodel, "REQU_1" object metamodel, and "decomposition" relationship metamodel, where the beginning of the "decomposition" relationship metamodel is bound to the "REQU_0" object metamodel, and the end is bound to the "REQU_1" object metamodel;

[0084] The transformation target configures the structure and transformation rules in the target model. The transformation rules include the source metamodel and the target metamodel of the transformation, as well as the information transfer between them, such as the "XX" attribute value in the source metamodel is transferred to the "XX" attribute in the target metamodel. Let's take an example to simply explain the transformation target: the "Function" object metamodel in the target model is transformed from the "REQU_1" object metamodel, and the "Name" attribute value of the "Function" object metamodel comes from the "Description" attribute value of the "REQU_1" object metamodel.

[0085] In actual operation, users can write conversion rule scripts, each of which includes conversion declaration, conversion source, and conversion target. When executing conversion, the system parses the conversion rule script and performs matching and conversion.

[0086] In this case, if Figure 5 The figure shows the configuration conversion process. "architectureDriver Part", "createGraph[UseCase_Diagram]Part from Graph.Driving_Control_Logic_Analysis_Model;" represent the conversion declaration, "from Object[REQU_1]Obj1;", "in Model[Bre ak]FTA;" represent the conversion source, and "to Object[Usecase]usecase(Usecase<-Obj1; Usecase.localName<-Obj1.Property["name"].value;)" represents the conversion target.

[0087] like Figure 5As shown, "Use_Case_Diagram" in the conversion statement indicates the diagram metamodel type of the target model, and "Driving_Control_Logic_Analysis_Model" indicates the ID of the REQIF requirement model. "Object" in the conversion source indicates that the metamodel type is the object metamodel, "REQU_1" indicates the type of the object metamodel to be converted, and "Obj1" indicates the variable name of the object metamodel. "Usecase" in the conversion target indicates the object metamodel type in the target model, "usecase" indicates the variable name of the object metamodel, and "usecase.localName<-Obj1.Property["name"].value;" indicates that the ontology name of the "usecase" object metamodel in the target model is converted from the "name" property value of the "REQU_1" object metamodel.

[0088] Step S5: During conversion, the REQIF requirement model is parsed and object metamodel and relational metamodel instances are constructed.

[0089] Since the underlying data format of REQIF requirement model is XML, the dom4jAPI interface is used to parse the XML file based on Java programming language.

[0090] First, extract the information under the "SPEC-ATTRIBUTES" element in the XML file. This information is the name of all the attributes of the requirement items, which are used as the attributes of the object metamodel of the requirement items at each level; then extract the information under the "SPEC-OBJECTS" element in the XML file. This information is all the requirement item instances, and the requirement item levels have not been divided yet; then extract the "CHILDREN" information in the "SPECIFICATION" under the "SPECIFICATIONS" element in the XML file. This information describes the upper and lower hierarchical relationship between each requirement item instance. According to the upper and lower hierarchical relationship between all the obtained requirement items, the requirement item level N contained in the REQIF requirement model is sorted out, and the level of each requirement item is determined according to the "CHILDREN" information; then, based on the obtained requirement items and their related attribute values, and their levels, combined with the designed requirement item metamodel library, construct the requirement item objects (by instantiating the object metamodel) and store them in a linked list; finally, the relationship between the requirement items is instantiated according to the upper and lower hierarchical relationship between the requirement items obtained above, and the "decomposition" relationship metamodel is stored in the linked list.

[0091] like Figure 4The REQIF requirement model shown in the figure can be obtained by analyzing its upper and lower hierarchical structure. The requirement item with ID "REQ-3" is the object metamodel instance of "REQU_0", and the requirement items with IDs "REQ-3.1", "REQ-3.2", "REQ-3.3", and "REQ-3.4" are the object metamodel instances of "REQU_1", etc. According to the upper and lower hierarchical relationship of the requirement items, the object metamodel and relational metamodel linked list of the REQIF requirement model are obtained. The object metamodel linked list includes: [requirement1:{

[0092] ID:REQ-3,Name:Braking force,Description:The operator shall be able to change the desired braking force using the brake pedal. Fully pressing the pedal implies maximum braking force,Object Metamodel:REQU_0},requirement2:{ID:REQ-3.1,Name:Driving situation 1,Description:The brakes shall not be activated when the brake pedal is not pressed,Object Metamodel:REQU_1},requirement3:{ID:REQ-3.2,Name:Driving situation 2,Description:If the brake pedal is pressed and the wheel speed is greater than zero, the braking torque value applied to the wheel by the corresponding ABS component shall eventually be greater than zero,Object Metamodel:REQU _1},requirement4:{ID:REQ-3.3,Name:Driving Situation 3,Description:If the brake pedal is pressed, the actual speed of the vehicle is greater than 10km / h, and one wheel slips, the braking torque corresponding to the wheel is zero,Object Metamodel:REQU_1},requirement5:{ID:REQ-3.4,Name:Driving Situation 4,Description:If the brake pedal and the accelerator pedal are pressed at the same time, the actual vehicle speed will decrease,Object Metamodel:REQU_1}],Relation Metamodel Link List:

[0093] [{starting point: requirement1, ending point: requirement2, relational metamodel: “decomposition”}, {starting point: requirement1, ending point: requirement3, relational metamodel: “decomposition”}, {starting point: requirement1, ending point: requirement4, relational metamodel: “decomposition”}, {starting point: requirement1, ending point: requirement5, relational metamodel: “decomposition”}].

[0094] Step S6: Execute the conversion process.

[0095] The purpose of this step is to transform the element information in the REQIF demand model into the target model. It includes two parts: matching and transformation.

[0096] The matching part is to match the corresponding objects and relationship instances of the REQIF requirement model from the object metamodel linked list and the relationship metamodel linked list in step S3 according to the conversion structure declared in the conversion source, and ensure that each match is not repeated until the matching is completed.

[0097] For example, in this case, the object metamodel "REQU_1" in the REQIF requirement model is matched. Since there are 4 instances of this object metamodel in this case, it is matched 4 times, namely: requirement2:{ID:REQ-3.1, name: driving situation 1, description: the brake shall not be activated when the brake pedal is not pressed, object metamodel: REQU_1}; requirement3:{ID:REQ-3.2, name: driving situation 2, description: if the brake pedal is pressed and the wheel speed is greater than zero, the corresponding ABS component applies the brake to the wheel. The dynamic torque value should eventually be greater than 0, object metamodel: REQU_1}; requirement4:{ID:REQ-3.3, name: driving situation 3, description: if the brake pedal is pressed, the actual speed of the vehicle is greater than 10km / h, and one wheel slips, the braking torque corresponding to the wheel is zero, object metamodel: REQU_1}; requirement5:{ID:REQ-3.4, name: driving situation 4, description: if the brake pedal and the accelerator pedal are pressed at the same time, the actual vehicle speed will decrease, object metamodel: REQU_1}.

[0098] The conversion part is based on several object and relationship instances in the matching results, and according to the structure and conversion rules in the target model defined in the conversion target, the objects and relationship instances in the REQIF requirement model are converted into target metamodel instances, and the metamodel instance information, such as attributes, is transferred at the same time. The converted target metamodel instance is described based on the multi-architecture modeling language KARMA. After all the object and relationship instances in the matching results are converted, the target model is obtained.

[0099] In this case, because the previous step matched 4 times, this step is converted four times, namely: requirement2:{ID:REQ-3.1, Name: Driving situation 1, Description: Brake must not be activated when the brake pedal is not depressed, Object metamodel:REQU_1} is converted to the object metamodel instance of "Usecase", and the localName of this instance comes from the "Name" attribute value "Driving situation 1" of the requirement item;

[0100] requirement3:{ID:REQ-3.2, name: driving situation 2, description: if the brake pedal is pressed and the wheel speed is greater than zero, the braking torque value applied to the wheel by the corresponding ABS component should eventually be greater than 0, object metamodel:REQU_1} is converted to an object metamodel instance of "Usecase", the localName of which comes from the "name" attribute value "driving situation 2" of the requirement entry; requirement4:{

[0101] ID:REQ-3.3, Name: Driving Situation 3, Description: If the brake pedal is pressed, the actual speed of the vehicle is greater than 10km / h, and one wheel slips, the braking torque corresponding to the wheel is zero, object metamodel: REQU_1} is converted to an object metamodel instance of "Usecase", and the localName of the instance comes from the "name" attribute value "Driving Situation 3" of the requirement item; requirement5: {ID:REQ-3.4, Name: Driving Situation 4, Description: If the brake pedal and the accelerator pedal are pressed at the same time, the actual vehicle speed will decrease, object metamodel: REQU_1} is converted to an object metamodel instance of "Usecase", and the localName of the instance comes from the "name" attribute value "Driving Situation 4" of the requirement item.

[0102] like Figure 6 As shown, it is the conversion result of this case. It can be seen that all "REQ_1" object metamodel instances are converted into object metamodel instances with ID "Usecase", including "Driving Condition 1", "Driving Condition 2", "Driving Condition 3" and "Driving Condition 4".

[0103] The above specific embodiments only describe the design principle of the present invention. The shapes and names of the components in the description may be different and are not limited. Therefore, those skilled in the art in the field of the present invention may modify or replace the technical solutions recorded in the above embodiments; and these modifications and replacements do not deviate from the creative purpose and technical solutions of the present invention and should all fall within the protection scope of the present invention.

Claims

1. A method for supporting REQIF demand model conversion, characterized in that: include: Step 1: Design the metamodel of the REQIF requirement model. Its graph metamodel includes the object metamodel and the relational metamodel. The object metamodel is used to describe the hierarchy and attributes of the requirement items in the REQIF requirement model. The relational metamodel is used to describe the hierarchical relationship between the requirement items in the REQIF requirement model. Step 2: Build a metamodel library of the conversion target model, whose graph metamodel includes object metamodel and relational metamodel; Step 3: Configure the conversion process: The conversion configuration includes conversion declaration, conversion source, and conversion target. The conversion declaration configures the REQIF requirement model to be converted and the graph metamodel type of the target model. The conversion source configures the structure to be converted of the REQIF requirement model to be converted described by the metamodel, i.e., the source metamodel. The conversion target configures the structure of the conversion target model described by the metamodel, i.e., the target metamodel, and the conversion rules. The conversion rules include the source metamodel and the target metamodel of the conversion, as well as the information transfer between them. Step 4: Parse the REQIF demand model to be converted, obtain the demand items, levels and attributes in the REQIF demand model to be converted, combine the REQIF demand model metamodel, and obtain object instances and relationship instances through instantiation; Step 5: Execute the conversion process: match the object instances and relationship instances of the REQIF requirement model to be converted according to the structure to be converted declared by the conversion source; convert the object instances and relationship instances in the REQIF requirement model into target metamodel instances according to the structure and conversion rules in the conversion target model defined by the conversion target, and transfer the metamodel instance information at the same time.

2. The method according to claim 1, characterized in that In step 4, the REQIF demand model to be converted is parsed to obtain the demand items, levels and attributes in the REQIF demand model to be converted: Use the dom4j API interface to parse the REQIF requirement model in the XML data format; Extract the information under the "SPEC-ATTRIBUTES" element in the XML file. This information is the name of all the attributes of the requirement items and is used as the attributes of the object metamodel of the requirement items at each level. Extract the information under the "SPEC-OBJECTS" element in the XML file. This information is all the requirement item instances, and the requirement item hierarchy has not yet been divided; Extract the "CHILDREN" information in the "SPECIFICATION" under the "SPECIFICATIONS" element in the XML file. This information describes the hierarchical relationship between each requirement item instance. According to the hierarchical relationship between all the obtained requirement items, the requirement item level N contained in the REQIF requirement model is obtained. At the same time, the level of each requirement item is determined according to the "CHILDREN" information.

3. The method according to claim 1, characterized in that After the object instance and the relationship instance are obtained in step 4, they are further stored in a linked list to obtain an object metamodel linked list and a relationship metamodel linked list; The step 5 matches the object instance and the relationship instance of the REQIF requirement model to be converted in the object metamodel linked list and the relationship metamodel linked list according to the structure to be converted declared by the conversion source.

4. The method according to claim 1, characterized in that In step 2, the metamodel library of the conversion target model is constructed based on the multi-architecture modeling language KARMA; The graph metamodel of the conversion target model includes object metamodel and relational metamodel; The object metamodel includes module object metamodel and configuration name attribute metamodel; The relationship metamodel includes the association relationship metamodel, the association relationship start-end binding module object metamodel, and the association relationship terminal binding use case object metamodel; the configuration start-end role is the association start-end role metamodel, and the configuration terminal is the association terminal role metamodel.

5. The method according to claim 1, characterized in that The structure to be converted in the configuration of the conversion source is described by a metamodel, which is divided into two modes: a single element mode and a simple mode; The single element mode means that only one object metamodel is converted; The simple pattern represents the transformation structure as a binary chain relationship of n objects bound by n-1 relationships.

6. A device supporting REQIF demand model conversion, characterized in that: The device includes a REQIF demand model building module, a metamodel building module, and a model conversion module; the model conversion module includes a REQIF demand model parsing module, a model conversion configuration module, and a model conversion execution module; The REQIF demand model building module is used to build the REQIF demand model to be converted; The metamodel library construction unit is used to construct the metamodel of the REQIF demand model, and its graphic metamodel includes an object metamodel and a relationship metamodel. The object metamodel is used to describe the hierarchy and attributes of the demand items in the REQIF demand model, and the relationship metamodel is used to describe the superior-subordinate relationship of the demand items in the REQIF demand model. The metamodel library construction unit is also used to construct the metamodel library of the conversion target model, and its graphic metamodel includes an object metamodel and a relationship metamodel; The model conversion configuration module is used to configure the conversion process. The conversion configuration includes a conversion statement, a conversion source, and a conversion target. The conversion statement configures the REQIF demand model to be converted and the graph metamodel type of the target model. The conversion source configures the structure to be converted described by the metamodel in the REQIF demand model to be converted. The conversion target configures the structure in the conversion target model and the conversion rules. The conversion rules include the source metamodel and the target metamodel of the conversion, and the information transfer between them. The REQIF requirement model parsing module is used to parse the REQIF requirement model to be converted, obtain the requirement items, levels and attributes in the REQIF requirement model to be converted, and obtain object instances and relationship instances through instantiation in combination with the REQIF requirement model metamodel; The model conversion execution module is used to match the object instances and relationship instances of the REQIF requirement model to be converted according to the structure to be converted declared by the conversion source; according to the structure and conversion rules in the conversion target model defined by the conversion target, the object instances and relationship instances in the REQIF requirement model are converted into target metamodel instances, and the metamodel instance information is transmitted at the same time.

7. The device according to claim 6, characterized in that The REQIF requirement model parsing module uses the dom4j API interface to parse the REQIF requirement model in the XML data format, specifically including: Extract the information under the "SPEC-ATTRIBUTES" element in the XML file. This information is the name of all the attributes of the requirement items and is used as the attributes of the object metamodel of the requirement items at each level. Extract the information under the "SPEC-OBJECTS" element in the XML file. This information is all the requirement item instances, and the requirement item hierarchy has not yet been divided; Extract the "CHILDREN" information in the "SPECIFICATION" under the "SPECIFICATIONS" element in the XML file. This information describes the hierarchical relationship between each requirement item instance. According to the hierarchical relationship between all the obtained requirement items, the requirement item level N contained in the REQIF requirement model is obtained. At the same time, the level of each requirement item is determined according to the "CHILDREN" information. In combination with the REQIF requirement model metamodel, object instances and relationship instances are obtained through instantiation.

8. The device according to claim 6, characterized in that After obtaining the object instance and the relationship instance, the REQIF requirement model parsing module further stores them in a linked list to obtain an object metamodel linked list and a relationship metamodel linked list.

9. The device according to claim 6, characterized in that The meta-model library construction unit constructs the meta-model library of the conversion target model based on the multi-architecture modeling language KARMA; The graph metamodel of the conversion target model includes object metamodel and relational metamodel; The object metamodel includes module object metamodel and configuration name attribute metamodel; The relationship metamodel includes the association relationship metamodel, the association relationship start-end binding module object metamodel, and the association relationship terminal binding use case object metamodel; the configuration start-end role is the association start-end role metamodel, and the configuration terminal is the association terminal role metamodel.

10. The device according to claim 6, characterized in that The structure to be converted in the conversion source configured by the model conversion configuration module is described by a metamodel and is divided into two modes: a single element mode and a simple mode; the single element mode means that only a certain object metamodel is converted; the simple mode means that the conversion structure is a binary chain relationship in which n objects are bound by n-1 relationships.

Citation Information

Patent Citations

  • Heterogeneous model conversion method and device, electronic equipment and storage medium

    CN118070536A

Cited By

  • Automatic management method for information model

    WO2026194481A1