Entity mention recognition method, device, apparatus and storage medium

By calculating the semantic similarity between candidate entity mentions and the global semantic similarity, target entity mentions are filtered out, which solves the problem of low accuracy of deep learning models in entity mention recognition and achieves higher recognition accuracy.

CN115221888BActive Publication Date: 2026-03-20BEIJING SANKUAI ONLINE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In existing technologies, deep learning models have low accuracy in entity mention recognition, resulting in poor entity linking performance.

Method used

By calculating the semantic similarity between candidate entity mentions, and using fusion vectors and global semantic similarity to filter out target entity mentions, the recognition accuracy is improved.

Benefits of technology

It improves the accuracy of entity mention identification, ensuring that, based on the initial identification of candidate entity mentions, the target entity mention can be further identified by utilizing semantic similarity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115221888B_ABST
    Figure CN115221888B_ABST
Patent Text Reader

Abstract

The application discloses an entity mention identification method and device, equipment and storage medium, and belongs to the computer technical field. The method comprises the following steps: obtaining a to-be-processed text; determining at least two candidate entity mentions in the to-be-processed text; for any candidate entity mention, calculating the first semantic similarity between the candidate entity mention and other candidate entity mentions, wherein the other candidate entity mentions are at least one candidate entity mention except the any candidate entity mention among the at least two candidate entity mentions; determining the global semantic similarity of the any candidate entity mention by using the first semantic similarity between the any candidate entity mention and the other candidate entity mentions; and screening a target entity mention from the candidate entity mentions according to the global semantic similarity of each candidate entity mention. The application further identifies the target entity mention by the semantic similarity between the candidate entity mentions in the text, and can improve the identification accuracy of the entity mention.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of computer, and particularly relate to an entity mention identification method and device, equipment and storage medium. BACKGROUND

[0002] Natural language analysis is an important technology, covering information retrieval, information extraction and natural language question answering and other technical fields, wherein, the entity linking technology is an important part of natural language analysis.

[0003] The entity linking technology is to link the entity mention in the text to the entity in the knowledge base actually pointed by the entity mention, wherein, the entity mention refers to the entity appearing in the text. For example, for the text "has the World Cup started yet", the text contains the entity mention "World Cup", and the entity linking technology needs to be used to link the entity mention "World Cup" to the entity "FIFA World Cup" in the knowledge base.

[0004] In the related art, a deep learning model of two tasks can be used for entity linking. Specifically, the text can be input into the deep learning model, one task of the deep learning model is an entity mention identification task, which can identify the entity mention in the input text; another task of the deep learning model is an entity mention classification task, which can match the identified entity mention with each entity, so as to determine the category to which the entity mention belongs, i.e., determine the entity to which the entity mention is linked.

[0005] As can be seen from the above, in the entity linking technology, the identification of the entity mention is crucial, which greatly affects the effect of entity linking. The related art identifies the entity mention in the text through the deep learning model, which only extracts the entity mention from the text according to the semantic features of the text, resulting in that the extracted entity mention may be wrong, thereby resulting in a low accuracy of the identification of the entity mention. SUMMARY

[0006] Embodiments of the present application provide an entity mention identification method, device, equipment and storage medium, which can be used to solve the problems in the related art. The technical solution is as follows:

[0007] In one aspect, the present application provides an entity mention identification method, which comprises:

[0008] obtaining a to-be-processed text;

[0009] determining at least two candidate entity mentions in the to-be-processed text;

[0010] For any candidate entity mention, a first semantic similarity between the any candidate entity mention and other candidate entity mentions is calculated, the other candidate entity mentions being at least one candidate entity mention among the at least two candidate entity mentions other than the any candidate entity mention;

[0011] A global semantic similarity of the any candidate entity mention is determined by using the first semantic similarity between the any candidate entity mention and the other candidate entity mentions;

[0012] A target entity mention is filtered from the respective candidate entity mentions according to the global semantic similarity of the respective candidate entity mentions.

[0013] In a possible implementation, the calculating the first semantic similarity between the any candidate entity mention and the other candidate entity mentions comprises:

[0014] At least one to-be-linked entity corresponding to the any candidate entity mention is determined from an entity library;

[0015] A semantic vector of the respective candidate entity mention and a semantic vector of the respective to-be-linked entity are determined;

[0016] The semantic vector of the any candidate entity mention and the semantic vector of the respective to-be-linked entity corresponding to the any candidate entity mention are fused to obtain a fusion vector of the any candidate entity mention;

[0017] The first semantic similarity between the any candidate entity mention and the other candidate entity mentions is calculated by using the fusion vector of the respective candidate entity mention.

[0018] In a possible implementation, the fusing the semantic vector of the any candidate entity mention and the semantic vector of the respective to-be-linked entity corresponding to the any candidate entity mention to obtain the fusion vector of the any candidate entity mention comprises:

[0019] A second semantic similarity between the any candidate entity mention and the respective to-be-linked entity corresponding to the any candidate entity mention is calculated by using the semantic vector of the any candidate entity mention and the semantic vector of the respective to-be-linked entity corresponding to the any candidate entity mention;

[0020] The fusion vector of the any candidate entity mention is determined by using the second semantic similarity between the any candidate entity mention and the respective to-be-linked entity corresponding to the any candidate entity mention, and the semantic vector of the respective to-be-linked entity corresponding to the any candidate entity mention.

[0021] In a possible implementation, the determining the global semantic similarity of the any candidate entity mention based on the first semantic similarity between the any candidate entity mention and the other candidate entity mentions comprises:

[0022] The global semantic similarity of the any candidate entity mention is determined based on the initial semantic similarity of the respective candidate entity mentions and the first semantic similarity between the any candidate entity mention and the other candidate entity mentions.

[0023] In a possible implementation, the method further comprises:

[0024] The initial semantic similarity of the any candidate entity mention is determined based on the global semantic similarity of the respective target entity mentions corresponding to the respective candidate entity mentions of the any candidate entity mention and the second semantic similarity between the any candidate entity mention and the respective target entity mentions corresponding to the respective candidate entity mentions of the any candidate entity mention.

[0025] In a possible implementation, the method further comprises:

[0026] For any target entity, the third semantic similarity between the any target entity and other target entities is calculated, the other target entities being at least one target entity other than the any target entity among the respective target entity mentions corresponding to the respective candidate entity mentions of the any target entity;

[0027] The global semantic similarity of the any target entity is determined based on the initial semantic similarity of the respective target entity and the third semantic similarity between the any target entity and the other target entities.

[0028] In a possible implementation, the method further comprises:

[0029] The initial semantic similarity of the any target entity is determined based on the second semantic similarity between the any target entity and the respective candidate entity mentions corresponding to the any target entity.

[0030] In a possible implementation, the method further comprises:

[0031] The target linking entity is determined from the respective target entity mentions corresponding to the any target entity based on the global semantic similarity of the respective target entity mentions corresponding to the any target entity.

[0032] The any target entity mention is linked to the target linking entity.

[0033] In another aspect, an entity mention identifying apparatus is provided, the apparatus comprising:

[0034] The acquisition module is used to acquire the text to be processed;

[0035] The determination module is used to determine at least two candidate entity mentions in the text to be processed;

