Chinese entity linking method and system based on large language model

By introducing a large language model into entity links, using entity vectors and description text for candidate entities to generate and reorder candidate entities, the problems of insufficient recall and instability in the prior art are solved, and higher recall and link accuracy are achieved.

CN119807391AActive Publication Date: 2025-04-11UNIV OF SCI & TECH BEIJING
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411665523.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-20
Publication Date
2025-04-11
Estimated Expiration
2044-11-20

AI Technical Summary

Technical Problem

The existing entity linking method relies on preset recall words in the knowledge base in the generation of candidate entities, resulting in insufficient recall and unstable semantic matching, affecting the accuracy and recall of links.

Method used

Using a method based on a large language model, by constructing entity vectors in the knowledge base, using a large language model to identify entities to be linked from the input text and generate description text, combining recall words and vector similarity to generate and reorder candidate entities, and finally introducing a filtering module of the large language model to verify the correctness of the link.

Benefits of technology

It significantly improves the recall rate and link accuracy of candidate entities, reduces the dependence on context quality, and ensures the stability and accuracy of the entity linking process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119807391A_ABST
    Figure CN119807391A_ABST
Patent Text Reader

Abstract

The invention provides a Chinese entity linking method and system based on a large language model, and relates to the technical field of natural language processing, and the method comprises the steps: constructing a knowledge base, converting each entity into an entity vector, receiving a Chinese input text, recognizing to-be-linked entities by using the large language model, and generating a corresponding description text; generating a first candidate entity set through a recall word entity retrieval method; generating a second candidate entity set based on the description text and the vector similarity; comparing the two entities in a cross manner, if only one same target entity exists, scoring by using a BERT model, and if the score is higher than a first preset value, taking the score as a first entity linking result; if no or a plurality of same entities exist, scoring the two candidate sets by using a BERT model, selecting a plurality of entities with scores higher than a second preset value, and selecting the entity with the highest score as a second entity linking result; and filtering wrong entity link results in the entity link results by utilizing a large language model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of natural language processing, and in particular to a Chinese entity linking method and system based on a large language model. Background Art

[0002] Entity linking is a technique in natural language processing that matches and associates entities in text (such as names of people, places, organizations, etc.) with corresponding entities in the knowledge base. This technology plays an important role in applications such as information retrieval, question-answering systems, and knowledge graph construction. It is particularly complex in the processing of Chinese texts, as it often involves polysemous words, homonyms, and a large number of omissions and abbreviations. In order to solve these problems, entity linking usually includes two core links: candidate entity generation and re-ranking. Potential candidate entities are extracted from the knowledge base, and the most suitable target entity is screened out through context information to achieve accurate linking.

[0003] In existing entity linking technologies, the generation of candidate entities usually relies on preset recall words in the knowledge base. These recall words are keywords, aliases, or phrases related to each entity. When the model recognizes an entity to be linked, it retrieves a set of candidate entity sets from the knowledge base based on the recall words. Next, the candidate entities are re-ranked through semantic matching of the context to determine the most matching knowledge base entity.

[0004] However, the existing entity linking methods rely on preset recall words in the knowledge base when generating candidate entities. When the recall words are outdated or incomplete, some related entities may not be retrieved, which seriously affects the recall rate. At the same time, the re-ranking process of candidate entities is highly dependent on the quality of the context. The expression of the same entity in different contexts may be quite different, resulting in the instability of semantic matching, thus affecting the accuracy of the link. In addition, the lack of an effective subsequent verification mechanism makes it easy for erroneous links to occur, thereby reducing the overall link accuracy. Summary of the invention

[0005] In order to solve the technical problems that the generation of candidate entities in the existing entity linking methods depends on preset recall words in the knowledge base, and when the recall words are outdated or incomplete, some related entities may not be retrieved, seriously affecting the recall rate; at the same time, the re-ranking process of candidate entities is highly dependent on the quality of the context, and the expression of the same entity in different contexts may be quite different, resulting in the instability of semantic matching, thereby affecting the accuracy of the link; in addition, there is a lack of an effective subsequent verification mechanism, which is prone to erroneous links, thereby reducing the overall link accuracy, the present invention provides a Chinese entity linking method and system based on a large language model.

