A method and device for extracting feature model from SysML architecture model

By extracting features and implementing the mapping relationship of elements from the SysML architecture model, and using technical means such as partition recognition algorithms to automatically build and search the optimal feature model, the time-consuming and inaccurate problems of manually extracting feature models in complex system product line projects are solved, and efficient and accurate feature model construction and evaluation are achieved.

CN119577421BActive Publication Date: 2025-06-06ZHEJIANG UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510130593.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-06
Publication Date
2025-06-06
Estimated Expiration
2045-02-06

AI Technical Summary

Technical Problem

In complex system product line engineering, manual feature extraction models are time-consuming and error-prone. The existing technology lacks automation tools and objective evaluation standards, making it difficult to fully capture product line variability.

Method used

By extracting features and implementing the mapping relationship of elements from the SysML architectural model, the optimal feature model is automatically constructed and searched using partition recognition algorithms, heuristic algorithms, formal concept analysis methods and non-dominant sorting genetic algorithms.

Benefits of technology

It realizes the automated extraction of feature models, improves construction efficiency and accuracy, shortens product development cycle, enhances product market competitiveness, and provides objective evaluation standards.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119577421B_ABST
    Figure CN119577421B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for extracting a feature model from a SysML architecture model, belonging to the technical field of model-based product line engineering, the method comprising: parsing a SysML model variant to obtain a number of elements, organizing the elements into different partitions by a partition recognition algorithm; constructing a feature list based on optional features in the variant, mapping the partition to the features in the feature list by a heuristic algorithm, and establishing a mapping relationship between the partition and the feature; constructing a concept lattice by a formal concept analysis method with variants as objects and features as attributes to establish a constraint relationship between features; based on the features and constraint relationships, a non-dominated sorting genetic algorithm is used to search for feature models, and a set of feature models with optimal fitness is obtained. The present invention can improve the efficiency and accuracy of feature model construction, is particularly suitable for system engineering applications for complex system design, helps to shorten the product development cycle, and enhances the market competitiveness of products.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of model-based product line engineering, and in particular relates to a method and device for extracting a feature model from a SysML architecture model. Background Art

[0002] In the field of model-based product line engineering, feature models play a pivotal role. They are not only the core reusable assets in the design and development of product series, but also the bridge between product commonality and variability. Feature models provide architects with a powerful tool to explore and express the diverse features of product lines without going into the specific hardware or software implementation details in an abstract way, which promotes the rapid iteration and flexible customization of product lines, enabling enterprises to quickly respond to market demands and launch customized products that meet the needs of different user groups.

[0003] However, with the in-depth development of modern system engineering practice, system models are becoming more and more complex. For example, highly complex large systems such as aircraft systems and automobile systems not only contain a large number of components and subsystems, but also the interaction logic between components is intricate, resulting in more and more diverse product variability. Finding a feature model for a set of product collections often has a very large solution space. However, extracting the best feature model from a set of product collections in a complex system faces the following challenges.

[0004] First, there are a huge number of variants in complex systems, and they have complex features of different types. Due to the large number of feature combinations, the diversity and hierarchy of the features make the constraints between the features unclear. Manually extracting feature models requires engineers to have not only deep domain knowledge, but also the ability to accurately identify and understand all possible feature combinations and their mutual constraints. This process is not only very time-consuming, but also very easy to cause omissions or errors in identification due to human factors, which in turn affects the accuracy and efficiency of subsequent product design.

[0005] Secondly, in the field of software product lines, some studies have been devoted to extracting reusable assets from variants of product lines, but most of these studies focus on variant analysis at the source code level, while paying less attention to higher-level variant forms such as design models and system architectures. As a key link between requirements analysis and specific implementation, the variant information contained in the design model is crucial for building a comprehensive and accurate feature model. If the variant analysis at this level is ignored, the feature model's ability to fully capture the variability of the product line will be weakened.

[0006] Furthermore, the evaluation and selection of feature models is also an urgent problem to be solved. At present, the quality of feature models often depends on the subjective judgment of domain experts, and there is a lack of a unified and objective evaluation standard. In the case of a large number of candidate feature models, relying solely on the experience of domain experts for evaluation is not only inefficient, but may also lead to inconsistent and one-sided evaluation results due to personal preferences or cognitive differences. Therefore, establishing a scientific and comprehensive feature model evaluation system is of great significance to improving the quality and efficiency of product line engineering.

