Method, apparatus, device and storage medium for retrieving entity

By performing semantic understanding and category determination on the search query, and combining it with the corresponding search strategy, candidate entities that fail the verification are filtered out, which solves the problem of inaccurate search results in entity chaining tasks in the prior art and achieves more accurate entity retrieval.

CN114117007BActive Publication Date: 2026-01-02BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111427382.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-25
Publication Date
2026-01-02
Estimated Expiration
2041-11-25

AI Technical Summary

Technical Problem

Existing technologies struggle to handle reference information from general, knowledge tags, and list categories in entity chaining tasks, resulting in inaccurate search results.

Method used

By performing semantic understanding on the search query, the category of the mentioned information is determined, and candidate entities that fail the verification are filtered out according to the retrieval strategy corresponding to the category, so as to obtain at least one target entity.

Benefits of technology

It improves the accuracy of entity retrieval, especially for references in general, knowledge tags, and list categories, enhancing the precision of search results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114117007B_ABST
    Figure CN114117007B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method and device for retrieving entities, an apparatus, and a storage medium, relating to the technical field of artificial intelligence, in particular to the technical field of knowledge graph, data retrieval and the like. The specific implementation scheme is as follows: performing semantic understanding operation on a retrieval sentence to obtain mentioned information; determining the category of the mentioned information; performing retrieval on the mentioned information according to a retrieval strategy corresponding to the category to obtain a plurality of candidate entities; and verifying the plurality of candidate entities, and screening out candidate entities that do not pass the verification from the plurality of candidate entities to obtain at least one target entity.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of artificial intelligence, in particular to the technical field of knowledge graph, data retrieval and the like. BACKGROUND

[0002] A knowledge graph (KG) is a series of graphs showing the development process and structural relationship of knowledge. In order to improve the quality and experience of a search engine, the technology of a knowledge graph can be applied to the search engine. SUMMARY

[0003] The present disclosure provides a method, apparatus, device and storage medium for retrieving an entity.

[0004] According to an aspect of the present disclosure, a method for retrieving an entity is provided, including: performing a semantic understanding operation on a retrieval sentence to obtain mention information; determining a category of the mention information; retrieving the mention information according to a retrieval strategy corresponding to the category to obtain a plurality of candidate entities; and verifying the plurality of candidate entities, and filtering out a candidate entity that fails to pass the verification from the plurality of candidate entities to obtain at least one target entity.

[0005] According to another aspect of the present disclosure, an apparatus for retrieving an entity is provided, including: a semantic understanding module configured to perform a semantic analysis operation on a retrieval sentence to obtain mention information; a determination module configured to determine a category of the mention information; a retrieval module configured to retrieve the mention information according to a retrieval strategy corresponding to the category to obtain a plurality of candidate entities; and a filtering module configured to verify the plurality of candidate entities, and filter out a candidate entity that fails to pass the verification from the plurality of candidate entities to obtain at least one target entity.

[0006] Another aspect of the present disclosure provides an electronic device, including: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable 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 shown in the embodiments of the present disclosure.

[0007] According to another aspect of the embodiments of the present disclosure, a non-transitory computer-readable storage medium having computer instructions is provided, wherein the computer instructions are used to enable the computer to perform the method shown in the embodiments of the present disclosure.

[0008] According to another aspect of the embodiments of the present disclosure, a computer program product is provided, including computer programs / instructions, characterized in that the computer programs / instructions are executed by a processor to implement the steps of the method shown in the embodiments of the present disclosure.

[0009] It is to be understood that the details set forth herein do not construe a limitation on the scope of the exemplary embodiments of the present disclosure but are presented as illustrative configurations only. Various embodiments of the disclosure will be presented in terms of methods, devices, and systems. It should be understood that the various embodiments presented can be implemented in software, hardware, or a combination thereof. It is further noted that the methods disclosed herein can be implemented in computer executable code disposed in a computer readable medium. BRIEF DESCRIPTION OF DRAWINGS

[0010] The accompanying drawings are included to provide a further understanding of the present application, and are incorporated in and constitute a part of this specification. Illustrations in the drawings are for purposes of illustrating the exemplary embodiments of the present application and are not to be construed as limiting the present application.

[0011] Figure 1 is an application scenario diagram of a method, apparatus, electronic device and storage medium for retrieving an entity according to an embodiment of the present disclosure;

[0012] Figure 2 A flowchart of a method for retrieving an entity according to an embodiment of the present disclosure is schematically shown;

[0013] Figure 3 A flowchart of a method for determining a target entity according to an embodiment of the present disclosure is schematically shown;

