Method, device and storage medium for identifying entities in text

By obtaining the candidate entity set from the knowledge graph and filtering the noisy candidate entities according to the characteristic factors, the problem of insufficient detail feature extraction and slow speed of the BERT model in entity linking is solved, and high-accuracy and real-time entity linking is achieved.

CN112380865BActive Publication Date: 2025-01-24BEIJING XIAOMI PINECONE ELECTRONICS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011248130.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-10
Publication Date
2025-01-24
Estimated Expiration
2040-11-10

AI Technical Summary

Technical Problem

The prior art fails to effectively extract text details features in entity links, resulting in low accuracy of entity links. At the same time, the prediction and inference speed of BERT language model is slow, affecting real-time prediction performance.

Method used

By obtaining the candidate entity collection corresponding to the item from the knowledge diagram, determine the first feature factor of the candidate entities, and filter the noise candidate entity based on these factors to reduce the time of the follow -up feature factor, thereby improving the real -time nature.

Benefits of technology

The real -time and recall rate of physical prediction has been improved, and the real -time prediction performance of the real -time link system that does not affect the accuracy of the physical link is not affecting the accuracy of the physical link.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112380865B_ABST
    Figure CN112380865B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a method, device and storage medium for identifying entities in a text, the method comprising: obtaining a first candidate entity set corresponding to the referent term from a knowledge graph according to the referent term included in the target text; determining a first feature factor corresponding to each candidate entity in the first candidate entity set; determining a second candidate entity set from the first candidate entity set according to the first feature factor; determining a second feature factor corresponding to each candidate entity in the second candidate entity set, the second feature factor comprising the text similarity between the target text and the candidate entity, wherein the efficiency of determining the second feature factor is less than the efficiency of determining the first feature factor; determining a target entity as a recall object of the target text from the second candidate entity set according to the second feature factor. The problem of poor real-time performance in the related art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of language processing technology, and in particular to a method, device and storage medium for identifying entities in text. Background Art

[0002] At present, since CNN (Convolutional Neural Networks) and LSTM (Long Short-Term Memory) do not perform further local similarity feature extraction between query text and knowledge base text in entity linking applications, the text detail features may be lost, resulting in low entity linking accuracy. Therefore, in order to avoid the above-mentioned problem of text detail feature loss, most related technologies specifically apply the BERT (Bidirectional Encoder Representations from Transformers) language model to entity linking.

[0003] Although the BERT language model can further extract local similarity features between query text and knowledge base text, its prediction and inference speed is more than an order of magnitude slower than traditional networks such as CNN and LSTM. As a result, its real-time prediction performance is obviously poor for online entity linking systems with high real-time requirements. Summary of the invention

[0004] In order to overcome the problems existing in the related art, the present disclosure provides a method, device and storage medium for identifying entities in text.

[0005] According to a first aspect of an embodiment of the present disclosure, a method for identifying entities in a text is provided, the method comprising:

[0006] According to the referential terms included in the target text, a first candidate entity set corresponding to the referential terms is obtained from the knowledge graph;

[0007] Determine a first characteristic factor corresponding to each candidate entity in the first candidate entity set;

[0008] Determine a second candidate entity set from the first candidate entity set according to the first feature factor;

[0009] Determine a second feature factor corresponding to each candidate entity in the second candidate entity set, wherein the second feature factor includes a text similarity between the target text and the candidate entity, wherein an efficiency of determining the second feature factor is less than an efficiency of determining the first feature factor;

[0010] A target entity serving as a recall object of the target text is determined from the second candidate entity set according to the second feature factor.

[0011] Optionally, the acquiring, from the knowledge graph, a first candidate entity set corresponding to the referential term included in the target text includes:

[0012] determining a referential item in the target text according to a position identifier in the target text;

[0013] According to the synonym mapping table and the alias mapping table of the knowledge graph, the synonym entity and the alias entity corresponding to the reference item are obtained, and the first candidate entity set includes the synonym entity and the alias entity.

[0014] Optionally, the first feature factor includes one or more of the association between the reference term and the candidate entity, the attributes of the candidate entity, the consistency between the target text and the candidate entity, and the similarity between the type of the reference term and the type of the candidate entity.

[0015] Optionally, determining the first characteristic factor corresponding to each candidate entity in the first candidate entity set includes:

[0016] Inputting the target text into a trained DeepType model to obtain the probability of the referential term belonging to each type output by the DeepType model;

[0017] Based on the probability that the reference item belongs to each type, the similarity between the types of the plurality of candidate entities and the type of the reference item is synchronously determined, and the first characteristic factor also includes the similarity between the type of the reference item and the type of the candidate entity.

[0018] Optionally, the DeepType model is obtained by training a first initial neural network model using a mixed precision training method, and the first initial neural network model is a model based on a Faster Transformer architecture.

[0019] Optionally, determining a second candidate entity set from the first candidate entity set according to the first feature factor includes:

[0020] For each candidate entity in the first candidate entity set, all first feature factors corresponding to the candidate entity are fused to obtain a first fusion score;

[0021] According to the first fusion score, N candidate entities are selected from the first candidate entity set as the second candidate entity set, where N is a positive integer greater than 1 and less than M, and M is the total number of candidate entities included in the first candidate entity set.

[0022] Optionally, determining a target entity as a recall object of the target text from the second candidate entity set according to the second feature factor includes:

[0023] For each candidate entity in the second candidate entity set, fusing the second feature factor with the first feature factor to obtain a second fusion score;

[0024] A target fusion score with the highest score is determined among all the second fusion scores, and when the target fusion score is greater than a preset score threshold, a candidate entity corresponding to the target fusion score is used as the target entity.

[0025] Optionally, determining the second characteristic factor corresponding to each candidate entity in the second candidate entity set includes:

[0026] The target text and the candidate entity are input into a trained DeepMatch model to obtain the text similarity between the target text and the candidate entity output by the DeepMatch model.

[0027] Optionally, the DeepMatch model is obtained by training a second initial neural network model using a mixed precision training method, wherein the second initial neural network model is a model based on a Faster Transformer architecture, and the DeepMatch model can synchronously calculate the text similarity between multiple candidate entities and the target text.

[0028] According to a second aspect of an embodiment of the present disclosure, a device for identifying entities in a text is provided, the device comprising:

[0029] An acquisition module is configured to acquire, according to the referential terms included in the target text, a first candidate entity set corresponding to the referential terms from the knowledge graph;

[0030] A first determining module is configured to determine a first characteristic factor corresponding to each candidate entity in the first candidate entity set;

[0031] A second determining module is configured to determine a second candidate entity set from the first candidate entity set according to the first feature factor;

[0032] A third determination module is configured to determine a second feature factor corresponding to each candidate entity in the second candidate entity set, wherein the second feature factor includes a text similarity between the target text and the candidate entity, wherein an efficiency of determining the second feature factor is less than an efficiency of determining the first feature factor;

[0033] The fourth determination module is configured to determine a target entity as a recall object of the target text from the second candidate entity set according to the second feature factor.

[0034] According to a third aspect of an embodiment of the present disclosure, a device for identifying entities in a text is provided, the device comprising:

[0035] processor;

[0036] a memory for storing processor-executable instructions;

[0037] Wherein, the processor is configured to:

[0038] According to the referential terms included in the target text, a first candidate entity set corresponding to the referential terms is obtained from the knowledge graph;

[0039] Determine a first characteristic factor corresponding to each candidate entity in the first candidate entity set;

[0040] Determine a second candidate entity set from the first candidate entity set according to the first feature factor;

[0041] Determine a second feature factor corresponding to each candidate entity in the second candidate entity set, wherein the second feature factor includes a text similarity between the target text and the candidate entity, wherein an efficiency of determining the second feature factor is less than an efficiency of determining the first feature factor;

[0042] A target entity serving as a recall object of the target text is determined from the second candidate entity set according to the second feature factor.

[0043] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the method for identifying entities in text provided by the first aspect of the present disclosure are implemented.

[0044] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: under the premise of considering the similarity between the target text and the candidate entities, the first characteristic factor of each candidate entity in the first candidate set is used to filter out unimportant noise candidate entities in the first candidate entity set, thereby ensuring a high recall rate of the candidate entities while reducing the time for obtaining the subsequent second characteristic factors, thereby improving the real-time performance of the overall entity prediction, so as to improve the real-time prediction performance of the online entity linking system with high real-time requirements.

[0045] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0047] Figure 1 The present invention is a flowchart of a method for identifying entities in text according to an exemplary embodiment.

[0048] Figure 2 is a flowchart of step S101 according to an exemplary embodiment.

[0049] Figure 3 is a flowchart of step S103 according to an exemplary embodiment.

[0050] Figure 4 is a flowchart of step S105 according to an exemplary embodiment.

[0051] Figure 5 The invention is a block diagram of a device for identifying entities in text according to an exemplary embodiment.

[0052] Figure 6 The invention is a block diagram of a device for identifying entities in text according to an exemplary embodiment. DETAILED DESCRIPTION

[0053] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0054] Before introducing the method, device and storage medium for identifying entities in text of the present disclosure, the application scenarios of the embodiments provided by the present disclosure are first introduced. The embodiments provided by the present disclosure can be used for entity linking in a knowledge question and answer scenario to determine the answer text corresponding to the question text.

[0055] In related scenarios, entity linking, also known as Entity linking, is the process of mapping entity references in natural language to correct candidate entities in the knowledge graph. In order to better enable machines to understand text, machines often need to identify entities in the text and match entities in the text with entities in the corresponding knowledge graph one by one. The entity linking algorithm needs to link the referent and its contextual text information to the correct mapping entity in the knowledge graph with the help of the knowledge graph. Among them, accurately understanding the specific entity referred to by the referent in the text and correctly linking the entity with the existing knowledge graph entity can greatly improve the effect of intelligent question-answering information retrieval and topic analysis. To achieve correct understanding of the text, it is also necessary to extract more text information. However, there are tens of millions or even hundreds of millions of data in the knowledge graph. For online entity linking systems, how to return results within a limited time under the premise of accurately understanding the text is a technical problem in related technologies.

[0056] To this end, the present disclosure provides a method for identifying entities in text. Figure 1 is a flowchart of a method for identifying entities in text according to an exemplary embodiment. Figure 1 As shown, the following steps are included:

[0057] In step S101, according to the referential terms included in the target text, a first candidate entity set corresponding to the referential terms is obtained from the knowledge graph.

[0058] In step S102, first characteristic factors corresponding to respective candidate entities in the first candidate entity set are determined.

[0059] In step S103, a second candidate entity set is determined from the first candidate entity set according to the first characteristic factor.

[0060] In step S104, second feature factors corresponding to each candidate entity in the second candidate entity set are determined, the second feature factors including text similarity between the target text and the candidate entity, wherein the efficiency of determining the second feature factors is lower than the efficiency of determining the first feature factors.

[0061] In step S105, a target entity serving as a recall object of the target text is determined from the second candidate entity set according to the second feature factor.

[0062] For example, the method can be applied to a device for identifying entities in text, and the device can be provided as a server for identifying entities in text. In this way, the server for identifying entities in text can respond to a request signal from a terminal device (e.g., a smart phone, a speaker device, etc.), obtain and identify the corresponding target text in the request signal, and then determine the target entity corresponding to the target text. Afterwards, the server for identifying entities in text can also send the target entity to the terminal device, thereby completing the query of the target entity of the target text.

[0063] It should be noted that the referent is a language fragment that expresses an entity in a natural text. For example, if "I like Hua Zi's songs" is the target text, then "Hua Zi" in "I like Hua Zi's songs" is the referent. The referent can be obtained through entity recognition technology or given by the upstream.

[0064] The first candidate entity set includes multiple candidate entities, and the entities associated with the referent are stored in the knowledge graph. This process requires a high recall rate. The entities recalled from the knowledge graph constitute the first candidate entity set.

[0065] It should be noted that the acquisition time of the first characteristic factor is shorter than the acquisition time of the second characteristic factor. Therefore, the efficiency of determining the second characteristic factor is lower than the efficiency of determining the first characteristic factor. Therefore, the first characteristic factor is used to screen each candidate entity in the first candidate entity set. The second candidate entity set is determined from the first candidate entity set by the first characteristic factor, thereby filtering out unimportant noise candidate entities in the first candidate entity set. Since the efficiency of determining the second characteristic factor is lower than the efficiency of determining the first characteristic factor, filtering out unimportant noise candidate entities in the first candidate entity set can improve the overall efficiency of determining the second characteristic factors of all candidate entities, thereby achieving the purpose of improving real-time performance.

[0066] The second feature factor includes the text similarity between the target text and the candidate entity.

[0067] In the present disclosure, since the first characteristic factor is used to filter out most of the noise candidate entities, the time for subsequently determining the second characteristic factor is reduced, thereby improving the real-time performance of the overall prediction. In addition, when determining the target entity of the recall object of the target text, the text similarity between the target text and the candidate entity is also taken into account, thereby improving the real-time performance of entity linking without affecting the accuracy of entity linking.