[0007] In summary, there is a need to further develop automated feature model extraction tools, which are expected to better cope with the challenges of complex system product line engineering and promote product innovation and technological progress in the future. Summary of the invention

[0008] In view of the above, the purpose of the present invention is to provide a method and device for extracting a feature model from a SysML architecture model, so as to automatically extract features from the SysML model and realize the mapping relationship between elements and discover the constraint relationship between features from the model, and finally use a multi-objective genetic algorithm to search for a set of optimal feature models. The method is particularly suitable for system engineering applications in a wide range of scenarios such as automotive systems, aircraft systems and other complex system designs, which can not only improve the efficiency and accuracy of feature model construction, but also help shorten the product development cycle and enhance the market competitiveness of products.

[0009] In order to achieve the above-mentioned invention object, the technical solution provided by the present invention is as follows:

[0010] In a first aspect, an embodiment of the present invention provides a method for extracting a feature model from a SysML architecture model, comprising the following steps:

[0011] The SysML model is used as a variant, and the variant is parsed to obtain several elements, and the elements are organized into different partitions through the partition identification algorithm;

[0012] Building a feature list based on the optional features in the variant, mapping the partitions to the features in the feature list through a heuristic algorithm, and establishing a mapping relationship between the partitions and the features;

[0013] Based on the mapping relationship between the constructed partitions and features, a concept lattice is constructed through formal concept analysis, taking variants as objects and features as attributes to establish the constraint relationship between features.

[0014] Based on the characteristics and constraint relationships, a non-dominated sorting genetic algorithm is used to search for feature models, and a group of feature models with the best fitness are obtained for users to choose.

[0015] Preferably, the SysML model is used as a variant, the variant is parsed to obtain a plurality of elements, and the elements are organized into different partitions by a partition identification algorithm, including:

[0016] Each SysML model entered as a variant , all variants are constructed as a variant set ALLV , decompose each variant into a set of primitives through a parser, each primitive represents a specific model element;

[0017] Use the partition-aware algorithm to partition all elements, for the following conditions:

[0018] Condition 1: ,

[0019] Condition 2: ,

[0020] in, and Representation variant Any two elements in Indicates and, Indicates an equivalence relationship that is derived from each other. If an element satisfies any of the above conditions, it is represented as an element with a mutual dependence relationship and the elements are divided into the same partition. If none of the above conditions are met, it is represented as an element without a mutual dependence relationship and the elements are divided into different partitions. Each partition finally formed is a set of multiple elements, and each element belongs to at least one partition.

[0021] Preferably, the formal representation of the primitives parsed from the SysML model is:

[0022] [Atomic_Element_Type]Name Additional_Information,

[0023] in, Atomic_Element_Type Indicates the element type ,Name Includes SysML model name and element name, Additional_Informatio n indicates optional additional information.

[0024] Preferably, mapping the partitions to the features in the feature list by using a heuristic algorithm to establish a mapping relationship between the partitions and the features includes:

[0025] Input features are given in the feature list. For each feature and partition, a mapping between partition and feature is created through confidence to characterize the mapping relationship between partition and feature. The confidence calculation formula is:

[0026] ,

[0027] in, Indicates Features and Partitions The confidence level between Representation characteristics or partition The cardinality of the set of elements in .

[0028] Preferably, the formal concept analysis method is used to construct a concept lattice with variants as objects and features as attributes to establish constraint relationships between features, including:

[0029] Through the formal concept analysis method, the input variants are taken as objects, the features are taken as attributes, and the positional relationship of the features is used to create association relationships. A formal background represented by a triple containing objects, attributes and association relationships is constructed, and the formal background is visualized as a concept lattice.

[0030] Through the concept lattice, two constraint relationships, namely, the need relationship and the exclusion relationship, are defined. For any two concepts in the concept lattice, and , if the following conditions are met, it means that there is a need relationship between two features:

[0031] ,