[0014] Figure 4 A flowchart of a method for determining a target entity according to another embodiment of the present disclosure is schematically shown;

[0015] Figure 5 A flowchart of a method for determining a target entity according to another embodiment of the present disclosure is schematically shown;

[0016] Figure 6 A block diagram of an apparatus for retrieving an entity according to an embodiment of the present disclosure is schematically shown; and

[0017] Figure 7 A block diagram of an example electronic device that can be used to implement embodiments of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0018] Exemplary embodiments of the present disclosure are described herein with reference to the accompanying drawings, which are presented for the purpose of illustration and description. Various details of the embodiments of the present disclosure are described herein in order to provide a thorough understanding of the embodiments. It is to be understood that the various embodiments of the present disclosure can be implemented in various ways, and that the embodiments are not limited to the embodiments described herein. Furthermore, the present disclosure can take many different forms other than the specific embodiments described herein. It should also be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of the present disclosure. It is also noted that the singular forms "a," "an," and "the" include plural references unless the context clearly dictates otherwise.

[0019] The following will be described in conjunction with Figure 1 The application scenario of the method and apparatus for retrieving an entity provided by the present disclosure is described.

[0020] Figure 1 is an application scenario diagram of a method, apparatus, electronic device and storage medium for retrieving an entity according to an embodiment of the present disclosure;

[0021] AsFigure 1 As shown, in the application scenario 100, when a user wants to perform data retrieval, a query 11 can be input in an input box. Then, semantic understanding can be performed on the query 11, so that mention information 12 contained in the recognized query is obtained. Next, entity retrieval and entity chain pointing 110 can be performed in a knowledge base 13 according to the query 11 and the mention information 12. The knowledge base 13 can include a plurality of entities 14 and name information, description information, relationship information, and the like of the plurality of entities.

[0022] Exemplarily, in the embodiment, the entities 14 matching the query 11 and the mention information 12 can be retrieved from the knowledge base 13 by entity indexing 120. Then, entity chain pointing can be performed on the retrieved entities 14, and the result 14 is obtained.

[0023] According to an embodiment of the present disclosure, the mention information can be classified into a plurality of categories according to correct retrieval results corresponding to the mention information. Then, entity retrieval is performed on the categories of the mention information using corresponding retrieval strategies.

[0024] In the embodiment, for example, the mention information can be classified into a general category, a list category, and a knowledge tag (or alias) category.

[0025] For the mention information of the list category, the correct retrieval result corresponding to the mention information is multiple and belongs to one set entity, and the mention information contains information of the set entity. For example, the mention information of the list category can be “four great inventions”, and the corresponding correct retrieval result can be four entities “papermaking”, “printing”, “gunpowder”, and “compass”.

[0026] For the mention information of the knowledge tag category, the mention information contains an alias or a knowledge tag of the correct retrieval result. For example, the mention information of the knowledge tag category can be “the largest sea in the world”, and the corresponding correct retrieval result can be “Coral Sea”.

[0027] For the mentioned information of the regular category, the mentioned information contains the name of the correct retrieval result. For example, the mentioned information of the regular category can be "Zhang San", and the corresponding correct retrieval result can be "singer Zhang San". The regular category can further include a main demand category and a scattered demand category. The main demand category indicates that the demand of the user is relatively clear. For example, the user searches for "Zhang San", and there is a 99% probability that the user wants to find the singer Zhang San, so the demand is relatively clear, and accordingly, "singer Zhang San" can be returned as the retrieval result. The scattered demand category cannot simply distinguish the entity based on semantics, and needs to further determine in the retrieved result. Exemplarily, in the embodiment, when the number of retrieved entities is greater than 1, the scattered demand determination can be performed. For example, the user searches for "grassland", and there is a 40% probability that the user wants to find the prose grassland, a 30% probability that the user wants to find the landscape painting grassland, and a 30% probability that the user wants to find the song grassland, so the demand is relatively scattered, and accordingly, "prose grassland", "landscape painting grassland", and "song grassland" can be returned as the retrieval result.

[0028] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision, and disclosure of the data such as the retrieval sentence, the mentioned information, and the entity are in line with the relevant laws and regulations and do not violate public order and good customs.

[0029] Figure 2 A flowchart of a method for retrieving an entity according to an embodiment of the present disclosure is schematically shown.

[0030] As shown in Figure 2 The method 200 for retrieving an entity includes, in operation S210, performing semantic analysis on a retrieval sentence to obtain mentioned information.