[0006] The technical solution provided by the embodiment of the present invention is as follows:

[0007] First aspect:

[0008] An embodiment of the present invention provides a Chinese entity linking method based on a large language model, comprising:

[0009] S1: Build a knowledge base and convert each entity in the knowledge base into an entity vector;

[0010] S2: obtain Chinese input text;

[0011] S3: using a large language model, identifying entities to be linked from the Chinese input text, and generating description text for describing the entities to be linked;

[0012] S4: generating a first candidate entity set of the to-be-linked entity from the knowledge base through an entity retrieval method based on recall words; generating a second candidate entity set of the to-be-linked entity from the knowledge base through a retrieval method based on vector similarity based on the description text;

[0013] S5: cross-compare the first candidate entity set and the second candidate entity set to determine whether there is only one identical target candidate entity in the comparison result; if so, proceed to S6; otherwise, proceed to S7;

[0014] S6: According to the description text, using the BERT model with a single tower structure, calculating the score of the target candidate entity, and determining whether the score of the target candidate entity is greater than a first preset score; if so, using the target candidate entity as a first entity link result linked to the knowledge base;

[0015] S7: According to the description text, using the single-tower BERT model, calculate the score values ​​of each target candidate entity in the first candidate entity set and the second candidate entity set, select multiple target candidate entities with score values ​​higher than the second preset score value, and select the candidate entity corresponding to the highest score value among the multiple target candidate entities with score values ​​higher than the second preset score value as the second entity link result;

[0016] S8: Using a large language model, determine whether the first entity linking result or the second entity linking result meets the correct linking requirement; if so, link the correct entity linking result to the knowledge base; otherwise, filter out the incorrect entity linking result.

[0017] Second aspect:

[0018] An embodiment of the present invention provides a Chinese entity linking system based on a large language model, comprising:

[0019] processor;

[0020] A memory, wherein computer-readable instructions are stored in the memory, and when the computer-readable instructions are executed by the processor, the Chinese entity linking method based on a large language model as described in the first aspect is implemented.

[0021] The third aspect:

[0022] An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the Chinese entity linking method based on a large language model as described in the first aspect is implemented.

[0023] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:

[0024] (1) In the present invention, a first candidate entity set of entities to be linked is generated from a knowledge base through an entity retrieval method based on recall words; based on the description text, a second candidate entity set of entities to be linked is generated from the knowledge base through a retrieval method based on vector similarity, so that the candidate entity set is not only generated by recall words, but also supplemented by semantic similarity, thereby avoiding the problem of insufficient recall caused by incomplete or outdated recall words and significantly improving the recall rate.

[0025] (2) In the present invention, a large language model is used to identify entities to be linked from Chinese input text, and a description text is generated to describe the entities to be linked as a semantically stable reference. In the re-ranking stage, the candidate entities are semantically scored based on the description text, thereby reducing the dependence on context quality and ensuring the stability of the re-ranking process and the accuracy of the link. At the same time, the filtering module of the large language model is introduced in the last step of the entity linking process to remove erroneous links and ensure the accuracy of the final link, thereby significantly improving the overall link accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0027] Figure 1 A flowchart of a Chinese entity linking method based on a large language model provided by an embodiment of the present invention;

[0028] Figure 2 A structural schematic diagram of a Chinese entity linking system based on a large language model provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0029] The technical solution of the present invention is described below in conjunction with the accompanying drawings.

[0030] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "example" in the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "example" is intended to present the concept in a specific way. In addition, in the embodiments of the present invention, the meaning expressed by "and / or" can be both, or it can be either of the two.

[0031] In the embodiments of the present invention, "image" and "picture" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same. "of", "corresponding, relevant" and "corresponding" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same.

