Entity linking method and apparatus, electronic device, and storage medium

By combining the text statements of the entity to be linked with the information of adjacent text statements, and using triples and entity description information for multiple verifications, the problem of insufficient entity linking accuracy is solved, and more accurate video content understanding is achieved.

CN115358236BActive Publication Date: 2026-06-16BEIJING DAJIA INTERNET INFORMATION TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
Filing Date
2022-08-03
Publication Date
2026-06-16

AI Technical Summary

Technical Problem

The accuracy of entity links in existing technologies is insufficient, leading to inaccurate understanding of video content.

Method used

By inputting the text statement of the entity to be linked into the entity linking model, the first linking result is obtained. The entity is then linked by combining the text statement with the adjacent text statements. Multiple verifications are performed using triples and entity description information to finally determine the target linking result.

🎯Benefits of technology

It improves the accuracy of entity links, enabling a more accurate understanding of video content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115358236B_ABST
    Figure CN115358236B_ABST
Patent Text Reader

Abstract

The present disclosure relates to an entity linking method and device, electronic equipment and storage medium. The method comprises: inputting a text sentence including an entity to be linked into an entity linking model to obtain a first linking result corresponding to the entity to be linked; obtaining adjacent text sentences of the text sentence from a document in which the text sentence is located; inputting the adjacent text sentences into the entity linking model to obtain a second linking result corresponding to the entity to be linked; and determining a target linking result corresponding to the entity to be linked according to the first linking result and the second linking result. The present disclosure can determine the target linking result corresponding to the entity to be linked in combination with the first linking result of the text sentence in which the entity to be linked is located and the second linking result of the adjacent text sentences, thereby realizing the determination of the final entity linking result in combination with the context information of the text sentence in which the entity to be linked is located, and improving the accuracy of the entity linking result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to natural language processing technology, and more particularly to an entity linking method, apparatus, electronic device, and storage medium. Background Technology

[0002] Entity linking refers to a process where, given a knowledge base rich in a series of entities and a corpus with labeled mentions, the goal is to match each mention to its corresponding entity in the knowledge base. If there is no corresponding entity in the knowledge base for a mention, then that mention is considered unlinkable to the current knowledge base.

[0003] Accurately understanding video content is crucial during the production, distribution, and viewing of videos. Entity linking, as a key technology, can effectively extract and analyze entity content within videos, thereby aiding in the understanding of the video's main objects.

[0004] However, due to the diversity and ambiguity of the entities to be linked corresponding to the same entity, the accuracy of entity links is insufficient. Summary of the Invention

[0005] This disclosure provides a method, apparatus, electronic device, and storage medium for entity linking, to at least address the problem of insufficient accuracy in entity linking in related technologies. The technical solution of this disclosure is as follows:

[0006] According to a first aspect of the present disclosure, an entity linking method is provided, comprising:

[0007] Input the text statement containing the entity to be linked into the entity linking model to obtain the first linking result corresponding to the entity to be linked. The first linking result includes the first entity identifier corresponding to the entity to be linked in the knowledge base.

[0008] Obtain the adjacent text statements from the document containing the text statement;

[0009] The adjacent text statements are input into the entity linking model to obtain the second linking result corresponding to the entity to be linked. The second linking result includes the second entity identifier corresponding to the entity to be linked in the knowledge base.

[0010] Based on the first linking result and the second linking result, the target linking result corresponding to the entity to be linked is determined.

[0011] Optionally, the step of inputting the text statement containing the entity to be linked into the entity linking model to obtain the first linking result corresponding to the entity to be linked includes:

[0012] Obtain the triplet corresponding to the entity to be linked, and obtain the entity description information corresponding to the entity to be linked from the target retrieval library;

[0013] The text statement, the triples, and the entity description information are input into the entity linking model to obtain the first linking result corresponding to the entity to be linked.

[0014] Optionally, the step of inputting the adjacent text statements into the entity linking model to obtain the second linking result corresponding to the entity to be linked includes:

[0015] Obtain the triplet corresponding to the entity to be linked, and obtain the entity description information corresponding to the entity to be linked from the target retrieval library;

[0016] The adjacent text statements, the triples, and the entity description information are input into the entity linking model to obtain the second linking result corresponding to the entity to be linked.

[0017] Optionally, the first link result may further include a first confidence level corresponding to the first entity identifier, and the second link result may further include a second confidence level corresponding to the second entity identifier.

[0018] Optionally, based on the first linking result and the second linking result, the target linking result corresponding to the entity to be linked is determined, including:

[0019] If the first confidence level is greater than or equal to the first confidence level threshold, then the first entity identifier is determined as the target link result corresponding to the entity to be linked;

[0020] If the first confidence level is less than the first confidence level threshold, and the second confidence level is greater than or equal to the second confidence level threshold, then the second entity identifier is determined as the target link result corresponding to the entity to be linked.

[0021] If the first confidence level is less than the first confidence level threshold and the second confidence level is less than the second confidence level threshold, then the target link result is determined to be an entity that is not linked.

[0022] Wherein, the first confidence threshold is greater than the second confidence threshold.

[0023] Optionally, based on the first linking result and the second linking result, the target linking result corresponding to the entity to be linked is determined, including:

[0024] If the first confidence level is greater than or equal to the third confidence level threshold, then the first entity identifier is determined as the target link result corresponding to the entity to be linked;

[0025] If the first confidence level is less than the third confidence level threshold and greater than or equal to the fourth confidence level threshold, and the second confidence level is greater than or equal to the fifth confidence level threshold, then the second entity identifier is determined as the target link result corresponding to the entity to be linked;

[0026] If the first confidence level is less than the third confidence level threshold and greater than or equal to the fourth confidence level threshold, and the second confidence level is less than the fifth confidence level threshold, then the first entity identifier is determined as the target link result corresponding to the entity to be linked.

[0027] If the first confidence level is less than the fourth confidence level threshold, and the second confidence level is greater than or equal to the sixth confidence level threshold, then the second entity identifier is determined as the target link result corresponding to the entity to be linked;

[0028] If the first confidence level is less than the fourth confidence level threshold, and the second confidence level is less than the sixth confidence level threshold, then the target link result is determined to be an entity that is not linked.

[0029] Wherein, the third confidence threshold is greater than the fourth confidence threshold, the third confidence threshold is greater than the fifth confidence threshold, the fourth confidence threshold is greater than the sixth confidence threshold, and the fifth confidence threshold is greater than the sixth confidence threshold.

[0030] Optionally, the training process of the entity linking model includes:

[0031] Obtain the sample text statement including the sample entity, and obtain the entity link annotation corresponding to the sample entity;

[0032] Obtain the sample triples corresponding to the sample entities from the knowledge graph;