[0031] Then, in operation S220, the category of the mentioned information is determined.

[0032] In operation S230, the mentioned information is retrieved according to a retrieval strategy corresponding to the category to obtain a plurality of candidate entities.

[0033] In operation S240, the plurality of candidate entities are checked, and the candidate entities that do not pass the check are filtered out to obtain at least one target entity.

[0034] According to an embodiment of the present disclosure, the retrieval sentence can include, for example, a retrieval sentence input by a user. The mentioned information can include, for example, a main entity mentioned segment contained in the retrieval sentence and identified by semantic understanding of the retrieval sentence.

[0035] According to an embodiment of the present disclosure, the target entity may, for example, be an entity that meets the user demand. It can be understood that if there is no target entity that meets the retrieval and verification conditions, empty data can be returned, or the entity that best meets the user demand can be determined in other manners.

[0036] The related art can only handle the conventional entity chain pointing task. According to the method for retrieving an entity according to an embodiment of the present disclosure, the entity can be retrieved according to the category of the mentioned information using the corresponding retrieval strategy, and the problem that cannot be covered by the entity chain pointing of the related art can be solved.

[0037] According to an embodiment of the present disclosure, the category of the mentioned information may, for example, include a conventional category, a knowledge label category, and a list category.

[0038] According to an embodiment of the present disclosure, in the case where the mentioned information is of the conventional category, an entity in the knowledge base that contains the mentioned information in the name information and / or the description information can be determined as a candidate entity.

[0039] According to an embodiment of the present disclosure, in the case where the mentioned information is of the knowledge label category, a first original entity in the knowledge base that contains the mentioned information in the name information and a second original entity that contains the mentioned information in the description information can be determined, where the number of the second original entities is greater than the number of the first original entities. Then the first original entity and the second original entity can be determined as candidate entities.

[0040] According to an embodiment of the present disclosure, since the number of the second original entities is greater than the number of the first original entities, the retrieval recall of the description information is more focused during retrieval.

[0041] Taking the retrieval sentence “the largest plain in the world” and the mentioned sentence “the largest plain in the world” as an example, the related art can recall the entity “plain”. According to an embodiment of the present disclosure, the related description information “the Amazon Plain is located in the northern part of South America, in the middle and lower reaches of the Amazon River, with an area of 5.6 million square kilometers, and is the largest alluvial plain in the world” can be matched during retrieval, so that the “Amazon Plain” is recalled, and the retrieval is more accurate than the prior art.

[0042] According to an embodiment of the present disclosure, in the case where the mentioned information is of the list category, a plurality of candidate entities can be determined by information extraction. For example, a set entity in the knowledge base that contains the mentioned information in the name information and / or the description information can be determined. Then the description information of the set entity can be extracted using the retrieval sentence as the extraction target, a plurality of sub-entities are obtained as a plurality of candidate entities.

[0043] Taking the retrieval statement "What are the four great works of literature?" as an example, the corresponding mentioned information can be "four great works of literature", and it can be determined that the set entity "four great works of literature (ID = xxx)" containing the mentioned information in the name information and / or description information in the knowledge base. Then the description information of the recalled set entity can be information extraction. For example, there is description text "four great works of literature of Chinese classical novels, referred to as four great works of literature, refers to 'Water Margin', 'Romance of the Three Kingdoms', 'Journey to the West', and 'Dream of the Red Chamber', these four masterpieces" in "four great works of literature (ID = xxx)", and the retrieval statement "What are the four great works of literature?" can be used as an extraction target (Prompt) to input a reading comprehension model, and the reading comprehension model will output the answer "Water Margin", "Romance of the Three Kingdoms", "Journey to the West", and "Dream of the Red Chamber". The reading comprehension model can be pre-trained based on BERT, ERNIE, etc.

[0044] According to another embodiment of the present disclosure, when the mentioned information contains a determiner, the mentioned information can be split into a concept word and a determiner. The concept word can be used to represent the concept contained in the mentioned information. The concept is an abstract representation of an entity. The entity is an instantiation of the concept. The concept may, for example, include animals, plants, and people. Accordingly, the entity may, for example, include tigers, cypresses, and Zhang San.

[0045] Taking the mentioned information "Sichuan Guanghan City" as an example, it can be split into "Sichuan" and "Guanghan City". "Sichuan" is a place determiner, and "Guanghan City" is a place main entity.