[0068] In a possible implementation, commonly used methods for determining the first candidate entity set from the knowledge graph include: constructing a rule maintenance vocabulary and recalling entities based on edit distance. Specifically, the constructed rule maintenance vocabulary is commonly a synonym table, an abbreviation full name mapping table, and an alias table. The synonym table can extract synonyms based on the redirected pages in the encyclopedia (such as Wikipedia); the abbreviation full name mapping table can check the first letters according to the entities in the library, such as "IBM" is expanded to "International Brotherhood of Magicains"; the alias table can extract aliases based on the aliases in the infobox table and the anchor text information. Recalling a given referent based on edit distance specifically refers to calculating the edit distance between the entity and the referent in the knowledge graph based on the referent, and it can be recalled if it is less than a preset threshold.

[0069] For example, Figure 2 is a flowchart of step S101 according to an exemplary embodiment. Figure 2 As shown, the above step S101 may include the following steps:

[0070] In step S201, a referential term in the target text is determined according to a position identifier in the target text.

[0071] In step S202, synonym entities and alias entities corresponding to the reference item are obtained according to the synonym mapping table and alias mapping table of the knowledge graph, and the first candidate entity set includes the synonym entities and the alias entities.

[0072] It should be noted that the position identifier is the identifier of the upstream circled referent. Specifically, by constructing the text into a structure of previous text + position marker + referent + position marker + following text, the machine can distinguish which word is the referent, where the marker is a position identifier. For example, when the target text is constructed into an input structure such as "I think this [position identifier] apple [position identifier] is delicious", "apple" is the referent of the target text.

[0073] It is worth noting that the synonym mapping table and the alias mapping table are constructed based on the knowledge graph. Among them, the synonym mapping table includes synonyms and synonym entities containing the synonyms, and the alias mapping table stores aliases and alias entities containing the aliases. When generating the first candidate entity set, the synonym entities that are synonyms with the referent and the union of the alias entities that are aliases with the referent are selected. For example, the synonym mapping table is {s1: {e1, e2}, s2: {e1}, s3: {e2}}, and the alias mapping table is {a1: {e1}, a2: {e1, e2}, a3: {e2}}. When the synonym of the referent m is s1 and the alias of m is a2, the first candidate entity set is {e1, e2}.

[0074] It is worth noting that when unique candidate entities are identified by ID in the synonym mapping table and the alias mapping table respectively, it can be understood that the entities e1 and e2 in the example tables of the above synonym mapping table and the alias mapping table can be directly represented by corresponding unique IDs respectively, and accordingly, the corresponding candidate entities can be matched according to the unique ID.

[0075] In one possible implementation, the first feature factor includes one or more of the association between the reference term and the candidate entity, the attributes of the candidate entity, the consistency between the target text and the candidate entity, and the similarity between the type of the reference term and the type of the candidate entity.

[0076] Specifically, the degree of association between the reference term and the candidate entity can be obtained through the annotated data, and the degree of association is determined by counting the number of links between the annotated reference term and its associated entity. For example, if the first candidate entity set of the reference term m is {e1, e2}, m is associated with entity e1 k1 times in the annotated data, and m is associated with entity e2 k2 times in the annotated data, then the degree of association between m and e1 is k1 / (k1+k2), and the degree of association between m and e2 is k2 / (k1+k2).

[0077] The candidate entity attributes include the number of views of the candidate entity in the knowledge graph, the description length of the candidate entity, the number of attributes of the infobox of the candidate entity, whether the referent is a synonym of the candidate entity, whether the referent is an alias of the candidate entity, and the string edit distance between the referent and the candidate entity. In some embodiments, each entity in the knowledge graph includes a plurality of key pair values ​​corresponding to the entity, and each key pair value includes an entity attribute and a value corresponding to the entity attribute. For example, an entity attribute may be, for example, the number of views, and correspondingly, the number of views of the candidate entity may be determined by directly reading the value corresponding to the attribute.

[0078] The consistency between the target text and the candidate entity can be characterized by two factors. Specifically, the first factor is whether there are multiple referents in the target text that are synonyms of the same entity. If so, the value of this factor is 1, otherwise it is 0.

[0079] The second factor is whether the keyword in the target text appears in the candidate entity information. If so, the factor value is 1, otherwise the factor value is 0.

[0080] The type of the referent and the type of the candidate entity may be, for example, food, organizational structure, person, etc.

[0081] In a possible implementation, the similarity between the type of the reference item and the type of the candidate entity can be calculated by a DeepType model. Specifically, the target text is input into a trained DeepType model to obtain the probability of each type of the reference item output by the DeepType model; then, based on the probability that the reference item belongs to each type, the similarity between the types of the plurality of candidate entities and the type of the reference item is simultaneously determined.