[0033] Obtain the sample document containing the sample triples;

[0034] Obtain the set of adjacent statements of the sample triplet in the sample document;

[0035] The entity link model is trained based on the sample triples, the sample text statements, the set of adjacent statements, and the entity link annotations to obtain the trained entity link model.

[0036] Optionally, obtaining the sample triples corresponding to the sample entity from the knowledge graph includes:

[0037] The structured information corresponding to the sample entity is obtained from the knowledge graph, and the structured information includes attributes and attribute values;

[0038] The sample entity, the attribute, and the attribute value are defined as the sample triplet.

[0039] Optionally, obtaining the sample document including the sample triplet includes:

[0040] Retrieve sample documents containing the sample triples from the target retrieval database.

[0041] Optionally, the set of adjacent statements of the sample triple in the sample document is obtained, including:

[0042] Determine the statement in the sample document where the sample triplet is located;

[0043] Centered on the stated statement, obtain adjacent text within a preset window in the sample document;

[0044] Randomly select fewer text statements than the number of statements in the preset window from the adjacent text to form the adjacent statement set.

[0045] Optionally, before training the entity link model based on the sample triples, the sample text statements, the set of adjacent statements, and the entity link annotations to obtain the trained entity link model, the method further includes:

[0046] Obtain entity description information corresponding to the sample entity from the knowledge graph;

[0047] The entity link model is trained based on the sample triples, sample text statements, the set of adjacent statements, and the entity link annotations to obtain the trained entity link model, including:

[0048] Input the sample triplet, the sample text statement, the set of adjacent statements, and the entity description information into the entity linking model to obtain the output result;

[0049] Based on the output results and the entity link annotations, the entity link model is trained to obtain the trained entity link model.

[0050] According to a second aspect of the present disclosure, a physical linking device is provided, comprising:

[0051] The first result determination module is configured to input a text statement including the entity to be linked into the entity linking model to obtain the first linking result corresponding to the entity to be linked. The first linking result includes the first entity identifier corresponding to the entity to be linked in the knowledge base.

[0052] The adjacent statement acquisition module is configured to acquire adjacent text statements from the document containing the text statement.

[0053] The second result determination module is configured to input the adjacent text statements into the entity linking model to obtain the second linking result corresponding to the entity to be linked. The second linking result includes the second entity identifier corresponding to the entity to be linked in the knowledge base.

[0054] The target result determination module is configured to determine the target link result corresponding to the entity to be linked based on the first link result and the second link result.

[0055] Optionally, the first result determination module includes:

[0056] The first entity information acquisition unit is configured to acquire the triplet corresponding to the entity to be linked and to acquire the entity description information corresponding to the entity to be linked from the target retrieval library.

[0057] The first result determination unit is configured to input the text statement, the triplet, and the entity description information into the entity linking model to obtain the first linking result corresponding to the entity to be linked.

[0058] Optionally, the second result determination module includes:

[0059] The second entity information acquisition unit is used to acquire the triplet corresponding to the entity to be linked and to acquire the entity description information corresponding to the entity to be linked from the target retrieval library.

[0060] The second result determination unit is used to input the adjacent text statements, the triples and the entity description information into the entity linking model to obtain the second linking result corresponding to the entity to be linked.

[0061] Optionally, the first link result may further include a first confidence level corresponding to the first entity identifier, and the second link result may further include a second confidence level corresponding to the second entity identifier.

[0062] Optionally, the target result determination module is configured to execute:

[0063] If the first confidence level is greater than or equal to the first confidence level threshold, then the first entity identifier is determined as the target link result corresponding to the entity to be linked;

[0064] If the first confidence level is less than the first confidence level threshold, and the second confidence level is greater than or equal to the second confidence level threshold, then the second entity identifier is determined as the target link result corresponding to the entity to be linked.

[0065] If the first confidence level is less than the first confidence level threshold and the second confidence level is less than the second confidence level threshold, then the target link result is determined to be an entity that is not linked.

[0066] Wherein, the first confidence threshold is greater than the second confidence threshold.

[0067] Optionally, the target result determination module is configured to execute:

[0068] If the first confidence level is greater than or equal to the third confidence level threshold, then the first entity identifier is determined as the target link result corresponding to the entity to be linked;

[0069] If the first confidence level is less than the third confidence level threshold and greater than or equal to the fourth confidence level threshold, and the second confidence level is greater than or equal to the fifth confidence level threshold, then the second entity identifier is determined as the target link result corresponding to the entity to be linked;

[0070] If the first confidence level is less than the third confidence level threshold and greater than or equal to the fourth confidence level threshold, and the second confidence level is less than the fifth confidence level threshold, then the first entity identifier is determined as the target link result corresponding to the entity to be linked.

[0071] If the first confidence level is less than the fourth confidence level threshold, and the second confidence level is greater than or equal to the sixth confidence level threshold, then the second entity identifier is determined as the target link result corresponding to the entity to be linked;

[0072] If the first confidence level is less than the fourth confidence level threshold, and the second confidence level is less than the sixth confidence level threshold, then the target link result is determined to be an entity that is not linked.

[0073] Wherein, the third confidence threshold is greater than the fourth confidence threshold, the third confidence threshold is greater than the fifth confidence threshold, the fourth confidence threshold is greater than the sixth confidence threshold, and the fifth confidence threshold is greater than the sixth confidence threshold.

[0074] Optionally, the device further includes a model training module, the model training module comprising:

[0075] The sample statement and standard acquisition unit is configured to execute the acquisition of sample text statements including sample entities, and to acquire the entity link annotations corresponding to the sample entities;

[0076] The sample triplet acquisition unit is configured to retrieve the sample triplet corresponding to the sample entity from the knowledge graph;

[0077] The sample document acquisition unit is configured to acquire a sample document including the sample triplet.

[0078] The adjacent statement set acquisition unit is configured to acquire the adjacent statement set of the sample triple in the sample document;

[0079] The model training unit is configured to train the entity link model based on the sample triples, the sample text statements, the set of adjacent statements, and the entity link annotations, to obtain the trained entity link model.

[0080] Optionally, the sample triplet acquisition unit is configured to perform:

[0081] The structured information corresponding to the sample entity is obtained from the knowledge graph, and the structured information includes attributes and attribute values;

[0082] The sample entity, the attribute, and the attribute value are defined as the sample triplet.

[0083] Optionally, the sample document acquisition unit is configured to perform:

[0084] Retrieve sample documents containing the sample triples from the target retrieval database.

[0085] Optionally, the adjacent statement set acquisition unit is configured to execute:

[0086] Determine the statement in the sample document where the sample triplet is located;

[0087] Centered on the stated statement, obtain adjacent text within a preset window in the sample document;

