Research Article
A Knowledge Graph System for the Maintenance of Coal Mine Equipment
Algorithm 1
Knowledge storage graph algorithm.
| Input: RDF graph | | Output: Neo4j Attribute graph | (1) | P Initialize empty set | (2) | Get the set of RDF file triples, parse, and store them as triplesk | (3) | Access to Neo4j database, db = Database (http://127.0.0.1:7474) | (4) | Get the corresponding nodes and of and | (5) | Determine whether and exist in the Neo4j database; if not, then create newNode () | (6) | Get the edge corresponding to | (7) | Determine whether exists in the database; if not, then create Rel () | (8) | Judge the traversal result: if , end; if , go to the second step | (9) | Complete the storage of the CMEM ontology content |
|