[0046] Based on this, according to another embodiment of the present disclosure, when the mentioned information is a list category, a plurality of candidate entities can also be determined by concept aggregation. For example, a plurality of entity samples containing concept words and determiners in the name information and / or description information in the knowledge base can be determined. The number of entity samples can be set as needed. Then determine the occurrence frequency of the determiner in the relationship information of the plurality of entity samples. According to the relationship information with the highest occurrence frequency in the relationship information of the plurality of entity samples, determine the target relationship. Next, determine the entity in the knowledge base whose concept attribute contains the concept word and whose relationship information contains the target relationship as the candidate entity.

[0047] Illustratively, in this embodiment, the relationship information of the entity can be recorded in the form of key-value (key-value pair). The value can contain another entity in addition to the current entity, and the key can be used to represent the relationship between the current entity and the other entity.

[0048] For example, the key of entity A can include author, and the value can include Li Si, i.e. the key-value indicates that Li Si is the author of entity A. If the occurrence frequency of key=author and value=Li Si in the key-value corresponding to each entity sample is the highest, it can be determined that the target relationship is author-Li Si. Next, the entity whose concept attribute in the knowledge base contains the concept word and whose relationship information contains the author-Li Si relationship can be determined as a candidate entity.

[0049] According to another embodiment of the present disclosure, the relationship information with the highest frequency cannot be determined due to the low occurrence frequency of the determiner in the relationship information. Based on this, in the case where the mention information is of the list category, the entity whose concept attribute in the knowledge base contains the concept word and whose description information contains the determiner can also be determined as a candidate entity. This method can be applied, for example, in the case where the corresponding relationship information is not identified.

[0050] According to an embodiment of the present disclosure, for the case where the mention information is of the list category, the candidate entity can be first determined by using the information extraction method, and if an error occurs in the middle of the information extraction or the number of extraction results is less than or equal to 1, the candidate entity can be determined by using the concept aggregation method.

[0051] According to an embodiment of the present disclosure, after the candidate entity is determined, the candidate entity can also be sorted.

[0052] According to one embodiment of the present disclosure, for a first candidate entity in the plurality of candidate entities determined according to the name information, the character coincidence degree between the first candidate entity and the search sentence is determined. The first candidate entity is sorted according to the character coincidence degree. For a second candidate entity in the plurality of candidate entities determined according to the description information, the semantic similarity between the second candidate entity and the search sentence is determined. The second candidate entity is sorted according to the semantic similarity.

[0053] According to another embodiment of the present disclosure, the number of views of each candidate entity in the plurality of candidate entities can also be determined. Then, the plurality of candidate entities are sorted according to the number of views.

[0054] According to an embodiment of the present disclosure, after the candidate entity is obtained, the candidate entity can be verified to filter out the candidate entity that does not meet the requirement, so that the result is more accurate.

[0055] Based on this, the semantic recognition operation can be performed on the search sentence to obtain the entity concept of the search sentence. Then, it is determined whether each candidate entity in the plurality of candidate entities matches the entity concept. The candidate entity in the plurality of candidate entities that does not match the entity concept is deleted to obtain at least one target entity.

[0056] According to another embodiment of the present disclosure, in the case that the mention information is split into the concept word and the qualifier, it is further determined whether each candidate entity in the plurality of candidate entities matches the qualifier. Then, the candidate entity that does not match the qualifier is deleted from the plurality of candidate entities, and at least one target entity is obtained.

[0057] According to an embodiment of the present disclosure, by determining the concept and the qualifier information of the entity, and double-checking the ranked candidate entities by using the concepts and the qualifier information, the accuracy of the retrieval result can be improved.

[0058] According to an embodiment of the present disclosure, in the case that the target entity is multiple, the browsing volume and / or the similarity of the target entity other than the first target entity in the plurality of target entities can be further obtained. Then, the target entity other than the first target entity is filtered according to the browsing volume and / or the similarity.

[0059] According to an embodiment of the present disclosure, in the case that the target entity remaining after the filtering is multiple, the demand feature of each target entity can be obtained. Then, the target entity in the plurality of target entities that does not meet the requirement of the demand feature is deleted. The demand feature can be used to represent the retrieval demand of the user, for example, can be determined according to the click feature, the display feature and the like of the user in the search log.

[0060] Taking the retrieval statement "the author of the grassland" as an example, through the above checking operation, the candidate entity matching "the author of the grassland" is only left some entities with the concept of "work type", such as "grassland (prose)" and "grassland (painting)", and "grassland (place)" is excluded, so that the retrieval result is more accurate.

[0061] According to an embodiment of the present disclosure, after obtaining the target entity, the corresponding retrieval result can be output. For example, the output of the conventional category and the knowledge label category can include the entity name, the entity ID and the like of the target entity. The output of the list category and the scattered demand category can include the entity name list, the entity ID list and the like constituted by the target entity.

