Knowledge graph question-answering question entity linking method, device, equipment and medium

Through entity description refinement coding and similarity calculation, the entity disambiguation problem caused by noise interference in knowledge graph question and answer is solved, and the accuracy of entity linking and the effect of knowledge graph question and answer are improved.

CN114925681BActive Publication Date: 2024-08-27工银科技有限公司 +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210649326.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-08
Publication Date
2024-08-27
Estimated Expiration
2042-06-08

AI Technical Summary

Technical Problem

In the knowledge graph question and answer process, the accuracy of question entity links is affected by noise information, resulting in poor entity disambiguation effect and difficulty in answering user questions correctly.

Method used

By obtaining entity mentions in user questions, calculating the similarity between entity mentions and candidate entities, using entity description refinement coding to reduce noise interference and improve entity disambiguation effect. The method includes extracting entity mentions, obtaining entity description refinement encodings of candidate entities, calculating similarity between entity mentions and candidate entities, and determining the most similar entity link.

Benefits of technology

It effectively reduces noise interference, improves the accuracy of entity disambiguation and the effect of entity linking, and ensures the correctness of knowledge graph question and answer.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114925681B
    Figure CN114925681B
Patent Text Reader

Abstract

The present disclosure provides a method, device, equipment, storage medium and program product for linking knowledge graph question-answering sentences to entities, which can be applied to the field of artificial intelligence technology. The method includes: obtaining user sentences; extracting entity mentions in user sentences; retrieving T candidate entities matching the entity mentions from the knowledge graph; obtaining the refined encoding of the entity description of each candidate entity in the T candidate entities; wherein the refined encoding representation of the entity description is obtained based on the string difference in the entity description content between the candidate entity and N similar entities of the candidate entity; obtaining the encoding representation of the entity mention; based on the encoding representation of the entity mention and the refined encoding of the entity description of each candidate entity in the T candidate entities, calculating the second similarity between the entity mention and each candidate entity; and determining the candidate entity with the largest second similarity among the T candidate entities as the linking entity of the entity mention.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of artificial intelligence technology, and more specifically to a knowledge graph question-answering question entity linking method, apparatus, device, medium, and program product. Background Art

[0002] Knowledge graphs represent knowledge using an entity-relationship-entity model, forming a graph structure with entities as nodes and relationships between entities as edges. Knowledge graph question answering is a typical application of knowledge graphs. Specifically, it performs semantic understanding of a natural language question input by a user, then queries and infers the corresponding answer from the knowledge graph to meet the user's needs.

[0003] In the process of question answering on the knowledge graph, the correctness of question entity linking is critical to correctly answering user questions. Among them, question entity linking includes two steps: entity mention extraction and entity disambiguation. Among them, entity mention extraction refers to extracting the character string used to express the entity from the user's question. The character string mentioned by the entity may be the same as the name string of the entity in the knowledge graph, or it may be different. Entity disambiguation refers to the process of linking the entity mention to the unique entity in the knowledge graph after extracting the entity mention. For example, when the same person's name appears in different questions, the objects referred to may be different entities. Obviously, if accurate and effective entity disambiguation cannot be achieved in the linking process, it will be impossible to correctly answer the user's question.

[0004] In related technologies, question entity linking methods based on entity description representation can be used to expand the knowledge graph with entity description content (usually including content that explains the entity) to increase the entity's descriptive information. In this way, when performing question entity linking, the effect of entity disambiguation can be improved with the help of entity description information. However, since entity description information contains a lot of content, when the entity description information contains noise information that is irrelevant to the user's question, the degree of improvement in the entity disambiguation effect may be suppressed. Summary of the Invention

[0005] In view of the above problems, the present disclosure provides a knowledge graph question-answering question entity linking method, apparatus, device, medium and program product that can reduce noise interference.

[0006] According to the first aspect of the present disclosure, a method for linking entities in a knowledge graph question-answering question is provided. The method comprises: obtaining a user question; extracting entity mentions in the user question, wherein the entity mentions are string representations of entities in the knowledge graph in the user question; retrieving T candidate entities matching the entity mentions from the knowledge graph, wherein T is an integer greater than 1; obtaining a refined encoding of the entity description of each candidate entity in the T candidate entities; wherein the refined encoding representation of the entity description is obtained based on the string difference in the entity description content between the candidate entity and N similar entities of the candidate entity, wherein the N similar entities are N entities in the knowledge graph whose first similarity with the candidate entity meets a preset condition, wherein N is an integer greater than or equal to 1; obtaining an encoding representation of the entity mention; calculating a second similarity between the entity mention and each candidate entity based on the encoding representation of the entity mention and the refined encoding of the entity description of each candidate entity in the T candidate entities; and determining the candidate entity with the largest second similarity among the T candidate entities as the linked entity of the entity mention.

[0007] According to an embodiment of the present disclosure, obtaining the refined encoding of the entity description of each candidate entity among the T candidate entities includes: obtaining the entity description key content of the candidate entity; wherein, the character string in the entity description key content belongs to the entity description content of the candidate entity, but does not belong to the entity description content of any similar entity of the N similar entities; obtaining the encoded representation of the entity description key content; obtaining the encoded representation of the candidate entity; and obtaining the refined encoding of the entity description of the candidate entity based on the encoded representation of the candidate entity and the encoded representation of the entity description key content.

[0008] According to an embodiment of the present disclosure, obtaining the key content of the entity description of the candidate entity includes: processing the character strings in the entity description of the candidate entity according to a first rule to obtain a first character string set; processing the character strings in the entity description of the N similar entities according to the first rule to obtain a second character string set; and subtracting the second character string set from the first character string set to obtain the key content of the entity description of the candidate entity. The first rule includes splitting the character strings in the entity description content based on the constituent units of the entity description content as the splitting granularity and then removing duplicates.

[0009] According to an embodiment of the present disclosure, obtaining the encoded representation of the entity description key content includes: concatenating the user question and the entity description key content of each candidate entity in the T candidate entities to form a first combined character string; encoding the first combined character string using a second text encoder to obtain an encoded representation of the first combined character string; intercepting, from the encoded representation of the first combined character string, the code corresponding to the position range of the entity description key content of each candidate entity in the first combined character string; and obtaining the encoded representation of the entity description key content based on the intercepted code corresponding to the entity description key content of each candidate entity.

[0010] According to an embodiment of the present disclosure, the refined encoding of the entity description of the candidate entity is obtained based on the encoding representation of the candidate entity and the encoding representation of the key content of the entity description, including: using a preset hyperparameter as a weight coefficient of the encoding representation of the key content of the entity description, performing weighted summation on the encoding representation of the candidate entity and the encoding representation of the key content of the entity description, and obtaining the refined encoding of the entity description of the candidate entity.

[0011] According to an embodiment of the present disclosure, obtaining the encoded representation of the candidate entity includes: using a first text encoder to encode a second combined character string consisting of the candidate entity and its entity description content to obtain the encoded representation of the second combined character string; and from the encoded representation of the second combined character string, intercepting the code corresponding to the position range of the candidate entity in the second combined character string to obtain the encoded representation of the candidate entity.

[0012] According to an embodiment of the present disclosure, before obtaining the refined encoding of the entity description of each candidate entity among the T candidate entities, the method further includes: calculating the first similarity between the candidate entity and other entities in the knowledge graph based on the encoding representation of the candidate entity and the encoding representation of other entities in the knowledge graph; and selecting N entities from the knowledge graph whose first similarity meets the preset condition to obtain the N similar entities corresponding to the candidate entity.

[0013] According to an embodiment of the present disclosure, before obtaining the user question, the method further includes: encoding the entities in the knowledge graph using a first text encoder to obtain an encoded representation of the entities in the knowledge graph.

[0014] According to an embodiment of the present disclosure, extracting entity mentions from user questions also includes predicting the entity mentions and their predicted probabilities using a neural network. The method also includes normalizing the T second similarities corresponding to the T candidate entities to obtain a link probability that indicates that each of the T candidate entities is correctly linked; and outputting the entity mention and its linked entity when the product of the predicted probability of the entity mention and the link probability of the linked entity exceeds a probability threshold.

[0015] According to an embodiment of the present disclosure, retrieving T candidate entities that match the entity mention from the knowledge graph includes: calculating a matching score based on a comparison of the character string of the entity mention and the name character string of the entity in the knowledge graph; and filtering out the T entities with the highest matching scores from the knowledge graph to obtain the T candidate entities.

[0016] According to an embodiment of the present disclosure, obtaining the encoded representation of the entity mention includes: encoding the character string of the user question using a second text encoder to obtain an encoded representation matrix of the user question; intercepting a vector group corresponding to the position range of the character string of the entity mention in the user question from the encoded representation matrix of the user question to obtain an encoding matrix corresponding to the entity mention; and bitwise averaging the vectors in the encoding matrix corresponding to the entity mention to obtain the encoded representation of the entity mention.

