Entity linking method and device

By using pre-trained information labeling model and vector coding model in entity linking technology, and screening relevant information from the knowledge graph with time information, the problem of low entity linking efficiency and accuracy in the existing technology is solved, and efficient and accurate are achieved entity link.

CN114266245BActive Publication Date: 2024-12-13BEIJING KINGSOFT DIGITAL ENTERTAINMENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010974083.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-16
Publication Date
2024-12-13
Estimated Expiration
2040-09-16

AI Technical Summary

Technical Problem

The existing entity linking technology is not efficient, has limited applicability and low accuracy, making it difficult to effectively solve the ambiguity of entity references in the text.

Method used

By entering the text to be linked to the pre-trained information annotation model, an encoding vector of entity reference is generated, and relevant resume information is filtered from the knowledge graph based on the time information, input the vector encoding model to generate candidate entity encoding vectors, and entity linking is performed according to the degree of matching.

Benefits of technology

It improves the accuracy and efficiency of entity links, ensures the accuracy of link results, and realizes the joint completion of entity recognition and linking.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114266245B_ABST
    Figure CN114266245B_ABST
Patent Text Reader

Abstract

The present application provides an entity linking method and device, wherein the entity linking method includes: inputting a text to be linked into a pre-trained information annotation model, obtaining a first encoding vector output by the information annotation model, the first encoding vector representing the entity reference of the text to be linked, based on the first encoding vector and the time information contained in the text to be linked, screening out resume information related to the text to be linked from a pre-constructed knowledge graph, inputting the resume information into a pre-trained vector encoding model, obtaining a second encoding vector output by the vector encoding model, the second encoding vector representing a candidate entity of the resume information, and when it is determined that the matching degree between the first encoding vector and the second encoding vector is greater than a preset matching degree threshold, entity linking the entity reference with the candidate entity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of knowledge graph technology, and in particular to an entity linking method and apparatus, a computing device, and a computer-readable storage medium. Background Art

[0002] With the rapid development of the Internet, various text information on the Internet contains various entity references such as names of people, places and organizations. Due to the diversity of natural language expressions, an entity reference can often point to multiple real entities. Therefore, in order to correctly understand the true meaning of entity references in the text, it is necessary to link the entity references in the text to the corresponding unambiguous entities in the entity knowledge base.

[0003] Due to the excellent characteristics of neural networks and deep learning methods, such as end-to-end and no need for artificial feature engineering, they have been quickly applied to some tasks in computer vision and natural language processing, and have achieved results that are superior to traditional methods. The field of entity linking is no exception. Through shallow word vectors or neural network models, the effect of entity linking tasks has been improved to a certain extent, but there are at least problems such as low efficiency, limited applicability, and low accuracy that need to be solved urgently. Summary of the invention

[0004] In view of this, embodiments of the present application provide an entity linking method and apparatus, a computing device, and a computer-readable storage medium to address the technical deficiencies in the prior art.

[0005] According to a first aspect of an embodiment of the present application, there is provided an entity linking method, comprising:

[0006] Inputting the text to be linked into a pre-trained information annotation model to obtain a first encoding vector output by the information annotation model, wherein the first encoding vector represents the entity reference of the text to be linked;

[0007] Based on the first encoding vector and the time information contained in the text to be linked, selecting the resume information related to the text to be linked from the pre-constructed knowledge graph;

[0008] Inputting the resume information into a pre-trained vector coding model to obtain a second coding vector output by the vector coding model, wherein the second coding vector represents a candidate entity of the resume information;

[0009] When it is determined that the degree of match between the first encoding vector and the second encoding vector is greater than a preset matching degree threshold, entity linking is performed between the entity reference and the candidate entity.

[0010] Optionally, the step of inputting the text to be linked into a pre-trained information annotation model to obtain a first encoding vector output by the information annotation model, wherein the first encoding vector represents the entity reference of the text to be linked, comprises:

[0011] Inputting the text to be linked into the information annotation model, performing word segmentation processing on the text to be linked to obtain word units of the text to be linked, and performing pre-embedding processing on the word units to obtain word vectors, sentence vectors and position vectors corresponding to the word units;

[0012] Adding the word vector, sentence vector and position vector corresponding to the word unit to generate a vector to be linked corresponding to the word unit;

[0013] The vector encoding module of the information annotation model encodes the vector to be linked to obtain an intermediate encoding vector;

[0014] The named entity annotation module of the vector annotation model performs entity reference recognition on the text to be linked, and performs entity reference annotation on the intermediate encoding vector according to the recognition result to generate the first encoding vector.

[0015] Optionally, inputting the resume information into a pre-trained vector coding model to obtain a second coding vector output by the vector coding model includes:

[0016] Inputting the resume information into the vector encoding model, performing word segmentation processing on the resume information to obtain word units of the resume information, and performing pre-embedding processing on the word units to obtain word vectors, sentence vectors, and position vectors corresponding to the word units;

[0017] Adding the word vector, sentence vector and position vector corresponding to the word unit to generate the intermediate vector corresponding to the word unit;

[0018] The intermediate vector is input into the vector encoding module of the information labeling model for encoding to obtain the second encoded vector.

[0019] Optionally, the step of filtering out resume information related to the text to be linked from a pre-built knowledge graph based on the first encoding vector and the time information contained in the text to be linked includes:

[0020] Preprocessing the text to be linked to obtain time information contained in the text to be linked;