[0062] The method for determining the target entity in the case that the mention information is the conventional category will be described below with reference to Figure 3 and in conjunction with specific embodiments. Those skilled in the art can understand that the following example embodiments are only used to understand the present disclosure, and the present disclosure is not limited thereto.

[0063] Figure 3 A flowchart of the method for determining the target entity according to an embodiment of the present disclosure is schematically shown.

[0064] As Figure 3As shown, the determining 300 of the target entity can include, at operation S310, determining, as candidate entities, entities in which the name information and / or the description information in the knowledge base contains the mention information.

[0065] According to embodiments of the present disclosure, the candidate entities containing the mention information can be recalled from the name information, the description information, etc.

[0066] At operation S320, the plurality of candidate entities are ranked based on the character coincidence degree or the semantic similarity.

[0067] According to embodiments of the present disclosure, for a first candidate entity in the plurality of candidate entities determined according to the name information, the character coincidence degree between the first candidate entity and the mention information can be determined, and then the first candidate entity is ranked according to the character coincidence degree. For example, the plurality of candidate entities can be ranked in an order from large to small of the character coincidence degree.

[0068] The character coincidence degree can be used to represent the coincidence degree between the mention information and the matching text of the first candidate entity. For example, the character coincidence degree can be calculated according to the following formula.

[0069]

[0070] The scorecoincide represents the character coincidence degree, the ratio1 represents the proportion of the number of characters coinciding between the mention information and the matching text of the first candidate entity to the length of the mention information string. The ratio2 represents the proportion of the number of characters coinciding between the mention information and the matching text to the length of the matching text string. According to the above formula, in the case of min(ratio1, ratio2) < 0.45, scorecoincide = min(ratio1, ratio2), and in other cases, scorecoincide = ratio1 + ratio2.

[0071] For a second candidate entity in the plurality of candidate entities determined according to the description information, the semantic similarity between the second candidate entity and the mention information can be determined, and then the second candidate entity is ranked according to the semantic similarity. For example, the plurality of candidate entities can be ranked in an order from large to small of the semantic similarity.

[0072] For example, the semantic similarity between the mention information and the matching text of the second candidate entity can be calculated as the semantic similarity between the second candidate entity and the mention information by using a semantic similarity model. The semantic similarity model can be based on a pre-trained language model, for example, can include BERT, ERNIE, etc.

[0073] In operation S330, the plurality of candidate entities are checked, and candidate entities that do not pass the check are filtered out, to obtain at least one target entity.

[0074] According to embodiments of the present disclosure, a semantic recognition operation can be performed on the search sentence to obtain an entity concept of the search sentence. Then it is determined whether each candidate entity in the plurality of candidate entities matches the entity concept, and candidate entities that do not match the entity concept are deleted from the plurality of candidate entities to obtain at least one target entity.

[0075] Exemplarily, a semantic recognition model can be used to perform a semantic recognition operation on the search sentence to output an entity concept of the search sentence. The semantic recognition model may, for example, be based on a pre-trained language model, and may, for example, include BERT, ERNIE, etc.

[0076] According to embodiments of the present disclosure, in the case where the reference information contains a qualifier, the reference information can be pre-split into a concept word and a qualifier.

[0077] Based on this, operation S330 can further include determining whether each candidate entity in the plurality of candidate entities matches the qualifier. Then candidate entities that do not match the qualifier are deleted from the plurality of candidate entities to obtain at least one target entity.

[0078] In operation S340, in the case where the target entity is multiple, the plurality of target entities are filtered.

[0079] According to embodiments of the present disclosure, the number of views and / or the similarity of target entities other than the first target entity in the plurality of target entities can be obtained, for example. Then the other target entities are filtered according to the number of views and / or the similarity. For example, target entities other than the first target entity can be filtered out, which have a daily number of views lower than a number of views threshold or a similarity lower than a similarity threshold. The number of views threshold and the similarity threshold can be set as needed.

[0080] According to embodiments of the present disclosure, if the number of target entities obtained after filtering the plurality of candidate entities is greater than 1, it means that there are multiple entities that meet the condition, and the dispersed demand judgment can be entered.

[0081] Based on this, the demand characteristics of the user for the search sentence and the reference sentence can be mined for the user's demand judgment for the entity. The demand characteristics are used to determine whether multiple entities that are in high demand by users are contained in all target entities, and if so, it is determined that the input is a dispersed demand and the corresponding target entity is returned. The demand characteristics can be determined according to click characteristics, display characteristics, etc. in the search log of the user.

[0082] Reference will now be made to Figure 4The method for determining a target entity when the mentioned information is a knowledge tag category will be described in conjunction with specific embodiments. Those skilled in the art will understand that the following example embodiments are only for understanding this disclosure, and this disclosure is not limited thereto.

[0083] Figure 4 A flowchart illustrating a method for determining a target entity according to another embodiment of this disclosure is shown schematically.

[0084] like Figure 4 As shown, the determination of the target entity 400 may include operation S410, determining a first original entity in the knowledge base whose name information contains mention information and a second original entity whose description information contains mention information, and determining the first original entity and the second original entity as candidate entities.

[0085] The number of second original entities is greater than the number of first original entities.

[0086] In operation S420, multiple candidate entities are ranked based on character overlap or semantic similarity.

[0087] In operation S430, multiple candidate entities are verified, and candidate entities that fail the verification are filtered out to obtain at least one target entity.

[0088] In operation S440, when there are multiple target entities, multiple target entities are filtered.

[0089] According to the embodiments of this disclosure, operations S420 to S440 can be referred to above, for example, and will not be repeated here.

[0090] According to embodiments of this disclosure, when the mentioned information is a knowledge tag category, the retrieval of candidate entities places greater emphasis on fields such as descriptive information. For example, the number of entities retrieved in each path can be controlled, resulting in a larger number of entities retrieved from the descriptive information, thereby making the retrieval results more accurate.

[0091] The following is for reference. Figure 5 The method for determining a target entity when the mentioned information is a knowledge tag category will be described in conjunction with specific embodiments. Those skilled in the art will understand that the following example embodiments are only for understanding this disclosure, and this disclosure is not limited thereto.

[0092] Figure 5 A flowchart illustrating a method for determining a target entity according to another embodiment of this disclosure is shown schematically.

[0093] like Figure 5As shown, the method 500 of determining the target entity can comprise, at operation S510, determining a collection entity containing the mention information in the name information and / or the description information in the knowledge base.

[0094] At operation S520, the description information of the collection entity is subjected to an extraction operation with the retrieval sentence as the extraction target, to obtain a plurality of sub-entities as a plurality of candidate entities.

[0095] At operation S530, in the case of extraction failure, a plurality of entity samples containing the concept word and the qualifier in the name information and / or the description information in the knowledge base are determined.

[0096] At operation S540, the occurrence frequency of the qualifier in the relationship information of the plurality of entity samples is determined.

[0097] At operation S550, the target relationship is determined according to the relationship information with the highest occurrence frequency in the relationship information of the plurality of entity samples.

[0098] At operation S560, an entity containing the concept word in the concept attribute and the target relationship in the relationship information in the knowledge base is determined as a candidate entity.

[0099] According to an embodiment of the present disclosure, if the target relationship cannot be determined, an entity containing the concept word in the concept attribute and the qualifier in the description information in the knowledge base can be determined as a candidate entity.

[0100] At operation S570, the plurality of candidate entities are sorted based on the view count.

[0101] According to an embodiment of the present disclosure, for example, the daily view count of the plurality of candidate entities can be obtained, and the plurality of candidate entities can be sorted in descending order of the daily view count.

[0102] At operation S580, the plurality of candidate entities are verified, and the candidate entities that fail the verification are filtered out from the plurality of candidate entities, to obtain at least one target entity.

[0103] At operation S590, in the case of multiple target entities, the plurality of target entities are filtered.

[0104] According to an embodiment of the present disclosure, operations S580-S590 can refer to the above description and will not be described herein.

[0105] According to some other embodiments of the present disclosure, a pre-processing module can be pre-configured. In the present embodiment, the pre-processing module can include, for example, a mention classifier, a concept recognizer, and a mention splitter.

[0106] The mention classifier can be based on a semantic classification model Model_1, which can be used to classify the mention and implement policy shunting. The semantic classification model Model_1 can be pre-trained based on a BERT, ERNIE, or the like, for example.

[0107] The concept recognizer can be based on a semantic classification model Model_2, which can be used to identify the concept corresponding to the entity and can be used for subsequent knowledge verification filtering to help entity disambiguation. The semantic classification model Model_2 can be pre-trained based on a BERT, ERNIE, or the like, for example.

[0108] The mention splitter can be based on a sequence labeling model Model_3, which can be used to split the mention information into concept words and qualifier words and label them respectively. The sequence labeling model Model_3 can be pre-trained based on a BERT, ERNIE, or the like, for example.

[0109] Figure 6 A block diagram of an apparatus for retrieving an entity according to an embodiment of the present disclosure is schematically shown.

[0110] As shown in Figure 6 The apparatus 600 includes a semantic understanding module 610, a determination module 620, a retrieval module 630, and a screening module 640.

[0111] The semantic understanding module 610 is configured to perform semantic analysis on the retrieval sentence to obtain mention information.

[0112] The determination module 620 is configured to determine the category of the mention information.

[0113] The retrieval module 630 is configured to retrieve the mention information according to a retrieval strategy corresponding to the category to obtain a plurality of candidate entities.

[0114] The screening module 640 is configured to verify the plurality of candidate entities, and screen out candidate entities that fail to pass the verification from the plurality of candidate entities to obtain at least one target entity.

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

[0116] Figure 7A block diagram illustrating an example electronic device 700 that can be used to implement embodiments of the present disclosure is shown schematically. 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 the implementations of the present disclosure described and / or claimed in this document.

[0117] As shown in Figure 7 The device 700 includes a computing unit 701 that can perform various appropriate actions and processes in accordance with a computer program stored in a read-only memory (ROM) 702 or a computer program loaded into a random access memory (RAM) 703 from a storage unit 708. Various programs and data required for the operation of the device 700 can also be stored in the RAM 703. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0118] Various components in the device 700 are connected to the I / O interface 705, including an input unit 706, such as a keyboard, a mouse, and the like; an output unit 707, such as various types of displays, speakers, and the like; a storage unit 708, such as a magnetic disk, a magneto-optical disk, and the like; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, and the like. The communication unit 709 allows the device 700 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.

[0119] The computing unit 701 can be various general and / or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 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 suitable processor, controller, microcontroller, and the like. The computing unit 701 performs various methods and processes described above, such as the method of retrieving entities. For example, in some embodiments, the method of retrieving entities can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 708. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded onto the RAM 703 and executed by the computing unit 701, one or more steps of the method of retrieving entities described above can be performed. Alternatively, in other embodiments, the computing unit 701 can be configured to perform the method of retrieving entities by any other suitable means, such as by means of firmware.

[0120] 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 complex programmable logic device (CPLD), 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.

[0121] 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 the functions / operations specified in the flowcharts and / or the block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine as a stand-alone software package, partially on a machine and partially on a remote machine or entirely on a remote machine or server.

[0122] 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 would include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0123] 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.

[0124] 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), and the Internet.

[0125] The computing 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.

[0126] The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in a cloud computing service system to solve the defects of great management difficulty and weak business scalability in traditional physical hosts and VPS services (Virtual Private Server, or VPS for short). The server can also be a server of a distributed system, or a server combined with a blockchain.

[0127] It should be understood that the steps can be reordered, added, or deleted using the various forms of flow shown above. For example, the steps described in the present disclosure can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions of the present disclosure can be achieved, and the present disclosure is not limited herein.

[0128] 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 retrieving an entity, comprising: performing a semantic understanding operation on a retrieval sentence to obtain mention information, wherein the mention information comprises a main entity mention segment; determining a category of the mention information, wherein the category comprises a list category; retrieving the mention information according to a retrieval strategy corresponding to the category to obtain a plurality of candidate entities; and verifying the plurality of candidate entities and filtering out candidate entities that fail to pass the verification from the plurality of candidate entities to obtain at least one target entity; wherein the retrieving the mention information according to the retrieval strategy corresponding to the category to obtain the plurality of candidate entities comprises, in a case where the mention information is of the list category, in response to a failure to extract an entity from a knowledge base based on the mention information, splitting the mention information into a concept word and a qualifier; determining a plurality of entity samples in the knowledge base whose name information and / or description information contain the concept word and the qualifier; determining a frequency of occurrence of the qualifier in relationship information of the plurality of entity samples; determining a target relationship according to relationship information in which the frequency of occurrence is highest among the relationship information of the plurality of entity samples; and determining, as the candidate entity, an entity in the knowledge base whose concept attribute contains the concept word and whose relationship information contains the target relationship.

2. The method of claim 1, wherein, The category further comprises a regular category and a knowledge label category.

3. The method of claim 2, wherein, The retrieving the mention information according to the retrieval strategy corresponding to the category to obtain the plurality of candidate entities comprises: in a case where the mention information is of the regular category, determining, as the candidate entity, an entity in a knowledge base whose name information and / or description information contain the mention information.

