A Cold Start Method for Complex Equipment Knowledge Graphs Based on Relational Model Transformation

By establishing an ontology constraint model and relational model conversion algorithm for complex equipment knowledge graphs, the integrity problem in the construction of complex equipment knowledge graphs was solved, enabling efficient integration and retrieval of knowledge, and improving construction efficiency and usability.

CN116187441BActive Publication Date: 2026-01-30SOUTHWEST JIAOTONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211662588.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-23
Publication Date
2026-01-30
Estimated Expiration
2042-12-23

AI Technical Summary

Technical Problem

Existing methods cannot effectively construct knowledge graphs for complex equipment, and existing algorithms for converting structured data into knowledge triples cannot directly import native graph databases to construct graphs, thus failing to meet the completeness requirements of knowledge for complex equipment.

Method used

By establishing an ontology constraint model for a knowledge graph of complex equipment, and designing a structured knowledge ontology layer and data layer mapping algorithm based on a relational model, including steps S1-S7, the cold start of the knowledge graph of complex equipment is realized, ensuring the integrity and usability of knowledge.

Benefits of technology

It improves the efficiency of constructing knowledge graphs for complex equipment, ensures the integrity and usability of knowledge, realizes the matching and association between entity class knowledge and GBOM nodes, removes entity classes that cannot be associated, and generates a domain dictionary to support knowledge query and indexing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116187441B_ABST
    Figure CN116187441B_ABST
Patent Text Reader

Abstract

This invention discloses a cold-start method for complex equipment knowledge graphs based on relational model transformation. The method includes: proposing an integrity constraint model for complex equipment knowledge ontology, tailored to the characteristics of complex equipment knowledge; constructing an algorithm to map data tables and relationships between data tables in the relational model to ontology meta-concepts, instance concepts, attributes, and relationships in the knowledge graph; and establishing an algorithm for extracting and transforming entity triples and relationship triples based on ontology parsing and primary / foreign key calculation in the relational model, thereby achieving knowledge data classification, mapping, and database storage. Through the above processes and methods, this invention establishes a mapping from the relational model to the ontology and data layers of the complex equipment knowledge graph model, achieving the goal of cold-starting a domain knowledge graph from a relational database, effectively improving the efficiency of knowledge graph construction.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to a complex equipment knowledge graph cold start method based on a relationship model conversion. BACKGROUND

[0002] A knowledge graph organizes knowledge in the form of graph links, has significant advantages in knowledge search, reasoning calculation and the like, and with the continuous maturity of horizontal field knowledge graph technology, vertical field knowledge graph construction and application have become a current research hotspot. After years of accumulation, complex equipment has accumulated part of knowledge in design, manufacturing and operation field business systems, and effective extraction and integration of the knowledge is a primary task of constructing a knowledge graph.

[0003] Unlike traditional knowledge graphs, the application of complex equipment knowledge has strong association with parts and high requirement for knowledge integrity. At present, no graph construction method for complex equipment knowledge integrity has been found, and the existing structured data to knowledge triple conversion algorithm can only publish data as virtual RDF (Resource Description Framework) data, and cannot directly import a native graph database to construct a graph.

[0004] In view of the above problems, the application studies a complex equipment knowledge graph ontology constraint model, designs a structured knowledge ontology layer and data layer mapping algorithm based on a relationship model, performs integrity checking on the ontology and data, realizes cold start of the complex equipment knowledge graph, and can greatly improve the construction efficiency of the complex equipment knowledge graph. SUMMARY

[0005] In order to achieve the above application purpose, the application provides the following technical scheme.

[0006] A complex equipment knowledge graph cold start method based on a relationship model conversion comprises steps S1-S7: step S1: establishing a complex equipment knowledge graph ontology constraint model; step S2: establishing a product family GBOM; step S3: relationship selection and relationship mode classification based on a primary key; step S4: relationship mode to ontology mode conversion; step S5: ontology mode integrity checking and completion; step S6: knowledge data extraction checking and conversion into a database; and step S7: field dictionary generation and completion.

[0007] In step S1, the complex equipment knowledge graph ontology constraint model is established, and step S1 specifically comprises:

[0008] Constraint 1: Each field graph at least contains a type of entity class knowledge, and each entity class knowledge exists a directed reachable path between GBOM nodes, so as to ensure the integrity of the relationship between knowledge and parts; this constraint is a data layer strong constraint, that is, the ontology mode and data storage need to meet this constraint;

[0009] Constraint 2: Each domain can have multiple meta-class concepts, but each meta-class concept is linked to at least one entity class concept by Instance-of to ensure the availability of meta-class knowledge; this constraint is a weak constraint at the ontology layer, i.e. the ontology schema needs to meet this constraint, and it is not mandatory for each piece of knowledge to meet this constraint;

[0010] Constraint 3: The weak entity identification relationship between entity class knowledge is constructed by Part-of to ensure the integrity of weak entity class knowledge; this constraint is a strong constraint at the data layer, i.e. both the ontology schema and the data storage graph need to meet this constraint;

[0011] In step S3: relationship selection and relationship pattern classification based on primary and foreign keys; step S3 includes steps S31-S32:

[0012] Step S31: the user selects the relationship table and attributes containing knowledge under the guidance of the system, and step S31 includes steps S311-S313:

[0013] Step S311: connect the relationship database to be converted, read the database dictionary, load the user relationship table object and semantics;

[0014] Step S312: the user selects one or more relationship tables to form a set of tables to be converted SET-Tlist [];

[0015] Step S313: for each table Table in SET-Tlist [] i , the system loads each attribute except the auto-increment field to form an attribute list, and the user selects the attributes to be converted in the table to form an attribute set Attr i [];

[0016] Step S32: relationship table type judgment classification, step S32 includes steps S321-S327;