[0021] Performing a first information screening in a pre-constructed knowledge graph based on the entity reference to obtain intermediate screening information;

[0022] Based on the time information, a second information screening is performed on the intermediate screening information to obtain the resume information.

[0023] Optionally, after obtaining the second encoding vector output by the vector encoding model, the method further includes:

[0024] Concatenate the first encoding vector and the second encoding vector;

[0025] Determine the matching degree between the query text and the resume description information according to the encoding vector obtained by splicing;

[0026] When it is determined that the matching degree between the first encoding vector and the second encoding vector is greater than a preset matching degree threshold, the entity reference is entity-linked with the candidate entity.

[0027] Optionally, after obtaining the second encoding vector output by the vector encoding model, the method further includes:

[0028] Concatenate the first encoding vector and the second encoding vector;

[0029] The encoding vector obtained by concatenation is input into the text matching module of the vector encoding model, and the text matching module calculates the matching degree of the encoding vector and outputs the calculation result.

[0030] Optionally, the entity reference and the candidate entity are entity-linked, comprising:

[0031] Perform entity screening on the candidate entities to obtain target candidate entities;

[0032] Determining a corresponding target relationship and attribute information of the target candidate entity according to the target candidate entity;

[0033] Based on the target relationship and the attribute information, the entity reference is entity-linked with the candidate entity.

[0034] Optionally, the entity linking method further includes:

[0035] Determine the position vectors corresponding to the entity references in the text to be linked;

[0036] Fusing the position vector with the first coding vector to obtain a fused coding vector;

[0037] When it is determined that the matching degree between the fused encoding vector and the second encoding vector is greater than a preset matching degree threshold, the entity reference is entity-linked with the candidate entity.

[0038] According to a second aspect of an embodiment of the present application, there is provided a physical linking device, comprising:

[0039] A first processing module is configured to input the to-be-linked text into a pre-trained information annotation model, and obtain a first encoding vector output by the information annotation model, wherein the first encoding vector represents an entity reference of the to-be-linked text;

[0040] A screening module is configured to screen out resume information related to the text to be linked from a pre-built knowledge graph based on the first encoding vector and the time information contained in the text to be linked;

[0041] A second processing module is configured to input the resume information into a pre-trained vector coding model to obtain a second coding vector output by the vector coding model, wherein the second coding vector represents a candidate entity of the resume information;

[0042] A linking module is configured to perform entity linking between the entity reference and the candidate entity when it is determined that the matching degree between the first encoding vector and the second encoding vector is greater than a preset matching degree threshold.

[0043] According to a third aspect of an embodiment of the present application, a computing device is provided, comprising a memory, a processor, and computer instructions stored in the memory and executable on the processor, wherein the processor implements the steps of the entity linking method when executing the instructions.

[0044] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores computer instructions, and when the instructions are executed by a processor, the steps of the entity linking method are implemented.

[0045] In an embodiment of the present application, a first coding vector output by the information annotation model is obtained by inputting the text to be linked into a pre-trained information annotation model, wherein the first coding vector represents the entity reference of the text to be linked, and based on the first coding vector and the time information contained in the text to be linked, resume information related to the text to be linked is screened out from a pre-constructed knowledge graph, and the resume information is input into a pre-trained vector coding model to obtain a second coding vector output by the vector coding model, wherein the second coding vector represents a candidate entity of the resume information, and when it is determined that the matching degree between the first coding vector and the second coding vector is greater than a preset matching degree threshold, the entity reference is entity-linked with the candidate entity;

[0046] It is achieved that entity recognition and entity linking tasks are completed simultaneously by using a joint training method, and by preprocessing the information in the text to be linked to extract time information, the resume information in the knowledge graph is screened using the time information and entity annotation information, thereby improving the accuracy of the screening results. In addition, when the matching degree between the first encoding vector used to represent the entity reference in the text to be linked and the second encoding vector used to represent the candidate entity in the resume information is greater than a preset matching degree threshold, the entity reference is entity linked with the candidate entity, which is beneficial to improving the linking efficiency and ensuring the accuracy of the linking results. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 is a structural block diagram of a computing device provided in an embodiment of the present application;

[0048] Figure 2 is a flow chart of the entity linking method provided in an embodiment of the present application;

[0049] Figure 3 Schematic diagram of the architecture of a vector encoding module provided in an embodiment of the present application;

[0050] Figure 4 It is a schematic diagram of the implementation process of the entity linking method provided in the embodiment of the present application;

[0051] Figure 5 is a flowchart of the processing process of the entity linking method provided in the embodiment of the present application;

[0052] Figure 6 It is a structural diagram of the entity linking device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0053] Many specific details are described in the following description to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present application, so the present application is not limited by the specific implementation disclosed below.

[0054] The terms used in one or more embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of the present application. The singular forms of "a", "said" and "the" used in one or more embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of the present application refers to and includes any or all possible combinations of one or more associated listed items.

[0055] It should be understood that, although the terms first, second, etc. may be used to describe various information in one or more embodiments of the present application, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of the present application, the first may also be referred to as the second, and similarly, the second may also be referred to as the first.

[0056] First, the terms involved in one or more embodiments of the present invention are explained.

[0057] Knowledge Graph (KG): also known as scientific knowledge graph, is a concept in the field of library and information science. It is used to draw, analyze and display the connections between disciplines or academic research subjects. It is a visualization tool that reveals and displays the development process and structural relationship of scientific knowledge.

