A method and apparatus for knowledge graph entity fusion based on specified relation types

By configuring methods for specifying relationship types, entities and relationships in the knowledge graph are obtained and merged, solving the accuracy problem of entity fusion in the graph and improving the accuracy of the graph.

CN116796000BActive Publication Date: 2026-04-03BEIJING HAIPU WANGJU TECH LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-30
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

In knowledge graphs, accurately identifying and efficiently merging entities that appear to be the same entity, thereby improving the accuracy of the graph, has become a challenge.

Method used

By configuring a specified relationship type, the original graph dataset is obtained, the fusion relationship of the specified relationship type is identified, the fusion entities are matched and marked, the entity and relationship merging operation is performed, and the fused graph result dataset is generated.

Benefits of technology

It improves the accuracy of knowledge graphs, making them suitable for the needs of specific application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116796000B_ABST
    Figure CN116796000B_ABST
Patent Text Reader

Abstract

This invention provides a knowledge graph entity fusion method based on a specified relation type, comprising the following steps: configuring the entity fusion method and specifying the relation type; obtaining the original graph dataset; identifying all fusion relations of the specified relation type in the relation dataset of the original graph dataset; matching all start and end entities of the fusion relations from the identified fusion relations and marking the fusion entities; performing entity merging operations on the fusion entities; performing relation merging operations on the fusion entities; and generating the fused graph result dataset. The knowledge graph entity fusion method, apparatus, device, and computer-readable storage medium provided by this invention based on a specified relation type offer a feasible method for entity fusion before knowledge graph construction, effectively improving the accuracy of the graph and suitable for specific application scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of knowledge graph technology, and more specifically, to a method, apparatus, device, and computer-readable storage medium for knowledge graph entity fusion based on a specified relation type. Background Technology

[0002] The description of the background art in this invention pertains to related technologies and is used merely for illustration and to facilitate understanding of the invention. It should not be construed as the applicant explicitly believing or presuming that the invention was prior art on the filing date of the first application.

[0003] In the field of knowledge graph technology, if different entities of the same entity type have a specific relationship, such as two people (different entities of the same entity type) sharing the same residential address (a specific relationship), it can be determined that these two entities are likely the same person. However, because entity duplication can affect the accuracy of the knowledge graph, when two or more entities are suspected to be the same entity, they can be merged into a single entity for display in the graph. However, in this process of judgment and fusion, how to make accurate judgments and efficiently merge entities has become a difficult problem for technical personnel.

[0004] To address the aforementioned technical issues, this invention proposes a knowledge graph entity fusion method, apparatus, device, and computer-readable storage medium based on specified relation types. This provides a feasible method for entity fusion before knowledge graph construction, effectively improving the accuracy of the graph and meeting the needs of specific application scenarios. Summary of the Invention

[0005] This invention provides a method, apparatus, device, and computer-readable storage medium for entity fusion of knowledge graphs based on specified relationship types. It provides a feasible method for entity fusion of knowledge graphs before graph construction, effectively improving the accuracy of the graph and suitable for specific application scenarios.

[0006] An embodiment of the first aspect of the present invention provides a knowledge graph entity fusion method based on a specified relation type, comprising the following steps: configuring an entity fusion method and specifying a relation type; obtaining an original knowledge graph dataset; identifying all fusion relations of the specified relation type in the relation dataset of the original knowledge graph dataset; matching all start and end entities of the fusion relations from the identified fusion relations and marking the fusion entities; performing entity merging operations on the fusion entities; performing relation merging operations on the fusion entities; and generating a fused knowledge graph result dataset.

[0007] Preferably, in the step of configuring entity fusion method and specifying relation type, the specified relation type in the graph model is a self-pointing edge, and the self-pointing edge is an edge whose starting point and ending point are the same vertex.

[0008] Preferably, in the step of obtaining the original graph dataset, the original graph dataset is obtained by querying a graph database.

[0009] Preferably, in the step of identifying all fusion relationships of a specified relationship type in the relation dataset of the original graph dataset, all fusion relationships of a specified relationship type are identified according to the specified relationship type.

[0010] Preferably, the entity merging operation steps for merging entities include the following sub-steps: treating the entities to be merged as a whole; selecting the entity with the most relationships as the main merging entity; traversing all entity datasets marked as merging entities, merging them into the main merging entity, and updating the attribute and relationship information.

