US 12,277,145 B2
Method and apparatus for constructing entity relationship graph, device and storage medium
Feng Hong, Beijing (CN)
Assigned to Beijing Hydrophis Network Technology Co., Ltd., Beijing (CN)
Filed by Beijing Hydrophis Network Technology Co., Ltd., Beijing (CN)
Filed on Mar. 8, 2024, as Appl. No. 18/599,670.
Claims priority of application No. 202310547723.2 (CN), filed on May 16, 2023.
Prior Publication US 2024/0386036 A1, Nov. 21, 2024
Int. Cl. G06F 16/00 (2019.01); G06F 16/28 (2019.01); G06F 16/35 (2019.01)
CPC G06F 16/288 (2019.01) [G06F 16/35 (2019.01)] 17 Claims
OG exemplary drawing
 
1. A method for constructing an entity relationship graph, the method comprising:
acquiring a text to be processed, performing entity recognition on the text to be processed to obtain an initial text entity set, and performing an operation of uniting like terms on text entities in the initial text entity set to obtain a standard text entity set;
performing grammatical structure analysis on the text to be processed, determining whether there is a grammatical dependency between any two standard text entities in the standard text entity set, taking each standard text entity in the standard text entity set as a node, and generating a connection edge between the nodes having the grammatical dependency, so as to obtain a grammatical relationship graph corresponding to the text to be processed;
successively selecting two nodes connected by one connection edge in the grammatical relationship graph as target connection nodes, performing vector conversion on the target connection nodes to obtain text vectors corresponding to the target connection nodes, and analyzing the text entity relationship between the target connection nodes according to the text vectors and a pre-set entity relationship label list; and
constructing a knowledge graph according to the standard text entity and the text entity relationship to obtain the entity relationship graph corresponding to the text to be processed;
wherein the performing entity recognition on the text processing comprises:
performing word segmentation on the text to be processed to obtain a word segmentation set;
searching a part-of-speech set corresponding to each word segmentation in the word segmentation set from a pre-set grammar dictionary;
acquiring context semantic information about each word segmentation in the text to be processed, and screening a part of speech in accordance with the context semantic information from the part-of-speech set as the part of speech of the corresponding word segmentation;
determining the part of speech having a mapping relationship with an entity as a target part of speech according to a pre-set mapping relationship between the part of speech and the entity; and
taking word segmentation corresponding to the target part of speech as an initial text entity of the text to be processed, and collecting all the initial text entities to obtain the initial text entity set.