[0058] Entity: Entity is the basic unit of knowledge graph and an important language unit that carries information in text.

[0059] Mention: A linguistic fragment expressing an entity in natural text.

[0060] Entity linking: It is the task of linking the mention in the text to the entity in the KG.

[0061] In the present application, an entity linking method and apparatus, a computing device, and a computer-readable storage medium are provided, which are described in detail one by one in the following embodiments.

[0062] Figure 1 The structure block diagram of a computing device 100 according to an embodiment of the present application is shown. The components of the computing device 100 include but are not limited to a memory 110 and a processor 120. The processor 120 is connected to the memory 110 via a bus 130, and the database 150 is used to store data.

[0063] The computing device 100 also includes an access device 140 that enables the computing device 100 to communicate via one or more networks 160. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 140 may include one or more of any type of network interface (e.g., a network interface card (NIC)) whether wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a World Wide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.

[0064] In one embodiment of the present application, the above components of the computing device 100 and Figure 1 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 1 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of the present application. Those skilled in the art may add or replace other components as needed.

[0065] The computing device 100 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or PC. The computing device 100 may also be a mobile or stationary server.

[0066] The processor 120 may execute Figure 2 Steps in the entity linking method shown. Figure 2 A flowchart of an entity linking method according to an embodiment of the present application is shown, including steps 202 to 208.

[0067] Step 202: input the text to be linked into a pre-trained information annotation model to obtain a first encoding vector output by the information annotation model, wherein the first encoding vector represents the entity reference of the text to be linked.

[0068] The entity linking method described in the embodiments of this specification can be applied to government affairs, finance, military and other fields. The information annotation model is implemented by a pre-training model, wherein the pre-training model includes 12 stack layers, which are connected in sequence. Each stack layer also includes: a self-attention layer, a first specification layer, a feedforward layer and a second specification layer. The text to be linked is input as an input set into the embedding layer of the information annotation model to obtain a text vector, and then the text vector is input into the first stack layer, and the output vector of the first stack layer is input into the second stack layer... and so on, and finally the output vector of the last stack layer is obtained. The output vector of the last stack layer is input into the feedforward layer as the representation vector of each word unit for processing to obtain the encoding vector of the input set.

[0069] Furthermore, the step of inputting the text to be linked into a pre-trained information annotation model to obtain a first encoding vector output by the information annotation model, wherein the first encoding vector represents the entity reference of the text to be linked, can be specifically implemented in the following manner:

[0070] Inputting the text to be linked into the information annotation model, performing word segmentation processing on the text to be linked to obtain word units of the text to be linked, and performing pre-embedding processing on the word units to obtain word vectors, sentence vectors and position vectors corresponding to the word units;

[0071] Adding the word vector, sentence vector and position vector corresponding to the word unit to generate a vector to be linked corresponding to the word unit;

[0072] The vector encoding module of the information annotation model encodes the vector to be linked to obtain an intermediate encoding vector;

[0073] The named entity annotation module of the vector annotation model performs entity reference recognition on the text to be linked, and performs entity reference annotation on the intermediate encoding vector according to the recognition result to generate the first encoding vector.

[0074] In one embodiment of the present specification, the information annotation model is a named entity recognition (NER) model, and the information annotation model is implemented by a pre-trained model (BERT model). In practical applications, since the pre-trained model can provide some general linguistic information and some general field prior knowledge, a corresponding model can be constructed based on the pre-trained model and combined with other layer structures. For example, the pre-trained model is combined with the classification layer to construct a generated information annotation model. For the sake of ease of description, the BERT model in the information annotation model is uniformly referred to as a vector encoding module in the embodiment of this specification.

[0075] In the application stage, the query text (text to be linked) is input into the information annotation model, the embedding layer in the information annotation model performs word segmentation on the text to be linked, obtains the word unit of the text to be linked, and pre-embeds the word unit to obtain the word vector, sentence vector and position vector corresponding to the word unit, then the word vector, sentence vector and position vector are added to generate the vector to be linked corresponding to the word unit of the text to be linked, the text to be linked is input into the vector encoding module of the information annotation model to encode the vector to be linked to obtain an intermediate encoding vector, and finally the intermediate encoding vector is input into the classification layer (named entity annotation module) to perform entity reference annotation on the intermediate encoding vector, and output a first encoding vector with entity reference annotation information, the first encoding vector representing the entity reference (mention) of the text to be linked.

[0076] Specifically, entity reference is a language fragment that expresses an entity in a natural text. Taking the to-be-linked text (query text) as "Zhang San is a leader in City X. He has worked in City X for three years and was awarded the title of excellent leader in Y" as an example, "Zhang San", "City X", "a leader", "he" and "excellent leader" in the to-be-linked text can all be used as entity references.

[0077] In the embodiment of the present specification, the input set may adopt the following format: [[CLS], text to be linked, [SEP]].

[0078] Taking the given text to be linked as "Zhang San is a hero in the Z game" as an example, the text to be linked can be used as an input set and input into the vector encoding module of the NER model in the form of a string to obtain the output intermediate encoding vector; the specific schematic diagram is as follows Figure 3 As shown in the figure, the input vector (intermediate encoding vector) generated by the embedding layer is the sum of the following three vectors:

[0079] Word unit vector — the vector corresponding to each word unit;