[0017] According to an embodiment of the present disclosure, the method further includes: encoding entities in the knowledge graph using a first text encoder to obtain an encoded representation of the entity in the knowledge graph; wherein the first similarity is calculated based on a vector of the encoded representation of the entity; encoding the character string of the user question using a second text encoder to obtain an encoded representation matrix of the user question; wherein the encoded representation of the entity mention is obtained based on extracting a vector corresponding to the position range of the character string of the entity mention in the user question from the encoded representation matrix; and predicting the entity mention in the user question using a fully connected neural network. wherein the first text encoder, the second text encoder, and the fully connected neural network are obtained by collaborative training, wherein the sample data used in the training process includes the knowledge graph, sample user questions, and correct entity mentions and their correctly linked entities in the sample user questions.

[0018] Another aspect of the embodiments of the present disclosure provides a knowledge graph question-answering question entity linking device. The device includes a first acquisition module, a first extraction module, a matching module, a second acquisition module, a third acquisition module, a second similarity calculation module, and a linking module. The first acquisition module is used to acquire user questions. The first extraction module is used to extract entity mentions in the user questions, and the entity mentions are string representations of entities in the knowledge graph in the user questions. The matching module is used to retrieve T candidate entities that match the entity mentions from the knowledge graph, where T is an integer greater than 1. The second acquisition module is used to obtain a refined encoding of the entity description of each candidate entity in the T candidate entities; wherein the refined encoding representation of the entity description is obtained based on the string difference in the entity description content between the candidate entity and N similar entities of the candidate entity, wherein the N similar entities are N entities in the knowledge graph whose first similarity with the candidate entity meets a preset condition, where N is an integer greater than or equal to 1. The third acquisition module is used to obtain the encoding representation of the entity mention. The second similarity calculation module is configured to calculate a second similarity between the entity mention and each candidate entity based on the encoded representation of the entity mention and the refined encoding of the entity description of each candidate entity in the T candidate entities. The linking module is configured to determine the candidate entity with the greatest second similarity among the T candidate entities as the linked entity of the entity mention.

[0019] According to an embodiment of the present disclosure, the first extraction module includes a fully connected neural network, which is used to predict the entity mentions and their predicted probabilities in the user question. Accordingly, the linking module is further configured to: normalize the T second similarities corresponding to the T candidate entities to obtain a link probability that indicates that each of the T candidate entities is correctly linked; and output the entity mention and its linked entity when the product of the predicted probability of the entity mention and the link probability of the linked entity of the entity mention is greater than a probability threshold.

[0020] According to an embodiment of the present disclosure, the second acquisition module is specifically used to: obtain the entity description key content of the candidate entity; wherein, the character string in the entity description key content belongs to the entity description content of the candidate entity, but does not belong to the entity description content of any similar entity of the N similar entities; obtain the encoded representation of the entity description key content; obtain the encoded representation of the candidate entity; and obtain the refined encoding of the entity description of the candidate entity based on the encoded representation of the candidate entity and the encoded representation of the entity description key content.

[0021] According to an embodiment of the present disclosure, the apparatus further includes a first text encoder configured to encode entities in the knowledge graph to obtain encoded representations of the entities in the knowledge graph.

[0022] According to an embodiment of the present disclosure, the apparatus further includes a first similarity calculation module. The first similarity calculation module is configured to: calculate the first similarity between the candidate entity and other entities in the knowledge graph based on the encoded representation of the candidate entity and the encoded representations of other entities in the knowledge graph; and select N entities from the knowledge graph whose first similarity satisfies the preset condition, to obtain the N similar entities corresponding to the candidate entity.

[0023] According to an embodiment of the present disclosure, the device further includes a second text encoder. The second text encoder is used to encode the character string of the user question to obtain an encoding representation matrix of the user question. Accordingly, the third acquisition module is used to: intercept a vector group corresponding to the position range of the character string of the entity mention in the user question from the encoding representation matrix of the user question to obtain an encoding matrix corresponding to the entity mention; and perform bitwise averaging of the vectors in the encoding matrix corresponding to the entity mention to obtain an encoding representation of the entity mention.

[0024] According to an embodiment of the present disclosure, the first text encoder, the second text encoder, and the fully connected neural network are obtained through collaborative training, wherein the sample data used in the training process includes the knowledge graph, sample user questions, and correct entity mentions and their correctly linked entities in the sample user questions.

[0025] A third aspect of the present disclosure provides an electronic device. The electronic device includes one or more processors and a memory. The memory is configured to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors perform the above method.

[0026] According to a fourth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, on which executable instructions are stored. When the instructions are executed by a processor, the processor executes the above method.

[0027] According to a fifth aspect of the embodiments of the present disclosure, a computer program product is provided, including a computer program, which implements the above method when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The above contents and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:

[0029] Figure 1 Schematically illustrates an application scenario diagram of the knowledge graph question-answering question entity linking method, apparatus, device, storage medium, and program product according to an embodiment of the present disclosure;

[0030] Figure 2 The flowchart of the knowledge graph question-answering question entity linking method according to an embodiment of the present disclosure is schematically shown;

[0031] Figure 3 A flowchart for obtaining entity description refinement coding in a question-answering sentence entity linking method according to an embodiment of the present disclosure is schematically shown;

[0032] Figure 4 Schematically shows a flow chart for obtaining key content of entity description in the question-answering question entity linking method according to an embodiment of the present disclosure;

[0033] Figure 5 Schematically shows a flow chart for obtaining an encoded representation of key content of an entity description in a question-answering sentence entity linking method according to an embodiment of the present disclosure;

[0034] Figure 6 A flowchart schematically illustrates encoding of entities in a knowledge graph in a knowledge graph question-answering question entity linking method according to another embodiment of the present disclosure;

[0035] Figure 7 Schematically shows a flow chart of a knowledge graph question-answering question entity linking method according to another embodiment of the present disclosure;

[0036] Figure 8 The flowchart of the knowledge graph question-answering question entity linking method according to another embodiment of the present disclosure is schematically shown;

[0037] Figure 9 Schematically shows Figure 8 The diagram below shows the data flow in the knowledge graph question-answering question entity linking method.

[0038] Figure 10 Schematically shows a structural block diagram of a knowledge graph question-answering question entity linking apparatus according to an embodiment of the present disclosure; and

[0039] Figure 11 A block diagram of an electronic device suitable for implementing the knowledge graph question-answering question entity linking method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0040] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present disclosure. In the detailed description below, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0041] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise," "include," etc. used herein indicate the presence of the features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0042] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.

[0043] When expressions such as "at least one of A, B and C, etc." are used, they should generally be interpreted in accordance with the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0044] The terms used in this article are explained as follows:

[0045] Knowledge graph: It is a structured semantic knowledge base that describes concepts, entities and their relationships in the physical world in symbolic form. At the data level, the knowledge graph uses entities with types and attributes as nodes and the relationships between entities as edges to form a heterogeneous graph structure.

[0046] Entity: refers to a specific object in the objective world, such as a person’s name, a place’s name, or an organization’s name. Category names such as “human,” “animal,” and “plant” are not entities.

[0047] Entity mention: refers to the same or different string expressions representing the same entity. For example, "United States" is an entity, and the United States and the United States of America are two different entity mentions of "United States".

[0048] Encoding: Using deep learning networks to convert natural language into real number matrices.

[0049] Fully connected neural network: The most basic neural network, which transforms the input Di-dimensional vector into a Do-dimensional vector.

[0050] Training: Learning (determining) the ideal values ​​of the model’s weights and biases through labeled / correct examples.

[0051] Loss function / loss loss: A function that maps the value of a random event or its related random variables to a non-negative real number to represent the "risk" or "loss" of the random event.

[0052] Gradient backpropagation: A common method used to train artificial neural networks, which calculates the gradient of the loss function for all weights in the neural network and uses it to update the weights to minimize the loss function.

[0053] Entity description content: Also known as "entity description text," this typically contains content that explains the entity. For example, the entity description for the entity "Jilin Province" could be "Jilin Province is a provincial-level administrative region in China, with Changchun as its capital." Another example is the entity description for the entity "Jilin City" could be "Jilin City, also known as the Northern River City, is a prefecture-level city under the jurisdiction of Jilin Province."

[0054] Entity description key content: The string of the entity description key content of an entity belongs to the entity description content of the entity, but does not belong to the entity description content of any similar entity among the N similar entities of the entity. The N similar entities of an entity refer to the N entities in the knowledge graph whose first similarity with the entity meets the predetermined conditions.

[0055] Composition unit: It is the encoding granularity preset by the text encoder when encoding a string in a language text. It can be a character, word, word segmentation or subword, etc., and is preset according to actual needs.

[0056] The first text encoder and the second text encoder: both are natural language understanding encoder models. Natural language sentences are input and after training, the encoding representation of each component unit in the sentence can be obtained (which can be expressed in vector form).

[0057] Among them, in the embodiment of the present disclosure, the first text encoder is mainly used to encode entities in the knowledge graph. Among them, the input of the first text encoder is a string composed of the entity name and its description information, and the output is a real number matrix composed of the encoding vectors of each component unit in the string. The encoding vector corresponding to the location of the entity name is cut out from the real number matrix (if there are multiple vectors, the multiple vectors are averaged bit by bit), and the encoded representation of the entity can be obtained.

