Entity information processing method and apparatus, electronic device, and medium

By combining the generative language model GPT-2 with predictive prompts, the problems of high labor costs and low accuracy in existing entity disambiguation technologies are solved, achieving efficient and accurate entity disambiguation results.

CN114254642BActive Publication Date: 2025-10-17BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111547208.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-16
Publication Date
2025-10-17
Estimated Expiration
2041-12-16

AI Technical Summary

Technical Problem

Existing entity disambiguation technologies suffer from high labor costs, poor generalization, and insufficient utilization of language models when processing large-scale industry data, resulting in low accuracy in entity disambiguation.

Method used

By combining the generative language model GPT-2 with predicted prompt information, entity disambiguation is performed using a pre-trained model by splicing entity information and predicted prompt text, thus avoiding the need for manual feature extraction and a large amount of training data.

Benefits of technology

It improves the accuracy of entity disambiguation, saves labor costs, and achieves efficient entity disambiguation without requiring a large amount of training data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114254642B_ABST
    Figure CN114254642B_ABST
Patent Text Reader

Abstract

The present disclosure provides an entity information processing method and device, electronic equipment and medium, relates to the technical field of computers, and particularly relates to the technical fields of knowledge bases, cloud computing and cloud services. The specific implementation scheme is as follows: determining entity information of a to-be-processed entity and prediction prompt information of a target language model; and determining a target knowledge entity corresponding to the to-be-processed entity in a target knowledge base by using the target language model according to the entity information of the to-be-processed entity and the prediction prompt information. The present disclosure achieves the effect of improving the accuracy of entity disambiguation without a large amount of training data.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of computer, in particular to the technical field of knowledge base, cloud computing and cloud service, and specifically to an entity information processing method and device, an electronic device and a medium. BACKGROUND

[0002] A knowledge base is a set of interrelated knowledge pieces stored, organized, managed and used in a computer memory in a certain knowledge representation manner for solving problems in certain fields, which has the characteristics of structure, easy operation, easy use and comprehensive organization.

[0003] When a knowledge base is used to query a target entity, entity disambiguation is usually needed. SUMMARY

[0004] The present disclosure provides a method, device, electronic device and medium for improving the accuracy of entity disambiguation.

[0005] According to an aspect of the present disclosure, an entity information processing method is provided, comprising:

[0006] determining entity information of a to-be-processed entity and prediction prompt information of a target language model;

[0007] determining a target knowledge entity corresponding to the to-be-processed entity in a target knowledge base by using the target language model according to the entity information of the to-be-processed entity and the prediction prompt information.

[0008] According to another aspect of the present disclosure, an entity information processing device is provided, comprising:

[0009] an information determining module configured to determine entity information of a to-be-processed entity and prediction prompt information of a target language model;

[0010] a knowledge entity determining module configured to determine a target knowledge entity corresponding to the to-be-processed entity in a target knowledge base by using the target language model according to the entity information of the to-be-processed entity and the prediction prompt information.

[0011] According to another aspect of the present disclosure, an electronic device is provided, comprising:

[0012] at least one processor; and

[0013] a memory in communication with the at least one processor; wherein

[0014] The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method of any one of the present disclosure.

[0015] According to another aspect of the present disclosure, a non-transitory computer readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to perform the method of any one of the present disclosure.

[0016] According to another aspect of the present disclosure, a computer program product is provided, comprising a computer program for performing the method of any one of the present disclosure when executed by a processor.

[0017] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present disclosure, nor to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS

[0018] The accompanying drawings are used to better understand the present scheme, and do not limit the present disclosure. Among them:

[0019] Figure 1 is a flowchart of some entity information processing methods disclosed according to embodiments of the present disclosure;

[0020] Figure 2A is a flowchart of some other entity information processing methods disclosed according to embodiments of the present disclosure;

[0021] Figure 2B is a structural schematic diagram of some target language models disclosed according to embodiments of the present disclosure;

[0022] Figure 2C is a structural schematic diagram of some candidate entity identification dictionary trees disclosed according to embodiments of the present disclosure;

[0023] Figure 2D is a schematic diagram of some target language model decoding disclosed according to embodiments of the present disclosure;

[0024] Figure 3 is a structural schematic diagram of some entity information processing apparatus disclosed according to embodiments of the present disclosure;

[0025] Figure 4 is a block diagram of an electronic device used to implement the entity information processing method disclosed according to embodiments of the present disclosure. DETAILED DESCRIPTION

