CN111767412B - Data mapping method and system for knowledge graph construction and electronic equipment - Google Patents

Data mapping method and system for knowledge graph construction and electronic equipment Download PDF

Info

Publication number
CN111767412B
CN111767412B CN202010907995.5A CN202010907995A CN111767412B CN 111767412 B CN111767412 B CN 111767412B CN 202010907995 A CN202010907995 A CN 202010907995A CN 111767412 B CN111767412 B CN 111767412B
Authority
CN
China
Prior art keywords
edge
node
user
same page
event
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.)
Active
Application number
CN202010907995.5A
Other languages
Chinese (zh)
Other versions
CN111767412A (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.)
Chengdu Business Big Data Technology Co Ltd
Original Assignee
Chengdu Business Big Data 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 Chengdu Business Big Data Technology Co Ltd filed Critical Chengdu Business Big Data Technology Co Ltd
Priority to CN202010907995.5A priority Critical patent/CN111767412B/en
Publication of CN111767412A publication Critical patent/CN111767412A/en
Application granted granted Critical
Publication of CN111767412B publication Critical patent/CN111767412B/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/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/36Creation of semantic tools, e.g. ontology or thesauri
    • G06F16/367Ontology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/80Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
    • G06F16/84Mapping; Conversion
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Animal Behavior & Ethology (AREA)
  • Computational Linguistics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention relates to a data mapping method and a data mapping system for knowledge graph construction and electronic equipment, wherein the method comprises the following steps: monitoring the events of the user which finish the following operations in sequence under the same page: the operation of nodes or edges in the ontology model, and the operation of fields in a node table or an edge table; if the event that the user completes the operation under the same page is monitored, a mapping relation between the node and the node table is established, or a mapping relation between the edge and the edge table is established. The scheme can simultaneously solve the problems of improving the data mapping processing efficiency, improving the user experience and reducing the calculation amount of the server.

Description