[0058] In an embodiment of the present disclosure, the second text encoder is used to encode a string of user questions, entity mentions, entity descriptions, and / or entity description key contents, individually or in combination. When encoding, the second text encoder is trained to output an encoded representation of each component unit in the string, where the dimension of the encoded representation of each component unit is the same as the dimension of the encoded representation of the entity.

[0059] The disclosed embodiments provide a method, apparatus, device, medium, and program product for linking knowledge graph question-answering sentences to entities. In this method, when obtaining the coded representation of an entity, the entity description key content can be combined to obtain a refined encoding of the entity description. Since the key content of the entity description is obtained based on the string difference between the entity and its similar entities' entity description content, the refined encoding of the entity description can strengthen the difference between the entity and its similar entities, and highlight the key points and uniqueness of the entity. When the refined encoding of the entity description is used for entity link matching, it can reduce noise interference in entity linking and improve the entity disambiguation effect.

[0060] It should be noted that the methods and devices determined in the embodiments of the present disclosure can be used in the financial field, and can also be used in any field other than the financial field. The present disclosure does not limit the application field.

[0061] Figure 1 The following schematically illustrates an application scenario diagram of the knowledge graph question-answering question entity linking method, apparatus, device, storage medium, and program product according to an embodiment of the present disclosure. Figure 1 The examples shown are merely examples of system architectures to which the embodiments of the present disclosure may be applied, to help those skilled in the art understand the technical content of the present disclosure, but do not mean that the embodiments of the present disclosure may not be used in other devices, systems, environments or scenarios.

[0062] like Figure 1 As shown, the application scenario 100 according to this embodiment may include at least one terminal device (three are shown in the figure, terminal devices 101, 102, and 103), a network 104, and a server 105. The network 104 is a medium that provides a communication link between the terminal devices 101, 102, and 103 and the server 105. The network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables, etc.

[0063] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).

[0064] The terminal devices 101 , 102 , and 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0065] The server 105 may be a server that provides various services, such as a background management server (only an example) that provides support for websites browsed by users using the terminal devices 101, 102, and 103. A knowledge graph may be deployed in the server 105.

[0066] The user can use the terminal devices 101, 102, and 103 to send a user question to the server 105. The server 105 can perform semantic understanding on the user question, then query and infer the corresponding answer from the knowledge graph and send it to the terminal devices 101, 102, and 103, thereby realizing intelligent question answering on the knowledge graph.

[0067] It should be noted that the knowledge graph question-answering question entity linking method provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the knowledge graph question-answering question entity linking device provided in the embodiment of the present disclosure can generally be set in the server 105. The knowledge graph question-answering question entity linking method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105. Accordingly, the knowledge graph question-answering question entity linking device provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105.

[0068] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.

[0069] The following will be based on Figure 1 The scene described by Figures 2 to 9 The knowledge graph question-answering question entity linking method of the embodiment of the present disclosure is described in detail.

[0070] Figure 2 The flowchart of the knowledge graph question-answering question entity linking method according to an embodiment of the present disclosure is schematically shown.

[0071] like Figure 2 As shown, the knowledge graph question-answering question entity linking method according to this embodiment may include operations S210 to S270.

[0072] In operation S210 , a user question is obtained.

[0073] In operation S220, entity mentions in the user's question are extracted. Entity mentions are string representations of entities in the knowledge graph in the user's question. In one embodiment, a trained fully connected neural network can be used to predict entity mentions in the user's question.

[0074] In operation S230, T candidate entities matching the entity mention are retrieved from the knowledge graph, where T is an integer greater than 1. The T candidate entities can be matched by fuzzy matching, which is a technique for finding strings that approximately (rather than exactly) match a pattern.

[0075] In one implementation, a matching score may be calculated based on a comparison between the entity mention string and the entity name string in the knowledge graph, and then T entities with the highest matching scores may be selected from the knowledge graph as T candidate entities. The comparison between the entity mention string and the entity name string may, for example, be performed by comparing the overlap percentage of characters or character combinations between the entity mention string and the entity name string, or by determining an edit distance based on the difference between the entity mention string and the entity name string, with the edit distance being used as the matching score.

[0076] In operation S240, a refined entity description encoding is obtained for each of the T candidate entities. The refined entity description encoding is based on the string differences between the entity descriptions of the candidate entity and N similar entities to the candidate entity. The N similar entities are N entities in the knowledge graph whose first similarity to the candidate entity satisfies a preset condition, where N is an integer greater than or equal to 1.

[0077] In one embodiment, the N similar entities of an entity can be obtained by encoding the entities in the knowledge graph according to a unified rule through a first text encoder, calculating the similarity between each entity and the vectors corresponding to the encoded representations of other entities (for example, represented by vector inner product, angle or cosine similarity), and then filtering out the N entities that are most similar to each entity, or filtering out entities whose similarity reaches a threshold value (for example, 90%). Thus, in operation S240, after the candidate entity is determined, similar entities of the candidate entity can be obtained from the knowledge graph.

[0078] When the first text encoder is a pre-trained language representation model (Bidirectional Encoder Representation From Transformers, BERT for short), the process of the first text encoder encoding the entity in the knowledge graph can be: concatenating the entity name and the entity's description information (including but not limited to the entity description content) into a string, such as "[CLS] entity name [ENT] description information [SEP]", where [CLS] represents the start symbol of the string, [ENT] represents the separator between the entity name and the description information, and [SEP] represents the end symbol of the string, and the output is an encoding matrix. When encoding, the entity name shown in the [CLS] part can be encoded as a component unit. Thus, in the embodiment of the present disclosure, the encoding vector corresponding to the [CLS] position can be taken from the encoding matrix output by the first text encoder as the encoding representation of the entity, with a dimension of h, and h can be set, for example, to 768 or 1024.

[0079] In other embodiments, the N similar entities of an entity may also be determined based on character-level comparisons. For example, the N similar entities of an entity may be determined based on the degree of overlap of characters in two entities, or the degree of overlap of character combinations.

[0080] It is understandable that the N similar entities of each candidate entity in operation S240 may be selected offline and ready for use before operation S240 , or may be obtained by real-time screening after the candidate entity is determined in operation S230 .

[0081] The refined encoding of the entity description of each candidate entity is obtained based on the string differences in the entity description content between the candidate entity and its N similar entities. The string differences can be expressed as a set of character strings that belong only to the entity description content of the candidate entity, but not to the entity description content of any of the N similar entities. The set of character strings (hereinafter referred to as "entity description key content") can be based on characters as the smallest unit, or can be based on word segments (for example, Chinese word segments, subwords) as the smallest unit, or can be based on words (for example, English and other languages) as the smallest unit.

[0082] There are many ways to obtain the refined encoding of the entity description based on the key content of the entity description of a candidate entity.

[0083] For example, the entity description key content may be used as the description information of the candidate entity or a part thereof, and the candidate entity may be encoded using a first text encoder to obtain a refined encoding of the entity description of the candidate entity.

[0084] For another example, the key content of the entity description may be encoded and fused with the encoding representation of the corresponding candidate entity (eg, weighted summation) to obtain a refined encoding of the entity description of the candidate entity.

[0085] When encoding the entity description key content, in some embodiments, the entity description key content can be encoded separately using a second text encoder; or, in other embodiments, the entity description key content can be concatenated with the user question and then encoded using a second text encoder, so that the encoded representation of the entity description key content can carry the interactive matching relationship between the entity description key content and the user question.

[0086] For example, a second text encoder can be used to encode the string formed by concatenating the user question and the entity description key contents of multiple candidate entities, and then the encoding of the entity description key content part of each candidate entity can be taken out from the output of the second text encoder. In this way, the encoded representation of the entity description key content of each candidate entity can be integrated with the association relationship information with the user question. Furthermore, when the encoded representation of the entity description key content and the encoded representation of the candidate entity are integrated to obtain the entity description refined code, the entity description refined code can not only reflect the difference between the candidate entity it represents and its N similar entities, but also carry the matching information between the entity description key content of the candidate entity and the user question. In this way, when the entity description refined code is used for entity link matching, it can more effectively improve the effect of entity disambiguation.

[0087] In operation S250 , an encoded representation of the entity mention is obtained.

[0088] In one embodiment, the entity mention encoding may be encoded using a second text encoder to obtain an output of the second text encoder.

[0089] In another embodiment, a second text encoder may be used to first encode the string of the user question to obtain an encoding representation matrix for the user question. A vector group corresponding to the position range of the string of the entity mention in the user question is then extracted from the encoding representation matrix of the user question to obtain an encoding matrix corresponding to the entity mention. Next, the vectors in the encoding matrix corresponding to the entity mention are bitwise averaged to obtain an encoding representation of the entity mention. The encoding representation of the entity mention obtained in this manner is encoded and outputted in conjunction with the contextual language environment in which the entity mention occurs. This allows the obtained encoding representation of the entity mention to better reflect the true meaning of the entity mention in the user question, consistent with the practice of natural language understanding that typically requires language understanding to be combined with a specific context.

[0090] In operation S260, a second similarity between the entity mention and each candidate entity is calculated based on the encoded representation of the entity mention and the refined encoding of the entity description of each candidate entity. The second similarity can be represented by a parameter such as the inner product, angle, or cosine similarity between the vector corresponding to the encoded representation of the entity mention and the vector corresponding to the refined encoding of the entity description of each candidate entity.