[0080] Sentence vector — the sentence vector to which each word unit belongs;

[0081] Position vector - a vector generated by the position of each word unit.

[0082] For example, the text to be linked is "Zhang San is a hero in the Z game". The text to be linked is segmented to obtain a word unit set [[CLS], Zhang, San, is, Z, game, of, hero, [SEP]], where CLS is a sentence start symbol and SEP is a sentence segmentation symbol. The above word unit set is embedded and then input into the vector encoding module. The output vector of the last stack layer of the vector encoding module is used as the representation vector of each word unit and input into the feedforward layer for processing. The encoding vector of the input set is [A1, A2, ... A 10 , A 11 ].

[0083] After the vector encoding module outputs the intermediate encoding vector, each character unit in the intermediate encoding vector can be annotated with entity reference through the classification layer to determine the start or end position index of the entity reference in the text to be linked, wherein the vector encoding module is equivalent to an encoder with some prior features. After the input to be linked is encoded by the vector encoding module, the classification layer of the NER model performs a sequence labeling task for the intermediate encoding vector output by the vector encoding module, that is, identifies the label category corresponding to each character in the intermediate encoding vector, and annotates the information according to the category, for example, for non-target information, it is labeled as o, and for target information, it is labeled as pr.

[0084] According to the annotation results, it is possible to determine which entity references are in the text to be linked, as well as the position index of each entity reference, the ID of each entity reference in the knowledge base, etc.

[0085] After the input text to be linked is encoded by the vector encoding module in the embodiment of this specification, the classification layer of the NER model performs a sequence labeling task for the intermediate encoding vector output by the vector encoding module, which is conducive to ensuring the accuracy of the labeling results.

[0086] Step 204: based on the first coding vector and the time information contained in the text to be linked, select the resume information related to the text to be linked from the pre-constructed knowledge graph.

[0087] In a specific implementation, based on the first coding vector and the time information contained in the text to be linked, the resume information related to the text to be linked is screened out from the pre-built knowledge graph, which can be specifically implemented in the following manner:

[0088] Preprocessing the text to be linked to obtain time information contained in the text to be linked;

[0089] Performing a first information screening in a pre-constructed knowledge graph based on the entity reference to obtain intermediate screening information;

[0090] Based on the time information, a second information screening is performed on the intermediate screening information to obtain the resume information.

[0091] Specifically, after determining the text to be linked, the text to be linked can be preprocessed to obtain the time information contained in the text to be linked, and information screening can be performed in a pre-constructed knowledge graph based on the time information and the entity reference annotation information contained in the first encoding vector to obtain resume information associated with the time information and the entity reference information.

[0092] The preprocessing may include semantic recognition of the text to be linked or keyword extraction of the text to be linked to obtain time information contained in the text to be linked. The specific processing method may be determined according to actual needs and is not limited here.

[0093] In practical applications, since the entities involved in the application scenarios of the entity linking method are mostly actual names of people, and the knowledge graph stores a large amount of resume information about the names of people, and the basic personal information, educational background, and work experience in the resume information are all related to time, after determining the entity reference and time information contained in the text to be linked, the resume information is screened in combination with the entity reference and time information to obtain more accurate screening results.

[0094] Step 208, input the resume information into a pre-trained vector coding model to obtain a second coding vector output by the vector coding model, wherein the second coding vector represents the candidate entity of the resume information.

[0095] Specifically, the vector encoding model, that is, the text matching model, can be implemented through a pre-trained model (BERT model). For the sake of ease of description, the embodiments of this specification refer to the BERT model in the information annotation model as a vector encoding module.

[0096] In a specific implementation, the resume information is input into a pre-trained vector coding model to obtain a second coding vector output by the vector coding model, which can be specifically implemented in the following manner:

[0097] Inputting the resume information into the vector encoding model, performing word segmentation processing on the resume information to obtain word units of the resume information, and performing pre-embedding processing on the word units to obtain word vectors, sentence vectors, and position vectors corresponding to the word units;

[0098] Adding the word vector, sentence vector and position vector corresponding to the word unit to generate the intermediate vector corresponding to the word unit;

[0099] The intermediate vector is input into the vector encoding module of the information labeling model for encoding to obtain the second encoded vector.

[0100] Specifically, the specific implementation method of the vector coding model for word segmentation, pre-embedding and encoding of the resume information is similar to the specific implementation process of the information annotation model processing the text to be linked, which will not be repeated here.

[0101] Step 210: When it is determined that the degree of match between the first encoding vector and the second encoding vector is greater than a preset matching degree threshold, entity linking is performed between the entity reference and the candidate entity.

[0102] Specifically, after obtaining the resume information related to the text to be linked, the resume information can be input into a pre-trained vector coding model to obtain a second coding vector output by the vector coding model, where the second coding vector represents the candidate entity of the resume information.

[0103] Taking into account that the entities contained in the pre-constructed knowledge graph may have duplicate names, the resume information is screened according to the entity reference and time information. In the screening results, there may be multiple resume information corresponding to the same entity reference. Therefore, after obtaining the first encoding vector of the text to be linked and the second encoding vector corresponding to the resume information, it is necessary to calculate the matching degree between the first encoding vector and the second encoding vector, and take the entity contained in the resume information with the highest matching degree as the candidate entity, and perform entity linking on the candidate entity and the entity reference in the text to be linked.