[0017] Step S321: initialize the relationship table classification queue, specifically: RelationList [] = null, MetaList [] = null, EntityList [] = null;

[0018] Step S322: define and initialize the table pointer i = 1;

[0019] Step S323: for each table Table in SET-Tlist [] i , get the primary key attribute set PK i [] and the foreign key attribute set FK i [];

[0020] Step S324: judging whether all attributes in the judging table of formula (1) are primary key attributes or foreign key attributes:

[0021] PK i [] ∪ FK i [] = ∪Attr i (1)

[0022] In the formula, ∪ represents taking the union set, ∪Attr i represents all attributes of the table Table i ; if the equality of both sides of formula (1) is established, the table Table i is added to the relation list RelationList[], and the process goes to step S327;

[0023] Step S325: judging whether it is a meta-class knowledge table by formula (2):

[0024] (FK i []=null Λ FK(Fk i )≥2)= TRUE (2)

[0025] In the formula, Λ represents that the left and right two conditions are satisfied at the same time, FK i []=null represents that the table Table i has no foreign key, FK(Fk i ) represents the number of tables in which the primary key Fk i is used as a foreign key in the SET-Tlist[], and TRUE represents true; if (2) is established, it means that the class knowledge is used by many other knowledge, and the table Table i is added to the meta list MetaList[], and the process goes to step S327;

[0026] Step S326: the table Table i is added to the entity table queue EntityList[], and the process goes to step S327;

[0027] Step S327: i=i+1, judging whether i> the number of tables in the SET-Tlist[] is established, if not, the process goes to step S323, and if yes, the process ends;

[0028] In the formula, step S4: converting the relation mode to the ontology mode; step S4 includes steps S41-S43;

[0029] Step S41: converting the entity table queue EntityList[] to the ontology concept and relation; step S41 includes steps S411-S412:

[0030] Step S411: Entity Class Conversion: For each table in EntityList[], convert the table to the corresponding table. i This converts the selected attribute into an entity class, converts the selected attribute into an attribute of the class, and establishes an attribute-of relationship between the class and each selected attribute.

[0031] Step S412: Entity class relationship conversion, Step S412 includes steps S4121-S4123:

[0032] Step S4121: Query the primary table set PrimaryTList[] corresponding to all foreign keys in EntityList[].

[0033] Step S4122: Calculate PrimaryTList[] ∩ EntityList[];

[0034] Step S4123: For each table in the intersection, establish a Part-of relationship between the class it is transformed from and the class in EntityList[] that is transformed from the table, and the table corresponding to the primary key is the head entity, and the table corresponding to the foreign key is the tail entity;

[0035] Step S42: Transformation of the metalist queue MetaList[] into ontology concepts and relationships; S42 includes steps S421-S424:

[0036] Step S421: Define and initialize the table pointer i = 1;

[0037] Step S422: Create a metaclass and retrieve the Table. i The table name is used as the metaclass name, and the selected attributes in the table are used as metaclass attributes to establish the Attribute-of relationship between the class and each selected attribute.

[0038] Step S423: Query the Table i A Table is created using the primary key as a foreign key in a subset of tables. i The instance-of relationship between the corresponding class and the entity class corresponding to the table;

[0039] Step S424: i = i + 1, determine whether i > the number of tables in MetaList[] is true. If not, go to step S422.

[0040] Step S43: Convert the RelationList[] queue into an ontology relationship; Step S43 includes steps S431-S432:

[0041] Step S431: For each table in RelationList[] i , by Tablei Foreign key queries relate to the main table set;

[0042] Step S432: Take two pairs of main tables from the main table set and establish a relationship between the corresponding classes for each pair. The relationship name is the relation table name.

[0043] Step S5: Ontology schema integrity check and completion; Step S5 includes steps S51-S53:

[0044] Step S51: Query the entity classes that must be associated with the GBOM class according to constraint 1, specifically including:

[0045] Step S511: Query all entity classes in the ontology except for weak entity classes with part-of relationships;

[0046] Step S512: Use the class name to query the entity table collection EntityList[] to obtain the table collection InstanceList[] corresponding to the entity classes except for weak entities;

[0047] Step S52: Add the GBOM class to the domain ontology;

[0048] Step S53: Determine and establish the relationship between the entity class and the GBOM class. Step S53 includes steps S531-S533:

[0049] Step S531: Initialize the table pointer i = 1;

[0050] Step S532: For the i-th table Table in InstanceList[] i To determine whether a connection can be established with the GBOM class, step S532 includes steps S5321-S5324:

[0051] Step S5321: Query to obtain the Table i The set of attributes;

[0052] Step S5322: Segment the attribute names and semantics to identify whether there are component identification attributes;

[0053] Step S5323: If the component identification attribute is identified, the system will display a prompt for user confirmation; if the component identification attribute is not identified, the user will select the component.

[0054] Step S5324: If the component identification attribute is obtained, establish an In-Stance-of relationship between the entity class and the GBOM class; otherwise, change the Table. i The corresponding entity classes and relationships are removed from the ontology;

[0055] Step S533: i=i+1, judge whether i>InstanceList[] table quantity is true, if not true, go to step S5321.

[0056] In step S2, for the product to be constructed knowledge graph, GBOM construction interface is provided in the knowledge graph system, and the user establishes each product family GBOM from top to bottom through the interface, the root node is product family name, subsystem node can be added under the root node, and component node can be added under each subsystem node, each node contains coding and name attribute, and the GBOM structure tree is formed by layer-by-layer construction.

[0057] Step S6 includes steps S61-S63;

[0058] Step S61: meta-class data extraction conversion into database;

[0059] Step S62: entity class data and relationship extraction check conversion into database;