[0091] In operation S270 , the candidate entity with the second greatest similarity among the T candidate entities is determined as the link entity mentioned by the entity.

[0092] According to the embodiments of the present disclosure, since the refined encoding of entity descriptions can strengthen the differences between an entity and its similar entities and highlight the key points and uniqueness of the entity, when the refined encoding of entity descriptions is used for entity link matching, the noise interference in the question entity linking method based on entity description representation can be reduced, and the entity disambiguation effect can be improved.

[0093] Furthermore, as previously mentioned, different methods for obtaining refined entity description codes have varying impacts on entity disambiguation. In particular, when a second text encoder is used to encode the concatenated string of the user question and the key content of the entity description, generating an encoded representation of the key content and subsequently obtaining a refined entity description code, the resulting refined entity description code is more tailored to the specific context of the user question, improving accuracy during entity linking.

[0094] According to an embodiment of the present disclosure, the first text encoder, the second text encoder, and the fully connected neural network and other machine learning models used in operations S210 to S270 can be collaboratively trained before operations S210 to S270. The sample data used in the training process includes the knowledge graph, the sample user questions, and the correct entity mentions and their correct linked entities in the sample user questions. During the training process, the loss value of the loss function can be obtained by comparing the entity mentions and linked entities predicted by operation S270 with the correct entity mentions and their correct linked entities, and then the training of each machine learning model is realized through the gradient back propagation algorithm.

[0095] In the embodiment of the present disclosure, in entity disambiguation, entities are represented by refined encoding of entity descriptions, and the cost of representation learning is lower than that of question entity linking methods based on knowledge graph context representation. Compared with question entity linking methods based on entity description representation, it can highlight key information in entity representation that is more relevant to user questions, reduce noise information, and thus optimize the encoding representation of entities and improve the effect of entity linking. Among them, the question entity linking method based on knowledge graph context representation refers to using the entity's related entities, relationships and other correlation information in the knowledge graph to expand the original representation of the entity, usually implementing feature representation learning on the graph structure of the knowledge graph, and the entity encoding representation obtained by learning integrates the correlation information, and then using the entity encoding representation to perform subsequent entity mention recognition and entity disambiguation steps. The question entity linking method based on entity description representation refers to using the entity's description text (usually containing content that explains the entity) to expand the original description of the entity in the knowledge graph, and then inputting the expanded entity description, such as text including the entity name and entity description, into the first text encoder to obtain the entity encoding representation, and performing subsequent entity mention recognition and entity disambiguation steps.

[0096] It can be seen that the question entity linking method based on knowledge graph context representation has high information and representation acquisition costs, and the question entity linking method based on entity description representation has low information and representation acquisition costs but contains more irrelevant noise information in the entity description, which affects the entity linking effect. The embodiments of the present disclosure extract and encode the key content of the entity description, reduce noise information, and have low information and representation acquisition costs, while optimizing the encoding representation of the entity, thereby improving the entity linking effect.

[0097] Figure 3 The flowchart of operation S240 of obtaining refined encoding of entity description in the question-answering sentence entity linking method according to an embodiment of the present disclosure is schematically shown.

[0098] like Figure 3 As shown, according to this embodiment, operation S240 may include operations S241 to S244.

[0099] In operation S241, the entity description key content of the candidate entity is obtained. The character string in the entity description key content belongs to the entity description content of the candidate entity, but does not belong to the entity description content of any similar entity of the N similar entities. In one embodiment, the entity description key content can be obtained by set difference operation, which can be referred to below. Figure 4 's hint.

[0100] Then, in operation S242, the encoded representation of the key content of the entity description is obtained. In one embodiment, the encoded representation of the key content of the entity description can be obtained by encoding it separately using the second text encoder. In another embodiment, the encoded representation of the key content of the entity description can also be obtained by encoding it separately using the second text encoder after being spliced ​​with relevant information such as the user question. For this, please refer to the following Figure 5 's hint.

[0101] In operation S243, an encoded representation of the candidate entity is obtained. For example, a first text encoder may be used to encode a second combined string consisting of the candidate entity and its entity description content to obtain an encoded representation of the second combined string. Then, from the encoded representation of the second combined string, a code corresponding to the position range of the candidate entity in the second combined string is intercepted to obtain the encoded representation of the candidate entity.

[0102] In operation S244, a refined entity description encoding of the candidate entity is obtained based on the encoded representation of the candidate entity and the encoded representation of the key content of the entity description. For example, a preset hyperparameter can be used as a weight coefficient for the encoded representation of the key content of the entity description, and the encoded representation of the candidate entity and the encoded representation of the key content of the entity description can be weighted and summed to obtain the refined entity description encoding of the candidate entity.

[0103] Figure 4 The flowchart of operation S241 of the question-answering sentence entity linking method according to an embodiment of the present disclosure for obtaining key content of entity description is schematically shown.

[0104] like Figure 4 As shown, according to this embodiment, operation S241 may include operations S401 to S403.

[0105] In operation S401, the character strings in the entity description content of the candidate entity are processed according to a first rule to obtain a first character string set. The first rule includes splitting the character strings in the entity description content based on the component units of the entity description content as the splitting granularity and then removing duplicates.

[0106] The constituent unit can be determined based on actual needs. For example, a character in a string can be used as a constituent unit, where a string in the first string set is a character; or, for example, for a Chinese knowledge graph, a word segmentation tool can be used to segment the entity description content, so that a string in the first string set is a word; or, for languages ​​such as English, a word can be used as a constituent unit, so that a string in the first string set is a word.

[0107] After the entity description content of the candidate entity is split into multiple character strings according to the granularity of the constituent units, the multiple character strings may be deduplicated so that only one identical character string is retained in the first character string set.

[0108] In operation S402, the character strings in the entity descriptions of the N similar entities are processed according to the first rule to obtain a second character string set. The second character string set is processed in the same manner as the first character string set to obtain a second character string set corresponding to the entity descriptions of the N similar entities.

[0109] In operation S403 , entity description key content of the candidate entity is obtained by subtracting the second character string set from the first character string set.

[0110] The character string in the entity description key content obtained in this way belongs to the entity description content of the candidate entity, but does not belong to the entity description content of any similar entity of the N similar entities.

[0111] Figure 5 The flowchart of operation S242 of the question-answering sentence entity linking method according to an embodiment of the present disclosure for obtaining the encoded representation of the key content of the entity description is schematically shown.

[0112] like Figure 5 As shown, according to this embodiment, operation S242 may include operations S501 to S504.

[0113] In operation S501 , the user question and the entity description key content of each candidate entity among T candidate entities are concatenated to form a first combined character string.

[0114] In operation S502, the first combined character string is encoded using a second text encoder to obtain an encoded representation of the first combined character string. When the second text encoder encodes the combined character string, it outputs an encoding vector for each component unit of the first combined character string.

[0115] In operation S503 , the code corresponding to the position range of the entity description key content of each candidate entity in the first combined character string is intercepted from the code representation of the first combined character string.

[0116] In operation S504, based on the intercepted codes corresponding to the entity description key content of each candidate entity, an encoded representation of the entity description key content is obtained. If the entity description key content includes multiple components, the intercepted codes correspondingly include multiple vectors. In this way, the multiple vectors can be bitwise averaged to obtain the encoded representation of the entity description key content.

[0117] According to an embodiment of the present disclosure, when obtaining the encoding of the key content of the entity description, the key content of the entity description and the user question are concatenated into a character string for encoding. In this way, the interactive relationship between the key content of the entity description and the user question can be integrated during the encoding process, so that the encoded representation of the key content of the entity description carries matching information with the user question, thereby improving the specificity of subsequent entity linking with the entity mention in the user question.

[0118] Figure 6 The flowchart of encoding entities in the knowledge graph in the knowledge graph question-answering question entity linking method according to another embodiment of the present disclosure is schematically shown.

[0119] like Figure 6 As shown, according to an embodiment of the present disclosure, the entities in the knowledge graph may be encoded before operations S210 to S270, which may specifically include operations S610 to S630.

[0120] In operation S610, entities in the knowledge graph are encoded using a first text encoder to obtain encoded representations of the entities in the knowledge graph.

[0121] In operation S620 , a first similarity between each entity and other entities in the knowledge graph is calculated based on the encoded representation of each entity and the encoded representations of other entities in the knowledge graph.

[0122] For example, the first similarity is calculated by operating between the vector corresponding to the encoding representation of each entity and the vector corresponding to the encoding representation of other entities, wherein the first similarity can be represented by vector inner product, vector angle, vector cosine similarity, etc.

[0123] Then, in operation S630, for each entity, N entities whose first similarity meets the preset conditions can be selected from the knowledge graph to obtain N similar entities corresponding to the candidate entity. Thus, after T candidate entities are matched in operation S230, N similar entities for each candidate entity can be directly obtained from the knowledge graph.