[0032] In the embodiments of the present invention, sometimes a subscript such as W1 may be written as a non-subscript such as W1. When the difference is not emphasized, the meanings to be expressed are the same.

[0033] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.

[0034] Reference Manual Attached Figure 1 , showing a flow chart of a Chinese entity linking method based on a large language model provided by an embodiment of the present invention.

[0035] The embodiment of the present invention provides a Chinese entity linking method based on a large language model, which can be implemented by a Chinese entity linking device based on a large language model, and the Chinese entity linking device based on a large language model can be a terminal or a server. The processing flow of the Chinese entity linking method based on a large language model can include the following steps:

[0036] S1: Build a knowledge base and convert each entity in the knowledge base into an entity vector.

[0037] Among them, a knowledge base is a database that stores and organizes structured information, aiming to systematically record and manage a large amount of knowledge content. In the fields of natural language processing, information retrieval, and artificial intelligence, the knowledge base usually contains information about people, places, organizations, concepts, relationships, etc. in the real world so that computers can understand, retrieve, and use this information.

[0038] Among them, entity embedding is to represent the entities in the knowledge base as high-dimensional vectors so that computers can analyze and process the semantic information of the entities in the vector space. This vectorized representation allows the semantic information of the entities to be represented in numerical form, so that the similarity between entities can be calculated, semantic matching can be performed, and various natural language processing tasks can be performed.

[0039] In a possible implementation, the conversion of each entity in the knowledge base into an entity vector in S1 is specifically as follows:

[0040] Each entity in the knowledge base is converted into an entity vector through the encoder of the vector retrieval model.

[0041] Among them, the Vector Retrieval Model Encoder is the core component that converts the semantic information of entities in the knowledge base into vector representation, and plays a vital role in the vector retrieval process. The encoder can encode the input data into a high-dimensional vector of a fixed length, thereby achieving efficient similarity calculation and retrieval in the vector space.

[0042] In a possible implementation, the vector retrieval model is specifically a BERT model.

[0043] Among them, BERT (Bidirectional Encoder Representations from Transformers) is a pre-trained language model based on the bidirectional Transformer architecture. BERT can learn deep semantic information from bidirectional contexts, has achieved remarkable results in the field of natural language processing, and is widely used in question-answering systems, text classification, entity linking and other tasks.

[0044] It should be noted that each entity in the knowledge base will be embedded in a high-dimensional vector space so that it can be compared by vector similarity in the entity linking task.

[0045] In the present invention, the vector representation can capture the deep semantic information of the entity. By converting the entity into a vector, the model can calculate the similarity between entities in the vector space, rather than relying solely on surface text matching. In this way, even if there are variants, synonyms or aliases in the entity name, the system can still identify their semantic similarities, thereby improving the accuracy of the matching. At the same time, the vectorized representation can not only match different expressions of the same entity, but also capture the semantic relationship between entities. Through the vector representation, the system can understand and distinguish these complex semantic relationships, further improving the accuracy and robustness of the entity linking task.

[0046] S2: Get Chinese input text.

[0047] S3: Using a large language model, identify entities to be linked from Chinese input text and generate description text for describing the entities to be linked.

[0048] Among them, the Large Language Model (LLM) is a pre-trained model based on deep learning, which is specially used to understand, generate and process natural language. Unlike traditional language models, the Large Language Model is trained with a large amount of text data and can learn deeper language rules, semantic understanding and contextual relationships from the data.

[0049] In a possible implementation manner, generating a description text for describing the to-be-linked entity in S3 specifically includes:

[0050] The large language model is used in combination with context information to extract key information related to the entity.

[0051] The key information is summarized to generate a description text for describing the entity to be linked.

[0052] Specifically, the summary capability of the large model is used to generate a brief description of the corresponding entity, ensuring that each entity to be linked has a concise text description to assist in subsequent entity linking and similarity calculations. This short description is more accurate than a simple description based on context.