[0026] Exemplary embodiments of the present disclosure are described herein below with reference to the accompanying drawings, in which various details are set forth to facilitate an understanding of the present disclosure. It should be appreciated that various embodiments of the present disclosure can be practiced with variations of these details as would be obvious to one of ordinary skill in the art, and the scope of the present disclosure is not limited to the details as described. For clarity and conciseness, descriptions of well-known functions and constructions are omitted from the following description.

[0027] The goal of knowledge base entity disambiguation is to associate a given structured entity with a corresponding entity in the knowledge base for entity inclusion and knowledge graph application operations. Entity disambiguation technology plays an important role in knowledge base construction and application scenarios, such as knowledge inclusion, intelligent question answering and intelligent customer service based on knowledge graph. Thanks to the development of artificial intelligence and deep learning technology, especially the development of pre-trained language models, natural language processing related technologies such as entity disambiguation have made rapid progress in recent years.

[0028] Applicants found in the research and development process that the current industry mainly uses the following methods for entity disambiguation:

[0029] 1) Disambiguate entities by manually defined rules.

[0030] When the entity to be disambiguated has extremely distinctive information, a pre-configured disambiguation template can be used. For example, in the medical field, the GMP code is a unique feature for disambiguating drugs.

[0031] 2) Disambiguate entities by manually extracting features and machine learning models.

[0032] For entities with rich and standardized attributes, manually extracted features can be used in conjunction with machine learning models to disambiguate entities. The extracted features include numerical comparison, attribute co-occurrence comparison, text similarity comparison, and semantic similarity comparison. Since the features are mostly numerical and labeled, linear models or tree models are often used for machine learning models.

[0033] 3) Disambiguate entities by fine-tuning downstream tasks of language models.

[0034] The usual way is to fine-tune the language model on specific tasks to adapt the language model to the specific task. The entity disambiguation task usually includes candidate acquisition, entity pair comparison, and ranking subtasks, which can be solved by fine-tuning the language model on specific tasks. For example, entity pair comparison can be considered as a text matching task, with the input query sentence pair and the output being a 0-1 similarity.

[0035] However, the method 1) has the following disadvantages:

[0036] First, the artificially defined rules have poor generalization, and once new scenarios, new entity types, new attributes, or new attribute value expression methods appear, the past artificially defined rules may fail. Second, the method consumes a large amount of human cost and is difficult to process large-scale industry data.

[0037] The method 2) has the following disadvantages:

[0038] This method has poor universality and migration, and most of the different types of entities need to be customized. The extracted features depend on the familiarity of the developers with the field knowledge, and the phenomenon that the extracted features cannot represent the entity is prone to occur. For complex scenarios, such as entities with few structured attributes, feature extraction is difficult.

[0039] The method 3) has the following disadvantages: The difference between the pre-training task and the downstream task in the fine-tuning paradigm leads to insufficient utilization of the language model, and a large amount of training data is needed to ensure the accuracy of entity disambiguation.

[0040] In addition, in terms of performance, taking BERT (Bidirectional Encoder Representation from Transformers) as an example, a typical text matching model structure is divided into BERT and text Sentence-BERT. The former concatenates the text pair through a single BERT, has fine-grained complex interaction, and thus has good effect, but at the same time has large calculation overhead and low performance; the latter passes the text pair through BERT respectively, has no interaction in the encoding stage, and introduces interaction information late interaction in the matching module, so the precision is often not as good as the single BERT method, but the encoding of the two texts is separated, part of the encoding can be stored offline, and the calculation time has an advantage, but a certain storage resource is needed.

[0041] Figure 1 is a flowchart of some entity information processing methods according to the embodiments of the present disclosure. The embodiments can be applicable to the case of determining the target knowledge entity corresponding to the to-be-processed entity in the target knowledge base. The embodiments can be executed by the entity information processing device disclosed by the embodiments of the present disclosure, which can be implemented by software and / or hardware, and can be integrated on any electronic device with computing capability.

[0042] As shown in Figure 1 The entity information processing method disclosed by the embodiments of the present disclosure can include:

[0043] S101, determining the entity information of the to-be-processed entity and the prediction prompt information of the target language model.

[0044] wherein, the to-be-processed entity represents an entity that needs to be disambiguated. Entity disambiguation refers to determining whether two entities describe the same ontology. In this embodiment, entity disambiguation refers to associating a to-be-processed entity outside the knowledge base with an entity in the knowledge base. When the two entities are an entity in the knowledge base and an entity outside the knowledge base respectively, the entity disambiguation in this scenario is also referred to as entity linking. An entity represents an objective existence and can be distinguished from each other. In practical applications, the most commonly used is a named entity, that is, a specific type of name or symbol of a thing, which generally refers to a real-world thing that can be identified by a name, such as a person's name, a work name, and an organization name, etc. Broadly defined, named entities also include time expressions, numerical expressions, and addresses, etc. Entity information represents the identification text information of the to-be-processed entity, that is, the identification text information corresponding to the to-be-processed entity.

