Entity disambiguation and entity linking method

By constructing textual descriptions of candidate entities and combining them with location information from an entity disambiguation network, the inaccuracy problem of entity disambiguation is solved, the accuracy of entity links is improved, and a method for entity disambiguation is implemented, enhancing the accuracy of the knowledge base and the effectiveness of entity links. This improves the quality of the knowledge graph.

CN113987193BActive Publication Date: 2026-04-10BEIJING XIAOMI MOBILE SOFTWARE CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-03
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

In existing technologies, the accuracy of entity linking tasks is affected by the inaccuracy of entity disambiguation, leading to a decline in the quality of knowledge base expansion and knowledge graphs.

Method used

By acquiring the entities to be disambiguated and their associated attribute information from the target text, a text description of the candidate entities is constructed. Then, using a pre-trained entity disambiguation network combined with the location information of the entities to be disambiguated, the target entities are determined, and entity links are performed by combining the associated attribute information.

Benefits of technology

It improves the accuracy of entity disambiguation and entity linking, realizes entity disambiguation in the knowledge base, and enhances the accuracy of the knowledge base and the precision of entity linking.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113987193B_ABST
    Figure CN113987193B_ABST
Patent Text Reader

Abstract

The present disclosure relates to the technical field of computer data processing, in particular to an entity disambiguation and entity linking method. An entity disambiguation method comprises: obtaining a disambiguation entity in a target text and association attribute information of the disambiguation entity and an associated entity, the association attribute being a sub-attribute of a key attribute of an entity; constructing a text description corresponding to each candidate entity of the disambiguation entity based on the key attribute information of the entity and the association attribute information; and determining a target entity from the candidate entities according to each text description. The present disclosure utilizes association attribute information to better assist entity disambiguation and improve the accuracy of entity disambiguation.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of computer data processing, in particular to an entity disambiguation and entity linking method. BACKGROUND

[0002] With the continuous expansion of open domain knowledge graph and knowledge base, various entity quantities, entity attributes and entity semantic information are becoming more and more rich. As the most important link in the knowledge base task, the accuracy of entity linking has a great influence on the expansion of knowledge graph and knowledge base. SUMMARY

[0003] To improve the accuracy of the entity linking task, the embodiments of the present disclosure provide an entity disambiguation and entity linking method, device, electronic equipment and storage medium.

[0004] In a first aspect, the embodiments of the present disclosure provide an entity disambiguation method, comprising:

[0005] obtaining a disambiguation entity in a target text and associated attribute information of the disambiguation entity and an associated entity, the associated attribute being a sub-attribute of a key attribute of an entity;

[0006] based on the key attribute information of the entity and the associated attribute information, constructing a text description corresponding to each candidate entity of the disambiguation entity;

[0007] determining a target entity from the candidate entity according to the text description.

[0008] In some embodiments, the target text includes SPO triple text; and the obtaining of the disambiguation entity in the target text and the associated attribute information of the disambiguation entity and the associated entity includes:

[0009] obtaining a disambiguation entity in the SPO triple text and an associated entity associated with the disambiguation entity;

[0010] determining the associated attribute information of the disambiguation entity and the associated entity according to the SPO triple text.

[0011] In some embodiments, the constructing of the text description corresponding to each candidate entity of the disambiguation entity based on the key attribute information of the entity and the associated attribute information includes:

[0012] obtaining the key attribute information of each candidate entity in the knowledge base;

[0013] constructing a first text corresponding to the candidate entity according to the key attribute information;

[0014] According to the first text, the target text and the association attribute information, the text description corresponding to the candidate entity is constructed.

[0015] In some embodiments, the key attribute information of each candidate entity in the knowledge base is obtained, including:

[0016] According to the information of each candidate entity in the knowledge base under the key attribute of the preset category, the key attribute information of the candidate entity is determined.

[0017] In some embodiments, the target entity is determined from the candidate entity according to the text description, including:

[0018] The text information of the text description and the position information of the entity to be disambiguated in the text description are extracted;

[0019] According to the text information and the position information, the similarity between the candidate entity corresponding to the text description and the entity to be disambiguated is determined;

[0020] According to the similarity corresponding to each text description, the target entity is determined from the candidate entity.

[0021] In some embodiments, the target entity is determined from the candidate entity according to the text description, including:

[0022] Each text description is input into a pre-trained entity disambiguation network, and the entity disambiguation network extracts the text information of the text description and the position information of the entity to be disambiguated in the text description;

[0023] The entity disambiguation network determines the similarity between the candidate entity corresponding to the text description and the entity to be disambiguated according to the text information and the position information;

[0024] The entity disambiguation network determines the target entity from the candidate entity according to the similarity corresponding to each text description.

[0025] In some embodiments, the process of training the entity disambiguation network includes the following steps:

[0026] A text sample set is obtained; each text sample in the text sample set includes a text description and corresponding label information of the text description;

[0027] The text sample set is input into an untrained entity disambiguation network to obtain an output result output by the entity disambiguation network;

[0028] According to the difference between the output result and the label information, the network parameters of the entity disambiguation network are adjusted until the convergence condition is met.

[0029] In a second aspect, the embodiments of the present disclosure provide an entity linking method, comprising:

[0030] linking the to-be-disambiguated entity in the target text with a target entity, wherein the target entity is obtained according to the entity disambiguation method in any of the embodiments of the first aspect.

[0031] In a third aspect, the embodiments of the present disclosure provide an entity disambiguation apparatus, comprising:

[0032] an acquisition module configured to acquire a to-be-disambiguated entity in a target text and association attribute information of the to-be-disambiguated entity and an associated entity, the association attribute being a sub-attribute of a key attribute of an entity;

[0033] a text construction module configured to construct a text description corresponding to each candidate entity of the to-be-disambiguated entity based on the key attribute information of the entity and the association attribute information;

[0034] a determination module configured to determine a target entity from the candidate entities according to the text description.

[0035] In some embodiments, the target text comprises an SPO triple text, and the acquisition module is specifically configured to:

[0036] acquire a to-be-disambiguated entity in the SPO triple text and an associated entity associated with the to-be-disambiguated entity;

[0037] determine association attribute information of the to-be-disambiguated entity and the associated entity according to the SPO triple text.

[0038] In some embodiments, the text construction module is specifically configured to:

[0039] acquire the key attribute information of each of the candidate entities in a knowledge base;

[0040] construct a first text corresponding to the candidate entity according to the key attribute information;

[0041] construct the text description corresponding to the candidate entity according to the first text, the target text, and the association attribute information.

[0042] In some embodiments, the text construction module is specifically configured to:

[0043] determine the key attribute information of the candidate entity according to information of each of the candidate entities in a preset category in a knowledge base.

[0044] In some embodiments, the determination module is specifically configured to:

[0045] extracting text information of the text description and position information of the entity to be disambiguated in the text description;

[0046] determining similarity between the candidate entity corresponding to the text description and the entity to be disambiguated according to the text information and the position information;

[0047] determining the target entity from the candidate entity according to the similarity corresponding to each text description.

[0048] In some embodiments, the determining module is specifically configured to:

[0049] inputting each text description into a pre-trained entity disambiguation network, the entity disambiguation network extracting text information of the text description and position information of the entity to be disambiguated in the text description;

[0050] the entity disambiguation network determining similarity between the candidate entity corresponding to the text description and the entity to be disambiguated according to the text information and the position information;

[0051] the entity disambiguation network determining the target entity from the candidate entity according to the similarity corresponding to each text description.

[0052] In some embodiments, the entity disambiguation apparatus of the present disclosure further comprises a training module, which is configured to:

[0053] obtain a text sample set; each text sample in the text sample set comprises a text description and label information corresponding to the text description;

[0054] input the text sample set into an untrained entity disambiguation network to obtain an output result output by the entity disambiguation network;

[0055] adjust network parameters of the entity disambiguation network according to differences between the output result and the label information until a convergence condition is met.

[0056] In a fourth aspect, an embodiment of the present disclosure provides an entity linking apparatus, comprising:

[0057] an entity linking module configured to perform entity linking between an entity to be disambiguated in a target text and a target entity; wherein the target entity is obtained according to the entity disambiguation method of any one of the first aspect.

[0058] In a fifth aspect, an embodiment of the present disclosure provides an electronic device, comprising:

[0059] a processor; and

[0060] A memory storing computer instructions readable by the processor, when the computer instructions are read, the processor executes the method according to any one of the embodiments of the first aspect and the second aspect.

[0061] In a sixth aspect, the embodiments of the present disclosure provide a storage medium for storing computer readable instructions for causing a computer to execute the method according to any one of the embodiments of the first aspect and the second aspect.

[0062] The entity disambiguation method of the embodiments of the present disclosure comprises obtaining a to-be-disambiguated entity in a target text and association attribute information of the to-be-disambiguated entity and an associated entity, constructing a text description corresponding to each candidate entity of the to-be-disambiguated entity based on key attribute information of the entity and the association attribute information, and determining a target entity from the candidate entities according to the text description. The embodiments of the present disclosure combine the association attribute information between the to-be-tested entity and the associated entity, use the association attribute information to better assist entity disambiguation, and thus improve the accuracy of entity disambiguation. BRIEF DESCRIPTION OF DRAWINGS

[0063] In order to more clearly illustrate the technical solutions in the specific embodiments of the present disclosure or the prior art, the drawings needed in the specific embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without creative labor.

[0064] Figure 1 is a flowchart of an entity disambiguation method according to some embodiments of the present disclosure.

[0065] Figure 2 is a flowchart of an entity disambiguation method according to some embodiments of the present disclosure.

[0066] Figure 3 is a flowchart of an entity disambiguation method according to some embodiments of the present disclosure.

[0067] Figure 4 is a schematic diagram of an entity disambiguation network according to some embodiments of the present disclosure.

[0068] Figure 5 is a structural diagram of an entity disambiguation network according to some embodiments of the present disclosure.

[0069] Figure 6 is a flowchart of an entity disambiguation method according to some embodiments of the present disclosure.

[0070] Figure 7 is a flowchart of an entity disambiguation method according to some embodiments of the present disclosure.

[0071] Figure 8 This is a structural block diagram of a physical disambiguation device according to some embodiments of this disclosure.

[0072] Figure 9 This is a computer system architecture block diagram suitable for implementing the methods of the embodiments of this disclosure. Detailed Implementation

[0073] The technical solutions of this disclosure will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure. Furthermore, the technical features involved in the different embodiments of this disclosure described below can be combined with each other as long as they do not conflict with each other.

[0074] In practical applications, entity linking mainly includes two steps: entity recognition and entity disambiguation. Entity recognition refers to extracting or identifying entities contained in the target text, such as extracting or identifying entities like person names, place names, organization names, dates, and times from the target text.

[0075] However, for each entity extracted or identified from the target text, there may be multiple entities with the same name in the knowledge base, and these entities may have different meanings. For example, for multiple synchronization entities named "HD" in the knowledge base, it could refer to a person's name or a display resolution. Therefore, entity disambiguation refers to determining which entity in the knowledge base corresponds to the entity extracted or identified from the target text.

[0076] The key point of this disclosure is to disambiguate the entity to be disambiguated in the target text. That is, when the entity to be disambiguated (mention) in the target text is identified, it is determined which specific entity in the knowledge base the mention refers to, and then the mention is linked to the correct entity in the knowledge base through entity linking.

[0077] In a first aspect, the present disclosure provides an entity disambiguation method that can be applied to electronic devices such as servers and computers to accurately disambiguate entities in target text, so that the entities to be disambiguated can be accurately linked to entities determined in the knowledge base.

[0078] like Figure 1 As shown, in some embodiments, the entity disambiguation method of this disclosure includes:

[0079] S110. Obtain the entity to be disambiguated in the target text and the association attribute information between the entity to be disambiguated and the associated entity.

[0080] It can be understood that the knowledge base is a structured semantic database, and the basic component unit of the knowledge base is an SPO triple. The SPO triple stores data in the form of subject-predicate-object, including a subject (S), a predicate (P), and an object (O), wherein the subject (S) and the object (O) correspond to different entities, and the predicate (P) represents a correlation relationship between the entity S and the entity O. Therefore, in some definitions, the SPO triple can also be defined as “entity (S) — correlation attribute — entity (O)”. For example, in an example, a target text corresponding to a certain SPO triple is “Xiaoming's wife is Xiaohong”, and the structured data corresponding thereto is “Xiaoming — wife — Xiaohong”.

[0081] It should be noted that in the field of knowledge base, the subject, the predicate, and the object should be understood in a broad sense, and are not limited to the subject-predicate-object structure in the grammatical structure, but should be understood as a logical relationship between entities similar to the subject-predicate-object grammatical structure.

[0082] Still taking the target text “Xiaoming's wife is Xiaohong” as an example, in the embodiments of the present disclosure, a mention to be disambiguated needs to be given. For ease of understanding, the meaning of the mention appearing in the following definitions is defined as a mention to be disambiguated.

[0083] For example, in an example, “Xiaohong” is a mention of the target text. There are multiple entities with the same name as “Xiaohong” in the knowledge base, such as “basketball player Xiaohong”, “Xiaohong, an employee of company A in city A”, “Xiaohong, chairman of company B in city B”, and the like. Through the method of the embodiments of the present disclosure, the mention in the target text is uniquely and accurately pointed to “basketball player Xiaohong”.

[0084] After determining that “Xiaohong” in the target text “Xiaoming's wife is Xiaohong” is a mention, the entity “Xiaoming” is an associated entity associated with the mention, and the correlation attribute between the two is “wife”.

[0085] In addition, in the embodiments of the present disclosure, it is considered that the description text of an entity in the knowledge base is usually long, and various attribute contents of the entity contribute differently to the information of the entity. Therefore, in the embodiments of the present disclosure, a key attribute word table of the entity is predefined, and the key attribute word table includes multiple key attributes.

[0086] In one example, taking the entity as a human being, the key attribute corresponding to the entity can include multiple sub-attributes such as gender, age, birthplace, representative work, social relationship, etc., wherein each sub-attribute corresponds to a corresponding value, for example, "gender - male / female", "age - X years old", "representative work - XXX", etc.

[0087] Therefore, for the example of "Xiaoming's wife is Xiaohong" described above, "wife" is one of the sub-attributes of the key attributes of Xiaoming and Xiaohong, indicating the association between the two.

[0088] It can be understood that in S110, for the target text, the mention of the target text, the associated entity associated with the mention, and the association attribute information between the two can be obtained.

[0089] S120, based on the key attribute information of the entity and the association attribute information, constructing a text description corresponding to each candidate entity of the entity to be disambiguated.

[0090] It can be understood that after determining the mention of the target text, a plurality of candidate entities can be determined from the knowledge base. For example, in the foregoing example, the mention of the target text is "Xiaohong", so a plurality of entities with the same name "Xiaohong" can be determined from the knowledge base, which are candidate entities of the mention.

[0091] In addition, based on the foregoing knowledge, for each entity in the knowledge base, it includes a plurality of key attributes, and each key attribute includes corresponding key attribute information. For example, for one of the candidate entities "Xiaohong", the corresponding key attribute information can be as shown in Table 1:

[0092] Table 1:

[0093]

[0094] Therefore, for the candidate entity, each key attribute information of the candidate entity can be obtained.

[0095] It is worth noting that according to the key attribute information of the candidate entity, a first text corresponding to the candidate entity can be constructed, for example, in the above example, the first text of the candidate entity "Xiaohong" can be obtained, for example, "female, born on November 20, 1981, Xiaoming's wife, entered in 1996...".

[0096] However, in this embodiment, the text description of the candidate entity is not constructed solely based on its key attribute information, but also incorporates the association attribute information between the entity to be disambiguated (mention) and the associated entity. That is, combining the association attribute information "wife" between the entity to be disambiguated "Xiaohong" and the associated entity "Xiaoming" in the aforementioned example, the association attribute information "wife" can be appended to the beginning of the first text of the candidate entity "Xiaohong," separated by a delimiter, to form the complete text description of the candidate entity together with the aforementioned first text.

[0097] In some implementations, when constructing the text description corresponding to a candidate entity, a first text can be constructed based on the key attribute information of the candidate entity. The first text, the target text, and the associated attribute information are then combined to construct the text description corresponding to the candidate entity. The following implementations will provide a detailed description, which will not be elaborated upon here.

[0098] S130. Determine the target entity from the candidate entities based on the text description.

[0099] Specifically, in S120, the description text corresponding to each candidate entity can be determined, thereby determining the target entity that the entity to be disambiguated points to based on each description text.

[0100] In some implementations, each text description can be input into a pre-trained entity disambiguation network to obtain the probability corresponding to each text description output by the entity disambiguation network. This probability represents the similarity between the candidate entity corresponding to the text description and the entity to be disambiguated; a higher probability indicates greater similarity, thus the target entity with the highest similarity can be determined based on probability ranking. The following implementations of this disclosure provide a detailed description, which will not be elaborated upon here.

[0101] As can be seen from the above, in the embodiments of this disclosure, when performing entity disambiguation, not only is the key attribute information of the entity considered, but also the association attribute information between the entity to be tested and the associated entities is combined. The association attribute information is used to better assist entity disambiguation, thereby improving the accuracy of entity disambiguation.

[0102] In this embodiment of the disclosure, as mentioned above, the basic building block of the knowledge base is the SPO triple, and the text corresponding to the SPO triple is defined as SPO triple text. That is, the target entity described in this embodiment of the disclosure is SPO triple text. The SPO triple text includes entity S, entity O, and the association attribute information P between the two.

[0103] like Figure 2 As shown, in some embodiments, the process of obtaining the entity to be disambiguated and its associated attribute information in the entity disambiguation method of this disclosure includes:

[0104] S210, acquire the entity to be disambiguated and the associated entity associated with the entity to be disambiguated in the SPO triple text.

[0105] S220, determine the association attribute information of the entity to be disambiguated and the associated entity according to the SPO triple text.

[0106] Specifically, still taking the SPO triple text "Xiaoming's wife is Xiaohong" as an example, the SPO triple text includes "entity S-Xiaoming", "entity O-Xiaohong", and "key attribute information P-wife".

[0107] As can be seen from the foregoing, the method of the embodiments of the present disclosure is to disambiguate the candidate entity given the mention, that is, in the embodiments of the present disclosure, the mention in the SPO triple text is predetermined. For example, in one example, the entity O "Xiaohong" is the mention of the SPO triple text, and thus the entity S "Xiaoming" is the associated entity of the mention, and "wife" in the SPO triple text is the association attribute information between the two.

[0108] As shown in some embodiments, the process of constructing a text description for each candidate entity in the entity disambiguation method of the examples of the present disclosure includes: Figure 3

[0109] S310, acquire the key attribute information of each candidate entity in the knowledge base.

[0110] Specifically, as described previously, each candidate entity has multiple key attribute information stored in the knowledge base, for example, as shown in Table 1, so that the key attribute information of each candidate entity can be acquired.

[0111] It is worth noting that for a certain candidate entity, there are multiple key attribute information, but each key attribute information has different information contribution to the candidate entity, for example, the key attributes such as "gender", "age", "occupation", "work", and "social relationship" have high information contribution to the entity, while the key attributes such as "educational experience" have relatively low information contribution to the entity.

[0112] Therefore, in some embodiments of the present disclosure, the key attribute information of each candidate entity in the knowledge base can be determined according to the information of each candidate entity in the knowledge base under the key attribute of the preset category. It can be understood that the key attribute of the preset category can be the key attribute of several categories with high information contribution to the entity, so as to reduce the amount of data and improve the efficiency of disambiguation processing. Two methods of extracting the key attribute of the candidate entity are given in the following description of the present disclosure:

[0113] 1) word table matching. ​

[0114] The key attribute table with high contribution to entity information can be constructed in advance, and the table includes multiple key attributes, so that the key attribute information of the candidate entity corresponding to the key attributes can be extracted from the knowledge base.

[0115] 2) mention matching.

[0116] The key attribute information of the candidate entity can be retrieved based on the to-be-disambiguated entity mention, and if the to-be-disambiguated entity mention appears in the key attribute information, the key attribute information is retained.

[0117] The above describes the process of obtaining the key attribute information of one of the candidate entities, and for multiple candidate entities, the above process is repeated in sequence, so that the key attribute information corresponding to each candidate entity can be obtained.

[0118] As known from the above, in some embodiments of the present disclosure, by screening the key attribute information of the candidate entity, the data amount of the text description constructed subsequently can be reduced on the basis of ensuring high accuracy, and the efficiency of entity disambiguation can be improved.

[0119] S320, constructing a first text corresponding to the candidate entity according to the key attribute information.

[0120] In one example, still taking the to-be-disambiguated entity mention “Xiaohong” as an example for description.

[0121] The key attributes of one of the candidate entities “Xiaohong” in the knowledge base and the key attribute information corresponding to each key attribute are shown in Table 1, so that the key attribute information of the preset category can be obtained based on the process of S310, and the first text of the candidate entity can be constructed according to the obtained key attribute information.

[0122] For example, according to each key attribute information in Table 1, the first text corresponding to the candidate entity “Xiaohong” is constructed as “female, born on November 20, 1981, wife of Xiaoming, entered in 1996…”.

[0123] S330, constructing a text description corresponding to the candidate entity according to the first text, the target text and the association attribute information.

[0124] Specifically, as known from the above, in the embodiments of the present disclosure, the above first text is not directly used as the text description of the candidate entity, and the association attribute information between the mention and the associated entity is combined.

[0125] Still taking the foregoing as an example, the first text of the candidate entity corresponding to the above table one obtained in S320 is "female, born on November 20, 1981, wife of Xiaoming, entered in 1996…"; the target text is "Xiaoming's wife is Xiaohong"; and the association attribute information of the mention "Xiaohong" and the associated entity "Xiaoming" is "wife".

[0126] Thus, the above first text, target text and association attribute information can be constructed into a text description of the candidate entity, which can be separated by a special separator [SEP]. For example, in this example, the obtained text description is:

[0127] "Wife [SEP] Xiaoming's wife is Xiaohong [SEP] Xiaohong is female, born on November 20, 1981, Xiaoming's wife, entered in 1996…".

[0128] The above describes the process of constructing a text description for one of the candidate entities. Those skilled in the art can understand that, for multiple candidate entities in the knowledge base, the above process is sequentially performed, and thus the text description corresponding to each candidate entity can be obtained.

[0129] As can be seen from the above, in the embodiments of the present disclosure, when constructing the text description of the candidate entity, not only the key attribute information of the entity is focused on, but also the association attribute information between the to-be-tested entity and the associated entity is combined, which facilitates subsequent utilization of the association attribute information to better assist entity disambiguation, thereby improving the accuracy of entity disambiguation.

[0130] After determining the text description corresponding to each candidate entity, the text description can be taken as the input of the entity disambiguation network, the similarity between the candidate entity and the mention is preset as the output of the entity disambiguation network, and then the candidate entity with the highest similarity is determined as the target entity according to the similarity corresponding to each candidate entity.

[0131] In the related art, in the field of NLP (Natural Language Processing), the entity disambiguation network used for entity linking tasks generally adopts BERT, ALBERT or ERNIE network based on transformer architecture.

[0132] It is worth noting that, in some embodiments of the present disclosure, in order to improve the recognition accuracy of the entity disambiguation network, the entity disambiguation network in the prior art is improved, and the position information of the mention is fused, so that the network can better utilize the text context semantic information and improve the network accuracy.

[0133] Specifically, Figure 4 FIG. 1 shows the network structure of the entity disambiguation network in some embodiments of the present disclosure, and in the network structure,Figure 4 In an example, the entity disambiguation network is based on a BERT architecture, and the following describes the entity disambiguation network in combination with Figure 4 The network structure is described in detail in the example of the present disclosure.

[0134] As shown in Figure 4 , the entity disambiguation network of the example of the present disclosure can mainly include four modules: a vector extraction module 410, a BERT processing module 420, a fully connected layer 430, and a ranking output module 440. Among them, the BERT processing module 420 includes multiple processing sub-modules, and the structure of each processing sub-module is as shown in Figure 5 .

[0135] As shown in Figure 5 , the processing sub-module sequentially includes a self-attention layer 421, a mention attention layer 422, a text encoding layer 423, and a feedforward neural network layer 424, and normalization and residual connection can be used between each network layer. Among them, the mention attention layer 422 is a newly added sub-layer in the embodiment of the present disclosure, which can extract the position information of the mention through the attention mechanism, so that the network focuses more on the context semantic information of the mention position in the text, and thus the purpose of improving the accuracy of the network output is achieved.

[0136] Based on the entity disambiguation network structure of Figure 4 and Figure 5 , the following describes the entity disambiguation method of the embodiment of the present disclosure.

[0137] As shown in Figure 6 , in some embodiments, in the entity disambiguation method of the example of the present disclosure, the process of determining the target entity according to the text description includes:

[0138] S610, extracting text information of the text description and position information of the entity to be disambiguated in the text description.

[0139] S620, determining the similarity between the candidate entity corresponding to the text description and the entity to be disambiguated according to the text information and the position information.

[0140] S630, determining the target entity from the candidate entity according to the similarity corresponding to each text description.

[0141] In the embodiment of the present disclosure, when constructing the text description of the candidate entity, the mention position in the text description can be specially marked.

[0142] For example Figure 4In the example, the target text is "Liu Moumou's wife is Zhu Moumou," where "Zhu Moumou" is the entity to be disambiguated (mention), and the first text corresponding to a candidate entity in the knowledge base is "Zhu Moumou was born in...". Therefore, based on the aforementioned... Figure 3 The implementation method can construct the text description corresponding to the candidate entity as follows:

[0143] "[CLS] wife [SEP] Liu's wife is / Zhu / [SEP] Zhu was born in..."

[0144] The position of the entity to be disambiguated, mention, is indicated by a special symbol “ / ”.

[0145] After obtaining the text descriptions corresponding to the candidate entities, the vector extraction module 410 can extract the text information and position information of the text descriptions. Specifically, the vector extraction module 410 can extract the word embeddings, sentence embeddings, and position embeddings of the text descriptions. Finally, the input to the BERT processing module is the sum of the word embeddings, sentence embeddings, and position embeddings.

[0146] The BERT processing module 420 extracts and fuses the position information of the entity to be disambiguated based on the input vector containing text information and position information, using the newly added mention attention layer 424, thereby fully integrating the contextual semantics of the mention position in the text.

[0147] The fully connected layer 430 primarily refines downstream tasks for different task types, for example in... Figure 4 In the example, the fully connected layer 430 can perform text classification based on the output of the BERT processing module 420 and output the predicted probability. This predicted probability can be understood as representing the similarity between the candidate entity corresponding to the text description and the entity to be disambiguated; a higher predicted probability indicates a higher similarity between the candidate entity and the mention, and vice versa.

[0148] The above describes the processing procedure for one candidate entity. For multiple candidate entities, the entity disambiguation network sequentially outputs the similarity scores of each candidate entity through the fully connected layer 430. The sorting output module 440 then sorts the candidates according to their similarity scores from high to low, identifies the candidate entity with the highest similarity score as the target entity, and outputs it.

[0149] As can be seen from the above, in this embodiment of the disclosure, by fusing the location information of the entity to be disambiguated, the network can focus more on the contextual semantic information of the mention position in the text, thereby improving the accuracy of the network prediction.

[0150] In some embodiments, the entity disambiguation method of the present disclosure further includes a process of network training of the above-mentioned entity disambiguation network, which will be described below in combination with Figure 7 .

[0151] As shown in Figure 7 , in some embodiments, the training process of the entity disambiguation network in the entity disambiguation method of the present disclosure includes:

[0152] S710, obtaining a text sample set.

[0153] Specifically, the text sample set includes a plurality of text samples, each of which includes a text description and label information corresponding to the text description, the label information representing a true value corresponding to the text sample.

[0154] In some embodiments, the text sample data can be obtained from a knowledge base, which stores some high-quality rules or manually annotated data. After data cleaning and processing, the text sample set can be as shown in Table 2 below

[0155] Table 2:

[0156]

[0157] After data cleaning and processing, the text description of each text sample can be constructed by using the process of the foregoing embodiments, which will not be described herein.

[0158] S720, inputting the text sample set into the untrained entity disambiguation network to obtain an output result output by the entity disambiguation network.

[0159] The network structure of the entity disambiguation network can refer to the foregoing Figure 4 and Figure 5 , the text sample set is input into the entity disambiguation network to be trained, and the entity disambiguation network outputs an output result corresponding to each text sample after processing each text sample.

[0160] S730, adjusting the network parameters of the entity disambiguation network according to the difference between the output result and the label information until a convergence condition is met.

[0161] The output result represents the similarity between the candidate entity predicted by the entity disambiguation network to be trained and the mention, and the label information represents the true value of the candidate entity, so that the difference between the output result and the label information, that is, the loss, can be obtained. Then, the network parameters of the entity disambiguation network are adjusted according to the difference, and the iteration is repeated until the network convergence condition is met. The convergence condition can be set according to specific requirements, for example, the difference between the output result and the label information meets the training requirements, that is, the convergence condition is met, the network training is stopped, and the trained entity disambiguation network is obtained.

[0162] In the related art, common evaluation indexes for measuring the entity disambiguation task include precision, recall, and f1 indexes. In some embodiments of the present disclosure, the precision score of the entity disambiguation network of the present disclosure is 0.92, the recall score is 0.90, and the f1 score is 0.91 on a test set of 20,000. It can be seen that the scores of the entity disambiguation network of the embodiments of the present disclosure are relatively high, which meets the expectations. Moreover, through random extraction of part of the data for further manual evaluation, it is found that the output effect of the entity disambiguation network of the embodiments of the present disclosure on 3,500 text samples is an accuracy of 0.95, which meets the storage standard.

[0163] It can be understood that in the above embodiments, the entity disambiguation network is based on the BERT network structure, and in other embodiments, the entity disambiguation network can also be any other suitable network structure, such as ALBERT or ERNIE, and the present disclosure does not limit this.

[0164] As can be seen from the above, in the embodiments of the present disclosure, the entity disambiguation network fuses the position information of the entity to be disambiguated, so that the network focuses more on the context semantic information of the mention position in the text, and improves the accuracy of the network prediction.

[0165] In a second aspect, the embodiments of the present disclosure provide an entity linking method. In some embodiments, the entity linking method of the examples of the present disclosure includes:

[0166] Linking the entity to be disambiguated in the target text to the target entity.

[0167] Specifically, as described in any of the embodiments of the first aspect, the obtained target entity represents an entity in the candidate entities of the knowledge base that is the same entity as the mention of the target text, so that the entity to be disambiguated is linked to the target entity, and the entity linking of the entity to be disambiguated is realized.

[0168] As can be known from the above, in the embodiment of the present disclosure, when performing entity disambiguation, not only the key attribute information of the entity is focused on, but also the associated attribute information between the to-be-tested entity and the associated entity is combined, and the associated attribute information is used to better assist the entity disambiguation, so as to improve the accuracy of the entity disambiguation. By fusing the position information of the to-be-disambiguated entity, the network is more focused on the context semantic information of the mention position in the text, and the accuracy of the network prediction is improved.

[0169] In a third aspect, the present disclosure provides an entity disambiguation apparatus. As shown in Figure 8 In some embodiments, the entity disambiguation apparatus of the present disclosure comprises:

[0170] The acquisition module 810 is configured to acquire a to-be-disambiguated entity in a target text and associated attribute information of the to-be-disambiguated entity and an associated entity, the associated attribute being a sub-attribute of the key attribute of the entity;

[0171] The text construction module 820 is configured to construct a text description corresponding to each candidate entity of the to-be-disambiguated entity based on the key attribute information of the entity and the associated attribute information.