[0104] Furthermore, after obtaining the second encoding vector output by the vector encoding model, the entity reference and the candidate entity are entity linked, which can be specifically implemented in the following manner:

[0105] Concatenate the first encoding vector and the second encoding vector;

[0106] Determine the matching degree between the query text and the resume description information according to the encoding vector obtained by splicing;

[0107] When it is determined that the degree of match between the first encoding vector and the second encoding vector is greater than a preset matching degree threshold, entity linking is performed between the entity reference and the candidate entity.

[0108] In addition, the matching degree between the first encoding vector and the second encoding vector may be calculated by a text matching module of the vector encoding model, which may be specifically implemented in the following manner:

[0109] Concatenate the first encoding vector and the second encoding vector;

[0110] The encoding vector obtained by concatenation is input into the text matching module of the vector encoding model, and the text matching module calculates the matching degree of the encoding vector and outputs the calculation result.

[0111] Alternatively, this can be achieved by:

[0112] Determine the position vectors corresponding to the entity references in the text to be linked;

[0113] Fusing the position vector with the first coding vector to obtain a fused coding vector;

[0114] When it is determined that the matching degree between the fused encoding vector and the second encoding vector is greater than a preset matching degree threshold, the entity reference is entity-linked with the candidate entity.

[0115] Specifically, after obtaining the first encoding vector output by the information annotation model, since the first encoding vector is used to represent the entity reference of the text to be linked, the entities contained in the text to be linked and the position vectors corresponding to each entity can be determined. For example, the text to be linked is "Li Bai is a song by Li xx", where "Li Bai" is an entity reference, and the position vector corresponding to "Li Bai" in the text to be linked is [0 1 1 0 0 0 00 0 0 0 0]. After determining the position vectors corresponding to each entity reference in the text to be linked, the position vector is fused with the first encoding vector used to represent the entity reference, and the fused encoding vector is spliced ​​with the second encoding vector, and the splicing result is input into the text matching model. The classification layer of the text matching model performs a binary classification task on the fused encoding vector and the second encoding vector to determine the matching degree between the fused encoding vector and the second encoding vector.

[0116] When it is determined that the matching degree between the fused coding vector and the second coding vector is greater than a preset matching degree threshold, the entity reference is entity-linked with the candidate entity and the linking result is output. In practical applications, the linking result can be displayed through an output interface, or, when it is determined that the matching degree between the fused coding vector and the second coding vector is less than or equal to a preset matching degree threshold, the entity reference in the query text can be determined through manual intervention, that is, which resume information is more similar to or more matched with the information of the entity reference can be determined, the resume information corresponding to the determination result can be updated, and the entity contained in the updated resume information can be used as a candidate entity, the candidate entity is entity-linked with the entity reference in the text to be linked, and the linking result can be displayed on the output interface, or multiple candidate entities with matching degrees lower than the preset threshold can be displayed on the output interface.

[0117] In practical applications, since the lengths of the fused coding vector and the second coding vector may be different, the fused coding vector and the second coding vector are concatenated in a front-to-back manner, but the specific front-to-back order is not specifically limited.

[0118] In addition, freezing the shallow network layer of the BERT pre-trained model and retaining part of the deep network to complete the model construction for downstream NER and text matching tasks is helpful to reduce model training time, improve training efficiency, and improve the accuracy of the algorithm model to a certain extent.

[0119] In addition, when it is determined that the matching degree between the first coding vector and the second coding vector is lower than the preset threshold but higher than the standard value (for example, between 0.5 and 0.9 or 0.5 and 0.8), it is necessary to manually intervene to determine the entity reference in the query text, that is, to determine which resume information is more similar to or more matching with the information of the entity reference. The resume information corresponding to the determination result can be updated, and the entity contained in the updated resume information can be used as a candidate entity. The candidate entity is entity-linked with the entity reference in the text to be linked, and the entity linking result is output.

[0120] In addition, entity linking the entity reference with the candidate entity can be implemented in the following ways:

[0121] Perform entity screening on the candidate entities to obtain target candidate entities;

[0122] Determining a corresponding target relationship and attribute information of the target candidate entity according to the target candidate entity;

[0123] Based on the target relationship and the attribute information, the entity reference is entity-linked with the candidate entity.

[0124] Specifically, in practical applications, the same word may express different meanings in different contexts and have different meanings, so entity screening is required. The entity screening process may include but is not limited to entity disambiguation, entity normalization and reference resolution. The purpose of entity disambiguation is to correspond the same word to different entities according to different contexts. For example, for Li Bai, if it appears in the context of a song, it can be determined as the name of the song, and if it appears in the context of poetry, it can be determined as the poet. Similarly, in practical applications, there may be a situation where two words correspond to the same entity, such as "Beijing" and "the capital of the motherland". Although the two words are literally two different entities, they actually refer to the same entity, and multiple candidate entities need to be normalized (Entity Resolution) operations.

[0125] Co-reference resolution is also an important step in knowledge fusion. In the target audit information, there are usually many pronouns such as "he", "it", "they", etc. Knowledge fusion also needs to determine the entity corresponding to each pronoun. For example, for a sentence "Zhang San is a leader in X City. He has worked in X City for three years and was awarded the title of outstanding leader in Y year." After co-reference resolution, it can be determined that the "he" specifically refers to "Zhang San".