[0045] The target language model is a language model. In this embodiment, the target language model represents a generative language model, which is used to predict another piece of text information according to the input text information. In this embodiment, the types of the target language model include but are not limited to BERT model or GPT model, etc. Preferably, the target language model is set to GPT-2 model.

[0046] The prediction prompt information is a text template for prompting and guiding the target language model to predict the input information, so that the target language model better understands the downstream task. In other words, the prediction prompt information is to add some text at the input end, so as to better utilize the existing knowledge of the target language model, and then better cope with the downstream task. For example, the input of the target language model is: “I love this movie”, and the goal is to make the target language model output: “positive emotion” or “negative emotion” and the like. Therefore, the original input can be appropriately converted into a form suitable for processing by the target language model, guiding the target language model to output “positive emotion” or “negative emotion” and the like, so as to be applied to the downstream task. For example, the original input “I love this movie” is converted into “I love this movie. Overall, it is a _ movie”. Among them, “I love this movie” is the original input, “_” represents the text answer that needs to be predicted by the target language model, and “Overall, it is a” and “movie” are the prompts of the target language model, that is, the prediction prompt information. Therefore, the target language model will predict some words such as “excellent” or “boring” as the text answer in the “_” position according to the existing knowledge combined with the prediction prompt information. Finally, the prediction result of the model is mapped to the required answer space. For example, “excellent” is mapped to “positive emotion”, “boring” is mapped to “negative emotion”, and the like.

[0047] In one embodiment, the entity information of the entity to be processed is determined based on the name information of the entity to be processed and the attribute information contained in the entity to be processed. For example, the name information, the candidate attributes, and the attribute values ​​of the candidate attributes are concatenated, and the concatenated result is used as the entity information of the entity to be processed.

[0048] In one embodiment, manually configured prediction prompt information is obtained as the prediction prompt information of the target language model. For example, the manually configured prediction prompt information, such as "the release year of this TV series is", "the starring actor of this TV series is", and "the director of this TV series is", is used as the prediction prompt information of the target language model.

[0049] In another embodiment, initial prompt information of a preset target language model, as well as sample input information and sample prediction result information manually annotated for the target language model, is obtained, and then the initial prompt information and sample input information are used as inputs to the target language model, and the sample prediction result information is used as output of the target language model. The initial prompt information is iteratively trained, and finally the initial prompt information after the iterative training is used as the prediction prompt information of the target language model.

[0050] By determining the entity information of the entity to be processed and the predicted prompt information of the target language model, a data foundation is laid for subsequent entity disambiguation based on the entity information and predicted prompt information.

[0051] S102: Determine, based on the entity information of the entity to be processed and the prediction prompt information, a target knowledge entity corresponding to the entity to be processed in a target knowledge base using the target language model.

[0052] The target knowledge base represents the knowledge base for which the entity to be processed needs to be disambiguated. The types of target knowledge bases include, but are not limited to, medical knowledge bases, education knowledge bases, sports knowledge bases, and film and television knowledge bases. This embodiment does not limit the specific types of target knowledge bases.

[0053] In one embodiment, entity identification information is pre-assigned to candidate knowledge entities included in the target knowledge base, where the candidate knowledge entities are knowledge base structured entity data included in the target knowledge base. In other words, assigning entity identification information means assigning uniquely mapped identification information to each knowledge base structured entity data, so that complete entity data can be obtained based on the prediction results of the target language model. The method for determining the entity identification information can be a manual configuration method, such as manually assigning unique entity identification information to each candidate knowledge entity; it can also be an automatic generation method, such as concatenating the name information and attribute value information of each candidate entity as the unique entity identification information for the corresponding candidate entity.

[0054] And, the target language model is pre-trained, where pre-training refers to preliminary training of the model using a large amount of in-domain natural language text that does not require labeling through a basic task related to the language model, so that the model can learn language-related information. In this embodiment, the target language model type is set to a GPT-2 (Generative Pre-Training-2) model, the natural language spliced from the structured data in the target knowledge base is used as training data, and the Language Model is used as a pre-training task to pre-train the target language model, so that the target language model learns the common sense in the target knowledge base, laying a foundation for subsequent prediction.