[0124] The preset condition can be the entities ranked in the top N after sorting the first similarities from large to small. When different parameters are used to represent the first similarity, the physical meaning corresponding to the magnitude of the first similarity is different. For example, when the first similarity is represented by the inner product of the vectors, the larger the inner product, the more similar the two vectors are, that is, the greater the first similarity; when the first similarity is represented by the angle between the vectors, the smaller the angle between the vectors, the more similar the two vectors are, that is, the greater the first similarity; when the first similarity is represented by the cosine similarity, the larger the cosine value, the more similar the two vectors are, that is, the greater the first similarity.

[0125] Alternatively, the preset condition may be that the first similarity exceeds a predetermined threshold. When the first similarity is represented by different parameters (inner product, vector angle, or cosine similarity), the predetermined threshold may be set according to the corresponding parameters.

[0126] According to an embodiment of the present disclosure, before the knowledge graph is used for user question-answering interaction, the entities in the knowledge graph can be encoded offline and similar entities can be screened out, which can improve the efficiency of interaction with users during knowledge graph question-answering.

[0127] Figure 7 A flowchart of a knowledge graph question-answering question entity linking method according to another embodiment of the present disclosure is schematically shown.

[0128] like Figure 7 As shown, the knowledge graph question-answering question entity linking method according to this embodiment may include operations S210, S720, S230 to S270, and S780 to S790.

[0129] First, in operation S210 , a user question is obtained.

[0130] Then, in operation S720, a fully connected neural network is used to predict entity mentions in the user's question and their predicted probabilities. Operation S720 is a specific embodiment of operation S220.

[0131] Next, through operations S230-S270, T candidate entities matching the entity mention are retrieved from the knowledge graph. A second similarity between each candidate entity and the entity mention is calculated based on the entity mention's encoded representation and the entity description essence encoding of each candidate entity. The candidate entity with the greatest second similarity is determined as the linked entity of the entity mention. The details of operations S230-S270 can be found in the previous description and will not be repeated here.

[0132] Then, in operation S780 , the T second similarities corresponding to the T candidate entities are normalized to obtain a link probability for indicating whether each of the T candidate entities is correctly linked.

[0133] For example, the T second similarities can be processed by softmax normalization. Softmax normalization can compress the T second similarities into another T-dimensional real vector σ(z), so that each element of the T-dimensional real vector σ(z) ranges between (0, 1) and the sum of all elements is 1.

[0134] Next, in operation S790 , when the product of the predicted probability of the entity mention and the link probability of the linked entity of the entity mention is greater than a probability threshold, the entity mention and its linked entity are output.

[0135] When the product is greater than the probability threshold, the credibility of the entity mention and its linked entity predicted in operation S270 is considered to meet the requirement, and the entity mention and its linked entity can be output. If the product is not greater than the probability threshold, the credibility of the entity mention and its linked entity predicted in operation S270 is considered to be too low, and the entity mention and its linked entity can be deleted.

[0136] In this way, when the entity mention output by operation S790 and its linked entities are used to answer the user's question, the accuracy of the knowledge graph answer can be improved.

[0137] Next, combine Figure 8 and Figure 9 The specific embodiment of the present disclosure is used to illustrate the application of the knowledge graph question-answering question entity linking method of the present disclosure embodiment. Figure 8 and Figure 9 In the example, the user asks "What is the opening time of the Jilin Songhua River Cultural Festival?". Figure 8 and Figure 9 The examples are for illustration only and do not limit the present disclosure.

[0138] Figure 8 A flowchart of a knowledge graph question-answering question entity linking method according to another embodiment of the present disclosure is schematically shown. Figure 9 Schematically shows Figure 8 The diagram shows the data flow in the knowledge graph question-answering question entity linking method.

[0139] like Figure 8 As shown, combined Figure 9 The knowledge graph question-answering question entity linking method of this embodiment may include steps S1 to S9.

[0140] Step S1: Offline entity encoding. This step mainly uses the first text encoder to encode the entities in the knowledge graph. This step is a specific embodiment of the operation S610 described above.

[0141] Combine Figure 9 , the specific process of encoding entities in S1 is as follows:

[0142] (1) Input: A collection of all entity names and entity description text for each entity. For example, the entity description text for the entity "Jilin Province" is "Jilin Province is a provincial-level administrative region in China, with Changchun as its capital." The entity description text for "Jilin City" is "Jilin City, also known as the Northern River City, is a prefecture-level city under the jurisdiction of Jilin Province." Of course, in some embodiments, the input may also include information such as the association relationship between each entity and other entities in the knowledge graph;

[0143] (2) Output: the encoding representation of each entity, i.e., an h-dimensional real vector, where h is an integer;

[0144] (3) Encoding process: Offline, the entity name string and the character string in the entity description text are concatenated into one character string, which is then input into the first text encoder for vector encoding. The encoding of the entity name string is obtained from the output of the first text encoder to obtain the encoded representation of the entity:

[0145] For example, using the Bert model as the first text encoder, the process of entity description encoding is as follows:

[0146] (3.1) Concatenate the entity name and its entity description into a string: "[CLS] entity name [ENT] entity description [SEP]", where [CLS] represents the start character of the string, [ENT] represents the separator between the entity name and the entity description, and [SEP] represents the end character of the string;

[0147] (3.2) The string is input into the Bert model for vector encoding, and the output encoding at the [CLS] position is taken as the entity encoding, with a dimension of h, which can be set, for example, 768 or 1024;

[0148] For example, the entity names and entity description texts of "Jilin Province" and "Jilin City" are concatenated into character strings, namely "[CLS] Jilin Province [ENT] Jilin Province is a provincial-level administrative region in China, with Changchun as its capital. [SEP]", "[CLS] Jilin City [ENT] Jilin City, also known as the Northern River City, is a prefecture-level city under the jurisdiction of Jilin Province. [SEP]", and then input into Bert for vector encoding, and take the output code at the [CLS] position as the code representation of the two entities "Jilin Province" and "Jilin City".

[0149] Step S2: Offline selection of similar entities. This step is a specific embodiment of the operations S620 to S630 described above. Figure 9 The specific process of this step is as follows:

[0150] (1) Input: The encoded representation of each entity output by S1, i.e., an h-dimensional vector;

[0151] (2) Output: the set Se of N most similar entities to each entity e, where N is an integer;

[0152] (3) Selection process: Based on the encoded representation of the entities, the first similarity between each entity is calculated, and then the N entities most similar to each entity (i.e., N similar entities) are selected offline. Specifically, for each entity e, the inner product of the h-dimensional vector corresponding to e and the h-dimensional vectors corresponding to all other entities is calculated, and the N entities with the largest inner product are selected and added to Se.

[0153] Step S3: Offline extraction of key content of entity description. This step is a specific embodiment of the operation S241 described above. Combining Figure 9 , the specific process of this step is as follows:

[0154] (1) Input: The description texts of all entities in the knowledge graph, and the set Se of N similar entities of each entity e output by S2;

[0155] (2) Output: The key content of the entity description of each entity e;

[0156] (3) Extraction process: Offline extract the part that is different from the description texts of its N similar entities from the entity description text of each entity e as the key content of the entity description of this entity. When the character is used as the composition unit of the entity description text, the process of extracting the key content of the entity description is as follows:

[0157] (3.1) Convert the entity description text of entity e into a character set Ce, and remove duplicate characters and invalid characters, where invalid characters are symbols such as commas, function words such as "of", or numbers, etc.;

[0158] (3.2) Concatenate the entity description texts of the N similar entities of entity e into a string, convert it into a character set Cs, and remove duplicate characters and invalid characters;

[0159] (3.3) The key content of the entity description of entity e = Ce - Cs, where the subtraction represents the set difference operation. In this way, the characters in the key content of the entity description of entity e are a string set composed of characters that belong to entity e but do not belong to its N similar entities.

[0160] Step S4: Encoding of user questions. This step is encoded using the second text encoder. Combining Figure 9 , the specific process is as follows:

[0161] (1) Input: The question string input by the user, such as "The opening time of the Jilin Songhua River Cultural Festival";

[0162] (2) Output: The encoded representation of the user question, that is, the real number matrix Mq of q_len * h dimensions, where q_len and h are integers, q_len is the length of the unit sequence obtained by splitting the question according to the encoder (for example, characters), and h is the dimension of the vector corresponding to each unit;

[0163] (3) Encoding process: Input the question string of the user into a certain existing text encoder for vector encoding, and obtain the encoding of each composition unit in the string from the output:

[0164] For example, using Bert as the second text encoder, the process of encoding user questions is as follows:

[0165] (3.1) Concatenate the user question into a string: "[CLS] user question [SEP]";

[0166] (3.2) The string is input into BERT for vector encoding, and the output yields the encoding of each unit in the string. In this example, the units of the Chinese string processed by the BERT encoder are characters. For example, for the question "What is the opening time of the Jilin Songhua River Cultural Festival?", the BERT encoder generates a 13*h-dimensional real number matrix Mq, where the user question has 13 characters.

[0167] Step S5: Entity mention prediction. This step is a specific embodiment of the operation S220 or S720 described above. Figure 9 , a fully connected neural network can be used to predict entity mentions in user questions. The specific implementation process is as follows:

[0168] (1) Input: The encoded representation of the user question output by S4, i.e., the q_len*h-dimensional real number matrix Mq;

[0169] (2) Output: a tuple consisting of M entity mentions and their predicted probabilities in the user's question (entity mention, predicted probability);

[0170] (3) Prediction process:

[0171] (3.1) For 0 <= i <= q_len-1, calculate the probability ps(i) that the i-th component unit (e.g., the i-th character) in the user's question is the starting unit of the entity mention. Specifically, the vector corresponding to each unit is converted into a probability value through a fully connected neural network, where the fully connected neural network is, for example, a 1-layer fully connected network Mq*Ws+bs, where Ws is an h*1 matrix and bs is a real number;

[0172] (3.2) For 0 <= i <= q_len - 1, calculate the probability pe(i) that the i-th component unit (e.g., the i-th character) in the question is the end unit of the entity mention. Specifically, the vector corresponding to each unit is converted into a probability value through a fully connected neural network, where the fully connected neural network is, for example, a 1-layer fully connected network Mq*We+be, where We is an h*1 matrix and be is a real number;

[0173] (3.3) For 0 <= i <= q_len-1, calculate the probability pm(i) that the i-th component unit (e.g., the i-th character) in the user's question is an entity mention component unit. Specifically, the vector corresponding to each unit is converted into a probability value through a fully connected neural network, where the fully connected neural network is, for example, a 1-layer fully connected network Mq*Wmn+bm, where Wm is an h*1 matrix and bm is a real number;

[0174] (3.4) For 0<=i<=j<=q_len-1, calculate the probability p([i, j]) that any continuous unit interval [i, j] in the user's question (for example, the interval between the i-th and j-th characters) is an entity mention. Specifically: the probability = sigmoid(ps(i)+pe(j)+sumi<=t<=j(pm(t))); where Sigmoid: a neural network activation function that maps variables to between 0 and 1.

[0175] (3.5) Select the top M consecutive unit intervals as entity mentions according to the probability p([i, j]); for example, for the question "What is the opening time of the Jilin Songhua River Cultural Festival", the probabilities of the consecutive unit intervals such as "Jilin", "Linsong", "Songhua", and "Songhua River" are calculated, and the two intervals with the largest probabilities and their corresponding probability values ​​are selected, such as ("Jilin", 0.6) and ("Songhua River", 0.3).

[0176] Step S6: Candidate entity recall. This step is a specific embodiment of the operation S230 described above. Figure 9 The specific process is as follows:

[0177] (1) Input: M entity mentions and their predicted probabilities in the user’s question output by S5;

[0178] (2) Output: For each entity mentioned in the user's question, return T candidate entities;

[0179] (3) Recall process: For each entity mention, use any character matching method to perform fuzzy matching with each entity in the knowledge graph and calculate the matching score f:

[0180] For example, when the matching score f is calculated based on the edit distance between the entity mention string and the entity name string, the matching score f=1 calculated based on the edit distance between the entity mention "Jilin" and the entity "Jilin City", the matching score f=1 for "Jilin Province", and the matching score f=3 for "Changchun City";

[0181] Then, based on the matching score f, the T most matching candidate entities are selected. For example, when the matching score f is calculated based on the edit distance between the entity mention string and the entity name string, a smaller f indicates a closer match. For example, the entity mention "Jilin" is a better match for "Jilin City" or "Jilin Province" than for "Changchun City."

[0182] Step S7: Encode the key content of the entity description of the candidate entity. This step is a specific embodiment of the operation S242 described above. Figure 9 The specific process is as follows:

[0183] (1) Input: the string of the user's question, M entity mentions and their predicted probabilities output by S5, T candidate entities for each entity mention output by S6, and the key content of the entity description of each entity output by S3;

[0184] (2) Output: The encoding representation of the key content of the entity description of the candidate entity, which is an h-dimensional real number vector;

[0185] (3) Encoding process: First, calculate the set of all candidate entities corresponding to all entity mentions. Then, concatenate the user question string and the entity description key content strings corresponding to all candidate entities into one string, and input it into the second text encoder (i.e., the text encoder shared with S4) for vector encoding. Then, obtain the encoding of the entity description key content corresponding to each candidate entity from the output encoding. The specific process is as follows:

[0186] (3.1) The T candidate entities mentioned by each entity are taken as a set. Thus, the set of all candidate entities = the union of the candidate entity sets corresponding to all entity mentions;

[0187] (3.2) Concatenate the user question string and the entity description key content strings corresponding to all candidate entities into a single string, input it into the second text encoder for vector encoding, and output the encoding of each component unit of the entire string;

[0188] (3.3) Extract the encoding of the entity description key content of each candidate entity based on the starting and ending positions of the key content in the concatenated string. Thus, the encoding representation of the key content of the entity description of a candidate entity is equivalent to extracting the encoding corresponding to the position range of the key content of the entity description of the candidate entity from the encoding representation matrix of the concatenated string, and then averaging the encoding to obtain the encoding representation of the key content of the entity description of the candidate entity.

[0189] S8: Entity description of candidate entity is refined and encoded. This step is a specific embodiment of the above-mentioned operation S240. Figure 9 The specific process is as follows:

[0190] (1) Input: The encoded representation of each entity (i.e., an h-dimensional real number vector) output by S1, the M entity mentions and their predicted probabilities in the user's question output by S5, the T candidate entities corresponding to each entity mention output by S6, and the encoded representation of the key content of the entity descriptions of all candidate entities output by S7;

[0191] (2) Output: The entity description of all candidate entities is refined and encoded as an h-dimensional real number vector.

[0192] (3) Refinement process: For each candidate entity, the encoding representation of the entity output by S1 and the encoding representation of the key content of the entity description output by S7 are fused to obtain the entity description refined encoding. For example, the encoding refinement process based on weighted summation is:

[0193] The T candidate entities matched for each entity mention are taken as a set respectively, and the set of all candidate entities = the union of the candidate entity sets matched by all entity mentions;

[0194] For each candidate entity e in the entire candidate entity set:

[0195] -Query the entity encoding representation result output by S1 to obtain the entity encoding representation De of e;

[0196] -Search from the encoded representation of the key content of the entity description output by S7 to obtain the encoded representation Ie of the key content of the entity description of e;

[0197] - Calculate the entity description refined encoding Re = De + a * Ie of entity e, where a is a hyperparameter determined based on experience and has a value range of [0, 1].

[0198] Step S9: Matching and sorting entity mention codes and entity description refinement codes. This step is an embodiment of the aforementioned operations S270, S780, and S790. Figure 9 , the process is as follows:

[0199] (1) Input: The encoded representation of the user question output by S4, i.e., the q_len*h-dimensional real number matrix Mq; the M entity mentions and their predicted probabilities output by S5; the T candidate entities corresponding to each entity mention output by S6; and the refined encoded representation of the entity description of each entity output by S8 (i.e., the h-dimensional vector).

[0200] (2) Output: the set of (entity mentions and linked entities) corresponding to the user’s question;

[0201] (3) Calculation process:

[0202] (3.1) For each entity mention m, based on the encoding representation Mq of the user question, calculate the encoding representation of m, which is equal to the encoding vector of all the components contained in the encoding representation Mq of the user question and calculate the bitwise mean;

[0203] (3.2) For each entity mention m, query the entity description refined codes output by S8 to obtain the entity description refined codes of the T candidate entities;

[0204] (3.3) For each entity mention m and its T candidate entities, calculate the inner product of m's encoding and the refined encoding of the candidate entity description. Then, normalize the T inner products using softmax to obtain the probability distribution of the T candidate entities. Next, select the candidate entity with the largest probability value based on the probability distribution as the m linked entities of the entity mention. Output a set of M (entity mentions, linked entities) for the user question.

[0205] (3.4) For each entity mention m, calculate the product of the predicted probability of the entity mention output by S5 and the probability of its linked entity, and delete the elements whose probability product is less than the probability threshold from the M (entity mention, linked entity), and output the remaining (entity mention, linked entity) as the entity linking result after entity disambiguation.

[0206] from Figure 9 It can be seen that in the solution of the embodiment of the present disclosure, a first text encoder is used in step S1, a second text encoder is used in steps S4 and S7, and a fully connected neural network is used in step S5. The first text encoder, the second text encoder and the fully connected neural network can be obtained through collaborative training. During the training process, the training set consists of the correct entity mentions of a given user question and the corresponding correct linked entities, as well as the user question and the knowledge graph. In each round of training, after executing the steps included in the above steps S1 to S9, the loss value is calculated, wherein the loss value is equal to the sum of the cross entropy loss of the correct entity mention prediction result and the Log likelihood loss of the correct linked entity. The cross entropy loss and the Log likelihood loss are two loss functions, which are a way to measure the deviation between the predicted value and the true value of the neural network. Then, gradient backpropagation is performed based on the loss value to realize the training of the method model.