Data mapping method and system for knowledge graph construction and electronic equipment
Technical Field
The invention relates to the technical field of knowledge graphs, in particular to a data mapping method and system for knowledge graph construction and electronic equipment.
Background
Knowledge map (Knowledge Graph) is a series of different graphs displaying Knowledge development process and structure relationship in the book intelligence field, describing Knowledge resources and carriers thereof by using visualization technology, mining, analyzing, constructing, drawing and displaying Knowledge and mutual relation between Knowledge resources and Knowledge carriers. As a representative technique of knowledge representation, a knowledge graph describes concepts, entities, events and their interrelations of an objective world, and has become an important way to construct a data-information-knowledge.
The construction of the knowledge graph mainly comprises the following steps: the method comprises the steps of data access, ontology modeling, data mapping and map generation, wherein the data mapping is to convert source data into gallery data required by the map generation. The data mapping is a difficult point for user operation and use in the process of establishing a knowledge graph, and the reason is that when the data mapping is carried out at present, even if a very simple ontology model is aimed at, a plurality of pieces of mapping data (tables) need to be established, one piece of mapping data is an expression of a mapping relation, and the corresponding data is manually input to form one piece of data when the mapping data is established, the more attributes are involved in the mapping data, the larger the input quantity is, the lower the efficiency is, the larger the input quantity is, fatigue is easily caused, each piece of mapping data is established on an independent page, and a user needs to repeatedly operate under different pages when different pieces of mapping data are established, so that the user experience is very poor. Moreover, the mapping data is directly stored in the server database, and a data storage request is sent by the server every time a mapping data is constructed, so that the processing pressure of the server is high, and the cost is high.
Disclosure of Invention
The invention aims to overcome the defects in the prior art, and provides a data mapping method and a data mapping system for knowledge graph construction, so as to improve the processing efficiency of data mapping and improve the user experience.
In order to achieve the above object, the embodiments of the present invention provide the following technical solutions:
in one aspect, an embodiment of the present invention provides a data mapping method for knowledge graph construction, including:
monitoring the events of the user which finish the following operations in sequence under the same page: the operation of nodes or edges in the ontology model, and the operation of fields in a node table or an edge table;
if the event that the user completes the operation under the same page is monitored, a mapping relation between the node and the node table is established, or a mapping relation between the edge and the edge table is established.
In the above scheme, for the local computer, it is only required to monitor whether the user has completed the operations on the nodes or edges in the ontology model and the fields in the node table or the edge table in sequence, and if yes, a data mapping relationship is established without frequently jumping pages. For a user, the ontology model and the node table or the edge table only need to be operated under one page, a large amount of data do not need to be manually input, different pages do not need to be frequently closed and opened, and the method is simple to operate and high in efficiency. For the server, the data storage request of the local computer does not need to be processed frequently, so the calculation amount of the server can be greatly reduced, the server can be executed by the server with lower cost instead, and the cost of the server is reduced. That is to say, this scheme can solve the problem that improves data mapping processing efficiency, promotes user experience, reduces server operand simultaneously.
In the data mapping method for constructing the knowledge graph, the operations on the nodes or edges in the ontology model are as follows: selecting operation on nodes or edges in the ontology model, wherein the operation on fields in the node table or the edge table is as follows: and dragging the fields in the node table or the edge table.
According to the scheme, the user can complete data mapping only by performing simple selection and dragging operations, and compared with the operation of manually inputting a large amount of data in the traditional method, the data mapping method greatly reduces the processing amount of the user, improves the user experience, can ensure the accuracy of the data, and avoids the situation of input errors in manual input. That is to say, this scheme can solve the problem that promotes user experience and guarantee data accuracy simultaneously.
According to the data mapping method for establishing the knowledge graph, if the occurrence of an event that a user completes the operation on the same page is monitored, the step of establishing the mapping relation comprises the following steps: when an event of the user selecting the node or the edge in the body model is monitored to occur, displaying a configuration source field text box of the selected node or edge under the same page; when monitoring that an event that a user drags a field in a node table or an edge table to a configuration source field text box of the node or the edge occurs, establishing a mapping relation between the node and the node table or establishing a mapping relation between the edge and the edge table.
In the scheme, the configuration source field text box of the selected node or edge is displayed on the same page, so that the operation of a user is facilitated; when it is monitored that the user drags the fields in the node table or the edge table to the configuration source field text box of the node or the edge, the mapping relation is established, otherwise, the mapping relation is not established, and the data mapping error caused by the misoperation of the user can be avoided, so that the scheme not only has simple user operation, but also can further ensure the accuracy of the processing result. That is to say, the scheme can simultaneously solve the problems of simplifying user operation and guaranteeing the accuracy of processing results.
The data mapping method for constructing the knowledge graph, when it is monitored that a user drags fields in a node table or an edge table to a configuration source field text box of the node or the edge, the step of establishing the mapping relation between the node table and the node table or the step of establishing the mapping relation between the edge and the edge table, includes the steps of: when the clicking operation of a user on fields in a node table or an edge table is monitored, the table name and the field name of the currently clicked node table or edge table are recorded; when monitoring that a user drags fields in a selected node table or edge table to a configuration source field text box of the node or edge, mapping the recorded table names and field names of the node table or edge table to corresponding document object models to complete the establishment of the mapping relation.
The data mapping method for knowledge graph construction further comprises the following steps before monitoring events of user operation on edges or nodes in the ontology model: monitoring an event of selecting or newly establishing the operation of the body model by a user under the same page; and when monitoring that the event of the selection or new establishment operation of the user on the ontology model occurs in the same page, displaying the selected or newly established ontology model in the same page.
In the scheme, the imported ontology model is displayed on the same page, or the ontology model can be directly created, so that the user operation is facilitated, the method is very visual, and the accuracy of selecting the nodes and edges in the ontology model is guaranteed. Since the processing efficiency can be further increased by importing the onto-model, it is preferable to load the model data by importing the onto-model.
Before monitoring an event of an operation of a user on a field in a node table or an edge table, the data mapping method for the construction of the knowledge graph further comprises the following steps: and monitoring events of the user for the selection operation of the node table or the edge table under the same page, and displaying a field textbox of the selected node table or the selected edge table on the same page when the events of the user for the selection operation of the node table or the edge table under the same page are monitored.
The data mapping method for knowledge graph construction further comprises the following steps before the step of monitoring the event of the selected operation of the user on the node table or the edge table under the same page: and displaying the imported node table and the imported edge table under the same page.
In the scheme, the data of the node table and the data of the edge table are imported in advance, and the table names are displayed, so that the operation of a user can be facilitated. In addition, the node table and the edge table are displayed under the same page, so that the user can further conveniently select the node table and the edge table.
The data mapping method for constructing the knowledge graph, wherein the step of displaying the table names of the node table or the edge table under the same page, comprises the following steps: and respectively carrying out longitudinal display and transverse display on the table names of the node table or the edge table on the same page.
In the scheme, the table names of the node tables or the edge tables are displayed horizontally and vertically under the page, so that the operation of a user is further facilitated, the user can conveniently check whether the selected node tables or the selected edge tables are correct, and the risk of misoperation is reduced.
The data mapping method for knowledge graph construction further comprises the following steps: monitoring an event of the clicking operation of the user on the saving button, and sending a data saving request to the server when the event of the clicking operation of the user on the saving button is monitored to occur.
In the scheme, the data storage request is sent to the server only when the occurrence of the event of the clicking operation of the user on the storage button is monitored so as to store the mapping relation, and compared with the traditional direct storage mode, on one hand, the mapping relation can be stored after a plurality of mapping relations are established, and then the processing capacity of the server is reduced; on the other hand, when the user operation error exists, the error data can be directly modified without storing an error data, then finding out the error data and modifying the error data, so that the user operation is facilitated, the processing capacity of the user is reduced, the data storage times of the server are reduced, and the pressure of the server is reduced. That is, the present solution can solve the problem of reducing the server throughput.
In another aspect, an embodiment of the present invention provides a data mapping system for knowledge graph construction, including:
the event monitoring module is configured to monitor events of a user which complete the following operations in sequence under the same page: the operation of nodes or edges in the ontology model, and the operation of fields in a node table or an edge table;
and the data mapping module is configured to establish a mapping relation between the nodes and the node table or between the edges and the edge table when monitoring that the event that the user completes the operation on the same page occurs.
The data mapping system for knowledge graph construction, wherein the data mapping module is specifically configured to: when an event of the user selecting the node or the edge in the body model is monitored to occur, displaying a configuration source field text box of the selected node or edge under the same page; and when monitoring that the user drags the fields in the node table or the edge table to the configuration source field text box of the node or the edge, establishing a mapping relation between the node and the node table or establishing a mapping relation between the edge and the edge table.
The data mapping module is configured to record a table name and a field name of a currently clicked node table or edge table when clicking operation of a user on fields in the node table or edge table is monitored; and when monitoring that the user drags the fields in the selected node table or edge table to the configuration source field text box of the node or edge, mapping the recorded table names and field names of the node table or edge table to the corresponding document object model to complete the establishment of the mapping relation.
The data mapping system for knowledge graph construction further comprises a model importing module, wherein the model importing module is configured to import the ontology model and display a search text box for selecting the ontology model in the same page.
The data mapping system for constructing the knowledge graph further comprises a data importing module, wherein the data importing module is configured to import a node table and an edge table, and display a table name of the node table and a table name of an edge table on the same page.
The data mapping system for knowledge graph construction further comprises a request sending module, and the request sending module is configured to send a data storage request to the server when an event that a user clicks a storage button is monitored.
In a third aspect, an embodiment of the present invention provides an electronic device, including: a memory storing program instructions; and the processor is connected with the memory and executes the program instructions in the memory to realize the steps in the data mapping method for knowledge graph construction according to any embodiment of the invention.
Compared with the prior art, the method and the system of the invention finish the operation of the nodes or edges in the body model and the operation events of the fields in the node table or the edge table in sequence by monitoring the user on the same page, and establish the mapping relation between the nodes and the node table or between the edges and the edge table when the events occur, thereby having the following technical advantages:
1) for a local computer, it is only required to monitor whether a user completes operations on nodes or edges in the ontology model and fields in the node table or the edge table in sequence, and if so, a data mapping relationship is established without frequently jumping to a page or frequently sending a data storage request to a server.
2) For the server, the data storage request of the local computer does not need to be processed frequently, so the calculation amount of the server can be greatly reduced, the server can be executed by the server with lower cost instead, and the cost of the server is reduced.
3) For a user, the ontology model and the node table or the edge table only need to be operated under one page, for example, selection or dragging operation, a large amount of data does not need to be manually input, and different pages do not need to be frequently switched or closed and opened, so that the operation is simple and the efficiency is high.
4) The user only performs simple selection or dragging operation, and the accuracy of the data can be guaranteed.
Other advantages of the invention will be apparent from the detailed description which follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
FIG. 1 is a flow chart of the data mapping method for knowledge-graph construction described in example 1.
FIG. 2a is a schematic diagram of a user operation page in the embodiment; FIG. 2b is a schematic view of region 1; FIG. 2c is a schematic view of region 2; FIG. 2d is a schematic view of region 3; fig. 2e is a schematic view of region 4.
FIG. 3 is a flow chart of the data mapping method for knowledge-graph construction described in example 2.
FIG. 4 is a schematic block diagram of a data mapping system for knowledge-graph construction as described in an embodiment.
Fig. 5 is a block diagram showing the components of the electronic apparatus described in the embodiment.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
Example 1
Referring to fig. 1, the data mapping method for knowledge graph construction provided in this embodiment includes the steps of:
s10, monitoring the events of the user completing the following operations in sequence under the same page: selecting operation on nodes or edges in the ontology model, and dragging operation on fields in the node table or the edge table.
The ontology model includes nodes and edges, and the edges represent the association relationship between the nodes, as shown in fig. 2a and fig. 2 b.
The node table is used for importing node data in the graph, each type of node is established as a node table, the type of the node is the type of an entity, one type of entity is a type of node, different mapping tables corresponding to the nodes can be regarded as different types of nodes, for example, a table vertex _ person recording personal information corresponds to a node with a node type of person, and a table vertex _ acout recording account information corresponds to a node with a type of account.
The edge table is used for connecting the relationship between the nodes, and each relationship between the nodes establishes a relationship table, also called an edge table. The definition of the relationship type can be that the same association relationship can be regarded as a type of relationship, such as edge _ person _ has _ account for recording the relationship between the person and the account, and edge _ person _ invast _ company for recording the relationship between the person and the investment company.
The node table must contain a field as a unique ID (e.g., uid in FIG. 2 c) for the node uid in the ontology model to correspond to when mapping data; the edge table must contain a field as a unique ID (not mandatory named uid) for the uid corresponding to the edge in the ontology model when data is mapped; the edge table must also contain a field as a starting unique identifier ID (not mandatory named startnode) and may also contain a field as an ending unique identifier ID (not mandatory named endnode) for the startnode and endnode of the edge in the ontology model when mapping data.
Different ontology models correspondingly require different node tables and edge tables. In this step, the ontology model, the node table and the edge table are on the same page to facilitate user operation.
It is easy to understand that, establishing the mapping relationship between the node and the node table requires using data to the node and the node table in the ontology model, and establishing the mapping relationship between the edge and the edge table requires using data to the edge and the edge table in the ontology model, so that operations on the node or the edge in the ontology model and operations on the field in the node table or the edge table include two cases, the first case is operations on the node in the ontology model and operations on the field in the node table, and the second case is operations on the edge in the ontology model and operations on the field in the edge table. When the event of the first condition is monitored, the mapping relation between the nodes and the node table is established. And when the occurrence of the event of the second condition is monitored, establishing the mapping relation between the edge and the edge table.
It should be noted that, in this step, the operation on the node or the edge in the ontology model is a selection operation, and the operation on the field in the node table or the edge table is a drag operation, so that the computer can know which data objects are used for establishing the mapping relationship, and the user can operate the data objects conveniently. In other embodiments, other operations may be used, such as copy operations for nodes or edges in the ontology model and copy and paste operations for fields in the node table or edge table. Obviously, the specific operation mode of the user is not the main point of the limitation of the method of the present invention, and the method of the present invention does not limit this.
And S20, if the event that the user completes the operation under the same page is monitored, establishing a mapping relation between the nodes of the ontology model and the node table, or establishing a mapping relation between the edges of the ontology model and the edge table.
Generally speaking, most users are more accustomed to using a mouse to perform corresponding operations, and therefore, taking the example that the user performs the operations through the mouse, if a click event to a node or an edge in the ontology model is monitored, it is considered that the user's selected operation to the node or the edge in the ontology model is monitored; if the events of mouse down, mouse move and mouse up of the user on the fields in the node table or the edge table are continuously monitored, the dragging operation of the user on the fields in the node table or the edge table is considered to be monitored.
In this step, for example, when it is monitored that a mousedown event of a user to a field in a node table occurs, a currently clicked element table name (i.e., a table name of the node table) and a field name are recorded; and then, when the user monitors the Mousemovve and the Mouseup of the fields in the selected node table in sequence, the recorded table names and the field names of the node table are mapped to the corresponding document object model, and the establishment of the mapping relation between the nodes in the body model and the node table is completed.
When a mousedown event of a user for a field in the side table is monitored, recording a table name and a field name of the currently clicked side table; and then, when the user monitors the Mousemovve and the Mouseup of the fields in the selected edge table in sequence, mapping the recorded table name and the field name of the edge table to the corresponding DOM to complete the establishment of the mapping relation between the edges and the edge table in the ontology model.
There are various ways to map the table name and field name of the recorded node table to the Document Object Model, for example, it may be to send an input message to a corresponding DOM (Document Object Model) through a dispatchEvent.
In the method of the embodiment, the user only needs to perform simple operations such as selection of a node or an edge, and dragging of a field of a multi-node table or an edge table, so that data mapping can be realized, and the user operation is extremely simple and convenient.
Example 2
Referring to fig. 3, the data mapping method for knowledge graph construction provided in this embodiment includes the steps of:
s100, monitoring an event of the selection operation of the user on the ontology model in a page, and if the event is monitored to occur, displaying the ontology model selected by the user in the page.
For example, as shown in fig. 2a, the page shown in fig. 2a is divided into 4 regions, one region being represented by a solid-line box. From left to right, the first solid line frame on the left is defined as region 1, the solid line frame on the upper side is defined as region 2, the solid line frame on the lower left side is defined as region 3, and the solid line frame on the lower right side is defined as region 4. In area 3, as shown in fig. 2d, a search text box is presented through which the desired onto-model can be selected. Upon selection, the selected onto-model is presented in the area. It is easy to understand that the page shown in fig. 2a is only a schematic illustration, and the method is not limited to the specific layout of each region.
In this step, the ontology model needs to be imported in advance for the user to select. The ontology model may be imported by locally uploading, for example, a CSV file, or connecting a database to obtain source data, backing up and importing the source data into a local computer, and disconnecting the source data from the database after the importing is successful, so as to avoid the influence of modifying the source data in the database.
If the selectable ontology model is not imported in advance, new creation is needed, and the operation process of the new ontology model can be displayed in the page, such as the area 3.
Here, the implementation of monitoring whether an event of the selection operation of the user on the ontology model occurs may be monitoring a click event, for example, if the click event is monitored twice in succession, determining that the event of the selection operation of the user on the ontology model occurs.
In addition, comprehensive judgment can be carried out in combination with the occurrence position of the click event, for example, whether the user performs the selection operation on the body model is comprehensively determined according to the position of the mouse light spot in the page and whether the click event is monitored twice in succession. For example, if the area 3 of the mouse spot in the page is located and two consecutive click events are monitored, it is determined that an event occurs for monitoring the selection operation of the body model by the user.
S200, monitoring an event of the selection operation of the user on the node table or the edge table on the same page, and displaying a field textbox of the selected node table or the selected edge table on the same page when the event of the selection operation of the user on the node table or the edge table on the same page is monitored.
That is to say, when an event of the selection operation of the user on the node table under the same page is monitored, a field text box of the selected node table is displayed on the page; when the event that the user selects the edge list under the same page is monitored, the field text box of the selected edge list is displayed on the page. For example, as shown in FIG. 2c, the node table in this example contains two fields, person _ name and uid.
Here, the implementation of monitoring whether an event of the operation selected by the user on the node table or the edge table occurs may also be monitoring a click event, and may also be performing comprehensive judgment in combination with the position of the mouse spot. For example, locating the mouse spot in area 2 of FIG. 2a and listening for a click event, an event is determined to occur that is listening for a user's selected operation on the node table or edge table.
Similarly, the node table and the edge table need to be imported in advance for the user to select. The ontology model may be imported by locally uploading, for example, a CSV file, or connecting a database to obtain source data, backing up and importing the source data into a local computer, and disconnecting the source data from the database after the importing is successful, so as to avoid the influence of modifying the source data in the database. After the node table and the edge table are successfully imported, the table names of the imported node tables and the table edges are displayed on the same page, so that a user can conveniently implement selection operation.
For example, as shown in fig. 2b and 2c, when the table names of the node table and the edge table are displayed in the page, it is preferable to respectively display the table name of the node table and the table name of the edge table in the page in the vertical direction and the horizontal direction, which is more convenient for the user to operate.
Obviously, there is no chronological order between steps S100 and S200.
S300, monitoring an event of the user for selecting the node or the edge in the ontology model, and displaying a configuration source field text box of the selected node or edge on the same page when the event is monitored to occur.
That is to say, in this step, an event of the user for selecting the node in the ontology model is monitored, and when the event is monitored to occur, the configuration source field text box of the selected node is displayed on the same page; and monitoring an event of the user for selecting the edge in the ontology model, and displaying the configuration source field textbox of the selected edge on the same page when the event is monitored to occur.
For example, in the example shown in fig. 2e, the configuration source field of the node includes a field name, a data format, a length/time format, and a configuration source field. Of course this is merely an example and more or fewer fields may be included.
S400, monitoring an event that a user drags a field in a node table or an edge table to a configuration source field text box of the node or the edge, and if the event occurs, establishing a mapping relation between the node and the node table or establishing a mapping relation between the edge and the edge table.
That is, in this step, an event that a user drags a field in a node table to a configuration source field text box of a node of the ontology model selected by the user is monitored, and if the event occurs, a mapping relation between the node and the node table is established; monitoring an event that a user drags fields in the edge table to a configuration source field text box of the edge of the ontology model selected by the user, and if the event occurs, establishing a mapping relation between the edge and the edge table.
For example, when a mousedown event of a user on a field in a node table is monitored, a table name and a field name of a currently clicked node table or edge table are recorded; and then, when the Mousemovve and the Mouseup of fields in the node table to be selected by a user are monitored in sequence, whether a corresponding mapping DOM exists in the coordinate position of the mouse is detected according to a boundary box of the DOM, if so, an input message is sent to the corresponding DOM according to the recorded table name and field name of the node table or edge table through a dispatceevent, and the establishment of the mapping relation between the nodes and the node table in the body model is completed.
S500, monitoring an event of the clicking operation of the user on the saving button, and sending a data saving request to the server when the event of the clicking operation of the user on the saving button is monitored.
Here, the event of monitoring the click operation of the save button by the user may be implemented by monitoring whether a click event occurs based on the position of the mouse spot, and if so, monitoring the click operation of the save button by the user.
In the method, only when the occurrence of an event of clicking operation of a user on a storage button is monitored, a data storage request is sent to the server to store the established mapping relation, and the server processes the request of data storage once. Based on the steps, the data storage can be realized after a plurality of mapping relations are established at one time, so that the calculation amount of the server is reduced.
In addition, based on the step, the user can change the operation error in time without being stored in the database, and the data of the error record does not need to be found from the database and is stored after being modified. That is, based on this step, it is possible to reduce the server's response to the request for data saving at least twice for one piece of erroneously recorded data, thereby greatly relieving the server's stress and also greatly simplifying the user operation.
For example, as shown in fig. 2c, if the user mistakenly drags the name field in the node table vertex _ person into the uid field of the node person in the ontology model (the column of uid in area 4 shown in fig. 2 e), the user may delete the record in the column, and then drag the uid field in the node table vertex _ person into the uid field of the node person in the ontology model again.
It should be noted that, for the parts of the steps in this embodiment that are not described in detail, for example, the introduction of the node table and the edge table, etc., reference may be made to the relevant description in embodiment 1, and in the case of no contradiction, some descriptions in embodiment 1 and embodiment 2 may be referred to each other.
Referring to fig. 4, in this embodiment, a data mapping system for knowledge graph construction is also provided, including:
an event monitoring module 13 configured to monitor events of a user completing the following operations in sequence under the same page: operations on nodes or edges in the onto-model, operations on fields in the node table or edge table.
And the data mapping module 14 is configured to establish a mapping relationship between the nodes and the node table or between the edges and the edge table when it is monitored that the user completes the above operations on the same page.
In one embodiment, the data mapping module 14 is specifically configured to: when an event of the user selecting the node or the edge in the body model is monitored to occur, displaying a configuration source field text box of the selected node or edge under the same page; and when monitoring that the user drags the fields in the node table or the edge table to the configuration source field text box of the node or the edge, establishing a mapping relation between the node and the node table or establishing a mapping relation between the edge and the edge table.
In one embodiment, the data mapping module 14 is configured to: when an event of the user selecting the node or the edge in the body model is monitored to occur, displaying a configuration source field text box of the selected node or edge under the same page; when the clicking operation of a user on fields in a node table or an edge table is monitored, the table name and the field name of the currently clicked node table or edge table are recorded; and when monitoring that the user drags the fields in the selected node table or edge table to the configuration source field text box of the node or edge, mapping the recorded table names and field names of the node table or edge table to the corresponding document object model to complete the establishment of the mapping relation.
In an embodiment, the data mapping system further includes a model importing module 11 configured to import the ontology model and present a search text box for selecting the ontology model on the same page. At this time, the event listening module may be further configured to: monitoring an event of selecting or newly establishing the operation of the body model by a user under the same page; and when monitoring that the event of the selection or new establishment operation of the user on the ontology model occurs in the same page, displaying the selected or newly established ontology model in the same page.
In an embodiment, the data mapping system further includes a data importing module 12, configured to import a node table and an edge table, and display a table name of the node table and a table name of an edge table on the same page. During displaying, the imported node table and the imported edge table can be displayed in the horizontal direction and the vertical direction of the same page respectively.
At this time, the event listening module may be further configured to: and monitoring events of the user for the selection operation of the node table or the edge table under the same page, and displaying a field textbox of the selected node table or the selected edge table on the same page when the events of the user for the selection operation of the node table or the edge table under the same page are monitored.
In an embodiment, the data mapping system further includes a request sending module 15, configured to send a data saving request to the server when it is monitored that an event of a user clicking on a saving button occurs.
For the detailed operation of each module, reference may be made to the corresponding description of the method described in embodiment 1 or 2, and details are not described here.
As shown in fig. 5, the present embodiment also provides an electronic device, which may include a processor 51 and a memory 52, wherein the memory 52 is coupled to the processor 51. It is noted that this figure is exemplary and that other types of structures may be used in addition to or in place of this structure.
As shown in fig. 5, the electronic device may further include: an input unit 53, a display unit 54, and a power supply 55. It is to be noted that the electronic device does not necessarily have to comprise all the components shown in fig. 5. Furthermore, the electronic device may also comprise components not shown in fig. 5, reference being made to the prior art.
The processor 51, also sometimes referred to as a controller or operational control, may comprise a microprocessor or other processor device and/or logic device, the processor 51 receiving input and controlling operation of the various components of the electronic device.
The memory 52 may be one or more of a buffer, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory, or other suitable devices, and may store the configuration information of the processor 51, the instructions executed by the processor 51, the recorded table data, and other information. The processor 51 may execute a program stored in the memory 52 to realize information storage or processing, or the like. In one embodiment, a buffer memory, i.e., a buffer, is also included in the memory 52 to store the intermediate information.
The input unit 53 is used, for example, to provide the processor 51 with data of the entity body or data owned by the data holder. The display unit 54 is used for displaying various results in the processing procedure, such as an ontology model, a text box, a field of a node table, and the like displayed in a page, and the display unit may be, for example, an LCD display, but the invention is not limited thereto. The power supply 55 is used to provide power to the electronic device.
Embodiments of the present invention further provide a computer readable instruction, where when the instruction is executed in an electronic device, the program causes the electronic device to execute the operation steps included in the method of the present invention.
Embodiments of the present invention further provide a storage medium storing computer-readable instructions, where the computer-readable instructions cause an electronic device to execute the operation steps included in the method of the present invention.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention essentially or partially contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Those of ordinary skill in the art will appreciate that the various illustrative modules described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the several embodiments provided in the present application, it should be understood that the disclosed system may be implemented in other ways. For example, the above-described system embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and in actual implementation, there may be other divisions, for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted, or not implemented.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (12)