[0055] Further, the entity information of the entity to be processed and the prediction prompt information are spliced into text, and the text splicing result is input into the target language model that has been pre-trained, so that the target language model predicts and outputs the target entity identification information corresponding to the entity information of the entity to be processed based on the learned common sense of the target knowledge base and the prediction prompt information. Then, according to the mapping relationship between the candidate knowledge entities and the candidate entity identification information in the target knowledge base established in advance, the candidate knowledge entity corresponding to the target entity identification information is taken as the target knowledge entity, and the structured entity data of the target knowledge entity is encapsulated and sent to the target user.

[0056] The present disclosure determines the entity information of the entity to be processed and the prediction prompt information of the target language model, and determines the target knowledge entity corresponding to the entity to be processed in the target knowledge base using the target language model according to the entity information of the entity to be processed and the prediction prompt information. Compared with the existing entity disambiguation method defined by artificial rules, the method saves the labor cost; compared with the existing entity disambiguation method of artificial feature extraction and machine learning model, the method also does not need artificial feature extraction, saves the labor cost, avoids the problem of dependence of feature extraction on the familiarity of the developers with the domain knowledge, and improves the accuracy of entity disambiguation; compared with the existing entity disambiguation method of the Fine-tuning paradigm downstream task of the language model, the method fully releases the ability of the target language model due to the existence of the prediction prompt information, so that the target language model can still maintain the accuracy of entity disambiguation without a large amount of training data, thereby achieving the effect of improving the accuracy of entity disambiguation without a large amount of training data.

[0057] Figure 2A is a flowchart of another entity information processing method disclosed according to an embodiment of the present disclosure, which is further optimized and expanded based on the above technical solutions and can be combined with each of the above optional embodiments.

[0058] As Figure 2AAs shown, the entity information processing method disclosed in the embodiment can include:

[0059] S201, determining a target attribute from the candidate attributes according to importance scores of the candidate attributes contained in the entity to be processed.

[0060] The candidate attributes represent all entity features of the entity to be processed, i.e., P values in SPO (Subject-Predicate-Object, entity-attribute-attribute value) triples corresponding to the entity to be processed. For example, the candidate attributes of a film and television entity A include but are not limited to type, leading actor, number of episodes, issuing company, first broadcast time, director, scriptwriter, and introduction, etc. The importance scores of the candidate attributes are set according to actual experience, and the higher the importance score is, the higher the importance of the corresponding candidate attribute is, and correspondingly, the lower the importance score is, the lower the importance of the corresponding candidate attribute is.

[0061] In an implementation manner, the candidate attributes are sorted from high to low according to the importance scores, and a preset number of candidate attributes with higher importance scores are selected as target attributes according to the sorting result, for example, the top three candidate attributes with higher importance scores are selected as target attributes.

[0062] S202, determining entity information of the entity to be processed according to the name information of the entity to be processed, the target attributes, and target attribute values corresponding to the target attributes.

[0063] The target attribute values represent target attribute values O corresponding to the target attributes P in the SPO triples. For example, “type: television series”, assuming that “type” is a target attribute, then “television series” is a target attribute value.

[0064] In an implementation manner, the name information of the entity to be processed, the target attributes, and the target attribute values are spliced, and the splicing result is taken as the entity information of the entity to be processed.

[0065] For example, the entity information of the entity to be processed is determined by the following formula:

[0066]

[0067] In the formula, X represents the entity information of the entity to be processed, name represents the name information of the entity to be processed, p represents the target attributes of the entity to be processed, and o represents the target attribute values corresponding to the target attributes. i i i

[0068] ​​​S203, input the initial prompt information and the entity information of the sample entity into the target language model, and adjust the initial prompt information according to the sample entity identification information and the initial entity identification information output by the target language model, to determine the predicted prompt information of the target language model.

[0069] Wherein, the sample entity is a training sample entity, and the entity information of the sample entity is obtained by manual labeling and consists of name information of the sample entity, target attributes of the sample entity, and target attribute values corresponding to the target attributes. The sample entity identification information is obtained by manually labeling the expected entity identification information in the target knowledge base for the sample entity. The initial prompt information is randomly initialized prompt information.

[0070] In an embodiment, the target language model type is set to a GPT-2 model, the natural language formed by splicing the structured data in the target knowledge base is used as training data, and the Language Model is used as a pre-training task to pre-train the target language model.

[0071] On the basis of the pre-trained target language model, the entity information of the sample entity and the initial prompt information are input into the target language model, and the initial entity identification information is output based on the embedding layer and the encoding layer in the target language model, and then the loss value is calculated using a preset loss function according to the initial entity identification information and the sample entity identification information, and the loss value is back propagated based on the gradient to adjust the initial prompt information. Finally, the initial prompt information adjusted when the loss value is the smallest is used as the predicted prompt information of the target language model.