[0126] After performing entity disambiguation, entity normalization, and coreference resolution on candidate entities, the target candidate entity can be determined. Based on the target candidate entity, the target relationship corresponding to the target candidate entity and the attribute information of the target candidate entity can be determined. Then, given the target relationship and the attribute information, the entity reference can be entity linked with the candidate entity and the link result can be output.

[0127] In addition, the implementation process diagram of the entity linking method provided in the embodiment of this specification is as follows Figure 4 As shown: Figure 4 The named entity recognition (NER) model in is used to perform entity recognition on the query text, and the text matching model is used to calculate the matching degree of two vectors, and both the named entity recognition model and the text matching model can be implemented by a pre-trained model (BERT model).

[0128] The labeled data is input into the named entity recognition (NER) model and the text matching model for model training. The two models are jointly trained to construct the model framework, where the NER model is a sequence labeling task and the text matching model is a text matching task. Multi-task loss is used for joint training and optimization.

[0129] In the application stage, the query text (text to be linked) is input into the information annotation model to obtain a first encoding vector output by the information annotation model, wherein the first encoding vector represents the entity mention of the text to be linked, wherein the query text is input into a vector encoding module in the information annotation model, the vector encoding module outputs an intermediate encoding vector corresponding to the query text, and the intermediate encoding vector is input into a classification layer to perform entity mention annotation on the intermediate encoding vector, and output a first encoding vector with entity mention annotation information.

[0130] In addition, after determining the text to be linked, the text to be linked can be preprocessed to obtain the time information contained in the text to be linked, and information screening can be performed in a pre-constructed knowledge graph based on the time information and the entity reference annotation information contained in the first encoding vector to obtain resume information associated with the time information and the entity reference information.

[0131] After obtaining the resume information related to the text to be linked, the resume information can be input into a pre-trained vector coding model to obtain a second coding vector output by the vector coding model, wherein the second coding vector represents a candidate entity of the resume information.

[0132] Taking into account that the entities contained in the pre-constructed knowledge graph may have duplicate names, the screening results obtained by filtering the resume information according to the entity reference and time information may include multiple resume information corresponding to the same entity reference. Therefore, after obtaining the first encoding vector of the text to be linked and the second encoding vector corresponding to the resume information, it is necessary to calculate the matching degree between the first encoding vector and the second encoding vector, and take the entity contained in the resume information with the highest matching degree as the candidate entity, and perform entity linking on the candidate entity and the entity reference in the text to be linked.

[0133] In an embodiment of the present specification, a text to be linked is input into a pre-trained information annotation model to obtain a first encoding vector output by the information annotation model, wherein the first encoding vector represents the entity reference of the text to be linked, information is screened in a pre-constructed knowledge graph based on the first encoding vector and time information contained in the text to be linked, and resume information related to the text to be linked is obtained. The resume information is input into a pre-trained vector encoding model to obtain a second encoding vector output by the vector encoding model, wherein the second encoding vector represents a candidate entity of the resume information, and when it is determined that the degree of match between the first encoding vector and the second encoding vector is greater than a preset matching degree threshold, the entity reference is entity-linked with the candidate entity.

[0134] It is achieved that entity recognition and entity linking tasks are completed simultaneously by using a joint training method, and by preprocessing the information in the text to be linked to extract time information, the resume information in the knowledge graph is screened using the time information and entity annotation information, thereby improving the accuracy of the screening results. In addition, when the matching degree between the first encoding vector used to represent the entity reference in the text to be linked and the second encoding vector used to represent the candidate entity in the resume information is greater than a preset matching degree threshold, the entity reference is entity linked with the candidate entity, which is beneficial to improving the linking efficiency and ensuring the accuracy of the linking results.

[0135] Figure 5 A flowchart of the processing process of the entity linking method according to an embodiment of the present application is shown, including steps 502 to 522.

[0136] Step 502: input the text to be linked into the information annotation model.

[0137] Step 504: Obtain a first encoding vector output by the information annotation model, wherein the first encoding vector represents the entity designation of the text to be linked.

[0138] Step 506: pre-process the text to be linked to obtain time information contained in the text to be linked.

[0139] Step 508: Perform a first information screening in a pre-constructed knowledge graph based on the entity reference to obtain intermediate screening information.

[0140] Step 510: Based on the time information, perform a second information screening on the intermediate screening information to obtain resume information.

[0141] Step 512, input the resume information into the vector encoding model to obtain a second encoding vector.

[0142] Specifically, the second encoding vector represents the candidate entity of the resume information.

[0143] Step 514, determining the position vectors corresponding to the entity references in the to-be-linked text.

[0144] Step 516: fuse the position vector with the first coding vector to obtain a fused coding vector.

[0145] Step 518: perform vector concatenation on the fused coding vector and the second coding vector.

[0146] Step 520, determining the matching degree between the query text and the resume description information according to the encoding vector obtained by concatenation.

[0147] Step 522: When it is determined that the matching degree is greater than a preset matching degree threshold, entity linking is performed between the entity reference and the candidate entity and a linking result is output.

[0148] The embodiments of this specification realize the simultaneous completion of entity recognition and entity linking tasks by joint training, which is beneficial to improving linking efficiency and ensuring the accuracy of linking results; by preprocessing the information in the link text to extract time information, the resume information in the knowledge graph is screened using the time information and entity annotation information, thereby ensuring the accuracy of the screening results.