[0053] In the present invention, by utilizing the summary capability of the large language model to generate a brief description, it can be ensured that the description of each entity to be linked contains key information. This concise description is more accurate than the long text generated based on the context, and can effectively focus on the core features of the entity, thereby reducing redundant information and improving the accuracy of entity recognition and linking. At the same time, the large language model can better understand the specific meaning of the entity in different contexts by extracting key information related to the entity in combination with contextual information. Entities in different contexts may have different expressions, and the summary capability can help the model understand and extract the most representative semantic information, avoiding interference from irrelevant or noise information in the context.

[0054] S4: Generate a first candidate entity set of entities to be linked from the knowledge base through an entity retrieval method based on recall words; based on the description text, generate a second candidate entity set of entities to be linked from the knowledge base through a retrieval method based on vector similarity.

[0055] Among them, the entity retrieval method based on recall words refers to searching for candidate entities related to the entity to be linked through predefined keywords, phrases or aliases in the knowledge base. The basic idea of ​​this method is to use "recall words" related to the entity (i.e. words or phrases related to the entity) to generate a set of candidate entities, and then filter and link these candidate entities.

[0056] Among them, the retrieval method based on vector similarity is a technology that converts data (such as text, entities, images, etc.) into high-dimensional vectors and calculates the similarity between these vectors for retrieval. This method is based on the vector space model and aims to find the most relevant results by calculating the semantic similarity between data.

[0057] In a possible implementation, in S4, a first candidate entity set of entities to be linked is generated from a knowledge base by an entity retrieval method based on a recall word, specifically including:

[0058] Sets the recall word used for vocabulary matching.

[0059] According to the recall words, a first candidate entity set is generated from the knowledge base through a vocabulary matching mechanism in an entity retrieval method based on the recall words.

[0060] In a possible implementation, the recall word is specifically a vocabulary of the entity name or a phrase of the entity name.

[0061] It should be noted that through these recall words, the system can quickly find candidate entities that match the name of the entity to be linked in the knowledge base, which is mainly used to deal with entities with standard or common names.

[0062] In a possible implementation, in S4, based on the description text, a second candidate entity set of entities to be linked is generated from the knowledge base by a retrieval method based on vector similarity, specifically including:

[0063] The encoder is used to embed the description text to obtain the description text vector.

[0064] Calculate the vector similarity between the description text vector and the entity vector in the knowledge base.

[0065] A candidate entity set consisting of candidate entities corresponding to vector similarities greater than a preset vector similarity is used as a second candidate entity set.

[0066] It should be noted that compared with the recall word-based method, this retrieval method based on vector similarity can better capture semantic information, especially for entities with diverse name variants and many homonyms. The recall quality of candidate entities can be effectively improved through semantic matching in the vector space.

[0067] In the present invention, the retrieval method based on vector similarity can better capture the semantic similarity between entities by converting the description text and entities in the knowledge base into vectors. This method is not limited to simple vocabulary matching, but takes into account the deep semantic information of the text, thereby improving the matching accuracy.

[0068] Furthermore, by combining the two retrieval methods based on recall words and vector similarity, the recall rate and accuracy of the candidate entity set can be improved. Recall words can quickly locate entities with standard names or aliases, while vector similarity-based retrieval can further verify and expand the candidate entity set semantically, ensuring that the final candidate set is more comprehensive and more relevant.

[0069] S5: Cross-compare the first candidate entity set and the second candidate entity set to determine whether there is only one identical target candidate entity in the comparison result; if so, proceed to S6; otherwise, proceed to S7.

[0070] S6: According to the description text, use the single-tower BERT model to calculate the score of the target candidate entity and determine whether the score of the target candidate entity is greater than the first preset score; if so, use the target candidate entity as the first entity link result linked to the knowledge base.

[0071] Among them, the Single-Tower BERT Model is a variant based on the BERT (Bidirectional Encoder Representations from Transformers) model, which is usually used in tasks that require calculating the similarity or matching between two inputs, such as text matching, sentence comparison, etc. Its main feature is to process two inputs through a single BERT model, and jointly encode them through shared parameters, so as to perform subsequent similarity scoring or classification.