[0072] S204, input the entity information of the entity to be processed and the predicted prompt information into the target language model, and determine the target entity identification information according to the prediction result of the target language model.

[0073] Wherein, in order to ensure the effect of the predicted prompt information, the predicted prompt information in this embodiment is composed of a predicted prefix prompt information and a predicted suffix prompt information.

[0074] In an embodiment, the predicted prefix prompt information and the predicted suffix prompt information are spliced with the entity information of the entity to be processed, and the spliced result is input into the target language model. For example, the splicing is performed by the following formula:

[0075] X new =U p +X+U s

[0076] Wherein, X new represents the spliced result input into the target language model, and Up represents the predicted prefix prompt information, X represents the entity information of the entity to be processed, and U s represents the predicted suffix prompt information.

[0077] The target language model first performs vector conversion on the input information based on the embedding layer to obtain vector information, and inputs the vector information into the encoding layer. The vector information is encoded and decoded based on the encoding-decoding transformer unit in the encoding layer, and finally the target entity identification information is output.

[0078] Figure 2B is a structural schematic diagram of some target language models disclosed according to embodiments of the present disclosure, as Figure 2B shown, the input information of the target language model 20 includes the predicted prefix prompt information U p , the entity information X of the entity to be processed, and the predicted suffix prompt information U s . The target language model 20 internally includes embedding layers 21 and an encoding layer 22. The embedding layers 21, i.e., embedding layers, mainly convert the input information into dense vectors to facilitate subsequent encoding layer 22 calculation. The encoding layer 22 includes a plurality of encoding-decoding transformer units 23. Each encoding-decoding transformer unit is an encoder-decoder (encoding-decoding) structure, i.e., composed of an encoder 24 and a decoder 25. The target entity identification information Y is finally output by the decoder 25. Among them, Figure 2B The structure of the encoding layer 22 in the above embodiment is only for explanation and description, and the specific structure of the encoding layer 22 is not limited in the above embodiment, which can be set by actual tasks. The encoding layer 22 can be composed of multiple encoding-decoding transformer units 23. Each encoding-decoding transformer unit 23 in each layer corresponds to a word in the input information. The encoding-decoding transformer units 23 in the same layer are not connected to each other, and the encoding-decoding transformer units 23 between different layers are connected to each other.

[0079] Optionally, S204 includes:

[0080] determining a candidate entity identification dictionary tree of the target knowledge base; taking the relationship between the entity identification root node and the entity identification leaf node in the candidate entity identification dictionary tree as a decoding constraint of the target language model, and controlling the target language model to predict based on the decoding constraint to obtain the target entity identification information.

[0081] Wherein, the candidate entity identification dictionary tree is constructed according to the order of the words contained in the candidate entity identification information in the target knowledge base, the first word is taken as the entity identification root node, and the subsequent words are taken as the entity identification leaf nodes. For example, assuming that a certain candidate entity identification information is composed of three words A+B+C, in the dictionary tree composed of the candidate entity identification information, the entity identification root node is A, the first-level entity identification leaf node is B, and the second-level entity identification leaf node is C.

[0082] Figure 2C is a structural schematic diagram of some candidate entity identification dictionary trees disclosed according to the embodiments of the present disclosure, as shown in Figure 2C The entity identification root node is "movie A", the first-level entity identification leaf nodes include "2015" and "2018", "2015" further includes the second-level entity identification leaf nodes "TV series" and "movie version", and "2018" further includes the second-level entity identification leaf nodes "reset version" and "novel". Wherein, in the actual scene, the number of the entity identification root node and the entity identification leaf nodes at each level in the candidate entity identification dictionary tree is large, and here only the above number is taken as an example for explanation and description, and the specific structure of the candidate entity identification dictionary tree is not limited in any way.

[0083] In an embodiment, a predetermined candidate entity identification dictionary tree is obtained, and in the decoding process of the decoder of the encoder layer of the target language model, the relationship between the entity identification root node and the entity identification leaf node in the candidate entity identification dictionary tree is taken as a decoding constraint, and the decoder is controlled to predict according to the decoding constraint.

[0084] Specifically, the beam search algorithm is used to control the decoder, the constraint beam is set to N, wherein N is an adjustable positive integer, and the search is performed in the candidate entity identification dictionary tree. First, the N highest scores are selected from the entity identification root node as the candidate entity identification root node, and the N highest scores are selected from the first-level entity identification leaf nodes of each candidate entity identification root node as the first-type candidate entity identification leaf node, and so on until the entire candidate entity identification dictionary tree is traversed.