[0088] Randomly select fewer text statements than the number of statements in the preset window from the adjacent text to form the adjacent statement set.

[0089] Optionally, the model training module further includes:

[0090] The description information acquisition unit is configured to acquire entity description information corresponding to the sample entity from the knowledge graph;

[0091] The model training unit is configured to perform:

[0092] Input the sample triplet, the sample text statement, the set of adjacent statements, and the entity description information into the entity linking model to obtain the output result;

[0093] Based on the output results and the entity link annotations, the entity link model is trained to obtain the trained entity link model.

[0094] According to a third aspect of the present disclosure, an electronic device is provided, comprising:

[0095] processor;

[0096] Memory used to store the processor's executable instructions;

[0097] The processor is configured to execute the instructions to implement the entity linking method as described in the first aspect.

[0098] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, wherein when instructions in the computer storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the entity linking method as described in the first aspect.

[0099] According to a fifth aspect of the present disclosure, a computer program product is provided, including a computer program or computer instructions, which, when executed by a processor, implement the entity linking method described in the first aspect.

[0100] The technical solutions provided by the embodiments of this disclosure have at least the following beneficial effects:

[0101] This embodiment of the disclosure obtains a first linking result corresponding to the entity to be linked by inputting a text statement containing the entity to be linked into an entity linking model. It then obtains adjacent text statements from the document containing the text statement, inputs these adjacent text statements into the entity linking model, and obtains a second linking result corresponding to the entity to be linked. Based on the first and second linking results, the target linking result corresponding to the entity to be linked is determined. Since the target linking result can be determined by combining the first linking result of the text statement containing the entity to be linked and the second linking results of the adjacent text statements, the final entity linking result is determined by combining the contextual information of the text statement containing the entity to be linked, which improves the accuracy of the entity linking result.

[0102] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0103] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.

[0104] Figure 1 This is a flowchart illustrating an entity linking method according to an exemplary embodiment;

[0105] Figure 2 This is a flowchart illustrating the training process of an entity linking model according to an exemplary embodiment;

[0106] Figure 3 This is a flowchart illustrating the training process of an entity linking model according to an exemplary embodiment;

[0107] Figure 4 This is a schematic diagram of the entity linking model in the embodiments of this disclosure;

[0108] Figure 5 This is a block diagram illustrating a physical linking device according to an exemplary embodiment;

[0109] Figure 6 This is a block diagram illustrating an electronic device according to an exemplary embodiment. Detailed Implementation

[0110] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.

[0111] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0112] Figure 1 This is a flowchart illustrating an entity linking method according to an exemplary embodiment, such as... Figure 1 As shown, this entity linking method is used in electronic devices such as mobile phones and tablets, and includes the following steps.

[0113] In step S11, a text statement including the entity to be linked is input into the entity linking model to obtain the first linking result corresponding to the entity to be linked. The first linking result includes the first entity identifier corresponding to the entity to be linked in the knowledge base.

[0114] Here, "entity" refers to a named entity, which includes names of people, organizations, places, and all other entities identified by names. The entity to be linked (entity Mention) can be a substitute or designation for an entity in the knowledge base. Entities in the knowledge base are standard entities; for example, an entity in the knowledge base could be a central processing unit, and the entity to be linked could be a processor or CPU, etc. The first entity identifier is the identifier of the first entity in the knowledge base to which the entity to be linked is linked, determined based on the text statement. This identifier can be an ID. The same entity name may represent different entities, so they are represented by different IDs in the knowledge base. For example, "Poet Li Bai" and "Game Character Li Bai" are two different entities.

[0115] When determining the entity linking result corresponding to the entity to be linked, the entire text statement including the entity to be linked can be input into the entity linking model. The entity linking model links the entity to be linked in the text statement to a first entity identifier in the knowledge base, obtaining the first linking result corresponding to the entity to be linked. The first linking result may also include a first confidence level corresponding to the first entity identifier. The first entity identifier is the identifier of the entity in the knowledge base that the entity to be linked is linked to, determined based on the text statement containing the entity to be linked. The first confidence level is the credibility of the link between the entity to be linked and the entity corresponding to the first entity identifier.

[0116] In step S12, the adjacent text statements of the text statement are obtained from the document containing the text statement.

[0117] A document may include multiple statements. The context information of the text statement containing the entity to be linked can be obtained from the document; that is, the adjacent text statements can be obtained from the document. These adjacent text statements can be a certain number of statements preceding and / or following the text statement. For example, they could be the preceding and / or following sentence, or the preceding and / or following two sentences, or even the preceding and following two sentences, etc. The document may, for example, be descriptive information from a video.

[0118] In step S13, the adjacent text statements are input into the entity linking model to obtain the second linking result corresponding to the entity to be linked. The second linking result includes the second entity identifier corresponding to the entity to be linked in the knowledge base.

[0119] The second entity identifier is the identifier of the entity in the knowledge base to which the entity to be linked is linked, determined based on the adjacent text statements. The second entity identifier and the first entity identifier can be the same entity identifier or different entity identifiers. For example, when the entity to be linked is "Li Bai," the first entity identifier can include the identifier of "Poet Li Bai" in the knowledge base and the identifier of "Game Character Li Bai" in the knowledge base; the second entity identifier can include the identifier of "Poet Li Bai" in the knowledge base and the identifiers of other figures with the name "Li Bai" in the knowledge base. In this example, if the text statement describes information related to a poet, then in the first linking result, the first confidence level corresponding to the identifier of "Poet Li Bai" in the knowledge base is greater than the first confidence level corresponding to the identifier of "Game Character Li Bai" in the knowledge base; if the text statement describes information related to a game, then in the first linking result, the first confidence level corresponding to the identifier of "Game Character Li Bai" in the knowledge base is greater than the first confidence level corresponding to the identifier of "Poet Li Bai" in the knowledge base.

[0120] Adjacent text statements are input into an entity linking model. The model identifies the entities to be linked described by the adjacent text statements and links these entities to a second entity identifier in a knowledge base, resulting in a second linking result. This second linking result may further include a second confidence level corresponding to the second entity identifier. The second entity identifier is the identifier of the entity in the knowledge base to which the entity to be linked is linked, determined based on the adjacent text statements of the text statement containing the entity to be linked. The second confidence level represents the credibility of the link between the entity to be linked and the entity corresponding to the second entity identifier.

[0121] In step S14, the target link result corresponding to the entity to be linked is determined based on the first link result and the second link result.

