Entity linking method and system, electronic device and readable storage medium
By constructing entity type and distance feature vectors using a graph neural network model and combining them with the maximum margin loss optimization function, the problem of low accuracy in entity disambiguation of neural network models is solved, achieving more efficient entity disambiguation and graph expansion.
Patent Information
- Application Number
- CN202110661524.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-15
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2041-06-15
AI Technical Summary
Existing neural network models rely on limited semantic information obtained from string information, resulting in low accuracy in entity disambiguation and an inability to effectively capture the interdependencies between entities.
A graph neural network model is used to train an entity disambiguation model by constructing entity type feature vectors, entity distance vectors, and entity relationship feature vectors, combined with the maximum margin loss optimization function, and using the dependency information between entities to perform entity disambiguation.
It improves the accuracy of entity disambiguation, and can more effectively utilize the context and background information of entities in the text to disambiguate entities in unstructured text, serving the purpose of graph expansion and merging.
Smart Images

Figure CN115481633B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of natural language processing, and in particular to an entity linking method and system, an electronic device and a readable storage medium. BACKGROUND
[0002] Due to the phenomenon of polysemy (the same entity reference can point to different entities in the knowledge base in different contexts) or one sense per polyword (the same entity in the knowledge base has different references in the text) of natural language, the result of entity recognition is difficult to directly add to the knowledge graph. The result of entity recognition must be disambiguated to bring the unambiguous entity information. Entity disambiguation is a technical means to solve the problem. Existing entity disambiguation is divided into two categories: clustering-based entity disambiguation technology and link-based entity disambiguation technology. The former refers to the case where the knowledge base is not given, and the entity reference is disambiguated in a clustering manner. The latter is given the knowledge base, and the entity reference is linked to the corresponding entity in the target entity list to achieve disambiguation. The link-based entity disambiguation technology is mostly based on neural network models, such as using convolutional neural networks, recurrent neural networks and other technologies to utilize the context information of the text for entity disambiguation. The core assumption of the existing technology (neural network model) is that the data samples are independent of each other. In real business scenarios, such as users and some entities, they are related to each other and form a graph structure, and the traditional neural network model cannot capture the mutual dependency between entities. The neural network model mainly relies on string information, and the semantic information obtained is very limited.
[0003] The problem of the above-mentioned existing technology is that the semantic information obtained by the neural network model relying on string information is limited, resulting in low accuracy of entity disambiguation. SUMMARY
[0004] The present application provides an entity linking method and system, an electronic device and a readable storage medium to solve the technical defects in the prior art.
[0005] The present application provides an entity linking method, comprising:
[0006] determining the representation of the reference and the context entity; wherein the representation of the reference and the context entity includes an entity type feature vector constructed by a context entity type and an entity distance vector constructed by the character distance between the context entity and the reference, and an entity relationship feature vector formed by splicing the entity type feature vector and the entity distance feature vector;
[0007] determining the entity vector of the candidate entity, wherein the entity vector of the candidate entity is obtained by using the average method of the word vector of the entity word of the candidate entity for initial representation;
[0008] input the entity type feature vector, the entity distance feature vector, the entity relationship feature vector and the entity vector of the candidate entity into an entity disambiguation model to obtain a similarity between the reference and the candidate entity, wherein the entity disambiguation model is obtained by training based on entity type feature sample data, entity distance feature sample data, entity relationship feature sample data, entity sample data of the candidate entity and a predetermined similarity degree label.
[0009] According to the entity linking method, the method further comprises:
[0010] If the value of the similarity between the reference and the candidate entity is greater than a preset threshold, it is determined that the reference points to the candidate entity.
[0011] According to the entity linking method, a maximum margin loss is used as a target optimization function in the training process of the entity disambiguation model.
[0012] According to the entity linking method, the representation of the context entity of the reference comprises:
[0013] The reference and the context entity information are input into a graph neural network model to obtain the representation of the context entity of the reference.
[0014] According to the entity linking method, the specific updating mode of the reference is:
[0015]
[0016] wherein P1 is the reference, P2, P3 to P n is the context of P1 and the context entity related thereto, representing the initial state, h p2 , h p3 is the state of P2 and P3 at t time, is the state of the reference at t+1 time.
[0017] According to the entity linking method, the entity relationship feature vector fuses entity categories and entity distance information, wherein each entity category comprises a primary category or a secondary category, and a combination mode of two entity categories comprises one of a primary category and a primary category, a primary category and a secondary category, a secondary category and a secondary category, and a secondary category and a primary category; and the entity distance information is a character distance between text within N characters of the context of the reference and the reference, N being a positive integer.
[0018] According to the entity linking method, each entity comprises an entity word and an entity category obtained by splicing, and is denoted as:
[0019] w=[w1:w2]
[0020] wherein w1 is a word representation of the entity, and w2 is a category representation of the entity.
[0021] The application also provides an entity linking system, comprising:
[0022] An entity relationship representation determining module is configured to determine a representation of the referent and the context entity, wherein the representation of the referent and the context entity comprises an entity type feature vector constructed by a context entity type and an entity distance feature vector constructed by a character distance between the context entity and the referent, and an entity relationship feature vector formed by splicing the entity type feature vector and the entity distance feature vector.
[0023] A candidate entity representation determining module is configured to determine an entity vector of a candidate entity, wherein the entity vector of the candidate entity is obtained by initial representation according to an average method of a word vector of an entity word of the candidate entity.
[0024] An entity linking module is configured to input the entity type feature vector, the entity distance feature vector, the entity relationship feature vector and the entity vector of the candidate entity into an entity disambiguation model to obtain a similarity between the referent and the candidate entity, wherein the entity disambiguation model is obtained by training based on entity type feature sample data, entity distance feature sample data, entity relationship feature sample data, entity sample data of the candidate entity and a pre-determined similarity degree label.
[0025] The application also provides an electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the entity linking method according to any one of the above when executing the program.
[0026] The application also provides a non-transitory computer readable storage medium having a computer program stored thereon, wherein the computer program is executable on a processor to implement the steps of the entity linking method according to any one of the above.
[0027] The entity linking method and system, the electronic device and the readable storage medium provided by the application can more effectively utilize the context of the text where the entity is located and effectively integrate the background information of the text into the representation of the entity, effectively utilize the dependency information between entities, model the entities with complex interaction relationship, map the entities into low-dimensional vectors, carry more semantic information, improve the accuracy of the model, can fully utilize the context of the text where the entity is located and the background information of the text, disambiguate the entities in the unstructured text, serve subsequent graph expansion and graph merging and the like. BRIEF DESCRIPTION OF DRAWINGS
[0028] In order to more clearly illustrate the technical solutions of the present application or the prior art, the following will briefly introduce the drawings required by the embodiments or prior art description. Obviously, the drawings described below are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor.
[0029] Figure 1 is one of the flowcharts of the entity linking method provided by the present application;
[0030] Figure 2 is another flowchart of the entity linking method provided by the present application;
[0031] Figure 3 is a structural schematic diagram of the entity linking system provided by the present application;
[0032] Figure 4 is a structural schematic diagram of the electronic device provided by the present application. DETAILED DESCRIPTION
[0033] In order to make the objects, technical solutions and advantages of the present application clearer, the technical solutions of the present application will be described clearly and completely below in combination with the drawings in the present application. Obviously, the described embodiments are only some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0034] The present application will be described below in combination with Figure 1 An entity linking method is described in the present application, which comprises:
[0035] S1, determining the representation of the designation and the context entity; wherein the representation of the designation and the context entity comprises the entity type feature vector constructed by the context entity type and the entity distance vector constructed by the character distance between the context entity and the designation, and the entity relationship feature vector formed by splicing the entity type feature vector and the entity distance feature vector;
[0036] The text of 200 characters on the left and right of the designation is intercepted as the context. The entity of the context is extracted using the NER tool (Chinese named entity recognition tool). The initial representation of the designation, other entity information of the designation context and the entity relationship feature vector is performed using the average method of the word vector. The vector fuses the entity category and the entity distance information, and is spliced by the entity type feature vector and the entity distance vector.
[0037] S2, determining the entity vector of the candidate entity, wherein the entity vector of the candidate entity is obtained by initially representing the candidate entity using the average method of the word vector of the entity word.
[0038] The candidate entity is initially represented by using the average method of the word vector, and the entity type is represented by using the random initialization method.
[0039] S3, input the entity type feature vector, the entity distance feature vector, the entity relationship feature vector and the entity vector of the candidate entity into an entity disambiguation model to obtain the similarity between the reference and the candidate entity, wherein the entity disambiguation model is obtained by training based on the entity type feature sample data, the entity distance feature sample data, the entity relationship feature sample data, the entity sample data of the candidate entity and the pre-determined similarity degree label.
[0040] After the representation of the reference and the context entity information, the reference and the candidate entity are input into a graph neural network model to obtain the similarity between the reference and the candidate entity.
[0041] The graph neural network is introduced in the present application, the context of the text where the entity is located is more effectively utilized, the background information of the text is effectively integrated into the representation of the entity, the dependency information between the entities is effectively utilized, the entities with complex interaction relationship are modeled, the entities are mapped into low-dimensional vectors, more semantic information is carried, the model accuracy is improved, the context of the text where the entity is located and the background information of the text can be fully utilized, the entity in the unstructured text is disambiguated, and the subsequent graph expansion and graph merging are served.
[0042] According to the entity linking method, the method further comprises:
[0043] If the value of the similarity between the reference and the candidate entity is greater than a preset threshold, it is determined that the reference points to the candidate entity. The preset threshold can be set to 0.8. In the prediction process, the cosine similarity can be used to calculate the similarity between two vectors. If the value is greater than 0.8, it is determined that the reference points to the entity.
[0044] According to the entity linking method, the training process of the entity disambiguation model uses the maximum margin loss (MML) as the target optimization function. The optimization of the entity disambiguation model makes the entity linking effect better.
[0045] According to the entity linking method, the representation of the context entity of the reference comprises:
[0046] input the mention and the context entity information into a graph neural network model to obtain a representation of the context entity of the mention.In the present application, a graph neural network is introduced to represent the entity in unstructured text, which can effectively and sufficiently utilize the context information of the target entity and the related information of the dependent entity of the target entity.The graph neural network is a relatively advanced technology in neural network technology.Compared with the performance of traditional machine learning technology, the graph neural network has the following advantages:
[0047] The context of the text where the entity is located is more effectively utilized, and the background information of the text is effectively integrated into the representation of the entity.
[0048] The dependent information between entities is effectively utilized, and the entities with complex interaction relationships are modeled, thereby better serving the user scenarios containing a graph structure.
[0049] According to the entity linking method, the specific updating mode of the mention is:
[0050]
[0051] wherein P1 is the mention, P2, P3 to P n is the context of P1 and the context entity related thereto, representing the initial state, h p2 , h p3 is the state of P2 and P3 at time t, is the state of the mention at time t+1.When the graph neural network (GNN) converges, the mention entity represented by the GNN is used as the mention.
[0052] According to the entity linking method, the entity relationship feature vector fuses the entity category and the entity distance information, wherein the category of each entity includes primary or secondary, and the combination mode of the two entity categories includes one of primary and primary, primary and secondary, secondary and secondary, and secondary and primary; the entity distance information is the distance between the text within N characters of the context of the mention and the characters of the mention, and N is a positive integer.
[0053] The category of the candidate entity is used as a reference, that is, the category of the candidate entity is a primary entity, and the remaining entities are secondary entities. (The more important entity is a primary entity.) The mention and the other entity information of the context of the mention are initially represented by using the average method of the word vector.
[0054] According to the entity linking method, each entity includes an entity word obtained by splicing and an entity category, denoted as:
[0055] w=[w1:w2]
[0056] where w1 is the word representation of the entity, and w2 is the category representation of the entity.
[0057] To further illustrate the entity linking method of the present application, see Figure 2 An example is provided below, which aims to calculate the similarity between the candidate entity and the mention.
[0058] As shown in Figure 2 , the left part is the representation process of the mention and its context, and the right part is the representation process of the entity concept.
[0059] Other entities in the context of the mention are obtained and the weight distribution method is as follows:
[0060] The text of 200 characters on the left and right of the mention is intercepted as the context.
[0061] The entities in the context are extracted using the NER tool. The category of the candidate entity is used as the reference, i.e. the category of the candidate entity is the primary entity, and the rest of the entities are the secondary entities. (The more important entity is the primary entity.) The information of the mention, the other entities in the context of the mention, and the average method of the word vector are used for initial representation.
[0062] The representation of the entity relationship feature vector is obtained by splicing the entity type feature vector and the entity distance vector. The specific steps are as follows: the entity category has two levels, i.e. the primary and the secondary, and the combination of the two entity categories has four ways: primary+primary; primary+secondary; secondary+secondary; secondary+primary. Therefore, a 4*50 matrix is initialized, denoted as U∈R 4×50 , where 50 is the dimension of the vector, and the row vector of the matrix represents the combination of the entity categories. The matrix can be trained. Since only the text within 200 characters in the context of the mention is intercepted, a 400*50 matrix is initialized, denoted as Z∈R 400×50 , where 40 is the dimension of the vector, and the row vector represents the distance from the target entity. The matrix is similar to the entity category matrix, and both are set to be trainable. For example: in the text before the mention e, there is an entity m, assuming that e is the primary entity and m is the secondary entity, then the entity category combination of the entity pair is “primary+secondary”, and the entity category vector is U1 (the subscript starts from 0), and assuming that the distance is 49, the entity distance vector is Z 49 , and the final relationship feature vector is the splicing of the two, i.e. Vector=[U1:Z 49 ]. Similarly, the processing method of the entity in the post-text is different from that in the pre-text, and the distance from the post-text needs to be added by 200. For example, if the distance of the entity m appearing in the post-text is a, the distance matrix takes a+200 row vector as the final distance vector.
[0063] The candidate entity is initially represented by using an average method of a word vector, and the entity type is represented by using a randomly initialized representation.
[0064] After the representation of the mention and the context entity information, the mention is input into a graph neural network model, and the specific updating method of the mention is recorded as: wherein P1 is a mention entity, P2, P3 to Pn are entities related to the context of P1, represent the initial state of P1, h p2 , h p3 is the state of P2, P3 at time t. When the GNN converges, the mention entity represented by the GNN is represented as Figure 2 V in the formula.
[0065] The entity concept is composed of two parts: entity words and entity categories. The two are spliced to obtain the representation of the entity concept, recorded as: w=[w1:w2]. w1 is the word representation of the entity, w2 is the category representation of the entity, and w is Figure 3 w in the formula.
[0066] The maximum margin loss (MML) is used as the target optimization function in the training process. The mention entity pair (m, e) that is expected to have a link relationship has a higher similarity score than a certain non-existent mention entity pair (m, e'), and the difference is not greater than a certain threshold value epsilon, and the threshold value is set to 0.45. The cosine similarity is used to calculate the similarity of two vectors.
[0067]
[0068] wherein the meaning of object is a target optimization function.
[0069] In the prediction process, the cosine similarity is still used to calculate the similarity of two vectors, and if the value is greater than 0.8, it is determined that the mention points to the entity.
[0070] In the present application, the graph neural network is introduced to represent the entity in the unstructured text, which can effectively and sufficiently utilize the context information of the target entity and the related information of the dependent entity. The dependent information between entities is effectively utilized to model the entities with complex interaction relationships. Better service is provided for user scenarios containing a "graph structure".
[0071] Referring to Figure 4 , the entity linking system provided by the present application is described below, and the entity linking system described below can be correspondingly referred to the entity linking method described above.
[0072] The entity relationship representation determining module 10 is configured to determine a representation of the referent and the context entity, wherein the representation of the referent and the context entity comprises an entity type feature vector constructed by a context entity type and an entity distance vector constructed by a character distance between the context entity and the referent, and an entity relationship feature vector formed by splicing the entity type feature vector and the entity distance feature vector;
[0073] The candidate entity representation determining module 20 is configured to determine an entity vector of a candidate entity, wherein the entity vector of the candidate entity is obtained by initial representation according to an average method of a word vector of an entity word of the candidate entity.
[0074] The entity linking module 30 is configured to input the entity type feature vector, the entity distance feature vector, the entity relationship feature vector and the entity vector of the candidate entity into an entity disambiguation model to obtain a similarity between the referent and the candidate entity, wherein the entity disambiguation model is obtained by training based on entity type feature sample data, entity distance feature sample data, entity relationship feature sample data, entity sample data of the candidate entity and a pre-determined similarity degree label.
[0075] According to the entity linking system, the system further comprises:
[0076] The determining module is configured to determine that the referent points to the candidate entity when the value of the similarity between the referent and the candidate entity is greater than a pre-set threshold value. The pre-set threshold value can be set to 0.8. In the prediction process, the similarity of two vectors can be calculated by using cosine similarity. If the value is greater than 0.8, it is determined that the referent points to the entity.
[0077] According to the entity linking system, the training process of the entity disambiguation model adopts maximum margin loss (MML) as a target optimization function. The optimization of the entity disambiguation model makes the entity linking better.
[0078] According to the entity linking system, the obtaining of the representation of the context entity of the referent comprises:
[0079] The referent and the context entity information are input into a graph neural network model to obtain the representation of the context entity of the referent. In the present application, the graph neural network is introduced to represent the entity in the unstructured text, which can effectively and sufficiently utilize the context information of the target entity and the related information of the dependent entity. The graph neural network is a relatively advanced technology in neural network technology. Compared with the traditional machine learning technology, the performance is greatly improved, and compared with the previously used neural network technology, the following advantages are obtained:
[0080] More effectively use the context of the text where the entity is located, and effectively integrate the background information of the text into the representation of the entity.
[0081] Effectively use the dependency information between entities to model entities with complex interaction relationships. Better serve user scenarios containing "graph structure".
[0082] According to the entity linking system, the specific updating method of the mention is:
[0083]
[0084] Wherein, P1 is the mention, P2, P3 to P n The context of P1 is related to the context entity, representing its initial state, h p2 , h p3 P2, P3 is the state of P2, P3 at time t, The state of the mention at t+1. When the graph neural network (GNN) converges, the mention entity represented by GNN is the mention.
[0085] According to the entity linking system, the entity relationship feature vector fuses entity category and entity distance information, wherein the category of each entity includes primary or secondary, and the combination of two entity categories includes one of primary and primary, primary and secondary, secondary and secondary, and secondary and primary; The entity distance information is the distance between the text within N characters of the context of the mention and the characters of the mention, and N is a positive integer.
[0086] Referring to the category of the candidate entity, that is, the category of the candidate entity is a primary entity, and the remaining entities are secondary entities. (More important entities are primary entities). The mention, other entity information of the mention context is initially represented using the average method of word vectors.
[0087] According to the entity linking system, each entity includes an entity word obtained by splicing and an entity category, denoted as:
[0088] w=[w1:w2]
[0089] Wherein, w1 is the word representation of the entity, and w2 is the category representation of the entity.
[0090] Figure 4 An example of an entity structure diagram of an electronic device is shown in FIG. 1. Figure 4As shown, the electronic device can include a processor 410, a communications interface 420, a memory 430, and a communications bus 440, wherein the processor 410, the communications interface 420, and the memory 430 complete mutual communication through the communications bus 440. The processor 410 can invoke a logical instruction in the memory 430 to execute an entity linking method, which includes:
[0091] S1, determining a representation of a reference and a context entity; wherein the representation of the reference and the context entity includes an entity type feature vector constructed by a context entity type and an entity distance vector constructed by a character distance between the context entity and the reference, and an entity relationship feature vector formed by splicing the entity type feature vector and the entity distance feature vector;
[0092] S2, determining an entity vector of a candidate entity, which is obtained by initial representation according to an average method of a word vector of an entity term of the candidate entity;
[0093] S3, inputting the entity type feature vector, the entity distance feature vector, the entity relationship feature vector, and the entity vector of the candidate entity into an entity disambiguation model to obtain a similarity between the reference and the candidate entity, wherein the entity disambiguation model is obtained by training based on entity type feature sample data, entity distance feature sample data, entity relationship feature sample data, and entity sample data of the candidate entity, and a predetermined similarity degree label.
[0094] In addition, the logical instructions in the memory 430 described above can be implemented in the form of a software function unit and sold or used as an independent product, which can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or part of the technical solutions can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0095] In another aspect, the present application also provides a computer program product, which comprises a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the entity linking method provided by the above method, which comprises:
[0096] S1, determining a representation of the reference and the context entity; wherein the representation of the reference and the context entity comprises an entity type feature vector constructed by the context entity type and an entity distance feature vector constructed by the character distance between the context entity and the reference, and an entity relationship feature vector formed by splicing the entity type feature vector and the entity distance feature vector;
[0097] S2, determining an entity vector of the candidate entity, which is obtained by initial representation according to an average method of entity word use word vectors of the candidate entity;
[0098] S3, inputting the entity type feature vector, the entity distance feature vector, the entity relationship feature vector and the entity vector of the candidate entity into an entity disambiguation model to obtain the similarity between the reference and the candidate entity, wherein the entity disambiguation model is obtained by training based on entity type feature sample data, entity distance feature sample data, entity relationship feature sample data and entity sample data of the candidate entity and a pre-determined similarity degree label.
[0099] In still another aspect, the present application also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is executed by a processor to implement the entity linking method provided by the above method, which comprises:
[0100] S1, determining a representation of the reference and the context entity; wherein the representation of the reference and the context entity comprises an entity type feature vector constructed by the context entity type and an entity distance feature vector constructed by the character distance between the context entity and the reference, and an entity relationship feature vector formed by splicing the entity type feature vector and the entity distance feature vector;
[0101] S2, determining an entity vector of the candidate entity, which is obtained by initial representation according to an average method of entity word use word vectors of the candidate entity;
[0102] S3, input the entity type feature vector, the entity distance feature vector, the entity relationship feature vector, and the entity vector of the candidate entity into an entity disambiguation model to obtain a similarity between the referent and the candidate entity, wherein the entity disambiguation model is obtained by training based on entity type feature sample data, entity distance feature sample data, entity relationship feature sample data, and entity sample data of the candidate entity, and a predetermined similarity degree label.
[0103] The device embodiments described above are merely illustrative, wherein the units described as separate components can or can not be physically separated, and the components displayed as units can or can not be physical units, i.e., can be located in one place or distributed on multiple network units. Part or all of the modules can be selected to achieve the purpose of the embodiment scheme according to actual needs. Those skilled in the art can understand and implement without creative labor.
[0104] Through the description of the above embodiments, those skilled in the art can clearly understand that the embodiments can be realized by means of software and the necessary general hardware platform, and of course can also be realized by hardware. Based on such understanding, the above technical solutions can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in each embodiment or some parts of the embodiments.
[0105] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for some technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for linking entities, characterized in that, include: Determine the representation of the referent and the context entity; wherein the representation of the referent and the context entity includes constructing an entity type feature vector from the context entity type and constructing an entity distance vector from the character distance between the context entity and the referent, and forming an entity relationship feature vector by concatenating the entity type feature vector and the entity distance feature vector; The entity vectors of candidate entities are determined, and the entity vectors of the candidate entities are initially represented by the entity words of the candidate entities using the word vector averaging method; The entity type feature vector, entity distance feature vector, entity relationship feature vector, and entity vector of the candidate entity are input into the entity disambiguation model to obtain the similarity between the claim and the candidate entity. The entity disambiguation model is obtained by training based on entity type feature sample data, entity distance feature sample data, entity relationship feature sample data, entity sample data of the candidate entity, and a pre-determined similarity label. Obtain a representation of the referred context entity, including: The reference and context entity information are input into a graph neural network model to obtain a representation of the reference context entity; the graph neural network model is used to represent entities in unstructured text. The specific method for updating the reference is as follows: ; Wherein, P1 refers to P2, P3 to P n It consists of the context of P1 and its associated context entities, representing its initial state. , These are the states of P2 and P3 at time t. It refers to the state at time t+1; The entity relationship feature vector integrates entity category and entity distance information. Each entity category includes a first-level or second-level category, and the combination of two entity categories includes one of the following: first-level and first-level, first-level and second-level, second-level and second-level, and second-level and first-level. The entity distance information is the distance between the text within N characters of the referred context and the referred character, where N is a positive integer.
2. The entity linking method according to claim 1, characterized in that, The method further includes: If the similarity value between the reference and the candidate entity is greater than a preset threshold, then the reference is determined to point to the candidate entity.
3. The entity linking method according to claim 1, characterized in that, The training process of the entity disambiguation model uses maximum margin loss as the objective optimization function.
4. The entity linking method according to claim 1, characterized in that, Each entity includes the entity term obtained by the concatenation method and the entity category, denoted as: ; in, It is a word representation of an entity. It is a category representation of an entity.
5. A physical linking system, characterized in that, include: The entity relationship representation determination module is used to determine the representation of the referent and the context entity; wherein, the representation of the referent and the context entity includes constructing an entity type feature vector from the context entity type and constructing an entity distance vector from the character distance between the context entity and the referent, and forming an entity relationship feature vector by concatenating the entity type feature vector and the entity distance feature vector. The candidate entity representation determination module determines the entity vector of the candidate entity. The entity vector of the candidate entity is obtained by averaging the word vectors of the entity words of the candidate entity. The entity linking module is used to input the entity type feature vector, entity distance feature vector, entity relationship feature vector, and entity vector of the candidate entity into the entity disambiguation model to obtain the similarity between the reference and the candidate entity. The entity disambiguation model is obtained by training based on entity type feature sample data, entity distance feature sample data, entity relationship feature sample data, entity sample data of the candidate entity, and a pre-determined similarity label. Obtain a representation of the referred context entity, including: The reference and context entity information are input into a graph neural network model to obtain a representation of the reference context entity; the graph neural network model is used to represent entities in unstructured text. The specific method for updating the reference is as follows: ; Wherein, P1 refers to P2, P3 to P n It consists of the context of P1 and its associated context entities, representing its initial state. , These are the states of P2 and P3 at time t. It refers to the state at time t+1; The entity relationship feature vector integrates entity category and entity distance information. Each entity category includes a first-level or second-level category, and the combination of two entity categories includes one of the following: first-level and first-level, first-level and second-level, second-level and second-level, and second-level and first-level. The entity distance information is the distance between the text within N characters of the referred context and the referred character, where N is a positive integer.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the entity linking method as described in any one of claims 1 to 4.
7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the entity linking method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Entity identification method, terminal equipment and storage medium
CN112101031A
Syntax and entity relation graph convolutional network fused event joint extraction method
CN112163416A
Cooperative disambiguation method based on deep semantic neighbor and multivariate entity association
CN112883199A