[0032] in, and Indicates variants, and Indicates characteristics, Indicates and, express and There is a need relationship between the two features; if the above conditions are not met, it means that the two features are not implemented in the same variant, then the two features have an exclusion relationship.

[0033] Preferably, the feature model search using a non-dominated sorting genetic algorithm includes:

[0034] The starting point of the non-dominated sorting genetic algorithm is an initial population consisting of randomly generated feature models and constraints. The initial population is quickly non-dominated sorted, and then the candidate feature models participating in crossover and mutation are selected through the standard tournament algorithm.

[0035] The parent population and the child population in the candidate feature model are merged, and the next generation population is generated through competition. Then, a fast non-dominated sort is performed, and the crowding degree is calculated to generate a new child population. A new round of selection, crossover, and mutation is continued, and it is iterated multiple times until the stopping condition is met.

[0036] Preferably, the precision and recall rate are used as fitness values ​​to obtain a set of feature models with the best fitness. The user selects the required feature model based on the precision and recall rate, where the calculation formula of the precision is:

[0037] ,

[0038] in, represents the precision calculation function, represents the input feature list, Represents a feature model set consisting of a set of feature models with the best fitness; Represents an auxiliary function that returns a set of feature lists represented by a feature model set; represents the ratio of the feature list set pointed to by the generated feature model to the feature list set belonging to the input through the accuracy index;

[0039] The calculation formula for recall is:

[0040] ,

[0041] in, Represents the recall calculation function, which uses the recall indicator to represent the proportion of the required input feature list set that is correctly represented by the generated feature model.

[0042] In a second aspect, to achieve the above-mentioned purpose of the invention, an embodiment of the present invention further provides a device for extracting a feature model from a SysML architecture model, which is implemented by adopting the above-mentioned method of extracting a feature model from a SysML architecture model, and includes: a parsing partitioning module, a feature positioning module, a constraint identification module and a model generation module;

[0043] The parsing partitioning module is used to take the SysML model as a variant, parse the variant to obtain a number of elements, and organize the elements into different partitions through a partition identification algorithm;

[0044] The feature location module is used to construct a feature list based on the optional features in the variant, map the partitions to the features in the feature list through a heuristic algorithm, and establish a mapping relationship between the partitions and the features;

[0045] The constraint identification module is used to construct a concept lattice based on the mapping relationship between the constructed partitions and features through a formal concept analysis method, taking variants as objects and features as attributes to establish a constraint relationship between features;

[0046] The model generation module is used to search for feature models based on features and constraint relationships using a non-dominated sorting genetic algorithm to obtain a set of feature models with the best fitness for users to choose.

[0047] In a third aspect, in order to achieve the above-mentioned purpose of the invention, an embodiment of the present invention further provides an electronic device, comprising a memory and one or more processors, wherein the memory is used to store a computer program, and the processor is used to implement the above-mentioned method of extracting a feature model from a SysML architecture model when executing the computer program.

[0048] In a fourth aspect, in order to achieve the above-mentioned purpose of the invention, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a computer, the above-mentioned method of extracting a feature model from a SysML architecture model is implemented.

[0049] Compared with the prior art, the present invention has the following beneficial effects:

[0050] The present invention provides an automated feature model extraction tool by constructing a bottom-up method for extracting feature models from SysML architecture models through reverse engineering to reduce the burden of manual operations. It also supports multi-variant input, expands the scope of variant analysis, and takes higher-level variant forms such as design models into consideration. In addition, a standardized framework for feature model evaluation is constructed, using precision and recall as evaluation criteria to ensure the objectivity and accuracy of the evaluation results, allowing engineers to conduct trade-off studies. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0052] Figure 1 It is a flowchart of a method for extracting a feature model from a SysML architecture model provided by an embodiment of the present invention;

[0053] Figure 2 It is a schematic diagram of the mapping between SysML element types and primitive types provided by an embodiment of the present invention;

[0054] Figure 3 is an example diagram of building partitions through a partition identification algorithm provided by an embodiment of the present invention;

[0055] Figure 4 is an example diagram of constructing a confidence map by a heuristic algorithm provided by an embodiment of the present invention;

[0056] Figure 5 is an example diagram of a conceptual grid diagram provided by an embodiment of the present invention;

