Entity linking method, device, equipment and storage medium based on artificial intelligence

Through the AI-based entity linking method, the hybrid entity feature extraction model and knowledge base feature library is used to solve the problem of low entity linking accuracy in short text, and the accuracy of entity linking is improved through weighted scores.

CN114386420BActive Publication Date: 2024-11-29PING AN TECH (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210028874.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-11
Publication Date
2024-11-29
Estimated Expiration
2042-01-11

AI Technical Summary

Technical Problem

When traditional Chinese-based entity linking technology is unable to provide rich context information when processing short texts, the accuracy of entity linking is affected.

Method used

Using an entity linking method based on artificial intelligence, a mixed entity feature extraction model is used to obtain the mentioned entity features and additional entity feature sets, and combined with the entity description feature library of the knowledge base, similarity score calculation and weighted score are performed to determine the target entity.

Benefits of technology

The accuracy of entity links is improved, and the information entropy and similarity scores of candidate entities with the same attributes are increased by attaching the entity feature set, which enhances the accuracy of the calculation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114386420B_ABST
    Figure CN114386420B_ABST
Patent Text Reader

Abstract

The present application relates to the field of artificial intelligence technology, and discloses an entity linking method, device, equipment and storage medium based on artificial intelligence, wherein the method includes: based on a hybrid entity feature extraction model, determining a mentioned entity feature and an additional entity feature set according to a target text and a mentioned entity; according to the additional entity feature set, obtaining a similarity score set for each candidate entity description feature in a candidate entity description feature set corresponding to the mentioned entity in an entity description feature library of a knowledge base and the mentioned entity feature; obtaining a weighted score set according to the additional entity feature set, the candidate entity description feature set and the similarity score set; taking the candidate entity description feature corresponding to the largest weighted score in the weighted score set as the target entity description feature; and linking the mentioned entity to the entity corresponding to the target entity description feature. The additional entity feature set increases the information entropy and similarity score of the candidate entity description features of the same attribute, thereby improving the accuracy of entity linking.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to an entity linking method, device, equipment and storage medium based on artificial intelligence. Background Art

[0002] Entity linking is linking the mentioned entity in the text to the entity in the knowledge base. For example, in the text "Paris is the son of King Priam", the mentioned entity "Paris" in the text needs to be linked to "Paris" in the knowledge base, which represents the hero in Greek mythology, rather than linking the mentioned entity "Paris" in the text to "Paris" with the city in the knowledge base. Although the entity linking technology for English is constantly developing, the entity linking technology for Chinese is still lagging behind. Traditional entity linking technology for Chinese measures the similarity between the mentioned entity in the long text and the entity in the knowledge base by designing multiple features, and assists in entity recognition and disambiguation through the rich contextual information in the long text. When processing the mentioned entity in the short text to link to the entity in the knowledge base, the traditional entity linking technology for Chinese cannot provide sufficient semantic information for disambiguation because the short text cannot provide rich contextual information, which affects the accuracy of entity linking. Summary of the invention

[0003] The main purpose of this application is to provide an entity linking method, device, equipment and storage medium based on artificial intelligence, aiming to solve the technical problem that when traditional entity linking technology for Chinese processes the mentioned entities in short texts to link to the entities in the knowledge base, the short text cannot provide rich contextual information, resulting in insufficient semantic information for disambiguation, which affects the accuracy of entity linking.

[0004] In order to achieve the above-mentioned invention object, the present application proposes an entity linking method based on artificial intelligence, the method comprising:

[0005] Obtaining a target text and a mention entity corresponding to the target text;

[0006] Based on the hybrid entity feature extraction model, hybrid entity feature extraction is performed according to the target text and the mentioned entity to determine the mentioned entity feature and the additional entity feature set;

[0007] Acquire a candidate entity description feature set corresponding to the mentioned entity from an entity description feature library of a knowledge base;

[0008] According to the additional entity feature set, a similarity score is calculated between each candidate entity description feature in the candidate entity description feature set and the mentioned entity feature to obtain a similarity score set;

[0009] Performing weighted score calculation according to the additional entity feature set, the candidate entity description feature set and the similarity score set to obtain a weighted score set;

[0010] Taking the candidate entity description feature corresponding to the maximum weighted score in the weighted score set as the target entity description feature;

[0011] The mentioned entity is linked to the entity corresponding to the target entity description feature.

[0012] Furthermore, the step of performing mixed entity feature extraction based on the target text and the mentioned entity based on the mixed entity feature extraction model to determine the mentioned entity feature and the additional entity feature set includes:

[0013] Concatenating the mentioned entity and the target text to obtain a text to be analyzed;

[0014] Using the hybrid entity feature extraction model, generating a label sequence according to the text to be analyzed;

[0015] The hybrid entity feature extraction model is adopted to generate the mentioned entity features and the additional entity feature set according to the tag sequence.

[0016] Furthermore, the step of using the hybrid entity feature extraction model to generate a label sequence according to the text to be analyzed includes:

[0017] Using the first feature extraction layer of the hybrid entity feature extraction model, generating text features for the text to be analyzed;

[0018] The label annotation layer of the hybrid entity feature extraction model is used to generate the label sequence according to the text feature.

[0019] Furthermore, the step of using the hybrid entity feature extraction model to generate the mentioned entity feature and the additional entity feature set according to the tag sequence includes:

[0020] Obtaining a flag character, and concatenating the flag character with the tag sequence to obtain a sequence to be analyzed;

[0021] Using the second feature extraction layer of the hybrid entity feature extraction model to extract features from the sequence to be analyzed;

[0022] According to the mentioned entity, acquiring data output by the second feature extraction layer as the mentioned entity feature;

[0023] The data output by the second feature extraction layer for the flag character is obtained to obtain the additional entity feature set.

[0024] Furthermore, the step of calculating similarity scores between each candidate entity description feature in the candidate entity description feature set and the mentioned entity feature according to the additional entity feature set to obtain a similarity score set includes:

[0025] Performing cross entropy calculation on each of the candidate entity description features and text entity feature data to obtain a first cross entropy set, wherein the text entity feature data includes the mentioned entity feature and the additional entity feature set;

[0026] Performing cross entropy calculation on the mentioned entity features and the candidate entity description feature set to obtain a second cross entropy;

[0027] A similarity score is calculated for each of the candidate entity description features and the mentioned entity features according to the first cross entropy set and the second cross entropy to obtain the similarity score set.

[0028] Furthermore, the step of calculating a similarity score between each of the candidate entity description features and the mentioned entity features according to the first cross entropy set and the second cross entropy to obtain the similarity score set includes:

[0029] Obtaining the entity quantity corresponding to the text entity feature data as the first entity quantity;

[0030] Obtaining the number of the candidate entity description features in the candidate entity description feature set as the second entity number;

[0031] Adding the first entity quantity and the second entity quantity to obtain a total entity quantity;

[0032] Adding each first cross entropy in the first cross entropy set to the second cross entropy respectively to obtain a cross entropy comprehensive value set;

[0033] Each cross entropy comprehensive value in the cross entropy comprehensive value set is divided by the total number of entities to obtain the similarity score set.

[0034] Furthermore, the step of performing weighted score calculation according to the additional entity feature set, the candidate entity description feature set and the similarity score set to obtain a weighted score set includes:

[0035] Performing information entropy calculation on each of the candidate entity description features and each additional entity feature in the additional entity feature set to obtain an information entropy set corresponding to each of the candidate entity description features;

[0036] Acquire the candidate entity description feature from the candidate entity description feature set as the entity feature to be analyzed;

[0037] Adding and calculating the information entropy sets corresponding to the entity features to be analyzed to obtain additional scores corresponding to the entity features to be analyzed;

[0038] Obtaining the similarity score corresponding to the entity feature to be analyzed from the similarity score set as the score to be calculated;

[0039] Performing a weighted summation on the additional score and the score to be calculated to obtain a weighted score corresponding to the entity feature to be analyzed;

[0040] Repeating the step of acquiring the candidate entity description feature from the candidate entity description feature set as the entity feature to be analyzed until the acquisition of the candidate entity description feature in the candidate entity description feature set is completed;

[0041] The weighted scores are taken as the weighted score set.

[0042] The present application also proposes an entity linking device based on artificial intelligence, the device comprising:

[0043] A data acquisition module, used to acquire a target text and a mention entity corresponding to the target text;

[0044] A hybrid entity feature determination module, configured to extract hybrid entity features based on the target text and the mentioned entity based on a hybrid entity feature extraction model, and determine a mentioned entity feature and an additional entity feature set;

[0045] A candidate entity description feature set acquisition module, used to acquire a candidate entity description feature set corresponding to the mentioned entity from an entity description feature library of a knowledge base;

[0046] A similarity score set determination module, configured to calculate a similarity score between each candidate entity description feature in the candidate entity description feature set and the mentioned entity feature according to the additional entity feature set, to obtain a similarity score set;

[0047] A weighted score set determination module, configured to perform weighted score calculation according to the additional entity feature set, the candidate entity description feature set and the similarity score set to obtain a weighted score set;

[0048] A target entity description feature determination module, configured to use the candidate entity description feature corresponding to the maximum weighted score in the weighted score set as the target entity description feature;

[0049] An entity linking module is used to link the mentioned entity to the entity corresponding to the target entity description feature.

[0050] The present application also proposes a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the above methods when executing the computer program.

[0051] The present application also proposes a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above methods are implemented.

[0052] The artificial intelligence-based entity linking method, apparatus, device and storage medium of the present application firstly extract hybrid entity features based on the target text and the mentioned entity based on a hybrid entity feature extraction model, determine the mentioned entity features and the additional entity feature set, obtain the candidate entity description feature set corresponding to the mentioned entity from the entity description feature library of the knowledge base, and then, based on the additional entity feature set, perform similarity score calculation on each candidate entity description feature in the candidate entity description feature set and the mentioned entity feature to obtain a similarity score set, and perform weighted score calculation on the additional entity feature set, the candidate entity description feature set and the similarity score set to obtain. to a weighted score set, and then the candidate entity description feature corresponding to the maximum weighted score in the weighted score set is used as the target entity description feature, and finally the mentioned entity is linked to the entity corresponding to the target entity description feature, and the information entropy of the candidate entity description features of the same attribute is increased by adding an entity feature set, thereby improving the accuracy of the calculated similarity score and the accuracy of entity linking; and a weighted score calculation is performed based on the additional entity feature set, the candidate entity description feature set and the similarity score set, thereby achieving an increase in the similarity score of the candidate entity description features of the same attribute by adding an entity feature set, and further improving the accuracy of entity linking. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 A flowchart of an entity linking method based on artificial intelligence according to an embodiment of the present application;

[0054] Figure 2 This is a schematic block diagram of the structure of an entity linking device based on artificial intelligence according to an embodiment of the present application;

[0055] Figure 3 A schematic block diagram of the structure of a computer device according to an embodiment of the present application.

[0056] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0057] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0058] Reference Figure 1 In an embodiment of the present application, an entity linking method based on artificial intelligence is provided, and the method comprises:

[0059] S1: Obtain a target text and a mention entity corresponding to the target text;

[0060] S2: Based on the hybrid entity feature extraction model, hybrid entity feature extraction is performed according to the target text and the mentioned entity to determine the mentioned entity feature and the additional entity feature set;

[0061] S3: Acquire a candidate entity description feature set corresponding to the mentioned entity from an entity description feature library of a knowledge base;

[0062] S4: Based on the additional entity feature set, a similarity score calculation is performed on each candidate entity description feature in the candidate entity description feature set and the mentioned entity feature to obtain a similarity score set;

[0063] S5: performing weighted score calculation according to the additional entity feature set, the candidate entity description feature set and the similarity score set to obtain a weighted score set;

[0064] S6: taking the candidate entity description feature corresponding to the maximum weighted score in the weighted score set as the target entity description feature;

[0065] S7: Link the mentioned entity to the entity corresponding to the target entity description feature.

[0066] In this embodiment, firstly, based on the hybrid entity feature extraction model, hybrid entity feature extraction is performed according to the target text and the mentioned entity, and the mentioned entity feature and the additional entity feature set are determined, and the candidate entity description feature set corresponding to the mentioned entity is obtained from the entity description feature library of the knowledge base. Secondly, according to the additional entity feature set, each candidate entity description feature in the candidate entity description feature set is calculated with the mentioned entity feature to obtain a similarity score set, and a weighted score is calculated according to the additional entity feature set, the candidate entity description feature set and the similarity score set to obtain a weighted score set, and then the weighted score set is calculated. The candidate entity description feature corresponding to the largest weighted score in the score set is used as the target entity description feature, and finally the mentioned entity is linked to the entity corresponding to the target entity description feature. The information entropy of the candidate entity description features of the same attribute is increased by adding an entity feature set, thereby improving the accuracy of the calculated similarity score and the accuracy of entity linking. Moreover, a weighted score calculation is performed based on the additional entity feature set, the candidate entity description feature set and the similarity score set, thereby achieving an increase in the similarity score of the candidate entity description features of the same attribute by adding an entity feature set, further improving the accuracy of entity linking.

[0067] For S1, the target text input by the user and the mentioned entity corresponding to the target text can be obtained, the target text and the mentioned entity corresponding to the target text can be obtained from a database, or the target text and the mentioned entity corresponding to the target text can be obtained from a third-party application system.

[0068] The target text can be any of long text, medium-long text, and short text. The number of characters in the long text is greater than or equal to the first threshold, the number of characters in the short text is less than or equal to the second threshold, and the number of characters in the medium-long text is between the second threshold and the first threshold (excluding the first threshold and the second threshold). The first threshold is a constant. The second threshold is a constant.

[0069] The mentioned entity corresponding to the target text is the entity in the target text that needs to be entity linked.

[0070] An entity is an abstraction of an objective individual. A person, a movie, or a city can all be considered an entity. For example, Cao Xueqin (name of a person), Crouching Tiger, Hidden Dragon (name of a movie), and Beijing (name of a city) are all entities. I will not limit this example here.

[0071] For S2, the mentioned entity and the target text are first concatenated, and then the concatenated text is input into the hybrid entity feature extraction model to perform label sequence prediction of BIO, feature extraction of label sequence, acquisition of mentioned entity features and acquisition of additional entity feature set respectively.

[0072] BIO, annotate each element as "BX", "IX" or "O". "BX" means that the fragment where this element is located is of type X and this element is at the beginning of this fragment, "IX" means that the fragment where this element is located is of type X and this element is in the middle of this fragment, and "O" means that it does not belong to any type. For example, type X is an entity.

[0073] Among them, the hybrid entity feature extraction model is a model trained based on the Bert (Bidirectional Encoder Representations from Transformers) model, LSTM (Long Short-Term Memory Artificial Neural Network) and CRF (Conditional Random Field).

[0074] Mention entity features are features of mentioned entities obtained by extracting features from a hybrid entity feature extraction model.

[0075] The additional entity feature set is a set of features obtained by extracting entities associated with the mentioned entity in the target text through a hybrid entity feature extraction model.

[0076] For example, the target text is "Paris is the son of King Priam", where the mentioned entity is Paris, and the entities associated with the mentioned entity in the target text include: king, Priam, and son. The additional entity feature set includes three additional entity features, which are: the feature corresponding to the entity "king", the feature corresponding to the entity "Priam", and the feature corresponding to the entity "son", which are not specifically limited in this example.

[0077] For S3, the knowledge base includes one or more entries. The entry information includes: entity, multiple categories, and description text for each category. For example, the entity of the entry information is "Victory", and the categories of the entry information include: summary, producer, foreign name, and meaning description. The description text of the category "Summary" is "The Victory series skin of League S is one of the commemorative limited series skins produced by Company Five", the description text of the category "Producer" is "Company Five", the description text of the category "Foreign Name" is "Victorious", and the description text of the category "Meaning Description" is "Game "League S" Victory series skin", and no specific limitation is given in this example.

[0078] The entity description feature library is a feature library obtained by using the Bert model based on each entry information in the knowledge base. The entity description feature library includes: entry information identifier, entity and entity description feature. The entity description feature is to use the Bert model to extract the features of the entity to be extracted (that is, the entity of the entry information) and the description text of each category corresponding to the entity to be extracted, and obtain the features output by the Bert model for the entity to be extracted. The entry information identifier can be an entry information ID, which is used to uniquely identify an entry information.

[0079] Optionally, the entity description feature is a feature of the entity of the term information.

[0080] Optionally, the entity description feature is a feature of the entity of the entry information extracted when the description text of each category of the entry information is used as the context. For example, the entity of the entry information and the description text of each category of the entry information are concatenated, and the concatenated text is input into the Bert model to obtain the feature data output by the Bert model for the entity of the entry information.

[0081] Among them, the name dictionary matching technology is adopted, and according to the mentioned entity, the entity is obtained from each entity in the entity description feature library of the knowledge base, and each entity description feature corresponding to the obtained entity is used as a candidate entity description feature, and all candidate entity description features are used as candidate entity description features.

[0082] For S4, firstly, the cross entropy between each candidate entity description feature and the text entity feature data is calculated, then the cross entropy between the mentioned entity feature and the candidate entity description feature set is calculated, and finally, based on the calculated cross entropy, a mixed cross entropy is calculated between each candidate entity description feature in the candidate entity description feature set and the mentioned entity feature, and each calculated mixed cross entropy is used as a similarity score, and each similarity score is used as a similarity score set; wherein the text entity feature data includes: the additional entity feature set and the mentioned entity feature. That is, the similarity score is the mixed cross entropy between the candidate entity description feature and the mentioned entity feature.

[0083] For S5, firstly, the information entropy is calculated for each candidate entity description feature and each additional entity feature in the additional entity feature set, and then, based on the calculated information entropy, an additional score is calculated for each candidate entity description feature, and finally, the additional score and the similarity score are weighted to obtain a weighted score, and each weighted score is used as the weighted score set. In other words, the weighted score expresses the comprehensive numerical value of the additional score and the similarity score. Thus, the final score (that is, the weighted score) of the candidate entity description features with the same attribute is increased by the additional entity feature set, which is conducive to selecting the entity corresponding to the candidate entity description feature with the greatest similarity as the link target of the mentioned entity corresponding to the target text, and further improving the accuracy of entity linking.

[0084] For S6, the largest weighted score is found from the weighted score set as the target score, and the candidate entity description feature corresponding to the target score is used as the target entity description feature, thereby finding the candidate entity description feature with the greatest similarity to the text entity feature data (that is, the mentioned entity feature and the additional entity feature set).

[0085] For S7, the term information identifier corresponding to the target entity description feature is used as the target term information identifier, and the mentioned entity corresponding to the target text is linked to the entity of the term information corresponding to the target term information identifier in the knowledge base.

[0086] In one embodiment, the step of performing hybrid entity feature extraction based on the target text and the mentioned entity based on the hybrid entity feature extraction model and determining the mentioned entity feature and the additional entity feature set includes:

[0087] S21: concatenating the mentioned entity and the target text to obtain a text to be analyzed;

[0088] S22: using the hybrid entity feature extraction model to generate a label sequence according to the text to be analyzed;

[0089] S23: Using the hybrid entity feature extraction model, generate the mentioned entity feature and the additional entity feature set according to the tag sequence.

[0090] This embodiment first concatenates the mentioned entity and the target text, and then uses a hybrid entity feature extraction model to perform hybrid entity feature extraction, thereby extracting mentioned entity features and additional entity feature sets, providing support for increasing the information entropy of candidate entity description features of the same attribute through additional entity feature sets.

[0091] For S21, the mentioned entity and the target text are sequentially concatenated, and the concatenated text is used as the text to be analyzed.

[0092] For S22, the hybrid entity feature extraction model is used to perform feature extraction and BIO labeling according to the text to be analyzed, and the data obtained by labeling is used as a label sequence.

[0093] For S23, the hybrid entity feature extraction model is used to perform feature extraction on the tag sequence, and the mentioned entity feature and the additional entity feature set are obtained from the extracted features.

[0094] In one embodiment, the step of using the hybrid entity feature extraction model to generate a label sequence according to the text to be analyzed includes:

[0095] S221: using the first feature extraction layer of the hybrid entity feature extraction model to generate text features for the text to be analyzed;

[0096] S222: Using the label annotation layer of the hybrid entity feature extraction model to generate the label sequence for the text feature.

[0097] This embodiment first uses a first feature extraction layer to extract features from the text to be analyzed, and then uses a labeling layer to label the extracted features, thereby effectively capturing the context and semantic information in the text to be analyzed, and providing support for extracting an accurate additional entity feature set.

[0098] For S221, the text to be analyzed is input into the first feature extraction layer, and data output by the first feature extraction layer is obtained as text features.

[0099] Optionally, the first feature extraction layer includes: an input layer and a feature extraction layer, wherein the feature extraction layer adopts a Bert model.

[0100] For S222, the text features are input into the label annotation layer to annotate the BIO labels, and the annotated data is used as the label sequence.

[0101] Optionally, the label annotation layer includes: an LSTM layer and a CRF layer in sequence. The LSTM layer is used to generate representations of features of the mentioned entity and the additional entity using latent features of the text.

[0102] It is understandable that when labeling the BIO tag, [CLS] and [SEP] are labeled with the tag TAG.

[0103] In one embodiment, the step of using the hybrid entity feature extraction model to generate the mentioned entity features and the additional entity feature set according to the tag sequence includes:

[0104] S231: Obtain a flag character, and concatenate the flag character with the tag sequence to obtain a sequence to be analyzed;

[0105] S232: using the second feature extraction layer of the hybrid entity feature extraction model to extract features from the sequence to be analyzed;

[0106] S233: According to the mentioned entity, obtaining data output by the second feature extraction layer as the mentioned entity feature;

[0107] S234: Obtain the data output by the second feature extraction layer for the flag character to obtain the additional entity feature set.

[0108] Because the first feature extraction layer and the label annotation layer do not recognize entity boundaries, this embodiment first adds flag characters and then uses the second feature extraction layer to extract features from the sequence to be analyzed to obtain entities with more information entropy, thereby giving more weight allocation to the additional entities corresponding to the mentioned entity, thereby improving the accuracy of the additional entity feature set.

[0109] For S231, the flag character and the tag sequence are sequentially concatenated to obtain a sequence to be analyzed. That is, the flag character is located at the beginning of the sequence to be analyzed.

[0110] Optionally, the flag character is set to CLS.

[0111] For S232, the sequence to be analyzed is input into the second feature extraction layer of the hybrid entity feature extraction model for feature extraction.

[0112] Optionally, the second feature extraction layer adopts a Bert model.

[0113] For S233, data output by the second feature extraction layer for the mentioned entity is obtained as the mentioned entity feature.

[0114] For S234, the second feature extraction layer connects the mentioned entity feature and each additional entity feature at the position corresponding to the flag character, and the additional entity feature set can be obtained from the features output by the second feature extraction layer at the position corresponding to the flag character.

[0115] In one embodiment, the step of calculating a similarity score between each candidate entity description feature in the candidate entity description feature set and the mentioned entity feature according to the additional entity feature set to obtain a similarity score set includes:

[0116] S41: performing cross entropy calculation on each of the candidate entity description features and text entity feature data to obtain a first cross entropy set, wherein the text entity feature data includes the mentioned entity feature and the additional entity feature set;

[0117] S42: performing cross entropy calculation on the mentioned entity feature and the candidate entity description feature set to obtain a second cross entropy;

[0118] S43: Based on the first cross entropy set and the second cross entropy, a similarity score is calculated for each of the candidate entity description features and the mentioned entity feature to obtain the similarity score set.

[0119] This embodiment first calculates the cross entropy between each candidate entity description feature and the text entity feature data, then calculates the cross entropy between the mentioned entity feature and the candidate entity description feature set, and finally, based on the calculated cross entropy, performs mixed cross entropy calculation on each candidate entity description feature in the candidate entity description feature set and the mentioned entity feature, and uses the calculated mixed cross entropy as a similarity score, so that the obtained similarity score is more in line with the actual situation, improves the accuracy of the calculated similarity score, and improves the accuracy of entity linking.

[0120] For S41, a cross entropy function is used to perform cross entropy calculation on each of the candidate entity description features and text entity feature data, that is, the cross entropy between the candidate entity description features and the text entity feature data is calculated, and each calculated cross entropy is used as a first cross entropy, and all first cross entropies are used as a first cross entropy set.

[0121] For S42, a cross entropy function is used to perform cross entropy calculation on the mentioned entity features and the candidate entity description feature set, that is, the cross entropy between the mentioned entity features and the candidate entity description feature set is calculated, and the calculated cross entropy is used as the second cross entropy.

[0122] For S43, based on the first cross entropy set and the second cross entropy, a mixed cross entropy calculation is performed for each of the candidate entity description features and the mentioned entity features, each calculated mixed cross entropy is used as a similarity score, and all similarity scores are used as the similarity score set.

[0123] In one embodiment, the step of calculating a similarity score between each of the candidate entity description features and the mentioned entity features based on the first cross entropy set and the second cross entropy to obtain the similarity score set includes:

[0124] S431: Acquire the entity quantity corresponding to the text entity feature data as the first entity quantity;

[0125] S432: Obtain the number of the candidate entity description features in the candidate entity description feature set as the second entity number;

[0126] S433: Add the first entity quantity and the second entity quantity to obtain a total entity quantity;

[0127] S434: adding each first cross entropy in the first cross entropy set to the second cross entropy respectively to obtain a cross entropy comprehensive value set;

[0128] S435: Divide each cross entropy comprehensive value in the cross entropy comprehensive value set by the total number of entities to obtain the similarity score set.

[0129] This embodiment performs mixed cross entropy calculation on each candidate entity description feature in the candidate entity description feature set and the mentioned entity feature based on the calculated cross entropy, and uses the calculated mixed cross entropy as a similarity score, so that the obtained similarity score is more in line with the actual situation, improves the accuracy of the calculated similarity score, and improves the accuracy of entity linking.

[0130] For S431, the total number of entities corresponding to the text entity feature data is calculated as the first entity number. It can be understood that each entity feature in the mentioned entity feature and the additional entity feature set (ie, the mentioned entity feature, the additional entity feature) corresponds to one entity.

[0131] For S433, the first entity quantity and the second entity quantity are added, and the added data is used as the total entity quantity.

[0132] For S434, the first cross entropy and the second cross entropy are added, and the added data is used as the cross entropy comprehensive value.

[0133] For S435, the cross entropy comprehensive value is divided by the total number of entities to obtain a mixed cross entropy, each calculated mixed cross entropy is used as a similarity score, and all similarity scores are used as the similarity score set.

[0134] In one embodiment, the step of performing weighted score calculation based on the additional entity feature set, the candidate entity description feature set and the similarity score set to obtain the weighted score set includes:

[0135] S51: performing information entropy calculation on each of the candidate entity description features and each additional entity feature in the additional entity feature set to obtain an information entropy set corresponding to each of the candidate entity description features;

[0136] S52: Acquire the candidate entity description feature from the candidate entity description feature set as the entity feature to be analyzed;

[0137] S53: performing sum calculation on the information entropy sets corresponding to the entity features to be analyzed to obtain additional scores corresponding to the entity features to be analyzed;

[0138] S54: acquiring the similarity score corresponding to the entity feature to be analyzed from the similarity score set as the score to be calculated;

[0139] S55: performing weighted summation on the additional score and the score to be calculated to obtain a weighted score corresponding to the entity feature to be analyzed;

[0140] S56: Repeat the step of acquiring the candidate entity description feature from the candidate entity description feature set as the entity feature to be analyzed until the acquisition of the candidate entity description feature in the candidate entity description feature set is completed;

[0141] S57: taking each of the weighted scores as the weighted score set.

[0142] This embodiment first calculates the information entropy of each candidate entity description feature and each additional entity feature in the additional entity feature set, then calculates an additional score for each candidate entity description feature based on the calculated information entropy, and finally weights the additional score and the similarity score to obtain a weighted score, thereby increasing the final score of the candidate entity description features with the same attributes through the additional entity feature set, which is conducive to selecting the entity corresponding to the candidate entity description feature with the greatest similarity as the link target of the mentioned entity corresponding to the target text, further improving the accuracy of entity linking.

[0143] For S51, an information entropy function is used to calculate information entropy between the candidate entity description feature and each additional entity feature in the additional entity feature set to obtain an information entropy set corresponding to the candidate entity description feature. In other words, each information entropy in the information entropy set represents data of one candidate entity description feature and one additional entity feature.

[0144] For S52, the candidate entity description features are acquired from the candidate entity description feature set in sequence, and the acquired candidate entity description features are used as entity features to be analyzed.

[0145] For S53, each information entropy in the information entropy set corresponding to the entity feature to be analyzed is added and calculated, and the added data is used as the additional score corresponding to the entity feature to be analyzed.

[0146] For S55, a preset weighting rule is adopted to perform a weighted summation on the additional score and the score to be calculated, and the data obtained by the weighted summation is used as the weighted score corresponding to the entity feature to be analyzed, thereby achieving the goal of increasing the final score of the candidate entity description features of the same attribute and reducing the final score of the candidate entity description features of different attributes through the additional entity feature set, which is conducive to selecting the entity corresponding to the candidate entity description feature with the greatest similarity as the link target of the mentioned entity corresponding to the target text.

[0147] It can be understood that each of the candidate entity description features corresponds to a weighted score.

[0148] For S56, steps S52 to S56 are repeatedly executed until the acquisition of the candidate entity description features in the candidate entity description feature set is completed.

[0149] Reference Figure 2 , the present application also proposes an entity linking device based on artificial intelligence, the device comprising:

[0150] A data acquisition module 100 is used to acquire a target text and a mention entity corresponding to the target text;

[0151] A hybrid entity feature determination module 200 is used to perform hybrid entity feature extraction based on the target text and the mentioned entity based on a hybrid entity feature extraction model, and determine a mentioned entity feature and an additional entity feature set;

[0152] A candidate entity description feature set acquisition module 300 is used to acquire a candidate entity description feature set corresponding to the mentioned entity from an entity description feature library of a knowledge base;

[0153] A similarity score set determination module 400 is used to calculate the similarity score between each candidate entity description feature in the candidate entity description feature set and the mentioned entity feature according to the additional entity feature set, so as to obtain a similarity score set;

[0154] A weighted score set determination module 500 is used to perform weighted score calculation according to the additional entity feature set, the candidate entity description feature set and the similarity score set to obtain a weighted score set;

[0155] A target entity description feature determination module 600 is used to take the candidate entity description feature corresponding to the maximum weighted score in the weighted score set as the target entity description feature;

[0156] The entity linking module 700 is used to link the mentioned entity to the entity corresponding to the target entity description feature.

[0157] In this embodiment, firstly, based on the hybrid entity feature extraction model, hybrid entity feature extraction is performed according to the target text and the mentioned entity, and the mentioned entity feature and the additional entity feature set are determined, and the candidate entity description feature set corresponding to the mentioned entity is obtained from the entity description feature library of the knowledge base. Secondly, according to the additional entity feature set, each candidate entity description feature in the candidate entity description feature set is calculated with the mentioned entity feature to obtain a similarity score set, and a weighted score is calculated according to the additional entity feature set, the candidate entity description feature set and the similarity score set to obtain a weighted score set, and then the weighted score set is calculated. The candidate entity description feature corresponding to the largest weighted score in the score set is used as the target entity description feature, and finally the mentioned entity is linked to the entity corresponding to the target entity description feature. The information entropy of the candidate entity description features of the same attribute is increased by adding an entity feature set, thereby improving the accuracy of the calculated similarity score and the accuracy of entity linking. Moreover, a weighted score calculation is performed based on the additional entity feature set, the candidate entity description feature set and the similarity score set, thereby achieving an increase in the similarity score of the candidate entity description features of the same attribute by adding an entity feature set, further improving the accuracy of entity linking.

[0158] Reference Figure 3 In the embodiment of the present application, a computer device is also provided. The computer device may be a server, and its internal structure may be as follows: Figure 3As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor designed by the computer is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as an entity linking method based on artificial intelligence. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an entity linking method based on artificial intelligence is implemented. The artificial intelligence-based entity linking method includes: obtaining a target text and a mentioned entity corresponding to the target text; based on a hybrid entity feature extraction model, performing hybrid entity feature extraction according to the target text and the mentioned entity, and determining a mentioned entity feature and an additional entity feature set; obtaining a candidate entity description feature set corresponding to the mentioned entity from an entity description feature library of a knowledge base; performing similarity score calculation on each candidate entity description feature in the candidate entity description feature set and the mentioned entity feature according to the additional entity feature set, to obtain a similarity score set; performing weighted score calculation according to the additional entity feature set, the candidate entity description feature set and the similarity score set, to obtain a weighted score set; using the candidate entity description feature corresponding to the maximum weighted score in the weighted score set as the target entity description feature; and linking the mentioned entity to the entity corresponding to the target entity description feature.

[0159] In this embodiment, firstly, based on the hybrid entity feature extraction model, hybrid entity feature extraction is performed according to the target text and the mentioned entity, and the mentioned entity feature and the additional entity feature set are determined, and the candidate entity description feature set corresponding to the mentioned entity is obtained from the entity description feature library of the knowledge base. Secondly, according to the additional entity feature set, each candidate entity description feature in the candidate entity description feature set is calculated with the mentioned entity feature to obtain a similarity score set, and a weighted score is calculated according to the additional entity feature set, the candidate entity description feature set and the similarity score set to obtain a weighted score set, and then the weighted score set is calculated. The candidate entity description feature corresponding to the largest weighted score in the score set is used as the target entity description feature, and finally the mentioned entity is linked to the entity corresponding to the target entity description feature. The information entropy of the candidate entity description features of the same attribute is increased by adding an entity feature set, thereby improving the accuracy of the calculated similarity score and the accuracy of entity linking. Moreover, a weighted score calculation is performed based on the additional entity feature set, the candidate entity description feature set and the similarity score set, thereby achieving an increase in the similarity score of the candidate entity description features of the same attribute by adding an entity feature set, further improving the accuracy of entity linking.

[0160] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, an entity linking method based on artificial intelligence is implemented, comprising the steps of: obtaining a target text and a mentioned entity corresponding to the target text; performing mixed entity feature extraction based on the target text and the mentioned entity based on a mixed entity feature extraction model to determine a mentioned entity feature and an additional entity feature set; obtaining a candidate entity description feature set corresponding to the mentioned entity from an entity description feature library of a knowledge base; performing similarity score calculation on each candidate entity description feature in the candidate entity description feature set and the mentioned entity feature based on the additional entity feature set to obtain a similarity score set; performing weighted score calculation based on the additional entity feature set, the candidate entity description feature set and the similarity score set to obtain a weighted score set; taking the candidate entity description feature corresponding to the maximum weighted score in the weighted score set as the target entity description feature; and linking the mentioned entity to the entity corresponding to the target entity description feature.

[0161] The above-mentioned artificial intelligence-based entity linking method, in this embodiment, firstly performs hybrid entity feature extraction based on the target text and the mentioned entity based on a hybrid entity feature extraction model, determines the mentioned entity feature and the additional entity feature set, obtains the candidate entity description feature set corresponding to the mentioned entity from the entity description feature library of the knowledge base, and then, based on the additional entity feature set, performs similarity score calculation on each candidate entity description feature in the candidate entity description feature set and the mentioned entity feature to obtain a similarity score set, and performs weighted score calculation based on the additional entity feature set, the candidate entity description feature set and the similarity score set to obtain a weighted score. The method further comprises the following steps: first, the method comprises the step of: collecting the candidate entity description features corresponding to the largest weighted score in the weighted score set as the target entity description features, and finally linking the mentioned entity to the entity corresponding to the target entity description features. The information entropy of the candidate entity description features of the same attribute is increased by adding an entity feature set, thereby improving the accuracy of the calculated similarity score and the accuracy of entity linking. The method further comprises the step of: performing weighted score calculation based on the additional entity feature set, the candidate entity description feature set and the similarity score set, thereby increasing the similarity score of the candidate entity description features of the same attribute by adding an entity feature set, and further improving the accuracy of entity linking.

[0162] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided in this application and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0163] 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, device, article or method 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, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, device, article or method including the element.