[0072] Optionally, the specific implementation of the single-tower BERT model scoring is as follows: first, insert a start mark [CLS] at the beginning of the sentence, followed by the description text generated by the large language model, and add a separation mark [SEP] at the end of the description text, followed by the description text of the target candidate entity in the knowledge base. The specific format is: "[CLS] Description generated by the large language model [SEP] Description text of the target candidate entity in the knowledge base".

[0073] Next, the combined sentence is input into the single-tower BERT model for encoding. After encoding, the embedding vector corresponding to the start flag [CLS] is extracted and passed as input to the last layer of the multi-layer perceptron (MLP) with a sigmoid activation function. Through the calculation of the MLP, a floating-point score between 0 and 1 is finally output. The score is used to quantify the degree of match between the description generated by the large language model and the description of the target candidate entity in the knowledge base.

[0074] It should be noted that the single-tower BERT model used for reranking and the BERT model used for vector retrieval are usually not the same model (or the same set of parameters).

[0075] Specifically, there is only one identical entity in two candidate entity sets. After scoring using the reranking model, if the score is higher than a certain filtering threshold, the entity is directly used as the preliminary entity linking result.

[0076] In a possible implementation manner, the first preset score is 0.8.

[0077] In the present invention, by using a single-tower BERT model to calculate the scores of candidate entities and setting a filtering threshold, the most relevant candidate entities can be effectively screened out. Only when the score of a candidate entity exceeds the preset threshold can it be used as the final link result. This approach can ensure that the entity linking results are more accurate and avoid irrelevant or erroneous candidate entities from being selected as link objects.

[0078] S7: Based on the description text, using the single-tower BERT model, calculate the score values ​​of each target candidate entity in the first candidate entity set and the second candidate entity set, select multiple target candidate entities with score values ​​higher than the second preset score value, and select the candidate entity corresponding to the highest score value among the multiple target candidate entities with score values ​​higher than the second preset score value as the second entity link result.

[0079] In a possible implementation manner, the second preset score is 0.8.

[0080] In the present invention, a filtering threshold is set to effectively screen out the most relevant candidate entities. Only when the score of a candidate entity exceeds the preset threshold can it be used as the final link result, ensuring that the entity link result is more accurate.

[0081] S8: Using a large language model, determine whether the first entity linking result or the second entity linking result meets the correct linking requirements; if so, link the correct entity linking result to the knowledge base; otherwise, filter the incorrect entity linking results.

[0082] Specifically, by leveraging the reasoning capabilities of the large language model, a filtering module is added to verify the correctness of entity linking. The filtering module will judge the preliminary linking results and delete incorrect entity links to ensure that the final output entity linking results have higher accuracy and reliability.

[0083] In the present invention, by using the reasoning ability of the large language model to analyze the contextual information of entity links, the rationality of the links is verified semantically, incorrect links are avoided, and the link accuracy is improved. At the same time, the final entity link result after verification by the filtering module can more accurately match the entities in the knowledge base, eliminate inaccuracies in the preliminary links, and improve the quality and accuracy of the knowledge base.

[0084] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:

[0085] (1) In the present invention, a first candidate entity set of entities to be linked is generated from a knowledge base through an entity retrieval method based on recall words; based on the description text, a second candidate entity set of entities to be linked is generated from the knowledge base through a retrieval method based on vector similarity, so that the candidate entity set is not only generated by recall words, but also supplemented by semantic similarity, thereby avoiding the problem of insufficient recall caused by incomplete or outdated recall words and significantly improving the recall rate.

[0086] (2) In the present invention, a large language model is used to identify entities to be linked from Chinese input text, and a description text is generated to describe the entities to be linked as a semantically stable reference. In the re-ranking stage, the candidate entities are semantically scored based on the description text, thereby reducing the dependence on context quality and ensuring the stability of the re-ranking process and the accuracy of the link. At the same time, the filtering module of the large language model is introduced in the last step of the entity linking process to remove erroneous links and ensure the accuracy of the final link, thereby significantly improving the overall link accuracy.