[0036] The calculation module is used to calculate, for any candidate entity mention, a first semantic similarity between the candidate entity mention and other candidate entity mentions, wherein the other candidate entity mentions are at least one candidate entity mention other than the candidate entity mention among the at least two candidate entity mentions;

[0037] The determining module is further configured to determine the global semantic similarity of any candidate entity mention using the first semantic similarity between any candidate entity mention and other candidate entity mentions;

[0038] The filtering module is used to filter out the target entity mentions from the various candidate entity mentions based on the global semantic similarity of the mentions of each candidate entity.

[0039] In one possible implementation, the calculation module is configured to: determine at least one entity to be linked corresponding to any candidate entity mention from the entity library; determine the semantic vector of each candidate entity mention and the semantic vector of each entity to be linked; fuse the semantic vector of any candidate entity mention and the semantic vector of each entity to be linked corresponding to any candidate entity mention to obtain a fused vector of any candidate entity mention; and use the fused vector of each candidate entity mention to calculate a first semantic similarity between any candidate entity mention and other candidate entity mentions.

[0040] In one possible implementation, the calculation module is configured to use the semantic vector of any candidate entity mention and the semantic vectors of each entity to be linked corresponding to the candidate entity mention to calculate a second semantic similarity between the candidate entity mention and each entity to be linked corresponding to the candidate entity mention; and to use the second semantic similarity between the candidate entity mention and each entity to be linked corresponding to the candidate entity mention, and the semantic vectors of each entity to be linked corresponding to the candidate entity mention, to determine the fusion vector of the candidate entity mention.

[0041] In one possible implementation, the determining module is configured to determine the global semantic similarity of any candidate entity mention using the initial semantic similarity of each candidate entity mention and the first semantic similarity between any candidate entity mention and the other candidate entity mentions.

[0042] In a possible implementation, the determining module is further configured to determine the initial semantic similarity of any candidate entity mention by using the global semantic similarity of the any candidate entity mention to the corresponding each entity to be linked and the second semantic similarity between the any candidate entity mention and the second semantic similarity between the any candidate entity mention and the corresponding each candidate entity mention corresponding to the any candidate entity mention.

[0043] In a possible implementation, the calculating module is further configured to, for any entity to be linked, calculate a third semantic similarity between the any entity to be linked and other entities to be linked, the other entities to be linked being at least one entity to be linked other than the any entity to be linked in the corresponding each entity to be linked of the each candidate entity mention.

[0044] The determining module is further configured to determine the global semantic similarity of the any entity to be linked by using the initial semantic similarity of each entity to be linked and the third semantic similarity between the any entity to be linked and the other entities to be linked.

[0045] In a possible implementation, the determining module is further configured to determine the initial semantic similarity of the any entity to be linked by using the second semantic similarity between the any entity to be linked and the corresponding each candidate entity mention corresponding to the any entity to be linked.

[0046] In a possible implementation, the apparatus further includes a linking module, and the determining module is further configured to determine a target linked entity from the corresponding each entity to be linked of the any target entity mention according to the global semantic similarity of the any target entity mention to the corresponding each entity to be linked.

[0047] The linking module is configured to link the any target entity mention to the target linked entity.

[0048] The linking module is configured to link the any target entity mention to the target linked entity.

[0049] In another aspect, a computer device is provided, which includes a processor and a memory, and the memory stores at least one instruction, which, when executed by the processor, causes the computer device to implement any of the above-mentioned entity mention identification methods.

[0050] In another aspect, a computer readable storage medium is also provided, which stores at least one instruction, which, when executed, implements any of the above-mentioned entity mention identification methods.

[0051] In another aspect, a computer program or computer program product is provided, in which at least one computer instruction is stored, and the at least one computer instruction is loaded and executed by a processor to implement the entity mention recognition method described above.

[0052] The technical scheme provided by the embodiments of the present application brings at least the following beneficial effects:

[0053] After the candidate entity mentions in the text are preliminarily identified, the semantic similarity between each two candidate entity mentions in the text is calculated, and the global semantic similarity of a candidate entity mention is calculated by using the semantic similarity between the candidate entity mention and other candidate entity mentions, so as to determine whether the candidate entity mention is the target entity mention, thereby realizing that the semantic similarity between the candidate entity mentions in the text is used to further identify the target entity mention on the basis of the candidate entity mentions in the text being preliminarily identified, and the identification accuracy of the entity mention is improved. BRIEF DESCRIPTION OF DRAWINGS

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

[0055] Figure 1 is a schematic diagram of an implementation environment provided by the embodiments of the present application;

[0056] Figure 2 is a flowchart of an entity mention recognition method provided by the embodiments of the present application;

[0057] Figure 3 is a schematic diagram of the relationship between an entity mention and an entity provided by the embodiments of the present application;

[0058] Figure 4 is a schematic diagram of an entity mention recognition device provided by the embodiments of the present application;

[0059] Figure 5 is a schematic diagram of the structure of an electronic device provided by the embodiments of the present application. DETAILED DESCRIPTION

[0060] In order to make the purpose, technical scheme and advantages of the present application more clear, the embodiments of the present application will be further described in detail below with reference to the drawings.

[0061] The embodiments of the present application provide an entity mention recognition method, as shown in Figure 1 Figure 1 ​Fig. 1 is a schematic diagram of an implementation environment of an entity mention recognition method provided in an embodiment of the present application. The implementation environment includes an electronic device 11. The electronic device 11 can include at least one of a terminal device or a server. It can be understood that the entity mention recognition method in the embodiment of the present application can be executed by the electronic device 11.

[0062] The terminal device can be at least one of a smart phone, a game console, a desktop computer, a tablet computer, an e-book reader, an MP3 (Moving Picture Experts Group Audio Layer III) player, an MP4 (Moving Picture Experts Group Audio Layer IV) player, and a laptop computer.

[0063] The server can be a server, or a server cluster composed of multiple servers, or any one of a cloud computing platform and a virtualization center, and the embodiment of the present application does not limit this. The server can be connected to the terminal device through a wired network or a wireless network. The server can have functions of data processing, data storage, and data transceiving, and the embodiment of the present application does not limit this.

[0064] The entity mention recognition method provided in the embodiment of the present application can be as shown in Fig. 2. Figure 2 Figure 2 Fig. 3 is a flowchart of an entity mention recognition method provided in an embodiment of the present application. Taking an example that the method is executed by an electronic device, the method provided in the embodiment of the present application can include steps S21-S25.

[0065] In step S21, a to-be-processed text is acquired.

[0066] In the embodiment of the present application, the acquisition manner of the to-be-processed text is not limited. In a possible implementation manner, a user can input a search term in any application program, and the electronic device acquires the search term input by the user and takes the search term input by the user as the to-be-processed text.

[0067] In another possible implementation manner, a long text can be grabbed from a network, the long text is divided into at least two short texts in any manner, and any short text is taken as the to-be-processed text. For example, a news can be divided into at least two paragraphs in a segmentation manner, and each paragraph of the news is taken as the to-be-processed text.

[0068] ​In yet another possible implementation, the information containing at least one information type can be acquired, and the information type includes but is not limited to text, video, picture, and audio. The to-be-processed text can be extracted from the acquired information, or the to-be-processed text can be generated based on the acquired information.

