CN109508381B - Knowledge graph processing method and device - Google Patents

Knowledge graph processing method and device Download PDF

Info

Publication number
CN109508381B
CN109508381B CN201811150913.6A CN201811150913A CN109508381B CN 109508381 B CN109508381 B CN 109508381B CN 201811150913 A CN201811150913 A CN 201811150913A CN 109508381 B CN109508381 B CN 109508381B
Authority
CN
China
Prior art keywords
ontology
entity
graph
map
target entity
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
CN201811150913.6A
Other languages
Chinese (zh)
Other versions
CN109508381A (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 Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum 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 Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201811150913.6A priority Critical patent/CN109508381B/en
Publication of CN109508381A publication Critical patent/CN109508381A/en
Application granted granted Critical
Publication of CN109508381B publication Critical patent/CN109508381B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Machine Translation (AREA)

Abstract

The invention discloses a knowledge graph processing method and device. Wherein, the method comprises the following steps: acquiring a target entity to be added into an entity map; searching an ontology corresponding to a target entity in an ontology graph having a mapping relation with an entity graph, wherein constraint conditions corresponding to a plurality of ontologies are defined in the ontology graph; and judging whether the target entity meets the corresponding constraint condition in the ontology graph, and determining whether the entity content of the target entity is allowed to be added according to the judgment result. The invention solves the technical problem that the entity relationship availability of the entity map is lower because the entity in the entity map can not be restricted in the related technology.

Description

Knowledge graph processing method and device
Technical Field
The invention relates to the technical field of internet, in particular to a knowledge graph processing method and device.
Background
In the related art, for knowledge maps, no matter search maps or other maps established aiming at industries, no matter ontology maps or entity maps are established independently, the mutual relation among the maps is not fully utilized. That is, when the map is used at present, the ontology or the entity relationship in the map is not effectively utilized to constrain or adjust the entity relationship, which may cause some conventional data limitations or non-constrained numerical relationships, which may cause the entity relationship in the entity map to be unreasonable, and reduce the availability of the entity data in the entity map. For example, in the petroleum industry, the discovery and exploration of reservoirs may involve the exploration of geology, including the analysis of lithology. Thus, in the knowledge map of the petroleum industry, the body lithology can be divided into "carbonate rock", "clastic rock" and "volcanic rock" (if there are only three types), the carbonate rock is further divided into "gypsum rock", "limestone" and "dolomite", when the entity corresponding to the body lithology is extracted, the extraction result should mean that the above lithology exists, otherwise, the extraction result should be caused by document error or extraction error. That is, the related art does not use the ontology to manage the entities in the entity graph, resulting in low availability of the entity relationships.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a knowledge graph processing method and a knowledge graph processing device, which are used for at least solving the technical problem that the availability of the entity relationship of an entity graph is low because the entity in the entity graph cannot be restricted in the related technology.
According to an aspect of the embodiments of the present invention, there is provided a method for processing a knowledge graph, including: acquiring a target entity to be added into an entity map; searching an ontology corresponding to the target entity in an ontology graph having a mapping relation with the entity graph, wherein constraint conditions corresponding to a plurality of ontologies are defined in the ontology graph; and judging whether the target entity meets the corresponding constraint condition in the body map, and determining whether the entity content of the target entity is allowed to be added according to the judgment result.
Further, the processing method of the knowledge graph further comprises the following steps: establishing an ontology map; extracting the ontology in the ontology map; and determining corresponding entities according to the extracted ontology, establishing an entity map based on the determined entities, and establishing a corresponding relation between each entity in the entity map and the ontology in the ontology map.
Further, the constraints defined in the ontology graph include at least one of: attribute information of the ontology, and a hierarchical relationship among the plurality of ontologies.
Further, in a case that the constraint condition includes an attribute of an ontology, determining whether the target entity satisfies a corresponding constraint condition in the ontology graph includes: acquiring attribute information of the target entity; and judging whether the attribute information of the target entity is consistent with the attribute information of the body corresponding to the target entity, and determining that the target entity does not meet the constraint condition under the condition that the judgment result is negative.
Further, in the case that the constraint condition includes a hierarchical relationship between a plurality of ontologies, determining whether the target entity satisfies the corresponding constraint condition in the ontology graph includes: acquiring a target adding position of the target entity in the entity map; determining a first hierarchical relationship between the target entity and other entities according to the target adding position; determining a second hierarchical relationship between the ontology corresponding to the target entity and other ontologies in the ontology graph; and judging whether the first hierarchical relationship is consistent with the second hierarchical relationship, and determining that the target entity does not meet the constraint condition under the condition that the judgment result is negative.
Further, the attribute information of the ontology includes at least one of: the position of the ontology in the map, the attribute parameter range of the ontology and the type of the ontology.
According to another aspect of the embodiments of the present invention, there is also provided a processing apparatus of a knowledge graph, including: the acquisition unit is used for acquiring a target entity to be added into the entity map; the searching unit is used for searching an ontology corresponding to the target entity in an ontology graph which has a mapping relation with the entity graph, wherein constraint conditions corresponding to a plurality of ontologies are defined in the ontology graph; and the judging unit is used for judging whether the target entity meets the corresponding constraint condition in the body map and determining whether the entity content of the target entity is allowed to be added according to the judgment result.
Further, the processing device of the knowledge graph further comprises: the first establishing unit is used for establishing an ontology map; the extraction unit is used for extracting the ontology in the ontology map; and the second establishing unit is used for determining corresponding entities according to the extracted ontology, establishing an entity map based on the determined entities, and establishing a corresponding relation between each entity in the entity map and the ontology in the ontology map.
Further, the constraints defined in the ontology graph include at least one of: attribute information of the ontology, and a hierarchical relationship among the plurality of ontologies.
Further, in a case where the constraint condition includes an attribute of an ontology, the determining unit includes: the first acquisition module is used for acquiring the attribute information of the target entity; and the first judgment module is used for judging whether the attribute information of the target entity is consistent with the attribute information of the body corresponding to the target entity or not, and determining that the target entity does not meet the constraint condition under the condition that the judgment result is negative.
Further, in a case where the constraint condition includes a hierarchical relationship between a plurality of ontologies, the judging unit includes: the second acquisition module is used for acquiring a target adding position of the target entity in the entity map; the first determining module is used for determining a first hierarchical relationship between the target entity and other entities according to the target adding position; the second determining module is used for determining a second hierarchical relationship between the ontology corresponding to the target entity and other ontologies in the ontology graph; and the second judging module is used for judging whether the first hierarchical relationship is consistent with the second hierarchical relationship or not and determining that the target entity does not meet the constraint condition under the condition that the judgment result is negative.
Further, the attribute information of the ontology includes at least one of: the position of the ontology in the map, the attribute parameter range of the ontology and the type of the ontology.
According to another aspect of the embodiments of the present invention, there is also provided a storage medium for storing a program, wherein the program, when executed by a processor, controls a device on which the storage medium is located to perform the method for processing a knowledge-graph according to any one of the above.
According to another aspect of the embodiments of the present invention, there is also provided a processor, configured to execute a program, where the program executes a processing method of a knowledge graph according to any one of the above.
In the embodiment of the invention, a target entity needing to be added into an entity map is obtained, an ontology corresponding to the target entity is searched in an ontology map which has a mapping relation with the entity map, wherein constraint conditions corresponding to a plurality of ontologies are defined in the ontology map, whether the target entity meets the constraint conditions corresponding to the ontology map is judged, and whether entity content is allowed to be added is determined according to a judgment result. In this embodiment, the constraint condition of the ontology corresponding to the target entity may be used to manage the entity corresponding to the entity map, where it may be determined whether the content of the entity may be added to the entity map through the constraint condition.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flow diagram of a method of knowledge-graph processing according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an ontology graph and an entity graph establishing an association relationship according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of another alternative knowledge-graph processing apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, 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. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In accordance with an embodiment of the present invention, there is provided a method embodiment of knowledge-graph processing, it being noted that the steps illustrated in the flowchart of the figure may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowchart, in some cases, the steps illustrated or described may be performed in an order different than that which is presented herein.
FIG. 1 is a flow chart of a method of processing a knowledge-graph, as shown in FIG. 1, according to an embodiment of the present invention, the method comprising the steps of:
and step S102, acquiring a target entity needing to be added into the entity map.
And step S104, searching an ontology corresponding to the target entity in an ontology graph which has a mapping relation with the entity graph, wherein constraint conditions corresponding to a plurality of ontologies are defined in the ontology graph.
And step S106, judging whether the target entity meets the corresponding constraint condition in the body map, and determining whether the entity content of the target entity is allowed to be added according to the judgment result.
Through the steps, the target entity needing to be added into the entity map is obtained, the ontology corresponding to the target entity is searched in the ontology map which has a mapping relation with the entity map, wherein constraint conditions corresponding to a plurality of ontologies are defined in the ontology map, whether the target entity meets the constraint conditions corresponding to the ontology map is judged, and whether entity content is allowed to be added is determined according to the judgment result. In this embodiment, the constraint condition of the ontology corresponding to the target entity may be used to manage the entity corresponding to the entity map, where it may be determined whether the content of the entity may be added to the entity map through the constraint condition.
The above steps of the present invention will be described in detail.
In the embodiment of the present invention, the method for processing a knowledge graph further includes: establishing an ontology map; extracting the ontology in the ontology map; and determining corresponding entities according to the extracted ontology, establishing an entity map based on the determined entities, and establishing a corresponding relation between each entity in the entity map and the ontology in the ontology map.
Optionally, when the ontology graph is built, the ontology graph is built according to the actually obtained ontologies, the relationship among the ontologies and the constraint conditions of the ontologies. After the ontology graph is established, an entity graph can be correspondingly established, specifically, an entity graph is established based on each ontology and corresponding to one entity, and then the entity graph is established based on the determined entities.
In the embodiment of the present invention, an ontology in the ontology graph may establish a corresponding relationship with each entity in the entity graph, that is, an association relationship between the ontology graph and the entity graph is established. Fig. 2 is a schematic diagram of an ontology graph and an entity graph establishing an association relationship according to an embodiment of the present invention, and as shown in fig. 2, the ontology graph may include each ontology illustrated by each square, which may establish an association relationship with each entity illustrated by a circle in the entity graph.
When the corresponding entity is determined according to the extracted ontology and the entity graph is established based on the determined entity, the target entity to be added to the entity graph is obtained through the following steps, step S102.
That is, the target entity to be added may be obtained first, and the target entity may be a single entity or may be selected randomly.
And step S104, searching an ontology corresponding to the target entity in an ontology graph which has a mapping relation with the entity graph, wherein constraint conditions corresponding to a plurality of ontologies are defined in the ontology graph.
The above steps illustrate that the ontology corresponding to the target entity can be found from the ontology graph, so as to determine whether the entity content needs to be added according to the constraint condition of the ontology, that is, determine whether the entity content of the entity is available.
In an embodiment of the present invention, the constraints defined in the ontology graph include at least one of: attribute information of the ontology, and a hierarchical relationship among the plurality of ontologies.
In an optional example, the attribute information of the ontology includes at least one of: the position of the ontology in the map, the attribute parameter range of the ontology and the type of the ontology.
The ontology may be located by the position of the ontology in the atlas, which may indicate a dimension-defined position (e.g., X4, Y5) or a link position in the atlas.
For attribute parameter ranges of an ontology, the attribute may include, but is not limited to: pressure, height, length, weight, type, etc., and the attribute parameter range may indicate the parameter range of the body, and if the body is an original reservoir formation, the pressure parameter range of the original reservoir formation is determined to be 30-80 Mpa. The target entity may be constrained by the attribute parameter range of the ontology and the enumerated entity. In the embodiment of the invention, the hierarchical relationship among the ontologies indicates the hierarchy of the ontologies, and the hierarchy of the entities can be constrained through the hierarchy of the ontologies.
In the embodiment of the present invention, the constraint condition corresponding to the ontology may be obtained through a network or a recorded text, and the constraint condition of the ontology is obtained through training and adjustment. For example, constraints may be established in accordance with industry standards.
And step S106, judging whether the target entity meets the corresponding constraint condition in the body map, and determining whether the entity content is allowed to be added according to the judgment result.
Through the steps, whether the target entity meets the constraint condition in the ontology graph or not can be determined, and whether entity content can be added to the entity graph or not can be further determined. Here, when determining whether the constraint condition is satisfied, the hierarchical relationship between ontologies and attribute information of ontologies may be integrated to determine whether entity content may be added.
When an entity is extracted, the entity can be detected through the ontology, if the entity meets the corresponding constraint condition in the ontology graph, the entity content can be added into the entity graph, the establishment of the relationship of the entity graph is completed, and if the constraint condition is not met, the fact that the entity content corresponding to the target entity has errors or the fact that the extraction of the entity content corresponding to the target entity has errors needs to be fed back.
In an optional example, in a case that the constraint condition includes an attribute of the ontology, determining whether the target entity satisfies the corresponding constraint condition in the ontology graph includes: acquiring attribute information of a target entity; and judging whether the attribute information of the target entity is consistent with the attribute information of the body corresponding to the target entity, and determining that the target entity does not meet the constraint condition under the condition that the judgment result is negative.
The above embodiment illustrates that whether the target meets the constraint condition is determined by whether the attribute information of the entity and the attribute information of the ontology match, and then whether the entity content can be added to the entity map is determined. For example, in one document, "the original formation pressure of the reservoir is 145.75 MPa", and in combination with the range of the original formation pressure of the reservoir being "30-80 MPa", it is known that the parameter does not satisfy the parameter constraint range of the formation pressure, at this time, it may be determined that the attribute information of the entity does not satisfy the constraint condition, and the entity content corresponding to the entity may not be added to the entity map. Meanwhile, when the attribute information of the target entity is determined not to meet the constraint condition, warning information can be sent out, and the warning information can be added after being verified by manual work or other tools.
In another optional example of the present invention, in a case that the constraint condition includes a hierarchical relationship between a plurality of ontologies, the determining whether the target entity satisfies the corresponding constraint condition in the ontology graph includes: acquiring a target adding position of a target entity in an entity map; determining a first hierarchical relationship between the target entity and other entities according to the target adding position; determining a second hierarchical relationship between the ontology corresponding to the target entity and other ontologies in the ontology graph; and judging whether the first hierarchical relationship is consistent with the second hierarchical relationship, and determining that the target entity does not meet the constraint condition under the condition that the judgment result is negative.
The above embodiment describes a method for determining the hierarchical relationship between entities by adding positions of the entities, obtaining the hierarchical relationship between an ontology corresponding to the entities and other ontologies in an ontology graph, and determining whether the hierarchical relationship is consistent, and if so, determining that the hierarchical relationship satisfies a first constraint condition. That is, in this embodiment, whether the hierarchical relationship between the entities is accurate can be determined by the hierarchical relationship between the ontologies, so as to adjust the hierarchy of the entities.
Through the embodiment, the entity in the entity map can be constrained through the constraint conditions of the ontology in the entity map, including the constraint on the parameter range and the hierarchical relationship of the entity, and the knowledge constraint detection is performed in the process of building, expanding and adjusting the entity map, so that the entity map conforming to the normal constraint conditions is built.
The invention is illustrated below by means of a further alternative embodiment.
FIG. 3 is a schematic diagram of another alternative knowledge-graph processing apparatus according to an embodiment of the present invention, which may include, as shown in FIG. 3: an acquisition unit 31, a search unit 33, a judgment unit 35, wherein
An obtaining unit 31, configured to obtain a target entity to be added to an entity graph;
the searching unit 33 is configured to search an ontology corresponding to the target entity in an ontology graph having a mapping relationship with the entity graph, where constraint conditions corresponding to a plurality of ontologies are defined in the ontology graph;
and the judging unit 35 is configured to judge whether the target entity meets the corresponding constraint condition in the ontology graph, and determine whether to allow addition of the entity content of the target entity according to the judgment result.
By the processing device of the knowledge graph, the target entity to be added into the entity graph is obtained by the obtaining unit 31, the ontology corresponding to the target entity is searched in the ontology graph which has a mapping relation with the entity graph by the searching unit 33, wherein constraint conditions corresponding to a plurality of ontologies are defined in the ontology graph, whether the target entity meets the corresponding constraint conditions in the ontology graph is judged by the judging unit 35, and whether the addition of entity content is allowed is determined according to the judgment result. In this embodiment, the constraint condition of the ontology corresponding to the target entity may be used to manage the entity corresponding to the entity map, where it may be determined whether the content of the entity may be added to the entity map through the constraint condition.
The processing device of the knowledge-graph further comprises: the first establishing unit is used for establishing an ontology map; the extraction unit is used for extracting the ontology in the ontology map; and the second establishing unit is used for determining corresponding entities according to the extracted ontology, establishing an entity map based on the determined entities, and establishing a corresponding relation between each entity in the entity map and the ontology in the ontology map.
Optionally, the constraints defined in the ontology graph include at least one of: attribute information of the ontology, and a hierarchical relationship among the plurality of ontologies.
In the embodiment of the present invention, in a case where the constraint condition includes an attribute of the ontology, the determining unit includes: the first acquisition module is used for acquiring the attribute information of the target entity; and the first judgment module is used for judging whether the attribute information of the target entity is consistent with the attribute information of the body corresponding to the target entity or not, and determining that the target entity does not meet the constraint condition under the condition that the judgment result is negative.
As an optional example of the present invention, in a case where the constraint condition includes a hierarchical relationship between a plurality of ontologies, the judging unit includes: the second acquisition module is used for acquiring a target adding position of a target entity in the entity map; the first determining module is used for determining a first hierarchical relationship between the target entity and other entities according to the target adding position; the second determining module is used for determining a second hierarchical relationship between the ontology corresponding to the target entity and other ontologies in the ontology graph; and the second judging module is used for judging whether the first hierarchical relationship is consistent with the second hierarchical relationship or not and determining that the target entity does not meet the constraint condition under the condition that the judgment result is negative.
Preferably, the attribute information of the ontology includes at least one of: the position of the ontology in the map, the attribute parameter range of the ontology and the type of the ontology.
According to another aspect of the embodiments of the present invention, there is also provided a storage medium for storing a program, wherein the program, when executed by a processor, controls an apparatus in which the storage medium is located to perform the method for processing the knowledge-graph of any one of the above.
According to another aspect of the embodiments of the present invention, there is also provided a processor, configured to execute a program, where the program executes a processing method of a knowledge graph according to any one of the above.
The processing device of the knowledge graph may further include a processor and a memory, and the acquiring unit 31, the searching unit 33, the judging unit 35, and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions.
The processor comprises a kernel, and the kernel calls a corresponding program unit from the memory. The kernel can set one or more, and whether the entity content is allowed to be added or not is determined by adjusting the kernel parameters.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
The embodiment of the invention provides equipment, which comprises a processor, a memory and a program which is stored on the memory and can run on the processor, wherein the processor executes the program and realizes the following steps: acquiring a target entity to be added into an entity map; searching an ontology corresponding to a target entity in an ontology graph having a mapping relation with an entity graph, wherein constraint conditions corresponding to a plurality of ontologies are defined in the ontology graph; and judging whether the target entity meets the corresponding constraint condition in the ontology graph, and determining whether the entity content of the target entity is allowed to be added according to the judgment result.
Optionally, when the processor executes the program, the following steps may be further implemented: establishing an ontology map; extracting the ontology in the ontology map; and determining corresponding entities according to the extracted ontology, establishing an entity map based on the determined entities, and establishing a corresponding relation between each entity in the entity map and the ontology in the ontology map.
Further, the constraints defined in the ontology graph include at least one of: attribute information of the ontology, and a hierarchical relationship among the plurality of ontologies.
Optionally, when the processor executes the program, the following steps may be further implemented: acquiring attribute information of a target entity under the condition that the constraint condition comprises the attribute of the body; and judging whether the attribute information of the target entity is consistent with the attribute information of the body corresponding to the target entity, and determining that the target entity does not meet the constraint condition under the condition that the judgment result is negative.
Optionally, when the processor executes the program, the following steps may be further implemented: under the condition that the constraint condition comprises a hierarchical relation among a plurality of ontologies, acquiring a target adding position of a target entity in an entity map; determining a first hierarchical relationship between the target entity and other entities according to the target adding position; determining a second hierarchical relationship between the ontology corresponding to the target entity and other ontologies in the ontology graph; and judging whether the first hierarchical relationship is consistent with the second hierarchical relationship, and determining that the target entity does not meet the constraint condition under the condition that the judgment result is negative.
Optionally, the attribute information of the ontology includes at least one of the following: the position of the ontology in the map, the attribute parameter range of the ontology and the type of the ontology.
The present application further provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device: acquiring a target entity to be added into an entity map; searching an ontology corresponding to a target entity in an ontology graph having a mapping relation with an entity graph, wherein constraint conditions corresponding to a plurality of ontologies are defined in the ontology graph; and judging whether the target entity meets the corresponding constraint condition in the ontology graph, and determining whether the entity content of the target entity is allowed to be added according to the judgment result.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
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 may be embodied in the form of a software product, which is stored in a storage medium and includes 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 Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (7)

1. A knowledge graph processing method is characterized by comprising the following steps:
acquiring a target entity to be added into an entity map;
searching an ontology corresponding to the target entity in an ontology graph having a mapping relation with the entity graph, wherein constraint conditions corresponding to a plurality of ontologies are defined in the ontology graph;
judging whether the target entity meets the corresponding constraint condition in the body map, and determining whether the entity content of the target entity is allowed to be added according to the judgment result;
wherein the constraints defined in the ontology graph include at least one of: attribute information of the ontology, a hierarchical relationship among the plurality of ontologies;
if the constraint condition includes an attribute of an ontology, determining whether the target entity satisfies a corresponding constraint condition in the ontology graph includes: acquiring attribute information of the target entity; judging whether the attribute information of the target entity is consistent with the attribute information of the body corresponding to the target entity, and determining that the target entity does not meet the constraint condition under the condition that the judgment result is negative;
in the case that the constraint condition includes a hierarchical relationship between a plurality of ontologies, determining whether the target entity satisfies the corresponding constraint condition in the ontology graph includes: acquiring a target adding position of the target entity in the entity map; determining a first hierarchical relationship between the target entity and other entities according to the target adding position; determining a second hierarchical relationship between the ontology corresponding to the target entity and other ontologies in the ontology graph; and judging whether the first hierarchical relationship is consistent with the second hierarchical relationship, and determining that the target entity does not meet the constraint condition under the condition that the judgment result is negative.
2. The processing method of claim 1, further comprising:
establishing an ontology map;
extracting the ontology in the ontology map;
and determining corresponding entities according to the extracted ontology, establishing an entity map based on the determined entities, and establishing a corresponding relation between each entity in the entity map and the ontology in the ontology map.
3. The processing method according to claim 1, wherein the attribute information of the ontology includes at least one of:
the position of the ontology in the map, the attribute parameter range of the ontology and the type of the ontology.
4. A knowledge graph processing apparatus, comprising:
the acquisition unit is used for acquiring a target entity to be added into the entity map;
the searching unit is used for searching an ontology corresponding to the target entity in an ontology graph which has a mapping relation with the entity graph, wherein constraint conditions corresponding to a plurality of ontologies are defined in the ontology graph;
the judging unit is used for judging whether the target entity meets the corresponding constraint condition in the body map or not and determining whether the entity content of the target entity is allowed to be added or not according to the judgment result;
wherein the constraints defined in the ontology graph include at least one of: attribute information of the ontology, a hierarchical relationship among the plurality of ontologies;
in a case where the constraint condition includes an attribute of an ontology, the judging unit includes: the first acquisition module is used for acquiring the attribute information of the target entity; the first judgment module is used for judging whether the attribute information of the target entity is consistent with the attribute information of the body corresponding to the target entity or not, and determining that the target entity does not meet the constraint condition under the condition that the judgment result is negative;
in a case where the constraint condition includes a hierarchical relationship between a plurality of ontologies, the judging unit includes: the second acquisition module is used for acquiring a target adding position of the target entity in the entity map; the first determining module is used for determining a first hierarchical relationship between the target entity and other entities according to the target adding position; the second determining module is used for determining a second hierarchical relationship between the ontology corresponding to the target entity and other ontologies in the ontology graph; and the second judging module is used for judging whether the first hierarchical relationship is consistent with the second hierarchical relationship or not and determining that the target entity does not meet the constraint condition under the condition that the judgment result is negative.
5. The processing apparatus as recited in claim 4, further comprising:
the first establishing unit is used for establishing an ontology map;
the extraction unit is used for extracting the ontology in the ontology map;
and the second establishing unit is used for determining corresponding entities according to the extracted ontology, establishing an entity map based on the determined entities, and establishing a corresponding relation between each entity in the entity map and the ontology in the ontology map.
6. A storage medium storing a program, wherein the program, when executed by a processor, controls an apparatus in which the storage medium is located to perform the method of processing a knowledge-graph of any one of claims 1 to 3.
7. A processor, characterized in that the processor is configured to run a program, wherein the program when running performs the method of processing a knowledge-graph of any one of claims 1 to 3.
CN201811150913.6A 2018-09-29 2018-09-29 Knowledge graph processing method and device Active CN109508381B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811150913.6A CN109508381B (en) 2018-09-29 2018-09-29 Knowledge graph processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811150913.6A CN109508381B (en) 2018-09-29 2018-09-29 Knowledge graph processing method and device

Publications (2)

Publication Number Publication Date
CN109508381A CN109508381A (en) 2019-03-22
CN109508381B true CN109508381B (en) 2022-04-08

Family

ID=65746170

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811150913.6A Active CN109508381B (en) 2018-09-29 2018-09-29 Knowledge graph processing method and device

Country Status (1)

Country Link
CN (1) CN109508381B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110334939B (en) * 2019-07-01 2022-03-15 济南大学 Door and window customized material information rapid configuration method, system, equipment and medium
CN111475604A (en) * 2019-09-18 2020-07-31 北京国双科技有限公司 Data processing method and device
CN112528032A (en) * 2019-09-18 2021-03-19 北京国双科技有限公司 Oil gas data processing method and device
CN111737369B (en) * 2020-05-21 2024-07-23 北京明略软件系统有限公司 Method, device and storage medium for updating relationship map
CN112818072A (en) * 2021-03-09 2021-05-18 携程旅游信息技术(上海)有限公司 Tourism knowledge map updating method, system, equipment and storage medium
CN113032578B (en) * 2021-03-23 2022-12-06 平安科技(深圳)有限公司 Information pushing method and device based on hotspot event and computer equipment
CN114297411B (en) * 2022-03-08 2023-05-02 支付宝(杭州)信息技术有限公司 Configuration method, analysis method and device of entities in knowledge graph
CN115840826B (en) * 2023-02-15 2023-06-02 海乂知信息科技(南京)有限公司 Automatic reduction system and method of knowledge graph concept, electronic equipment and medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150095303A1 (en) * 2013-09-27 2015-04-02 Futurewei Technologies, Inc. Knowledge Graph Generator Enabled by Diagonal Search
CN105956052A (en) * 2016-04-27 2016-09-21 青岛海尔软件有限公司 Building method of knowledge map based on vertical field
CN107609052B (en) * 2017-08-23 2019-09-24 中国科学院软件研究所 A kind of generation method and device of the domain knowledge map based on semantic triangle

Also Published As

Publication number Publication date
CN109508381A (en) 2019-03-22

Similar Documents

Publication Publication Date Title
CN109508381B (en) Knowledge graph processing method and device
CN106649346B (en) Data repeatability checking method and device
CN113094459B (en) Map checking method and device
CN108073815B (en) Family judgment method and system based on code slice and storage medium
WO2013130630A3 (en) Listing data objects using a hierarchical dispersed storage index
CN103150359B (en) Micro-blog information display packing and device
CN109446574B (en) Oil gas exploitation monitoring method, fault identification model obtaining method and related equipment
CN104216992A (en) Information processing method and device
CN104426868A (en) Request processing method and processing apparatus
CA2788330A1 (en) Systems and methods for providing a validation tool
CN107451156A (en) A kind of image recognition methods and identification device again
CN105183908A (en) Point of interest (POI) data classifying method and device
CN104750872A (en) Method and device for searching service object
CN106610931A (en) Extraction method and device for topic names
CN108153663B (en) Page data processing method and device
CN106326439A (en) Real-time video storage and retrieval method and device
CN101901172B (en) Data processing device and method
CN103685668B (en) Method and a system for quickly inputting contact persons in local address books
CN106649367B (en) Method and device for detecting keyword popularization degree
CN104750834A (en) Rule storage method and matching method and device
CN106933896B (en) Shortest access path identification method and device
KR102060758B1 (en) Primitive fitting apparatus and method using point cloud
CN111382220A (en) POI data dividing method and device
CN108090095B (en) Method and device for reconstructing database in batches
CN102760212B (en) Virtual desktop malicious code detecting method based on storage mirroring cloning mechanism

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