CN113779313A - Knowledge management method and system based on graph database - Google Patents

Knowledge management method and system based on graph database Download PDF

Info

Publication number
CN113779313A
CN113779313A CN202110037144.4A CN202110037144A CN113779313A CN 113779313 A CN113779313 A CN 113779313A CN 202110037144 A CN202110037144 A CN 202110037144A CN 113779313 A CN113779313 A CN 113779313A
Authority
CN
China
Prior art keywords
graph
database
metadata
visualization
knowledge management
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110037144.4A
Other languages
Chinese (zh)
Other versions
CN113779313B (en
Inventor
付绍高
李吉文
李维娜
王书兴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202110037144.4A priority Critical patent/CN113779313B/en
Publication of CN113779313A publication Critical patent/CN113779313A/en
Application granted granted Critical
Publication of CN113779313B publication Critical patent/CN113779313B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9024Graphs; Linked lists
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/248Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/26Visual data mining; Browsing structured data

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a knowledge management method and a knowledge management system based on a graph database, and relates to the technical field of computers. One embodiment of the method comprises: creating metadata, and defining vertexes, attributes of the vertexes, relations between the vertexes and attributes of the relations included in the graph in the metadata; connecting any one of a plurality of graph databases to enable various database operations to be performed on the graph databases; creating a graph based on the created metadata and the connected graph database, such that the graph has data of vertices and relationships; and visualization operations that enable various visualization operations on the graph. The embodiment establishes unified knowledge management and visualization operation on multiple graph databases, and reduces the learning, using and managing costs of the multiple graph databases.

Description

Knowledge management method and system based on graph database
Technical Field
The invention relates to the technical field of computers, in particular to a knowledge management method and system based on a graph database.
Background
With the increasing demand for relational scenarios, a large number of graph databases have emerged and some have been open source. However, these graph databases have query languages different from each other, lack uniform database support, and do not form uniform knowledge management, i.e., schema (metadata) management, thereby increasing the learning cost of users. In addition, the visualization capability of the graph databases is also uneven, and the visualization support of the graph triples of point-edge-point by some graph databases is not strong, so that the users are difficult to settle the schema management of the knowledge graph into the knowledge base for later use.
Disclosure of Invention
In view of this, embodiments of the present invention provide a knowledge management method and system based on a graph database, so that unified knowledge management, database support, and visualization operations can be performed on multiple graph databases.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a knowledge management method based on a graph database, including:
creating metadata, and defining vertexes included in a graph, attributes of the vertexes, relations between the vertexes, and attributes of the relations in the metadata;
connecting any one of a plurality of graph databases so as to perform various database operations on the graph database;
creating the graph based on the created metadata and the connected graph database such that the graph carries data for the vertices and the relationships; and
and carrying out visualization processing on the graph so as to carry out various visualization operations on the graph.
A knowledge management method according to an aspect of an embodiment of the present invention, wherein,
enabling various database operations on the graph database specifically includes:
defining a standardized data structure adapted to the multiple kinds of graph databases so as to call corresponding operation sentences of the multiple kinds of graph databases through unified input instructions.
A knowledge management method according to an aspect of an embodiment of the present invention, wherein,
creating the graph based on the created metadata and the linked graph database includes:
when graph data already exists in the graph database that is connected, the graph is generated directly based on the metadata and datasets are synchronized from the graph database into the graph.
A knowledge management method according to an aspect of an embodiment of the present invention, wherein,
creating the graph based on the created metadata and the linked graph database includes:
creating and editing the graph in a customized manner based on the metadata when there is no graph data in the connected graph database, and then writing data of the vertices and the relationships from the connected graph database into the graph.
A knowledge management method according to an aspect of an embodiment of the present invention, wherein,
the visualization operation comprises visualization of a query and visualization of the query result, wherein the visualization of the query specifically comprises:
performing a visualization query according to at least one of attributes of the vertices, the relationships, and attributes of the relationships of the graph;
performing visual query according to a preset sequencing rule;
performing visual query according to a preset combination rule;
performing visual query according to a predetermined order of magnitude; and
and querying through a query language of the graph database.
A knowledge management method according to an aspect of an embodiment of the present invention, wherein,
the visualization operation comprises visualization display by extracting corresponding knowledge structures from the graph according to the input search condition.
A knowledge management method according to an aspect of an embodiment of the present invention, wherein,
when the metadata is created, the metadata can be created and edited by a custom method, or can be created and edited by a file import method.
According to another aspect of an embodiment of the present invention, there is provided a knowledge management system based on a graph database, including:
a metadata creation module to create metadata defining vertices included in a graph, attributes of the vertices, relationships between the vertices, and attributes of the relationships;
a database connection module to connect any one of a plurality of map databases and to enable various database operations to be performed on the map database;
a graph creation module that creates the graph based on the created metadata and the connected graph database such that the graph carries data of the vertices and the relationships; and
a visualization module to enable various visualization operations on the graph.
According to still another aspect of an embodiment of the present invention, there is provided an electronic device for knowledge management based on a graph database, including:
one or more processors; and
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a method according to an aspect of an embodiment of the invention.
According to a further aspect of embodiments of the present invention, there is provided a computer readable medium having stored thereon a computer program, characterized in that the program, when executed by a processor, implements a method according to an aspect of embodiments of the present invention.
One embodiment of the above invention has the following advantages or benefits: because the metadata, namely the schema, can be created in a simple manner, the multiple graph databases are connected and accessed through unified operation, and the graph is generated through the schema and the data of the graph databases and various visual operations can be performed on the graph, the technical problem that unified knowledge management, database support and visual platforms are lacked among the multiple graph databases is solved, and the technical effects that the multiple graph databases are operated through unified standardized instructions, so that the learning, using and managing costs of users on the graph databases are reduced, unified knowledge management is established for the multiple graph databases and visualization is performed are achieved.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of the main flow of a method for knowledge management based on graph databases according to an embodiment of the present invention;
fig. 2 is a view of an example of a created schema visualization graph;
FIG. 3 illustrates predetermined rules and conditions for visually querying and exposing graphs;
FIG. 4 shows an example of a visualization of a graph;
FIG. 5 is a schematic diagram of the major modules of a knowledge management system based on a graph database according to an embodiment of the present invention;
FIG. 6 is a system platform architecture diagram of a knowledge management system based on graph databases, according to an embodiment of the present invention;
FIG. 7 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 8 is a schematic structural diagram of a computer system suitable for implementing a terminal device or a server according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram of the main flow of a knowledge management method based on a graph database according to an embodiment of the present invention, and as shown in fig. 1, the knowledge management method based on a graph database according to an embodiment of the present invention mainly includes: step S101, creating metadata, and defining vertexes, attributes of the vertexes, relations between the vertexes and attributes of the relations included in a graph in the metadata; step S102, connecting any one of a plurality of graph databases to enable various database operations to be carried out on the graph database; step S103, creating the graph based on the created metadata and the connected graph database, so that the graph has the data of the vertex and the relation; and a step S104 of performing visualization processing on the graph so as to perform various visualization operations on the graph.
The steps of the knowledge management method based on a graph database according to an embodiment of the present invention will be described in detail with reference to fig. 2 to 4.
Step S101: creation metadata (schema)
There are two ways to create the schema, one is to design the schema by the user on the knowledge management system platform based on the graph database according to the embodiment of the invention, which will be described later, for example, by means of dragging, and the other is to upload the schema by the own file of the well-known ontology editing and knowledge acquisition software Prot g. The Schema includes vertices, also referred to as "concepts," and edges, i.e., relationships between vertices and vertices. The user needs to define in the schema all the vertices contained in the graph to be obtained, the attributes of the vertices, the relationships that exist between the vertices, and the attributes of the vertices and relationships. The attributes of the vertices include, for example, time, place, scene, usage, and the like, and the attributes of the relationships include, for example, possession, belonging, and the like. The data structures for vertices, relationships, and schema are shown in tables 1-3 below.
TABLE 1 vertex data Structure Table
Figure BDA0002894749320000051
Figure BDA0002894749320000061
As shown in Table 1, the data structure of the vertex includes a concept name, a creator, an updater, and corresponding time, coordinates, and attributes under the concept, etc., wherein the storage structure of the attributes is key, which is a json string of a value structure.
Table 2 relational data Structure table
Field(s) Type (B) Description of the invention
id Int(11) Self-growth of main key
name Varchar(255) Name of relationship
comment Varchar(255) Relationship alias
s_id int(11) Source concept id
t_id int(11) Target concept id
deleted smallint Whether to delete 1 deletion and 0 non-deletion
creator Varchar(30) Creators
create_time timestamp Creating timestamps
modifier Varchar(30) Change person
modify_time timestamp Updating timestamps
schema_id Int(11) Id of Schema
property Varchar(20000) Attribute string of relationships
As shown in table 2, the relationship name, the operator and the time, the coordinates, and the attribute string in the relationship are also recorded in the data structure of the relationship, and the attribute is expressed by key, i.e., json string in the value structure.
Table 3 schema data structure table
Field(s) Type (B) Description of the invention
id Int(11) Self-growth of main key
business Smaillint Service id
name Varchar(255) Name of relationship
comment Varchar(255) Relationship alias
relation_ship varchar(20000) Attribute string
status int(11) State 1 creation 2 publication
deleted smallint Whether to delete 1 deletion and 0 non-deletion
creator Varchar(30) Creators
create_time timestamp Creating timestamps
modifier Varchar(30) Change person
modify_time timestamp Updating timestamps
As shown in table 3, the schema table associates all vertices and relationships of the design with each other through a logical structure.
Using the above data structure and in combination with the currently known AntV G6 framework, the schema is visually presented, and a visual graph of the final schema presentation is shown, for example, in fig. 2. Wherein, the circle represents the vertex, i.e. concept, the characters in the circle represent the attributes of the vertex, such as product, process, use, etc., the arrow represents the side, i.e. the relationship between the vertices, and the characters on the arrow represent the attributes of the vertex and the relationship, such as possession, belonging, containing, etc.
Step S102: connecting databases
When a user has a graph database cluster resource, the user needs to enter connection information including a link address, a port, a user name, password information and the like of the graph database so as to enter cluster information to connect the graph database. For example, graph databases that can be linked include, but are not limited to, neo4j, dgraph abroad, hugeGraph, Tgraph, ByteGraph, joygraph, CBgraph, and the like, domestically. Since the external operations of these databases are different from each other, it is necessary to coordinate various databases. Specifically, a set of unified data structures is defined, and external entry and exit parameters are made into a set of standardized structures, so that database operations on different databases can be realized through unified operations, and the complexity of calling the different databases is simplified, as described later.
On the other hand, for the user without the cluster resource temporarily, the user can refer to the relevant learning document to apply for the cluster resource, and after the application is successful, the connection information of the cluster is input as described above.
The structure of the cluster is shown in the following table, and comprises a cluster address, a type, a service, a creator, an updater, corresponding time, a cluster available state, a cluster entry source and the like.
TABLE 4 Cluster Structure Table
Field(s) Type (B) Description of the invention
id Int(11) Self-growth of main key
name Varchar(255) Name of the drawing
business Int(11) Service id
type Int(11) Database type 1.neo4 j. dgraph 3 Galileo
url varchar(255) Database chaining ground address
Port Int(11) Port number
status Int(11) Cluster status
deleted smallint Whether to delete 1 deletion and 0 non-deletion
creator Varchar(30) Creators
create_time timestamp Creating timestamps
modifier Varchar(30) Change person
modify_time timestamp Updating timestamps
source Int(11) Source (graph database existing graph or empty graph)
Step S103: creating a graph
Where a graph is created and a dataset of a graph database cluster is entered.
There are two ways to create a graph. One is to directly generate a graph based on the created schema and the data of the connected graph database when the graph database has graph data, wherein the graph name defaults to the database cluster name, the system directly synchronizes the schema from the graph database to the mysql database and automatically generates a graph database record, and then the user can edit, supplement and associate the schema id, thereby completing the graph construction. And the other method is that when the connected graph database is an empty cluster, namely no data exists, a user selects a graph-free mode, then creates a graph in a self-defined mode, and sets basic information of the graph, such as name, service, schema id and cluster id, so as to complete the graph construction.
The structure of the graph is shown in the following table, the cluster information and the schema information are integrated, a complete graph structure is constructed, and then the real schema, the vertex and the relation data are synchronized to the bottom layer concrete graph database based on the logic graph.
TABLE 5 structural chart
Field(s) Type (B) Description of the invention
id Int(11) Self-growth of main key
cluster_id Smaillint Cluster ID
name Varchar(255) Name of the drawing
deleted smallint Whether to delete 1 deletion and 0 non-deletion
creator Varchar(30) Creators
create_time timestamp Creating timestamps
modifier Varchar(30) Change person
modify_time timestamp Updating timestamps
schema_id Int(11) Schema id
And after the graph is constructed, data can be input into the graph. Taking the graph databases dgraph and neo4j as examples, reading data of the data warehouse tool hive through a known module sparkSQL of a computing engine spark for processing structured data to generate a cache component of the data in the memory, i.e. a DataSet, and then calling a write function DataSet of the DataSet component.
In the method of the embodiment of the invention, the data of the vertexes and the relations are imported in a batch mode in a uniform template mode because the data volume needing to be imported can be very large.
The template file needs to be generated locally first. For example, a local execl template file is generated by using open-source easy execl, and the template is specifically formed as follows: the concept (vertex) template is generated into an execl file with multiple sheet names, wherein the sheet names are names of the concepts, and the header of each sheet is the attribute name of each concept. Similarly, the relationship template is generated into an execute file with multiple sheet names, wherein the sheet names are relationship names, the header of each sheet is the attribute of the relationship, and the first column and the second column are the main key name of the start node and the main key name of the end node respectively. Specific codes are as follows.
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
response.setCharacterEncoding("utf-8");
response.setheader ("Content-disposition", "attribute" + urencoder. encode ("concept template" + ". xlsx", "UTF-8"));
ExcelWriter excelWriter=EasyExcel.write(response.getOutputStream()).build();
WriteSheet ws=EasyExcel.writerSheet(sheetNo,graphConcept.getName()).head(headList).build();
sheetNo++;
excelWriter.write(new ArrayList(),ws);
excelWriter.finish();
and after the template file is generated, the data can be imported in a local file mode. Specifically, reading the data file of execl, and constructing json format data as follows:
Figure BDA0002894749320000111
Figure BDA0002894749320000121
wherein, the outermost layer is nodes of nodes and relations. "nodes" is a collection, each object comprising a collection of labels and attributes of a concept, each attribute comprising an attribute name, an attribute value, whether it is a primary key, and a data type; "relationships" is also a set, and each object includes the starting concept "start" and the ending concept "end", the names of the starting concept and the ending concept included in "start" and "end", the primary key sub-segments, the primary key type, and the values of the primary key sub-segments. And then, calling respective graph insertion statements of different graph databases in batch through the thread pool by using the uniform data structure, and finishing the execl uploading to import data into the graph, thereby finishing the graph creation.
Step S104: visualization process
And performing visualization processing after the graph is created. An index structure is first established. The index structure comprises vertex indexes and relationship indexes, wherein the vertex indexes are all established on attributes of the vertices, the relationship indexes can be established on edges or the attributes of the edges, and specific codes are as follows:
Figure BDA0002894749320000122
Figure BDA0002894749320000131
Figure BDA0002894749320000141
and then establishing a visual query function. The visualized query data structure includes attribute combination mode of query vertex and relation, query limit rule and query type, and the specific rule and type includes sorting rule and magnitude, etc., as shown in fig. 3.
Figure BDA0002894749320000142
Figure BDA0002894749320000151
Predetermined search conditions are next set so that the contents of the graph can be searched by the search conditions. The setting of search criteria is shown in fig. 3, including but not limited to point and edge conditional search, conditional filtering, etc. The result of the search is presented as a visual knowledge structure, as shown in fig. 4, which shows the relationship between two vertices and their respective schema coordinates.
The above briefly describes a method of knowledge management based on graph databases according to an embodiment of the present invention. A diagram database based knowledge management system 200 according to an embodiment of the present invention that implements the above method is described below in conjunction with FIG. 5.
As shown in FIG. 5, a knowledge management system 200 based on a graph database according to an embodiment of the invention mainly includes a metadata creation module 201, a database connection module 202, a graph creation module 203, and a visualization module 204. The respective modules are specifically described below.
Metadata creation module 201
The metadata creating module 201 is used for creating a schema, and is divided into two sub modules, namely a schema design module and a schema generation module, a user can create the schema in a dragging, pulling and dragging manner on a platform of a system through the schema design module, a user who has the schema can upload an own file to the platform of the system through the schema generation module to create the schema, edit and modify the schema, and define what vertices and relationships between the vertices are included in a graph and attributes of the vertices and the relationships.
Database connection module 202
The database connection module 202 is used to connect various database databases and cause various database operations to be performed on the various database databases. The database connection module 202 includes a cluster resource entry sub-module and a database coordination sub-module. A user uses a cluster resource entry sub-module to enter connection information of any one of a plurality of graph databases to be used, such as a link address and a port of the graph database, a user name and password information, so as to subsequently enter database cluster resources.
And the database coordination module uses the adapter to coordinate the input bottom-layer database. Specifically, for any graph database selected by a user, a set of unified data structure can be defined for multiple graph databases with different external operations through the integration of the database integration module, so that external participation and participation are a set of standardized structures, and the user can operate multiple graph databases by using the same set of operation language, thereby unifying the operation language of the database and reducing the calling complexity of an external system.
Graph creation module 203
The graph creation module 203 is used to create graphs with vertices and relationships based on the created schema and the data of the connected graph database. The diagram creation module 203 includes a diagram design module, a diagram generation module, and a data import module. For a user in an existing diagram, after the user is successfully connected with a database, a diagram is automatically generated by the system through the diagram generation module, the diagram name defaults to an input cluster name, the user can edit the diagram, bind the schema by associating the schema id and input a data set through the data import module to create the diagram. For users without maps, after the users are successfully connected to the database, the users can design their own maps through the map design module, set the basic information of the maps, such as names, services, schema ids and cluster ids, and then can also perform data set entry through the data import module.
Visualization module 204
The visualization module 204 is used to enable various visualization operations, such as visualization queries and visualization presentations, on the created graph. In an embodiment of the present invention, the visualization module 204 includes a visualization query module and a visualization presentation module.
The visual query module supports query according to attributes, relations and attributes of relations of the vertices of the graph and predetermined query rules and query types, such as a query node and relation attribute combination mode, a query restriction rule and a query type. In addition, the visual query module supports queries in a query language over various graph databases.
The visualization display module supports extracting corresponding knowledge structures from the graph according to a preset search condition for displaying. For example, after the user imports the vertices and the relationships, a set of knowledge structures as shown in fig. 4 is obtained as a search result by setting various query conditions and rules as shown in fig. 3, and then the relationships between data, such as a shortest path, a full path, a pageRank, a connected subgraph, a collaborative recommendation, and the like between two points, can be analyzed.
FIG. 6 illustrates a specific platform architecture of a knowledge management system based on graph databases, according to an embodiment of the present invention. As shown in fig. 6, the system is divided from left to right and from bottom to top: the persistence engine is used for storing real data; a compute engine, such as spark; the diagram database layer is used for storing data; the adaptation layer is used for realizing the integration of the bottom database so as to operate different graph databases in a unified way; the application layer can realize functions including data analysis OLAP and online transaction OLTP; the database calling layer supports unified structure query and also supports query through a specific graph database query language, so that developers familiar with graph databases can use the graph databases conveniently; and the data enabling layer supports returning the data to the service in an API mode and visually checking the data through a visualization tool of the system platform.
The right side of fig. 6 shows an external intuitive system diagram of the system platform, and users can access the menus through domain names and configure corresponding user rights and schemas and visually displayed interfaces for the graph database, so as to perform various management and applications.
The foregoing describes a method and system for graph-based knowledge management in accordance with embodiments of the present invention. According to the knowledge management method and system based on the graph database, a user can be supported to simply construct a set of knowledge management of the knowledge graph, namely schema management, in a dragging and pulling mode, so that a set of knowledge base is constructed, then the constructed schema is utilized, a set of graphs are constructed by combining the type of the graph database recorded by the user on a platform and the connection parameters of the database, templates of imported data and hive synchronous data are provided to the graph database templates to import vertex and side data, the user is not required to write the import language of the corresponding graph database, and finally a universal graph visualization constructed by using AntV G6 is provided to perfectly display the graph data.
By using the knowledge management method and system based on the graph database, the schema can be created in a simple mode, various graph databases are connected and called through unified operation, the graph is generated through the schema and the data of the graph databases, and various visual operations can be performed on the graph, so that the technical problem that unified knowledge management, database support and a visual platform are lacked among the various graph databases is solved, the purposes of operating the various graph databases through unified standardized instructions, reducing the learning, using and managing costs of users on the graph databases, and establishing unified knowledge management and performing the visual technical effects on the various graph databases are achieved.
FIG. 7 illustrates an exemplary system architecture 700 of a knowledge management method based on a graph database or a knowledge management system based on a graph database to which embodiments of the present invention may be applied.
As shown in fig. 7, the system architecture 700 may include terminal devices 701, 702, 703, a network 704, and a server 705. The network 704 serves to provide a medium for communication links between the terminal devices 701, 702, 703 and the server 705. Network 704 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 701, 702, 703 to interact with a server 705 over a network 704, to receive or send messages or the like. The terminal devices 701, 702, 703 may have installed thereon various communication client applications, such as a shopping-like application, a web browser application, a search-like application, an instant messaging tool, a mailbox client, social platform software, etc. (by way of example only).
The terminal devices 701, 702, 703 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 705 may be a server providing various services, such as a background management server (for example only) providing support for shopping websites browsed by users using the terminal devices 701, 702, 703. The backend management server may analyze and perform other processing on the received data such as the product information query request, and feed back a processing result (for example, target push information, product information — just an example) to the terminal device.
It should be noted that the knowledge management method based on a graph database provided by the embodiment of the present invention is generally executed by the server 705, and accordingly, a knowledge management system based on a graph database is generally disposed in the server 705.
It should be understood that the number of terminal devices, networks, and servers in fig. 7 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 8, shown is a block diagram of a computer system 800 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 8 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 8, the computer system 800 includes a Central Processing Unit (CPU)801 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data necessary for the operation of the system 800 are also stored. The CPU 801, ROM 802, and RAM 803 are connected to each other via a bus 804. An input/output (I/O) interface 805 is also connected to bus 804.
The following components are connected to the I/O interface 805: an input portion 806 including a keyboard, a mouse, and the like; an output section 807 including a signal such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 808 including a hard disk and the like; and a communication section 809 including a network interface card such as a LAN card, a modem, or the like. The communication section 809 performs communication processing via a network such as the internet. A drive 810 is also connected to the I/O interface 805 as necessary. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as necessary, so that a computer program read out therefrom is mounted on the storage section 808 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 809 and/or installed from the removable medium 811. The computer program executes the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 801.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The modules described may also be provided in a processor. Wherein the names of the modules do not in some cases constitute a limitation of the module itself.
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: creating metadata, and defining vertexes contained in a graph, attributes of the vertexes, relations between the vertexes, and attributes of the relations in the metadata; connecting any one of a plurality of graph databases so as to perform various database operations on the graph database; generating the graph based on the created pattern and the graph database of connections, and writing data of the vertices and the relations into the graph; and performing visualization processing on the graph so as to perform various visualization operations on the graph.
According to the technical scheme of the embodiment of the invention, the schema can be created in a simple manner, the multiple graph databases are connected and called through unified operation, the graph is generated through the schema and the data of the graph databases, and various visual operations can be performed on the graph, so that the technical problems of lack of unified knowledge management, database support and visual platforms among the multiple graph databases are solved, and the technical effects of operating the multiple graph databases through unified standardized instructions, reducing the learning, using and managing costs of users on the graph databases, establishing unified knowledge management on the multiple graph databases and performing visualization are achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for knowledge management based on graph databases, comprising:
creating metadata, and defining vertexes included in a graph, attributes of the vertexes, relations between the vertexes, and attributes of the relations in the metadata;
connecting any one of a plurality of graph databases so as to perform various database operations on the graph database;
creating the graph based on the created metadata and the connected graph database such that the graph carries data for the vertices and the relationships; and
and carrying out visualization processing on the graph so as to carry out various visualization operations on the graph.
2. The knowledge management method of claim 1, wherein,
enabling various database operations on the graph database specifically includes:
defining a standardized data structure adapted to the multiple kinds of graph databases so as to call corresponding operation sentences of the multiple kinds of graph databases through unified input instructions.
3. The knowledge management method according to claim 1 or 2, wherein,
creating the graph based on the created metadata and the linked graph database includes:
when graph data already exists in the graph database that is connected, the graph is generated directly based on the metadata and datasets are synchronized from the graph database into the graph.
4. The knowledge management method according to claim 1 or 2, wherein,
creating the graph based on the created metadata and the linked graph database includes:
creating and editing the graph in a customized manner based on the metadata when there is no graph data in the connected graph database, and then writing data of the vertices and the relationships from the connected graph database into the graph.
5. The knowledge management method according to claim 1 or 2, wherein,
the visualization operation comprises visualization of a query and visualization of the query result, wherein the visualization of the query specifically comprises:
performing a visualization query according to at least one of attributes of the vertices, the relationships, and attributes of the relationships of the graph;
performing visual query according to a preset sequencing rule;
performing visual query according to a preset combination rule;
performing visual query according to a predetermined order of magnitude; and
and querying through a query language of the graph database.
6. The knowledge management method according to claim 1 or 2, wherein,
the visualization operation comprises visualization display by extracting corresponding knowledge structures from the graph according to the input search condition.
7. The knowledge management method according to claim 1 or 2, wherein,
when the metadata is created, the metadata can be created and edited by a custom method, or can be created and edited by a file import method.
8. A system for knowledge management based on a graph database, comprising:
a metadata creation module to create metadata defining vertices included in a graph, attributes of the vertices, relationships between the vertices, and attributes of the relationships;
a database connection module to connect any one of a plurality of map databases and to enable various database operations to be performed on the map database;
a graph creation module that generates the graph based on the metadata created and writes data of the vertices and the relationships into the graph based on the graph database of connections; and
a visualization module to enable various visualization operations on the graph.
9. An electronic device for knowledge management based on a graph database, comprising:
one or more processors; and
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN202110037144.4A 2021-01-12 2021-01-12 Knowledge management method and system based on graph database Active CN113779313B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110037144.4A CN113779313B (en) 2021-01-12 2021-01-12 Knowledge management method and system based on graph database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110037144.4A CN113779313B (en) 2021-01-12 2021-01-12 Knowledge management method and system based on graph database

Publications (2)

Publication Number Publication Date
CN113779313A true CN113779313A (en) 2021-12-10
CN113779313B CN113779313B (en) 2024-06-18

Family

ID=78835412

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110037144.4A Active CN113779313B (en) 2021-01-12 2021-01-12 Knowledge management method and system based on graph database

Country Status (1)

Country Link
CN (1) CN113779313B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016101301A1 (en) * 2014-12-25 2016-06-30 广东电子工业研究院有限公司 Objectification and virtualization mechanism for mode of relational database table
US20200042642A1 (en) * 2018-08-02 2020-02-06 International Business Machines Corporation Implicit dialog approach for creating conversational access to web content
CN110929042A (en) * 2019-11-26 2020-03-27 昆明能讯科技有限责任公司 Knowledge graph construction and query method based on power enterprise
CN111708892A (en) * 2020-04-24 2020-09-25 陆洋 Database system based on depth knowledge graph

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016101301A1 (en) * 2014-12-25 2016-06-30 广东电子工业研究院有限公司 Objectification and virtualization mechanism for mode of relational database table
US20200042642A1 (en) * 2018-08-02 2020-02-06 International Business Machines Corporation Implicit dialog approach for creating conversational access to web content
CN110929042A (en) * 2019-11-26 2020-03-27 昆明能讯科技有限责任公司 Knowledge graph construction and query method based on power enterprise
CN111708892A (en) * 2020-04-24 2020-09-25 陆洋 Database system based on depth knowledge graph

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
BONGSHIN LEE: "SketchStory: Telling More Engaging Stories with Data through Freeform Sketching", IEEE, 16 October 2013 (2013-10-16) *
王丽娟;龚渊博;: "知识图谱数据管理系统设计", 电脑与信息技术, no. 01, 15 February 2017 (2017-02-15) *

Also Published As

Publication number Publication date
CN113779313B (en) 2024-06-18

Similar Documents

Publication Publication Date Title
US10672163B2 (en) Layout algorithm for entity relation model diagram
US10216814B2 (en) Supporting combination of flow based ETL and entity relationship based ETL
CN110781236A (en) Method for constructing government affair big data management system
US11847040B2 (en) Systems and methods for detecting data alteration from source to target
CN111177231A (en) Report generation method and report generation device
US9507838B2 (en) Use of projector and selector component types for ETL map design
US10338894B2 (en) Generating applications based on data definition language (DDL) query view and application page template
US11860832B2 (en) Custom columns for static logical models
WO2024001493A1 (en) Visual data analysis method and device
CN114925143A (en) Method, device, equipment, medium and product for describing logical model blood relationship
CN110889013B (en) Data association method, device, server and storage medium based on XML
CN116594683A (en) Code annotation information generation method, device, equipment and storage medium
WO2023123182A1 (en) Multi-source heterogeneous data processing method and apparatus, computer device and storage medium
US11663199B1 (en) Application development based on stored data
Szekely et al. Exploiting semantics of web services for geospatial data fusion
US20210264312A1 (en) Facilitating machine learning using remote data
CN117170655A (en) Metadata processing method and device, data processing equipment and storage medium
CN113779313B (en) Knowledge management method and system based on graph database
KR20230171986A (en) Dynamic graphics containers
CN113760240B (en) Method and device for generating data model
US9886520B2 (en) Exposing relationships between universe objects
CN113689198A (en) Project file generation method and device, storage medium and terminal equipment
Simon et al. Tag clouds and old maps: Annotations as linked spatiotemporal data in the cultural heritage domain
CN113692582B (en) User interface for establishing a data privacy pipeline and contract agreement to share data
US9679010B2 (en) Methods, systems, and apparatus for search of electronic information attachments

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant