Entity linking method and system based on large language model semantic enhancement
By using a semantic enhancement method based on a large language model, the entity linking task is transformed into a multiple-choice discrimination problem, which solves the problem of insufficient accuracy and recall in candidate entity generation in existing technologies. This achieves higher quality entity linking and stronger semantic adaptability, and is applicable to complex contexts and open-domain texts.
Patent Information
- Application Number
- CN202511261948.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-05
- Publication Date
- 2026-01-02
AI Technical Summary
Existing entity linking methods suffer from low accuracy and insufficient recall during candidate entity generation, and have weak capabilities in handling unmatched entities. They are ill-suited for complex contexts and scenarios with missing knowledge, leading to link interruptions or incorrect matching, which limits their application in open-domain text.
We employ a semantic enhancement method based on a large language model. By decomposing the task into a document-level fine-grained manner and designing prompt templates, we transform the entity linking task into a multiple-choice discrimination problem. By leveraging the semantic understanding and reasoning capabilities of the large language model, we construct a high-quality candidate entity set and perform accurate ranking.
It significantly improves the quality of candidate entity generation and link accuracy, enhances the model's adaptability to complex contexts, provides a general and scalable solution, and improves the performance and robustness of entity linking systems.
Smart Images

Figure CN121257705A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of entity linking and natural language processing, and particularly relates to an entity linking method and system based on large language model semantic enhancement. BACKGROUND
[0002] Entity linking is one of the core technologies in the field of natural language processing, and its main task is to accurately map the entity mention in natural language text to the corresponding entity in the knowledge base. Entity linking includes two key stages: candidate entity generation and candidate entity reordering. In the candidate entity generation stage, the system retrieves a set of potential candidate entities from the knowledge base according to the context information; in the candidate entity reordering stage, the context semantic information is used to accurately sort these candidate entities, and the most matched target entity is selected from them.
[0003] Although entity linking has great application potential in the fields of news and media content analysis, entity disambiguation and answer positioning, event tracking and correlation analysis, literature mining and knowledge integration, public opinion risk monitoring, military intelligence and national defense, etc., the existing technology still faces key bottlenecks, especially in the quality and coverage of candidate entity generation. The current mainstream entity linking methods mostly rely on lightweight pre-training models to perform candidate entity generation. Such models have fast reasoning ability, but due to the lack of deep understanding of domain-specific knowledge (such as equipment model, action code, geographic coordinates, etc.), they often cannot completely cover all potential matching target entities in the knowledge base, resulting in significant deficiencies in the coverage and accuracy of the candidate set. In addition, when the correct target entity is missing in the candidate set, the existing methods are difficult to deal with this situation, leading to link interruption or incorrect matching. Some research chooses to ignore such cases in the evaluation stage, while others introduce a "no match" category to classify entities that cannot be linked, in order to avoid systematic errors. However, this avoidance strategy is unacceptable in some rigorous scientific environments, and missed detection or incorrect mapping may cause serious security risks. Furthermore, the existing "no match" strategy also limits the robustness of extended learning, making it difficult to adapt to the variability of complex environments and unstructured data. SUMMARY
[0004] The purpose of the present application is to effectively solve the prominent problems of low accuracy, insufficient recall rate, and weak processing ability of un-matched entities in the candidate entity generation process of existing entity linking methods. Existing technologies often rely on static entity dictionaries or surface matching rules, resulting in poor quality of candidate entity sets, difficulty in covering correct answers, and poor performance in handling semantic ambiguity, complex context, or knowledge gaps, which limits the application effect of entity linking systems in open domain text.
[0005] To overcome the above technical defects, the application provides an entity linking method based on large language model semantic enhancement, which utilizes the advantages of large language model in semantic understanding and reasoning to improve the generation quality and linking accuracy of candidate entities from multiple dimensions. By introducing a document-level task fine-grained decomposition mechanism and a prompt template design strategy, the entity linking task is converted into a multiple-choice discrimination problem, effectively enhancing the model's adaptability to complex context. The application significantly improves the performance of entity linking while providing a general and scalable solution for semantic understanding and knowledge alignment tasks.
[0006] To achieve the above purpose, the application provides an entity linking method based on large language model semantic enhancement, comprising: Step 1: According to the relevant data collected by the entity linking research topic, construct a tool retrieval adaptation strategy that fine-granulates the document-level task, and obtain an initialization search entry set; Step 2: According to the initialization search entry, filter the candidate set, and use different optimization strategies for different structured entries to obtain a high-quality candidate entity set; Step 3: According to the target mention and the high-quality candidate entity set, construct a task conversion prompt template, convert the entity linking task into a multiple-choice problem, input it into the large language model, and output the linking results in the specified output format.
[0007] As an improvement of the above method, the step 1 comprises: Step 1-1: According to the entity linking research topic, collect relevant data through data crawling technology to obtain a document set related to the topic; Step 1-2: Segment and analyze the sentences of each document in the document set to determine the key entities and related context information of the sentences, construct a prompt containing the target mention and its context, and input the semantic representation into the large language model; Step 1-3: Input the semantic representation into the search engine to retrieve candidate entities matching the target mention, and obtain the initialization search entry set.
[0008] As an improvement of the above method, the step 2 comprises: Step 2-1: According to the semantic representation of the target mention, perform semantic matching on the initialization search entry set to obtain a candidate set with high semantic similarity; Step 2-2: For each candidate entity in the candidate set with high semantic similarity, combine heuristic rules and hard matching methods to perform attribute information completeness screening and filtering to obtain a high-quality candidate entity set.
[0009] As an improvement of the above method, the semantic matching on the initialization search entry set comprises semantic matching based on cosine similarity or semantic embedding model BERTScore similarity measurement.
[0010] As an improvement of the above method, the process of completeness screening filtering in step 2-2 includes: Step 2-2-1: clearing the candidate entities containing special symbols, non-printing characters and meaningless characters by regular expressions; Step 2-2-2: performing completeness search on the attribute information of the candidate entities to ensure that each candidate entity contains the following complete information: entity name, entity type, entity unique identifier, entity alias, entity data source and entity related hyperlink.
[0011] As an improvement of the above method, the step 3 includes: For different selection scenarios, multiple similar instance samples are matched from the high-quality candidate entity set based on Sentence-transformer; The entity linking task is converted into a set multiple choice question format by using a large language model, and the large language model is inputted to select the candidate entity most matched with the target mention and generate a linking result conforming to the set output format.
[0012] As an improvement of the above method, the set multiple choice question format includes: The background description of the question includes the target mention and its context information; The understanding rule of the alternative includes the type, attribute of the candidate entity and the matching degree with the context; The output content includes the question, the alternative and its explanation.
[0013] The application also provides an entity linking system based on large language model semantic enhancement, which is realized based on the above method, and the system includes: An acquisition initialization search entry set module is used to collect relevant data according to an entity linking research topic, construct a tool search adaptation strategy for fine-grained document-level task, and obtain an initialization search entry set; An acquisition high-quality candidate entity set module is used to filter a candidate set according to the initialization search entry, and different optimization strategies are used for different structured entries to obtain a high-quality candidate entity set; An acquisition linking result module is used to construct a task conversion prompt template according to the target mention and the high-quality candidate entity set, convert the entity linking task into a multiple choice question, input it into a large language model, and output a linking result conforming to a set output format.
[0014] Compared with the prior art, the application has the following advantages: The application discloses an entity linking method based on large language model semantic enhancement and belongs to the technical field of natural language processing. According to the entity linking research topic, relevant Internet open source data is collected, a tool retrieval adaptation strategy that finely divides a document-level task is constructed, and an initial search entry set is obtained; candidate sets are screened according to the initial search entries, different structured entry models are adaptively iteratively optimized, and a high-quality candidate set is obtained; according to the target mention and the candidate set, a task conversion prompt template is constructed, and the entity linking task is converted into a multiple-choice question. The method significantly improves the screening efficiency of the candidate set and effectively improves the accuracy of entity linking. BRIEF DESCRIPTION OF DRAWINGS
[0015] Figure 1 The entity linking method based on large language model semantic enhancement is shown in the flowchart. Figure 2 The fine-grained retrieval flowchart is shown. Figure 3 The candidate entity set generation flowchart is shown. Figure 4 The multiple-choice prompt template is shown. The text in the figure is only illustrative. DETAILED DESCRIPTION
[0016] The technical solutions of the application will be described in detail below with reference to the drawings.
[0017] The application provides an entity linking method based on large language model semantic enhancement, which comprises the following steps: Step 1) According to the entity linking research topic, relevant Internet open source data is collected, a tool retrieval adaptation strategy that finely divides a document-level task is constructed, and an initial search entry set is obtained. Specifically, the steps include: Step 1-1) According to the entity linking research topic, relevant data is collected from Internet public information sources through data crawling technology, and a document set related to the topic is obtained , , is the total number of documents.
[0018] Step 1-2) Traverse the document set , and perform granularity division of the document-level task for each document . For each divided sentence, a prompt template (prompt) containing the target mention and its context is constructed. A large language model is used as a semantic understanding agent to process the target mention and understand its semantic representation.
[0019] Step 1-3) Input the semantic representation into an online search engine, retrieve candidate entities matching the mention, and obtain an initial search entry set R.
[0020] The attribute information of the search entries includes: entity name, entity type, entity QID, brief description of the entity, entity alias, entity data source, and entity hyperlink.
[0021] Step 2) Based on the initial search entries, filter the candidate set and perform adaptive iterative optimization on different structured entries to obtain a high-quality candidate set. Specifically, this includes: Step 2-1) Based on the semantic representation mentioned in the target (the sentence output by the large language model) Initialize the set of search entries Perform semantic matching This yields a candidate set with high semantic similarity. ,in, This represents the number of candidate entities within the set. , For semantic matching functions; Step 2-2) Traverse the set Each candidate entity in the list is processed as follows: For a candidate entity Combining heuristic rules with hard matching to evaluate the candidate set Perform attribute information completeness screening and filtering The final candidate entity set is obtained. ,in, To determine the number of candidates after screening. , This is a filtering function for the completeness of attribute information.
[0022] Step 3) Based on the target mentions and candidate set, construct a task transformation prompt template to convert the entity linking task into a multiple-choice question. Input this template into the large language model and output linking results conforming to the standard output format. Specifically, this includes: Step 3-1) Clarify the input and output of the entity linking task, and transform the entity linking task into a multiple-choice question format. Specifically, this includes: constructing a description of the multiple-choice question, defining the rules for understanding the options, and setting a unified and standardized output format, thereby forming a complete multiple-choice question thinking chain; Step 3-2) Provide multiple example scenarios for different selection scenarios. Each example should include the complete task understanding process, the corresponding multiple-choice question construction, and the final output result, so that the large language model can better understand the logic and reasoning process of the multiple-choice task.
[0023] Step 3-3) Take the target mention to be linked as the core target of the multiple choice question, take the context information of the target mention as the question description, and take all entities in the candidate entity set as options, present them in the form of multiple choice, and form a standardized multiple choice question expression.
[0024] Steps 3-4) Input the multiple-choice question into the large language model, drive the model to reason based on understanding the context and options, and finally select the candidate entity that best matches the target mention, generating a link result that conforms to the standard output format.
[0025] Example 1 like Figure 1 As shown, this invention proposes an entity linking method based on semantic enhancement of a large language model, the method comprising: Step 1) As Figure 2 As shown, based on the relevant open-source internet data collected from the entity link research project, a tool retrieval adaptation strategy that refines document-level tasks was constructed, resulting in an initial set of search entries. Specifically, this includes: Step 1-1) Based on the research topic of entity links, collect relevant data from publicly available information sources on the Internet using data crawling technology to obtain a collection of documents related to the topic. , , This represents the total number of documents.
[0026] Steps 1-2) Traverse the document collection For each document The document-level task is refined. Specifically, the sentences in the document are first segmented and semantically analyzed using the semantic segmentation function `split()` to identify key entities and relevant contextual information. For each refined sentence, a prompt template containing the target mention and its context is constructed. This prompt template provides a clear input format for large language models (Qwen, Llama, ChatGPT, etc.) by explicitly defining the relationship between the target mention and its context, enabling the model to understand the accurate semantics of the target mention based on the context. This semantic representation is the output sentence obtained by the large language model after processing the prompt information, reflecting the semantic meaning of the target mention in the context, and is then used in the subsequent candidate entity generation and matching process.
[0027] Table 1 shows sample query statements.
[0028] Steps 1-3) Input the semantic representation into the online search engine to retrieve candidate entities that match the mention, and obtain the initial search entry set R.
[0029] Step 2) Figure 3As shown, a candidate set is filtered based on initial search entries, and an adaptive iterative optimization method is employed for different structured entry types. Specifically, the optimization process dynamically adjusts the filtering strategy, iteratively improving the quality of the candidate set based on the relevance of entry features (such as semantic similarity and contextual matching) to the target entity. This adaptive optimization process can adjust according to the structure, semantics, and contextual information of candidate entities, thereby achieving more accurate candidate set filtering and ultimately obtaining a high-quality candidate entity set. Specifically, this includes: Step 2-1) Based on the semantic representation mentioned in the target (the sentence output by the large language model) A semantic matching algorithm (based on cosine similarity or the semantic embedding model BERTScore similarity metric) is used to initialize the search item set. Matching sets Select a set of candidate entities that have a high semantic similarity to the target mention. ,in, This represents the number of candidate entities within the set. , This is a semantic matching function.
[0030] Step 2-2) Traverse the set Each candidate entity in the list is processed as follows: For each candidate entity First, hard matching (such as using regular expressions to remove entries that do not meet the requirements) is used to select the candidate set. Initial screening First, candidate entities that do not meet the criteria are eliminated. Then, heuristic rules are used to perform further completeness checks based on the candidate entities' attribute information (such as entity name and type). These heuristic rules dynamically adjust the filtering strategy based on contextual information and the relationships between entities, thereby ensuring that the selected candidate entities meet high standards of attribute completeness, ultimately resulting in a high-quality candidate set that meets the criteria. ,in, To determine the number of candidates after screening. , This is a filtering function for the completeness of attribute information.
[0031] Table 2 shows examples of candidate sets.
[0032] The main steps in retrieving the completeness of candidate entity attribute information include: Step S1) Filter the search entries by using regular expressions to remove those containing special symbols and delete those containing non-printable characters and meaningless characters.
[0033] Step S2) Perform a completeness search on the attribute information of the search entries to ensure that each search entry contains the following complete information: entity name, entity type, entity unique identifier (QID), entity brief description, entity alias, entity's data source, and entity-related hyperlinks. The entity QID is a unique identifier for each entity in the knowledge base, used to accurately distinguish different entities. The purpose of the completeness search is to ensure that all key information of the search entries is complete, so as to further filter and verify the accuracy of candidate entities.
[0034] Table 3. Sample display of main attribute information of entities
[0035] Step 3) Based on the target mentions and candidate set, construct a task transformation prompt template to convert the entity linking task into a multiple-choice question. Specifically, this includes: Step 3-1) Define the input and output of the entity linking task, and transform the task into a multiple-choice problem (example: ...). Figure 4 (As shown). The specific steps are as follows: 1) Construct multiple-choice question descriptions: Based on the target mention and its context information, design a background description for the question to ensure that the question covers all the key information of the entity linking task and fully conveys the context and target of the task.
[0036] For example, design a background description for the problem based on the "target mention" (such as "apple" in the text) and "contextual information" (such as "Apple released a new foldable phone"). The background description must cover "all the key information for entity linking," that is, the contextual details that help the large language model determine the entity's attributes (such as "releasing a phone" is an action of a technology company, not an attribute of a fruit), and cannot omit key clues (for example, if "releasing a phone" is omitted, the large language model may misjudge it as "fruit apple"). The purpose of designing a background description is to allow the large language model to first clarify the "task scenario," know what the "target mention" to be linked is, and what its context is, avoiding association bias caused by missing context.
[0037] 2) Define option understanding rules: Set understanding rules for each candidate entity to ensure that the large language model can accurately extract and recognize the semantics of each option from the context. These rules include factors such as the entity type, attributes, and the degree of matching with the context.
[0038] For example, establish clear "understanding rules" for each candidate entity (such as "Apple Inc." or "fruit apples"). The rules should include three types of key information: Entity type: The category to which the candidate entity belongs (e.g., "Apple Inc." belongs to "technology companies", "fruit apples" belongs to "plant fruits"); Entity attributes: The core features of the candidate entity (e.g., the attribute of "Apple Inc." is "produces mobile phones / computers", and the attribute of "fruit apple" is "edible and rich in vitamins"). Context matching degree: The degree of relevance between the candidate entity and the background of the question (e.g., "Apple Inc." matches "releasing mobile phones" 100%, "fruit apple" matches 0%).
[0039] The purpose of defining option understanding rules is to eliminate the semantic ambiguity of options: large language models do not need to "guess" the differences between options, but can quickly eliminate irrelevant options (such as eliminating "fruit apple" based on "type = technology company") based on the "type, attribute, and matching degree" in the rules, and focus on entities that fit the context.
[0040] 3) Establish a standardized output format: Standardize the output format of the questions to ensure that each multiple-choice question is presented in a consistent structure, including the question, options and their explanations, and finally outputting the entity linking results. This process helps the large language model to perform reasoning and select the most appropriate candidate entities. Through the above steps, the task is transformed into a standardized multiple-choice question, thereby guiding the large language model to make accurate entity linking decisions based on understanding the context.
[0041] The structure of multiple-choice questions should be standardized and fixed in a uniform format of "problem description + options (including explanations) + entity link result output", and inconsistent formats are not allowed (such as some questions having explanations and some not).
[0042] Problem description: the contextual background constructed in step 1); Options and explanations: Each option must be accompanied by the "understanding rules" defined in step 2) (e.g., option A: Apple Inc., type = technology company, 100% matching the context). Output: The large language model is required to output "correct entity + reason for selection" (e.g., "correct entity: Apple Inc., reason: its type and attributes match the context of 'releasing mobile phones'").
[0043] The purpose of setting a unified output format is to make the reasoning process of the large language model "rule-bound" so that it does not need to spend energy adapting to different formats, but can focus on the core logic of "analyzing the context → comparing the option rules → judging the matching degree". At the same time, the standardized output also makes it easier to verify the rationality of the large language model's decision.
[0044] Step 3-2) For different selection scenarios, multiple similar instance examples are matched based on the Sentence-transformer. Each example includes the task understanding process, question construction logic, and expected output results. Through these examples, the system can provide diverse reasoning paths for the large language model and ensure that the model can adapt to and understand task requirements according to different scenarios, thereby improving the reasoning ability and accuracy of multiple-choice tasks.
[0045] The input for matching "scenario-based similar examples" using Sentence-transformer is the current "entity link multiple-choice question scenario" to be processed (such as "entity linking task for 'Apple' in technology news", including target mention, context, and task requirements). Sentence-transformer transforms the "current scenario description" into a semantic vector, and then calculates the similarity (such as cosine similarity) with the "scenario description vectors" of all examples in the "example library", outputting N examples that are "semantically most similar" to the current scenario (for example, if the current scenario is technology, it matches 3-5 entity link multiple-choice questions belonging to the technology field, rather than examples from other fields).
[0046] "Converting entity links into multiple-choice questions" addresses "task ambiguity," but relying solely on a standardized framework may lead to errors in "detailed differences across different scenarios" for large language models (e.g., misclassifying "apple" in a technological context as a fruit). The "similar example mechanism" in this step addresses the problem of "insufficient generalization ability of large language models," specifically in two aspects: 1) Provide "diverse reasoning paths" to avoid "single mindset". Examples of different scenarios correspond to different reasoning logic. For example, the reasoning path of the technology scenario example is "find clues of corporate behavior → match entity type → judge attribute fit"; while the reasoning path of the recipe scenario example is "find clues of ingredient consumption → match entity attributes → judge the fit of use".
[0047] Large language models can learn from multiple similar examples and master "different reasoning paths for different scenarios" instead of using only one method (such as always looking at "entity type" regardless of the scenario), thus adapting to scenario differences.
[0048] 2) Ensure "contextual understanding" to improve reasoning accuracy. Examples are not "isolated answers" but "complete logical chains." The large language model not only sees "what the correct option is," but also "why this scenario should be understood, the question designed, and the judgment made." This "knowing not only what" but also "knowing why" allows the large language model to autonomously reproduce the reasoning logic in examples when encountering "new similar scenarios" (such as the entity link of "Huawei" in a technology scenario), rather than relying on "rote memorization," ultimately improving the reasoning accuracy and generalization ability of multiple-choice tasks.
[0049] In other embodiments, it is also possible to directly select from a high-quality candidate set that meets the criteria. The first N samples are selected as similar instance samples.
[0050] Step 3-3) The target mention to be linked is taken as the core target of the multiple-choice question, and the contextual information of the target mention is taken as the question description. All entities in the candidate entity set are presented as options in a multiple-choice format. This step forms a standardized expression for the multiple-choice question and ensures that the large language model can accurately reason and select the most appropriate candidate entity.
[0051] This step achieves "precise binding of entity linking elements with multiple-choice question components": by mapping "the target to be linked (target mention), the basis for judgment (context), and the scope of selection (candidate entities)" to the "core target, question description, and options" of a multiple-choice question, the originally open and ambiguous entity linking task is transformed into a standardized multiple-choice question with "clear target, clear basis, and controllable scope." This transformation allows the large language model to focus on the core reasoning of "analyzing the context → comparing option matching" without having to "guess the task requirements," ultimately achieving accurate selection of the "most suitable candidate entity."
[0052] Steps 3-4) Input the multiple-choice question generated in step 3-3) into the large language model, drive the model to reason based on understanding the context and options, and finally select the candidate entity that best matches the target mention, generating a link result that conforms to the standard output format.
[0053] The main technical innovations of this invention include: 1. This invention proposes an entity linking method based on semantic enhancement of a large language model. It integrates a document-level task fine-grained decomposition strategy with an adaptive search item generation mechanism, achieving high recall and strong semantic adaptability. This method improves the initial coverage of candidate entity items by constructing a retrieval adaptation strategy closely aligned with the task's semantics. Compared to traditional methods based on surface string matching or static entity dictionaries, this invention can more accurately capture the semantic references of target mentions in complex text, effectively alleviating the recall bottleneck problem in entity linking tasks.
[0054] 2. This invention designs a candidate selection mechanism that combines adaptive optimization of structured entry types. By employing an iterative enhancement strategy for different types of candidate entities, it significantly improves the accuracy and representational quality of the candidate entity set. Compared to existing fixed candidate generation schemes, which cannot simultaneously address structural diversity and semantic accuracy, the method of this invention can dynamically adapt to differences in candidate entities at the structural level, thereby achieving robust candidate generation across domains and contexts.
[0055] 3. This invention constructs a prompting engineering framework for entity linking tasks, transforming traditional linking problems into multiple-choice question-answering problems, guiding large language models to perform discriminative entity selection based on natural language understanding. This design fully leverages the capabilities of large language models in context modeling and multiple-choice reasoning, improving model performance in key areas such as polysemous word disambiguation and entity context alignment. Compared to end-to-end generative methods, this invention offers stronger result controllability and reasoning interpretability, providing a more generalizable and stable solution path for open-domain entity linking tasks.
[0056] Example 2 This application also provides an entity linking system based on semantic enhancement of a large language model, implemented using the above method, the system comprising: The module for obtaining the initial search item set is used to collect relevant data based on the entity link research topic, construct a tool retrieval adaptation strategy that refines document-level tasks, and obtain the initial search item set. The module for obtaining a high-quality candidate entity set is used to filter the candidate set based on the initial search entries, and to apply different optimization strategies to different structured entries to obtain a high-quality candidate entity set. The module for obtaining link results is used to construct a task transformation prompt template based on the target mentions and a high-quality candidate entity set, convert the entity linking task into a multiple-choice question input into the large language model, and output link results that conform to the set output format.
[0057] This application may also provide a computer device, including: at least one processor, memory, at least one network interface, and a user interface. The various components in this device are coupled together via a bus system. It is understood that the bus system is used to implement communication between these components. In addition to a data bus, the bus system also includes a power bus, a control bus, and a status signal bus.
[0058] The user interface can include a display, keyboard, or clicking device. Examples include a mouse, trackball, touchpad, or touchscreen.
[0059] It is understood that the memory in the embodiments disclosed in this application may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory may be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memories described herein are intended to include, but are not limited to, these and any other suitable types of memory.
[0060] In some implementations, the memory stores elements such as executable modules or data structures, or subsets thereof, or extended sets thereof: operating systems and applications.
[0061] The operating system includes various system programs, such as the framework layer, core library layer, and driver layer, used to implement various basic business functions and handle hardware-based tasks. The application programs include various applications, such as media players and browsers, used to implement various application functions. Programs implementing the methods of the embodiments of this disclosure can be included in the application programs.
[0062] In the above embodiments, the processor can also invoke programs or instructions stored in memory, specifically programs or instructions stored in an application program, for the following purposes: Follow the steps described above.
[0063] The above methods can be applied to or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above methods can be completed by integrated logic circuits in the processor's hardware or by software instructions. The processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic diagrams disclosed above. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the disclosed methods can be directly implemented by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory; the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above methods.
[0064] It is understood that the embodiments described in this application can be implemented using hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in this application, or combinations thereof.
[0065] For software implementation, the technology of this application can be implemented by executing the functional modules (e.g., procedures, functions, etc.) of this application. The software code can be stored in memory and executed by a processor. The memory can be implemented in the processor or outside the processor.
[0066] This application may also provide a non-volatile storage medium for storing a computer program. When the computer program is executed by a processor, it can implement the steps in the above method embodiments.
[0067] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit it. Although this application has been described in detail with reference to the embodiments, those skilled in the art should understand that modifications or equivalent substitutions to the technical solutions of this application do not depart from the spirit and scope of the technical solutions of this application, and should all be covered within the scope of the claims of this application.
Claims
1. An entity linking method based on semantic enhancement of a large language model, comprising: Step 1: Based on the data collected from the entity link research topic, construct a tool retrieval adaptation strategy that refines document-level tasks to obtain an initial search item set; Step 2: Filter the candidate set based on the initial search entries, and apply different optimization strategies to different structured entries to obtain a high-quality candidate entity set; Step 3: Based on the target mentions and the high-quality candidate entity set, construct a task transformation prompt template, convert the entity linking task into a multiple-choice question input into the large language model, and output the linking results that conform to the set output format.
2. The entity linking method based on semantic enhancement of a large language model according to claim 1, characterized in that, Step 1 includes: Step 1-1: Based on the entity link research topic, collect relevant data through data crawling technology to obtain a collection of documents related to the topic; Steps 1-2: Segment and semantically analyze the sentences of each document in the document collection, identify the key entities and relevant contextual information of the sentences, construct a prompt containing the target mention and its context, and input it into a large speech model to obtain a semantic representation; Steps 1-3: Input the semantic representation into the search engine, retrieve candidate entities that match the target mention, and obtain the initial search entry set.
3. The entity linking method based on semantic enhancement of a large language model according to claim 1, characterized in that, Step 2 includes: Step 2-1: Perform semantic matching on the initial search item set based on the semantic representation of the target mention to obtain a candidate set with high semantic similarity; Step 2-2: For each candidate entity in the candidate set with high semantic similarity, perform attribute information completeness screening and filtering by combining heuristic rules and hard matching to obtain a high-quality candidate entity set.
4. The entity linking method based on semantic enhancement of a large language model according to claim 3, characterized in that, The semantic matching of the initial search item set includes semantic matching based on cosine similarity or the semantic embedding model BERTScore.
5. The entity linking method based on semantic enhancement of a large language model according to claim 3, characterized in that, The completeness screening and filtering process in step 2-2 includes: Step 2-2-1: Use regular expressions to remove candidate entities containing special symbols, non-printable characters, and meaningless characters; Step 2-2-2: Perform a completeness search on the attribute information of the candidate entities to ensure that each candidate entity contains the following complete information: entity name, entity type, entity unique identifier, entity alias, entity data source, and entity-related hyperlinks.
6. The entity linking method based on semantic enhancement of a large language model according to claim 1, characterized in that, Step 3 includes: For different selection scenarios, multiple similar instance examples are matched from a high-quality candidate entity set based on Sentence-transformer; The entity linking task is transformed into a set multiple-choice question format using a large language model. The data is then input into the large language model to select the candidate entities that best match the target mention and generate linking results that conform to the set output format.
7. The entity linking method based on semantic enhancement of a large language model according to claim 1, characterized in that, The defined multiple-choice question format includes: The background description of the problem includes mentions of the target and its contextual information; The rules for understanding the options include the type of the candidate entity, its attributes, and its degree of matching with the context; The output includes the question, options, and their explanations.
8. An entity linking system based on semantic enhancement of a large language model, implemented according to the method of any one of claims 1-7, characterized in that, The system includes: The module for obtaining the initial search item set is used to collect relevant data based on the entity link research topic, construct a tool retrieval adaptation strategy that refines document-level tasks, and obtain the initial search item set. The module for obtaining a high-quality candidate entity set is used to filter the candidate set based on the initial search entries, and to apply different optimization strategies to different structured entries to obtain a high-quality candidate entity set; and The module for obtaining link results is used to construct a task transformation prompt template based on the target mentions and a high-quality candidate entity set, convert the entity linking task into a multiple-choice question input into the large language model, and output link results that conform to the set output format.