[0122] By combining the first and second linking results, the target linking result corresponding to the entity to be linked is determined. This can be achieved by selecting the first entity identifier with the highest first confidence level from the first linking results and the second entity identifier with the highest second confidence level from the second linking results. Based on the first entity identifier and its corresponding first confidence level, and the second entity identifier and its corresponding second confidence level, the target linking result corresponding to the entity to be linked is determined. For example, if the first entity identifier and the second entity identifier are the same entity identifier, then the target linking result corresponding to the entity to be linked is that same entity identifier. Alternatively, a predetermined number of first entity identifiers with the highest first confidence level can be selected from the first linking results, and a predetermined number of second entity identifiers with the highest second confidence level can be selected from the second linking results. A weighted sum of the first and second confidence levels is then taken for the same entity identifier among the first and second entity identifiers, and this sum is used as the confidence level of that same entity identifier. The entity identifier with the highest confidence level is then determined as the target linking result corresponding to the entity to be linked. For example, in the first link result, the first entity identifiers are A, B, and C, with a first confidence level of 0.6 for A, 0.5 for B, and 0.4 for C. In the second link result, the second entity identifiers are A, C, and D, with a second confidence level of 0.5 for A, 0.4 for C, and 0.3 for D. The weight of the first link result is 0.7, and the weight of the second link result is 0.3. Therefore, the confidence levels corresponding to the same entity identifier are: 0.6*0.7+0.5*0.3=0.57 for A, 0.5 for B, 0.4*0.7+0.4*0.3=0.4 for C, and 0.3 for D. In this case, it can be determined that entity identifier A is the target link result.

[0123] In an exemplary embodiment, determining the target link result corresponding to the entity to be linked, based on the first link result and the second link result, includes:

[0124] If the first confidence level is greater than or equal to the first confidence level threshold, then the first entity identifier is determined as the target link result corresponding to the entity to be linked;

[0125] If the first confidence level is less than the first confidence level threshold, and the second confidence level is greater than or equal to the second confidence level threshold, then the second entity identifier is determined as the target link result corresponding to the entity to be linked.

[0126] If the first confidence level is less than the first confidence level threshold and the second confidence level is less than the second confidence level threshold, then the target link result is determined to be an entity that is not linked.

[0127] Wherein, the first confidence threshold is greater than the second confidence threshold.

[0128] Compare the first confidence level and the first confidence threshold. If the first confidence level is greater than or equal to the first confidence threshold, the first entity identifier can be directly identified as the target link result corresponding to the entity to be linked. If the first confidence level is less than the first confidence threshold, the second confidence level and the second confidence threshold can be further compared. If the second confidence level is greater than or equal to the second confidence threshold, the second entity identifier can be identified as the target link result corresponding to the entity to be linked. If the first confidence level is less than the first confidence threshold and the second confidence level is less than the second confidence threshold, the target link result can be determined to be empty, that is, no entity in the knowledge base is linked.

[0129] For example, if the first entity identifier is A, and the first confidence level corresponding to the first entity identifier A is 0.8, and the second entity identifier is B, and the second confidence level corresponding to the second entity identifier B is 0.3, the first confidence threshold is 0.6, and the second confidence threshold is 0.4, then we first compare the first confidence level with the first confidence threshold. We find that the first confidence level of 0.8 is greater than the first confidence threshold of 0.6. At this point, we can determine that the target link result is the first entity identifier A.

[0130] By comparing the first confidence level with the first confidence threshold, and comparing the second confidence level with the second confidence threshold, the target link result can be accurately determined, further improving the accuracy of entity linking.

[0131] In another exemplary embodiment, determining the target link result corresponding to the entity to be linked, based on the first link result and the second link result, includes:

[0132] If the first confidence level is greater than or equal to the third confidence level threshold, then the first entity identifier is determined as the target link result corresponding to the entity to be linked;

[0133] If the first confidence level is less than the third confidence level threshold and greater than or equal to the fourth confidence level threshold, and the second confidence level is greater than or equal to the fifth confidence level threshold, then the second entity identifier is determined as the target link result corresponding to the entity to be linked;

[0134] If the first confidence level is less than the third confidence level threshold and greater than or equal to the fourth confidence level threshold, and the second confidence level is less than the fifth confidence level threshold, then the first entity identifier is determined as the target link result corresponding to the entity to be linked.

[0135] If the first confidence level is less than the fourth confidence level threshold, and the second confidence level is greater than or equal to the sixth confidence level threshold, then the second entity identifier is determined as the target link result corresponding to the entity to be linked;

[0136] If the first confidence level is less than the fourth confidence level threshold, and the second confidence level is less than the sixth confidence level threshold, then the target link result is determined to be an entity that is not linked.

[0137] Wherein, the third confidence threshold is greater than the fourth confidence threshold, the third confidence threshold is greater than the fifth confidence threshold, the fourth confidence threshold is greater than the sixth confidence threshold, and the fifth confidence threshold is greater than the sixth confidence threshold.

[0138] For scenarios where the accuracy of entity linking results is critical, two confidence thresholds can be pre-set for comparison at the first confidence level, namely the third and fourth confidence thresholds. Similarly, two confidence thresholds can be pre-set for comparison at the second confidence level, namely the fifth and sixth confidence thresholds.

[0139] First, compare the first confidence level with the third confidence threshold. If the first confidence level is greater than or equal to the third confidence threshold, the first entity identifier has high credibility and can be directly identified as the target link result corresponding to the entity to be linked. If the first confidence level is less than the third confidence threshold but greater than or equal to the fourth confidence threshold, the first entity identifier has moderate credibility. In this case, continue comparing the second confidence level with the fifth confidence threshold. If the second confidence level is greater than or equal to the fifth confidence threshold, the second entity identifier has high credibility and can be identified as the target link result corresponding to the entity to be linked. If the first confidence level is less than the third confidence threshold but greater than or equal to the fourth confidence threshold, the second confidence level... If the confidence level is less than the fifth confidence threshold, the first entity identifier can be identified as the target link result corresponding to the entity to be linked. If the first confidence level is less than the fourth confidence threshold, it indicates that the confidence level of the first entity identifier is low. In this case, the second confidence level is compared with the sixth confidence threshold. If the second confidence level is greater than or equal to the sixth confidence threshold, it indicates that the confidence level of the second entity identifier is average. In this case, the second entity identifier can be identified as the target link result corresponding to the entity to be linked. If the first confidence level is less than the fourth confidence threshold and the second confidence level is less than the sixth confidence threshold, it indicates that the confidence levels of both the first and second entity identifiers are relatively low. In this case, the target link result can be determined to be empty, that is, the entity to be linked has not been linked to an entity in the knowledge base.

[0140] By setting two confidence thresholds for the first confidence level and comparing them, and setting two confidence thresholds for the second confidence level to determine the target link result, the accuracy of entity linking can be further improved.

[0141] The entity linking method provided in this exemplary embodiment can be applied to multiple scenarios. For example, it can be applied to general news to link entities, thereby helping to understand the news and assisting in the secondary creation of news; it can also be applied to hotspot mining in videos, by identifying entities in videos uploaded by different users and then completing the early mining of hotspots through entity aggregation; it can also assist video creators in video creation by recognizing video text (such as titles, OCR, ASR, etc.) to help video creators tag their videos.

[0142] The entity linking method provided in this exemplary embodiment obtains a first linking result corresponding to the entity by inputting a text statement containing the entity to be linked into an entity linking model. It then obtains adjacent text statements from the document containing the text statement, inputs these adjacent text statements into the entity linking model, and obtains a second linking result corresponding to the entity to be linked. Based on the first and second linking results, it determines the target linking result corresponding to the entity to be linked. Since the target linking result can be determined by combining the first linking result of the text statement containing the entity to be linked and the second linking results of the adjacent text statements, it achieves the goal of determining the final entity linking result by combining the contextual information of the text statement containing the entity to be linked, thereby improving the accuracy of the entity linking result.

[0143] Based on the above technical solution, the step of inputting a text statement including the entity to be linked into the entity linking model to obtain the first linking result corresponding to the entity to be linked includes: obtaining the triple corresponding to the entity to be linked, and obtaining the entity description information corresponding to the entity to be linked from the target retrieval library; inputting the text statement, the triple, and the entity description information into the entity linking model to obtain the first linking result corresponding to the entity to be linked.

[0144] The triple is an SPO (subject, predicate, object) triple, which includes the entity to be linked, another entity, and the relationship between the entity to be linked and the other entity.

[0145] The triples corresponding to the entity to be linked can be obtained from the text statement, or the entity to be linked can be retrieved from the knowledge graph, and the triples corresponding to the entity to be linked can be obtained from the retrieval results. The entity to be linked can be retrieved from the target retrieval database, and the entity description information corresponding to the entity to be linked can be obtained from the retrieval results. The text statement containing the entity to be linked, the triples, and the entity description information are used as input features to the entity linking model. The entity linking model combines the text statement, triples, and entity description information to perform entity linking processing, obtaining the first linking result corresponding to the entity to be linked. Because the first linking result is determined by combining the entity to be linked, the triples, and the entity description information, the accuracy of the first linking result can be improved, thereby improving the accuracy of the final entity linking result.

[0146] Based on the above technical solution, the step of inputting the adjacent text statements into the entity linking model to obtain the second linking result corresponding to the entity to be linked includes: obtaining the triples corresponding to the entity to be linked, and obtaining the entity description information corresponding to the entity to be linked from the target retrieval library; inputting the adjacent text statements, the triples, and the entity description information into the entity linking model to obtain the second linking result corresponding to the entity to be linked.

[0147] The triples corresponding to the entity to be linked can be obtained from the adjacent text statements, or the entity to be linked can be retrieved from the knowledge graph and the triples corresponding to the entity to be linked can be obtained from the retrieval results. The entity to be linked can be retrieved from the target retrieval database and the entity description information corresponding to the entity to be linked can be obtained from the retrieval results. The adjacent text statements, triples, and entity description information of the text statement containing the entity to be linked are used as input features of the entity linking model and input into the entity linking model. The entity linking model combines the adjacent text statements, triples, and entity description information to perform entity linking processing, obtaining the second linking result corresponding to the entity to be linked. Since the second linking result is determined by combining the adjacent text statements, triples, and entity description information of the entity to be linked, the accuracy of the second linking result can be improved, thereby improving the accuracy of the final entity linking result.

[0148] Figure 2 This is a flowchart illustrating the training process of an entity linking model according to an exemplary embodiment, such as... Figure 2 As shown, the training process of this entity linking model includes the following steps.

[0149] In step S21, sample text statements including sample entities are obtained, and entity link annotations corresponding to the sample entities are obtained.

[0150] The sample entity can be a substitute for a standard entity in the knowledge base.

[0151] Before training the entity link model, training data is first prepared by obtaining a set of sentences composed of multiple sample text sentences, each of which includes sample entities. At the same time, the entity link annotations corresponding to the sample entities in each sample text sentence are obtained.

[0152] In step S22, the sample triplet corresponding to the sample entity is obtained from the knowledge graph.

[0153] The knowledge graph can be a general knowledge graph, such as wikidata, Wikipedia, DBPedia, YAGO, etc., or it can be a knowledge graph for a specific domain.

[0154] The knowledge graph stores multiple entities and the relationships between them. Thus, other entities associated with the sample entity and the relationships between the sample entity and other entities can be obtained from the knowledge graph, resulting in a sample triplet that includes the sample entity, other entities, and the relationships between the sample entity and other entities.

[0155] In an exemplary embodiment, obtaining the sample triple corresponding to the sample entity from the knowledge graph includes: obtaining structured information corresponding to the sample entity from the knowledge graph, the structured information including attributes and attribute values; and determining the sample entity, the attributes, and the attribute values ​​as the sample triple.

[0156] Sample entities are retrieved from the knowledge graph, and the structured information corresponding to the sample entities is obtained from the retrieval results. Attributes and their corresponding attribute values ​​are extracted from the structured information, and the sample entity, attribute, and attribute value are identified as sample triples. Based on the structured information corresponding to sample entities in the knowledge graph, the sample triples corresponding to the sample entities can be accurately obtained.

[0157] In step S23, a sample document including the sample triplet is obtained.

[0158] When the document containing the sample text statement includes sample triples, the document containing the sample text statement can be used as the sample document; alternatively, one or more sample documents containing sample triples can be obtained through retrieval.

[0159] In one exemplary embodiment, obtaining a sample document including the sample triplet includes: retrieving a sample document including the sample triplet from a target retrieval library.

[0160] The target search database can be a multilingual full Wikipedia, search engines such as Baidu or Google, or vertical information websites.

[0161] Sample triples are used as search keywords, and a search is performed from the target search database. One or more documents with high matching degrees are selected from the search results as sample documents. By retrieving sample documents from the target search database, the diversity of the obtained sample documents can be increased, thereby improving the generalization ability of the trained entity linking model.

[0162] In step S24, the set of adjacent statements of the sample triple is obtained in the sample document.

[0163] Identify the statement in the sample document that contains the sample triple and obtain the context information of that statement, that is, obtain multiple adjacent statements in the context of that statement to obtain the set of adjacent statements of the sample triple.

[0164] In an exemplary embodiment, obtaining the set of adjacent statements of the sample triplet in the sample document includes: determining the statement in the sample document where the sample triplet is located; obtaining adjacent text within a preset window in the sample document with the statement as the center; and randomly selecting fewer text statements than the number of statements within the preset window from the adjacent text as the set of adjacent statements.

[0165] The statement in a sample document containing a sample triple can be determined by matching the sample triple with statements in the sample document. Of course, other methods can also be used to determine the statement in a sample document containing a sample triple.

[0166] Centered on the statement containing the sample triplet in the sample document, the algorithm retrieves adjacent text within a preset window in the sample document. This adjacent text includes multiple statements. One or more text statements, fewer than the number of statements within the preset window, are randomly selected from the adjacent text, and these selected statements are treated as a set of adjacent statements. For example, the preset window could be the first three and last three sentences of the statement containing the sample triplet in the sample document, while the selected one or more text statements could be the first two and last sentences, the first sentence and last two sentences, or the first three sentences and last two sentences, etc.

[0167] By randomly selecting fewer text sentences than the preset number of sentences from the adjacent text of the sentence containing the sample triplet in the sample document, and using this adjacent sentence set as an input feature when training the entity linking model, the randomness of the adjacent sentence set can be increased, thereby improving the generalization of the trained entity linking model.

[0168] In step S25, the entity link model is trained based on the sample triples, the sample text statements, the set of adjacent statements, and the entity link annotations to obtain the trained entity link model.

[0169] The sample triples, sample text sentences, and adjacent sentence sets are used as input features of the pre-trained language model and input into the entity linking model to obtain the output results. Based on the differences between the output results and the entity link annotations, the network parameters of the entity linking model are adjusted. Then, the network parameters of the entity linking model are iteratively adjusted based on the sample triples, sample text sentences, and adjacent sentence sets corresponding to multiple sample entities until the training termination condition is met, at which point training ends, resulting in the trained entity linking model. The entity linking model before training can be constructed based on the pre-trained language model, which can be a Roberta model or an XLNet model.

[0170] It should be noted that when training the entity linking model, one sample triplet and its corresponding sample text statement and adjacent statement set can be used at a time, or multiple sample triplets and their corresponding sample text statements and adjacent statement sets can be used.

[0171] This exemplary embodiment obtains sample triples corresponding to sample entities from a knowledge graph after acquiring sample text statements including sample entities and entity link annotations corresponding to the sample entities. It then obtains sample documents including sample triples, acquires a set of adjacent statements of the sample triples in the sample documents, and trains an entity linking model based on the sample triples, sample text statements, adjacent statement sets, and entity link annotations to obtain a trained entity linking model. Since the entity linking model is trained by combining sample triples, sample text statements, and adjacent statement sets in the sample documents, the contextual information of the sample triples is incorporated to train the entity linking model, which can improve the generalization of the trained entity linking model and thus improve the accuracy of the results obtained when the trained entity linking model performs entity linking.

[0172] Based on the above technical solution, before training the entity link model according to the sample triples, the sample text statements, the adjacent statement set and the entity link annotation to obtain the trained entity link model, the method further includes: obtaining entity description information corresponding to the sample entity from the knowledge graph.

[0173] The entity link model is trained based on the sample triples, sample text statements, the set of adjacent statements, and the entity link annotations to obtain a trained entity link model. This process includes: inputting the sample triples, sample text statements, the set of adjacent statements, and the entity description information into the pre-trained language model to obtain an output result; and training the entity link model based on the output result and the entity link annotations to obtain a trained entity link model.

[0174] Sample entities are retrieved from the knowledge graph, and their corresponding entity descriptions are obtained. During the training of the entity linking model, the entity descriptions, sample triples, sample text statements, and sets of adjacent statements are used as input features. These are then fed into the entity linking model to obtain the output. Based on the difference between the output and the entity link annotations, the parameters of the entity linking model are adjusted. The training process is iteratively executed until the training termination condition is met, at which point the training ends, resulting in the trained entity linking model.

[0175] By combining entity description information to train the entity linking model, the accuracy of the entity linking results of the trained entity linking model can be improved.

[0176] Figure 3 This is a flowchart illustrating the training process of an entity linking model according to an exemplary embodiment, such as... Figure 3 As shown, the training process of this entity linking model includes the following steps.

[0177] In step S31, sample text statements including sample entities are obtained, and entity link annotations corresponding to the sample entities are obtained.

[0178] In step S32, the structured information corresponding to the sample entity is obtained from the knowledge graph, and the structured information includes attributes and attribute values.

[0179] In step S33, the sample entity, the attribute, and the attribute value are determined as the sample triplet.

[0180] For a sample entity, multiple attributes and their corresponding values ​​can be obtained, thus yielding the set of sample triples corresponding to the sample entity.

[0181] In step S34, entity description information corresponding to the sample entity is obtained from the knowledge graph.

[0182] In step S35, based on the entity description information and the sample triplet, a sample document including the sample triplet is obtained from the target retrieval library.

[0183] For each sample triplet in the sample triplet set, a search is performed in the target retrieval database based on the entity description information and the sample triplet to obtain sample documents that include the sample triplet.

[0184] In step S36, the statement in which the sample triple is located in the sample document is determined.

[0185] For each sample triplet in the sample triplet set, find the statement containing the sample triplet in the sample document.

[0186] In step S37, with the statement as the center, the adjacent text within the preset window in the sample document is obtained.

[0187] In step S38, fewer text statements than the number of statements in the preset window are randomly selected from the adjacent text to form the adjacent statement set.

[0188] In step S39, the entity link model is trained based on the sample triples, the sample text statements, the set of adjacent statements, and the entity link annotations to obtain the trained entity link model.

[0189] This exemplary embodiment combines sample triples, sample text statements, and a set of adjacent statements in the sample document when training the entity linking model. This incorporates the contextual information of the sample triples to train the entity linking model, improving the generalization of the trained model. Furthermore, by randomly selecting fewer text statements than the preset number of statements from the adjacent text of the statement containing the sample triple in the sample document, and using this set as an input feature for subsequent training of the entity linking model, the randomness of the adjacent statement set is increased, further enhancing the generalization of the trained entity linking model and improving the accuracy of the results obtained when performing entity linking.

[0190] Figure 4 This is a schematic diagram of the entity linking model in the embodiments of this disclosure, as shown below. Figure 4As shown, the entity linking model includes an input layer, an encoder, and an output layer. During training, the input layer can receive data including sample text sentences, entity descriptions, entity triples, and a set of generalized entity contexts. CLS serves as the starting character of the sample input sentence, and SEP serves as the starting pose for the entity description, the entity triple, and the set of generalized entity contexts, respectively. For each input data, the segment and position within that segment in the sample document can also be input. For example, for a sample text sentence, the segment and position within that segment can also be input. The encoder can be a Bidirectional Transformer, such as Roberta or XLNet, or other pre-trained models. The output layer outputs the linking results from the knowledge base.

[0191] Figure 5 This is a block diagram illustrating a physical linking device according to an exemplary embodiment. (Refer to...) Figure 5 The device includes a first result determination module 51, an adjacent statement acquisition module 52, a second result determination module 53, and a target result determination module 54.

