A method and device for reasoning semantic relations of knowledge graph of SysML model
By importing the SysML model into the knowledge graph and using path search algorithms and semantic network inference machines, the problem of information retrieval and semantic correlation analysis of the SysML model under massive data is solved, and rapid retrieval and intelligent correlation analysis are realized, reducing complexity and generalization The issue of suitability supports the efficient development of various development tasks.
Patent Information
- Application Number
- CN202411099819.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2044-08-12
AI Technical Summary
When facing massive and highly correlated model data, SysML models are difficult to support fast information retrieval and intelligent semantic correlation analysis, resulting in low utilization of model resources and prolonged development cycle, and the complexity of semantic relationship inference of the knowledge graph and universality. Poor performance and difficult to meet the needs of different application scenarios.
By importing the SysML model into the knowledge graph, we create ontology patterns and ontology instances based on the network ontology language, using path search algorithms and semantic network inference machines, users can independently select paths to create semantic relationship inference rules, infer and complete the entities in the knowledge graph Semantic relationship.
It realizes rapid information retrieval and intelligent semantic correlation analysis, reduces the complexity of semantic relationship inference, improves efficiency, supports multiple development tasks, dynamically updates the semantic relationship between entities in the model map, and improves the accessibility and utilization of model resources. Rate.
Smart Images