[0149] Corresponding to the above method embodiment, the present application also provides an embodiment of a physical linking device, Figure 6 FIG. 1 is a schematic diagram showing the structure of a physical linking device according to an embodiment of the present application. Figure 6 As shown, the device 600 includes:

[0150] The first processing module 602 is configured to input the to-be-linked text into a pre-trained information annotation model, and obtain a first encoding vector output by the information annotation model, wherein the first encoding vector represents the entity reference of the to-be-linked text;

[0151] A screening module 604 is configured to screen out resume information related to the text to be linked from a pre-built knowledge graph based on the first encoding vector and the time information contained in the text to be linked;

[0152] The second processing module 606 is configured to input the resume information into a pre-trained vector coding model to obtain a second coding vector output by the vector coding model, wherein the second coding vector represents a candidate entity of the resume information;

[0153] The linking module 608 is configured to perform entity linking between the entity reference and the candidate entity when it is determined that the matching degree between the first encoding vector and the second encoding vector is greater than a preset matching degree threshold.

[0154] Optionally, the first processing module 602 includes:

[0155] The text processing submodule is configured to input the to-be-linked text into the information annotation model, perform word segmentation processing on the to-be-linked text to obtain word units of the to-be-linked text, and perform pre-embedding processing on the word units to obtain word vectors, sentence vectors, and position vectors corresponding to the word units;

[0156] A to-be-linked vector generation submodule is configured to add the word vector, sentence vector and position vector corresponding to the word unit to generate the to-be-linked vector corresponding to the word unit;

[0157] An encoding submodule, configured to encode the vector to be linked to obtain an intermediate encoding vector;

[0158] The annotation submodule is configured to perform entity reference recognition on the text to be linked, and perform entity reference annotation on the intermediate encoding vector according to the recognition result to generate the first encoding vector.

[0159] Optionally, the second processing module 606 includes:

[0160] A resume information processing submodule is configured to input the resume information into the vector encoding model, perform word segmentation processing on the resume information to obtain word units of the resume information, and perform pre-embedding processing on the word units to obtain word vectors, sentence vectors and position vectors corresponding to the word units;

[0161] an intermediate vector generation submodule, configured to add the word vector, sentence vector and position vector corresponding to the word unit to generate the intermediate vector corresponding to the word unit;

[0162] The second encoding vector generating submodule is configured to input the intermediate vector into the vector encoding module of the information annotation model for encoding to obtain the second encoding vector

[0163] Optionally, the screening module 604 includes:

[0164] A preprocessing submodule is configured to preprocess the text to be linked to obtain time information contained in the text to be linked;

[0165] A first screening submodule is configured to perform first information screening in a pre-constructed knowledge graph based on the entity reference to obtain intermediate screening information;

[0166] The second screening submodule is configured to perform a second information screening on the intermediate screening information based on the time information to obtain the resume information.

[0167] Optionally, the physical linking device further includes:

[0168] a concatenation submodule, configured to concatenate the first encoding vector with the second encoding vector;

[0169] A determination submodule, configured to determine the matching degree between the query text and the resume description information according to the encoding vector obtained by concatenation;

[0170] When it is determined that the matching degree between the first encoding vector and the second encoding vector is greater than a preset matching degree threshold, the linking module is executed.

[0171] Optionally, the physical linking device further includes:

[0172] a concatenation module, configured to concatenate the first encoding vector with the second encoding vector;

[0173] The matching degree calculation module is configured to input the concatenated encoding vector into the text matching module of the vector encoding model, and the text matching module performs matching degree calculation on the encoding vector and outputs the calculation result.

[0174] Optionally, the link module 608 includes:

[0175] A target candidate entity determination submodule is configured to perform entity screening on the candidate entities to obtain a target candidate entity;

[0176] An information determination submodule, configured to determine a corresponding target relationship and attribute information of the target candidate entity according to the target candidate entity;

[0177] The entity linking submodule is configured to perform entity linking between the entity reference and the candidate entity based on the target relationship and the attribute information.

[0178] Optionally, the physical linking device further includes:

[0179] A position vector determination module is configured to determine the position vectors corresponding to the entity references in the to-be-linked text;

[0180] a fusion module, configured to fuse the position vector with the first coding vector to obtain a fused coding vector;

[0181] The entity linking module is configured to perform entity linking on the entity reference and the candidate entity when it is determined that the matching degree between the fused encoding vector and the second encoding vector is greater than a preset matching degree threshold.

[0182] It should be noted that the components in the device claim should be understood as the functional modules that must be established to implement the steps of the program flow or the steps of the method, and the functional modules are not actually divided or separated. The device claim defined by such a group of functional modules should be understood as the functional module architecture of the solution mainly implemented by the computer program recorded in the specification, and should not be understood as the physical device that mainly implements the solution by hardware.

[0183] In one embodiment of the present application, a computing device is also provided, including a memory, a processor, and computer instructions stored in the memory and executable on the processor, wherein the processor implements the steps of the entity linking method when executing the instructions.

[0184] An embodiment of the present application also provides a computer-readable storage medium storing computer instructions, which, when executed by a processor, implement the steps of the entity linking method as described above.

[0185] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the above-mentioned entity linking method belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the above-mentioned entity linking method.

[0186] The above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0187] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0188] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0189] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0190] The preferred embodiments of the present application disclosed above are only used to help explain the present application. The optional embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the present application. The present application selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present application, so that those skilled in the art can understand and use the present application well. The present application is only limited by the claims and their full scope and equivalents.