[0192] The first result determination module 51 is configured to execute a text statement including the entity to be linked input into the entity linking model to obtain a first linking result corresponding to the entity to be linked, wherein the first linking result includes the first entity identifier corresponding to the entity to be linked in the knowledge base;

[0193] The adjacent statement acquisition module 52 is configured to acquire adjacent text statements from the document containing the text statement.

[0194] The second result determination module 53 is configured to input the adjacent text statements into the entity linking model to obtain the second linking result corresponding to the entity to be linked, wherein the second linking result includes the second entity identifier corresponding to the entity to be linked in the knowledge base;

[0195] The target result determination module 54 is configured to determine the target link result corresponding to the entity to be linked based on the first link result and the second link result.

[0196] Optionally, the first result determination module includes:

[0197] The first entity information acquisition unit is configured to acquire the triplet corresponding to the entity to be linked and to acquire the entity description information corresponding to the entity to be linked from the target retrieval library.

[0198] The first result determination unit is configured to input the text statement, the triplet, and the entity description information into the entity linking model to obtain the first linking result corresponding to the entity to be linked.

[0199] Optionally, the second result determination module includes:

[0200] The second entity information acquisition unit is used to acquire the triplet corresponding to the entity to be linked and to acquire the entity description information corresponding to the entity to be linked from the target retrieval library.

[0201] The second result determination unit is used to input the adjacent text statements, the triples and the entity description information into the entity linking model to obtain the second linking result corresponding to the entity to be linked.

[0202] Optionally, the first link result may further include a first confidence level corresponding to the first entity identifier, and the second link result may further include a second confidence level corresponding to the second entity identifier.

[0203] Optionally, the target result determination module is configured to execute:

[0204] If the first confidence level is greater than or equal to the first confidence level threshold, then the first entity identifier is determined as the target link result corresponding to the entity to be linked;

[0205] If the first confidence level is less than the first confidence level threshold, and the second confidence level is greater than or equal to the second confidence level threshold, then the second entity identifier is determined as the target link result corresponding to the entity to be linked.

[0206] If the first confidence level is less than the first confidence level threshold and the second confidence level is less than the second confidence level threshold, then the target link result is determined to be an entity that is not linked.

[0207] Wherein, the first confidence threshold is greater than the second confidence threshold.

[0208] Optionally, the target result determination module is configured to execute:

[0209] If the first confidence level is greater than or equal to the third confidence level threshold, then the first entity identifier is determined as the target link result corresponding to the entity to be linked;

[0210] If the first confidence level is less than the third confidence level threshold and greater than or equal to the fourth confidence level threshold, and the second confidence level is greater than or equal to the fifth confidence level threshold, then the second entity identifier is determined as the target link result corresponding to the entity to be linked;

[0211] If the first confidence level is less than the third confidence level threshold and greater than or equal to the fourth confidence level threshold, and the second confidence level is less than the fifth confidence level threshold, then the first entity identifier is determined as the target link result corresponding to the entity to be linked.

[0212] If the first confidence level is less than the fourth confidence level threshold, and the second confidence level is greater than or equal to the sixth confidence level threshold, then the second entity identifier is determined as the target link result corresponding to the entity to be linked;

[0213] If the first confidence level is less than the fourth confidence level threshold, and the second confidence level is less than the sixth confidence level threshold, then the target link result is determined to be an entity that is not linked.

[0214] Wherein, the third confidence threshold is greater than the fourth confidence threshold, the third confidence threshold is greater than the fifth confidence threshold, the fourth confidence threshold is greater than the sixth confidence threshold, and the fifth confidence threshold is greater than the sixth confidence threshold.

[0215] Optionally, the device further includes a model training module, the model training module comprising:

[0216] The sample statement and standard acquisition unit is configured to execute the acquisition of sample text statements including sample entities, and to acquire the entity link annotations corresponding to the sample entities;

[0217] The sample triplet acquisition unit is configured to retrieve the sample triplet corresponding to the sample entity from the knowledge graph;

[0218] The sample document acquisition unit is configured to acquire a sample document including the sample triplet.

[0219] The adjacent statement set acquisition unit is configured to acquire the adjacent statement set of the sample triple in the sample document;

[0220] The model training unit is configured to train the entity link model based on the sample triples, the sample text statements, the set of adjacent statements, and the entity link annotations, to obtain the trained entity link model.

[0221] Optionally, the sample triplet acquisition unit is configured to perform:

[0222] The structured information corresponding to the sample entity is obtained from the knowledge graph, and the structured information includes attributes and attribute values;

[0223] The sample entity, the attribute, and the attribute value are defined as the sample triplet.

[0224] Optionally, the sample document acquisition unit is configured to perform:

[0225] Retrieve sample documents containing the sample triples from the target retrieval database.

[0226] Optionally, the adjacent statement set acquisition unit is configured to execute:

[0227] Determine the statement in the sample document where the sample triplet is located;

[0228] Centered on the stated statement, obtain adjacent text within a preset window in the sample document;

[0229] Randomly select fewer text statements than the number of statements in the preset window from the adjacent text to form the adjacent statement set.

[0230] Optionally, the model training module further includes:

[0231] The description information acquisition unit is configured to acquire entity description information corresponding to the sample entity from the knowledge graph;

[0232] The model training unit is configured to perform:

[0233] Input the sample triplet, the sample text statement, the set of adjacent statements, and the entity description information into the entity linking model to obtain the output result;

[0234] Based on the output results and the entity link annotations, the entity link model is trained to obtain the trained entity link model.

[0235] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0236] Figure 6 This is a block diagram illustrating an electronic device according to an exemplary embodiment. For example, the electronic device 600 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.

[0237] Reference Figure 6The electronic device 600 may include one or more of the following components: a processing component 602, a memory 604, a power supply component 606, a multimedia component 608, an audio component 610, an input / output (I / O) interface 612, a sensor component 614, and a communication component 616.

[0238] Processing component 602 typically controls the overall operation of electronic device 600, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 602 may include one or more processors 620 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 602 may include one or more modules to facilitate interaction between processing component 602 and other components. For example, processing component 602 may include a multimedia module to facilitate interaction between multimedia component 608 and processing component 602.

[0239] Memory 604 is configured to store various types of data to support the operation of electronic device 600. Examples of this data include instructions for any application or method operating on electronic device 600, contact data, phonebook data, messages, pictures, videos, etc. Memory 604 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0240] Power supply component 606 provides power to various components of electronic device 600. Power supply component 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 600.