[0069] For example, the acquired information is video, and the to-be-processed text is extracted from subtitles of each video frame. For another example, the acquired information is audio, and the audio is converted into corresponding text by using a speech conversion technology, and the converted text is taken as the to-be-processed text.

[0070] In step S22, at least two candidate entity mentions in the to-be-processed text are determined.

[0071] In a possible implementation, the entity mention library contains a plurality of pre-collected entity mentions, and the to-be-processed text can be subjected to a word segmentation process, the word segmentation result is matched with each entity mention in the entity mention library, and the word segmentation result that is matched successfully is taken as a candidate entity mention.

[0072] In another possible implementation, the to-be-processed text can be input into a pre-trained network model, and each candidate entity mention in the text is output by the network model. The structure of the network model is not limited. Optionally, the network model can include a cascaded feature extraction sub-model and an entity mention recognition sub-model. The feature extraction sub-model is used to extract semantic features of the to-be-processed text, and the specific structure of the feature extraction sub-model is not limited. For example, the feature extraction sub-model can be a Bidirectional Encoder Representations from Transformers (BERT) network. The entity mention recognition sub-model can identify each entity mention in the to-be-processed text according to the semantic features of the to-be-processed text, and any identified entity mention is a candidate entity mention in the embodiment of the present application. The structure of the entity mention recognition sub-model includes but is not limited to a Conditional Random Field (CRF) network.

[0073] When the entity mentions the recognition sub-model is a CRF network, the CRF network can determine the category to which each character in the to-be-processed text belongs according to the semantic features of the to-be-processed text, and obtain a candidate entity mention in the to-be-processed text based on the category to which each character belongs. For any character, the category to which the character belongs can be an entity mention category, or a non-entity mention category, wherein the entity mention category can include a start part of an entity mention and an intermediate part of an entity mention, or the entity mention category can include a start part of an entity mention, an intermediate part of an entity mention, and an end part of an entity mention. In actual application, a plurality of characters with continuous entity mention categories are combined to form a candidate entity mention.

[0074] For example, the training text is labeled by using a three-bit labeling method (Begin Inside Outside, BIO). For any character in the training text, if the labeling information of the character is B, it indicates that the character is the start part of an entity mention, if the labeling information of the character is I, it indicates that the character is the intermediate part of an entity mention, and if the labeling information of the character is O, it indicates that the character does not belong to an entity mention, that is, the character is a non-entity mention part. After the CRF network is trained by using the training text, the CRF network can output the category to which each character in the to-be-processed text belongs. The category to which any character belongs can be any one of B, I or O. An entity mention is combined by a character with a category of B and a plurality of characters with a category of I. The combined entity mention is the candidate entity mention in the embodiment of the present application.

[0075] In step S23, for any candidate entity mention, the first semantic similarity between the candidate entity mention and other candidate entity mentions is calculated, and the other candidate entity mentions are at least one candidate entity mention other than the any candidate entity mention among the at least two candidate entity mentions.

[0076] In the embodiment of the present application, for any candidate entity mention, the other candidate entity mentions are part or all of the candidate entity mentions other than the any candidate entity mention among all the candidate entity mentions identified from the to-be-processed text. For any candidate entity mention, the corresponding other candidate entity mentions include at least one candidate entity mention, and the first semantic similarity between the any candidate entity mention and each of the other candidate entity mentions is calculated, wherein the calculation method of the semantic similarity is not limited herein.

[0077] In a possible implementation, when the first semantic similarity between any two candidate entity mentions is calculated, a feature extraction model (which can be a feature extraction sub-model in the network model mentioned above) can be used to extract semantic vectors of the two candidate entity mentions respectively, and the first semantic similarity between the two candidate entity mentions can be calculated based on the semantic vectors of the two candidate entity mentions.

[0078] In another possible implementation, the first semantic similarity between any candidate entity mention and other candidate entity mentions is calculated, including: determining at least one to-be-linked entity corresponding to any candidate entity mention from an entity library; determining semantic vectors of each candidate entity mention and semantic vectors of each to-be-linked entity; fusing the semantic vector of any candidate entity mention and the semantic vectors of each to-be-linked entity corresponding to the any candidate entity mention to obtain a fusion vector of the any candidate entity mention; and calculating the first semantic similarity between the any candidate entity mention and other candidate entity mentions based on the fusion vector of each candidate entity mention.

[0079] In the embodiment of the application, the entity library includes a large number of entities, and for any candidate entity mention, the any candidate entity mention is matched with each entity in the entity library, and the matched entity is taken as a to-be-linked entity corresponding to the any candidate entity mention. It can be understood that the to-be-linked entity can be one or more, which is not limited in the embodiment of the application.

[0080] In a possible implementation, the entity library records the corresponding relationship between entity mentions and entities, wherein any entity mention corresponds to at least one entity, and any entity corresponds to at least one entity mention. Any candidate entity mention is matched with each entity mention in the entity library, if the any candidate entity mention is the same as a certain entity mention in the entity library, the any candidate entity mention is matched successfully with the entity mention in the entity library, and at least one entity corresponding to the entity mention in the entity library is taken as a to-be-linked entity corresponding to the any candidate entity mention.

[0081] For any candidate entity mention, a semantic vector of the candidate entity mention can be extracted by using a feature extraction model (which can be a feature extraction sub-model in the network model mentioned above), and for any entity to be linked, a semantic vector of the entity to be linked can also be extracted by using the feature extraction model. Then, the semantic vector of any candidate entity mention and the semantic vectors of the entities to be linked corresponding to the candidate entity mention are fused to obtain a fusion vector of the candidate entity mention. Therefore, when calculating the first semantic similarity between any candidate entity mention and each other candidate entity mention, the fusion vector of any candidate entity mention and the fusion vectors of each other candidate entity mention can be used to calculate the first semantic similarity between any candidate entity mention and each other candidate entity mention.

[0082] The application also provides a possible implementation of vector fusion. The semantic vector of any candidate entity mention and the semantic vectors of the entities to be linked corresponding to the candidate entity mention are fused to obtain a fusion vector of the candidate entity mention, including: calculating the second semantic similarity between any candidate entity mention and each entity to be linked corresponding to the candidate entity mention by using the semantic vector of the candidate entity mention and the semantic vectors of the entities to be linked corresponding to the candidate entity mention; and determining the fusion vector of any candidate entity mention by using the second semantic similarity between any candidate entity mention and each entity to be linked corresponding to the candidate entity mention and the semantic vectors of the entities to be linked corresponding to the candidate entity mention.

[0083] In the embodiments of the application, for any candidate entity mention, the candidate entity mention corresponds to at least one entity to be linked. The second semantic similarity between the candidate entity mention and each entity to be linked corresponding to the candidate entity mention can be calculated by using the semantic vector of the candidate entity mention and the semantic vectors of the entities to be linked corresponding to the candidate entity mention. The fusion vector of the candidate entity mention can be calculated by using the second semantic similarity between the candidate entity mention and each entity to be linked corresponding to the candidate entity mention and the semantic vectors of the entities to be linked corresponding to the candidate entity mention.