Figure CN118627626B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of model-based systems engineering, and specifically relates to a SysML model knowledge graph semantic relationship reasoning method and device. Background Art
[0002] In the field of model-based systems engineering (MBSE), the Systems Modeling Language (SysML) builds detailed and intuitive model representations for various aspects of the system by providing a series of diagrams and model elements, such as module definition diagrams, internal module diagrams, and activity diagrams. These models not only cover key elements such as the structure, behavior, requirements, and parameters of the system, but also promote communication and collaboration between cross-domain teams. They are key tools to ensure the consistency and effectiveness of the system design, development, verification, and maintenance processes, and thus become the core of complex system development.
[0003] However, as the complexity of the system continues to increase, the scale of system model resources has gradually increased, and the reuse and association of model knowledge has become a problem that affects the quality and efficiency of system development. SysML models are usually stored in the form of project files. When faced with massive and highly correlated model data, the model is difficult to support fast information retrieval and intelligent semantic association analysis, which directly leads to low model resource utilization and extended development cycle.
[0004] To solve the above problems, importing SysML models into knowledge graphs is an effective way to achieve rapid retrieval and explicit association of model knowledge. As a structured knowledge representation method, knowledge graphs can intuitively display complex associations between entities in the form of nodes (entities) and edges (relationships), and support efficient query and reasoning. Converting SysML models into knowledge graphs can not only achieve centralized storage and unified management of model knowledge, but also utilize the efficient retrieval capabilities of graph databases to greatly improve the accessibility and utilization of model knowledge. However, the model knowledge graph directly converted from SysML has the following two problems: (1) Since the knowledge graph model layer is consistent with the SysML metamodel, the relationship between its entities represents a specific grammatical layer relationship. The relationship directly mapped to the knowledge graph is often too complex and lacks abstractness, making it difficult to accurately reflect the deep semantic relationship between entities. This complexity not only increases the difficulty of maintaining the knowledge graph, but also limits its flexibility and scalability in different application scenarios. (2) Since the knowledge graph needs to serve different application scenarios and development tasks, the semantic relationships between entities it carries may be different. For example, the functional analysis task needs to obtain the relationship between the inclusion and execution order of activities, and the architecture design task needs to obtain the relationship between the composition and connection of modules. Therefore, it is difficult to reason and complete the semantic relationship in a unified way. Since these requirements are often difficult to fully foresee in the knowledge graph design stage, it is difficult to design a unified model that can meet all requirements at the same time. This leads to the need to frequently adjust and optimize the knowledge graph according to specific tasks in actual applications, thereby increasing the workload and complexity.
[0005] Therefore, it is necessary to build a more efficient, flexible and intelligent SysML model knowledge graph to enhance the semantic relationship abstraction and reasoning capabilities, and provide more powerful support for the development of complex systems. Summary of the invention
[0006] In view of the above, the purpose of the present invention is to provide a method and device for reasoning semantic relations of a SysML model knowledge graph, which can automatically import a SysML model into a knowledge graph and create an ontology schema and an ontology instance in an ontology editor according to the knowledge graph, search and generate its semantic relations according to the ontology concepts selected by the user based on the ontology schema, and finally reason and complete the missing semantic relations between entities in the knowledge graph entities. The reasoned and completed SysML model knowledge graph can reflect the implicit semantic relations between entities, thereby effectively serving a variety of different research and development tasks such as functional analysis, design reasoning, and model retrieval.
[0007] In order to achieve the above-mentioned invention object, the technical solution provided by the present invention is as follows:
[0008] In a first aspect, an embodiment of the present invention provides a method for reasoning semantic relations of a SysML model knowledge graph, comprising the following steps:
[0009] Import the SysML model into the knowledge graph through model mapping and data extraction, and create ontology patterns and ontology instances based on the network ontology language based on the knowledge graph;
[0010] All paths between any two concepts are searched from the ontology schema by a path search algorithm, and the user selects a path from all the paths as the reasoning basis for configuring a new relationship;
[0011] Semantic relationship reasoning rules are created based on the path selected by the user. With the help of the semantic web reasoning engine, the ontology instances are inferred according to the semantic relationship reasoning rules to obtain new semantic relationships between instances, and the knowledge graph is completed based on the new semantic relationships between instances.
[0012] Specifically, the SysML model is imported into the knowledge graph through model mapping and data extraction, including:
[0013] The SysML model file is parsed. First, the mapping relationship between the UML metaclass and the SysML stereotype is established. Then, the structure of the SysML model file is traversed and the node attributes and the relationship between nodes are extracted based on the mapping relationship. Finally, the node attributes and the relationship between nodes are imported into the knowledge graph. In the knowledge graph, the node attributes and the relationship between nodes are converted into nodes, and labels including the node type and UML class are established for the nodes.
[0014] Specifically, the creation of an ontology model and an ontology instance based on a network ontology language based on a knowledge graph includes:
[0015] Using the ontology editor, we first create UML metaclasses and SysML metaclasses and the inheritance relationships between them. Then, we separate multiple labels of nodes in the knowledge graph and create corresponding ontology concepts. We import the ontology concepts and the relationships between concepts into the ontology editor and create an ontology model based on the network ontology language in combination with the inheritance relationships. We also extract instance data corresponding to nodes and relationships from the knowledge graph and import them into the ontology editor to create an ontology instance based on the network ontology language.
[0016] Specifically, the path search algorithm searches for all paths between any two concepts from the ontology schema, including:
[0017] The ontology model is regarded as a directed graph with concept classes as nodes and attributes as edges. The starting point, end point and path length are set, and all paths that meet the path length between the starting point and end point classes are traversed through the depth-first search algorithm.
[0018] Specifically, the user selects a path from all paths as a reasoning basis for configuring a new relationship, including:
[0019] All searched paths are taken as a candidate path set, and the user selects a path that matches the specific task requirements from the candidate path set as the reasoning basis for configuring a new relationship and defines the name of the new relationship.
[0020] Specifically, the creation of semantic relationship inference rules based on the path selected by the user includes:
[0021] Based on the path selected by the user and the new relationship name defined, a semantic web rule language rule based on predicate logic is created, in which the path selected by the user is converted into the antecedent of the rule, the nodes and edges in the path are converted into elements of the antecedent respectively, and the elements are in conjunction relationship. The new relationship name is converted into the inference of the rule, and there is an implication relationship between the antecedent and the inference.
[0022] In a second aspect, in order to achieve the above-mentioned purpose of the invention, an embodiment of the present invention further provides a SysML model knowledge graph semantic relationship reasoning device, including: a model parsing module, a path search and configuration module and a knowledge completion module;
[0023] The model parsing module is used to import the SysML model into the knowledge graph through model mapping and data extraction, and to create an ontology model and an ontology instance based on the network ontology language based on the knowledge graph;
[0024] The path search and configuration module is used to search all paths between any two concepts from the ontology model through a path search algorithm, and the user selects a path from all the paths as the reasoning basis for configuring a new relationship;
[0025] The knowledge completion module is used to create semantic relationship reasoning rules based on the path selected by the user, use the semantic web reasoning engine to infer the ontology instances according to the semantic relationship reasoning rules to obtain new semantic relationships between instances, and complete the knowledge graph according to the new semantic relationships between instances.
[0026] In the third aspect, in order to achieve the above-mentioned purpose of the invention, an embodiment of the present invention also provides a SysML model knowledge graph semantic relationship reasoning device, including a memory and one or more processors, the memory is used to store computer programs, and the processor is used to implement the above-mentioned SysML model knowledge graph semantic relationship reasoning method when executing the computer program.
[0027] 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 SysML model knowledge graph semantic relationship reasoning method is implemented.
[0028] In a fifth aspect, in order to achieve the above-mentioned purpose of the invention, an embodiment of the present invention further provides a computer product, which includes a computer program. When the computer program is executed by a processor, it implements the above-mentioned SysML model knowledge graph semantic relationship reasoning method.
[0029] Compared with the prior art, the present invention has the following beneficial effects:
[0030] (1) The present invention can support rapid information retrieval and intelligent semantic association analysis by importing the SysML model into the knowledge graph and automatically creating an ontology based on the network ontology language in the ontology editor, allowing the user to independently select the starting and ending ontology concepts of the semantic relationship to be created.
[0031] (2) The present invention uses a path search algorithm to search for all possible paths between any two concepts from a huge ontology model. Users can select paths and create semantic relationship reasoning rules based on specific task requirements. The created rules can be used to reason and complete the missing semantic relationships between entities in the knowledge graph in a unified manner to support the efficient implementation of specific tasks.
[0032] (3) The SysML model knowledge graph after reasoning and completion of the present invention can reflect the implicit semantic relationship between entities, thereby dynamically updating the semantic relationship between corresponding entities in the model graph, reducing the complexity of semantic relationship reasoning and improving efficiency, thereby effectively serving a variety of different development tasks such as functional analysis, design reasoning, model retrieval, etc. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] 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.
[0034] Figure 1 It is a flowchart of a method for reasoning semantic relations of a SysML model knowledge graph provided by an embodiment of the present invention;
[0035] Figure 2 It is a data conversion relationship diagram of the SysML model knowledge graph semantic relationship reasoning method provided by an embodiment of the present invention;
[0036] Figure 3 is a schematic diagram of a path query result provided by an embodiment of the present invention;
[0037] Figure 4 is a schematic diagram of a new relationship definition provided by an embodiment of the present invention;
[0038] Figure 5 It is a schematic diagram of the knowledge graph reasoning completion result provided by an embodiment of the present invention;
[0039] Figure 6 It is a structural diagram of a SysML model knowledge graph semantic relationship reasoning device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0040] 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.
[0041] The inventive concept of the present invention is: in view of the technical problems that the method of importing SysML models into knowledge graphs in the prior art has high complexity and poor universality, the embodiment of the present invention provides a method and device for semantic relationship reasoning of SysML model knowledge graphs, by importing the SysML model into the knowledge graph and creating a network ontology language ontology including an ontology pattern and an ontology instance, a path search algorithm is used based on the ontology pattern to perform path search and select the path for new semantic relationship configuration, the semantic relationship between ontology instances is inferred according to the created semantic relationship reasoning rules, and the knowledge graph is completed according to the reasoning results, thereby reducing the complexity of semantic relationship reasoning and improving efficiency, thereby effectively serving a variety of different development tasks such as function analysis, design reasoning, model retrieval, etc.
[0042] Figure 1 Schematic diagram of the process of the SysML model knowledge graph semantic relationship reasoning method provided by the embodiment of the present invention. Figure 1 As shown, the embodiment provides a method for reasoning semantic relations of a SysML model knowledge graph, which can be used to support the MBSE design and analysis process of complex systems. The implementation process is described below using a radar system design model as an example, which specifically includes the following steps:
[0043] S1, SysML model parsing.
[0044] S1.1, extract SysML elements and import them into the knowledge graph.
[0045] SysML model files are generally saved in XML metadata interchange (XMI) format. Since the SysML language itself is constructed by lightweight extension based on the Unified Modeling Language (UML), in the tree structure of the XMI format file, the SysML model elements are referred to by the UML metaclass, and the SysML type of the element itself is specified by the stereotype. Therefore, in the embodiment, the mapping relationship between the UML metaclass and the SysML stereotype is first established, and then the tree structure of the XMI file is traversed to read the node attributes and the relationship between the nodes, and finally the node attributes and relationships are saved in the knowledge graph. Figure 2 As shown in the figure, there are two requirements (Requirement) named "target detection" and "normal search for air" in a SysML model, and there is a derive relationship (DeriveReqt) between the two requirements. Since the two requirements and the derive relationship between them are represented as model elements in the SysML model, after importing the knowledge graph (using Neo4j graph database storage), the two requirements and the derive relationship are converted into nodes, and labels including the node type and UML class (uml:Class) are established for the nodes. The labels corresponding to the two nodes of "target detection" and "normal search for air" are "derive" and "UML class", and the labels corresponding to the abstract node of the "derive relationship" are "derive" and "UML abstract object" (uml:Abstraction). It can be seen that the knowledge graph generated directly according to the SysML metamodel grammatical structure mapping has high structural complexity and poor readability.
[0046] S1.2, extract and create OWL ontology from knowledge graph.
[0047] The Web Ontology Language (OWL) ontology includes two levels: ontology schema and ontology instance. The ontology schema represents concepts and the relationships between them, and is represented by OWL classes and their attributes; the ontology instance represents instances and the relationships between them, and is represented by OWL individuals and their attributes. In the embodiment, a bottom-up approach is adopted to automatically extract and create the ontology schema from the knowledge graph. Since SysML metaclasses are all extended from UML metaclasses, before creating the ontology, the necessary UML and SysML metaclasses and the inheritance relationships between them are first created in the ontology. On this basis, multiple labels (Labels) of the nodes in the knowledge graph are separated, and the corresponding ontology concepts are created, and they are imported into the ontology editor protégé together with the relationships between the concepts. Figure 2As shown in the figure, the labels of the two requirements "target detection" and "normal search for air" in the knowledge graph are requirement (Requirement) and UML class (uml:Class). After extracting the ontology, these two labels are created as two OWL classes named requirement (Requirement) and UML class (uml:Class) in the ontology mode, and there is an inheritance relationship between the two classes. The export relationship (DeriveReqt) is also extracted as an OWL ontology. The two labels corresponding to the export relationship are export (DeriveReqt) and UML abstract object (uml:Abstraction). After extracting the ontology, these two labels are created as two OWL classes named export and UML abstract object. There are two relationships between export (DeriveReqt) and requirement (Requirement): supplier (Supplier) and client (Client). After the ontology mode is created, the corresponding ontology instance is also imported into protégé for subsequent reasoning.
[0048] S2, path search and configuration.
[0049] S2.1, path search.
[0050] The OWL ontology model is essentially a directed graph, whose nodes are OWL classes and edges are the relationships between OWL classes. Users can create new semantic relationships between any two classes in the OWL ontology. In order to achieve efficient path search, the depth-first search algorithm is used for traversal search in the embodiment. Through the user interface, the user selects any two classes in the OWL ontology as the starting point and end point of the search, and sets the maximum number of paths allowed for the search. Based on user input, all possible paths between the two classes are searched, while ensuring that no closed loops are included, that is, the path does not pass through repeated nodes, thereby ensuring the validity and availability of the search results. After the path search is completed, the user will obtain a set of candidate paths. In the embodiment, Figure 3 is a subgraph of the OWL ontology model extracted from the knowledge graph. This subgraph shows some OWL classes and relationships related to the module (Block). When the user selects the module (Block) ontology class as the starting point and end point of the search, the system Figure 3 The following candidate paths are searched and fed back in the subgraph shown (numbers represent node numbers):
[0051] Path 1: (1) (2) (1);
[0052] Path 2: (1) (3) (1);
[0053] Path 3: (1) (2) (1) (3) (1);
[0054] Path 4: (1) (4) (5) (6) (2) (1);
[0055] Path 5:…….
[0056] S2.2, New semantic relationship configuration.
[0057] Based on the candidate path set, the user selects the path that matches the task requirements as the reasoning basis for configuring the new relationship and defines the name of the new relationship according to the specific application scenario, such as functional decomposition structure analysis, component compatibility check and other task requirements. Figure 4 As shown in the figure, the user selects path 3 as the reasoning basis for the new relationship to be defined according to the requirements of the system interface design and analysis task. This path indicates that module a has a component property b (PartProperty), the component property type is module c, and the module has a flow port d (FlowPort), the type of which is module e. Based on the semantic analysis of the path, it can be seen that the path actually implies the semantics that a has an internal port e. Therefore, the user defines a new relationship between modules and specifies its name as hasInternalPort.
[0058] S3, knowledge completion.
[0059] S3.1, create SWRL rules.
[0060] Based on the path and new relationship name between the two ontology classes selected by the user, the system automatically summarizes the rules formally defined in the semantic web rule language (SWRL) based on predicate logic for the new relationship. In the embodiment, according to the above path 3 and the new relationship name, the following SWRL rules are generated:
[0061] Block(?a)^PartProperty(?b)^Block(?c)^FlowPort(?d)^Block(?e)^ownedAttribute(?a,?b)^type(?b,?c)^ownedAttribute(?c,?d)^type(?d,?e)->hasInternalPort(?a,?e).
[0062] The above SWRL rule pattern is "precondition->corollary", where -> represents an implication relationship. The path selected by the user is converted into the precondition of the rule. Each node in the path is converted into an element of the form C(x), such as Block(?a) indicating that there is an instance a of type Block, where Block is an OWL class, a is a variable representing any instance, and ? is a variable prefix; each edge in the path is converted into an element of the form P(x,y), such as ownedAttribute(?a,?b) indicating that there is an ownedAttribute relationship between instances a and b, where ownedAttribute is an OWL attribute; there is a conjunction relationship between the above elements, represented by the symbol ^. The new relationship name named by the user is converted into the corollary of the rule, which contains an element of the form P(x,y), such as hasInternalPort(?a, ?e) indicating that there is a hasInternalPort relationship between instances a and e.
[0063] The rule specifically states: If there is a block a, and the ownedAttribute of a is the part property b, and the type of b is block c, and the ownedAttribute of c is the flow port d, and the type of d is block e, then it is inferred that block a has an internal port (hasInternalPort), and the type of the internal port is block e.
[0064] S3.2, Reasoning about semantic relations between ontology instances.
[0065] According to the generated SWRL rules, the semantic web reasoning engine is used to infer and calculate the ontology instances in the protégé, thereby inferring and generating new semantic relationships between instances. In the embodiment, the signal processing software and pulse pressure configuration are two module instances. Based on the above SWRL rules, the semantic web reasoning engine SWRLRuleEngine is used to automatically infer that there is a hasInternalPort relationship between the two. This process increases the semantic richness of the model and lays the foundation for the subsequent knowledge completion stage.
[0066] S3.3, complete the knowledge graph.
[0067] Once the reasoning process is complete and new relationships are identified, these relationships are imported back into the knowledge graph to complete the missing semantic relationships in the knowledge graph. Figure 5As shown in the figure, a new semantic relationship is established between the two nodes of "signal processing software" and "pulse compression configuration" in the knowledge graph: has internal port (hasInternalPort). Based on this relationship, users can quickly obtain the hidden input and output ports introduced by the embedded module of the radar signal processing software, thereby effectively avoiding design defects caused by inconsistent interfaces.
[0068] In summary, an embodiment of the present invention provides a method for reasoning semantic relationships in a SysML model knowledge graph. By importing a SysML model into a knowledge graph and based on the knowledge graph, it can support fast information retrieval and intelligent semantic association analysis. The model knowledge graph after reasoning and completion not only covers the knowledge explicitly defined by the original model, but also completes the implicit knowledge obtained through logical reasoning, thereby providing a more comprehensive and richer system description information, which can assist users in making more accurate and efficient analysis and decisions, and thus has higher practical value.
[0069] Based on the same inventive concept, Figure 6 As shown, an embodiment of the present invention further provides a SysML model knowledge graph semantic relationship reasoning device 600, including: a model parsing module 610, a path search and configuration module 620 and a knowledge completion module 630.
[0070] Among them, the model parsing module 610 is used to import the SysML model into the knowledge graph through model mapping and data extraction, and create an ontology model and ontology instance based on the network ontology language based on the knowledge graph.
[0071] The path search and configuration module 620 is used to search all paths between any two concepts from the ontology model through a path search algorithm, and the user selects a path from all the paths as the reasoning basis for configuring a new relationship.
[0072] The knowledge completion module 630 is used to create semantic relationship reasoning rules based on the path selected by the user, use the semantic web reasoning engine to infer the ontology instances according to the semantic relationship reasoning rules to obtain new semantic relationships between instances, and complete the knowledge graph according to the new semantic relationships between instances.
[0073] Based on the same inventive concept, an embodiment of the present invention also provides a SysML model knowledge graph semantic relationship reasoning device, including a memory and one or more processors, the memory is used to store computer programs, and the processor is used to implement the above-mentioned SysML model knowledge graph semantic relationship reasoning method when executing the computer program.
[0074] Based on the same inventive concept, an embodiment of the present invention also 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 SysML model knowledge graph semantic relationship reasoning method is implemented.
[0075] Based on the same inventive concept, an embodiment of the present invention also provides a computer product, which includes a computer program. When the computer program is executed by a processor, the above-mentioned SysML model knowledge graph semantic relationship reasoning method is implemented.
[0076] It should be noted that the SysML model knowledge graph semantic relationship reasoning device, SysML model knowledge graph semantic relationship reasoning equipment, computer-readable storage medium and computer product provided in the above embodiments all belong to the same inventive concept as the SysML model knowledge graph semantic relationship reasoning method. The specific implementation process is detailed in the SysML model knowledge graph semantic relationship reasoning method embodiment, which will not be repeated here.
[0077] 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 reasoning semantic relations of knowledge graphs of SysML models, characterized in that: The following steps are involved: Importing the SysML model into the knowledge graph through model mapping and data extraction, including: parsing the SysML model file, first establishing a mapping relationship between the UML metaclass and the SysML stereotype, then traversing the structure of the SysML model file and extracting the node attributes and the relationship between the nodes based on the mapping relationship, and finally importing the node attributes and the relationship between the nodes into the knowledge graph, in which the node attributes and the relationship between the nodes are converted into nodes, and labels including the node type and the UML class are established for the nodes; creating an ontology model and an ontology instance based on the network ontology language in an ontology editor based on the knowledge graph, including: first creating the UML metaclass and the SysML metaclass and the inheritance relationship between them using the ontology editor, then separating multiple labels of the nodes in the knowledge graph and creating corresponding ontology concepts, importing the ontology concepts and the relationship between the concepts into the ontology editor and creating an ontology model based on the network ontology language in combination with the inheritance relationship, and extracting instance data corresponding to the nodes and relationships from the knowledge graph and importing them into the ontology editor to create an ontology instance based on the network ontology language; All paths between any two concepts are searched from the ontology schema by a path search algorithm, and the user selects a path from all the paths as the reasoning basis for configuring a new relationship; Semantic relationship reasoning rules are created based on the path selected by the user. With the help of the semantic web reasoning engine, the ontology instances are inferred according to the semantic relationship reasoning rules to obtain new semantic relationships between instances, and the knowledge graph is completed based on the new semantic relationships between instances.
2. The method for reasoning semantic relations of a SysML model knowledge graph according to claim 1, characterized in that: The path search algorithm searches for all paths between any two concepts from the ontology schema, including: The ontology model is regarded as a directed graph with concept classes as nodes and attributes as edges. The starting point, end point and path length are set, and all paths that meet the path length between the starting point and end point classes are traversed through the depth-first search algorithm.
3. The method for reasoning semantic relations of a SysML model knowledge graph according to claim 1, characterized in that: The user selects a path from all paths as a reasoning basis for configuring a new relationship, including: All searched paths are taken as a candidate path set, and the user selects a path that matches the specific task requirements from the candidate path set as the reasoning basis for configuring a new relationship and defines the name of the new relationship.
4. The method for reasoning semantic relations of a SysML model knowledge graph according to claim 3, characterized in that: The creating of semantic relationship inference rules based on the path selected by the user includes: Based on the path selected by the user and the new relationship name defined, a semantic web rule language rule based on predicate logic is created, in which the path selected by the user is converted into the antecedent of the rule, the nodes and edges in the path are converted into elements of the antecedent respectively, and the elements are in conjunction relationship. The new relationship name is converted into the inference of the rule, and there is an implication relationship between the antecedent and the inference.
5. A SysML model knowledge graph semantic relationship reasoning device, characterized in that: include: Model parsing module, path search and configuration module and knowledge completion module; The model parsing module is used to import the SysML model into the knowledge graph through model mapping and data extraction, including: parsing the SysML model file, first establishing a mapping relationship between the UML metaclass and the SysML stereotype, then traversing the structure of the SysML model file and extracting the node attributes and the relationship between the nodes based on the mapping relationship, and finally importing the node attributes and the relationship between the nodes into the knowledge graph, in which the node attributes and the relationship between the nodes are converted into nodes, and labels including the node type and the UML class are established for the nodes; creating an ontology model and an ontology instance based on the network ontology language based on the knowledge graph, including: first creating the UML metaclass and the SysML metaclass and the inheritance relationship between them by using the ontology editor, then separating multiple labels of the nodes in the knowledge graph and creating corresponding ontology concepts, importing the ontology concepts and the relationship between the concepts into the ontology editor and creating an ontology model based on the network ontology language in combination with the inheritance relationship, and extracting instance data corresponding to the nodes and relationships from the knowledge graph and importing them into the ontology editor to create an ontology instance based on the network ontology language; The path search and configuration module is used to search all paths between any two concepts from the ontology model through a path search algorithm, and the user selects a path from all the paths as the reasoning basis for configuring a new relationship; The knowledge completion module is used to create semantic relationship reasoning rules based on the path selected by the user, use the semantic web reasoning engine to infer the ontology instances according to the semantic relationship reasoning rules to obtain new semantic relationships between instances, and complete the knowledge graph according to the new semantic relationships between instances.
6. A SysML model knowledge graph semantic relationship reasoning 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 used to implement the SysML model knowledge graph semantic relationship reasoning method described in any one of claims 1 to 4 when executing the computer program.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a computer, the SysML model knowledge graph semantic relationship reasoning method described in any one of claims 1 to 4 is implemented.
8. A computer product comprising a computer program, characterized in that When the computer program is executed by a processor, the SysML model knowledge graph semantic relationship reasoning method described in any one of claims 1 to 4 is implemented.