[0057] Figure 6 It is a flowchart of the NSGA-II algorithm provided by an embodiment of the present invention;

[0058] Figure 7 is an example diagram of the result of generating a feature model provided by an embodiment of the present invention;

[0059] Figure 8 It is a schematic diagram of the structure of an apparatus for extracting a feature model from a SysML architecture model provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0060] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific implementation methods described herein are only used to explain the present invention and do not limit the scope of protection of the present invention.

[0061] The inventive concept of the present invention is: in view of the problems faced by feature model extraction in the prior art, such as manual time-consuming, limited variant forms and lack of objective evaluation standards, the embodiments of the present invention provide a method and device for extracting feature models from a SysML architecture model, by decomposing multiple input SysML model variants into multiple element partitions, mapping features to specific implementation elements on the basis of the element partitions, and then using formal concept analysis technology to discover the constraint relationship between features, and finally using a multi-objective based genetic algorithm to search for the optimal feature model, thereby realizing the bottom-up automatic generation of feature models from the SysML architecture model, which is suitable for feature model extraction and application in complex system product line engineering.

[0062] Figure 1 FIG. 1 is a flow chart of a method for extracting a feature model from a SysML architecture model provided by an embodiment of the present invention. Figure 1 As shown, the embodiment provides a method for extracting a feature model from a SysML architecture model, and takes an automobile design model as an example to illustrate the implementation process, including the following steps:

[0063] S1, taking the SysML model as a variant, parsing the variant to obtain several elements, and organizing the elements into different partitions through the partition identification algorithm.

[0064] S1.1, Decompose the SysML model into primitives.

[0065] SysML models are usually stored in XML metadata interchange (XMI) format. SysML language itself is constructed by lightweight extension based on UML language. Since features are externally visible characteristics and the model contains a large number of irrelevant model elements that affect the accuracy of feature recognition, it is necessary to first extract core model elements from SysML model. In the embodiment, first focus on the elements that are interrelated with the composition structure of the product and the relationship between the elements, and regard other elements as noise (such as operation and reception).

[0066] In the embodiment, Figure 2 As shown in the figure, it is the mapping between SysML element types (taking the Block Definition Diagram as an example) and primitive types (taking the Block Definition Diagram implementation as an example). The Block Definition Diagram includes elements and relationships, where elements include blocks and attributes (such as value attributes, constraint attributes, etc.), and relationships include generalization and composition. The Block Definition Diagram implementation also includes elements and relationships, where elements include block implementation, value implementation, constraint implementation, etc., and relationships include derived implementation and composed implementation. The dotted line with an arrow indicates the mapping relationship. For example, the block (Block) of the element in the Block Definition Diagram is mapped to the block implementation (BlockImpl) of the element in the Block Definition Diagram implementation, and the generalization relationship is mapped to the derived implementation (GeneralizationImpl).

[0067] Each extracted model element is formally represented using the following primitives:

[0068] [Atomic_Element_Type]Name Additional_Information,

[0069] in, Atomic_Element_Type Indicates the element type; Name Includes SysML model name and element name; Additional_Informatio n indicates additional information, which is not mandatory and is used when the name cannot provide enough information about the element, such as the value attribute type or multiplicity of a Block.

[0070] S1.2, perform partition identification according to a partition identification algorithm.

[0071] After parsing the variant set using the parser, each variant is automatically abstracted into a set of element fragments. Partition recognition is based on elements. By using the partition recognition algorithm, the elements are recognized into element partitions, which are sets of elements. Partition recognition is a necessary initial step before feature recognition, which can increase the granularity of feature recognition without having to reason at the element granularity.

[0072] In the embodiment, given a set of variants to be compared ALLV, two elements and are interdependent if and only if they belong to the same variant Therefore, if the following two conditions are met, and are interdependent:

[0073] Condition 1: ,

[0074] Condition 2: ,

[0075] in, and Representation variant Any two elements in Indicates and, Indicates an equivalence relationship that is derived from each other. If an element meets any of the above conditions, it is considered to be an element with a mutual dependency relationship and is divided into the same partition. If none of the above conditions are met, it is considered to be an element with no mutual dependency relationship and is divided into different partitions. Based on partition identification, partitions can be merged or renamed.

[0076] Therefore, the definition of a partition can be expressed as: given a set of variants ALLV , variants The partitions of are elements that conform to the interdependent relationship. Each partition formed in the end is a set of multiple elements, and each element belongs to at least one partition. Figure 3 , illustrates an example of a partition constructed by the partition identification algorithm of this section: each of the n variants is represented as an ellipse, the diamonds are the elements within these variants, and when elements from different variants are similar, a similarity measure between the elements is established, so the intersection between them can be calculated. Each of these separated intersections will be a partition, for example, partition 0 is the grouping of elements shared by all variants.

[0077] In the embodiment, multiple SysML models are supported for input, each SysML model is called a variant. The embodiment includes a variant set consisting of 60 different variants of vehicle systems. The parsed elements can represent doors, tires, windows, engines, transmissions, chassis, etc. of a car, and partitions can represent engine system partitions, body system partitions, transmission system partitions, etc.

[0078] S2, builds a feature list based on the optional features in the variant, maps the partitions to the features in the feature list through a heuristic algorithm, and establishes a mapping relationship between the partitions and the features.

[0079] After partition identification, some partitions directly associated with features are obtained, and feature identification is then performed. In the prior art, this is often manually implemented by domain experts to merge or split partitions, or to modify a more representative name for the partition. In the embodiment of the present invention, the feature list is used as a part of the input variant, which means that the features are known, so there is no need for domain experts to manually map them. Instead, feature location reasoning is performed on the identified element partitions and feature lists, and the partitions are mapped to features. These features represent optional functions in the variant, etc. By constructing a good mapping relationship, engineers can generate more new model variants from feature models and apply them to system engineering design.

[0080] In the embodiment, a feature list with a given feature is input through a heuristic algorithm for feature location, and the relevant partition of the feature is a partition that always exists when the feature exists. For each feature and partition, a mapping between the partition and the feature is created through confidence to characterize the mapping relationship between the partition and the feature, and the confidence is a standardized continuous value between 0 and 1. If the confidence is 1, it means that it is almost certain that the elements in the partition realize the feature, indicating that when the feature appears, the partition always appears, and the partition is mapped to the feature.

[0081] The confidence calculation formula is:

[0082] ,

[0083] in, Indicates Features and Partitions The confidence level between Representation characteristics or partition The cardinality of the set of elements in .

[0084] like Figure 4 As shown, for feature 1, the confidence of partition 1 is 1, which means that partition 1 always appears when feature 1 exists.

[0085] S3, based on the mapping relationship between the constructed partitions and features, through the formal concept analysis method, with variants as objects and features as attributes, a concept lattice is constructed to establish the constraint relationship between features.

[0086] The features identified in the previous steps do not exist in isolation, but have complex and diverse dependencies. These dependencies will affect the construction of the feature model. Therefore, it is necessary to first discover the constraint relationship between the features, that is, the constraints require (A B) and exclusion constraints excludes(¬(A∧B)), which respectively indicate that the realization of a feature A requires another feature B, or that a feature A and another feature B are mutually exclusive. Among them, in the exclusion constraint, the symbol A∧B indicates that A and B appear together, and the symbol ¬(A∧B) indicates that A and B do not appear together.

[0087] In the embodiment, the input variants are taken as objects and constructed into object sets, the features are taken as attributes and constructed into attribute sets, and the positional relationship of the features (i.e., the features contained in each variant) is used to create association relationships, and a formal background represented in the form of a triple containing objects, attributes, and association relationships is constructed, and the formal background is visualized as a concept lattice. The concept lattice defines two constraint relationships, the required relationship and the excluded relationship. For any two concepts in the concept lattice, and , if the following conditions are met, it means that there is a need relationship between two features:

[0088] ,

[0089] in, and Indicates variants, and Indicates characteristics, Indicates and, express and There is a needs relationship between the two features in .

[0090] The exclusion relationship means that two features will not be implemented in the same variant. For the convenience of explanation, the concept lattice is visualized as a directed line graph, such as Figure 5 As shown, the path from the root node to the leaf node in the concept lattice is extracted. If two features do not appear simultaneously in each path, then there is an exclusion relationship between the two features.

