A Chinese short text joint entity disambiguation method and system based on a graph convolutional neural network

By combining the PinSageGCN model based on graph convolutional neural networks with BERT and BiLSTM models, entity disambiguation in short Chinese texts is performed, solving the problems of accuracy and computational complexity in entity disambiguation tasks in short texts and achieving more efficient entity disambiguation results.

CN120493913BActive Publication Date: 2025-12-26BEIJING INSTITUTE OF PETROCHEMICAL TECHNOLOGY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510582533.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-07
Publication Date
2025-12-26
Estimated Expiration
2045-05-07

AI Technical Summary

Technical Problem

Entity disambiguation tasks in short Chinese texts face challenges such as limited length and sparse semantic features. Traditional methods struggle to accurately understand short texts and extract useful knowledge from them, especially when dealing with noisy data, where computational complexity is high and accuracy is insufficient.

Method used

We employ the PinSageGCN model based on graph convolutional neural networks, calculate the similarity between entity references and candidate entities using the BERT+BiLSTM model, and construct a heterogeneous PinSageGCN model by combining cosine similarity and dependency parsing. We train the model using four types of edge relations and fuse similarity models to complete the entity disambiguation task.

Benefits of technology

It improves the accuracy and robustness of entity disambiguation in short Chinese texts, enables the processing of larger datasets without consuming large amounts of computing resources, overcomes memory and GPU memory limitations, and enhances semantic representation capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120493913B_ABST
    Figure CN120493913B_ABST
Patent Text Reader

Abstract

The application discloses a Chinese short text joint entity disambiguation method and system based on a graph convolutional neural network, which comprises the following steps: obtaining an original short text, obtaining a candidate entity set of each entity reference, and generating a training data set; training the training data set to obtain a similarity score of the entity reference and each candidate entity; performing word segmentation and dependency syntax analysis on the original short text, converting the analysis result into graph data, adding the candidate entity as a node to the graph data, obtaining an adjacency matrix, encoding each node by using word2vec to obtain a feature matrix; constructing a GCN entity disambiguation model, and integrating the similarity score as a weight into the adjacency matrix; inputting the feature matrix and the adjacency matrix with the weight into the GCN entity disambiguation model for training; outputting a feature vector of each node, obtaining a global feature score of each candidate entity node by using a full connection layer, and performing sorting according to the global feature score to complete entity disambiguation.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the field of information technology, and particularly relates to a Chinese short text joint entity disambiguation method and system based on a graph convolutional neural network. BACKGROUND

[0002] With the development of big data related technologies in today's society, massive information is growing explosively, leading to information overload and challenging users to obtain the information they need and accurately. Due to the diversity of natural language expression, i.e. polysemy and synonymy, it is necessary to accurately obtain the target information, i.e. to process a large amount of false, redundant and noisy information. However, computers often cannot identify the objects or concepts referred to by entity names in the text, and it is difficult for them to understand the complexity of natural language expression as humans do. For example, in a text, the word "which" can accurately indicate that it refers to the movie "which 2: the descent of the demon child", rather than the game or the third prince of the Westward Journey, but computers cannot do this. This often affects the effectiveness of a series of natural language processing tasks such as problem understanding, knowledge explanation and knowledge base construction.

[0003] Entity disambiguation has always been a task problem common to the fields of natural language processing, information retrieval, and text intelligent mining. It is to associate the referring terms representing entities (entity references) in the text with the entity entries in a specific knowledge base, i.e. the task of mapping the entity references mentioned in the text to the correct entries in the designated knowledge base. When faced with disorganized data information, people long for accurate descriptions of various entities and concepts in the real world, and to map non-structured information to structured semantic descriptions. The entity disambiguation task provides an effective technical means for analyzing a large amount of non-structured text information and plays an important role in many natural language processing tasks, as follows:

[0004] (1) Information retrieval

[0005] With the increasing richness of Internet data resources, information retrieval applications represented by Baidu and Google have provided convenience for people to obtain information. However, traditional search engines have been unable to meet user needs by relying solely on keyword-based mechanical search results, and the inherent diversity and ambiguity of natural language have brought great challenges to high-precision information retrieval. Entity linking technology can effectively eliminate ambiguity in search content, accurately matching entities and related content in knowledge bases or knowledge graphs, which not only enables search engines to accurately understand the user's true intentions, but also provides more accurate search results for users, developing information retrieval technology towards intelligentization.

[0006] (2) Knowledge base and knowledge graph completion

[0007] With the rapid development of the world, the network data is increasing, and the new entities and the association between entities are also increasing. This situation leads to the problem of incompleteness of many knowledge bases and knowledge graphs. Entity linking technology can combine the knowledge of unstructured short text and structured knowledge base or knowledge graph, add new knowledge to the knowledge base and knowledge graph, and effectively complete the knowledge base and knowledge graph, which can promote the application and development of knowledge base and knowledge graph based fields.

[0008] (3) Intelligent question answering

[0009] Now there are many intelligent question answering systems that rely on the development of artificial intelligence technology to upgrade. The function of this kind of system is to let the user input text to ask questions. Since the user usually uses simple language to ask questions, the input text is mostly short text. Then the system will give the corresponding answer. During this period, the algorithm in the system will analyze the short text given by the user. Entity linking technology is used to eliminate the ambiguity of entities, so as to help find the answer more accurately. It can be seen that short text entity linking plays an important role in intelligent question answering systems.