[0060] Step S63: entity relationship completion.

[0061] Step S61 includes steps S611-S615;

[0062] Step S611: define and initialize table pointer i=1;

[0063] Step S612: query Table i , extract selected attribute values;

[0064] Step S613: for each row value of each attribute value, convert according to the <entity, attribute-of, attribute value> triple, and form a triple set;

[0065] Step S614: store the triple set into the knowledge graph;

[0066] Step S615: i=i+1, judge whether i>MetaList[] table quantity is true, if not true, go to step S612.

[0067] Step S62 includes steps S621-S624;

[0068] Step S621: read the ontology schema generated by steps S4 and S5, and query the entity class stored in the entity class set instances[] which is associated with the GBOM;

[0069] Step S622: for each entity class in instances[], perform instance data integrity constraint check and conversion into database;

[0070] Step S623: read the ontology schema generated by step S4 and step S5, query the weak entity class set PhantoEntity[] which has no direct connection with GBOM;

[0071] Step S624: for each PhantoEntity[i], perform integrity constraint check and conversion of instance data into the database.

[0072] Step S622 includes steps S6221-S6227;

[0073] Step S6221: define and initialize table pointer i = 1;

[0074] Step S6222: find the relationship table corresponding to the entity class, and obtain the part identification attribute;

[0075] Step S6223: query the attribute value of the part identification attribute;

[0076] Step S6224: calculate the corresponding relationship between the part identification attribute value and the GBOM node value through similarity matching;

[0077] Step S6225: obtain the matched data, convert the corresponding data into a knowledge entity, extract the attribute value, form a <entity, attribute-of, attribute value> triple set, extract the GBOM node associated with the entity foreign key, form a <entity, Instance-of, GBOM node> triple set, and write the triple set into the graph;

[0078] Step S6226: for unmatched data, return in the form of a data list, ask the user to add a matching relationship, and after adding the relationship, convert into the database according to the method of step S6225, and discard data that cannot add a matching relationship;

[0079] Step S6227: i = i + 1, judge whether i > instances[] table number is true, if not, go to step S6222.

[0080] Step S624 includes steps S6241-S6248;

[0081] Step S6241: define and initialize table pointer i = 1;

[0082] Step S6242: find the relationship table table corresponding to PhantoEntity[i] i ;

[0083] Step S6243: find the identified entity class according to the Part-of connection of PhantoEntity[i] in the ontology;

[0084] Step S6244: Find the corresponding relation table table of the class by identifying the entity class j ;

[0085] Step S6245: Query the foreign key attribute value associated with table i in table j ;

[0086] Step S6246: Obtain the data set that satisfies the referential integrity with table i in table j ;

[0087] Step S6247: Extract attribute values according to ontology attributes to form a set of triples <weak instance, attribute-of, attribute value>, extract contact instances according to foreign key contact to form a set of triples <weak entity, Part-of, identified entity>, and write the set of triples into the graph;

[0088] Step S6248: i=i+1, determine whether i>PhantoEntity[] table number is true, if not, go to step S6242.

[0089] Step S63 includes steps S631-S636;

[0090] Step S631: Read the data table in the contact table queue RelationList[];

[0091] Step S632: Define and initialize the table pointer i=1;

[0092] Step S633: Obtain the primary table associated with relation table table i ;

[0093] Step S634: Query the number of primary tables in the ontology class using the primary table name;

[0094] Step S635: If the number is greater than or equal to 2, take two combinations of attributes in the foreign key set, and for each combination of foreign key value pairs, match the entity identifier in the knowledge graph to establish a relationship edge between the two entities;

[0095] Step S636: i=i+1, determine whether i>RelationList[] table number is true, if not, go to step S633.

[0096] Step S7 includes steps S71-S73;

[0097] Step S71: Extract the entity name stored in the graph database for each entity class as a dictionary item and add it to the class knowledge dictionary;

[0098] Step S72: read the meta-class associated with the entity class in the ontology, query the classification value in the meta-class according to the dictionary item, and establish the dictionary function classification;

[0099] Step S73: provide the dictionary item management function for the user according to the entity class view through the development interface, and add a new dictionary item and add a synonym of the dictionary item.

[0100] Compared with the prior art, the present application has the following beneficial effects:

[0101] (1) The inventor found in practice that complex equipment is assembled by a large number of parts, and the knowledge of the design, manufacturing and operation processes is for each part, and the use of knowledge is also based on parts to query and index. The present application proposes a knowledge integrity constraint model according to the characteristics of complex equipment knowledge, establishes existence constraints for entity class knowledge and strong data layer constraints between GBOM nodes, establishes weak ontology layer constraints between meta-class knowledge and entity class knowledge, and establishes data layer strong constraints between entity classes with partial and whole relationships, to ensure the integrity and availability of knowledge.

[0102] (2) The inventor found in practice that a large amount of structured knowledge has been accumulated in each business information system in the design, manufacturing and operation stages of complex equipment, and effective extraction and fusion of these knowledge can play a multiplier role in building a complex equipment knowledge graph, but the current relationship data conversion method to RDF data can only publish the data as virtual RDF, and cannot directly build a graph. The present application proposes a mapping algorithm from a relationship mode to an ontology meta-concept, an entity concept, an attribute and a relationship, analyzes the reference integrity relationship between relationships based on a selected relationship table, and realizes the mode conversion of the ontology layer.

[0103] (3) The inventor found in practice that the knowledge graph ontology mode generated by the relationship mode conversion cannot meet the integrity constraints of complex equipment knowledge. The present application proposes an integrity constraint checking algorithm for the complex equipment knowledge graph ontology model, calculates whether the attributes of each entity class concept corresponding to the relationship table match the attributes of the GBOM node, supplements the GBOM node class into the ontology through the matching calculation, completes the connection between the GBOM node class and the entity class, and eliminates the entity classes that cannot be associated.