Claims

1. An entity linking method, characterized in that: include: Inputting the text to be linked into a pre-trained information annotation model to obtain a first encoding vector output by the information annotation model, wherein the first encoding vector represents the entity reference of the text to be linked; Based on the first coding vector and the time information contained in the text to be linked, the resume information related to the text to be linked is screened out from the pre-constructed knowledge graph, wherein the resume information includes basic personal information, educational background, and work experience; Inputting the resume information into a pre-trained vector coding model to obtain a second coding vector output by the vector coding model, wherein the second coding vector represents a candidate entity of the resume information; When it is determined that the degree of match between the first encoding vector and the second encoding vector is greater than a preset matching degree threshold, entity linking is performed between the entity reference and the candidate entity.

2. The entity linking method according to claim 1, characterized in that: The step of inputting the to-be-linked text into a pre-trained information annotation model to obtain a first encoding vector output by the information annotation model includes: Inputting the text to be linked into the information annotation model, performing word segmentation processing on the text to be linked to obtain word units of the text to be linked, and performing pre-embedding processing on the word units to obtain word vectors, sentence vectors and position vectors corresponding to the word units; Adding the word vector, sentence vector and position vector corresponding to the word unit to generate a vector to be linked corresponding to the word unit; The vector encoding module of the information annotation model encodes the vector to be linked to obtain an intermediate encoding vector; The named entity annotation module of the vector annotation model performs entity reference recognition on the text to be linked, and performs entity reference annotation on the intermediate encoding vector according to the recognition result to generate the first encoding vector.

3. The entity linking method according to claim 1, characterized in that: The step of inputting the resume information into a pre-trained vector coding model to obtain a second coding vector output by the vector coding model includes: Inputting the resume information into the vector encoding model, performing word segmentation processing on the resume information to obtain word units of the resume information, and performing pre-embedding processing on the word units to obtain word vectors, sentence vectors, and position vectors corresponding to the word units; Adding the word vector, sentence vector and position vector corresponding to the word unit to generate an intermediate vector corresponding to the word unit; The intermediate vector is input into the vector encoding module of the information labeling model for encoding to obtain the second encoded vector.

4. The entity linking method according to claim 1, characterized in that: The step of filtering out resume information related to the text to be linked from a pre-built knowledge graph based on the first encoding vector and the time information contained in the text to be linked includes: Preprocessing the text to be linked to obtain time information contained in the text to be linked; Performing a first information screening in a pre-constructed knowledge graph based on the entity reference to obtain intermediate screening information; Based on the time information, a second information screening is performed on the intermediate screening information to obtain the resume information.

5. The entity linking method according to claim 4, characterized in that: After obtaining the second encoding vector output by the vector encoding model, the method further includes: Concatenate the first encoding vector and the second encoding vector; Determine the matching degree between the text to be linked and the resume description information according to the coding vector obtained by concatenation; In the case where it is determined that the matching degree between the first encoding vector and the second encoding vector is greater than a preset matching degree threshold, entity linking of the entity reference with the candidate entity is performed.

6. The entity linking method according to claim 3, characterized in that: After obtaining the second encoding vector output by the vector encoding model, the method further includes: Concatenate the first encoding vector and the second encoding vector; The encoding vector obtained by concatenation is input into the text matching module of the vector encoding model, and the text matching module calculates the matching degree of the encoding vector and outputs the calculation result.

7. The entity linking method according to claim 1, characterized in that: The entity reference and the candidate entity are entity-linked, comprising: Screening the candidate entities to obtain a target candidate entity; Determining a corresponding target relationship and attribute information of the target candidate entity according to the target candidate entity; Based on the target relationship and the attribute information, the entity reference is entity-linked with the candidate entity.

8. The entity linking method according to claim 1, characterized in that: Also includes: Determine the position vectors corresponding to the entity references in the text to be linked; Fusing the position vector with the first coding vector to obtain a fused coding vector; When it is determined that the matching degree between the fused encoding vector and the second encoding vector is greater than a preset matching degree threshold, the entity reference is entity-linked with the candidate entity.

9. A physical linking device, characterized in that: include: A first processing module is configured to input the to-be-linked text into a pre-trained information annotation model, and obtain a first encoding vector output by the information annotation model, wherein the first encoding vector represents an entity reference of the to-be-linked text; A screening module is configured to screen out resume information related to the text to be linked from a pre-built knowledge graph based on the first coding vector and the time information contained in the text to be linked, wherein the resume information includes basic personal information, educational background, and work experience; A second processing module is configured to input the resume information into a pre-trained vector coding model to obtain a second coding vector output by the vector coding model, wherein the second coding vector represents a candidate entity of the resume information; A linking module is configured to perform entity linking between the entity reference and the candidate entity when it is determined that the matching degree between the first encoding vector and the second encoding vector is greater than a preset matching degree threshold.

10. A computing device comprising a memory, a processor, and computer instructions stored in the memory and executable on the processor, characterized in that: When the processor executes the instructions, the steps of the method according to any one of claims 1 to 8 are implemented.

11. A computer-readable storage medium storing computer instructions, characterized in that: When the instruction is executed by a processor, the steps of the method described in any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Entity linking method, entity linking device, electronic equipment and medium

    CN110991187A

  • Combining temporal processing and textual entailment to detect temporally anchored events

    US20140372102A1