[0207] It can be seen that according to the embodiment of the present disclosure, with user questions and entities in the knowledge graph as input, the first text encoder is first used to encode the entities offline, and the entity similarity is calculated based on the encoded representation of the entity, and then N similar entities of each entity can be selected offline, and then the information of similar entities can be used to extract the key content of the entity description offline. Secondly, the second text encoder is used to encode the user question, and then entity mention prediction and candidate entity recall are performed. Then, the key content of the entity description is encoded for the candidate entity, and the refined encoding of the entity description is obtained. Finally, based on the matching ranking of the encoded representation of each entity mention and the entity description essence encoding of the T candidate entities, the candidate entity with the highest probability and the highest relevance is selected as the link entity, and then the entity mention and its linked entity are returned as the result of the entity link.

[0208] In this way, not only can the high cost of acquiring information and representations in entity linking based on knowledge graph context representation be overcome to a certain extent, but the problem of entity linking based on entity description representation, which has a lower cost of acquiring information and representations but contains a lot of irrelevant noise information, can also be avoided to a large extent. By extracting and encoding the key content of entity descriptions, the disclosed embodiments can effectively reduce noise interference in entity linking, while also having a low cost of acquiring information and representations, while optimizing the encoded representation of entities and improving the effectiveness of entity linking.

[0209] Based on the knowledge graph question-answering question entity linking method of each of the above embodiments, the present disclosure embodiment also provides a knowledge graph question-answering question entity linking device. Figure 10 The device is described in detail.

[0210] Figure 10 The structural block diagram of the knowledge graph question-answering question entity linking device 1000 according to an embodiment of the present disclosure is schematically shown.

[0211] like Figure 10 As shown, according to an embodiment of the present disclosure, the apparatus 1000 may include a first acquisition module 1010, a first extraction module 1020, a matching module 1030, a second acquisition module 1040, a third acquisition module 1050, a second similarity calculation module 1060 and a link module 1070. According to other embodiments of the present disclosure, the apparatus 1000 may further include a first text encoder 1080, a second text encoder 1090 and / or a first similarity calculation module 10100. The apparatus 1000 may be used to implement reference Figures 2 to 9 The method described.

[0212] The first acquisition module 1010 is used to acquire a user question. In one embodiment, the first acquisition module 1010 may perform the operation S210 described above.

[0213] The first extraction module 1020 is used to extract entity mentions from user questions. Entity mentions are string representations of entities in the knowledge graph within the user question. In one embodiment, the first extraction module 1020 may perform operation S220 or operation S720 described above. In one embodiment, the first extraction module 1020 includes a fully connected neural network that is used to predict entity mentions and their predicted probabilities within the user question.

[0214] The matching module 1030 is used to retrieve T candidate entities that match the entity mention from the knowledge graph, where T is an integer greater than 1. In one embodiment, operation S1030 may execute the operation S230 described above.

[0215] The second acquisition module 1040 is used to obtain a refined entity description code for each candidate entity among the T candidate entities; wherein the refined entity description code representation is obtained based on the string difference in the entity description content between the candidate entity and N similar entities of the candidate entity, wherein the N similar entities are N entities in the knowledge graph whose first similarity with the candidate entity meets a preset condition, wherein N is an integer greater than or equal to 1. In one embodiment, operation S1040 can execute operation S240 described above.

[0216] According to some embodiments of the present disclosure, the second acquisition module 1040 is specifically used to: obtain the entity description key content of the candidate entity; wherein, the character string in the entity description key content belongs to the entity description content of the candidate entity, but does not belong to the entity description content of any similar entity of N similar entities; obtain the encoded representation of the entity description key content; obtain the encoded representation of the candidate entity; and obtain the refined entity description code of the candidate entity based on the encoded representation of the candidate entity and the encoded representation of the entity description key content.

[0217] The third acquisition module 1050 is used to acquire the encoded representation of the entity mention. In one embodiment, the third acquisition module 1050 can perform the operation S250 described above.

[0218] In some embodiments, the third acquisition module 1050 can obtain the encoded representation of the entity mention with the help of the second text encoder 1090. Specifically, the second text encoder 1090 is used to encode the character string of the user question to obtain the encoded representation matrix of the user question. Accordingly, the third acquisition module 1050 can be specifically used to: intercept the vector group corresponding to the position range of the character string of the entity mention in the user question from the encoded representation matrix of the user question to obtain the encoding matrix corresponding to the entity mention; and average the vectors in the encoding matrix corresponding to the entity mention bit by bit to obtain the encoded representation of the entity mention.

[0219] The second similarity calculation module 1060 is used to calculate the second similarity between the entity mention and each candidate entity based on the encoding representation of the entity mention and the refined encoding of the entity description of each candidate entity in the T candidate entities.

[0220] The linking module 1070 is configured to determine the candidate entity with the second greatest similarity among the T candidate entities as the linking entity mentioned by the entity. According to an embodiment of the present disclosure, the linking module 1070 may perform the operation S270 described above.

[0221] In other embodiments, when the first extraction module 1020 predicts entity mentions and their predicted probabilities in the user's question using a fully connected neural network, the linking module 1070 may further be configured to: normalize the T second similarities corresponding to the T candidate entities to obtain a link probability indicating that each of the T candidate entities is correctly linked; and, when the product of the predicted probability of the entity mention and the link probability of the entity mentioned's link exceeds a probability threshold, output the entity mention and its linked entity. Accordingly, the linking module 1070 may perform operations S780 to S790 described above.

[0222] The first text encoder 1080 may be used to encode entities in the knowledge graph to obtain encoded representations of the entities in the knowledge graph. In one embodiment, the first text encoder may perform operation S610 described above.

[0223] The first similarity calculation module 10100 is configured to: calculate a first similarity between the candidate entity and other entities in the knowledge graph based on the encoded representation of the candidate entity and the encoded representations of other entities in the knowledge graph; and select N entities from the knowledge graph whose first similarities meet a preset condition to obtain N similar entities corresponding to the candidate entity. In one embodiment, the first similarity calculation module 10100 may perform operations S620 and S630 described above.

[0224] According to an embodiment of the present disclosure, the apparatus 1000 may further include a training module. The training module may be used to collaboratively train the first text encoder 1080, the second text encoder 1090, and the fully connected neural network, wherein the sample data used in the training process includes the knowledge graph, sample user questions, and correct entity mentions and their correctly linked entities in the sample user questions.

[0225] According to an embodiment of the present disclosure, any multiple modules among the first acquisition module 1010, the first extraction module 1020, the matching module 1030, the second acquisition module 1040, the third acquisition module 1050, the second similarity calculation module 1060, the link module 1070, the first text encoder 1080, the second text encoder 1090, the first similarity calculation module 10100, the fully connected neural network and the training module can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the first acquisition module 1010, the first extraction module 1020, the matching module 1030, the second acquisition module 1040, the third acquisition module 1050, the second similarity calculation module 1060, the link module 1070, the first text encoder 1080, the second text encoder 1090, the first similarity calculation module 10100, the fully connected neural network and the training module can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or can be implemented in any one of the three implementation methods of software, hardware and firmware, or in an appropriate combination of any of them. Alternatively, at least one of the first acquisition module 1010, the first extraction module 1020, the matching module 1030, the second acquisition module 1040, the third acquisition module 1050, the second similarity calculation module 1060, the link module 1070, the first text encoder 1080, the second text encoder 1090, the first similarity calculation module 10100, the fully connected neural network and the training module can be at least partially implemented as a computer program module, which can perform the corresponding function when it is run.

[0226] Figure 11 A block diagram of an electronic device suitable for implementing the knowledge graph question-answering question entity linking method according to an embodiment of the present disclosure is schematically shown.

[0227] like Figure 11As shown, the electronic device 1100 according to an embodiment of the present disclosure includes a processor 1101, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1102 or a program loaded from a storage part 1108 into a random access memory (RAM) 1103. The processor 1101 may, for example, include a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a dedicated microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 1101 may also include an onboard memory for caching purposes. The processor 1101 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.

[0228] Various programs and data required for the operation of the electronic device 1100 are stored in the RAM 1103. The processor 1101, the ROM 1102, and the RAM 1103 are connected to each other via a bus 1104. The processor 1101 performs various operations of the method flow according to the embodiment of the present disclosure by executing the programs in the ROM 1102 and / or the RAM 1103. It should be noted that the programs may also be stored in one or more memories other than the ROM 1102 and the RAM 1103. The processor 1101 may also perform various operations of the method flow according to the embodiment of the present disclosure by executing the programs stored in the one or more memories.

[0229] According to an embodiment of the present disclosure, electronic device 1100 may further include an input / output (I / O) interface 1105, which is also connected to bus 1104. Electronic device 1100 may further include one or more of the following components connected to I / O interface 1105: an input section 1106 including a keyboard, mouse, etc.; an output section 1107 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and speakers; a storage section 1108 including a hard disk; and a communication section 1109 including a network interface card such as a LAN card or a modem. Communication section 1109 performs communication processing via a network such as the Internet. A drive 1110 is also connected to I / O interface 1105 as needed. Removable media 1111, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed in drive 1110 as needed, so that computer programs read from the removable media can be installed into storage section 1108 as needed.

[0230] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments, or may exist independently and not be incorporated into the device / apparatus / system. The computer-readable storage medium carries one or more programs, and when executed, implements the method according to the embodiments of the present disclosure.