[0010] Although researchers have made many achievements on long text like news, a large amount of information in social media is basically in the form of short text, such as search queries, news headlines, social media comments, etc. The expressions in these short texts are not standardized, and the words are arbitrary. In addition, Chinese sentences lack the space separator in English sentences, so it is still a challenging problem to correctly understand short texts and obtain useful knowledge from them. The main challenge of Chinese short text entity disambiguation task is that short texts have limited length and sparse semantic features, so traditional entity disambiguation methods are difficult to be directly and effectively applied to short texts.

[0011] Early entity disambiguation models use a simple language model, namely the bag-of-words model. Many researchers use it to represent the context of entity mentions and the description text of candidate entities in vector form, and then use the cosine similarity algorithm to calculate the similarity. However, the bag-of-words model usually uses one-hot encoding, which is very sparse and does not consider syntax and word order, and has poor semantic representation ability. Subsequently, the Word2Vec method was born, which represents text as a dense vector representation of words. The advantage is that similar semantic words will have closer vectors, and the relationship between some words can be represented by vector operations, but this method lacks position modeling and cannot consider the relevance of all words in the entire sentence. With the development of deep learning, this technology is frequently applied in various natural language processing tasks, such as RNN, BERT, and other neural networks and pre-trained language models. However, excessive model stacking increases computational complexity, sacrificing a large amount of computing resources while improving efficiency to a small extent, and many deep learning methods do not consider the relevance between entity mentions, candidate entities, and context words when disambiguating entities, so there is still room for improvement in disambiguation accuracy. SUMMARY

[0012] To solve the problems in the prior art, the present application provides a Chinese short text joint entity disambiguation method and system based on a graph convolutional neural network, which uses a heterogeneous PinSage graph convolutional neural network model (PinSage GCN), is trained based on four different types of edge relationships, and combines the prediction results of a similarity model to complete the entity disambiguation task. This model shows strong robustness when processing noisy data. In the present application, even if the input data has some degree of uncertainty, the GCN can still give relatively accurate results, and this model overcomes the limitations of memory and display during training, and can process larger data sets without consuming many computing resources.

[0013] To achieve the above object, the present application provides the following scheme:

[0014] A Chinese short text joint entity disambiguation method based on a graph convolutional neural network, the method comprising:

[0015] Obtain the original short text containing entity mentions, and obtain the candidate entity set of each entity mention according to the existing knowledge base to generate a training data set;

[0016] Use a BERT+BiLSTM model to train the training data set to obtain the similarity score of each candidate entity in the candidate entity set with the entity mention;

[0017] The original short text is segmented and analyzed using LTP, the analysis result is converted into graph data, candidate entities are added to the graph data as nodes, an adjacency matrix of the complete graph data is obtained, and each node is encoded using word2vec to obtain a feature matrix of the complete graph data;

[0018] The cosine similarity between each connected node is calculated as the weight of the edge relationship and is integrated into the adjacency matrix to construct a PinSageGCN entity disambiguation model, the feature matrix and the adjacency matrix with weights are input into the PinSageGCN entity disambiguation model for training, and the node features are updated;

[0019] The features of each node obtained through multi-layer iteration are obtained through the PinSageGCN entity disambiguation model, and four PinSageGCN entity disambiguation models, i.e., a heterogeneous PinSageGCN model, are used based on four edge relationships to complete the entity disambiguation task.

[0020] Preferably, the method for training the training data set using the BERT+BiLSTM model to obtain the similarity score of the entity reference and each candidate entity in the candidate entity set comprises:

[0021] Given an entity reference m and a context Z, for each candidate entity e E m , concatenate Z+M, the candidate entity description C, and two special tokens [CLS] and [SEP] from the BERT vocabulary as an input sequence; wherein [CLS] represents the beginning of the sequence, and [SEP] separates different segments of input; after splicing into a string, the input sequence is sent to BERT for segmentation and encoding into a vector T n ; a BiLSTM model is superimposed for feature extraction to learn the semantic order of the entity reference context and the candidate entity description text, and an output vector p n of the BiLSTM is obtained:

[0022] p n =BiLSTM(T n )=BiLSTM(BERT([CLS]text[SEP]C mi [SEP]))

[0023] Wherein, text represents a short text Z+M, and C mi represents a candidate entity description text of an entity reference m;

[0024] The similarity between text and C mi is calculated to generate a feature vector and pass through a fully connected layer, Dropout, and a sigmod for binary classification to generate a final context similarity S txt (m, e):

[0025] S ctxt (m, e) = sigmod(Dropout(Dense(p n ))).

[0026] Preferably, the graph data is: candidate entity ranking graph G=(V, E), wherein V represents a node set, and E represents an edge set.

[0027] Preferably, the method for adding candidate entities as nodes to the graph data to obtain an adjacency matrix of the complete graph data comprises:

[0028]

[0029] Wherein, i, j represent two nodes in the ith row and jth column of the adjacency matrix A.

[0030] Preferably, the method for encoding each node using word2vec to obtain a feature matrix of the complete graph data comprises:

[0031] The entity mention, the context word, and the candidate entity obtained from the knowledge base for each entity mention are used as nodes, and the node vector initialization of the nodes uses a pre-trained Word2vec model to respectively convert the context word z i ∈Z、m i ∈M includes the context word and the entity mention, converts the word vector, denoted as w m ,w z :

[0032]