[0087] Reference Manual Attached Figure 2 , showing a structural schematic diagram of a Chinese entity linking system based on a large language model provided by the present invention.

[0088] The present invention further provides a Chinese entity linking system 20 based on a large language model, which is applied to the above-mentioned Chinese entity linking method based on a large language model, comprising:

[0089] Processor 201.

[0090] The memory 202 stores computer-readable instructions. When the computer-readable instructions are executed by the processor 201, the Chinese entity linking method based on a large language model as in the method embodiment is implemented.

[0091] The Chinese entity linking system 20 based on a large language model provided by the present invention can execute the above-mentioned Chinese entity linking method based on a large language model and achieve the same or similar technical effects. To avoid repetition, the present invention will not go into details.

[0092] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:

[0093] (1) In the present invention, a first candidate entity set of entities to be linked is generated from a knowledge base through an entity retrieval method based on recall words; based on the description text, a second candidate entity set of entities to be linked is generated from the knowledge base through a retrieval method based on vector similarity, so that the candidate entity set is not only generated by recall words, but also supplemented by semantic similarity, thereby avoiding the problem of insufficient recall caused by incomplete or outdated recall words and significantly improving the recall rate.

[0094] (2) In the present invention, a large language model is used to identify entities to be linked from Chinese input text, and a description text is generated to describe the entities to be linked as a semantically stable reference. In the re-ranking stage, the candidate entities are semantically scored based on the description text, thereby reducing the dependence on context quality and ensuring the stability of the re-ranking process and the accuracy of the link. At the same time, the filtering module of the large language model is introduced in the last step of the entity linking process to remove erroneous links and ensure the accuracy of the final link, thereby significantly improving the overall link accuracy.

[0095] It should be understood that the processor in the embodiment of the present invention may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0096] It should also be understood that the memory in the embodiments of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).

[0097] The above embodiments can be implemented in whole or in part by software, hardware (such as circuits), firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.

[0098] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.

[0099] In the present invention, "at least one" means one or more, and "plurality" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.

[0100] It should be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0101] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0102] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described equipment, devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0103] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0104] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0105] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0106] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.

[0107] An embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the method for Chinese entity linking based on a large language model as described in the method embodiment is implemented.

[0108] A computer-readable storage medium provided by the present invention can implement the steps and effects of the Chinese entity linking method based on a large language model in the above method embodiment. To avoid repetition, the present invention will not go into details.

[0109] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:

[0110] (1) In the present invention, a first candidate entity set of entities to be linked is generated from a knowledge base through an entity retrieval method based on recall words; based on the description text, a second candidate entity set of entities to be linked is generated from the knowledge base through a retrieval method based on vector similarity, so that the candidate entity set is not only generated by recall words, but also supplemented by semantic similarity, thereby avoiding the problem of insufficient recall caused by incomplete or outdated recall words and significantly improving the recall rate.

[0111] (2) In the present invention, a large language model is used to identify entities to be linked from Chinese input text, and a description text is generated to describe the entities to be linked as a semantically stable reference. In the re-ranking stage, the candidate entities are semantically scored based on the description text, thereby reducing the dependence on context quality and ensuring the stability of the re-ranking process and the accuracy of the link. At the same time, the filtering module of the large language model is introduced in the last step of the entity linking process to remove erroneous links and ensure the accuracy of the final link, thereby significantly improving the overall link accuracy.

[0112] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

[0113] There are a few points to note:

[0114] (1) The drawings of the embodiments of the present invention only involve structures related to the embodiments of the present invention. Other structures may refer to conventional designs.

[0115] (2) For the sake of clarity, in the drawings used to describe the embodiments of the present invention, the thickness of layers or regions is exaggerated or reduced, that is, these drawings are not drawn according to the actual scale. It is understood that when an element such as a layer, film, region or substrate is referred to as being "on" or "under" another element, the element may be "directly" "on" or "under" the other element or there may be intermediate elements.