[0084] In a possible implementation, for any candidate entity mention, when the fusion vector of the candidate entity mention is calculated by using the second semantic similarity between the candidate entity mention and each entity to be linked corresponding to the candidate entity mention and the semantic vectors of the entities to be linked corresponding to the candidate entity mention, the semantic vector of each entity to be linked can be multiplied by the second semantic similarity corresponding to the entity to be linked, and each multiplication result can be added to obtain the fusion vector of the candidate entity mention. It can be understood that, if any candidate entity mention corresponds to only one entity to be linked, the semantic vector of the entity to be linked can be multiplied by the second semantic similarity corresponding to the entity to be linked to obtain the fusion vector of the candidate entity mention.

[0085] For example, for a candidate entity mention X corresponding to two to-be-linked entity xi and x2, the second semantic similarity between X and xi is multiplied by the semantic vector of xi, the second semantic similarity between X and x2 is multiplied by the semantic vector of x2, and the two multiplication results are added to obtain the fusion vector of X; for a candidate entity mention Y corresponding to one to-be-linked entity y, the second semantic similarity between Y and y is multiplied by the semantic vector of y to obtain the fusion vector of Y, and so on.

[0086] In step S24, the global semantic similarity of any candidate entity mention is determined by using the first semantic similarity between the candidate entity mention and other candidate entity mentions.

[0087] In the embodiments of the present application, for any candidate entity mention, the global semantic similarity of the candidate entity mention can be determined by using the first semantic similarity between the candidate entity mention and other candidate entity mentions in any manner. The global semantic similarity of any candidate entity mention can reflect the similarity between the candidate entity mention and an entity mention. The global semantic similarity of any candidate entity mention can be a probability that the candidate entity mention is an entity mention, or a score of the candidate entity mention being an entity mention.

[0088] In a possible implementation, the global semantic similarity of any candidate entity mention is determined by using the first semantic similarity between the candidate entity mention and other candidate entity mentions, including: determining the global semantic similarity of any candidate entity mention by using the initial semantic similarity of each candidate entity mention and the first semantic similarity between the candidate entity mention and other candidate entity mentions.

[0089] For any candidate entity mention, the global semantic similarity of the candidate entity mention can be determined by using the initial semantic similarity of the candidate entity mention, the initial semantic similarity of other candidate entity mentions, and the first semantic similarity between the candidate entity mention and other candidate entity mentions.

[0090] In a possible implementation, for any candidate entity mention, a first coefficient and a second coefficient can be set in advance, and the sum of the first coefficient and the second coefficient is 1. The first coefficient can be multiplied by the initial semantic similarity of the candidate entity mention to obtain a product part. The initial semantic similarity of other candidate entity mentions can be multiplied by the respective first semantic similarity, the product results are added, and the added result is multiplied by the second coefficient to obtain another product part. The sum of the two product parts is taken as the global semantic similarity of the candidate entity mention.

[0091] For example, for a candidate entity mention X, other candidate entity mentions are Y and Z, the initial semantic similarity of X is multiplied by a first coefficient to obtain a product part; the initial semantic similarity of Y is multiplied by the first semantic similarity between X and Y to obtain a product result, the initial semantic similarity of Z is multiplied by the first semantic similarity between X and Z to obtain another product result, the two product results are added, and the added result is multiplied by a second coefficient to obtain another product part, and the sum of the two product parts is taken as the global semantic similarity of any candidate entity mention.

[0092] Optionally, the method for identifying entity mentions in the embodiments of the present application further comprises: determining the initial semantic similarity of any candidate entity mention by using the global semantic similarity of each of the to-be-linked entities corresponding to the candidate entity mention and the second semantic similarity between the candidate entity mention and each of the to-be-linked entities corresponding to the candidate entity mention. Optionally, this step can be performed before the step of "determining the global semantic similarity of any candidate entity mention by using the initial semantic similarity of each of the candidate entity mentions and the first semantic similarity between any candidate entity mention and other candidate entity mentions".

[0093] The global semantic similarity of any to-be-linked entity can reflect the similarity between the to-be-linked entity and the target linked entity. The global semantic similarity of any to-be-linked entity can be a probability that the to-be-linked entity is the target linked entity or a score of the to-be-linked entity being the target linked entity.

[0094] For any candidate entity mention, the initial semantic similarity of the candidate entity mention is determined by using the global semantic similarity of each of the to-be-linked entities corresponding to the candidate entity mention and the second semantic similarity between the candidate entity mention and each of the to-be-linked entities corresponding to the candidate entity mention.

[0095] In a possible implementation, for any candidate entity mention, the initial semantic similarity of the candidate entity mention is determined by multiplying the global semantic similarity of each of the to-be-linked entities corresponding to the candidate entity mention by the second semantic similarity corresponding to each of the to-be-linked entities, and adding each of the multiplication results to obtain the initial semantic similarity of the candidate entity mention. It can be understood that if the candidate entity mention corresponds to only one to-be-linked entity, the global semantic similarity of the to-be-linked entity can be multiplied by the corresponding second semantic similarity to obtain the initial semantic similarity of the candidate entity mention.

[0096] For a candidate entity mention X, which corresponds to two to-be-linked entities x1 and x2, the initial semantic similarity of X can be obtained by multiplying the global semantic similarity of x1 and the second semantic similarity between X and x1, multiplying the global semantic similarity of x2 and the second semantic similarity between X and x2, and adding the two multiplication results. For a candidate entity mention Y, which corresponds to one to-be-linked entity y, the initial semantic similarity of Y can be obtained by multiplying the global semantic similarity of y and the second semantic similarity between Y and y. The same method can be used for other candidate entity mentions.

[0097] In a possible implementation, the application embodiment further provides a calculation method of the global semantic similarity of a to-be-linked entity. The method for identifying an entity mention in the application embodiment further includes: for any to-be-linked entity, calculating a third semantic similarity between the to-be-linked entity and other to-be-linked entities, the other to-be-linked entities being at least one to-be-linked entity other than the any to-be-linked entity among the to-be-linked entities corresponding to each candidate entity mention; and determining the global semantic similarity of the any to-be-linked entity by using the initial semantic similarity of each to-be-linked entity and the third semantic similarity between the any to-be-linked entity and the other to-be-linked entities. Optionally, the step can be performed before the step of "determining the initial semantic similarity of any candidate entity mention by using the global semantic similarity of each to-be-linked entity corresponding to the candidate entity mention and the second semantic similarity between any candidate entity mention and each to-be-linked entity corresponding to the candidate entity mention".

[0098] For example, the third semantic similarity between any to-be-linked entity and each other to-be-linked entity can be calculated. For any to-be-linked entity, the global semantic similarity of the any to-be-linked entity can be determined by using the initial semantic similarity of the any to-be-linked entity, the initial semantic similarity of each other to-be-linked entity, and the third semantic similarity between the any to-be-linked entity and each other to-be-linked entity.

[0099] In a possible implementation, a third coefficient and a fourth coefficient can be set, and the sum of the third coefficient and the fourth coefficient is 1. The third coefficient is multiplied by the initial semantic similarity of any to-be-linked entity to obtain a multiplication part. Each other to-be-linked entity is multiplied by the third semantic similarity corresponding to the to-be-linked entity, the multiplication results are added, and the added result is multiplied by the fourth coefficient to obtain another multiplication part. The sum of the two multiplication parts is the global semantic similarity of any to-be-linked entity.