4. The method of claim 2, wherein, The retrieving the mention information according to the retrieval strategy corresponding to the category to obtain the plurality of candidate entities comprises: in a case where the mention information is of the knowledge label category, determining, in a knowledge base, a first original entity whose name information contains the mention information and a second original entity whose description information contains the mention information, wherein a quantity of the second original entities is greater than a quantity of the first original entities; and determining, as the candidate entity, the first original entity and the second original entity.

5. The method of claim 2, wherein, The retrieving the mention information according to the retrieval strategy corresponding to the category to obtain the plurality of candidate entities comprises: in a case where the mention information is of the list category, determining, in a knowledge base, a set entity whose name information and / or description information contain the mention information; and performing an extraction operation on description information of the set entity with the retrieval sentence as an extraction target to obtain a plurality of sub-entities as the plurality of candidate entities.

6. The method of claim 1, wherein, The retrieving the mention information according to the retrieval strategy corresponding to the category to obtain the plurality of candidate entities comprises: in a case where the mention information is of the list category, determining, in a knowledge base, an entity whose concept attribute contains the concept word and whose description information contains the qualifier as the candidate entity.

7. The method of claim 3 or 4, further comprising: For a first candidate entity of the plurality of candidate entities determined according to name information, determine a character coincidence degree between the first candidate entity and the mention information; rank the first candidate entity according to the character coincidence degree; For a second candidate entity of the plurality of candidate entities determined according to description information, determine a semantic similarity between the second candidate entity and the mention information; and rank the second candidate entity according to the semantic similarity.

8. The method of claim 5 or 6, further comprising: determining a browsing volume of each candidate entity of the plurality of candidate entities; and ranking the plurality of candidate entities according to the browsing volume. The checking the plurality of candidate entities and filtering out candidate entities of the plurality of candidate entities that fail the checking to obtain at least one target entity comprises:

9. The method of claim 1, wherein, performing semantic recognition on the search sentence to obtain an entity concept of the search sentence; determining whether each candidate entity of the plurality of candidate entities matches the entity concept; and deleting candidate entities of the plurality of candidate entities that do not match the entity concept to obtain the at least one target entity. The checking the plurality of candidate entities and filtering out candidate entities of the plurality of candidate entities that fail the checking to obtain at least one target entity comprises:

10. The method of claim 1, wherein, determining whether each candidate entity of the plurality of candidate entities matches the determiner; and deleting candidate entities of the plurality of candidate entities that do not match the determiner to obtain the at least one target entity.

11. The method of claim 1, further comprising: in a case where the target entity is a plurality of target entities, obtaining a browsing volume and / or a similarity of target entities other than a first target entity of the plurality of target entities; and filtering the other target entities according to the browsing volume and / or the similarity.

12. The method of claim 11, further comprising: in a case where there are a plurality of target entities after the filtering, obtaining a demand feature of each target entity; and deleting target entities of the plurality of target entities that do not meet a requirement in terms of the demand feature.

13. An apparatus for searching for an entity, comprising: a semantic understanding module configured to perform semantic analysis on a search sentence to obtain mention information, wherein the mention information comprises a main entity mention segment; a determination module configured to determine a category of the mention information, wherein the category comprises a list category; a search module configured to search for mention information according to a search strategy corresponding to the category to obtain a plurality of candidate entities; and a screening module configured to check the plurality of candidate entities and filter out candidate entities of the plurality of candidate entities that fail the checking to obtain at least one target entity. ​ ​ The retrieval module is configured to, in a case where the mention information is of a list type, in response to failure of extracting an entity from a knowledge base based on the mention information, split the mention information into a concept word and a qualifier; determine a plurality of entity samples containing the concept word and the qualifier in name information and / or description information in the knowledge base; determine a frequency of occurrence of the qualifier in relationship information of the plurality of entity samples; determine a target relationship according to relationship information in which the frequency of occurrence is highest among the relationship information of the plurality of entity samples; and determine an entity in which a concept attribute contains the concept word and relationship information contains the target relationship in the knowledge base as the candidate entity. 14.An electronic device, comprising: at least one processor; and a memory connected to the at least one processor in communication; wherein 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 claims 1-12.

15. A non-transitory computer readable storage medium having stored thereon computer instructions, wherein, The computer instructions are used to enable the computer to perform the method of any one of claims 1-12.

16. A computer program product comprising computer programs / instructions, characterized in that, The computer program / instructions, when executed by a processor, implement the steps of the method of any one of claims 1-12.

Citation Information

Patent Citations

  • Question processing method and device based on knowledge base, equipment, medium and product

    CN112966089A