[0231] According to an embodiment of the present disclosure, a computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM 1102 and / or RAM 1103 described above and / or one or more memories other than ROM 1102 and RAM 1103.

[0232] The embodiments of the present disclosure also include a computer program product, which includes a computer program containing program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the method provided by the embodiments of the present disclosure.

[0233] The computer program executes the above functions defined in the system / device of the embodiment of the present disclosure when the computer program is executed by the processor 1101. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0234] In one embodiment, the computer program may be stored on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may be transmitted and distributed in the form of a signal on a network medium, downloaded and installed via the communication portion 1109, and / or installed from removable media 1111. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to wireless, wired, or any suitable combination thereof.

[0235] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 1109 and / or installed from the removable medium 1111. When the computer program is executed by the processor 1101, the above-described functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the systems, devices, means, modules, units, etc. described above can be implemented by computer program modules.

[0236] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computer programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, languages ​​such as Java, C++, python, "C" or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect via the Internet).

[0237] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0238] Those skilled in the art will appreciate that the features described in the various embodiments and / or claims of this disclosure may be combined and / or coupled in various ways, even if such combinations and / or couplings are not explicitly described in this disclosure. In particular, the features described in the various embodiments and / or claims of this disclosure may be combined and / or coupled in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or couplings are intended to fall within the scope of this disclosure.

[0239] The embodiments of the present disclosure are described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although each embodiment has been described separately above, this does not mean that the measures in each embodiment cannot be used in combination to advantage. The scope of the present disclosure is defined by the appended claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make various substitutions and modifications, which should all fall within the scope of the present disclosure.

Claims

1. A knowledge graph question-answering question entity linking method, comprising: Encoding entities in the knowledge graph using a first text encoder to obtain encoded representations of the entities in the knowledge graph; Get user questions; Encode the character string of the user question using a second text encoder to obtain an encoding representation matrix of the user question; Extracting entity mentions in the user question, where the entity mentions are string representations of entities in the knowledge graph in the user question, wherein the entity mentions in the user question are predicted using a fully connected neural network; Retrieving T candidate entities matching the entity mention from the knowledge graph, where T is an integer greater than 1; Obtaining a refined encoding of the entity description of each candidate entity in the T candidate entities; wherein the refined encoding representation of the entity description is obtained based on the string difference in the entity description content between the candidate entity and N similar entities of the candidate entity, wherein the N similar entities are N entities in the knowledge graph whose first similarity with the candidate entity meets a preset condition, wherein N is an integer greater than or equal to 1; wherein the first similarity is calculated based on a vector of the encoding representation of the entity; Obtaining an encoding representation of the entity mention; wherein the encoding representation of the entity mention is obtained based on extracting, from the encoding representation matrix, a vector corresponding to a position range of the character string of the entity mention in the user question; Based on the encoded representation of the entity mention and the refined encoding of the entity description of each candidate entity in the T candidate entities, calculating a second similarity between the entity mention and each candidate entity; and Determine the candidate entity with the largest second similarity among the T candidate entities as the link entity mentioned by the entity; The first text encoder, the second text encoder and the fully connected neural network are obtained by collaborative training, wherein the sample data used in the training process includes the knowledge graph, sample user questions, and correct entity mentions and their correct linked entities in the sample user questions.

2. The method according to claim 1, wherein: The obtaining of entity description refinement coding of each candidate entity in the T candidate entities comprises: Acquire the entity description key content of the candidate entity; wherein the character string in the entity description key content belongs to the entity description content of the candidate entity, but does not belong to the entity description content of any similar entity of the N similar entities; Obtaining an encoded representation of key content of the entity description; Obtaining an encoded representation of the candidate entity; and Based on the encoding representation of the candidate entity and the encoding representation of the key content of the entity description, a refined encoding of the entity description of the candidate entity is obtained.

3. The method according to claim 2, wherein: The key contents of the entity description of the candidate entity are obtained including: Processing the character strings in the entity description content of the candidate entity according to the first rule to obtain a first character string set; Processing the character strings in the entity description contents of the N similar entities according to the first rule to obtain a second character string set; and Obtaining entity description key content of the candidate entity by subtracting the second string set from the first string set; The first rule includes taking the constituent units of the entity description content as the splitting granularity, splitting the character strings in the entity description content and then removing duplicates.

4. The method according to claim 2, wherein: The step of obtaining the encoded representation of the key content of the entity description includes: Concatenate the user question and the entity description key content of each candidate entity in the T candidate entities to form a first combined character string; Encoding the first combined character string using a second text encoder to obtain an encoded representation of the first combined character string; Extracting, from the coded representation of the first combined character string, the codes corresponding to the position range of the entity description key content of each candidate entity in the first combined character string; and Based on the intercepted codes corresponding to the entity description key contents of each candidate entity, a code representation of the entity description key contents is obtained.

5. The method according to claim 2, wherein: The step of obtaining the entity description refined encoding of the candidate entity based on the encoding representation of the candidate entity and the encoding representation of the key content of the entity description includes: The preset hyperparameter is used as the weight coefficient of the encoding representation of the key content of the entity description, and the encoding representation of the candidate entity and the encoding representation of the key content of the entity description are weightedly summed to obtain the refined encoding of the entity description of the candidate entity.

6. The method according to claim 2, wherein: The obtaining the encoded representation of the candidate entity comprises: Using a first text encoder to encode a second combined string consisting of the candidate entity and its entity description content to obtain an encoded representation of the second combined string; and From the coded representation of the second combined character string, the code corresponding to the position range of the candidate entity in the second combined character string is intercepted to obtain the coded representation of the candidate entity.

7. The method according to claim 1, wherein: Before obtaining the refined encoding of the entity description of each candidate entity in the T candidate entities, the method further includes: Calculating the first similarity between the candidate entity and other entities in the knowledge graph based on the encoded representation of the candidate entity and the encoded representations of other entities in the knowledge graph; and Select N entities whose first similarity meets the preset condition from the knowledge graph to obtain the N similar entities corresponding to the candidate entities.

8. The method according to claim 1, wherein: The extracting entity mentions in the user question further includes: predicting the entity mentions in the user question and their prediction probabilities using a fully connected neural network; The method further comprises: Normalizing the T second similarities respectively corresponding to the T candidate entities to obtain a link probability for characterizing that each of the T candidate entities is correctly linked; and When the product of the predicted probability of the entity mention and the link probability of the linked entity of the entity mention is greater than a probability threshold, the entity mention and the linked entity are output.

9. The method according to claim 1, wherein: The retrieving T candidate entities matching the entity mention from the knowledge graph includes: Calculating a matching score based on a comparison between the string mentioned by the entity and the string of the name of the entity in the knowledge graph; and The T entities with the highest matching scores are screened out from the knowledge graph to obtain the T candidate entities.

10. The method according to claim 1, wherein: The obtaining the encoded representation of the entity mention comprises: Encode the character string of the user question using a second text encoder to obtain an encoding representation matrix of the user question; Extracting, from the encoding representation matrix of the user question, a vector group corresponding to the position range of the character string mentioned by the entity in the user question to obtain an encoding matrix corresponding to the entity mention; and The vectors in the encoding matrix corresponding to the entity mention are averaged bit by bit to obtain the encoding representation of the entity mention.

11. A knowledge graph question-answering question entity linking device, comprising: A first text encoder, used to encode entities in the knowledge graph using the first text encoder to obtain an encoded representation of the entities in the knowledge graph; The first acquisition module is used to acquire user questions; A second text encoder, used for encoding the character string of the user question using a second text encoder to obtain an encoding representation matrix of the user question; A first extraction module is used to extract entity mentions in the user question, where the entity mentions are string representations of entities in the knowledge graph in the user question, wherein the entity mentions in the user question are predicted using a fully connected neural network; A matching module, configured to retrieve T candidate entities matching the entity mention from the knowledge graph, where T is an integer greater than 1; A second acquisition module is used to obtain a refined encoding of the entity description of each candidate entity in the T candidate entities; wherein the refined encoding representation of the entity description is obtained based on the string difference in the entity description content between the candidate entity and N similar entities of the candidate entity, wherein the N similar entities are N entities in the knowledge graph whose first similarity with the candidate entity meets a preset condition, wherein N is an integer greater than or equal to 1; wherein the first similarity is calculated based on a vector of the encoding representation of the entity; A third acquisition module is used to acquire the encoding representation of the entity mention; wherein the encoding representation of the entity mention is obtained based on intercepting a vector corresponding to the position range of the character string of the entity mention in the user question from the encoding representation matrix; A second similarity calculation module is used to calculate a second similarity between the entity mention and each candidate entity based on the encoding representation of the entity mention and the entity description refined encoding of each candidate entity in the T candidate entities; and A link module, used to determine the candidate entity with the largest second similarity among the T candidate entities as a link entity mentioned by the entity; The first text encoder, the second text encoder and the fully connected neural network are obtained by collaborative training, wherein the sample data used in the training process includes the knowledge graph, sample user questions, and correct entity mentions and their correct linked entities in the sample user questions.

12. An electronic device comprising: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors execute the method according to any one of claims 1 to 10.

13. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute the method according to any one of claims 1 to 10.

14. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.