[0085] Figure 2D is a schematic diagram of the decoding of some target language models according to the embodiments of the present disclosure, as shown in Figure 2DAs shown in the figure, assume the input to the target language model is "U1U2 The introduction of TV series A is: TV series A is adapted from the online novel of the same name by Zhang San, directed by Li Si, and starring Wang Wu, Zhao Liu, and others. U3U4", where U1-U4 are prediction prompts, and the rest are entity information. During the decoding process, the target language model uses a beam search algorithm with the beam constraint set to 1 to search the candidate entity identifier dictionary tree. The entity identifier root nodes include "TV series A", "TV series B", and "TV series C". "TV series A" has the highest score, so "TV series A" is selected as the first decoding result. "TV series A" includes four first-level entity identifier leaf nodes: "2015", "2018", "Novel", and "Documentary". Among them, "2015" has the highest score, so "2015" is selected as the second decoding result. "2015" includes four secondary entity identification leaf nodes: "TV Series," "Movie Version," "Remake," and "Novel." "TV Series" has the highest score, so "TV Series" is used as the third decoding result. Ultimately, "Film and TV Series A 2015 TV Series" is used as the target entity identification information.

[0086] By determining the candidate entity identification dictionary tree of the target knowledge base, and using the relationship between the entity identification root node and the entity identification leaf node in the candidate entity identification dictionary tree as the decoding constraint of the target language model, and controlling the target language model to make predictions based on the decoding constraints, the target entity identification information is obtained, which ensures that the target entity identification information finally obtained exists in the target knowledge base, avoids the problem of being unable to map to the target knowledge entity, and ensures the accuracy of entity disambiguation.

[0087] S205: Match the target entity identification information with the mapping relationship between candidate entity identification information and candidate knowledge entities in the target knowledge base to determine the target knowledge entity corresponding to the entity to be processed in the target knowledge base.

[0088] In one embodiment, the target entity identification information is matched with the mapping relationship between the candidate entity identification information and the candidate knowledge entity in the target knowledge base, and the candidate knowledge entity that matches the target entity identification information is used as the target knowledge entity corresponding to the entity to be processed in the target knowledge base.

[0089] Optionally, the candidate entity identification information is determined according to the name information and attribute value information of the candidate knowledge entity.

[0090] In one embodiment, the target attribute is determined from the candidate attributes according to the importance scores of the candidate attributes contained in the candidate knowledge entity, and the candidate entity identification information of the candidate knowledge entity is determined according to the name information of the candidate knowledge entity and the target attribute value corresponding to the target attribute.

[0091] Exemplarily, the candidate entity identification information of the candidate knowledge entity is determined by the following formula:

[0092]

[0093] Among them, name_uniq represents the candidate entity identification information of the candidate knowledge entity, name represents the name information of the candidate knowledge entity, i Represents the target attribute p i The corresponding target attribute value.

[0094] By setting the candidate entity identification information according to the name information and attribute value information of the candidate knowledge entity, the uniqueness of the candidate entity identification information in the target knowledge base is guaranteed, and no manual setting is required, thus saving labor costs.

[0095] The present disclosure inputs the entity information and predicted prompt information of the entity to be processed into the target language model, determines the target entity identification information according to the prediction result of the target language model, matches the target entity identification information with the mapping relationship between the candidate entity identification information and the candidate knowledge entity in the target knowledge base, determines the target knowledge entity corresponding to the entity to be processed in the target knowledge base, and achieves the effect of disambiguating the entity to be processed based on the predicted target entity identification information, and the target language model improves the accuracy of entity disambiguation without the need for a large amount of training data; inputs the entity information of the sample entity into the target language model, and adjusts the initial prompt information of the target language model according to the sample entity identification information output by the target language model to determine the predicted prompt information of the target language model, thereby achieving the effect of automatically determining the predicted prompt information without the need for manual configuration, saving labor costs and ensuring the accuracy of the predicted prompt information; determines the target attribute from the candidate attributes according to the importance score of the candidate attributes contained in the entity to be processed, and determines the entity information of the entity to be processed according to the name information of the entity to be processed, the target attribute and the target attribute value corresponding to the target attribute, thereby ensuring the uniqueness of the entity information of the entity to be processed, without the need for manual setting, saving labor costs.

[0096] Figure 3 The following is a schematic diagram of the structure of some entity information processing devices disclosed in embodiments of the present disclosure, which can be used to determine the target knowledge entity corresponding to the entity to be processed in a target knowledge base. The device of this embodiment can be implemented using software and / or hardware and can be integrated into any electronic device with computing capabilities.