[0091] Figure 5 Each box in represents a concept, and the arrow direction of the directed edge indicates the direction from the subconcept to the superconcept. The first row in the box is the attribute set of the concept, and the second row shows the object set. For example, if there is a superconcept to subconcept relationship between feature 1 and feature 4, it means that feature 4 requires feature 1, and the two are required constraints. At the same time, check the path from the root node to the leaf node. For example, if feature 4 and feature 5 do not appear at the same time in each path, feature 4 excludes feature 5, and the two are exclusion constraints.

[0092] S4, based on the characteristics and constraint relationships, a non-dominated sorting genetic algorithm is used to search for feature models, and a set of feature models with the best fitness are obtained for users to choose.

[0093] In the field of Model-Based Product Line Engineering (MBPLE), engineers use feature models to represent the commonality and variability between products. Feature models are the de facto standard for describing the variability of product lines and modeling different combinations of required features. Features are connected to other features through directed arcs. All features are combined into a tree structure, and each feature is a node in the tree structure. Each tree has one and only one root node. The root feature represents a part of all valid products in the entire product line. Other feature types are mandatory, optional, and replaceable.

[0094] In the embodiment, a feature list and constraint relationships are input, and a multi-objective evolutionary algorithm (NSGA-II algorithm) is used to search for a feature model that best represents the input feature set. Figure 6 As shown, the starting point of the NSGA-II algorithm is an initial population composed of randomly generated feature models and constraints, and the initial population is quickly non-dominated sorted, and then the candidate feature models participating in crossover and mutation are selected through the standard tournament algorithm. The parent population and the child population in the candidate feature model are merged, and the next generation population is generated through competition, and then a fast non-dominated sort is performed, and the congestion is calculated to generate a new child population, and a new round of selection, crossover, and mutation is continued, and iterated multiple times until the stopping condition is met. In the embodiment, the stopping criterion is that the maximum number of fitness evaluations is 2000 times.

[0095] Taking precision and recall as fitness values, we get a set of feature models with the best fitness values. Users select the required feature model based on precision and recall. The values ​​of the two fitness functions are kept between 0 and 1. The ideal solution indicators are precision = 1 and recall = 1. The goal is to maximize the values ​​of the two function indicators.

[0096] The calculation formula for accuracy is:

[0097] ,

[0098] in, represents the precision calculation function, represents the input feature list, Represents a feature model set consisting of a set of feature models with the best fitness; Represents an auxiliary function that returns a set of feature lists represented by a feature model set; the accuracy index represents the ratio of the feature list set pointed to by the generated feature model to the feature list set belonging to the input.

[0099] The calculation formula for recall is:

[0100] ,

[0101] in, Represents the recall calculation function, which uses the recall indicator to represent the proportion of the required input feature list set that is correctly represented by the generated feature model.

[0102] Finally, the algorithm search produced several optimal feature models, such as Figure 7 The following are some examples of feature models. The text in each box represents a feature. Figure 7 The precision of the feature model shown in (1) is 1.0, indicating that all feature combinations represented by the feature model are included in the input feature list, but it lacks the required feature combination, so the recall rate is only 0.77. Figure 7 The recall rate of the feature model shown in (2) is 1.0, which means that the feature model can represent all feature combinations in the input feature list, but the number of combinations that can be represented exceeds the required feature combinations, so the precision is not 1, but only 0.71. Figure 7 The precision and recall of the feature model shown in (3) in do not reach the optimal value, but the recall rate is better than Figure 7 The feature model shown in (1) is more accurate than Figure 7 The feature model shown in (2) in Figure 1. Engineers can choose the most appropriate feature model according to their needs. In this process, the advantages of the multi-objective algorithm are also revealed.

[0103] In summary, the method for extracting a feature model from a SysML architecture model provided by an embodiment of the present invention provides an automated feature model extraction tool, which reduces the burden of manual operation. At the same time, the scope of variant analysis is expanded to take higher-level variant forms such as design models into consideration. In addition, by using precision and recall as evaluation criteria, the objectivity and accuracy of the evaluation results are ensured, allowing engineers to conduct trade-off studies, thereby better coping with the challenges of complex system product line engineering, and is expected to further promote product innovation and technological progress.

