Entity linking method, device and readable storage medium

By generating and linking candidate entity sets for entity titles, the problem of high cost of existing entity linking methods is solved, an efficient entity linking process is realized, and the dependence on labeled data and manual description is reduced.

CN113723605BActive Publication Date: 2025-02-14RICOH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010457160.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-05-26
Publication Date
2025-02-14
Estimated Expiration
2040-05-26

AI Technical Summary

Technical Problem

Existing entity linking methods are costly, requiring a large amount of labeled data or manually specified rules, or relying on text descriptions as entity background information in the knowledge base.

Method used

By obtaining the entity title in the input statement, a candidate entity set is generated and the entity title is linked to the target candidate entity in the candidate entity set. This method does not require text descriptions of entities, nor does it require a large amount of manual descriptions. It uses word vector representation and mapping models to obtain similar entities and related entities from the knowledge base.

Benefits of technology

Reduces the cost of entity linking, implements an efficient entity linking process, and avoids dependence on large amounts of labeled data and manual descriptions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113723605B_ABST
    Figure CN113723605B_ABST
Patent Text Reader

Abstract

The present invention discloses an entity linking method, device and readable storage medium, which relate to the technical field of entity linking, and reduce the cost of entity linking. The method comprises: obtaining an input sentence, wherein the input sentence includes an entity title; generating a candidate entity set of the entity title; and linking the entity title to a target candidate entity in the candidate entity set. The embodiment of the present invention can reduce the cost of entity linking.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of entity linking technology, and in particular to an entity linking method, device and readable storage medium. Background Art

[0002] Entity linking is a basic technology for applications in the field of artificial intelligence. With the help of entity linking, related applications that use natural language as input can obtain additional background information from structured knowledge bases. As a basic technology, entity linking can be used in different application scenarios such as dialogue systems and recommendation systems.

[0003] There are two main types of existing entity linking methods: one type of method requires a large amount of annotated data or manually specified rules, and the other type of method requires text descriptions as entity background information in the knowledge base. However, these two types of methods are costly in actual entity linking. Summary of the invention

[0004] Embodiments of the present invention provide an entity linking method, an apparatus, and a readable storage medium to reduce the cost of entity linking.

[0005] In a first aspect, an embodiment of the present invention provides an entity linking method, comprising:

[0006] Obtaining an input sentence, wherein the input sentence includes an entity title;

[0007] Generating a candidate entity set of the entity title;

[0008] The entity title is linked to a target candidate entity in the candidate entity set.

[0009] The step of generating a candidate entity set of the entity title includes:

[0010] Obtaining context-related entity names of the entity name in the input sentence;

[0011] Acquire a first similar entity to the entity name from a knowledge base;

[0012] Acquire a second similar entity to the context-related entity title from the knowledge base;

[0013] The candidate entity set is formed by using related entities of the first similar entity and the second similar entity.

[0014] The step of acquiring the first similar entity of the entity title from the knowledge base includes:

[0015] Generate a word vector representation of the entity title;

[0016] Mapping the word vector representation into an entity representation vector through a mapping model;

[0017] Calculating the similarity between the entity representation vector and the entity representation vector in the knowledge base;

[0018] An entity corresponding to a first target entity representation vector in the knowledge base is used as the first similar entity, and a similarity between the first target entity representation vector and the entity representation vector meets a first preset requirement.

[0019] The step of acquiring the second similar entity of the context-related entity title from the knowledge base includes:

[0020] Generating a word vector representation of the context-related entity title;

[0021] Mapping the word vector representation into an entity representation vector through a mapping model;

[0022] Calculating the similarity between the entity representation vector and the entity representation vector in the knowledge base;

[0023] The entity corresponding to the second target entity representation vector in the knowledge base is used as the second similar entity, and the similarity between the second target entity representation vector and the entity representation vector meets a second preset requirement.

[0024] Wherein, the method further comprises:

[0025] The mapping model is generated.

[0026] Wherein, generating the mapping model includes:

[0027] Get training word vector representations from a text corpus;

[0028] Obtain training entity representation vectors from the knowledge base;

[0029] The neural network model is trained using the training word vector representation and the training entity representation vector to obtain the mapping model.

[0030] The training entity representation vector is obtained by the following objective function:

[0031]

[0032] Among them, L represents the value of the objective function, α (h,r,t) represents the weight of the relationship between entity h and entity t, r represents the representation vector of the relationship between entity h and entity t, t′ represents an entity randomly selected from the knowledge base, and S represents a set of different entities in the knowledge base and the relationships between entities.

[0033] The linking of the entity title to a target candidate entity in the candidate entity set includes:

[0034] Parsing the input sentence to obtain entity relationships in the input sentence;

[0035] Mapping the entity relationships in the input sentence to the entity relationships in the knowledge base;

[0036] Calculating a relational authenticity value of a target combination, wherein the target combination is a combination formed by candidate entities in the candidate entity set, context-related entity names of the entity names in the input sentence, and entity relationships in the knowledge base;

[0037] The first candidate entity in the target combination with the smallest relationship authenticity value is used as the target candidate entity;

[0038] The entity title is linked to the target candidate entity.

[0039] In a second aspect, an embodiment of the present invention provides a physical linking device, including:

[0040] A first acquisition module is used to acquire an input sentence, wherein the input sentence includes an entity title;

[0041] A first generating module, used to generate a candidate entity set of the entity title;

[0042] The first linking module is used to link the entity title to a target candidate entity in the candidate entity set.

[0043] Wherein, the first generation module includes:

[0044] A first acquisition submodule, used to acquire context-related entity names of the entity name in the input sentence;

[0045] A second acquisition submodule is used to acquire a first similar entity of the entity title from a knowledge base;

[0046] A third acquisition submodule is used to acquire a second similar entity of the context-related entity title from the knowledge base;

[0047] The first generating submodule is used to form the candidate entity set by using related entities of the first similar entity and the second similar entity.

[0048] Wherein, the second acquisition submodule includes:

[0049] A first generating unit, used to generate a word vector representation of the entity title;

[0050] A first mapping unit, configured to map the word vector representation into an entity representation vector through a mapping model;

[0051] A first calculation unit, used to calculate the similarity between the entity representation vector and the entity representation vector in the knowledge base;

[0052] A first acquisition unit is used to take an entity corresponding to a first target entity representation vector in the knowledge base as the first similar entity, and the similarity between the first target entity representation vector and the entity representation vector meets a first preset requirement.

[0053] Wherein, the third acquisition submodule includes:

[0054] A second generating unit, used to generate a word vector representation of the context-related entity title;

[0055] A second mapping unit, configured to map the word vector representation into an entity representation vector through a mapping model;

[0056] A second calculation unit, used to calculate the similarity between the entity representation vector and the entity representation vector in the knowledge base;

[0057] The second acquisition unit is used to take the entity corresponding to the second target entity representation vector in the knowledge base as the second similar entity, and the similarity between the second target entity representation vector and the entity representation vector meets a second preset requirement.

[0058] Wherein, the device further comprises:

[0059] The second generating module is used to generate the mapping model.

[0060] Wherein, the second generation module includes:

[0061] The first acquisition submodule is used to obtain training word vector representations from a text corpus;

[0062] The second acquisition submodule is used to acquire the training entity representation vector from the knowledge base;

[0063] The first generating submodule is used to train a neural network model using the training word vector representation and the training entity representation vector to obtain the mapping model.

[0064] The training entity representation vector is obtained by the following objective function:

[0065]

[0066] Among them, L represents the value of the objective function, α (h,r,t)represents the weight of the relationship between entity h and entity t, r represents the representation vector of the relationship between entity h and entity t, t′ represents an entity randomly selected from the knowledge base, and S represents a set of different entities in the knowledge base and the relationships between entities.

[0067] Wherein, the first link module includes:

[0068] A parsing submodule, used for parsing the input sentence to obtain the entity relationship in the input sentence;

[0069] A mapping submodule, used for mapping the entity relationship in the input sentence to the entity relationship in the knowledge base;

[0070] A calculation submodule, configured to calculate a relational authenticity value of a target combination, wherein the target combination is a combination of candidate entities in the candidate entity set, context-related entity names of the entity names in the input sentence, and entity relationships in the knowledge base;

[0071] A selection submodule, used to select the first candidate entity in the target combination with the smallest relationship authenticity value as the target candidate entity;

[0072] A linking submodule is used to link the entity title to the target candidate entity.

[0073] In a third aspect, an embodiment of the present invention further provides a readable storage medium, on which a program is stored, and when the program is executed by a processor, the steps in the entity linking method as described above are implemented.

[0074] In a fourth aspect, an embodiment of the present invention further provides a physical linking device, including:

[0075] Processor; and

[0076] A memory, wherein program instructions are stored in the memory, wherein when the program instructions are executed by the processor, the processor is caused to perform the following steps:

[0077] Obtaining an input sentence, wherein the input sentence includes an entity title;

[0078] Generating a candidate entity set of the entity title;

[0079] The entity title is linked to a target candidate entity in the candidate entity set.

[0080] In the embodiment of the present invention, a candidate entity set of entity titles in the input sentence is generated, and then the entity title is linked to the target candidate entity in the candidate entity set. Using the solution of the embodiment of the present invention, neither a text description of the entity nor a large amount of manual description is required, so the cost of entity linking can be reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0081] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0082] Figure 1 It is one of the flow charts of the entity linking method provided by the embodiment of the present invention;

[0083] Figure 2 is a schematic diagram of a knowledge base provided by an embodiment of the present invention;

[0084] Figure 3 is a schematic diagram of a process of obtaining a first similar entity to the entity title from a knowledge base provided by an embodiment of the present invention;

[0085] Figure 4 is a schematic diagram of a process of obtaining a second similar entity of the context-related entity title from the knowledge base provided by an embodiment of the present invention;

[0086] Figure 5 is a schematic diagram of step 103 provided in an embodiment of the present invention;

[0087] Figure 6 This is the second flowchart of the entity linking method provided by the embodiment of the present invention;

[0088] Figure 7 is a schematic diagram of step 601 provided in an embodiment of the present invention;

[0089] Figure 8 It is a schematic diagram of the mapping relationship between word vectors and entity representation vectors provided by an embodiment of the present invention;

[0090] Fig. 9 It is a schematic diagram of the overall process of entity linking provided by an embodiment of the present invention;

[0091] FIG. 10( a ) is a schematic diagram of a process for generating a candidate entity set provided by an embodiment of the present invention;

[0092] FIG10( b ) is a schematic diagram of the entity linking process provided by an embodiment of the present invention;

[0093] Fig.11 It is one of the structural diagrams of the entity linking device provided by the embodiment of the present invention;

[0094] Fig.12 is a structural diagram of a first generation module provided in an embodiment of the present invention;

[0095] Fig.13 is a structural diagram of a second acquisition submodule provided in an embodiment of the present invention;

[0096] Fig.14 is a structural diagram of a third acquisition submodule provided in an embodiment of the present invention;

[0097] Fig.15 This is the second structural diagram of the entity linking device provided by the embodiment of the present invention;

[0098] Fig.16 is a structural diagram of a second generation module provided in an embodiment of the present invention;

[0099] Fig.17 is a structural diagram of a first link module provided by an embodiment of the present invention;

[0100] Fig.18 It is a hardware structure diagram of the entity linking device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0101] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0102] See also Figure 1 , Figure 1 is a flow chart of an entity linking method provided by an embodiment of the present invention, such as Figure 1 As shown, the following steps are included:

[0103] Step 101: Obtain an input sentence, wherein the input sentence includes an entity title.

[0104] The input sentence may be a sentence or a paragraph. The entity title in the input sentence may be obtained by using the entity title extraction method in the prior art, and the specific implementation method is not limited in the embodiment of the present invention. In the embodiment of the present invention, the entity title may be one or more entity titles included in the input sentence, and the principle of the process of linking each entity title to the accurate entity is the same.

[0105] For example, the input sentence is David is in England. In this sentence, the entity name can be David, England.

[0106] Step 102: Generate a candidate entity set of the entity title.

[0107] In this step, the context-related entity name of the entity name in the input sentence can be first obtained. The context-related entity refers to an entity name in the input sentence that appears in the context of the sentence where the entity name is located. For example, the input sentence is David, England. In this sentence, the entity name can be David, England. For the entity name "David", "England" can be used as its context-related entity name. Similarly, for the entity name "England", "David" can be used as its context-related entity name.

[0108] Then, a first similar entity to the entity title is obtained from the knowledge base, and a second similar entity to the context-related entity title is obtained from the knowledge base.

[0109] Finally, the candidate entity set is formed by using related entities of the first similar entity and the second similar entity.

[0110] Among them, the related entity of the second similar entity refers to an entity that can be associated with the second similar entity, or an entity that can be understood as having a certain correlation with the second similar entity. The related entity of the second similar entity can be pre-defined in the knowledge base. In practical applications, the correspondence between similar entities and related entities can be pre-set in the knowledge base. Therefore, after determining the second similar entity, its related entities can be obtained by searching the knowledge base. For example, if the second similar entity is David Beckham, then his related entity can be Victoria.

[0111] The knowledge base stores entities and relationships between entities. Figure 2 As shown in Figure 1, it is a schematic diagram of the knowledge base. Figure 2 In the illustrated knowledge base, entities such as "David Beckham", "London", "Manchester United" and the relationships between entities are exemplarily shown. For example, the relationship may be "born in", "plays for", etc.

[0112] Specifically, the principles of obtaining the first similar entity of the entity title from the knowledge base and obtaining the second similar entity of the context-related entity title from the knowledge base are the same.

[0113] Among them, Figure 3 As shown, the process of obtaining the first similar entity of the entity title from the knowledge base may include:

[0114] Step 301: Generate a word vector representation of the entity title.

[0115] In an embodiment of the present invention, the word vector representation of the entity title can be obtained through a language model such as BERT (Bidirectional Encoder Representations from Transformers).

[0116] Step 302: Map the word vector representation into an entity representation vector through a mapping model.

[0117] The mapping model is a mapping relationship between a word vector and an entity representation vector. Therefore, after the word vector representation is obtained in step 301, the word vector representation can be mapped into an entity representation vector according to the mapping relationship.

[0118] The mapping model may be pre-established or established during the implementation of the embodiment of the present invention.

[0119] Step 303: Calculate the similarity between the entity representation vector and the entity representation vector in the knowledge base.

[0120] In this step, the cosine similarity between the entity representation vector and each entity representation vector in the knowledge base can be calculated. The higher the cosine similarity, the more similar the two entity representation vectors are.

[0121] Step 304: The entity corresponding to the first target entity representation vector in the knowledge base is used as the first similar entity, and the similarity between the first target entity representation vector and the entity representation vector meets a first preset requirement.

[0122] The multiple similarities obtained in step 303 may be sorted in order from high to low or from low to high, and then, from the sorted similarities, a similarity that meets the first preset requirement is selected. Finally, the entity corresponding to the first target entity representation vector in the knowledge base corresponding to the selected similarity is used as the first similar entity.

[0123] The first preset requirement can be set as needed, for example, it can be the highest similarity, etc. Then, here, the entity corresponding to the first target entity representation vector in the knowledge base with the highest similarity is selected as the first similar entity.

[0124] Among them, Figure 4 As shown, the process of obtaining the second similar entity of the context-related entity title from the knowledge base may include:

[0125] Step 401: Generate a word vector representation of the context-related entity title.

[0126] Step 402: Map the word vector representation into an entity representation vector through a mapping model.

[0127] Step 403: Calculate the similarity between the entity representation vector and the entity representation vector in the knowledge base.

[0128] Step 404: The entity corresponding to the second target entity representation vector in the knowledge base is used as the second similar entity, and the similarity between the second target entity representation vector and the entity representation vector meets the second preset requirement.

[0129] The second preset requirement can be set as needed, for example, it can be the highest similarity, etc. Then, here, the entity corresponding to the second target entity representation vector in the knowledge base with the highest similarity is selected as the second similar entity.

[0130] The description of steps 401-404 may refer to the description of the aforementioned steps 301-304.

[0131] Step 103: Link the entity title to a target candidate entity in the candidate entity set.

[0132] Among them, Figure 5 As shown, this step may include the following process:

[0133] Step 501: parse the input sentence to obtain entity relationships in the input sentence.

[0134] Generally, verbs or adverbs can express the relationship between entities, such as born, worked for, etc. Therefore, the entity relationship mainly refers to the relationship between verbs or adverbs.

[0135] Step 502: Map the entity relationships in the input sentence to the entity relationships in the knowledge base.

[0136] Generally, verbs or adverbs and other relationships can be considered as text representations of the relationships between entities in the input sentence. Since the knowledge base stores the relationships between entities, the entity relationships in the input sentence can be mapped to the entity relationships in the knowledge base by calculating the similarity between the entity relationships in the input sentence and the entity relationships in the knowledge base. Through the mapping between entity relationships, the description of entity relationships can be unified, thereby facilitating subsequent linking to accurate candidate entities.

[0137] Step 503: Calculate the relationship authenticity value of the target combination, wherein the target combination is a combination formed by the candidate entities in the candidate entity set, the context-related entity names of the entity names in the input sentence, and the entity relationships in the knowledge base.

[0138] Since the candidate entity set may include multiple candidate entities, the entity name in the input sentence may also have multiple context-related entity names, and there may be multiple entity relationships after mapping in step 502. Therefore, in this step, the candidate entities, context-related entity names, and mapped entity relationships can be combined to obtain multiple target combinations.

[0139] For a candidate entity, it is combined with different context-related entity names and different mapped entity relationships to obtain multiple combinations. For each combination, the relationship authenticity value is calculated. The relationship authenticity value represents the authenticity of the relationship between two entities. The larger the value, the less similar the two entities are; the smaller the value, the more similar the two entities are. For each combination of calculated relationship authenticity values, they are summed up as the final relationship authenticity value corresponding to the candidate entity.

[0140] The relationship authenticity value can be obtained by minimizing the following formula: ∑ (h,r,t)∈S ‖h+rt‖, where r represents the representation vector of the relationship between entity h and entity t, S represents the set of different entities and the relationship between entities in the knowledge base, and ‖h+rt‖ means taking the square root of (h+r+t).

[0141] Step 504: Use the first candidate entity in the target combination with the smallest relationship authenticity value as the target candidate entity.

[0142] As mentioned above, the smaller the relationship authenticity value is, the more similar the two entities are. Therefore, the first candidate entity in the target combination with the smallest authenticity value can be used as the target candidate entity.

[0143] Step 505: Link the entity title to the target candidate entity.

[0144] In the embodiment of the present invention, a candidate entity set of entity titles in the input sentence is generated, and then the entity title is linked to the target candidate entity in the candidate entity set. Using the solution of the embodiment of the present invention, neither a text description of the entity nor a large amount of manual description is required, so the cost of entity linking can be reduced.

[0145] like Figure 6 As shown, the entity linking method of the embodiment of the present invention includes:

[0146] Step 601: Generate a mapping model.

[0147] The mapping model is the mapping relationship between word vectors and entity representation vectors. Figure 7 As shown, this step may include:

[0148] Step 701: Obtain training word vector representations from a text corpus.

[0149] Step 702: Obtain training entity representation vectors from the knowledge base.

[0150] Step 703: Use the training word vector representation and the training entity representation vector to train a neural network model to obtain the mapping model.

[0151] Specifically, the training word vector representation can be obtained from the text corpus through a language model such as BERT. The training entity representation vector is obtained through the following objective function:

[0152]

[0153] Among them, L represents the value of the objective function, α (h,r,t) represents the weight of the relationship between entity h and entity t, r represents the representation vector of the relationship between entity h and entity t, t′ represents an entity randomly selected from the knowledge base, and S represents the set of different entities and the relationship between entities in the knowledge base. By minimizing the objective function L, entities and related vector operations can satisfy the logical relationship between them.

[0154] The generated mapping model can be, for example, a model for mapping between the representation vector of the word "David Beckham" and the representation vector of the entity "David Beckham". This model can be implemented by training a neural network. The mapping model usually has fewer parameters, and the training of the mapping model can be completed by constructing a small number of samples based on methods such as entity name matching and synonym matching.

[0155] like Figure 8 , which is a schematic diagram of the mapping relationship between word vectors and entity representation vectors in an embodiment of the present invention. A word vector may correspond to one or more entity representation vectors.

[0156] Step 602: Obtain an input sentence, wherein the input sentence includes an entity title.

[0157] Step 603: Generate a candidate entity set of the entity title.

[0158] Step 604: Link the entity title to a target candidate entity in the candidate entity set.

[0159] The description of steps 602 to 604 may refer to the description of the aforementioned steps 101 to 103.

[0160] In the embodiment of the present invention, a candidate entity set of entity titles in the input sentence is generated, and then the entity title is linked to the target candidate entity in the candidate entity set. Using the solution of the embodiment of the present invention, neither a text description of the entity nor a large amount of manual description is required, so the cost of entity linking can be reduced.

[0161] like Fig. 9 As shown in the figure, if the input sentence is "David is an English player. He used to play for Manchester United." In the application, the goal of the entity linking task is to link the entity name identified in the natural language (such as "David") to a specific entity in the knowledge base (David Beckham). Fig. 9 In FIG. 1 , the relationship authenticity scores of the three candidate entities corresponding to the entity title David are shown, which are 0.1, 0.6, and 0.2 respectively. Since the score corresponding to David Beckham is the lowest, David is linked to David Beckham.

[0162] According to the above described process, the candidate entity set of the entity title "David" is determined, and then it is linked to the correct entity. The final entity "David Beckham" is found by obtaining the entities from the knowledge base.

[0163] In FIG. 10( a ), according to the above-described method, the most similar entities of the entity title “David” are determined to be David Beckham and David Villa. The most similar entity of the context-related entity title “England” of “David” is England, and its related entities are David Beckham and Wayne Rooney; the most similar entity of the context-related entity title “Manchester United” of “David” is Manchester United, and its related entities are David Beckham and Alex Ferguson. Therefore, “David Beckham and David Villa”, “David Beckham and Wayne Rooney”, and “David Beckham and Alex Ferguson” are added to the candidate entity set respectively.

[0164] As shown in FIG. 10( b ), the process of linking “David” to “David Beckham” is shown. First, the verb or adverb relationship in the input sentence is parsed. In this sentence, the verb or adverb relationship is: born in, plays football for…. Through the mapping relationship, it is mapped to the relationship in the knowledge base, for example, born in is mapped to born in, playing football for… is mapped to play for.

[0165] The candidate entity set and the mapped relationships generated in the manner shown in FIG10(a) are combined to minimize the vectors of entities and relationships between entities in the input sentence. In the process of combination, each candidate entity in the candidate entity set is combined with "born in", "plays for", "England", and "Manchester United" respectively. After calculation, assuming that David Beckham has the lowest score, "David" is mapped to David Beckham.

[0166] The solution of the embodiment of the present invention can be applied to dialogue systems in intelligent customer service, recommendation systems and all other systems that use natural language as input.

[0167] In the embodiment of the present invention, a candidate entity set of entity titles in the input sentence is generated, and then the entity title is linked to the target candidate entity in the candidate entity set. Using the solution of the embodiment of the present invention, neither a text description of the entity nor a large amount of manual description is required, so the cost of entity linking can be reduced.

[0168] The embodiment of the present invention also provides a physical linking device. Fig.11 , Fig.11 is a structural diagram of the entity linking device provided by the embodiment of the present invention. Since the principle of solving the problem by the entity linking device is similar to that of the entity linking method in the embodiment of the present invention, the implementation of the entity linking device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0169] like Fig.11 As shown, the entity linking device 1100 includes: a first acquisition module 1101, used to acquire an input sentence, wherein the input sentence includes an entity title; a first generation module 1102, used to generate a candidate entity set of the entity title; and a first linking module 1103, used to link the entity title to a target candidate entity in the candidate entity set.

[0170] like Fig.12 As shown, the first generating module 1102 includes:

[0171] The first acquisition submodule 11021 is used to obtain the context-related entity name of the entity name in the input sentence; the second acquisition submodule 11022 is used to obtain the first similar entity of the entity name from the knowledge base; the third acquisition submodule 11023 is used to obtain the second similar entity of the context-related entity name from the knowledge base; the first generation submodule 11024 is used to form the candidate entity set using the related entities of the first similar entity and the second similar entity.

[0172] like Fig.13 As shown, the second acquisition submodule 11022 includes:

[0173] The first generation unit 11022a is used to generate a word vector representation of the entity title; the first mapping unit 11022b is used to map the word vector representation into an entity representation vector through a mapping model; the first calculation unit 11022c is used to calculate the similarity between the entity representation vector and the entity representation vector in the knowledge base; the first acquisition unit 11022d is used to take the entity corresponding to the first target entity representation vector in the knowledge base as the first similar entity, and the similarity between the first target entity representation vector and the entity representation vector meets the first preset requirement.

[0174] like Fig.14 As shown, the third acquisition submodule 11023 includes:

[0175] The second generation unit 11023a is used to generate a word vector representation of the context-related entity title; the second mapping unit 11023b is used to map the word vector representation into an entity representation vector through a mapping model; the second calculation unit 11023c is used to calculate the similarity between the entity representation vector and the entity representation vector in the knowledge base; the second acquisition unit 11023d is used to take the entity corresponding to the second target entity representation vector in the knowledge base as the second similar entity, and the similarity between the second target entity representation vector and the entity representation vector meets the second preset requirement.

[0176] like Fig.15 As shown, the device also includes:

[0177] The second generating module 1104 is used to generate the mapping model.

[0178] like Fig.16 As shown, the second generating module 1104 includes:

[0179] The first acquisition submodule 11041 is used to obtain the training word vector representation from the text corpus; the second acquisition submodule 11042 is used to obtain the training entity representation vector from the knowledge base; the first generation submodule 11043 is used to train the neural network model using the training word vector representation and the training entity representation vector to obtain the mapping model.

[0180] The training entity representation vector is obtained by the following objective function:

[0181]

[0182] Among them, L represents the value of the objective function, α (h,r,t)represents the weight of the relationship between entity h and entity t, r represents the representation vector of the relationship between entity h and entity t, t′ represents an entity randomly selected from the knowledge base, and S represents a set of different entities in the knowledge base and the relationships between entities.

[0183] Among them, Fig.17 As shown, the first linking module 1103 includes:

[0184] A parsing submodule 11031 is used to parse the input sentence to obtain the entity relationship in the input sentence; a mapping submodule 11032 is used to map the entity relationship in the input sentence to the entity relationship in the knowledge base; a calculation submodule 11033 is used to calculate the relationship authenticity value of a target combination, wherein the target combination is a combination formed by the candidate entities in the candidate entity set, the context-related entity names of the entity names in the input sentence, and the entity relationships in the knowledge base; a selection submodule 11034 is used to select the first candidate entity in the target combination with the smallest relationship authenticity value as the target candidate entity; a linking submodule 11035 is used to link the entity name to the target candidate entity.

[0185] The device provided in the embodiment of the present invention can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated in this embodiment.

[0186] See also Fig.18 The embodiment of the present invention also provides a hardware structure of a physical linking device. Fig.18 As shown, the physical linking device 1800 includes:

[0187] Processor 1802; and

[0188] The memory 1804 stores program instructions, wherein when the program instructions are executed by the processor, the processor 1802 is caused to perform the following steps:

[0189] Obtaining an input sentence, wherein the input sentence includes an entity title;

[0190] Generating a candidate entity set of the entity title;

[0191] The entity title is linked to a target candidate entity in the candidate entity set.

[0192] Furthermore, if Fig.18 As shown, the physical linking device 1800 may also include a network interface 1801 , an input device 1803 , a hard disk 1805 , and a display device 1806 .

[0193] The above-mentioned interfaces and devices can be interconnected through a bus architecture. The bus architecture can be a bus and bridge including any number of interconnected buses. Specifically, various circuits of one or more central processing units (CPUs) represented by processor 1802 and one or more memories represented by memory 1804 are connected together. The bus architecture can also connect various other circuits such as peripheral devices, voltage regulators, and power management circuits together. It can be understood that the bus architecture is used to achieve connection and communication between these components. In addition to the data bus, the bus architecture also includes a power bus, a control bus, and a status signal bus, which are all well known in the art, so they are not described in detail herein.

[0194] The network interface 1801 can be connected to a network (such as the Internet, a local area network, etc.), receive data from the network, and save the received data in the hard disk 1805.

[0195] The input device 1803 can receive various instructions input by the operator and send them to the processor 1802 for execution. The input device 1803 can include a keyboard or a pointing device (eg, a mouse, a trackball, a touch pad or a touch screen, etc.).

[0196] The display device 1806 can display the result obtained by the processor 1802 executing the instructions.

[0197] The memory 1804 is used to store programs and data necessary for the operation of the operating system, as well as data such as intermediate results during the calculation process of the processor 1802.

[0198] It is understood that the memory 1804 in the embodiment of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. The memory 1804 of the apparatus and method described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0199] In some embodiments, the memory 1804 stores the following elements, executable modules or data structures, or a subset thereof, or an extended set thereof: an operating system 18041 and an application program 18042 .

[0200] The operating system 18041 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application 18042 includes various application programs, such as a browser, etc., which are used to implement various application services. The program for implementing the method of the embodiment of the present invention can be included in the application 18042.

[0201] The entity linking method disclosed in the above embodiment of the present invention can be applied to the processor 1802, or implemented by the processor 1802. The processor 1802 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above entity linking method can be completed by the hardware integrated logic circuit or software instructions in the processor 1802. The above processor 1802 can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, and can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiment of the present invention can be directly embodied as a hardware decoding processor to execute, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 1804, and the processor 1802 reads the information in the memory 1804 and completes the steps of the above method in combination with its hardware.

[0202] It is understood that the embodiments described herein can be implemented in hardware, software, firmware, middleware, microcode or a combination thereof. For hardware implementation, the processing unit can be implemented in 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), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in the present application or a combination thereof.

[0203] For software implementation, the techniques described herein can be implemented by modules (e.g., procedures, functions, etc.) that perform the functions described herein. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.

[0204] Specifically, when the program is executed by the processor 1802, the following steps may also be implemented:

[0205] Obtaining context-related entity names of the entity name in the input sentence;

[0206] Acquire a first similar entity to the entity name from a knowledge base;

[0207] Acquire a second similar entity to the context-related entity title from the knowledge base;

[0208] The candidate entity set is formed by using related entities of the first similar entity and the second similar entity.

[0209] Specifically, when the program is executed by the processor 1802, the following steps may also be implemented:

[0210] Generate a word vector representation of the entity title;

[0211] Mapping the word vector representation into an entity representation vector through a mapping model;

[0212] Calculating the similarity between the entity representation vector and the entity representation vector in the knowledge base;

[0213] An entity corresponding to a first target entity representation vector in the knowledge base is used as the first similar entity, and a similarity between the first target entity representation vector and the entity representation vector meets a first preset requirement.

[0214] Specifically, when the program is executed by the processor 1802, the following steps may also be implemented:

[0215] Generating a word vector representation of the context-related entity title;

[0216] Mapping the word vector representation into an entity representation vector through a mapping model;

[0217] Calculating the similarity between the entity representation vector and the entity representation vector in the knowledge base;

[0218] The entity corresponding to the second target entity representation vector in the knowledge base is used as the second similar entity, and the similarity between the second target entity representation vector and the entity representation vector meets a second preset requirement.

[0219] Specifically, when the program is executed by the processor 1802, the following steps may also be implemented:

[0220] The mapping model is generated.

[0221] Specifically, when the program is executed by the processor 1802, the following steps may also be implemented:

[0222] Get training word vector representations from a text corpus;

[0223] Obtain training entity representation vectors from the knowledge base;

[0224] The neural network model is trained using the training word vector representation and the training entity representation vector to obtain the mapping model.

[0225] The training entity representation vector is obtained by the following objective function:

[0226]

[0227] Among them, L represents the value of the objective function, α (h,r,t) represents the weight of the relationship between entity h and entity t, r represents the representation vector of the relationship between entity h and entity t, t′ represents an entity randomly selected from the knowledge base, and S represents a set of different entities in the knowledge base and the relationships between entities.

[0228] Specifically, when the program is executed by the processor 1802, the following steps may also be implemented:

[0229] Parsing the input sentence to obtain entity relationships in the input sentence;

[0230] Mapping the entity relationships in the input sentence to the entity relationships in the knowledge base;

[0231] Calculating a relational authenticity value of a target combination, wherein the target combination is a combination formed by candidate entities in the candidate entity set, context-related entity names of the entity names in the input sentence, and entity relationships in the knowledge base;

[0232] The first candidate entity in the target combination with the smallest relationship authenticity value is used as the target candidate entity;

[0233] The entity title is linked to the target candidate entity.

[0234] The device provided in the embodiment of the present invention can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated in this embodiment.

[0235] The embodiment of the present invention further provides a readable storage medium, on which a program is stored, and when the program is executed by a processor, each process of the above-mentioned entity linking method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.

[0236] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0237] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD), and includes a number of instructions for a terminal (which can be a mobile phone, computer, server, air conditioner, or network equipment, etc.) to execute the methods described in each embodiment of the present invention.

[0238] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.

Claims

1. An entity linking method, characterized in that: include: Obtaining an input sentence, wherein the input sentence includes an entity title; Generating a candidate entity set of the entity title; Linking the entity title to a target candidate entity in the candidate entity set; The step of generating a candidate entity set of the entity title includes: Obtaining context-related entity names of the entity name in the input sentence; Acquire a first similar entity to the entity name from a knowledge base; Acquire a second similar entity to the context-related entity title from the knowledge base; The candidate entity set is formed by using related entities of the second similar entity and the first similar entity.

2. The method according to claim 1, characterized in that The step of acquiring a first similar entity to the entity title from a knowledge base includes: Generate a word vector representation of the entity title; Mapping the word vector representation into an entity representation vector through a mapping model; Calculating the similarity between the entity representation vector and the entity representation vector in the knowledge base; An entity corresponding to a first target entity representation vector in the knowledge base is used as the first similar entity, and a similarity between the first target entity representation vector and the entity representation vector meets a first preset requirement.

3. The method according to claim 1, characterized in that The step of acquiring the second similar entity of the context-related entity title from the knowledge base includes: Generating a word vector representation of the context-related entity title; Mapping the word vector representation into an entity representation vector through a mapping model; Calculating the similarity between the entity representation vector and the entity representation vector in the knowledge base; The entity corresponding to the second target entity representation vector in the knowledge base is used as the second similar entity, and the similarity between the second target entity representation vector and the entity representation vector meets a second preset requirement.

4. The method according to claim 2 or 3, characterized in that: The method further comprises: The mapping model is generated.

5. The method according to claim 4, characterized in that The generating the mapping model comprises: Get training word vector representations from a text corpus; Obtain training entity representation vectors from the knowledge base; The neural network model is trained using the training word vector representation and the training entity representation vector to obtain the mapping model.

6. The method according to claim 5, characterized in that The training entity representation vector is obtained by the following objective function: Among them, L represents the value of the objective function, α (h,r,t) represents the weight of the relationship between entity h and entity t, r represents the representation vector of the relationship between entity h and entity t, and t ′ represents an entity randomly selected from the knowledge base, and S represents a set of different entities and relationships between entities in the knowledge base.

7. The method according to claim 1, characterized in that The linking the entity title to the target candidate entity in the candidate entity set includes: Parsing the input sentence to obtain entity relationships in the input sentence; Mapping the entity relationships in the input sentence to the entity relationships in the knowledge base; Calculating a relational authenticity value of a target combination, wherein the target combination is a combination formed by candidate entities in the candidate entity set, context-related entity names of the entity names in the input sentence, and entity relationships in the knowledge base; The first candidate entity in the target combination with the smallest relationship authenticity value is used as the target candidate entity; The entity title is linked to the target candidate entity.

8. A physical linking device, characterized in that: include: A first acquisition module is used to acquire an input sentence, wherein the input sentence includes an entity title; A first generating module, used to generate a candidate entity set of the entity title; A first linking module, used to link the entity title to a target candidate entity in the candidate entity set; Wherein, the first generation module includes: A first acquisition submodule, used to acquire context-related entity names of the entity name in the input sentence; A second acquisition submodule is used to acquire a first similar entity of the entity title from a knowledge base; A third acquisition submodule is used to acquire a second similar entity of the context-related entity title from the knowledge base; The first generating submodule is configured to form the candidate entity set by using related entities of the second similar entity and the first similar entity.

9. The device according to claim 8, characterized in that The second acquisition submodule includes: A first generating unit, used to generate a word vector representation of the entity title; A first mapping unit, configured to map the word vector representation into an entity representation vector through a mapping model; A first calculation unit, used to calculate the similarity between the entity representation vector and the entity representation vector in the knowledge base; A first acquisition unit is used to take an entity corresponding to a first target entity representation vector in the knowledge base as the first similar entity, and the similarity between the first target entity representation vector and the entity representation vector meets a first preset requirement.

10. The device according to claim 8, characterized in that The third acquisition submodule includes: A second generating unit, used to generate a word vector representation of the context-related entity title; A second mapping unit, configured to map the word vector representation into an entity representation vector through a mapping model; A second calculation unit, used to calculate the similarity between the entity representation vector and the entity representation vector in the knowledge base; The second acquisition unit is used to take the entity corresponding to the second target entity representation vector in the knowledge base as the second similar entity, and the similarity between the second target entity representation vector and the entity representation vector meets a second preset requirement.

11. The device according to claim 9 or 10, characterized in that The device also includes: The second generating module is used to generate the mapping model.

12. The device according to claim 11, characterized in that The second generation module comprises: The first acquisition submodule is used to obtain training word vector representations from a text corpus; The second acquisition submodule is used to acquire the training entity representation vector from the knowledge base; The first generating submodule is used to train a neural network model using the training word vector representation and the training entity representation vector to obtain the mapping model.

13. The device according to claim 12, characterized in that The training entity representation vector is obtained by the following objective function: Among them, L represents the value of the objective function, α (h,r,t) represents the weight of the relationship between entity h and entity t, r represents the representation vector of the relationship between entity h and entity t, and t ′ represents an entity randomly selected from the knowledge base, and S represents a set of different entities and relationships between entities in the knowledge base.

14. The device according to claim 8, characterized in that The first link module includes: A parsing submodule, used for parsing the input sentence to obtain the entity relationship in the input sentence; A mapping submodule, used for mapping the entity relationship in the input sentence to the entity relationship in the knowledge base; A calculation submodule, configured to calculate a relational authenticity value of a target combination, wherein the target combination is a combination of candidate entities in the candidate entity set, context-related entity names of the entity names in the input sentence, and entity relationships in the knowledge base; A selection submodule, used to select the first candidate entity in the target combination with the smallest relationship authenticity value as the target candidate entity; A linking submodule is used to link the entity title to the target candidate entity.

15. A readable storage medium for storing a program, characterized in that: When the program is executed by a processor, the steps in the entity linking method according to any one of claims 1 to 7 are implemented.

16. A physical linking device, characterized in that: include: processor; as well as A memory, wherein program instructions are stored in the memory, wherein when the program instructions are executed by the processor, the processor is caused to perform the following steps: Obtaining an input sentence, wherein the input sentence includes an entity title; Generating a candidate entity set of the entity title; Linking the entity title to a target candidate entity in the candidate entity set; The step of generating a candidate entity set of the entity title includes: Obtaining context-related entity names of the entity name in the input sentence; Acquire a first similar entity to the entity name from a knowledge base; Acquire a second similar entity to the context-related entity title from the knowledge base; The candidate entity set is formed by using related entities of the second similar entity and the first similar entity.

Citation Information

Patent Citations

  • A method and apparatus for entity link

    CN109241294A

  • Knowledge graph guided false news detection method

    CN111061843A