[0082] It is worth noting that synchronously determining the similarity between the types of multiple candidate entities and the types of the referents can shorten the entity prediction time and improve the real-time performance of the overall entity prediction. For example, NVIDIA can combine multiple requests (requests for determining the similarity between the types of multiple candidate entities and the types of the referents) into one http service request to synchronously determine the similarity between the types of multiple candidate entities and the types of the referents.

[0083] The target text needs to be constructed so that the DeepType model can distinguish which word is to be classified. For example, it can be constructed by position identifiers, specifically the structure of "previous text + position marker + reference item + position marker + following text". The previous text is the text before the start of the reference item, and the following text is the text after the end of the reference item.

[0084] In addition, the type corresponding to each candidate entity can be obtained from the knowledge graph, and the similarity between the referent and the type of the candidate entity can be jointly determined based on the type corresponding to each candidate entity and the probability that the obtained referent is each type.

[0085] For example, the category probability result of the referent "apple" output by the DeepType model is {l1: 0.8, l2: 0.1, l3: 0.1}, where 11, 12, and 13 are different types, and correspondingly, 0.8, 0.1, and 0.1 are the probabilities corresponding to different types. If the type of the candidate entity e1 determined according to the knowledge graph is 11, then according to the category probability result obtained by DeepType and the type of the candidate entity e1, the similarity between the referent and the type of the candidate entity is determined to be 0.8.

[0086] In a possible implementation, the DeepType model is obtained by training a first initial neural network model using a mixed precision training method, where the first initial neural network model is a model based on a Faster Transformer architecture.

[0087] It is worth noting that the existing deep learning model for entity connection uses 32-bit single-precision floating point numbers (FP32) for training, while the mixed precision training method uses 16-bit floating point numbers (FP16) for deep learning model training, thereby reducing the memory required for training deep learning models. Therefore, the use of mixed precision training in this disclosure can effectively improve real-time prediction performance and shorten the time to identify entities in text.

[0088] In addition, in the present disclosure, the first initial neural network is a BERT model, wherein Faster Transformer is a transformer in the BERT model. Faster Transformer is a performance optimization solution proposed by NVIDIA for Transformer reasoning. Using Faster Transformer can improve real-time prediction performance and shorten the time to identify entities in text.

[0089] In one possible implementation, Figure 3 is a flowchart of step S103 according to an exemplary embodiment. Figure 3 As shown, the following steps are included:

[0090] In step S301, for each candidate entity in the first candidate entity set, all first feature factors corresponding to the candidate entity are fused to obtain a first fusion score.

[0091] In step S302, according to the first fusion score, N candidate entities are selected from the first candidate entity set as the second candidate entity set, where N is a positive integer greater than 1 and less than M, and M is the total number of candidate entities included in the first candidate entity set.

[0092] In the present disclosure, for each candidate entity in the first candidate entity set, all first feature factors corresponding to the candidate entity are fused to obtain a first fusion score, and N candidate entities are selected as the second candidate entity set by sorting the first fusion scores, thereby filtering out most of the noise candidate entities while retaining a high recall rate.

[0093] The fusion method for the first characteristic factor may adopt a multi-layer perceptron (MLP) method. The MLP model is used to form a logistic regression model to fuse multiple characteristic factors and then score them to obtain a first fusion score.

[0094] In one possible implementation, Figure 4 is a flowchart of step S105 according to an exemplary embodiment. Figure 4 As shown, the following steps are included:

[0095] In step S401, for each candidate entity in the second candidate entity set, the second feature factor is fused with the first feature factor to obtain a second fusion score;

[0096] In step S402, a target fusion score with the highest score is determined among all second fusion scores, and when the target fusion score is greater than a preset score threshold, a candidate entity corresponding to the target fusion score is used as a target entity.

[0097] In the present disclosure, the first feature factor and the second feature factor are fused, and the second fusion score of each candidate entity in the second candidate entity set is comprehensively determined from multiple feature aspects, and the target fusion score with the highest score is taken as the target entity, and when the target fusion score is greater than a preset score threshold, the candidate entity corresponding to the target fusion score is taken as the target entity; if the target fusion score is less than or equal to the preset score threshold, it is considered that the reference item does not have a correct target entity in the knowledge graph.

[0098] It is worth noting that the preset score threshold can be set according to actual conditions, and this embodiment does not limit this.

[0099] The fusion method of the second characteristic factor and the first characteristic factor may adopt a multi-layer perceptron (MLP) method. The MLP model is used to form a logistic regression model to fuse multiple characteristic factors and then score them to obtain a second fusion score.

[0100] In a possible implementation, determining the second feature factor corresponding to each candidate entity in the second candidate entity set in the above step S104 may specifically include: inputting the target text and the candidate entity into a trained DeepMatch model to obtain the text similarity between the target text and the candidate entity output by the DeepMatch model.