[0104] Based on the same inventive concept, Figure 8 As shown, an embodiment of the present invention further provides an apparatus 800 for extracting a feature model from a SysML architecture model, comprising: a parsing and partitioning module 810 , a feature positioning module 820 , a constraint identification module 830 and a model generation module 840 .

[0105] The parsing and partitioning module 810 is used to take the SysML model as a variant, parse the variant to obtain a number of elements, and organize the elements into different partitions through a partition identification algorithm.

[0106] The feature location module 820 is used to construct a feature list based on the optional features in the variant, map the partitions to the features in the feature list through a heuristic algorithm, and establish a mapping relationship between the partitions and the features.

[0107] The constraint identification module 830 is used to construct a concept lattice based on the mapping relationship between the constructed partitions and features through formal concept analysis, with variants as objects and features as attributes to establish constraint relationships between features.

[0108] The model generation module 840 is used to search for feature models based on features and constraint relationships using a non-dominated sorting genetic algorithm to obtain a set of feature models with optimal fitness for users to choose.

[0109] Based on the same inventive concept, an embodiment of the present invention further provides an electronic device, including a memory and one or more processors, the memory is used to store a computer program, and the processor is used to implement the above-mentioned method of extracting a feature model from a SysML architecture model when executing the computer program.

[0110] Based on the same inventive concept, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a computer, the above-mentioned method of extracting a feature model from a SysML architecture model is implemented.

[0111] It should be noted that the apparatus, electronic device, and computer-readable storage medium for extracting a feature model from a SysML architecture model provided in the above embodiments all belong to the same inventive concept as the method for extracting a feature model from a SysML architecture model. The specific implementation process is detailed in the embodiment of the method for extracting a feature model from a SysML architecture model, which will not be repeated here.

[0112] The specific implementation methods described above provide a detailed description of the technical solutions and beneficial effects of the present invention. It should be understood that the above is only the most preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, supplements and equivalent substitutions made within the scope of the principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for extracting a feature model from a SysML architecture model, characterized in that: The following steps are involved: The SysML model in the automotive system design is used as a variant, and the variant is parsed to obtain several elements. The elements are organized into different partitions through the partition recognition algorithm, including: taking each input SysML model as a variant , all variants are constructed as a variant set ALLV , a variant set consisting of 60 different variants of vehicle systems, each variant is decomposed into a set of primitives through a parser, each primitive represents a specific model element, the parsed elements represent the car's doors, tires, windows, engine, transmission, chassis, and all elements are partitioned using a partition recognition algorithm. The partitions represent engine system partitions, body system partitions, and transmission system partitions. For the following conditions: Condition 1: , Condition 2: , in, and Representation variant Any two elements in Indicates and, Indicates an equivalence relationship that is derived from each other. If an element satisfies any of the above conditions, it is represented as an element with a mutual dependence relationship and the elements are divided into the same partition. If none of the above conditions are met, it is represented as an element without a mutual dependence relationship and the elements are divided into different partitions. Each partition finally formed is a set of multiple elements, and each element belongs to at least one partition. Building a feature list based on the optional features in the variant, mapping the partitions to the features in the feature list through a heuristic algorithm, and establishing a mapping relationship between the partitions and the features; Based on the mapping relationship between the constructed partitions and features, a concept lattice is constructed through formal concept analysis, taking variants as objects and features as attributes to establish the constraint relationship between features. In the field of model-based product line engineering, feature models are used to represent the commonality and variability between products. Feature models are the de facto standard for describing the variability of product lines and modeling different combinations of required features. Features are connected to other features through directed arcs. All features are combined into a tree structure, and each feature is a node in the tree structure. Based on the features and constraints, a non-dominated sorting genetic algorithm is used to search for feature models. Precision and recall are used as fitness values. The precision index is used to represent the proportion of the feature list set pointed to by the generated feature model to the feature list set belonging to the input. The recall index is used to represent the proportion of the required input feature list set correctly represented by the generated feature model. A set of feature models with the best fitness are obtained for users to choose from, so as to improve the efficiency and accuracy of feature model construction and shorten the product development cycle.