[0100] For example, for the to-be-linked entity x1, other to-be-linked entities are x2, y, z1 and z2, the initial semantic similarity of x1 can be multiplied by the third coefficient to obtain a product part; the initial semantic similarity of x2 and the third semantic similarity between x1 and x2 are multiplied, the initial semantic similarity of y and the third semantic similarity between x1 and y are multiplied, the initial semantic similarity of z1 and the third semantic similarity between x1 and z1 are multiplied, the initial semantic similarity of z2 and the third semantic similarity between x1 and z2 are multiplied, the four product results are added, and the added result is multiplied by the fourth coefficient to obtain another product part, and the sum of the two product parts is the global semantic similarity of x1.

[0101] In a possible implementation, the method for identifying entity mentions provided in the embodiments of the present application further includes: determining the initial semantic similarity of any to-be-linked entity by using the second semantic similarity between the to-be-linked entity and each candidate entity mention corresponding to the to-be-linked entity. Optionally, this step can be performed before the step of "determining the global semantic similarity of any to-be-linked entity by using the initial semantic similarity of each to-be-linked entity and the third semantic similarity between any to-be-linked entity and other to-be-linked entities".

[0102] In the embodiments of the present application, the initial semantic similarity of any to-be-linked entity can be determined by using the second semantic similarity between the to-be-linked entity and each candidate entity mention corresponding to the to-be-linked entity. For example, for the to-be-linked entity x1, the corresponding candidate entity mention is X, and the initial semantic similarity of x1 can be determined by using the second semantic similarity between X and x1.

[0103] It can be understood that one to-be-linked entity can correspond to at least one candidate entity mention, which is not limited in the embodiments of the present application.

[0104] In step S25, the target entity mention is selected from each candidate entity mention according to the global semantic similarity of each candidate entity mention.

[0105] Optionally, a semantic similarity standard line can be set in advance. For any candidate entity mention, if the global semantic similarity of the candidate entity mention is not less than the semantic similarity standard line, the candidate entity mention is the target entity mention; if the global semantic similarity of the candidate entity mention is less than the semantic similarity standard line, the candidate entity mention is not the target entity mention.

[0106] The entity mention identification method provided in the embodiments of the present application can preliminarily identify each candidate entity mention in the text, calculate the semantic similarity between each two candidate entity mentions in the text, calculate the global semantic similarity of a candidate entity mention by using the semantic similarity between the candidate entity mention and other candidate entity mentions, and determine whether the candidate entity mention is a target entity mention, thereby realizing further identification of the target entity mention by using the semantic similarity between the candidate entity mentions in the text on the basis of the preliminary identification of the candidate entity mentions in the text, and improving the identification accuracy of the entity mention.

[0107] In another possible implementation manner of the embodiments of the present application, the entity mention identification method further includes: determining a target linking entity from each linking entity corresponding to any target entity mention according to the global semantic similarity of the linking entity; and linking any target entity mention with the target linking entity. Optionally, the step can be performed after step S25.

[0108] According to the manner provided in the embodiments of the present application, the global semantic similarity of each linking entity can be calculated. In a possible implementation manner, for any target entity mention, the maximum global semantic similarity can be determined according to the global semantic similarity of each linking entity corresponding to the target entity mention, the linking entity corresponding to the maximum global semantic similarity is determined as the target linking entity, and the target entity mention is linked with the target linking entity.

[0109] In another possible implementation manner, for any target entity mention, the global semantic similarity greater than or equal to a preset threshold can be determined according to the global semantic similarity of each linking entity corresponding to the target entity mention, the linking entity corresponding to the determined global semantic similarity is determined as the target linking entity, and the target entity mention is linked with the target linking entity.

[0110] In the method provided in the embodiments of the present application, in order to facilitate storage of each candidate entity mention, each linking entity and each similarity (including the first semantic similarity, the second semantic similarity and the third semantic similarity mentioned above) involved in the embodiments of the present application, a relationship diagram between the entity mention and the entity can be determined according to each candidate entity mention, each linking entity and each similarity.

[0111] As shown in FIG. 6, the relationship diagram between the entity mention and the entity can be determined according to the candidate entity mention, the linking entity and the similarity. Figure 3 Figure 3 ​An entity mention and relationship between entities diagram is provided for an embodiment of the present application. Wherein, for the candidate entity mention X, two entities can be matched from the entity library, both of which are the to-be-linked entities corresponding to X, and are denoted as to-be-linked entities x1 and x2 respectively; for the candidate entity mention Y, one entity can be matched from the entity library, which is the to-be-linked entity corresponding to Y, and is denoted as to-be-linked entity y; for the candidate entity mention Z, two entities can be matched from the entity library, both of which are the to-be-linked entities corresponding to Z, and are denoted as to-be-linked entities z1 and z2 respectively.

[0112] Next, taking the relationship diagram shown in Figure 3 as an example, the identification method of the entity mention provided by the embodiment of the present application is exemplified.

[0113] For example, for the candidate entity mention X, which corresponds to two to-be-linked entities x1 and x2, the second semantic similarity between X and x1 can be calculated by using the semantic vector of X and the semantic vector of x1, and the second semantic similarity between X and x2 can be calculated by using the semantic vector of X and the semantic vector of x2; for the candidate entity mention Y, which corresponds to one to-be-linked entity y, the second semantic similarity between Y and y can be calculated by using the semantic vector of Y and the semantic vector of y, and so on.

[0114] Then, according to the candidate entity mentions X, Y, Z and the second semantic similarity between the candidate entity mention and the corresponding to-be-linked entity, a relationship diagram between the entity mention and the entity is constructed. Wherein, in the relationship diagram between the entity mention and the entity, the node represents the candidate entity mention or the to-be-linked entity, and the line segment between the nodes represents the second semantic similarity between the candidate entity mention and the to-be-linked entity.

[0115] For the to-be-linked entity x1, the other to-be-linked entities are x2, y, z1 and z2, and then the third semantic similarity between x1 and x2, y, z1 and z2 can be calculated respectively, and so on. The third semantic similarity is added in the relationship diagram, that is, in the relationship diagram, the line segment between any two to-be-linked entities represents the third semantic similarity between the two to-be-linked entities.

[0116] For the candidate entity mention X, X corresponds to the to-be-linked entities x1 and x2, and then the semantic vector of X, the semantic vector of x1 and the semantic vector of x2 can be fused to obtain the fusion vector of X; for the candidate entity mention Y, Y corresponds to the to-be-linked entity y, and then the semantic vector of Y and the semantic vector of y can be fused to obtain the fusion vector of Y, and so on.

[0117] For a candidate entity mention X, which corresponds to two other candidate entity mentions Y and Z respectively, a first semantic similarity between X and Y and a first semantic similarity between X and Z can be calculated. Wherein, when calculating the first semantic similarity between X and Y, the fusion vector of X and the fusion vector of Y can be utilized to calculate the first semantic similarity between X and Y; when calculating the first semantic similarity between X and Z, the fusion vector of X and the fusion vector of Z can be utilized to calculate the first semantic similarity between X and Z, and so on. The first semantic similarity is added to the relationship diagram, that is, in the relationship diagram, the line segment between any two candidate entity mentions represents the first semantic similarity between the two candidate entity mentions.