[0011] Preferably, the steps for merging relationships of the merged entities include the following sub-steps: treating the relationships to be merged as a whole; traversing the relationship dataset of the specified relationship type and merging them into a single relationship; associating the merged relationship with the corresponding merged entity and updating its attribute information.

[0012] Preferably, in the step of generating the fused graph result dataset, the fused graph result dataset is generated based on entity merging operations and relation merging operations.

[0013] A second aspect of the present invention also provides a knowledge graph entity fusion apparatus based on a specified relation type, comprising: a specified relation module for configuring an entity fusion method and specifying a relation type; a data acquisition module for acquiring an original knowledge graph dataset; a relation identification module for identifying all fusion relations of the specified relation type in the relation dataset of the original knowledge graph dataset; an entity matching module for matching all start and end entities of the fusion relations from the identified fusion relations and marking the fusion entities; an entity merging module for performing entity merging operations on the fusion entities; a relation merging module for performing relation merging operations on the fusion entities; and a result generation module for generating a fused knowledge graph result dataset.

[0014] A third aspect of the present invention also provides a knowledge graph entity fusion device based on a specified relation type, which includes a memory and a processor; wherein the memory is used to store executable program code; and the processor is used to read the executable program code stored in the memory to execute a knowledge graph entity fusion method based on a specified relation type.

[0015] An embodiment of the fourth aspect of the present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements a knowledge graph entity fusion method based on a specified relation type.

[0016] The present invention provides a method, apparatus, device, and computer-readable storage medium for knowledge graph entity fusion based on specified relationship types, which provides a feasible method for entity fusion before knowledge graph construction, effectively improves the accuracy of the graph, and is suitable for specific application scenarios.

[0017] Additional aspects and advantages of the invention will become apparent in the following description or may be learned by practice of the invention. Attached Figure Description

[0018] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:

[0019] Figure 1 A flowchart illustrating a knowledge graph entity fusion method based on a specified relation type according to an embodiment of the present invention is shown.

[0020] Figure 2 This is a structural diagram of an embodiment of a knowledge graph entity fusion device based on a specified relation type, as described in this specification.

[0021] Figure 3 This is a structural diagram of an embodiment of a computer-readable storage medium for a knowledge graph entity fusion method based on a specified relation type, as described in this specification. Detailed Implementation

[0022] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.

[0023] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and therefore the scope of protection of the invention is not limited to the specific embodiments disclosed below.

[0024] The following discussion provides several embodiments of the invention. While each embodiment represents a single combination of the invention, different embodiments of the invention can be substituted or combined, and therefore the invention can also be considered to include all possible combinations of the same and / or different embodiments described. Thus, if one embodiment includes A, B, and C, and another embodiment includes a combination of B and D, then the invention should also be considered to include embodiments containing one or more other all other possible combinations of A, B, C, and D, even if such embodiments are not explicitly described in the following text.

[0025] Figure 1 A flowchart illustrating a knowledge graph entity fusion method based on a specified relation type according to an embodiment of the present invention is shown. Figure 1 As shown, the knowledge graph entity fusion method based on a specified relation type includes the following steps: configuring the entity fusion method and specifying the relation type; obtaining the original graph dataset; identifying all fusion relations of the specified relation type in the relation dataset of the original graph dataset; matching all start and end entities of the fusion relations from the identified fusion relations and marking the fusion entities; performing entity merging operations on the fusion entities; performing relation merging operations on the fusion entities; and generating the fused graph result dataset.

[0026] The knowledge graph entity fusion method based on a specified relationship type in this invention merges multiple entities. During entity fusion, it is necessary to determine whether a specified relationship exists between the entities and whether the entities to be merged are of the same type. The specific operation steps are as follows.

[0027] Step 1: Specify the relationship type. Configure the entity fusion method, specify the relationship type, and ensure that the specified relationship type is a self-pointing edge in the graph model, meaning that the starting point and ending point of the edge must be the same vertex.

[0028] Step 2: Obtain the graph data. Query the graph database to obtain the raw graph dataset.

[0029] Step 3: Relationship Identification. In the original graph relation dataset, identify all fusion relationships of the specified relation type.