[0101] It is worth noting that since the DeepMatch model needs to calculate the similarity between each candidate entity and the target text, and sometimes there are hundreds of candidate entities obtained in the knowledge graph, it takes a long time, resulting in poor real-time performance. Therefore, after the fusion of the first feature factor, a new candidate entity set is determined to reduce the number of similarities between the candidate entities and the target text that the DeepMatch model needs to calculate, thereby shortening the acquisition time of the second feature factor and improving the real-time performance of the overall entity prediction.

[0102] In the present disclosure, when using the DeepMatch model to calculate similarity, first, in order for the DeepMatch model to distinguish which two words need to be judged for similarity, the structure of the target text and the candidate entity needs to be reconstructed, and then the constructed target text and candidate entity are spliced ​​and input into the DeepMatch model.

[0103] Specifically, the target text and the candidate entity structure can be reconstructed, for example, by using a position marker, specifically a structure of "previous context + position marker + referent + position marker + following context". For example, the text obtained after constructing "I think this apple is delicious" is "I think this [position marker] apple [position marker]".

[0104] The constructed target text and candidate entities can be concatenated, for example, by using position identifiers. For example, "I think this [position marker 1] apple [position marker 1]" is the constructed target text, and "Apple is a plant of the genus Apple in the subfamily Apple of the Rosaceae family, and its tree is a deciduous tree..." is the candidate text. The concatenated text is "[position marker 2] I think this [position marker 1] apple [position marker 1] is delicious [position marker 3] Apple is a plant of the genus Apple in the subfamily Apple of the Rosaceae family, and its tree is a deciduous tree...", and the text is used as the input of the DeepMatch model.

[0105] Similar to the DeepType model, the DeepMatch model is also trained by using a mixed precision training method to train the second initial neural network model. The second initial neural network model is also a model based on the Faster Transformer architecture, which shortens the time to recognize entities in the text and achieves the purpose of improving real-time performance.

[0106] Furthermore, the DeepMatch model can synchronously calculate the text similarity between multiple candidate entities and the target text, further shortening the time for overall recognition of entities in the text, so as to achieve the purpose of improving real-time performance.

[0107] Based on the same inventive concept, the present disclosure also provides a device for identifying entities in a text. Figure 5 is a block diagram of a device for identifying entities in text according to an exemplary embodiment. Figure 5 The device includes an acquisition module 501, a first determination module 502, a second determination module 503, a third determination module 504 and a fourth determination module 505.

[0108] The acquisition module 501 is configured to acquire the referential terms included in the target text and acquire the first candidate entity set corresponding to the referential terms from the knowledge graph.

[0109] The first determination module 502 is configured to determine a first characteristic factor corresponding to each candidate entity in the first candidate entity set.

[0110] The second determination module 503 is configured to determine a second candidate entity set from the first candidate entity set according to the first feature factor.

[0111] The third determination module 504 is configured to determine a second feature factor corresponding to each candidate entity in the second candidate entity set, wherein the second feature factor includes a text similarity between the target text and the candidate entity, wherein an efficiency of determining the second feature factor is less than an efficiency of determining the first feature factor.

[0112] The fourth determination module 505 is configured to determine a target entity as a recall object of the target text from the second candidate entity set according to the second feature factor.

[0113] Optionally, the acquisition module 501 includes:

[0114] The referential term determination submodule is configured to determine the referential term in the target text according to the position identifier in the target text.

[0115] The acquisition submodule is configured to acquire synonym entities and alias entities corresponding to the reference item according to the synonym mapping table and alias mapping table of the knowledge graph, and the first candidate entity set includes the synonym entities and the alias entities.

[0116] Optionally, the first feature factor includes one or more of the association between the reference term and the candidate entity, the attributes of the candidate entity, the consistency between the target text and the candidate entity, and the similarity between the type of the reference term and the type of the candidate entity.

[0117] Optionally, the first determining module 502 includes:

[0118] The probability output submodule is configured to input the target text into a trained DeepType model to obtain the probability that the referential term output by the DeepType model belongs to each type.

[0119] The type similarity determination submodule is configured to synchronously determine the similarity between the types of multiple candidate entities and the type of the referent based on the probability that the referent belongs to each type, and the first characteristic factor also includes the similarity between the type of the referent and the type of the candidate entity.

[0120] Optionally, the DeepType model is obtained by training a first initial neural network model using a mixed precision training method, and the first initial neural network model is a model based on a Faster Transformer architecture.