[0033] Suppose that the candidate entity description text is composed of j words, and is converted into a vector representation, denoted as w1, w2,..., w j , that is, each word of the candidate entity description text has a corresponding word vector, and the vector representations of all words are added and averaged to obtain a candidate entity vector representation result w c :

[0034]

[0035] The node vectors of the entity mention, the context word, and the candidate entity are uniformly represented as the node features of the node set V of the candidate entity ranking graph G Wherein represents the initial feature vector of a node.

[0036] Preferably, the method for calculating the cosine similarity between each connected node comprises:

[0037]

[0038] where h i and h j denote the feature vectors of node i and node j.

[0039] Preferably, the feature matrix and the weighted adjacency matrix are input into the PinSage GCN to start training, and the method for updating the node features comprises:

[0040] According to the obtained adjacency matrix A', the neighbor nodes of the node are obtained, and for each node i, j represents a neighbor node, and the neighbor node set is N(i):

[0041] N(i) = {j | A' ij ≠ 0};

[0042] Meanwhile, the information of the relationship between the nodes in the graph structure and the semantic information in the node feature vector are used to calculate the node neighbor message distribution and aggregation vector n i ; for each node i, the neighbor node set is N(i);;

[0043]

[0044] where Dense is a fully connected layer network, and γ() represents aggregation.

[0045] According to the feature vector of node i, the node is also updated in the fully connected layer:

[0046]

[0047] where s i denotes the self-updated feature vector of the node.

[0048] The neighbor aggregation information n i is added to the node self-encoding s i and is regularized to obtain a new node vector representation, which is the iteration of the node in the training process:

[0049]

[0050] where, denotes the intermediate result of the node updated feature.

[0051] Preferably, the features of each node after multi-layer iteration are obtained through the PinSage GCN entity disambiguation model, four PinSage GCN entity disambiguation models based on four edge relationships, i.e. a heterogeneous PinSage GCN model, are used to complete the entity disambiguation task, and the method comprises:

[0052] Based on four types of edge relations, the heterogeneous PinSageGCN is trained in a manner, node features of each node under four edge relations are output, various features of the node are fused and spliced, a candidate entity node feature score is obtained by using a full connection layer, a joint learning is performed by combining the similarity score, a joint disambiguation score of each candidate entity node is obtained, the joint disambiguation score is sorted, and a labeled supervised PinSageGCN entity disambiguation model is trained, and finally the entity disambiguation is completed.

[0053] The application further provides a Chinese short text joint entity disambiguation system based on a graph convolutional neural network, which is used to implement the method.

[0054] The acquisition module is used to acquire original short texts containing entity mentions, and acquire a candidate entity set of each entity mention according to an existing knowledge base to generate a training data set.

[0055] The training module is used to train the training data set by using a BERT+BiLSTM model to obtain a similarity score of an entity mention and each candidate entity in the candidate entity set.

[0056] The coding module is used to perform word segmentation and dependency syntax analysis on the original short text by using LTP, convert the analysis result into graph data, add candidate entities as nodes to the graph data to obtain an adjacency matrix of the complete graph data, and code each node by using word2vec to obtain a feature matrix of the complete graph data.

[0057] The updating module is used to calculate a cosine similarity between each connected node as a weight of an edge relation and integrate the adjacency matrix, construct a PinSageGCN entity disambiguation model, input the feature matrix and the adjacency matrix with the weight into the PinSageGCN entity disambiguation model to start training, and update the node features.

[0058] The sorting module is used to obtain features of each node after multi-layer iteration by the PinSageGCN entity disambiguation model, complete an entity disambiguation task by using four PinSageGCN entity disambiguation models, i.e., a heterogeneous PinSageGCN model, based on four edge relations.

[0059] Compared with the prior art, the application has the following beneficial effects:

[0060] The application firstly adopts a pre-trained BERT model and a BiLSTM model to calculate the similarity of entity reference and candidate entity, fully captures more semantic information, reduces the sparsity of vectors, and improves the ability of semantic representation. In addition, the dependency syntax analysis method is used to obtain the correlation between words in short text, and a graph dataset is constructed, and the candidate entity is connected, the relationship between the context words, entity reference and candidate entity is reflected in the graph dataset, the relationship between the three is fully considered, the neural network deeply extracts their inherent characteristics, so as to improve the accuracy of entity disambiguation. Finally, a heterogeneous PinSage graph convolutional neural network model (PinSage GCN) is used to train based on four different types of edge relationships, and the prediction results of the similarity model are fused to complete the entity disambiguation task. The model shows strong robustness when processing noise data, and even if the input data has a certain degree of uncertainty, the GCN can still give relatively accurate results, and the model overcomes the limitation of memory and display during training, and can process larger data sets without consuming many computing resources. BRIEF DESCRIPTION OF DRAWINGS

[0061] In order to more clearly illustrate the technical solutions of the present application, the drawings needed in the embodiments are briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0062] Figure 1 is a whole step schematic diagram of a Chinese short text joint entity disambiguation method based on a graph convolutional neural network according to an embodiment of the present application;

[0063] Figure 2 is a detailed schematic diagram of a Chinese short text joint entity disambiguation process based on a graph convolutional neural network according to an embodiment of the present application;

[0064] Figure 3 is a candidate entity recall and labeling process schematic diagram according to an embodiment of the present application;

[0065] Figure 4 is a similarity calculation model architecture schematic diagram according to an embodiment of the present application;

[0066] Figure 5 is a candidate entity sorting example diagram of entity disambiguation according to an embodiment of the present application;