[0164] The above description is only a preferred embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. An entity linking method based on artificial intelligence, characterized in that: The method comprises: Obtaining a target text and a mention entity corresponding to the target text; Based on the hybrid entity feature extraction model, hybrid entity feature extraction is performed according to the target text and the mentioned entity to determine the mentioned entity feature and the additional entity feature set; Acquire a candidate entity description feature set corresponding to the mentioned entity from an entity description feature library of a knowledge base; According to the additional entity feature set, a similarity score is calculated between each candidate entity description feature in the candidate entity description feature set and the mentioned entity feature to obtain a similarity score set; Performing weighted score calculation according to the additional entity feature set, the candidate entity description feature set and the similarity score set to obtain a weighted score set; Taking the candidate entity description feature corresponding to the maximum weighted score in the weighted score set as the target entity description feature; Linking the mentioned entity to the entity corresponding to the descriptive feature of the target entity; The step of performing mixed entity feature extraction based on the target text and the mentioned entity based on the mixed entity feature extraction model to determine the mentioned entity feature and the additional entity feature set includes: Concatenating the mentioned entity and the target text to obtain a text to be analyzed; Using the hybrid entity feature extraction model, generating a label sequence according to the text to be analyzed; Using the hybrid entity feature extraction model, generating the mentioned entity feature and the additional entity feature set according to the tag sequence; The step of using the hybrid entity feature extraction model to generate the mentioned entity features and the additional entity feature set according to the tag sequence includes: Obtaining a flag character, and concatenating the flag character with the tag sequence to obtain a sequence to be analyzed; Using the second feature extraction layer of the hybrid entity feature extraction model to extract features from the sequence to be analyzed; According to the mentioned entity, acquiring data output by the second feature extraction layer as the mentioned entity feature; The data output by the second feature extraction layer for the flag character is obtained to obtain the additional entity feature set.

2. The entity linking method based on artificial intelligence according to claim 1, characterized in that: The step of using the hybrid entity feature extraction model to generate a label sequence according to the text to be analyzed includes: Using the first feature extraction layer of the hybrid entity feature extraction model, generating text features for the text to be analyzed; The label annotation layer of the hybrid entity feature extraction model is used to generate the label sequence according to the text feature.

3. The entity linking method based on artificial intelligence according to claim 1, characterized in that: The step of calculating a similarity score between each candidate entity description feature in the candidate entity description feature set and the mentioned entity feature according to the additional entity feature set to obtain a similarity score set includes: Performing cross entropy calculation on each of the candidate entity description features and text entity feature data to obtain a first cross entropy set, wherein the text entity feature data includes the mentioned entity feature and the additional entity feature set; Performing cross entropy calculation on the mentioned entity features and the candidate entity description feature set to obtain a second cross entropy; A similarity score is calculated for each of the candidate entity description features and the mentioned entity features according to the first cross entropy set and the second cross entropy to obtain the similarity score set.

4. The artificial intelligence-based entity linking method according to claim 3, characterized in that: The step of calculating a similarity score between each of the candidate entity description features and the mentioned entity features according to the first cross entropy set and the second cross entropy to obtain the similarity score set comprises: Obtaining the entity quantity corresponding to the text entity feature data as the first entity quantity; Obtaining the number of the candidate entity description features in the candidate entity description feature set as the second entity number; Adding the first entity quantity and the second entity quantity to obtain a total entity quantity; Adding each first cross entropy in the first cross entropy set to the second cross entropy respectively to obtain a cross entropy comprehensive value set; Each cross entropy comprehensive value in the cross entropy comprehensive value set is divided by the total number of entities to obtain the similarity score set.

5. The artificial intelligence-based entity linking method according to claim 1, characterized in that: The step of performing weighted score calculation according to the additional entity feature set, the candidate entity description feature set and the similarity score set to obtain a weighted score set comprises: Performing information entropy calculation on each of the candidate entity description features and each additional entity feature in the additional entity feature set to obtain an information entropy set corresponding to each of the candidate entity description features; Acquire the candidate entity description feature from the candidate entity description feature set as the entity feature to be analyzed; Adding and calculating the information entropy sets corresponding to the entity features to be analyzed to obtain additional scores corresponding to the entity features to be analyzed; Obtaining the similarity score corresponding to the entity feature to be analyzed from the similarity score set as the score to be calculated; Performing a weighted summation on the additional score and the score to be calculated to obtain a weighted score corresponding to the entity feature to be analyzed; Repeating the step of acquiring the candidate entity description feature from the candidate entity description feature set as the entity feature to be analyzed until the acquisition of the candidate entity description feature in the candidate entity description feature set is completed; The weighted scores are taken as the weighted score set.

6. An entity linking device based on artificial intelligence, characterized in that: For executing the method according to any one of claims 1 to 5, the device comprises: A data acquisition module, used to acquire a target text and a mention entity corresponding to the target text; A hybrid entity feature determination module, configured to extract hybrid entity features based on the target text and the mentioned entity based on a hybrid entity feature extraction model, and determine a mentioned entity feature and an additional entity feature set; A candidate entity description feature set acquisition module, used to acquire a candidate entity description feature set corresponding to the mentioned entity from an entity description feature library of a knowledge base; A similarity score set determination module, configured to calculate a similarity score between each candidate entity description feature in the candidate entity description feature set and the mentioned entity feature according to the additional entity feature set, to obtain a similarity score set; A weighted score set determination module, configured to perform weighted score calculation according to the additional entity feature set, the candidate entity description feature set and the similarity score set to obtain a weighted score set; A target entity description feature determination module, configured to use the candidate entity description feature corresponding to the maximum weighted score in the weighted score set as the target entity description feature; An entity linking module is used to link the mentioned entity to the entity corresponding to the target entity description feature.

7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.

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

Citation Information

Patent Citations

  • An entity linking method based on deep learning

    CN108959270A

  • Target entity linking method and device, equipment and storage medium

    CN110147421A