[0116] (3) In the absence of conflict, the embodiments of the present invention and the features therein may be combined with each other to obtain new embodiments.

[0117] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. The protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A Chinese entity linking method based on a large language model, characterized in that: include: S1: Build a knowledge base and convert each entity in the knowledge base into an entity vector; S2: obtain Chinese input text; S3: using a large language model, identifying entities to be linked from the Chinese input text, and generating description text for describing the entities to be linked; S4: generating a first candidate entity set of the to-be-linked entity from the knowledge base through an entity retrieval method based on recall words; generating a second candidate entity set of the to-be-linked entity from the knowledge base through a retrieval method based on vector similarity based on the description text; S5: cross-comparing the first candidate entity set with the second candidate entity set to determine whether there is only one identical target candidate entity in the comparison result; if so, proceeding to S6; Otherwise, go to S7; S6: According to the description text, using the BERT model with a single tower structure, calculating the score of the target candidate entity, and determining whether the score of the target candidate entity is greater than a first preset score; if so, using the target candidate entity as a first entity link result linked to the knowledge base; S7: According to the description text, using the single-tower BERT model, calculate the score values ​​of each target candidate entity in the first candidate entity set and the second candidate entity set, select multiple target candidate entities with score values ​​higher than the second preset score value, and select the candidate entity corresponding to the highest score value among the multiple target candidate entities with score values ​​higher than the second preset score value as the second entity link result; S8: using a large language model, determining whether the first entity linking result or the second entity linking result meets the correct linking requirement; if so, linking the correct entity linking result to the knowledge base; Otherwise, filter out the wrong entity linking results.

2. The Chinese entity linking method based on a large language model according to claim 1 is characterized in that: The specific conversion of each entity in the knowledge base into an entity vector in S1 is: Each entity in the knowledge base is converted into an entity vector through an encoder of a vector retrieval model.

3. The Chinese entity linking method based on a large language model according to claim 2 is characterized in that: The vector retrieval model is specifically a BERT model.

4. The Chinese entity linking method based on a large language model according to claim 1, characterized in that: The description text for describing the entity to be linked is generated in S3, specifically including: Utilizing the large language model and combining context information to extract key information related to the entity; The key information is summarized to generate a description text for describing the entity to be linked.

5. The Chinese entity linking method based on a large language model according to claim 1, characterized in that: In S4, the first candidate entity set of the to-be-linked entity is generated from the knowledge base by an entity retrieval method based on a recall word, which specifically includes: Set the recall words used for vocabulary matching; According to the recall words, the first candidate entity set is generated from the knowledge base through a vocabulary matching mechanism in an entity retrieval method based on the recall words.

6. The Chinese entity linking method based on a large language model according to claim 5 is characterized in that: The recall word is specifically a vocabulary of the entity name or a phrase of the entity name.

7. The Chinese entity linking method based on a large language model according to claim 1 is characterized in that: In S4, based on the description text, generating a second candidate entity set of the to-be-linked entity from the knowledge base by a retrieval method based on vector similarity specifically includes: Embedding the description text using the encoder to obtain a description text vector; Calculating the vector similarity between the description text vector and the entity vector in the knowledge base; A candidate entity set consisting of candidate entities corresponding to the candidate entities whose vector similarity is greater than a preset vector similarity is used as the second candidate entity set.

8. The Chinese entity linking method based on a large language model according to claim 1, characterized in that: The first preset score and the second preset score are both 0.

8.

9. A Chinese entity linking system based on a large language model, characterized in that: include: processor; A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the Chinese entity linking method based on a large language model as described in any one of claims 1 to 8 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the Chinese entity linking method based on a large language model as described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Large language model enhanced question and answer generation method

    CN118013051A

  • Artificial intelligence device for entity linking and knowledge base question and answering and control method thereof

    US20240211482A1

  • Systems and Methods for Insights Extraction Using Semantic Search

    US20240232539A1