1. A data mapping method for knowledge graph construction is characterized by comprising the following steps:
monitoring the events of the user which finish the following operations in sequence under the same page: selecting a node or an edge in the ontology model, and dragging a field in a node table or an edge table;
when an event of the user selecting the node or the edge in the body model is monitored to occur, displaying a configuration source field text box of the selected node or edge under the same page;
when an event that a user drags a field in a node table or an edge table to a configuration source field text box of the node or the edge is monitored, a mapping relation between the node and the node table or a mapping relation between the edge and the edge table is established.
2. The data mapping method for knowledge graph building according to claim 1, wherein the step of establishing a mapping relationship between nodes and a node table or between edges and an edge table when it is monitored that a user drags fields in the node table or the edge table to a configuration source field text box of the nodes or the edges comprises:
when the clicking operation of a user on fields in a node table or an edge table is monitored, the table name and the field name of the currently clicked node table or edge table are recorded;
when monitoring that a user drags fields in a selected node table or edge table to a configuration source field text box of the node or edge, mapping the recorded table names and field names of the node table or edge table to corresponding document object models to complete the establishment of the mapping relation.
3. The data mapping method for knowledge graph building according to claim 1, wherein before listening to events of user operations on edges or nodes in the ontology model, further comprising the steps of:
monitoring an event of selecting or newly establishing the operation of the body model by a user under the same page; and when monitoring that the event of the selection or new establishment operation of the user on the ontology model occurs in the same page, displaying the selected or newly established ontology model in the same page.
4. The data mapping method for knowledge graph building according to claim 1, wherein before listening to events of user operations on fields in node tables or edge tables, further comprising the steps of:
and monitoring events of the user for the selection operation of the node table or the edge table under the same page, and displaying a field textbox of the selected node table or the selected edge table on the same page when the events of the user for the selection operation of the node table or the edge table under the same page are monitored.
5. The data mapping method for knowledge graph building according to claim 4, wherein before the step of monitoring the event of the selected operation of the user on the node table or the edge table under the same page, the method further comprises the steps of: and displaying the imported node table and the imported edge table under the same page.
6. The data mapping method for knowledge-graph construction according to any one of claims 1 to 5, further comprising the steps of: monitoring an event of the clicking operation of the user on the saving button, and sending a data saving request to the server when the event of the clicking operation of the user on the saving button is monitored to occur.
7. A data mapping system for knowledge-graph construction, comprising:
the event monitoring module is configured to monitor events of a user which complete the following operations in sequence under the same page: selecting a node or an edge in the ontology model, and dragging a field in a node table or an edge table;
the data mapping module is configured to display a configuration source field text box of a selected node or edge under the same page when monitoring that an event of the selected operation of a user on the node or edge in the ontology model occurs; and when monitoring that the user drags the fields in the node table or the edge table to the configuration source field text box of the node or the edge, establishing a mapping relation between the node and the node table or establishing a mapping relation between the edge and the edge table.
8. The data mapping system for knowledge graph building according to claim 7, wherein the data mapping module is configured to, when a user click operation on a field in a node table or an edge table is monitored, record a table name and a field name of the currently clicked node table or edge table; and when monitoring that the user drags the fields in the selected node table or edge table to the configuration source field text box of the node or edge, mapping the recorded table names and field names of the node table or edge table to the corresponding document object model to complete the establishment of the mapping relation.
9. The data mapping system for knowledgegraph building of claim 7, further comprising a model import module configured to import an ontology model and present a search text box for selecting an ontology model under the same page.
10. The data mapping system for knowledgegraph building of claim 7, further comprising a data import module configured to import a node table and an edge table and present a table name of the node table and a table name of a table edge under the same page.
11. The data mapping system for knowledge graph building according to any one of claims 7-10, further comprising a request sending module configured to send a data saving request to the server when an event of a user clicking operation on a saving button is monitored to occur.
12. An electronic device, comprising:
a memory storing program instructions;
a processor coupled to the memory and executing the program instructions in the memory to implement the steps of the method of any of claims 1-6.
CN202010907995.5A 2020-09-02 2020-09-02 Data mapping method and system for knowledge graph construction and electronic equipment Active CN111767412B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010907995.5A CN111767412B (en) 2020-09-02 2020-09-02 Data mapping method and system for knowledge graph construction and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010907995.5A CN111767412B (en) 2020-09-02 2020-09-02 Data mapping method and system for knowledge graph construction and electronic equipment