[0118] The finally obtained relationship diagram between entity mentions and entities is shown in Figure 3 , where a node represents a candidate entity mention or a to-be-linked entity, and a line segment between two nodes represents the similarity between the two nodes at the ends of the line segment. As shown in Figure 3 , node X represents candidate entity mention X, node x1 represents to-be-linked entity x1, the line segment between X and x1 represents the similarity between X and x1 (i.e., the second semantic similarity mentioned above), the line segment between x1 and x2 represents the similarity between x1 and x2 (i.e., the third semantic similarity mentioned above), and the line segment between X and Y represents the similarity between X and Y (i.e., the first semantic similarity mentioned above).

[0119] It can be understood that Figure 3 Taking candidate entity mentions X, Y, and Z, and to-be-linked entities x1, x2, y, z1, and z2 as examples, in actual application, the number of candidate entity mentions and to-be-linked entities is not limited.

[0120] In the embodiment of the present application, for to-be-linked entity x1, which corresponds to candidate entity mention X, the initial semantic similarity of x1 can be determined by utilizing the second semantic similarity between X and x1, and so on. For to-be-linked entity x1, other to-be-linked entities are x2, y, z1, and z2, the global semantic similarity of x1 can be calculated by utilizing the initial semantic similarity of x1, x2, y, z1, and z2, and the third semantic similarity between x1 and x2, y, z1, and z2 respectively, and so on.

[0121] For candidate entity mention X, which corresponds to two to-be-linked entities x1 and x2, the initial semantic similarity of X can be calculated by utilizing the global semantic similarity of x1, the global semantic similarity of x2, the second semantic similarity between X and x1, and the second semantic similarity between X and x2, and so on.

[0122] For a candidate entity mention X, other candidate entity mentions are candidate entity mentions Y and Z, the global semantic similarity of X can be calculated by using the initial semantic similarity of X, the initial semantic similarity of Y, the initial semantic similarity of Z, the first semantic similarity between X and Y, and the first semantic similarity between X and Z, and so on.

[0123] For a candidate entity mention X, if the global semantic similarity of X is not less than the semantic similarity standard line, X is a target entity mention, if the global semantic similarity of X is less than the semantic similarity standard line, X is not a target entity mention, and so on.

[0124] If a candidate entity mention X is a target entity mention, it corresponds to two entities to be linked x1 and x2. If the global semantic similarity of x1 is greater than the global semantic similarity of x2, x1 is a target linking entity, and X is linked with x1; if the global semantic similarity of x2 is greater than the global semantic similarity of x1, x2 is a target linking entity, and X is linked with x2; if the global semantic similarity of x1 is equal to the global semantic similarity of x2, x1 and x2 are both target linking entities, and X is linked with x1 and x2 respectively.

[0125] Based on the same technical concept, referring to Figure 4 The embodiment of the present application provides an entity mention identification device, which comprises:

[0126] The acquisition module 41 is used for acquiring a text to be processed.

[0127] The determination module 42 is used for determining at least two candidate entity mentions in the text to be processed.

[0128] The calculation module 43 is used for calculating, for any candidate entity mention, the first semantic similarity between the candidate entity mention and other candidate entity mentions, the other candidate entity mentions being at least one candidate entity mention other than the candidate entity mention in the at least two candidate entity mentions.

[0129] The determination module 42 is further used for determining the global semantic similarity of any candidate entity mention by using the first semantic similarity between the candidate entity mention and other candidate entity mentions.

[0130] The screening module 44 is used for screening a target entity mention from the candidate entity mentions according to the global semantic similarity of each candidate entity mention.

[0131] In a possible implementation, the computing module 43 is configured to determine, from the entity library, at least one corresponding to-be-linked entity for any candidate entity mention; determine a semantic vector of each candidate entity mention and a semantic vector of each to-be-linked entity; fuse the semantic vector of any candidate entity mention and the semantic vectors of each to-be-linked entity corresponding to any candidate entity mention to obtain a fused vector of any candidate entity mention; and calculate, by using the fused vector of each candidate entity mention, a first semantic similarity between any candidate entity mention and other candidate entity mentions.

[0132] In a possible implementation, the computing module 43 is configured to calculate, by using the semantic vector of any candidate entity mention and the semantic vectors of each to-be-linked entity corresponding to any candidate entity mention, a second semantic similarity between any candidate entity mention and each to-be-linked entity corresponding to any candidate entity mention; and determine, by using the second semantic similarity between any candidate entity mention and each to-be-linked entity corresponding to any candidate entity mention and the semantic vectors of each to-be-linked entity corresponding to any candidate entity mention, the fused vector of any candidate entity mention.

[0133] In a possible implementation, the determining module 42 is configured to determine, by using the initial semantic similarity of each candidate entity mention and the first semantic similarity between any candidate entity mention and other candidate entity mentions, a global semantic similarity of any candidate entity mention.

[0134] In a possible implementation, the determining module 42 is further configured to determine, by using the global semantic similarity of each to-be-linked entity corresponding to any candidate entity mention and the second semantic similarity between any candidate entity mention and each to-be-linked entity corresponding to any candidate entity mention, the initial semantic similarity of any to-be-linked entity.

[0135] In a possible implementation, the computing module 43 is further configured to, for any to-be-linked entity, calculate a third semantic similarity between any to-be-linked entity and other to-be-linked entities, the other to-be-linked entities being at least one to-be-linked entity other than any to-be-linked entity in each to-be-linked entity corresponding to each candidate entity mention;

[0136] The determining module 42 is further configured to determine, by using the initial semantic similarity of each to-be-linked entity and the third semantic similarity between any to-be-linked entity and other to-be-linked entities, a global semantic similarity of any to-be-linked entity.

[0137] In a possible implementation, the determining module 42 is further configured to determine, by using the second semantic similarity between any to-be-linked entity and each candidate entity mention corresponding to any to-be-linked entity, the initial semantic similarity of any to-be-linked entity.

[0138] In a possible implementation, the entity mention recognition apparatus 40 further comprises a linking module, wherein,

[0139] The determining module 42 is further configured to determine a target linking entity from each of the target entity mentions according to the global semantic similarity of each of the target entity mentions to the corresponding target linking entity.

[0140] The linking module is configured to link any target entity mention to the target linking entity.

[0141] In the embodiments of the present application, each candidate entity mention in the text can be initially recognized, the global semantic similarity of each candidate entity mention is calculated by calculating the semantic similarity between each two candidate entity mentions in the text, the global semantic similarity of a candidate entity mention is calculated by using the semantic similarity between the candidate entity mention and other candidate entity mentions, and it is determined whether the candidate entity mention is a target entity mention, so that the target entity mention is further recognized by using the semantic similarity between the candidate entity mentions in the text on the basis of the initial recognition of the candidate entity mentions in the text, and the recognition accuracy of the entity mention is improved.

[0142] It should be noted that the apparatus provided in the above embodiments is only used as an example for dividing the above functional modules in realizing the functions thereof, and in actual applications, the above functions can be completed by different functional modules according to the needs, that is, the internal structure of the apparatus is divided into different functional modules to complete all or part of the above described functions. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process is detailed in the method embodiments, which will not be described here.