[0241] Multimedia component 608 includes a screen that provides an output interface between the electronic device 600 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 608 includes a front-facing camera and / or a rear-facing camera. When the electronic device 600 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0242] Audio component 610 is configured to output and / or input audio signals. For example, audio component 610 includes a microphone (MIC) configured to receive external audio signals when electronic device 600 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 604 or transmitted via communication component 616. In some embodiments, audio component 610 also includes a speaker for outputting audio signals.

[0243] I / O interface 612 provides an interface between processing component 602 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.

[0244] Sensor assembly 614 includes one or more sensors for providing state assessments of various aspects of electronic device 600. For example, sensor assembly 614 can detect the on / off state of electronic device 600, the relative positioning of components such as the display and keypad of electronic device 600, changes in position of electronic device 600 or a component of electronic device 600, the presence or absence of user contact with electronic device 600, orientation or acceleration / deceleration of electronic device 600, and temperature changes of electronic device 600. Sensor assembly 614 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 614 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 614 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.

[0245] Communication component 616 is configured to facilitate wired or wireless communication between electronic device 600 and other devices. Electronic device 600 can access wireless networks based on communication standards, such as WiFi, carrier networks (such as 2G, 3G, 4G, or 5G), or combinations thereof. In one exemplary embodiment, communication component 616 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 616 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0246] In an exemplary embodiment, the electronic device 600 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the entity linking method described above.

[0247] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 604 including instructions, which can be executed by a processor 620 of an electronic device 600 to complete the above-described entity linking method. Optionally, the computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0248] In an exemplary embodiment, a computer program product is also provided, including a computer program or computer instructions, which, when executed by a processor, implement the entity linking method described above.

[0249] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.

[0250] It should be understood that the present invention is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A method for linking entities, characterized in that, include: Input the text statement containing the entity to be linked into the entity linking model to obtain the first linking result corresponding to the entity to be linked. The first linking result includes the first entity identifier corresponding to the entity to be linked in the knowledge base. Obtain the adjacent text statements from the document containing the text statement; The adjacent text statements are input into the entity linking model to obtain the second linking result corresponding to the entity to be linked. The second linking result includes the second entity identifier corresponding to the entity to be linked in the knowledge base. Based on the first linking result and the second linking result, determine the target linking result corresponding to the entity to be linked; The step of inputting a text statement containing the entity to be linked into the entity linking model to obtain the first linking result corresponding to the entity to be linked includes: Obtain the triplet corresponding to the entity to be linked, and obtain the entity description information corresponding to the entity to be linked from the target retrieval library; The text statement, the triples, and the entity description information are input into the entity linking model to obtain the first linking result corresponding to the entity to be linked. The step of inputting the adjacent text statements into the entity linking model to obtain the second linking result corresponding to the entity to be linked includes: Obtain the triplet corresponding to the entity to be linked, and obtain the entity description information corresponding to the entity to be linked from the target retrieval library; The adjacent text statements, the triples, and the entity description information are input into the entity linking model to obtain the second linking result corresponding to the entity to be linked.

2. The method according to claim 1, characterized in that, The first link result also includes a first confidence level corresponding to the first entity identifier, and the second link result also includes a second confidence level corresponding to the second entity identifier.

3. The method according to claim 2, characterized in that, Based on the first linking result and the second linking result, the target linking result corresponding to the entity to be linked is determined, including: If the first confidence level is greater than or equal to the first confidence level threshold, then the first entity identifier is determined as the target link result corresponding to the entity to be linked; If the first confidence level is less than the first confidence level threshold, and the second confidence level is greater than or equal to the second confidence level threshold, then the second entity identifier is determined as the target link result corresponding to the entity to be linked. If the first confidence level is less than the first confidence level threshold and the second confidence level is less than the second confidence level threshold, then the target link result is determined to be an entity that is not linked. Wherein, the first confidence threshold is greater than the second confidence threshold.

4. The method according to claim 2, characterized in that, Based on the first linking result and the second linking result, the target linking result corresponding to the entity to be linked is determined, including: If the first confidence level is greater than or equal to the third confidence level threshold, then the first entity identifier is determined as the target link result corresponding to the entity to be linked; If the first confidence level is less than the third confidence level threshold and greater than or equal to the fourth confidence level threshold, and the second confidence level is greater than or equal to the fifth confidence level threshold, then the second entity identifier is determined as the target link result corresponding to the entity to be linked; If the first confidence level is less than the third confidence level threshold and greater than or equal to the fourth confidence level threshold, and the second confidence level is less than the fifth confidence level threshold, then the first entity identifier is determined as the target link result corresponding to the entity to be linked. If the first confidence level is less than the fourth confidence level threshold, and the second confidence level is greater than or equal to the sixth confidence level threshold, then the second entity identifier is determined as the target link result corresponding to the entity to be linked; If the first confidence level is less than the fourth confidence level threshold, and the second confidence level is less than the sixth confidence level threshold, then the target link result is determined to be an entity that is not linked. Wherein, the third confidence threshold is greater than the fourth confidence threshold, the third confidence threshold is greater than the fifth confidence threshold, the fourth confidence threshold is greater than the sixth confidence threshold, and the fifth confidence threshold is greater than the sixth confidence threshold.

5. A physical linking device, characterized in that, include: The first result determination module is configured to input a text statement including the entity to be linked into the entity linking model to obtain the first linking result corresponding to the entity to be linked. The first linking result includes the first entity identifier corresponding to the entity to be linked in the knowledge base. The adjacent statement acquisition module is configured to acquire adjacent text statements from the document containing the text statement. The second result determination module is configured to input the adjacent text statements into the entity linking model to obtain the second linking result corresponding to the entity to be linked. The second linking result includes the second entity identifier corresponding to the entity to be linked in the knowledge base. The target result determination module is configured to determine the target link result corresponding to the entity to be linked based on the first link result and the second link result; The first result determination module includes: The first entity information acquisition unit is configured to acquire the triplet corresponding to the entity to be linked and to acquire the entity description information corresponding to the entity to be linked from the target retrieval library. The first result determination unit is configured to input the text statement, the triplet and the entity description information into the entity linking model to obtain the first linking result corresponding to the entity to be linked. The second result determination module includes: The second entity information acquisition unit is used to acquire the triplet corresponding to the entity to be linked and to acquire the entity description information corresponding to the entity to be linked from the target retrieval library. The second result determination unit is used to input the adjacent text statements, the triples and the entity description information into the entity linking model to obtain the second linking result corresponding to the entity to be linked.

6. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the entity linking method as described in any one of claims 1 to 4.

7. A computer-readable storage medium, wherein instructions in the computer-readable storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the entity linking method as described in any one of claims 1 to 4.

8. A computer program product, comprising a computer program or computer instructions, characterized in that, When the computer program or computer instructions are executed by a processor, they implement the entity linking method according to any one of claims 1 to 4.