2. The method for extracting a feature model from a SysML architecture model according to claim 1, characterized in that: The formal representation of the primitives parsed from the SysML model is: [Atomic_Element_Type]Name Additional_Information, in, Atomic_Element_Type Indicates the element type ,Name Includes SysML model name and element name, Additional_Informatio n indicates optional additional information.

3. The method for extracting a feature model from a SysML architecture model according to claim 1, characterized in that: The step of mapping the partitions to the features in the feature list by using a heuristic algorithm and establishing a mapping relationship between the partitions and the features includes: Input features are given in the feature list. For each feature and partition, a mapping between partition and feature is created through confidence to characterize the mapping relationship between partition and feature. The confidence calculation formula is: , in, Indicates Features and Partitions The confidence level between Representation characteristics or partition The cardinality of the set of elements in .

4. The method for extracting a feature model from a SysML architecture model according to claim 1, characterized in that: The formal concept analysis method is used to construct a concept lattice with variants as objects and features as attributes to establish constraint relationships between features, including: Through the formal concept analysis method, the input variants are taken as objects, the features are taken as attributes, and the positional relationship of the features is used to create association relationships. A formal background represented by a triple containing objects, attributes and association relationships is constructed, and the formal background is visualized as a concept lattice. Through the concept lattice, two constraint relationships, namely, the need relationship and the exclusion relationship, are defined. For any two concepts in the concept lattice, and , if the following conditions are met, it means that there is a need relationship between two features: , in, and Indicates variants, and Indicates characteristics, Indicates and, express and There is a need relationship between the two features; if the above conditions are not met, it means that the two features are not implemented in the same variant, then the two features have an exclusion relationship.

5. The method for extracting a feature model from a SysML architecture model according to claim 1, characterized in that: The method of using a non-dominated sorting genetic algorithm to search for a feature model includes: The starting point of the non-dominated sorting genetic algorithm is an initial population consisting of randomly generated feature models and constraints. The initial population is quickly non-dominated sorted, and then the candidate feature models participating in crossover and mutation are selected through the standard tournament algorithm. The parent population and the child population in the candidate feature model are merged, and the next generation population is generated through competition. Then, a fast non-dominated sort is performed, and the crowding degree is calculated to generate a new child population. A new round of selection, crossover, and mutation is continued, and it is iterated multiple times until the stopping condition is met.

6. The method for extracting a feature model from a SysML architecture model according to claim 1, characterized in that: The user selects the required feature model based on precision and recall, where the precision is calculated as: , in, represents the precision calculation function, represents the input feature list, Represents a feature model set consisting of a set of feature models with the best fitness; Represents an auxiliary function that returns a set of feature lists represented by a feature model set; The calculation formula for recall is: , in, Represents the recall calculation function.

7. A device for extracting a feature model from a SysML architecture model, implemented by using the method for extracting a feature model from a SysML architecture model according to any one of claims 1 to 6, characterized in that: It includes: parsing and partitioning module, feature location module, constraint identification module and model generation module; The parsing partitioning module is used to take the SysML model as a variant, parse the variant to obtain a number of elements, and organize the elements into different partitions through a partition identification algorithm; The feature location module is used to construct a feature list based on the optional features in the variant, map the partitions to the features in the feature list through a heuristic algorithm, and establish a mapping relationship between the partitions and the features; The constraint identification module is used to construct a concept lattice based on the mapping relationship between the constructed partitions and features through a formal concept analysis method, taking variants as objects and features as attributes to establish a constraint relationship between features; The model generation module is used to search for feature models based on features and constraint relationships using a non-dominated sorting genetic algorithm to obtain a set of feature models with the best fitness for users to choose.

8. An electronic device comprising a memory and one or more processors, wherein the memory is used to store a computer program, characterized in that: The processor is configured to implement the method for extracting a feature model from a SysML architecture model according to any one of claims 1 to 6 when executing the computer program.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a computer, the method for extracting a feature model from a SysML architecture model according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Production line variability configuration optimization method based on tracking relationship between requirement text and variability model

    CN107589936A

  • An ontology-based intelligent controller machine learning algorithm module formalized description and packaging method

    CN109933307A