[0143] Figure 5 FIG. 1 is a structural schematic diagram of an electronic device according to an embodiment of the present application. The device can be a terminal, for example, can be a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 player (Moving Picture Experts Group Audio Layer IV), a notebook computer or a desktop computer. The terminal can also be referred to as a user equipment, a portable terminal, a laptop terminal, a desktop terminal, and other names.

[0144] Generally, the terminal 500 includes a processor 501 and a memory 502.

[0145] The processor 501 can include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 501 can be implemented in at least one of a hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), a PLA (Programmable Logic Array). The processor 501 can also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a CPU (Central Processing Unit). The coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 501 can be integrated with a GPU (Graphics Processing Unit) for rendering and drawing content required to be displayed by the display screen. In some embodiments, the processor 501 can further include an AI (Artificial Intelligence) processor for processing machine learning related computing operations.

[0146] The memory 502 can include one or more computer-readable storage media, which can be non-transitory. The memory 502 can also include a high-speed random access memory, and a nonvolatile memory such as one or more disk storage devices, flash storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 502 is used to store at least one instruction for being executed by the processor 501 to implement the entity mentioned recognition method provided by the method embodiment of the present application.

[0147] In some embodiments, the terminal can also optionally include a peripheral device interface 503 and at least one peripheral device. The processor 501, the memory 502, and the peripheral device interface 503 can be connected through a bus or a signal line. Each peripheral device can be connected to the peripheral device interface 503 through a bus, a signal line, or a circuit board. Specifically, the peripheral device includes at least one of a radio frequency circuit 504, a touch display screen 505, a camera assembly 505, an audio circuit 507, a positioning assembly 508, and a power supply 509.

[0148] The peripheral interface 503 can be used to connect at least one I / O (Input / Output) related peripheral device to the processor 501 and the memory 502. In some embodiments, the processor 501, the memory 502 and the peripheral interface 503 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 501, the memory 502 and the peripheral interface 503 can be implemented on a separate chip or circuit board, and the present embodiments are not limited in this regard.

[0149] The radio frequency circuit 504 is configured to receive and send RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 504 communicates with communication networks and other communication devices through electromagnetic signals. The radio frequency circuit 504 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the radio frequency circuit 504 includes an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and the like. The radio frequency circuit 504 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes but is not limited to: a metropolitan area network, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 504 can also include NFC (Near Field Communication) related circuitry, and the present application is not limited in this regard.

[0150] The display screen 505 is configured to display a UI (User Interface). The UI can include graphics, text, icons, video, and any combination thereof. When the display screen 505 is a touch display screen, the display screen 505 is further configured to capture touch signals on or above the surface of the display screen 505. The touch signals can be input to the processor 501 as control signals for processing. In this case, the display screen 505 can also be configured to provide virtual buttons and / or virtual keyboard, also known as soft buttons and / or soft keyboard. In some embodiments, the display screen 505 can be one, disposed on the front panel of the terminal; in other embodiments, the display screen 505 can be at least two, respectively disposed on different surfaces of the terminal or in a folding design; in still other embodiments, the display screen 505 can be a flexible display screen, disposed on a curved surface or a folding surface of the terminal. Even, the display screen 505 can also be disposed in an irregular shape, i.e., a special-shaped screen. The display screen 505 can be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), etc.

[0151] The camera assembly 506 is configured to capture images or videos. Optionally, the camera assembly 506 includes a front camera and a rear camera. Typically, the front camera is disposed on the front panel of the terminal, and the rear camera is disposed on the back of the terminal. In some embodiments, the rear camera is at least two, respectively any one of a main camera, a depth-of-field camera, a wide-angle camera, and a telephoto camera, to realize the background blur function by fusing the main camera and the depth-of-field camera, the panoramic shooting and VR (Virtual Reality) shooting function by fusing the main camera and the wide-angle camera, or other fusion shooting functions. In some embodiments, the camera assembly 506 can further include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. The dual-color temperature flash refers to the combination of a warm light flash and a cold light flash, which can be used for light compensation under different color temperatures.

[0152] The audio circuit 507 can include a microphone and a speaker. The microphone is used to collect sound waves of a user and an environment, and convert the sound waves into an electrical signal input to the processor 501 for processing, or input to the radio frequency circuit 504 to realize voice communication. For the purpose of stereo sound collection or noise reduction, the microphone can be multiple, and arranged at different parts of the terminal. The microphone can also be an array microphone or an omnidirectional collection type microphone. The speaker is used to convert an electrical signal from the processor 501 or the radio frequency circuit 504 into sound waves. The speaker can be a conventional diaphragm speaker, or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, not only can it convert an electrical signal into a sound wave audible to humans, but it can also convert an electrical signal into an inaudible sound wave to humans for ranging purposes, etc. In some embodiments, the audio circuit 507 can also include a headphone jack.

[0153] The positioning component 508 is used to position the current geographic location of the terminal to realize navigation or LBS (Location Based Service, Location Based Service). The positioning component 508 can be a positioning component based on the GPS (Global Positioning System, Global Positioning System) of the United States, the Beidou system of China, the Glonass system of Russia or the Galileo system of the European Union.

[0154] The power supply 509 is used to supply power to each component in the terminal. The power supply 509 can be alternating current, direct current, disposable battery or rechargeable battery. When the power supply 509 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.

[0155] In some embodiments, the terminal also includes one or more sensors 510. The one or more sensors 510 include but are not limited to: an acceleration sensor 511, a gyroscope sensor 512, a pressure sensor 513, a fingerprint sensor 514, an optical sensor 515 and a proximity sensor 516.

[0156] The acceleration sensor 511 can detect the acceleration in three coordinate axes of the coordinate system established by the terminal. For example, the acceleration sensor 511 can be used to detect the components of gravitational acceleration in three coordinate axes. The processor 501 can control the touch display 505 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 511. The acceleration sensor 511 can also be used for game or user motion data collection.

[0157] The gyroscope sensor 512 can detect the body direction and rotation angle of the terminal, and the gyroscope sensor 512 can cooperate with the acceleration sensor 511 to collect the 3D action of the user on the terminal. According to the data collected by the gyroscope sensor 512, the processor 501 can realize the following functions: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization when shooting, game control, and inertial navigation.

[0158] The pressure sensor 513 can be arranged on the side frame of the terminal and / or the lower layer of the touch display screen 505. When the pressure sensor 513 is arranged on the side frame of the terminal, the user's holding signal on the terminal can be detected, and the left and right hand recognition or shortcut operation can be performed by the processor 501 according to the holding signal collected by the pressure sensor 513. When the pressure sensor 513 is arranged on the lower layer of the touch display screen 505, the controllability control on the UI interface can be controlled by the processor 501 according to the pressure operation of the user on the touch display screen 505. The controllability control includes at least one of a button control, a scroll bar control, an icon control, and a menu control.

[0159] The fingerprint sensor 514 is used to collect the fingerprint of the user, and the identity of the user is recognized by the processor 501 according to the fingerprint collected by the fingerprint sensor 514, or by the fingerprint sensor 514 according to the collected fingerprint. When the identity of the user is recognized as a trusted identity, the processor 501 authorizes the user to perform related sensitive operations, including unlocking the screen, viewing encrypted information, downloading software, payment, and changing settings. The fingerprint sensor 514 can be arranged on the front, back or side of the terminal. When the terminal is provided with a physical button or a manufacturer's logo, the fingerprint sensor 514 can be integrated with the physical button or the manufacturer's logo.