[0172] The determination module 830 is configured to determine a target entity from the candidate entities according to the text description.

[0173] As can be known from the above, in the embodiment of the present disclosure, when performing entity disambiguation, not only the key attribute information of the entity is focused on, but also the associated attribute information between the to-be-tested entity and the associated entity is combined, and the associated attribute information is used to better assist the entity disambiguation, so as to improve the accuracy of the entity disambiguation.

[0174] In some embodiments, the target text comprises an SPO triple text, and the acquisition module 810 is specifically configured to:

[0175] Acquire a to-be-disambiguated entity in the SPO triple text and an associated entity associated with the to-be-disambiguated entity;

[0176] According to the SPO triple text, determine the associated attribute information of the to-be-disambiguated entity and the associated entity.

[0177] In some embodiments, the text construction module 820 is specifically configured to:

[0178] Acquire the key attribute information of each candidate entity in the knowledge base;

[0179] Construct a first text corresponding to the candidate entity according to the key attribute information;

[0180] Construct a text description corresponding to the candidate entity according to the first text, the target text, and the associated attribute information.

[0181] In some embodiments, the text construction module 820 is specifically configured to:

[0182] According to the information of each candidate entity in the knowledge base under the key attribute of the preset category, the key attribute information of the candidate entity is determined.

[0183] From the above, in some embodiments of the present disclosure, by screening the key attribute information of the candidate entity, the data amount of the subsequently constructed text description can be reduced on the basis of ensuring high accuracy, and the efficiency of entity disambiguation is improved.

[0184] In some embodiments, the determination module 830 is specifically configured to:

[0185] extracting text information of the text description and position information of the entity to be disambiguated in the text description;

[0186] determining the similarity between the candidate entity corresponding to the text description and the entity to be disambiguated according to the text information and the position information;

[0187] determining the target entity from the candidate entity according to the similarity corresponding to each text description.

[0188] In some embodiments, the determination module 830 is specifically configured to:

[0189] inputting each text description into a pre-trained entity disambiguation network, and the entity disambiguation network extracting text information of the text description and position information of the entity to be disambiguated in the text description;

[0190] the entity disambiguation network determining the similarity between the candidate entity corresponding to the text description and the entity to be disambiguated according to the text information and the position information;

[0191] the entity disambiguation network determining the target entity from the candidate entity according to the similarity corresponding to each text description.

[0192] In some embodiments, the entity disambiguation apparatus of the present disclosure further comprises a training module, and the training module is configured to:

[0193] obtaining a text sample set, each text sample in the text sample set comprising a text description and label information corresponding to the text description;

[0194] inputting the text sample set into an untrained entity disambiguation network to obtain an output result output by the entity disambiguation network;

[0195] adjusting network parameters of the entity disambiguation network according to the difference between the output result and the label information until a convergence condition is met.

[0196] In a fourth aspect, an entity linking apparatus is provided in an embodiment of the present disclosure, comprising:

[0197] The entity linking module is configured to link the entity to be disambiguated in the target text with the target entity; wherein the target entity is obtained according to the entity disambiguation method of any embodiment of the first aspect.

[0198] Fifthly, embodiments of this disclosure provide an electronic device, including:

[0199] processor; and

[0200] The memory stores computer instructions that can be read by a processor, which, when the computer instructions are read, executes the method according to either the first aspect or the second aspect.

[0201] In a sixth aspect, embodiments of this disclosure provide a storage medium for storing computer-readable instructions for causing a computer to perform a method according to any one of the first and second aspects.

[0202] Specifically, Figure 9 A schematic diagram of the structure of a computer system 600 suitable for implementing the methods of this disclosure is shown. Figure 9 The system shown can implement the corresponding functions of the aforementioned processor and storage medium.

[0203] like Figure 9 As shown, the computer system 600 includes a processor 601, which can perform various appropriate actions and processes according to a program stored in memory 602 or a program loaded into memory 602 from storage section 608. Memory 602 also stores various programs and data required for the operation of system 600. Processor 601 and memory 602 are connected to each other via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.

[0204] The following components are connected to I / O interface 605: an input section 606 including a keyboard, mouse, etc.; an output section 607 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to I / O interface 605 as needed. A removable medium 611, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 610 as needed so that computer programs read from it can be installed into storage section 608 as needed.

[0205] In particular, according to an embodiment of the present disclosure, the above method procedure can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program containing program code for executing the above method. In such an embodiment, the computer program can be downloaded and installed from a network by the communication section 609, and / or installed from the removable medium 611.

[0206] The flow and block diagrams in the drawings represent possible architectural, functional, and operational architectures of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block can represent a module, a segment, or a portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or in the reverse order, depending on the functionality involved. It will also be noted that each block of the block diagrams and / or flowchart illustrations, and combinations thereof, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or combinations of hardware and software.

[0207] It is apparent that the above-described embodiments are only examples for clearly and completely describing the present disclosure and are not intended to limit the embodiments. Based on the above description, those skilled in the art can make modifications or changes to the embodiments in various forms. Here, it is not necessary or possible to exhaust all the embodiments. The obvious changes or modifications derived from the present disclosure are still within the scope of the present disclosure.

Claims