[0067] Figure 6 is a candidate entity sorting diagram construction process schematic diagram of entity disambiguation according to an embodiment of the present application;

[0068] Figure 7is a PinSage GCN entity disambiguation model architecture schematic diagram of an embodiment of the present application.

[0069] Figure 8 is a candidate entity ranking schematic diagram of an embodiment of the present application.

[0070] Figure 9 is an entity disambiguation running environment deployment schematic diagram of an embodiment of the present application. DETAILED DESCRIPTION

[0071] The technical solutions in the embodiments of the present application will be described in detail below with reference to the drawings of the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of the present application.

[0072] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application will be further described in detail below with reference to the drawings and specific embodiments.

[0073] Embodiment one

[0074] As shown in the figure, the present embodiment provides a Chinese short text joint entity disambiguation method based on graph convolutional neural network, which comprises: Figure 1

[0075] Obtain the original short text containing entity mentions, and obtain the candidate entity set of each entity mention according to the existing knowledge base to generate a training data set;

[0076] Use the BERT+BiLSTM model to train the training data set to obtain the similarity score of the entity mention and each candidate entity in the candidate entity set;

[0077] Use LTP to perform word segmentation and dependency syntax analysis on the original short text, convert the analysis results into graph data according to the analysis results, and add candidate entities as nodes to the graph data to obtain the adjacency matrix of the complete graph data, and then use word2vec to encode each node to obtain the feature matrix of the complete graph data;

[0078] Calculate the cosine similarity between each connected node as the weight of the edge relationship and integrate it into the adjacency matrix to construct a PinSage GCN entity disambiguation model, input the feature matrix and the adjacency matrix with weight into the PinSage GCN entity disambiguation model to start training, and update the node features;

[0079] ​The features of each node after multi-layer iteration are obtained through the PinSage GCN entity disambiguation model, four PinSage GCN entity disambiguation models based on four edge relationships, namely, heterogeneous PinSage GCN models, are used to complete the entity disambiguation task.

[0080] As Figure 2 The specific implementation process of each step of the application is as follows.

[0081] (1) Obtain the original short text containing entity mentions from the entity disambiguation data set, and obtain the candidate entity set of each entity mention according to the existing knowledge base, which includes the annotation of whether each candidate entity is the correct mapping entity of the entity mention, thereby generating a training data set.

[0082] (2) Use the BERT (Bidirectional Encoder Representations from Transformer) and BiLSTM (Bi-directional Long Short-Term Memory) models to train the training data set to obtain the similarity scores of the entity mentions and each candidate entity in the candidate entity set.

[0083] (3) Use the natural language processing toolkit LTP (Language Technology Platform) to perform word segmentation and dependency syntax analysis on the original short text, convert the analysis results into graph data, and add the candidate entities as nodes to the graph data to obtain the adjacency matrix of the complete graph data, and then use word2vec (Word To Vector) to encode each node, i.e., to encode the word segmentation results of the original short text and the candidate entity description text, to obtain the feature matrix of the complete graph data, which is ready for subsequent input into the PinSage GCN model.

[0084] (4) Calculate the cosine similarity between each connected node as the weight of the edge relationship, construct the PinSage GCN entity disambiguation model, input the feature matrix and the adjacency matrix with weights into the PinSage GCN for training, and update the node features.

[0085] (5) Based on four types of edge relationships, train using the way of heterogeneous PinSage GCN, output the node features of each node under four edge relationships, fuse and splice the features of each node, and get the candidate entity node feature score by using the full connection layer, then combine with the similarity score for joint learning, get the joint disambiguation score of each candidate entity node, sort according to the joint disambiguation score, and train the labeled supervised PinSage GCN entity disambiguation model, finally complete the entity disambiguation.

[0086] In the present embodiment, an example of a short text to be disambiguated is given as follows:

[0087] {"text_id": "139", "text": "Time never waits for people, but people always chase time.", "mention_data": [{"kb_id": "277073", "mention": "time", "offset": "0"}]}

[0088] The above data example is a text to be disambiguated short text, and mention_data contains all entity mentions m i , m i ∈M, and the following kb_id is the correct entity corresponding to the knowledge base.

[0089] An example of a knowledge base entity data entry is given as follows:

[0090] {"alias":["Victory"],"subject_id":"10001","subject":"Victory","type":["Thing"],"data":[{"predicate":"Summary","object":"The League of Legends Victory skin line is one of the commemorative limited-edition skin lines created by Riot Games. Riot Games' commemorative limited-edition skin lines also include the League of Legends Championship skin line, the MSI Mid-Season Invitational Conqueror skin line, and the League of Legends World Championship skin line. At the end of each season, Riot Games creates the Victory skin line as a seasonal reward to recognize those who have fought hard in ranked matches to achieve..."}} Players in the Gold rank. "}, {"predicate":"Creator", "object":"RiotGames"}, {"predicate":"Foreign Name", "object":"Victorious"}, {"predicate":"Source", "object":"League of Legends"}, {"predicate":"Chinese Name", "object":"Victory"}, {"predicate":"Attribute", "object":"Virtual"}, {"predicate":"Description", "object":"Limited Victory series skin for the game League of Legends"}]}.

[0091] Where subject is the entity name, subject_id represents the entity's position in the knowledge base, alias is the alias, and the content after data is the description of the entity.

[0092] like Figure 3 The diagram illustrates a candidate entity recall and annotation process according to the present invention. First, the candidate entity description text is checked. If the content is incomplete, it is removed. The description content of the remaining entities in the knowledge base is extracted using a dictionary key-value pair method and concatenated to form the entity description text, also called the candidate entity description text C. Second, the duplication of entity names and aliases in the knowledge base is integrated to ensure that different expressions of the same entity in short texts can also correctly recall candidate entities.

[0093] The `mention_data` dataset is filtered for empty strings to remove training data with format errors and no candidate entities. The entity IDs `kb_id` are further processed to remove entities without a mapping relationship to the entity set, ensuring the validity of correct entities. A dictionary is constructed from the short text, the string of a correct entity, and its ID. Then, character matching is used to match the entity reference string with the entity name in the knowledge base, resulting in several candidate entities, `kb_id`, and a descriptive text `C`. iFinally, according to the kb_id, the recalled several candidate entities are marked, the candidate entities with the same kb_id are marked as 1, indicating the correct disambiguation of the candidate entities, and the rest are marked as 0, indicating the wrong candidate entities.

[0094] In the embodiment, as shown in Figure 4 , given an entity mention m (m∈M) and its context Z, for each candidate entity e∈E m , Z+M (i.e. a short text text, Z represents all context words, and M represents all entity mentions in the short text text), candidate entity description C and two special tokens [CLS] and [SEP] from the BERT vocabulary are concatenated as an input sequence. [CLS] represents the beginning of the sequence, and [SEP] separates the input of different segments. After splicing into a string, it is sent to BERT for tokenization and encoding into a vector T n . On this basis, a BiLSTM model is superimposed for feature extraction, focusing on learning the semantic order of the entity mention context and the candidate entity description text, to obtain the BiLSTM output vector p n .

[0095] p n = BiLSTM(T n ) = BiLSTM(BERT([CLS]text[SEP]C mi [SEP]))

[0096] In the formula, text represents a short text (Z+M), C mi represents one of the candidate entity description texts of an entity mention m, the similarity (matching degree) between text and C mi is calculated, a feature vector is generated, and a full connection layer, Dropout is used to reduce overfitting, and sigmod is used for binary classification to generate the final context similarity S txt (m, e), as shown in the following formula.

[0097] S ctxt (m, e) = sigmod(Dropout(Dense(p n ))

[0098] During training, the annotation described in the foregoing is used for supervised learning, after training is completed, the similarity calculation model is optimized, and finally the trained model is used to output a score for each entity mention and all candidate entities. The score is used for final candidate entity ranking.

[0099] In this embodiment, the way of converting the short text combined with the candidate entity into a graph in this part contains three kinds of nodes and four kinds of relationship edges. Taking the short text "Zha's box office continues to rise because of the funny performance of the True Man of the Supreme Ultimate and Shen Gong Bao" as an example, the short text to be disambiguated is converted into a candidate entity ranking graph, and a sample graph is shown in FIG. 5.

[0100] Among them, "Zha", "True Man of the Supreme Ultimate" and "Shen Gong Bao" are entity references, and the rest are context words. Each entity reference is connected to the corresponding candidate entity. The purpose of building the candidate entity ranking graph is to fully establish the connection among the three kinds of nodes of entity reference, candidate entity and context word, so that the neural network can fully extract the internal features of them, thereby ranking the candidate entities and completing the entity disambiguation task.

[0101] Table 1: Description table of candidate entity ranking graph construction

[0102]

[0103]

[0104] For a short text text, it contains a plurality of context words z i ∈Z, a plurality of entity references m i ∈M, each entity reference has a set of candidate entities C m . Now, a directed graph of three kinds of nodes and four kinds of relationship edges is constructed. The meaning of each node and edge is shown in Table 1, and the specific content is as follows:

[0105] The node set is Z∪M∪C1∪C2∪...∪C k , where k represents the number of all candidate entities of all entity references of a text.

[0106] Relationship edges:

[0107] 1. The nodes that exist in the text through the results of dependency syntax analysis, that is, the relationship between entity references and context or two entity references, or two contexts. It is represented as: <m i ,m j > or <m i ,z j > or <z i ,z j >;

[0108] 2. The relationship between the entity reference node and the corresponding candidate entity node. It is represented as: <m i ,e i >, e i ∈C mi ;

[0109] 3. Relationships between candidate entities of different entity mentions (considering co-occurrence information). Denoted as <e i j i ∈ C mi j ∈ C mj , i≠j

[0110] 4. Context words of candidate entities and short texts. Denoted as <e i ,z j i ∈ C mi .

[0111] According to the above description, the candidate entity ranking graph G is composed of three kinds of nodes and four kinds of relationship edges, and the specific graph construction process is shown in Figure 6

[0112] First, the dependency syntax analysis is performed on the short text to be disambiguated. The tokenization of the short text to be disambiguated is performed at the same time, and the tokenization result is corrected according to the entity mentions obtained from the short text to be disambiguated in Chinese, so as to avoid separating the entity mentions. The tokenization result should include the entity mentions and the context words. Then, the LTP natural language processing toolkit is used to perform the dependency syntax analysis on the tokenization result. The result of the dependency syntax analysis includes the index of the word on which each word depends in the sentence. The information will be used as the basis for the connection of each node in the graph data in the subsequent process, wherein the graph data is a candidate entity ranking graph G=(V, E), wherein V represents a node set, and E represents an edge set.

[0113] Then, the entity mentions, the context words, and the candidate entities of each entity mention obtained from the knowledge base in the previous candidate entity recall module are taken as nodes, and the node vector initialization of the three types of nodes is performed. The pre-trained Word2vec model is used to convert the context words z i ∈ Z, m i ∈ M into word vectors, denoted as w m ,w z .

[0114] w m = Word2vec(m)

[0115] w z = Word2vec(z)

[0116] When converting the candidate entity description text into a vector, the average method is used, that is, the vector of all words in the candidate entity description text is summed, and then the average of all word vectors is calculated. It is assumed that the candidate entity description text is composed of j words, and the above formula is used to convert it into a vector representation, denoted as w1, w2,..., w j ​​​​​That is, each word of the candidate entity description text has a corresponding word vector, and the vector representation of all words is added and averaged to obtain a candidate entity vector representation result w c The following formula can be used to calculate:

[0117]

[0118] After obtaining the node vectors of the entity mention, the context words and the candidate entity, the node features of the candidate entity ranking graph G node set V are uniformly represented That is, the following formula:

[0119]

[0120] According to the dependency syntax analysis result and the correspondence between the entity mention and the candidate entity, four edge relationships of the candidate entity ranking graph G described above are established.

[0121] In this embodiment, after obtaining the candidate entity ranking graph G, the node features Among them And represent the initial feature vectors of nodes i and j.

[0122] According to G, an adjacency matrix A is obtained, which is a matrix representing the connection relationship between nodes in the candidate entity ranking G. The adjacency matrix A is composed of 0 and 1, 1 represents that two nodes are connected, and 0 represents that two nodes are not connected. The connection in the node set V is determined by traversing the edge set E. There are n nodes in G, that is, A is an n x n matrix, represented as follows:

[0123]

[0124] Where i, j represents the two nodes in the ith row and jth column of the adjacency matrix A. After obtaining the adjacency matrix A, the cosine similarity of each pair of connected nodes is calculated and normalized as the weight representation of the edge relationship, which is used to represent the relationship strength between nodes in the adjacency matrix. The cosine similarity calculation formula is as follows:

[0125]

[0126] In the formula, h i and h j represent the feature vectors of nodes i and j (use the initial feature vectors and to calculate the similarity), and w ij represents the cosine similarity calculation result of nodes i and j. Replace A ij in the adjacency matrix with the calculation result as the weight representation A' ij. This operation is performed on all connected nodes to obtain the weighted adjacency A'.

[0127] According to the node features of the candidate entity ranking graph G and the weighted adjacency matrix A input into the PinSage GCN entity disambiguation model, the model architecture is as shown in Figure 7 .

[0128] After obtaining the node features of the candidate entity ranking graph data and the corresponding weighted adjacency matrix A', the graph neural network model constructed above is used for encoding.

[0129] In the encoding training process of the candidate entity ranking graph, PinSage GCN fully considers the importance of neighbor nodes in the graph, obtains the neighbor nodes of the node according to the obtained adjacency matrix A', and for each node i, j represents a neighbor node, and the neighbor node set of i is N(i). The formula is as follows:

[0130] N(i) = {j | A' ij ≠ 0}

[0131] Thus, the information of the relationship between the nodes in the graph structure and the semantic information in the node feature vector are used at the same time to calculate the node neighbor message distribution and aggregation vector n i ; for each node i, the neighbor node set is N(i).

[0132]

[0133] where Dense is a fully connected layer network, and γ() represents aggregation. In addition, the feature vector of node i itself is also updated in the fully connected layer, and s i represents the feature vector of the node self-update, and the specific formula is as follows.

[0134]

[0135] The neighbor aggregation information n i is added to the node self-encoding s i and regularized to obtain a new node vector representation, which is the iteration of the node in the training process.

[0136]

[0137] In summary, PinSage GCN updates the node features by adding neighbor aggregation information to the node self-encoding and regularizing, and after one layer of PinSage GCN, the node feature is updated as follows: where represents the intermediate result of the node updated feature.

[0138] In the construction process of the candidate entity ranking graph, the model fully completes the information interaction of each node connected through the connection between the entity mention and the context, the connection between the entity mention and the candidate entity corresponding thereto, the connection between the candidate entities of different entity mentions, and the connection between the entity mention and the context.

[0139] The PinSage GCN model is used to obtain the features of each node after multi-layer iteration. Next, four PinSage GCN models (heterogeneous PinSage GCN models) are used to complete the entity disambiguation task based on the four edge relationships.

[0140] In the present embodiment, the heterogeneous PinSage GCN is used to complete the entity disambiguation task in the present application, as shown in Figure 8 That is, according to the four different types of edges, four PinSage GCN models are used to train the node feature vectors of the four edge relationships respectively, and each output the feature vector H of the node. p wherein p represents the feature vector trained under the pth edge relationship, and p [1, 2, 3, 4]. The model outputs the feature vectors of all n nodes. wherein is the vector representation of node i under the p relationship edge, L represents the number of layers of the graph neural network in the PinSage GCN model, and then the vector of each node under each type of edge relationship is spliced, that is, each Further, a fully connected layer and an activation function are used to convert the non-linear transformation into the global feature score of the graph neural network of the node.

[0141]

[0142] Then, the similarity scores of the entity mention and the candidate entity calculated by the similarity model are fused, joint learning is performed through a fully connected layer, the final disambiguation score is obtained, and all candidate entities are ranked according to the score to obtain the final disambiguation result. The formula is as follows.

[0143]

[0144] The model calculates the loss according to the result of , and uses the label y i to perform supervised learning. The loss function is as follows.

[0145]

[0146] wherein y i ∈{1,-1} represents whether the node is the correct target entity corresponding to the entity mention, and k is the number of candidate entities. When the node i is a candidate entity node, ki = 1, if for the other two kinds of nodes (entity mention node and context node), K i = 0 represents not participating in the calculation of the loss.

[0147] In this embodiment, as shown in Figure 9 Fig. 1 is a deployment diagram of an entity disambiguation running environment of the present application, and a terminal device thereof includes a processor, a memory, and a computer program stored in the memory and executable on the processor. The processor implements the steps in each of the embodiments of the Chinese short text joint entity disambiguation method based on the graph convolutional neural network when executing the computer program.

[0148] Deployed in this environment, the computer program is mainly divided into three important stages, namely a data preparation stage, a model training stage, and a model use stage. According to the stages, the computer program can be further divided into a data preprocessing module, an entity disambiguation similarity calculation module, a candidate entity ranking graph construction module, a PinSage GCN model construction module, and a candidate entity ranking module. The specific functions of each module are described above. The terminal device can include, but is not limited to, a processor and a memory. Those skilled in the art can understand that Figure 9 It is only an example of a terminal device and does not constitute a limitation on the terminal device, which can include more or fewer components than the diagram.

[0149] Embodiment Two

[0150] The present application also provides a Chinese short text joint entity disambiguation system based on a graph convolutional neural network. The system is used to implement the method of any one of the embodiments. The system includes an acquisition module, a training module, an encoding module, an updating module, and a ranking module.

[0151] The acquisition module is used to acquire original short text containing entity mentions, and acquire a candidate entity set of each entity mention according to an existing knowledge base to generate a training data set.

[0152] The training module is used to train the training data set using a BERT+BiLSTM model to obtain a similarity score of an entity mention and each candidate entity in the candidate entity set.

[0153] The encoding module is used to perform word segmentation and dependency syntax analysis on the original short text using LTP, convert the analysis result into graph data, add candidate entities as nodes to the graph data, obtain an adjacency matrix of the complete graph data, and then encode each node using word2vec to obtain a feature matrix of the complete graph data.

[0154] An updating module is configured to calculate cosine similarity between each connected node as a weight of an edge relationship, integrate the weight into an adjacency matrix, construct a PinSage GCN entity disambiguation model, input the feature matrix and the adjacency matrix with the weight into the PinSage GCN entity disambiguation model to start training, and update node features.

[0155] A sorting module is configured to obtain features of each node after multi-layer iteration by the PinSage GCN entity disambiguation model, complete an entity disambiguation task by using four PinSage GCN entity disambiguation models, i.e., heterogeneous PinSage GCN models, based on four edge relationships.

[0156] The above-described embodiments are merely used to describe the preferred modes of the present application, and are not intended to limit the scope of the present application. Without departing from the design spirit of the present application, various modifications and improvements to the technical solutions of the present application made by those skilled in the art shall fall within the protection scope of the present application as defined by the claims.

Claims

1. A Chinese short text joint entity disambiguation method based on a graph convolutional neural network, characterized in that, The method comprises: acquiring original short text containing entity mentions, and acquiring a candidate entity set of each entity mention according to an existing knowledge base to generate a training data set; training the training data set using a BERT+BiLSTM model to obtain a similarity score of each candidate entity in the candidate entity set with respect to the entity mention; performing word segmentation and dependency syntax analysis on the original short text using LTP, converting the analysis result into graph data, adding candidate entities as nodes to the graph data to obtain an adjacency matrix of the complete graph data, and encoding each node using word2vec to obtain a feature matrix of the complete graph data; calculating the cosine similarity between each connected node as the weight of the edge relationship and integrating it into the adjacency matrix to construct a PinSageGCN entity disambiguation model, inputting the feature matrix and the adjacency matrix with the weight into the PinSageGCN entity disambiguation model to start training, and updating the node features; obtaining the features of each node through multiple iterations of the PinSageGCN entity disambiguation model, and completing the entity disambiguation task based on four edge relationships using four PinSageGCN entity disambiguation models, i.e., a heterogeneous PinSageGCN model; the method for inputting the feature matrix and the adjacency matrix with the weight into the PinSageGCN to start training and updating the node features comprises: According to the resulting adjacency matrix The neighbor nodes of the nodes are obtained, for each node i, j represents a neighbor node, and the neighbor node set is : ; Meanwhile, the information of the relationship between the nodes in the graph structure and the semantic information in the node feature vector are utilized to calculate the node neighbor message distribution and aggregation vector ; for each node i, the neighbor node set is ; ; wherein Dense is a fully connected layer network, denotes polymerization; updating the feature vector of node i in the full connection layer as well: ; wherein, represents the node's updated eigenvector; Aggregating information from neighbors Encoding the node itself Adding and regularizing, we get a new node vector representation, i.e., the iteration of the node in the training process: ; wherein, an intermediate result representing a node update feature, represents a new node vector representation; the method for obtaining the features of each node through multiple iterations of the PinSageGCN entity disambiguation model, and completing the entity disambiguation task based on four edge relationships using four PinSageGCN entity disambiguation models, i.e., a heterogeneous PinSageGCN model, comprises: based on four types of edge relationships, training using a heterogeneous PinSageGCN, outputting the node features of each node under the four edge relationships, fusing and splicing the features of the nodes, and obtaining candidate entity node feature scores using a full connection layer, then combining the similarity scores for joint learning to obtain the joint disambiguation scores of each candidate entity node, sorting according to the joint disambiguation scores, and training a labeled supervised PinSageGCN entity disambiguation model to finally complete entity disambiguation.

2. The method of claim 1, wherein, the method for training the training data set using a BERT+BiLSTM model to obtain a similarity score of each candidate entity in the candidate entity set with respect to the entity mention comprises: Given an entity mention m and context Z, for each candidate entity e E m , concatenate Z + M, the candidate entity description C and two special tokens [CLS] and [SEP] from the BERT vocabulary as an input sequence; where [CLS] represents the beginning of the sequence and [SEP] separates the different segments of input; after splicing into a string, it is sent to BERT for tokenization and encoded into a vector ; superimpose the BiLSTM model for feature extraction to learn the semantic order of the entity mention context and the candidate entity description text, and obtain the BiLSTM output vector : ; Wherein, text represents a short text Z+M, M represents all entity mentions in the short text text, represents one of the candidate entity description texts of a certain entity mention m; The similarity between text and is calculated, a feature vector is generated and a final context similarity is generated by a fully connected layer, Dropout, and binary classification using sigmod : 。 3. The method of claim 1, wherein, The graph data is: candidate entity ranking graph wherein V represents a node set and E represents an edge set.

4. The method of claim 3, wherein, the method for adding candidate entities as nodes to the graph data to obtain an adjacency matrix of the complete graph data comprises: ; where i and j represent two nodes in the ith row and jth column of the adjacency matrix A.

5. The method of claim 4, wherein, the method for encoding each node using word2vec to obtain a feature matrix of the complete graph data comprises: The entity mentions, context words, and candidate entities for each entity mention obtained from a knowledge base are taken as nodes, and node vector initialization is performed using a pre-trained Word2vec model to respectively convert the context words , including context words and entity mentions, convert word vectors, denoted as : ; Assume that the candidate entity description text is composed of j words and is converted into a vector representation, denoted as That is, each word of the candidate entity description text has a corresponding word vector, and the vector representations of all words are added and averaged to obtain a candidate entity vector representation result : ; The node vectors of the entity mentions, context words and candidate entities are uniformly represented as node features of a candidate entity ranking graph G node set V wherein denotes an initial feature vector of a certain node.

6. The method of claim 1, wherein, the method for calculating the cosine similarity between each connected node comprises: ; wherein and represents a node i and node j characteristic vector of the node. 7.A Chinese short text joint entity disambiguation system based on graph convolutional neural network, the system is used to implement the method of any one of claims 1-6, characterized in that, The system comprises an acquisition module, a training module, an encoding module, an updating module, and a sorting module; the acquisition module is configured to acquire original short text containing entity mentions, and acquire a candidate entity set of each entity mention according to an existing knowledge base to generate a training data set; The training module is configured to train the training data set using a BERT+BiLSTM model to obtain a similarity score of an entity designation and each candidate entity in the candidate entity set. The encoding module is configured to perform word segmentation and dependency syntax analysis on the original short text using LTP, convert the analysis result into graph data, add candidate entities as nodes to the graph data, obtain an adjacency matrix of the complete graph data, and encode each node using word2vec to obtain a feature matrix of the complete graph data. The updating module is configured to calculate a cosine similarity between each connected node as a weight of an edge relationship and integrate the weight into the adjacency matrix to construct a PinSageGCN entity disambiguation model, input the feature matrix and the adjacency matrix with the weight into the PinSageGCN entity disambiguation model to start training, and update node features. The sorting module is configured to obtain features of each node after multiple iterations through the PinSageGCN entity disambiguation model, complete an entity disambiguation task based on four edge relationships using four PinSageGCN entity disambiguation models, i.e., a heterogeneous PinSageGCN model. The process of inputting the feature matrix and the adjacency matrix with the weight into the PinSageGCN to start training and updating node features includes: According to the resulting adjacency matrix The neighbor nodes of the nodes are obtained, for each node i, j represents a neighbor node, and the neighbor node set is : ; Meanwhile, the information of the relationship between the nodes in the graph structure and the semantic information in the node feature vector are utilized to calculate the node neighbor message distribution and aggregation vector ; for each node i, the neighbor node set is ; ; wherein Dense is a fully connected layer network, denotes polymerization; The feature vector of node i is also updated in the full connection layer: ; wherein, represents the node's updated eigenvector; Aggregating information from neighbors Encoding of the node itself Adding and regularizing, we get a new node vector representation, i.e. the iteration of the node during training: ; wherein, an intermediate result representing a node update feature, represents a new node vector representation; The process of obtaining features of each node after multiple iterations through the PinSageGCN entity disambiguation model, completing an entity disambiguation task based on four edge relationships using four PinSageGCN entity disambiguation models, i.e., a heterogeneous PinSageGCN model, includes: Based on four types of edge relationships, the heterogeneous PinSageGCN is used for training, node features of each node under four edge relationships are output, each feature of the node is fused, spliced, and used in a full connection layer to obtain a candidate entity node feature score, joint learning is performed in combination with the similarity score to obtain a joint disambiguation score of each candidate entity node, sorting is performed according to the joint disambiguation score, and the PinSageGCN entity disambiguation model is supervised and trained, and finally, entity disambiguation is completed.

Citation Information

Patent Citations

  • Cooperative disambiguation method based on deep semantic neighbor and multivariate entity association

    CN112883199A

  • Short text entity disambiguation method based on multi-task learning

    CN115081445A