[0104] (4) The inventor found in practice that: due to the fact that the foreign key value of the relational database can be empty, and the fact that the part identification attribute of each business system and the GBOM node code and name may be different, it is difficult to automatically realize the association of the entity class knowledge data with the GBOM. The application proposes a method for aligning and storing in the warehouse of the entity class data associated with the GBOM class in the ontology mode, through similarity matching and user setting matching, extracting the attribute value of the matched data, forming a <entity, attribute-of, attribute value> triple set, extracting the GBOM node associated with the entity foreign key, forming a <entity, Instance-of, GBOM node> triple set, and realizing the extraction and storage of the entity class data.

[0105] (5) The inventor found in practice that: for knowledge data with a part-whole relationship, if the connection with the whole is lost, the knowledge itself has no separate application value. The application proposes a method for weak entity knowledge, establishing its connection with the identified entity, extracting and writing <weak instance, attribute-of, attribute value> triples and connection <weak entity, attribute-of, identified entity> triples into the graph.

[0106] (6) The inventor found in practice that: the entity concept class knowledge data accumulated in the relational database can be used as the basis for constructing the domain dictionary. The application proposes a domain dictionary management method that stores the entity name of the entity class knowledge into the domain dictionary when extracting <entity-attribute-attribute value>, and opens the dictionary item and synonym management interface. BRIEF DESCRIPTION OF DRAWINGS

[0107] Figure 1 is a schematic diagram of the overall solution of the application;

[0108] Figure 2 is a schematic diagram of the classification process of the relationship table based on the primary foreign key;

[0109] Figure 3 is a schematic diagram of the conversion process from the relationship mode to the ontology mode;

[0110] Figure 4 is a schematic diagram of the integrity check and completion process of the ontology mode;

[0111] Figure 5 is a schematic diagram of the knowledge data extraction, check, conversion and storage process. DETAILED DESCRIPTION

[0112] In order to make the purpose, technical scheme and advantages of the embodiments of the application clearer, the technical scheme in the embodiments of the application will be described clearly and completely below with reference to the drawings. Obviously, the described embodiments are part of the embodiments of the application, rather than all the embodiments.

[0113] Therefore, the following detailed description of the embodiments of the application is not intended to limit the scope of the claimed application, but merely represents some embodiments of an application. Based on the embodiments in the application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of protection of the application.

[0114] It should be noted that the embodiments in the application and the features and technical solutions in the embodiments can be combined with each other without conflict.

[0115] A complex equipment knowledge graph cold start method based on a relationship model conversion includes the following steps:

[0116] Step S1: Establish a complex equipment knowledge graph ontology constraint model.

[0117] According to the characteristics of the mass of complex equipment knowledge and the core of the parts in the knowledge itself and the application scenario, a complex equipment knowledge graph ontology constraint model is constructed, specifically including:

[0118] Constraint 1: Each field graph contains at least one entity class knowledge, and each entity class knowledge has a directed reachable path between the GBOM nodes to ensure the integrity of the relationship between the knowledge and the parts. This constraint is a strong constraint at the data layer, that is, the ontology mode and data storage need to meet this constraint.

[0119] Constraint 2: Each field can have multiple meta-class concepts, but each meta-class concept is at least connected to an entity class concept through Instance-of (instance) to ensure the availability of meta-class knowledge. This constraint is a weak constraint at the ontology layer, that is, the ontology mode needs to meet this constraint, and it is not mandatory for each piece of knowledge to meet this constraint.

[0120] Constraint 3: The weak entity identification relationship between entity class knowledge is constructed by Part-of (composition) to ensure the integrity of weak entity class knowledge. This constraint is a strong constraint at the data layer, that is, the ontology mode and data storage into the graph all need to meet this constraint.

[0121] Since complex equipment is assembled by numerous parts, the knowledge of its design, manufacturing and operation process is all for each part, and the use of knowledge is also based on parts to query and index. The application proposes a knowledge integrity constraint model for the characteristics of complex equipment knowledge, establishes the existence constraint of entity class knowledge and the strong constraint between GBOM nodes at the data layer, establishes the weak constraint between meta-class knowledge and entity class knowledge at the ontology layer, and establishes the strong constraint between the entity classes with partial and whole relationships at the data layer to ensure the integrity and availability of knowledge.

[0122] Step S2: Establish a product family GBOM.

[0123] For the product to be constructed knowledge graph, the GBOM construction interface is provided in the knowledge graph system, and the user establishes each product family GBOM from top to bottom through the interface, the root node is the product family name, the subsystem node can be added under the root node, and the component node can be added under each subsystem node, each node contains coding and name attributes, and the GBOM structure tree is formed by layer-by-layer construction.

[0124] Step S3: relationship selection and relationship mode classification based on primary and foreign keys.

[0125] Connect the relational database, load the relationship through the database dictionary, the user selects one or more relationship tables containing knowledge, the system judges the relationship type, and divides the relationship into three categories: contact table, meta table and entity table, so as to be classified and processed in subsequent ontology and data mapping, which specifically includes steps S31-S32:

[0126] Step S31: the user selects the relationship table and attribute containing knowledge under the guidance of the system, which specifically includes steps S311-S313:

[0127] Step S311: connect the relational database to be converted, read the database dictionary, load the user relationship table object and semantics.

[0128] Step S312: the user selects one or more relationship tables to form a set of tables to be converted SET-Tlist[].

[0129] Step S313: for each table Table in SET-Tlist[] i , the system loads each attribute except the auto-increment field to form an attribute list, the user selects the attributes to be converted in the table to form an attribute set Attr i [].

