CN-121998045-A - Knowledge completion method, device, equipment, storage medium and product
Abstract
The application discloses a knowledge completion method, a device, equipment, a storage medium and a product, and relates to the technical field of artificial intelligence, wherein the knowledge completion method comprises the steps of determining indirect association information between target entities in a knowledge graph; searching in a preset reasoning rule base based on the indirect association information to obtain candidate direct relation information corresponding to the target entity, wherein the preset reasoning rule base comprises indirect relation and direct relation between entities in the knowledge graph, inputting the candidate direct relation information into a preset language model to obtain direct relation information between the target entities, and complementing the knowledge graph based on the direct relation information. Compared with the existing method for determining the entity relationship missing in the knowledge graph by utilizing the symmetry of the relationship, the method provided by the application has the advantages that the detection enhancement is carried out according to the preset reasoning rule base, the direct relationship information between target entities can be accurately predicted, and the knowledge completion accuracy is improved.
Inventors
- LIU HUANYONG
Assignees
- 北京奇虎科技有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20241101
Claims (10)
- 1. A method of knowledge completion, the method comprising the steps of: determining indirect association information between target entities in the knowledge graph; Searching in a preset reasoning rule base based on the indirect association information to obtain candidate direct relation information corresponding to the target entity, wherein the preset reasoning rule base comprises indirect relations and direct relations between the entities in the knowledge graph; And inputting the candidate direct relation information into a preset language model to obtain the direct relation information between the target entities, and complementing the knowledge graph based on the direct relation information.
- 2. The knowledge completion method of claim 1, wherein the step of determining indirect association information between target entities in the knowledge-graph comprises: determining associated path information between target entities in the knowledge graph; Preprocessing the association path information to obtain indirect association information between the target entities.
- 3. The knowledge completion method according to claim 2, wherein the step of preprocessing the association path information to obtain indirect association information between the target entities includes: Carrying out symbolization processing on the associated entity in the associated path information to obtain symbolized associated information; Pruning is carried out on the symbolized associated information, and indirect associated information among the target entities is obtained.
- 4. The knowledge completion method of claim 3, wherein the step of pruning the symbolized associated information to obtain indirect associated information between the target entities comprises: Determining the number of connection paths between the target entities according to the symbolized associated information; Pruning is carried out on the symbolized associated information based on the number of the connection paths, and indirect associated information among the target entities is obtained.
- 5. The knowledge completion method according to claim 1, wherein before the step of retrieving in a preset inference rule base based on the indirect association information to obtain candidate direct relationship information corresponding to the target entity, the method further comprises: determining a connected graph in the knowledge graph through a preset connected graph discovery algorithm; Preprocessing the communication graph to obtain an indirect relationship and a direct relationship between entities corresponding to the communication graph; And constructing a preset reasoning rule base according to the indirect relation and the direct relation.
- 6. The knowledge completion method of claim 5, wherein said step of constructing a library of preset inference rules from said indirect relationships and said direct relationships comprises: Constructing an input template according to the indirect relation, the direct relation and a preset prompt template; and inputting the input template into a preset language model to obtain a preset reasoning rule base output by the preset language model.
- 7. A knowledge completion device, wherein the knowledge completion device comprises: the determining module is used for determining indirect association information between target entities in the knowledge graph; The retrieval module is used for retrieving in a preset reasoning rule base based on the indirect association information to obtain candidate direct relation information corresponding to the target entity, and the preset reasoning rule base comprises an indirect relation and a direct relation between the entities in the knowledge graph; And the knowledge completion module is used for inputting the candidate direct relation information into a preset language model to obtain the direct relation information between the target entities, and completing the knowledge graph based on the direct relation information.
- 8. A knowledge completion device, characterized in that the device comprises a memory, a processor and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the steps of the knowledge completion method according to any of claims 1 to 6.
- 9. A storage medium, characterized in that the storage medium is a computer-readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the knowledge completion method according to any of claims 1 to 6.
- 10. A computer program product, characterized in that it comprises a computer program which, when executed by a processor, implements the steps of the knowledge completion method according to any of claims 1 to 6.
Description
Knowledge completion method, device, equipment, storage medium and product Technical Field The application relates to the technical field of artificial intelligence, in particular to a knowledge completion method, a device, equipment, a storage medium and a product. Background The Knowledge Graph (knowledgegraph) is called a Knowledge domain visualization or Knowledge domain mapping map in book condition report, is a series of different graphs for displaying the Knowledge development process and the structural relationship, and has the defects of incomplete Knowledge and the like in the current Knowledge Graph, wherein the incomplete Knowledge refers to that a certain relationship should exist between two entities in the Knowledge Graph, but the relationship is not reflected in the Knowledge Graph, and the Knowledge Graph needs to be completed for the problem. However, the existing knowledge completion method is to use symmetry of the relationship (friend relationship and colleague relationship) to complete the knowledge, and the completion method needs to define the symmetry relationship in advance, which is limited in number and time-consuming, so how to improve the knowledge completion efficiency of the knowledge graph becomes a technical problem to be solved urgently. Disclosure of Invention The application mainly aims to provide a knowledge completion method, a device, equipment, a storage medium and a product, and aims to solve the technical problem that the existing knowledge graph completion mode is low in efficiency. In order to achieve the above object, the present application provides a knowledge completion method, which includes: determining indirect association information between target entities in the knowledge graph; Searching in a preset reasoning rule base based on the indirect association information to obtain candidate direct relation information corresponding to the target entity, wherein the preset reasoning rule base comprises indirect relations and direct relations between the entities in the knowledge graph; And inputting the candidate direct relation information into a preset language model to obtain the direct relation information between the target entities, and complementing the knowledge graph based on the direct relation information. Optionally, the step of determining indirect association information between target entities in the knowledge-graph includes: determining associated path information between target entities in the knowledge graph; Preprocessing the association path information to obtain indirect association information between the target entities. Optionally, the step of preprocessing the association path information to obtain indirect association information between the target entities includes: Carrying out symbolization processing on the associated entity in the associated path information to obtain symbolized associated information; Pruning is carried out on the symbolized associated information, and indirect associated information among the target entities is obtained. Optionally, the step of pruning the symbolized association information to obtain indirect association information between the target entities includes: Determining the number of connection paths between the target entities according to the symbolized associated information; Pruning is carried out on the symbolized associated information based on the number of the connection paths, and indirect associated information among the target entities is obtained. Optionally, before the step of retrieving in a preset inference rule base based on the indirect association information to obtain candidate direct relationship information corresponding to the target entity, the method further includes: determining a connected graph in the knowledge graph through a preset connected graph discovery algorithm; Preprocessing the communication graph to obtain an indirect relationship and a direct relationship between entities corresponding to the communication graph; And constructing a preset reasoning rule base according to the indirect relation and the direct relation. Optionally, the step of constructing a preset inference rule base according to the indirect relationship and the direct relationship includes: Constructing an input template according to the indirect relation, the direct relation and a preset prompt template; and inputting the input template into a preset language model to obtain a preset reasoning rule base output by the preset language model. Optionally, the step of preprocessing the connectivity graph to obtain an indirect relationship and a direct relationship between entities corresponding to the connectivity graph includes: Pruning the communication graph to obtain a first communication graph; Counting the frequency of each communication graph in the first communication graph, and performing de-duplication on the first communication graph according to the frequency to obtain a second communic