1. An entity disambiguation method, characterized by, The method comprises the following steps: obtaining a disambiguation entity in a target text and association attribute information of the disambiguation entity and an associated entity, the association attribute being a sub-attribute of a key attribute of the entity; based on the key attribute information of the entity and the association attribute information, constructing a text description corresponding to each candidate entity of the disambiguation entity; determining a target entity from the candidate entities according to the text description; the step of constructing the text description corresponding to each candidate entity of the disambiguation entity based on the key attribute information of the entity and the association attribute information comprises: obtaining the key attribute information of each candidate entity in a knowledge base; constructing a first text corresponding to the candidate entity according to the key attribute information; constructing the text description corresponding to the candidate entity according to the first text, the target text and the association attribute information.

2. The method of claim 1, wherein, The target text comprises SPO triple text; the step of obtaining the disambiguation entity in the target text and the association attribute information of the disambiguation entity and the associated entity comprises: obtaining a disambiguation entity in a target text and association attribute information of the disambiguation entity and an associated entity in the SPO triple text; determining the association attribute information of the disambiguation entity and the associated entity according to the SPO triple text.

3. The method of claim 1, wherein, The step of obtaining the key attribute information of each candidate entity in the knowledge base comprises: determining the key attribute information of the candidate entity according to the information of each candidate entity in the knowledge base under the key attribute of the preset category.

4. The method according to any one of claims 1 to 3, characterized in that, The step of determining a target entity from the candidate entities according to the text description comprises: extracting text information of the text description and position information of the disambiguation entity in the text description; determining the similarity of the candidate entity corresponding to the text description and the disambiguation entity according to the text information and the position information; determining the target entity from the candidate entities according to the similarity of each text description.

5. The method of claim 4, wherein, The step of determining a target entity from the candidate entities according to the text description comprises: inputting each text description into a pre-trained entity disambiguation network, the entity disambiguation network extracting text information of the text description and position information of the disambiguation entity in the text description; the entity disambiguation network determining the similarity of the candidate entity corresponding to the text description and the disambiguation entity according to the text information and the position information; the entity disambiguation network determining the target entity from the candidate entities according to the similarity of each text description.

6. The method of claim 5, wherein, The process of training the entity disambiguation network comprises the following steps: obtaining a text sample set; each text sample in the text sample set comprises a text description and label information corresponding to the text description; inputting the text sample set into an untrained entity disambiguation network to obtain an output result output by the entity disambiguation network; adjusting the network parameters of the entity disambiguation network according to the difference between the output result and the label information until the convergence condition is met.

7. An entity linking method, characterized by, The method comprises the following steps: performing entity linking on a disambiguation entity in a target text and a target entity. The target entity is obtained according to the entity disambiguation method in any one of claims 1 to 6.

8. An entity disambiguation apparatus characterized by, Comprise: An acquisition module configured to acquire a disambiguation entity in a target text and association attribute information of the disambiguation entity and an associated entity, the association attribute being a sub-attribute of a key attribute of an entity; A text construction module configured to construct a text description corresponding to each candidate entity of the disambiguation entity based on the key attribute information of the entity and the association attribute information; A determination module configured to determine a target entity from the candidate entities according to the text description; The text construction module is specifically configured to: Acquire the key attribute information of each candidate entity in a knowledge base; Construct a first text corresponding to the candidate entity according to the key attribute information; Construct the text description corresponding to the candidate entity according to the first text, the target text and the association attribute information.

9. The apparatus of claim 8, wherein, The target text comprises an SPO triple text, and the acquisition module is specifically configured to: Acquire a disambiguation entity in the SPO triple text and an associated entity associated with the disambiguation entity; Determine association attribute information of the disambiguation entity and the associated entity according to the SPO triple text.

10. The apparatus of claim 8, wherein, The text construction module is specifically configured to: Determine the key attribute information of the candidate entity according to the information of each candidate entity in a preset category in the knowledge base.

11. The apparatus of any one of claims 8 to 10, wherein, The determination module is specifically configured to: Extract text information of the text description and position information of the disambiguation entity in the text description; Determine the similarity between the candidate entity corresponding to the text description and the disambiguation entity according to the text information and the position information; Determine the target entity from the candidate entities according to the similarity of each text description.

12. The apparatus of claim 11, wherein, The determination module is specifically configured to: Input each text description into a pre-trained entity disambiguation network, and the entity disambiguation network extracts text information of the text description and position information of the disambiguation entity in the text description; The entity disambiguation network determines the similarity between the candidate entity corresponding to the text description and the disambiguation entity according to the text information and the position information; The entity disambiguation network determines the target entity from the candidate entities according to the similarity of each text description.

13. The apparatus of claim 12, wherein, Further comprising a training module, the training module is configured to: Acquire a text sample set; each text sample in the text sample set comprises a text description and label information corresponding to the text description; Input the text sample set into an untrained entity disambiguation network to obtain an output result output by the entity disambiguation network; Adjust the network parameters of the entity disambiguation network according to the difference between the output result and the label information until the convergence condition is met.

14. An entity linking apparatus characterized by comprising: Comprise: An entity linking module configured to link a disambiguation entity in a target text with a target entity; The target entity is obtained according to the entity disambiguation method in any one of claims 1 to 6.

15. An electronic device, comprising: Comprise: A processor; And a memory storing computer instructions readable by the processor, which, when read, cause the processor to perform the method according to any one of claims 1 to 6, or to perform the method according to claim 7.

16. A storage medium, characterized by a computer program product for storing computer readable instructions for causing a computer to perform the method according to any one of claims 1 to 6, or to perform the method according to claim 7.

Citation Information

Patent Citations

  • Knowledge graph construction method and device based on UCL semantic indexing

    CN111428047A