[0130] Step S32: relationship table type judgment and classification, which specifically includes steps S321-S327.

[0131] Preferably, step S321: initialize the relationship table classification queue, specifically: contact table queue RelationList[]=null, meta table queue MetaList[]=null, entity table queue EntityList[]=null.

[0132] Step S322: define and initialize the table pointer i=1.

[0133] Step S323: for each table Table in SET-Tlist[] i , get the primary key attribute set PK i [] and the foreign key attribute set FK i [] of the table.

[0134] Step S324: judge whether all attributes in the table Table

[0135] PK i [] ∪ FK i [] = ∪Attr i (1)

[0136] where ∪ means taking the union, and ∪Attr i represents all attributes of the table Table i . If the equality of (1) holds, the table Table i is added to the relation list RelationList[], and the process goes to step S327.

[0137] Step S325: judge whether it is a meta-class knowledge table by (2):

[0138] (FK i []=null Λ FK(Fk i )≥2)= TRUE (2)

[0139] where Λ means that both conditions are satisfied, FK i []=null means that the table Table i has no foreign key, and FK(Fk i ) means the number of tables in SET-Tlist[] that use the primary key Fk i as a foreign key, and TRUE means true. If (2) is true, it means that the class knowledge is used by other knowledge, and the table Table i is added to the meta table queue MetaList[], and the process goes to step S327.

[0140] Step S326: the table Table i is added to the entity table queue EntityList[], and the process goes to step S327.

[0141] Step S327: i=i+1, judge whether i>SET-Tlist[] is true. If not, the process goes to step S323, and if yes, the process ends.

[0142] Step S4: the relation schema is converted to the ontology schema.

[0143] Step S41: the entity table queue EntityList[] is converted to the ontology concept and relation. Specifically, it includes:

[0144] Step S411: entity class conversion: for each table Table iThe selected attributes are converted into the attributes of the class, and an Attribute-of relationship is established between the class and each selected attribute.

[0145] Step S412: Entity class relationship conversion, specifically including:

[0146] Step S4121: Query the primary table set PrimaryTList[] corresponding to all foreign keys of EntityList[].

[0147] Step S4122: Calculate PrimaryTList[]∩EntityList[] (intersection of two sets).

[0148] Step S4123: For each table belonging to the intersection, establish a Part-of relationship between the converted class and the class converted from the table in EntityList[], and the primary key corresponding table is the head entity and the foreign key corresponding table is the tail entity.

[0149] Step S42: Meta table queue MetaList[] to ontology concept and relationship conversion.

[0150] For each table Table in MetaList[] i , it is converted into a meta class, the selected attributes are converted into the attributes of the class, and the foreign key constraint is converted into an Instance-of relationship between the corresponding entity class, specifically including:

[0151] Step S421: Define and initialize the table pointer i = 1.

[0152] Step S422: Establish a meta class, take Table i as the meta class name, take the selected attributes in the table as the meta class attributes, and establish an Attribute-of relationship between the class and each selected attribute.

[0153] Step S423: Query Table i as the primary key, and establish an Instance-of relationship between the corresponding class and the entity class corresponding to the slave table. i

[0154] Step S424: i = i + 1, judge whether i > the number of tables in MetaList[], if not, go to step S422.

[0155] Step S43: Relationship table queue RelationList[] to ontology relationship conversion.

[0156] ​Step S431: For each table Table in RelationList[] i , query the associated master table set according to the foreign key of Table i .

[0157] Step S432: Take two master tables in the master table set to combine, and establish the contact between the corresponding classes for each combination, and the contact name is the relation table name.

[0158] In view of the fact that a large amount of structured knowledge has been accumulated in each business information system of complex equipment design, manufacturing and operation nodes, effectively extracting and fusing these knowledge can play a multiplier role in building complex equipment knowledge graph, however, the current relationship data to RDF data conversion method can only publish the data as virtual RDF, and cannot directly build the graph. The application proposes a relationship mode to ontology meta-concept, entity concept, attribute and relationship mapping algorithm, based on the selected relationship table, analyzes the reference integrity contact between the relationships, and realizes the mode conversion of the ontology layer.

[0159] Step S5: Ontology mode integrity check and completion.

[0160] From step 4, constraint 2 and constraint 3 are guaranteed in the conversion process, and step S5 performs integrity check and completion on constraint 1, specifically including steps S51-S53.

[0161] Step S51: Query the entity class that must be associated with the GBOM class according to constraint 1, specifically including:

[0162] Step S511: Query all entity classes in the ontology except the weak entity class with part-of (composition) contact.

[0163] Step S512: Query the entity table set EntityList[] with the class name to obtain the table set InstanceList[] corresponding to the entity class except the weak entity.

[0164] Step S52: Add the GBOM class to the domain ontology.

[0165] Step S53: Judge and establish the contact between the entity class and the GBOM class, specifically including:

[0166] Step S531: Initialize the table pointer i = 1.

[0167] Step S532: For the i-th table Table in InstanceList[] i , judge whether it can establish contact with the GBOM class, specifically including:

[0168] Step S5321: Query Tablei the attribute set of the property.

[0169] Step S5322: attribute name and semantic word segmentation are performed, and whether there is a part identification attribute is identified.

[0170] Step S5323: if the part identification attribute is identified, display is confirmed by the user; if the part identification attribute is not identified, the user selects and configures.

[0171] Step S5324: if the part identification attribute is obtained, the In Stance-of (instance) connection between the entity class and the GBOM class is established, otherwise the Table i corresponding entity class and relationship are deleted from the ontology.

[0172] Step S533: i = i + 1, and it is judged whether i> InstanceList[] table quantity is established, and if not, go to step S5321.