Publications (2)

Publication Number Publication Date
CN111767412A CN111767412A (en) 2020-10-13
CN111767412B true CN111767412B (en) 2020-12-08

Family

ID=72729256

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010907995.5A Active CN111767412B (en) 2020-09-02 2020-09-02 Data mapping method and system for knowledge graph construction and electronic equipment

Country Status (1)

Country Link
CN (1) CN111767412B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101426765B1 (en) * 2012-11-27 2014-08-06 한국과학기술정보연구원 System and method for supplying collaboration partner search service
CN109147954A (en) * 2018-07-26 2019-01-04 南京邮电大学 The patient information processing unit of knowledge based map
CN109828972A (en) * 2019-01-18 2019-05-31 四川长虹电器股份有限公司 A kind of data integrating method based on digraph structure
CN109857870A (en) * 2019-01-03 2019-06-07 成都数联铭品科技有限公司 Visual Ontology for knowledge mapping constructs system and method
CN109976735A (en) * 2019-03-13 2019-07-05 中译语通科技股份有限公司 One kind being based on the visual knowledge mapping algorithm application platform of web
CN110083709A (en) * 2019-04-28 2019-08-02 宁波深擎信息科技有限公司 A kind of knowledge mapping method for auto constructing and system based on description definition
CN110223751A (en) * 2019-05-16 2019-09-10 平安科技(深圳)有限公司 Prescription evaluation method, system and computer equipment based on medical knowledge map
CN111078967A (en) * 2018-10-19 2020-04-28 阿里巴巴集团控股有限公司 Display method, display device, electronic equipment and storage medium
CN111259164A (en) * 2020-01-14 2020-06-09 清华大学 Knowledge graph-oriented interactive visualization method and system
CN111339316A (en) * 2020-02-27 2020-06-26 河海大学 Method and system architecture for realizing visual editing and persistence of knowledge graph
CN111382320A (en) * 2020-03-18 2020-07-07 军事科学院系统工程研究院系统总体研究所 Large-scale data increment processing method for knowledge graph

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080270458A1 (en) * 2007-04-24 2008-10-30 Gvelesiani Aleksandr L Systems and methods for displaying information about business related entities
CN109344269A (en) * 2018-08-14 2019-02-15 北京奇虎科技有限公司 Method, electronic equipment and the computer readable storage medium of graphic data base write-in
CN110442730A (en) * 2019-07-18 2019-11-12 北京市天元网络技术股份有限公司 A kind of knowledge mapping construction method based on deepdive
CN110347847B (en) * 2019-07-22 2021-09-28 西南交通大学 Knowledge graph complementing method based on neural network
CN110795557A (en) * 2019-12-11 2020-02-14 北京明略软件系统有限公司 Knowledge graph display method and device
CN111488465A (en) * 2020-04-14 2020-08-04 税友软件集团股份有限公司 Knowledge graph construction method and related device

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101426765B1 (en) * 2012-11-27 2014-08-06 한국과학기술정보연구원 System and method for supplying collaboration partner search service
CN109147954A (en) * 2018-07-26 2019-01-04 南京邮电大学 The patient information processing unit of knowledge based map
CN111078967A (en) * 2018-10-19 2020-04-28 阿里巴巴集团控股有限公司 Display method, display device, electronic equipment and storage medium
CN109857870A (en) * 2019-01-03 2019-06-07 成都数联铭品科技有限公司 Visual Ontology for knowledge mapping constructs system and method
CN109828972A (en) * 2019-01-18 2019-05-31 四川长虹电器股份有限公司 A kind of data integrating method based on digraph structure
CN109976735A (en) * 2019-03-13 2019-07-05 中译语通科技股份有限公司 One kind being based on the visual knowledge mapping algorithm application platform of web
CN110083709A (en) * 2019-04-28 2019-08-02 宁波深擎信息科技有限公司 A kind of knowledge mapping method for auto constructing and system based on description definition
CN110223751A (en) * 2019-05-16 2019-09-10 平安科技(深圳)有限公司 Prescription evaluation method, system and computer equipment based on medical knowledge map
CN111259164A (en) * 2020-01-14 2020-06-09 清华大学 Knowledge graph-oriented interactive visualization method and system
CN111339316A (en) * 2020-02-27 2020-06-26 河海大学 Method and system architecture for realizing visual editing and persistence of knowledge graph
CN111382320A (en) * 2020-03-18 2020-07-07 军事科学院系统工程研究院系统总体研究所 Large-scale data increment processing method for knowledge graph

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
图结构数据的可视化分析系统的设计与实现;孙伟伟;《中国优秀硕士学位论文全文数据库信息科技辑》;20170215;I138-2343 *
知识图谱存储及本体映射方法;衬白;《https://zhuanlan.zhihu.com/p/80274974》;20190829;全文 *
面向Web数据的知识图谱学习与推理关键技术研究;郭琳;《中国优秀硕士学位论文全文数据库信息科技辑》;20180115;I139-136 *