[0030] Step 4: Entity Matching. From the identified fusion relationships, match all start and end entities of the relationships and mark the fused entities.

[0031] Step 5: Entity Merging. Treat the entities to be merged as a whole, select the entity with the most relationships as the main merging entity, then iterate through all the entity datasets marked as merging entities, merge these entities into the main merging entity, and update their attributes and related relationship information.

[0032] Step 6: Relationship Merging. Similar to entity merging, the relationship type-based approach guides relationship merging. The relationships to be merged are treated as a whole, and then the relationship dataset of the specified relationship type is traversed to merge these relationships into one relationship, associate it with the corresponding merged entity, and update its attribute information.

[0033] Step 7: Generate the fused map result dataset.

[0034] The knowledge graph entity fusion method based on a specified relation type in this invention specifies the relation type, then obtains the original entity data and relation data for entity fusion, and finally correctly obtains the entity data and relation data after entity fusion, and displays the corresponding graph relations on the knowledge graph visualization page.

[0035] The knowledge graph entity fusion device based on a specified relation type provided in this invention includes: a specified relation module for configuring entity fusion methods and specifying relation types; a data acquisition module for acquiring the original knowledge graph dataset; a relation identification module for identifying all fusion relations of the specified relation types in the relation dataset of the original knowledge graph dataset; an entity matching module for matching all start and end entities of the fusion relations from the identified fusion relations and marking the fusion entities; an entity merging module for performing entity merging operations on the fusion entities; a relation merging module for performing relation merging operations on the fusion entities; and a result generation module for generating the fused knowledge graph result dataset.

[0036] Figure 2 This is a structural diagram of an embodiment of a knowledge graph entity fusion device based on a specified relation type, as described in this specification. See below for reference. Figure 2 The diagram illustrates a structural schematic suitable for implementing a knowledge graph entity fusion device 300 based on a specified relation type according to embodiments of the present disclosure. Electronic devices in embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 2 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0037] like Figure 2As shown, the electronic device 300 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 into a random access memory (RAM) 303. The RAM 303 also stores various programs and data required for the operation of the electronic device 300. The processing unit 301, ROM 302, and RAM 303 are interconnected via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0038] Typically, the following devices can be connected to I / O interface 305: input devices 306 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 307 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 308 including, for example, magnetic tapes, hard disks, etc.; and communication devices 309. Communication device 309 allows electronic device 300 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 2 An electronic device 300 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0039] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 309, or installed from a storage device 308, or installed from a ROM 302. When the computer program is executed by the processing device 301, it performs the functions defined in the methods of embodiments of this disclosure.

[0040] Figure 3 This is a structural diagram of an embodiment of a computer-readable storage medium for a knowledge graph entity fusion method based on a specified relation type, as described in this specification. Figure 3 As shown, a computer-readable storage medium 40 according to an embodiment of the present disclosure stores non-transitory computer-readable instructions 41 thereon. When the non-transitory computer-readable instructions 41 are executed by a processor, all or part of the steps of the knowledge graph entity fusion method based on a specified relation type described in the foregoing embodiments of the present disclosure are performed.

[0041] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0042] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0043] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: construct a base page, the page code of which is used to build the environment required for the operation of the business page and / or implement the same workflow abstracted from similar business scenarios; construct one or more page templates, the page templates being used to provide code templates for implementing business functions in the business scenario; based on the corresponding page templates, through code conversion of the specific functions of each page in the business scenario, generate the final page code for each page in the business scenario; and merge the generated final page code of each page into the page code of the base page to generate the code for the business page.

[0044] Alternatively, the aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: construct a base page, the page code of which is used to build the environment required for the operation of the business page and / or implement the same workflow abstracted from similar business scenarios; construct one or more page templates, the page templates being used to provide code templates for implementing business functions in the business scenario; based on the corresponding page templates, through code conversion of the specific functions of each page in the business scenario, generate the final page code for each page in the business scenario; and merge the generated final page code of each page into the page code of the base page to generate the code for the business page.

[0045] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0046] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0047] The units described in the embodiments of this disclosure can be implemented in software or hardware. The names of the units are not, in some cases, intended to limit the specific unit.