[0173] In view of the fact that the knowledge graph ontology mode generated by the relationship mode conversion cannot meet the completeness constraint of complex equipment knowledge, the completeness constraint checking algorithm of the complex equipment knowledge graph ontology model is proposed, which calculates whether the attributes of the relationship table corresponding to each entity class concept match the GBOM node attributes, supplements the GBOM node class into the ontology through matching calculation, supplements the connection between the GBOM node class and the entity class, and eliminates the entity class that cannot be associated.

[0174] Step S6: knowledge data extraction checking conversion storage, including steps S61-S63.

[0175] Step S61: meta-class data extraction conversion storage.

[0176] Obtain the meta table queue MetaList[], extract attribute values and store them, specifically including: i

[0177] Step S611: define and initialize the table pointer i = 1.

[0178] Step S612: query Table i , and extract the selected attribute values.

[0179] Step S613: for each row value of each attribute value, convert according to the <entity, attribute-of, attribute value> triple, and form a triple set.

[0180] Step S614: store the triple set into the knowledge graph.

[0181] ​Step S615: i=i+1, judge whether i>MetaList[] table number is true, if not true, go to step S612.

[0182] Step S62: entity class data and relationship extraction check conversion storage.

[0183] Read all entity classes in the ontology, and perform attribute value and contact instance extraction, integrity check and storage on each relationship table corresponding to the entity class, specifically including:

[0184] Step S621: read the ontology schema generated by step S4 and step S5 conversion, query the entity class connected with GBOM and store in entity class set instances[].

[0185] Step S622: for each entity class in instances[], perform instance data integrity constraint check and conversion storage, specifically including step S6221-step S6227.

[0186] Step S6221: define and initialize table pointer i=1.

[0187] Step S6222: find the relationship table corresponding to the entity class, and get the part identification attribute.

[0188] Step S6223: query the attribute value of the part identification attribute.

[0189] Step S6224: calculate the corresponding relationship between the part identification attribute value and the GBOM node value through similarity matching.

[0190] Step S6225: get the matched data, convert the corresponding data into knowledge entity, extract attribute value, form <entity, attribute-of, attribute value> triple set, extract GBOM node associated with entity foreign key, form <entity, Instance-of, GBOM node> triple set, and write the triple set into graph.

[0191] Step S6226: for unmatched data, return in the form of data list, ask the user to add matching relationship, add relationship after conversion storage according to step S6225 method, and discard the data that cannot add matching relationship.

[0192] Step S6227: i=i+1, judge whether (i>instances[] table number) is true, if not true, go to step S6222.

[0193] Given that foreign key values ​​in relational databases can be null, and that component identifier attributes and GBOM node codes and names may differ across business systems, it is difficult to automatically associate entity class knowledge data with GBOMs. This invention proposes a method for aligning and verifying entity class data associated with GBOM classes in an ontology schema before storing it in the database. Through similarity matching and user-defined matching, attribute values ​​are extracted from the matched data to form a triple set of <entity, attribute-of, attribute value>. The GBOM nodes associated with the entity's foreign key are also extracted to form a triple set of <entity, instance-of, GBOM node>, thus enabling the extraction and storage of entity class data in the database.

[0194] Step S623: Read the ontology schema generated by the transformation in steps S4 and S5, and query the set of weak entity classes PhantoEntity[] that do not have a direct relationship with GBOM.

[0195] Step S624: For each PhantoEntity[i], perform integrity constraint checks on instance data and convert it into the database, specifically including steps S6241-S6248.

[0196] Step S6241: Define and initialize the table pointer i = 1.

[0197] Step S6242: Find the relation table corresponding to PhantoEntity[i]. i .

[0198] Step S6243: Find and identify the entity class based on the Part-of relationship of PhantoEntity[i] in the ontology.

[0199] Step S6244: Find the corresponding relation table (table) by identifying the entity class. j .

[0200] Step S6245: Query the table i In and table j Related foreign key attribute values.

[0201] Step S6246: Obtain the table i The middle satisfies the table j A dataset with referential integrity.

[0202] Step S6247: Extract attribute values ​​by ontology attributes to form a set of <weak instance, attribute-of, attribute value> triples; extract relationship instances by foreign key relationships to form a set of <weak entity, part-of, identified entity> triples; and write the triples set into the graph.

[0203] Step S6248: i=i+1, judge whether (i>PhantoEntity[] table number) is true, if not, go to step S6242.

[0204] In view of the knowledge data of the part-whole relationship, if the connection between the part and the whole is lost, the knowledge itself has no separate application value. The application proposes a method for weak entity knowledge, establishing the connection with the identified entity, extracting and writing the <weak instance, attribute-of, attribute value> triple and the connection entity <weak entity, attribute-of, identified entity> triple into the graph at the same time.

[0205] Step S63: entity relationship completion, specifically including steps S631-S636.

[0206] Step S631: read the data table in the connection table queue RelationList[].

[0207] Step S632: define and initialize the table pointer i=1.

[0208] Step S633: get the relation table table i The main table of the association.

[0209] Step S634: query the number of main tables in the ontology class with the main table name.

[0210] Step S635: if the number is greater than or equal to 2, take 2 in the attribute set of the foreign key to combine, match the entity identifier in the knowledge graph for each foreign key value pair in the combination, and establish the relationship edge between the two entities.

[0211] Step S636: i=i+1, judge whether (i>RelationList[] table number) is true, if not, go to step S633.

[0212] Step S7: domain dictionary generation and completion.

[0213] The structured entity class knowledge name extracted from the relational database can be used to construct the preliminary domain dictionary, and the method is: parsing the domain ontology, for each entity class concept, establishing the domain dictionary corresponding to the knowledge, specifically including:

[0214] Step S71: extract the entity name of each entity class stored in the graph database as a dictionary item and add it to the knowledge dictionary of the class.