Also Published As

Publication number Publication date
CN111767412A (en) 2020-10-13

Similar Documents

Publication Publication Date Title
US11687859B2 (en) Software with improved view of a business process
US20180039399A1 (en) Interactive user interface for dynamically updating data and data analysis and query processing
US11270066B2 (en) Temporary formatting and charting of selected data
US20200133929A1 (en) Intelligent data quality
US8776016B2 (en) Integration of structured profiling data with source data in the eclipse development environment
EP2277103A2 (en) Ranking visualization types based upon fitness for visualizing a data set
KR101773574B1 (en) Method for chart visualizing of data table
CN111124379A (en) Page generation method and device, electronic equipment and storage medium
CN111782651A (en) Visual editing method, device and equipment for data association relation and storage medium
CN113434220A (en) Method, device and equipment for constructing workflow and computer storage medium
CN110889013B (en) Data association method, device, server and storage medium based on XML
KR20150110063A (en) Apparatus and method of integrating mapreduce for big data processing
CN116226112A (en) Data cleaning method and device, storage medium and electronic equipment
CN114201615B (en) Scientific research data change review method and server based on data snapshot
US10417234B2 (en) Data flow modeling and execution
US20200342378A1 (en) Flexible Work Breakdown Structure
US20210357190A1 (en) Aesthetic visualizations by auto-optimizing connectors in workflows
CN111767412B (en) Data mapping method and system for knowledge graph construction and electronic equipment
CN111475602A (en) Multi-version knowledge graph storage method and device, storage medium and electronic equipment
CN110764864A (en) Terraform-based visual resource arrangement method
CN116225902A (en) Method, device and equipment for generating test cases
EP3086244A1 (en) Database system and method of operation thereof
JP5651873B2 (en) Operation support method and computer
CN114518875A (en) Graphical programming system and programming method thereof
US10515330B2 (en) Real time visibility of process lifecycle

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
GR01 Patent grant