[0097] like Figure 3 As shown, the entity information processing device 30 disclosed in this embodiment may include an information determination module 31 and a knowledge entity determination module 32, wherein:

[0098] An information determination module 31 is used to determine entity information of the entity to be processed and prediction prompt information of the target language model;

[0099] The knowledge entity determination module 32 is configured to determine the target knowledge entity corresponding to the entity to be processed in the target knowledge base using the target language model according to the entity information of the entity to be processed and the prediction prompt information.

[0100] Optionally, the knowledge entity determination module 32 is specifically configured to:

[0101] Inputting the entity information of the entity to be processed and the prediction prompt information into the target language model, and determining the target entity identification information according to the prediction result of the target language model;

[0102] The target entity identification information is matched with the mapping relationship between candidate entity identification information and candidate knowledge entities in the target knowledge base to determine the target knowledge entity corresponding to the entity to be processed in the target knowledge base.

[0103] Optionally, the candidate entity identification information is determined according to the name information and attribute value information of the candidate knowledge entity.

[0104] Optionally, the knowledge entity determination module 32 is further configured to:

[0105] Determine a candidate entity identifier dictionary tree of the target knowledge base;

[0106] The relationship between the entity identification root node and the entity identification leaf node in the candidate entity identification dictionary tree is used as the decoding constraint of the target language model, and the target language model is controlled to perform prediction based on the decoding constraint to obtain the target entity identification information.

[0107] Optionally, the information determination module 31 is specifically configured to:

[0108] The initial prompt information and the entity information of the sample entity are input into the target language model, and the initial prompt information is adjusted according to the sample entity identification information and the initial entity identification information output by the target language model to determine the predicted prompt information of the target language model.

[0109] Optionally, the information determination module 31 is further configured to:

[0110] Determining a target attribute from the candidate attributes according to the importance scores of the candidate attributes included in the entity to be processed;

[0111] According to the name information of the entity to be processed, the target attribute, and the target attribute value corresponding to the target attribute, entity information of the entity to be processed is determined.

[0112] The entity information processing apparatus 30 disclosed in the embodiments of the present disclosure can execute the entity information processing method disclosed in the embodiments of the present disclosure, and has the function modules and beneficial effects corresponding to the execution method. The contents not described in detail in the embodiments can refer to the description in the method embodiments of the present disclosure.

[0113] In the technical solutions of the present disclosure, the acquisition, storage and application of user personal information comply with relevant laws and regulations and do not violate public order and good customs.

[0114] According to the embodiments of the present disclosure, the present disclosure further provides an electronic device, a readable storage medium and a computer program product.

[0115] Figure 4 A schematic block diagram of an example electronic device 400 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present disclosure described and / or claimed in this document.

[0116] As shown in Figure 4 The electronic device 400 includes a computing unit 401 that can perform various appropriate actions and processes in accordance with a computer program stored in a read-only memory (ROM) 402 or a computer program loaded into a random access memory (RAM) 403 from a storage unit 408. Various programs and data required for the operation of the electronic device 400 can also be stored in the RAM 403. The computing unit 401, the ROM 402, and the RAM 403 are connected to each other through a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0117] Various components in the electronic device 400 are connected to the I / O interface 405, including an input unit 406, such as a keyboard, a mouse, etc.; an output unit 407, such as various types of displays, a speaker, etc.; the storage unit 408, such as a magnetic disk, an optical disk, etc.; and a communication unit 409, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 409 allows the electronic device 400 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.

[0118] The computing unit 401 can be various general and / or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 401 performs various methods and processes described above, such as the entity information processing method. For example, in some embodiments, the entity information processing method can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 408. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 400 via the ROM 402 and / or the communication unit 409. When the computer program is loaded onto the RAM 403 and executed by the computing unit 401, one or more steps of the entity information processing method described above can be performed. Alternatively, in other embodiments, the computing unit 401 can be configured to perform the entity information processing method by any other appropriate means, such as by means of firmware.

[0119] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a programmable logic device (PLD), a computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.

[0120] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces a function / operation specified in the flowchart and / or block diagram. The program code can be executed entirely on a machine, partially on a machine, partially on a machine as a stand-alone software package, and partially on a remote machine or a server.

[0121] In the context of this disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0122] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.

[0123] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), blockchain networks, and the Internet.

[0124] The computer system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and VPS service.

[0125] It should be understood that the various forms of flow shown above can be reordered, added to, or have steps deleted. For example, the steps described in the present disclosure can be performed in parallel, in series, or in a different order, as long as the desired results of the technical solutions of the present disclosure can be achieved, which are not limited herein.