[0215] Step S72: read the meta-class connected with the entity class in the ontology, query the classification value in the meta-class according to the dictionary item, and establish the dictionary function classification.

[0216] Step S73: providing the user with the dictionary item management function through the development interface, and adding new dictionary items and dictionary item synonyms.

[0217] In view of the accumulated entity concept class knowledge data in the relational database, which can be used as the basis for constructing the domain dictionary. The application proposes a domain dictionary management method which stores the entity name of the entity class knowledge into the domain dictionary when extracting the <entity-attribute-attribute value>, and opens the dictionary item and synonym management interface.

[0218] The above embodiments are only used to illustrate the present application and not to limit the technical solutions described in the present application. Although the present application has been described in detail with reference to the above embodiments, the present application is not limited to the above specific embodiments. Therefore, any modification or equivalent replacement of the present application; and all technical solutions and improvements without departing from the spirit and scope of the application, are all included in the scope of the claims of the present application.

Claims

1. A complex equipment knowledge graph cold start method based on a relationship model conversion, characterized in that: The method comprises steps S1-S7: S1: establishing a complex equipment knowledge graph ontology constraint model; S2: establishing a product family GBOM; S3: relationship selection and relationship mode classification based on a primary-foreign key; S4: relationship mode conversion to an ontology mode; S5: ontology mode integrity checking and completion; S6: knowledge data extraction checking and conversion to a database; and S7: domain dictionary generation and completion. The step S1 specifically comprises: Constraint 1: each field graph contains at least one entity class knowledge, and each entity class knowledge has a directed reachable path between GBOM nodes, so as to ensure the completeness of the relationship between knowledge and parts; this constraint is a data layer strong constraint, that is, the ontology mode and data storage need to meet this constraint; Constraint 2: each field can have multiple meta-class concepts, but each meta-class concept is connected to at least one entity class concept through Instance-of, so as to ensure the availability of meta-class knowledge; this constraint is an ontology layer weak constraint, that is, the ontology mode needs to meet this constraint, but it is not mandatory for each piece of knowledge to meet this constraint; Constraint 3: the weak entity identification relationship between entity class knowledge is constructed by Part-of, so as to ensure the completeness of the weak entity class knowledge; this constraint is a data layer strong constraint, that is, the ontology mode and data storage into the graph need to meet this constraint; The step S3 comprises steps S31-S32. The step S31 comprises steps S311-S313. The step S311: connect the relationship database to be converted, read the database dictionary, load the user relationship table object and semantics; The step S312: the user selects one or more relationship tables to form a table set SET-Tlist []; Step S313: For each table Table in SET-Tlist[] i , the system loads each attribute except the auto-increment field to form an attribute list, and the user selects the attributes in the table that need to be converted to form an attribute set Attr i []; The step S32 comprises steps S321-S327. The step S321: initialize the relationship table classification queue, specifically: RelationList [] = null, MetaList [] = null, EntityList [] = null; The step S322: define and initialize the table pointer i = 1; Step S323: For each table Table in SET-Tlist[] i , get the primary key attribute set PK i [] and the foreign key attribute set FK i [] of the table. The step S324: judge whether all attributes in the table are primary key attributes or foreign key attributes by formula (1): PK i [] FK i [] = Attr i (1) represents a union, Attr i represents a table Table i of all attributes; if equality holds on both sides of equation (1), then the table Table i is added to the relation list RelationList[], and the process goes to step S327. The step S325: judge whether it is a meta-class knowledge table by formula (2): (FK i []= null Λ FK(Fk i )≥2)= TRUE (2) where Λ denotes that both conditions on the left and right are satisfied, FK i [] = null means that Table i has no foreign key, FK(Fk i ) means that the primary key Fk i is queried. In SET-Tlist[], the number of tables that have foreign keys, TRUE means true, if (2) is true, it means that this kind of knowledge is used by multiple other knowledge, and the table Table i is added to the meta table queue MetaList[], and go to step S327; Step S326: add the table Table i add the entity table to the queue EntityList[], and go to step S327; The step S327: i = i + 1, judge whether i > the number of tables in SET-Tlist [], if not, go to step S323, if yes, end; The step S4 comprises steps S41-S43. The step S41 comprises S411-S412. Step S411: Entity class conversion: converting each table Table in EntityList[] i into an entity class, converting the selected attributes into attributes of the class, and establishing an Attribute-of relationship between the class and each selected attribute; Step S412: Entity class inter-contact conversion, step S412 includes step S4121-step S4123: Step S4121: query EntityList[] all foreign key corresponding primary table set PrimaryTList[]; Step S4122: calculate PrimaryTList[]∩EntityList[]; Step S4123: for each table belonging to the intersection, establish the Part-of contact between its converted class and the EntityList[] slave table converted class, and the primary key corresponding table is the head entity, and the foreign key corresponding table is the tail entity; Step S42: MetaList[] meta table queue to ontology concept and contact conversion; S42 includes step S421-step S424: Step S421: define and initialize table pointer i=1; Step S422: Establishing the metaclass, taking Table i The table name as the metaclass name, taking the selected attributes in the table as the metaclass attributes, and establishing the Attribute-of connection between the class and each selected attribute; Step S423: Query Table i The primary key is associated with the set of slave tables, and the Table is established i The Instance-of relationship between the corresponding class and the entity class corresponding to the slave table; Step S424: i=i+1, judge whether i> MetaList[] table quantity is true, if not, go to step S422; Step S43: RelationList[] contact table queue to ontology contact conversion; step S43 includes step S431-step S432: Step S431: For each table Table in RelationList[] i , query the associated master table set according to the foreign key of Table i ; Step S432: take the primary table in the primary table set two two combination, for each combination, establish the contact between the corresponding classes, and the contact name is the relationship table name; Wherein, step S5: ontology schema integrity check and completion; step S5 includes step S51-step S53: Step S51: query the entity class which must establish contact with GBOM class according to constraint 1, specifically including: Step S511: query all entity classes in the ontology except the weak entity classes with part-of contact; Step S512: query the entity table set EntityList[] with class name to obtain the table set InstanceList[] corresponding to the entity classes except the weak entities; Step S52: add GBOM class to the domain ontology; Step S53: judge and establish the contact between the entity class and the GBOM class, step S53 includes step S531-step S533: Step S531: initialize table pointer i=1; Step S532: For the i-th table Table in InstanceList[] i To determine whether a connection can be established with the GBOM class, step S532 includes steps S5321-S5324: Step S5321: Query to obtain Table i of attribute set Attr i []; Step S5322: attribute name and semantic word segmentation, identify whether there is a part identification attribute; Step S5323: if the part identification attribute is identified, display is confirmed by the user; if the part identification attribute is not identified, select by the user; Step S5324: If the part identification attribute is obtained, an In Instance-of relationship between the entity class and the GBOM class is established, otherwise Table i The corresponding entity class and relationship are deleted from the ontology; Step S533: i=i+1, judge whether i> InstanceList[] table quantity is true, if not, go to step S5321.