[0121] Optionally, the second determining module 503 includes:

[0122] The first fusion submodule is configured to fuse all first feature factors corresponding to each candidate entity in the first candidate entity set to obtain a first fusion score.

[0123] A selection submodule selects N candidate entities from the first candidate entity set as the second candidate entity set according to the first fusion score, where N is a positive integer greater than 1 and less than M, and M is the total number of candidate entities included in the first candidate entity set.

[0124] Optionally, the fourth determining module 505 includes:

[0125] The second fusion submodule fuses the second feature factor with the first feature factor for each candidate entity in the second candidate entity set to obtain a second fusion score.

[0126] The target entity determination submodule determines a target fusion score with the highest score among all the second fusion scores, and when the target fusion score is greater than a preset score threshold, uses the candidate entity corresponding to the target fusion score as the target entity.

[0127] Optionally, the third determination module 504 is specifically configured to input the target text and the candidate entity into a trained DeepMatch model to obtain the text similarity between the target text and the candidate entity output by the DeepMatch model.

[0128] Optionally, the DeepMatch model is obtained by training a second initial neural network model using a mixed precision training method, wherein the second initial neural network model is a model based on a Faster Transformer architecture, and the DeepMatch model can synchronously calculate the text similarity between multiple candidate entities and the target text.

[0129] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0130] The present disclosure also provides a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, implements the steps of the method for identifying entities in text provided by the present disclosure.

[0131] Based on the same inventive concept, the present disclosure also provides a computer-readable storage medium on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the method for identifying entities in text provided by the present disclosure are implemented.

[0132] Based on the same inventive concept, the present disclosure also provides a device for identifying entities in a text. Figure 6 6 is a block diagram of an apparatus 600 for identifying entities in text according to an exemplary embodiment. For example, the apparatus 600 may be a mobile phone, a computer, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0133] Reference Figure 6 , the apparatus 600 may include one or more of the following components: a processing component 602 , a memory 604 , a power component 606 , a multimedia component 608 , an audio component 610 , an input / output (I / O) interface 612 , and a communication component 614 .

[0134] The processing component 602 generally controls the overall operation of the device 600, such as operations associated with display, data communication, and recording operations. The processing component 602 may include one or more processors 620 to execute instructions to complete all or part of the steps of the above-mentioned method for identifying entities in text. In addition, the processing component 602 may include one or more modules to facilitate the interaction between the processing component 602 and other components. For example, the processing component 602 may include a multimedia module to facilitate the interaction between the multimedia component 608 and the processing component 602.

[0135] The memory 604 is configured to store various types of data to support operations on the device 600. Examples of such data include instructions for any application or method operating on the device 600, etc. The memory 604 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0136] The power component 606 provides power to the various components of the device 600. The power component 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 600.

[0137] The multimedia component 608 includes a screen that provides an output interface between the device 600 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.

[0138] The audio component 610 is configured to output and / or input audio signals. For example, the audio component 610 includes a microphone (MIC), and when the device 600 is in an operating mode, such as a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 604 or sent via the communication component 614. In some embodiments, the audio component 610 also includes a speaker for outputting audio signals.

[0139] The input / output (I / O) interface 612 provides an interface between the processing component 602 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0140] The communication component 614 is configured to facilitate wired or wireless communication between the device 600 and other devices. The device 600 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 614 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 614 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0141] In an exemplary embodiment, the apparatus 600 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above-mentioned method of identifying entities in text.

[0142] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 604 including instructions, and the instructions can be executed by a processor 620 of the device 600 to complete the above-mentioned method of identifying entities in text. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0143] In another exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program that can be executed by a programmable device. The computer program has a code portion for executing the above-mentioned method for identifying entities in text when executed by the programmable device.

[0144] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. This application is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0145] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method for identifying entities in text, characterized in that The method comprises: According to the referential terms included in the target text, a first candidate entity set corresponding to the referential terms is obtained from the knowledge graph; Determine a first characteristic factor corresponding to each candidate entity in the first candidate entity set, wherein the first characteristic factor includes a similarity between a type of the referent and a type of the candidate entity; For each candidate entity in the first candidate entity set, all first feature factors corresponding to the candidate entity are fused to obtain a first fusion score; According to the first fusion score, select N candidate entities from the first candidate entity set as the second candidate entity set, where N is a positive integer greater than 1 and less than M, and M is the total number of candidate entities included in the first candidate entity set; Determine a second feature factor corresponding to each candidate entity in the second candidate entity set, wherein the second feature factor includes a text similarity between the target text and the candidate entity, wherein an efficiency of determining the second feature factor is less than an efficiency of determining the first feature factor; A target entity serving as a recall object of the target text is determined from the second candidate entity set according to the second feature factor.