[0048] The present invention provides a method, apparatus, device, and computer-readable storage medium for knowledge graph entity fusion based on specified relationship types, which provides a feasible method for entity fusion before knowledge graph construction, effectively improves the accuracy of the graph, and is suitable for specific application scenarios.

[0049] In this invention, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance; the term "multiple" refers to two or more unless otherwise explicitly defined. The terms "install," "connect," "link," and "fix" should be interpreted broadly. For example, "connect" can be a fixed connection, a detachable connection, or an integral connection; "link" can be a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0050] In the description of this invention, it should be understood that the terms "upper" and "lower" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or unit referred to must have a specific orientation or be constructed and operated in a specific orientation. Therefore, they should not be construed as limiting this invention.

[0051] In the description of this specification, the terms "one embodiment," "some embodiments," "specific embodiment," etc., refer to a specific feature, structure, material, or characteristic described in connection with that embodiment or example, which is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0052] The above are merely some embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention can have various modifications and variations. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A knowledge graph entity fusion method based on a specified relation type, characterized in that, Includes the following steps: Configure the entity merging method and specify the relationship type; Obtain the original map dataset; In the relation dataset of the original graph dataset, identify all fusion relations of the specified relation types; From the identified fusion relationships, match all starting and ending entities of the fusion relationships and mark the fused entities; Perform entity merging operations on the merged entities; Perform relationship merging operations on the merged entities; Generate the fused atlas result dataset, where, In the configuration entity fusion method, in the step of specifying the relationship type, the specified relationship type in the graph model is a self-pointing edge, and the self-pointing edge is an edge whose starting point and ending point are the same vertex; The entity merging operation for merging entities includes: Treat the entities that need to be merged as a whole; Select the entity with the most relationships as the main fusion entity; Iterate through all entity datasets marked as merge entities, merge them into the main merge entity, and update the attributes and associated relationship information.

2. The knowledge graph entity fusion method based on a specified relation type according to claim 1, characterized in that, In the step of obtaining the original graph dataset, the original graph dataset is obtained by querying the graph database.

3. The knowledge graph entity fusion method based on a specified relation type according to claim 1, characterized in that, In the step of identifying all fusion relationships of a specified relationship type in the relation dataset of the original graph dataset, all fusion relationships of a specified relationship type are identified according to the specified relationship type.

4. The knowledge graph entity fusion method based on a specified relation type according to claim 3, characterized in that, The steps for merging the relationships of the merged entities include the following sub-steps: Treat the relationships that need to be merged as a whole; Iterate through a relation dataset of a specified relation type and merge them into a single relation; The merged relationships are associated with the corresponding merged entities, and their attribute information is updated.

5. The knowledge graph entity fusion method based on a specified relation type according to any one of claims 1-4, characterized in that, In the step of generating the fused graph result dataset, the fused graph result dataset is generated based on entity merging operations and relation merging operations.

6. A knowledge graph entity fusion device based on a specified relation type, characterized in that, include: The specified relationship module is used to configure the entity fusion method and specify the relationship type. The data acquisition module is used to acquire the original map dataset; A relation identification module is used to identify all fusion relations of a specified relation type in the relation dataset of the original graph dataset; An entity matching module is used to match all starting and ending entities of the identified fusion relationships and mark the fused entities. An entity merging module is used to perform entity merging operations on the entities to be merged. A relationship merging module, which is used to perform relationship merging operations on merged entities; The result generation module is used to generate the fused graph result dataset. In the step of configuring the entity fusion method and specifying the relation type, the specified relation type in the graph model is a self-pointing edge, where the starting and ending points of the edge are the same vertex. The entity merging module is specifically used for: Treat the entities that need to be merged as a whole; Select the entity with the most relationships as the main fusion entity; Iterate through all entity datasets marked as merge entities, merge them into the main merge entity, and update the attributes and associated relationship information.

7. A knowledge graph entity fusion device based on a specified relation type, comprising a memory and a processor; wherein, The memory is used to store executable program code; The processor is used to read executable program code stored in the memory to execute the knowledge graph entity fusion method based on a specified relation type according to any one of claims 1-5.

8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the knowledge graph entity fusion method based on any one of claims 1-5.

Citation Information

Patent Citations

  • Entity fusion method and device for multiple knowledge maps

    CN114357198A