2. The complex equipment knowledge graph cold start method based on relationship model conversion according to claim 1, characterized in that: In step S2, for the product to be constructed knowledge graph, GBOM construction interface is provided in the knowledge graph system, and the user establishes each product family GBOM from top to bottom through the interface, the root node is product family name, subsystem node can be added under the root node, part node can be added under each subsystem node, each node contains coding and name attribute, and the GBOM structure tree is formed by layer-by-layer construction. 3.The complex equipment knowledge graph cold start method based on relationship model conversion of claim 2, wherein: Step S6 includes step S61-step S63; Step S61: meta class data extraction conversion into database; Step S62: entity class data and relationship extraction check conversion into database; Step S63: entity relationship completion.

4. The complex equipment knowledge graph cold start method based on relationship model conversion of claim 3, wherein: Step S61 includes steps S611-S615; Step S611: define and initialize table pointer i = 1; Step S612: Query Table i and extract the selected attribute values. Step S613: for each row value of the attribute value, convert it into a triple set in the form of <entity, attribute-of, attribute value>; Step S614: store the triple set into the knowledge graph; Step S615: i = i + 1, determine whether i > MetaList[] table quantity is true, if not, go to step S612.

5. The complex equipment knowledge graph cold start method based on relationship model conversion according to claim 4, characterized in that: Step S62 includes steps S621-S624; Step S621: read the ontology schema generated by steps S4 and S5, query the entity class set instances[] connected with GBOM; Step S622: for each entity class in instances[], perform instance data integrity constraint check and conversion into database; Step S623: read the ontology schema generated by steps S4 and S5, query the weak entity class set PhantoEntity[] not directly connected with GBOM; Step S624: for each PhantoEntity[i], perform instance data integrity constraint check and conversion into database.

6. The complex equipment knowledge graph cold start method based on relationship model conversion according to claim 5, characterized in that: Step S622 includes steps S6221-S6227; Step S6221: define and initialize table pointer i = 1; Step S6222: find the relationship table corresponding to the entity class, and obtain the part identification attribute; Step S6223: query the attribute value of the part identification attribute; Step S6224: calculate the corresponding relationship between the part identification attribute value and the GBOM node value through similarity matching; Step S6225: obtain the matched data, convert the corresponding data into a knowledge entity, extract the attribute value, form a <entity, attribute-of, attribute value> triple set, extract the GBOM node associated with the entity foreign key, form a <entity, Instance-of, GBOM node> triple set, and write the triple set into the graph; Step S6226: for unmatched data, return in the form of a data list, ask the user to add a matching relationship, add the relationship to the database according to the method of step S6225, and discard the data that cannot add a matching relationship; Step S6227: i = i + 1, determine whether i > instances[] table quantity is true, if not, go to step S6222.

7. The complex equipment knowledge graph cold start method based on relationship model conversion according to claim 6, characterized in that: Step S624 includes steps S6241-S6248; Step S6241: define and initialize table pointer i = 1; Step S6242: look up the relationship table table corresponding to PhantoEntity[i] i ; Step S6243: find the identified entity class according to the Part-of connection of PhantoEntity[i] in the ontology; Step S6244: Find the corresponding relation table table of the class by identifying the entity class j ; Step S6245: Query table i with table j associated foreign key attribute values; Step S6246: Acquire table i The data set satisfies the table j Refer to the data set of integrity; Step S6247: extract the attribute value according to the ontology attribute, form a <weak instance, attribute-of, attribute value> triple set, extract the connected instance according to the foreign key connection, form a <weak entity, Part-of, identified entity> triple set, and write the triple set into the graph; Step S6248: i=i+1, judge whether i>PhantoEntity[] table number is true, if not true, go to step S6242.

8. The complex equipment knowledge graph cold start method based on relationship model conversion according to claim 7, characterized in that: Step S7 includes steps S71-S73; Step S71: extract the entity name of each entity class stored in the graph database as a dictionary item to add to the class knowledge dictionary; Step S72: read the meta class related to the entity class in the ontology, query the classification value in the meta class according to the dictionary item, and establish the dictionary function classification; Step S73: through the development interface, the dictionary item management function is provided for the user according to the entity class view, and new dictionary items and synonyms of the dictionary items can be added.

Citation Information

Patent Citations

  • Domain knowledge map generation method and apparatus based on semantic triangle

    CN107609052A

  • Software defect knowledge-oriented knowledge search method

    WO2021008180A1