2. The method according to claim 1, characterized in that The step of obtaining, from the knowledge graph, a first candidate entity set corresponding to the referential term included in the target text includes: determining a referential item in the target text according to a position identifier in the target text; According to the synonym mapping table and the alias mapping table of the knowledge graph, the synonym entity and the alias entity corresponding to the reference item are obtained, and the first candidate entity set includes the synonym entity and the alias entity.

3. The method according to claim 1, characterized in that The first feature factor also includes one or more of the association between the reference term and the candidate entity, the attribute of the candidate entity, and the consistency between the target text and the candidate entity.

4. The method according to claim 1, characterized in that The determining of the first characteristic factors respectively corresponding to the candidate entities in the first candidate entity set includes: Inputting the target text into a trained DeepType model to obtain the probability of the referential term belonging to each type output by the DeepType model; Based on the probability that the reference term belongs to each type, the similarity between the types of the plurality of candidate entities and the type of the reference term is synchronously determined.

5. The method according to claim 4, characterized in that The DeepType model is obtained by training a first initial neural network model using a mixed precision training method, and the first initial neural network model is a model based on the FasterTransformer architecture.

6. The method according to claim 1, characterized in that The step of determining the target entity as the recall object of the target text from the second candidate entity set according to the second feature factor comprises: For each candidate entity in the second candidate entity set, fusing the second feature factor with the first feature factor to obtain a second fusion score; A target fusion score with the highest score is determined among all the second fusion scores, and when the target fusion score is greater than a preset score threshold, a candidate entity corresponding to the target fusion score is used as the target entity.

7. The method according to any one of claims 1 to 6, characterized in that: The determining of the second characteristic factors corresponding to each candidate entity in the second candidate entity set includes: The target text and the candidate entity are input into a trained DeepMatch model to obtain the text similarity between the target text and the candidate entity output by the DeepMatch model.

8. The method according to claim 7, characterized in that The DeepMatch model is obtained by training the second initial neural network model using a mixed precision training method. The second initial neural network model is a model based on the FasterTransformer architecture. The DeepMatch model can synchronously calculate the text similarity between multiple candidate entities and the target text.

9. A device for identifying entities in text, characterized in that The device comprises: An acquisition module is configured to acquire, according to the referential terms included in the target text, a first candidate entity set corresponding to the referential terms from the knowledge graph; A first determination module is configured to determine a first characteristic factor corresponding to each candidate entity in the first candidate entity set, wherein the first characteristic factor includes a similarity between a type of the referent and a type of the candidate entity; A second determination module is configured to fuse all first feature factors corresponding to each candidate entity in the first candidate entity set to obtain a first fusion score; select N candidate entities from the first candidate entity set as a second candidate entity set according to the first fusion score, where N is a positive integer greater than 1 and less than M, and M is the total number of candidate entities included in the first candidate entity set; A third determination module is configured to determine a second feature factor corresponding to each candidate entity in the second candidate entity set, wherein the second feature factor includes a text similarity between the target text and the candidate entity, wherein an efficiency of determining the second feature factor is less than an efficiency of determining the first feature factor; The fourth determination module is configured to determine a target entity as a recall object of the target text from the second candidate entity set according to the second feature factor.

10. A device for identifying entities in text, characterized in that: The device comprises: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to: According to the referential terms included in the target text, a first candidate entity set corresponding to the referential terms is obtained from the knowledge graph; Determine a first characteristic factor corresponding to each candidate entity in the first candidate entity set, wherein the first characteristic factor includes a similarity between a type of the referent and a type of the candidate entity; For each candidate entity in the first candidate entity set, all first feature factors corresponding to the candidate entity are fused to obtain a first fusion score; According to the first fusion score, select N candidate entities from the first candidate entity set as the second candidate entity set, where N is a positive integer greater than 1 and less than M, and M is the total number of candidate entities included in the first candidate entity set; Determine a second feature factor corresponding to each candidate entity in the second candidate entity set, wherein the second feature factor includes a text similarity between the target text and the candidate entity, wherein an efficiency of determining the second feature factor is less than an efficiency of determining the first feature factor; A target entity serving as a recall object of the target text is determined from the second candidate entity set according to the second feature factor.

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

Citation Information

Patent Citations

  • Discovering and linking method of knowledge graph entity based on production alias excavation

    CN106909655A

  • Search engine based named entity linking method

    CN108415902A