[0160] The optical sensor 515 is used to collect the ambient light intensity. In one embodiment, the processor 501 can control the display brightness of the touch display screen 505 according to the ambient light intensity collected by the optical sensor 515. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 505 is increased; when the ambient light intensity is low, the display brightness of the touch display screen 505 is decreased. In another embodiment, the processor 501 can also dynamically adjust the shooting parameters of the camera assembly 506 according to the ambient light intensity collected by the optical sensor 515.

[0161] The proximity sensor 516, also called a distance sensor, is usually arranged on the front panel of the terminal. The proximity sensor 516 is used to collect the distance between the user and the front of the terminal. In one embodiment, when the proximity sensor 516 detects that the distance between the user and the front of the terminal gradually becomes smaller, the touch display screen 505 is switched from the bright screen state to the screen-off state under the control of the processor 501; when the proximity sensor 516 detects that the distance between the user and the front of the terminal gradually becomes larger, the touch display screen 505 is switched from the screen-off state to the bright screen state under the control of the processor 501.

[0162] Those skilled in the art can understand that the structure shown in the above embodiments is not a limitation on the terminal, and the terminal can include more or fewer components than the drawings, or combine certain components, or adopt a different component arrangement. Figure 5 Those skilled in the art can understand that the structure shown in the above embodiments is not a limitation on the terminal, and the terminal can include more or fewer components than the drawings, or combine certain components, or adopt a different component arrangement.

[0163] In an example embodiment, a computer device is also provided, which includes a processor and a memory, and the memory stores at least one instruction, at least one program, a code set or an instruction set. The at least one instruction, at least one program, code set or instruction set is configured to be executed by one or more processors to implement the identification method mentioned by any of the above entities.

[0164] In an example embodiment, a computer readable storage medium is also provided, which stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, at least one program, code set or instruction set implements the identification method mentioned by any of the above entities when executed by the processor of the computer device.

[0165] Optionally, the above computer readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk and an optical data storage device, etc.

[0166] In an example embodiment, a computer program or computer program product is also provided, which stores at least one computer instruction, and the at least one computer instruction is loaded and executed by the processor to implement the identification method mentioned by any of the above entities.

[0167] It should be understood that "multiple" mentioned herein refers to two or more. "And / or", which describes the association relationship of the associated objects, means that there can be three relationships, for example, A and / or B can mean that there are three cases of A alone, A and B together, and B alone. The character " / " generally represents that the associated objects before and after it are in an "or" relationship.

[0168] The above embodiment numbers of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments.

[0169] The above description is merely exemplary of the application, and is not intended to limit the application. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the application should be included in the protection scope of the application.

Claims

1. A method for identifying entity references, characterized in that, The method includes: Get the text to be processed; Identify at least two candidate entity references in the text to be processed; For any candidate entity mention, determine at least one entity to be linked corresponding to that candidate entity mention from the entity database; Determine the semantic vectors mentioned by each candidate entity and the semantic vectors of each entity to be linked; The semantic vector mentioned by any candidate entity and the semantic vectors of each entity to be linked corresponding to the mention of any candidate entity are fused to obtain the fused vector of the mention of any candidate entity. Using the fusion vectors of each candidate entity mention, calculate the first semantic similarity between any candidate entity mention and other candidate entity mentions, wherein the other candidate entity mentions are at least one candidate entity mention other than any candidate entity mention among the at least two candidate entity mentions; The global semantic similarity of any candidate entity mention is determined by using the first semantic similarity between any candidate entity mention and the other candidate entity mentions; Based on the global semantic similarity of each candidate entity mention, the target entity mention is selected from the candidate entity mentions.

2. The method according to claim 1, characterized in that, The step of fusing the semantic vector of any candidate entity mention and the semantic vectors of each entity to be linked corresponding to the mention of any candidate entity to obtain the fused vector of any candidate entity mention includes: Using the semantic vector of any candidate entity mention and the semantic vector of each entity to be linked corresponding to any candidate entity mention, calculate the second semantic similarity between any candidate entity mention and each entity to be linked corresponding to any candidate entity mention; The fusion vector of any candidate entity mention is determined by using the second semantic similarity between any candidate entity mention and each entity to be linked corresponding to the candidate entity mention, as well as the semantic vector of each entity to be linked corresponding to the candidate entity mention.

3. The method according to claim 2, characterized in that, The step of determining the global semantic similarity of any candidate entity mention using the first semantic similarity between any candidate entity mention and the other candidate entity mentions includes: The global semantic similarity of any candidate entity mention is determined by using the initial semantic similarity of each candidate entity mention and the first semantic similarity between any candidate entity mention and the other candidate entity mentions.

4. The method according to claim 3, characterized in that, The method further includes: The initial semantic similarity of any candidate entity mention is determined by using the global semantic similarity of each entity to be linked corresponding to any candidate entity mention, and the second semantic similarity between any candidate entity mention and each entity to be linked corresponding to any candidate entity mention.

5. The method according to claim 4, characterized in that, The method further includes: For any entity to be linked, calculate the third semantic similarity between the entity to be linked and other entities to be linked, wherein the other entities to be linked are at least one entity to be linked other than the entity to be linked in each of the candidate entity mentions. The global semantic similarity of any entity to be linked is determined by using the initial semantic similarity of each entity to be linked and the third semantic similarity between any entity to be linked and the other entities to be linked.

6. The method according to claim 5, characterized in that, The method further includes: The initial semantic similarity of any entity to be linked is determined by using the second semantic similarity between any entity to be linked and each candidate entity mention corresponding to the entity to be linked.

7. The method according to any one of claims 4-6, characterized in that, The method further includes: Based on the global semantic similarity of each entity to be linked corresponding to any target entity mention, the target linked entity is determined from each entity to be linked corresponding to any target entity mention; Link any of the target entity references to the target linked entity.

8. A device for identifying entities, characterized in that, The device includes: The acquisition module is used to acquire the text to be processed; The determination module is used to determine at least two candidate entity mentions in the text to be processed; The calculation module is configured to, for any candidate entity mention, determine at least one entity to be linked corresponding to the candidate entity mention from the entity database; determine the semantic vector of each candidate entity mention and the semantic vector of each entity to be linked; fuse the semantic vector of the candidate entity mention and the semantic vector of each entity to be linked corresponding to the candidate entity mention to obtain a fused vector of the candidate entity mention; and use the fused vectors of each candidate entity mention to calculate a first semantic similarity between the candidate entity mention and other candidate entity mentions, wherein the other candidate entity mentions are at least one candidate entity mention other than the candidate entity mention among the at least two candidate entity mentions. The determining module is further configured to determine the global semantic similarity of any candidate entity mention using the first semantic similarity between any candidate entity mention and other candidate entity mentions; The filtering module is used to filter out the target entity mentions from the various candidate entity mentions based on the global semantic similarity of the mentions of each candidate entity.

9. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing at least one instruction that, when executed by the processor, causes the computer device to implement the entity identification method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method, device, equipment and medium for entity association

    CN109933785A

  • Entity linking method and device, equipment and storage medium

    CN111339737A