[0126] The above detailed description does not constitute a limitation on the protection scope of the present disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements, and improvements made within the spirit and principles of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A method for processing entity information, comprising: Determining entity information of an entity to be processed and prediction prompt information of a target language model; wherein the prediction prompt information is a text template for prompting and guiding the target language model to predict input information; Determining, based on the entity information of the entity to be processed and the prediction prompt information, a target knowledge entity corresponding to the entity to be processed in a target knowledge base using the target language model; The target language model is used to predict and output target entity identification information, where the target entity identification information is identification information uniquely mapped to the entity to be processed; and the target entity identification information is used to determine the target knowledge entity.

2. The method according to claim 1, wherein The step of determining, based on the entity information of the entity to be processed and the prediction prompt information, a target knowledge entity corresponding to the entity to be processed in a target knowledge base using the target language model includes: Inputting the entity information of the entity to be processed and the prediction prompt information into the target language model, and determining the target entity identification information according to the prediction result of the target language model; The target entity identification information is matched with the mapping relationship between candidate entity identification information and candidate knowledge entities in the target knowledge base to determine the target knowledge entity corresponding to the entity to be processed in the target knowledge base.

3. The method according to claim 2, wherein: The candidate entity identification information is determined according to the name information and attribute value information of the candidate knowledge entity.

4. The method according to claim 2, wherein inputting the entity information of the entity to be processed and the prediction prompt information into the target language model, and determining the target entity identification information according to the prediction result of the target language model, comprises: Determine a candidate entity identifier dictionary tree of the target knowledge base; The relationship between the entity identification root node and the entity identification leaf node in the candidate entity identification dictionary tree is used as the decoding constraint of the target language model, and the target language model is controlled to perform prediction based on the decoding constraint to obtain the target entity identification information.

5. The method according to claim 1, wherein The step of determining the prediction prompt information of the target language model includes: The initial prompt information and the entity information of the sample entity are input into the target language model, and the initial prompt information is adjusted according to the sample entity identification information and the initial entity identification information output by the target language model to determine the predicted prompt information of the target language model.

6. The method according to claim 1, wherein The determining of entity information of the entity to be processed includes: Determining a target attribute from the candidate attributes according to the importance scores of the candidate attributes included in the entity to be processed; The entity information of the entity to be processed is determined according to the name information of the entity to be processed, the target attribute, and the target attribute value corresponding to the target attribute.

7. A physical information processing device, comprising: An information determination module, configured to determine entity information of an entity to be processed and prediction prompt information of a target language model; wherein the prediction prompt information is a text template for prompting and guiding the target language model to predict input information; a knowledge entity determination module, configured to determine, based on the entity information of the entity to be processed and the prediction prompt information, a target knowledge entity corresponding to the entity to be processed in a target knowledge base using the target language model; The target language model is used to predict and output target entity identification information, where the target entity identification information is identification information uniquely mapped to the entity to be processed; and the target entity identification information is used to determine the target knowledge entity.

8. The device according to claim 7, wherein The knowledge entity determination module is specifically used to: Inputting the entity information of the entity to be processed and the prediction prompt information into the target language model, and determining the target entity identification information according to the prediction result of the target language model; The target entity identification information is matched with the mapping relationship between candidate entity identification information and candidate knowledge entities in the target knowledge base to determine the target knowledge entity corresponding to the entity to be processed in the target knowledge base.

9. The device according to claim 8, wherein The candidate entity identification information is determined according to the name information and attribute value information of the candidate knowledge entity.

10. The device according to claim 8, wherein The knowledge entity determination module is further configured to: Determine a candidate entity identifier dictionary tree of the target knowledge base; The relationship between the entity identification root node and the entity identification leaf node in the candidate entity identification dictionary tree is used as the decoding constraint of the target language model, and the target language model is controlled to perform prediction based on the decoding constraint to obtain the target entity identification information.

11. The device according to claim 7, wherein The information determination module is specifically used to: The initial prompt information and the entity information of the sample entity are input into the target language model, and the initial prompt information is adjusted according to the sample entity identification information and the initial entity identification information output by the target language model to determine the predicted prompt information of the target language model.

12. The device according to claim 7, wherein The information determination module is further configured to: Determining a target attribute from the candidate attributes according to the importance scores of the candidate attributes included in the entity to be processed; The entity information of the entity to be processed is determined according to the name information of the entity to be processed, the target attribute, and the target attribute value corresponding to the target attribute.

13. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.

14. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 6.

15. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Error correction method and device and computer readable medium

    CN109885180A

  • Entity linking method and device, equipment and storage medium

    CN113761218A