A method, apparatus, device, and storage medium for retrieving data information

Through the information extraction model, data information search statements are analyzed, combined with keyword and knowledge graph retrieval, the problem that existing systems cannot understand user needs is solved, and higher search accuracy and personalized recommendations are achieved.

CN115687572BActive Publication Date: 2025-08-01BEIJING CHINA POWER INFORMATION TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211349639.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-31
Publication Date
2025-08-01
Estimated Expiration
2042-10-31

AI Technical Summary

Technical Problem

The existing data information retrieval system cannot accurately understand the user's retrieval needs, and the retrieval accuracy is not high, so it cannot meet the personalized and customized results recommendations.

Method used

The information extraction model is used to analyze the data information search statements, extract entities, entity relationships and entity attributes, combine keyword search and knowledge graph search, and search using semantic and logical relationships.

Benefits of technology

It improves the accuracy of the search results, makes the search results more consistent with user needs, and improves the accuracy of the search.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115687572B_ABST
    Figure CN115687572B_ABST
Patent Text Reader

Abstract

The present application provides a method, apparatus, device and storage medium for retrieving data information, which is applicable to the field of natural language processing technology. The method includes: obtaining a data information retrieval statement; inputting the data information retrieval statement into an information extraction model to obtain entities in the data information retrieval statement, as well as the entity relationships of the entities and the entity attributes of the entities; performing keyword retrieval in a database according to the entities and entity attributes to obtain a keyword retrieval result; performing knowledge graph retrieval in the database according to the entities and entity relationships to obtain a knowledge graph retrieval result; and jointly displaying the keyword retrieval result and the knowledge graph retrieval result. After extracting natural language by using an information extraction model, performing keyword retrieval and knowledge graph retrieval respectively can perform retrieval based on semantic and logical relationships, making the retrieval result more matching with the question, and then accurately feedback data to the user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of natural language processing technology, and in particular, to a method, apparatus, device, and storage medium for retrieving data information. Background Art

[0002] In recent years, the emergence of the digital economy development wave has brought new changes to people's lives. In the era of massive information, the ways to obtain information and the information that can be obtained are increasing. However, while screening and filtering out useless information among these information oceans to identify the actual information needed, the retrieval cost has inadvertently increased.

[0003] As an important tool for obtaining specific data, data information retrieval requires higher professionalism and should complete personalized and customized result retrieval and recommendation according to user needs. However, most current retrieval systems cannot accurately understand users' retrieval needs and have low retrieval accuracy. Summary of the Invention

[0004] In view of this, embodiments of this application provide a method, apparatus, device, and storage medium for retrieving data information, aiming to meet users' retrieval needs and improve the accuracy of retrieval results.

[0005] In a first aspect, embodiments of this application provide a method for retrieving data information, the method including:

[0006] Obtain a data information retrieval statement;

[0007] Input the data information retrieval statement into an information extraction model to obtain entities in the data information retrieval statement, as well as the entity relationships and entity attributes of the entities. The information extraction model includes a semantic parsing module, an encoding module, and a decoding module. The semantic parsing module is used to parse the data information retrieval statement to obtain dynamic word vectors, the encoding module is used to encode the dynamic word vectors to obtain encoded features, and the decoding module is used to decode the encoded features to obtain entities, the entity relationships, and the entity attributes;

[0008] Perform keyword retrieval in the database according to the entities and the entity attributes to obtain a keyword retrieval result;

[0009] Perform knowledge graph retrieval in the database according to the entities and the entity relationships to obtain a knowledge graph retrieval result;

[0010] Jointly display the keyword retrieval result and the knowledge graph retrieval result.

[0011] Optionally, the training process of the information extraction model is as follows:

[0012] Obtain sample data, where the sample data includes semi-structured data, unstructured data, and structured data;

[0013] Perform data preprocessing on the sample data to obtain target data, where the data preprocessing includes manual annotation and document supplementary annotation;

[0014] Input the target data into the model to be trained, and obtain the target entities, target entity relationships, and target entity attributes output by the model to be trained. The model to be trained includes a semantic parsing module, an encoding module, and a decoding module;

[0015] Determine whether the target entities, the target entity relationships, and the target entity attributes meet the preset conditions;

[0016] If they meet the conditions, use the model to be trained as an information extraction model;

[0017] If they do not meet the conditions, adjust the model to be trained, and re-input the target data into the model to be trained until the target entities, the target entity relationships, and the target entity attributes meet the preset conditions, and use the model to be trained as an information extraction model.

[0018] Optionally, performing data preprocessing on the sample data to obtain target data includes:

[0019] Perform manual annotation on the sample data to obtain initially annotated sample data;

[0020] Perform document supplementary annotation on the initially annotated sample data to obtain supplementary annotated sample data;

[0021] Detect the supplementary annotated sample data, and determine whether the supplementary annotated sample data meets the preset standard;

[0022] If it meets the conditions, use the supplementary annotated sample data as the target data;

[0023] If it does not meet the conditions, perform document supplementary annotation on the supplementary annotated sample data again until the supplementary annotated sample data meets the preset standard, and use the supplementary annotated sample data as the target data.

[0024] Optionally, performing keyword retrieval in the database according to the entity and the entity attribute to obtain a keyword retrieval result includes:

[0025] Perform index query in the database according to the entity and the entity attribute to obtain a query result list, where the query result list is a list including at least two query results;

[0026] Score each query result in the query result list according to a scoring algorithm to obtain the scores of each query result;

[0027] Re - sort according to the scores of the respective query results to obtain keyword retrieval results.

[0028] Optionally, the construction process of the database includes:

[0029] Perform entity linking on the target entities extracted from the semi - structured data and the unstructured data with the entities in the knowledge base;

[0030] Perform knowledge merging on the target entities extracted from the structured data with the entities in the knowledge base;

[0031] Construct the database according to the knowledge base.

[0032] Optionally, the keyword retrieval uses distributed full - text retrieval technology.

[0033] Optionally, the knowledge graph retrieval uses Neo4j retrieval technology.

[0034] In a second aspect, an embodiment of the present application provides a data information retrieval device, and the device includes:

[0035] An acquisition module, configured to acquire a data information retrieval statement;

[0036] An information extraction module, configured to input the data information retrieval statement into an information extraction model to obtain the entities in the data information retrieval statement, as well as the entity relationships and entity attributes of the entities. The information extraction model includes a semantic parsing module, an encoding module, and a decoding module. The semantic parsing module is configured to parse the data information retrieval statement to obtain dynamic word vectors, the encoding module is configured to encode the dynamic word vectors to obtain encoded features, and the decoding module is configured to decode the encoded features to obtain the entities, the entity relationships, and the entity attributes;

[0037] A keyword retrieval module, configured to perform keyword retrieval in the database according to the entities and the entity attributes to obtain keyword retrieval results;

[0038] A knowledge graph retrieval module, configured to perform knowledge graph retrieval in the database according to the entities and the entity relationships to obtain knowledge graph retrieval results;

[0039] A display module, configured to jointly display the keyword retrieval results and the knowledge graph retrieval results.

[0040] Optionally, the training process of the information extraction model is as follows:

[0041] An acquisition unit for acquiring sample data, where the sample data includes semi-structured data, unstructured data, and structured data;

[0042] A processing unit for performing data preprocessing on the sample data to obtain target data, where the data preprocessing includes manual annotation and document supplementary annotation;

[0043] An input unit for inputting the target data into a model to be trained, and obtaining a target entity, a target entity relationship, and target entity attributes output by the model to be trained. The model to be trained includes a semantic parsing module, an encoding module, and a decoding module;

[0044] A judgment unit for judging whether the target entity, the target entity relationship, and the target entity attributes meet preset conditions; if they meet, using the model to be trained as an information extraction model; if they do not meet, adjusting the model to be trained, and re-inputting the target data into the model to be trained until the target entity, the target entity relationship, and the target entity attributes meet the preset conditions, and using the model to be trained as an information extraction model.

[0045] Optionally, the processing unit is specifically configured to perform manual annotation on the sample data to obtain initially annotated sample data; perform document supplementary annotation on the initially annotated sample data to obtain supplemented annotated sample data; detect the supplemented annotated sample data to judge whether the supplemented annotated sample data meets a preset standard; if it meets, using the supplemented annotated sample data as the target data; if it does not meet, performing document supplementary annotation on the supplemented annotated sample data again until the supplemented annotated sample data meets the preset standard, and using the supplemented annotated sample data as the target data.

[0046] Optionally, the keyword retrieval module is specifically configured to perform index query in the database according to the entity and the entity attributes to obtain a query result list, where the query result list is a list including at least two query results; score each query result in the query result list according to a scoring algorithm to obtain the scores of each query result; reorder according to the scores of each query result to obtain a keyword retrieval result.

[0047] Optionally, the construction process of the database includes:

[0048] Performing entity linking on the target entities extracted from the semi-structured data and the unstructured data and the entities in the knowledge base;

[0049] Performing knowledge merging on the target entities extracted from the structured data and the entities in the knowledge base;

[0050] Constructing the database according to the knowledge base.

[0051] Optionally, the keyword retrieval uses distributed full-text retrieval technology.

[0052] Optionally, the knowledge graph retrieval uses Neo4j retrieval technology.

[0053] In a third aspect, an embodiment of the present application provides a device, which includes a memory and a processor. The memory is used to store instructions or codes, and the processor is used to execute the instructions or codes so that the device executes the retrieval method of the data information described in any one of the foregoing first aspects.

[0054] In a fourth aspect, an embodiment of the present application provides a computer storage medium, in which codes are stored. When the codes are run, the device running the codes implements the retrieval method of the data information described in any one of the foregoing first aspects.

[0055] An embodiment of the present application provides a retrieval method for data information. When executing this method, first obtain a data information retrieval statement; then, input the data information retrieval statement into an information extraction model to obtain the entities in the data information retrieval statement, as well as the entity relationships and entity attributes of the entities; and then perform keyword retrieval in the database according to the entities and entity attributes to obtain a keyword retrieval result, perform knowledge graph retrieval in the database according to the entities and entity relationships to obtain a knowledge graph retrieval result, and finally, jointly display the keyword retrieval result and the knowledge graph retrieval result. In this way, through the information extraction model, entities, entity relationships and entity attributes can be accurately extracted from the data information retrieval statement, fully understanding the semantic content, and then performing keyword retrieval and knowledge graph retrieval respectively, and performing retrieval based on semantic understanding and logical judgment, so that the retrieval result is more matched with the user's question and the accuracy of the retrieval result is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] To more clearly illustrate the technical solutions in this embodiment or the prior art, the following will briefly introduce the drawings required for the description of the embodiment or the prior art. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0057] Figure 1 It is a flowchart of a retrieval method for data information provided by an embodiment of the present application;

[0058] Figure 2 It is a schematic diagram of an information extraction model provided by an embodiment of the present application;

[0059] Figure 3Schematic diagram of a device for retrieving data information provided by an embodiment of the present application. Detailed implementation manners

[0060] As an important way to obtain specific data, data information retrieval not only requires a full understanding of the user's question, but also needs to ensure the accuracy of the retrieval results.

[0061] Currently, most use full-text search engines and directory search engines. Among them, the full-text search engine is built based on a large amount of web page data, integrating data crawling, content analysis, index building, and matching queries. However, this retrieval method does not fully parse the semantics of specific fields and cannot meet the user's needs. The directory search engine collects, classifies, and stores websites, and can parse natural language layer by layer according to the classification directory. However, this search method cannot guarantee the accuracy of the retrieval results.

[0062] In view of the above technical problems, the present application provides a data information retrieval method, device, equipment, and storage medium. After obtaining the data information retrieval statement, the data information retrieval statement is input into the information extraction model, and the information extraction model is used to parse the data information retrieval statement to extract entities, entity relationships, and entity attributes; then keyword retrieval and knowledge graph retrieval are respectively performed. Among them, keyword retrieval can perform retrieval based on semantics, and knowledge graph retrieval can perform retrieval based on logical relationships, so that the retrieval results are more matching with the user's needs and have higher accuracy.

[0063] Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative efforts shall fall within the protection scope of the present application.

[0064] See Figure 1 , Figure 1 Flowchart of a data information retrieval method provided by an embodiment of the present application, including:

[0065] S101: Obtain a data information retrieval statement.

[0066] The data information retrieval statement is the query statement input by the user and is in natural language. Specifically, the content that the user wants to query can be obtained through the search box. For example, when the user enters "the model of the radiator" in the search box, the data information retrieval statement can be obtained through the search box. The data information retrieval statement can also be obtained through a device or apparatus with voice conversion function. For example, the user says, "I want to query the model of the radiator". After the voice information is obtained, the voice information is converted into text information, and then the data information retrieval statement can be obtained. Other obtaining methods are not listed one by one here and can be specifically selected according to the actual situation. The above obtaining methods are only examples and do not limit the protection scope of this application.

[0067] S102: Input the data information retrieval statement into the information extraction model to obtain the entities in the data information retrieval statement, as well as the entity relationships of the entities and the entity attributes of the entities.

[0068] See Figure 2 , Figure 2 , which is a schematic diagram of an information extraction model provided by an embodiment of this application. The information extraction model includes a semantic parsing module, an encoding module, and a decoding module. Among them, the semantic parsing module is used to parse the data information retrieval statement to obtain dynamic word vectors, the encoding module is used to encode the dynamic word vectors to obtain encoded features, and the decoding module is used to decode the encoded features to obtain entities, entity relationships, and entity attributes.

[0069] After the data information retrieval statement is obtained, the data information retrieval statement is input into the information extraction model for extraction. The semantic parsing module parses the data information statement to obtain the corresponding words, and represents the words as word vectors to obtain dynamic word vectors. Specifically, the BERT model (Bidirectional Encoder Representations from Transformer) can be used for parsing. It should be noted that compared with the static word vector model output by the traditional model, the dynamic word vector has greater advantages in Chinese sentence parsing and can express different semantics in different contexts. The encoding module encodes the dynamic word vectors to obtain the corresponding encoded features. Specifically, the BiLSTM model (Bi-directional Long Short-Term Memory) can be used for encoding. The decoding module decodes the feature encoding to obtain the optimal sequence, that is, the entities, entity relationships, and entity attributes corresponding to the data information retrieval statement.

[0070] The training method of the information extraction model will be described in detail below.

[0071] S103: Perform keyword retrieval in the database according to the entities and the entity attributes to obtain the keyword retrieval result.

[0072] Perform keyword retrieval based on entities and entity attributes, and retrieve the database based on semantic content to obtain corresponding keyword retrieval results. Specifically, distributed full-text retrieval technology can be used.

[0073] In a feasible implementation provided by the present application, the performing keyword retrieval in the database according to the entity and the entity attributes to obtain a keyword retrieval result includes:

[0074] Perform index query in the database according to the entity and the entity attributes to obtain a query result list, where the query result list is a list including at least two query results;

[0075] Score each query result in the query result list according to a scoring algorithm to obtain the scores of each query result;

[0076] Reorder according to the scores of the respective query results to obtain a keyword retrieval result.

[0077] Performing index query in the database using entities and entity attributes to obtain at least two query results, and representing the query results in the form of a list, which is the query result list. Specifically, the index query can be performed using the mapping relationship between entities, entity attributes and the data in the database. Score each query result in the query result list. Specifically, weighted scoring can be performed according to the number of occurrences of each result, reference value and content length to obtain the score of each query result. And reorder each query result according to the score to obtain a keyword retrieval result. To recommend highly relevant results to customers.

[0078] S104: Perform knowledge graph retrieval in the database according to the entity and the entity relationship to obtain a knowledge graph retrieval result.

[0079] The knowledge graph retrieval result is to represent the retrieval result in the form of a knowledge graph. Perform knowledge graph retrieval according to entities and entity relationships, and retrieve the database based on logical relationships to obtain corresponding knowledge graph retrieval results. Specifically, Neo4j technology can be used. Neo4j technology can support efficient query of graph data.

[0080] S105: Jointly display the keyword retrieval result and the knowledge graph retrieval result.

[0081] The keyword retrieval result is generally presented in the form of a web page. The knowledge graph retrieval result is generally represented in the form of a graph, including an entity relationship portrait, data results and relevant information of other entities related to the entity. By jointly displaying the keyword retrieval result and the knowledge graph retrieval result, users can more intuitively understand the retrieval result and facilitate viewing by users.

[0082] A method for retrieving data information provided by this application. After obtaining a data information retrieval statement, the data information retrieval statement is input into an information extraction model, and the information extraction model is used to parse the data information retrieval statement to extract entities, entity relationships, and entity attributes; then keyword retrieval and knowledge graph retrieval are performed respectively, where keyword retrieval can be performed based on semantics, and knowledge graph retrieval can be performed based on logical relationships, so that the retrieval result is more matched with the user's needs and has higher accuracy.

[0083] The training process of the information extraction model will be described below. It should be noted that the implementation methods given in the following descriptions are only illustrative and do not represent all implementation methods of the embodiments of this application.

[0084] Step 1: Obtain sample data.

[0085] The sample data includes semi-structured data, unstructured data, and structured data. The sample data can be obtained from an open-source database and can be data in a professional field.

[0086] Step 2: Perform data preprocessing on the sample data to obtain target data.

[0087] The data preprocessing includes manual annotation and document supplementary annotation. Manual annotation is to manually annotate unstructured data text; document supplementary annotation is to annotate professional data in the text. Taking the data in the power field as an example, manual annotation and document supplementary annotation are performed on the sample data. Manual annotation is performed on the unstructured data text, and moreover, due to the professionalism and diversity of the data in the power field, traditional annotation engineers cannot directly understand and annotate the document data, so systematic document supplementary annotation is also performed on the data text to ensure the accuracy of data annotation.

[0088] In a feasible implementation manner provided by this application, the performing data preprocessing on the sample data to obtain target data includes:

[0089] Perform manual annotation on the sample data to obtain initially annotated sample data;

[0090] Perform document supplementary annotation on the initially annotated sample data to obtain supplementary annotated sample data;

[0091] Detect the supplementary annotated sample data to determine whether the supplementary annotated sample data meets the preset standard;

[0092] If it meets the standard, use the supplementary annotated sample data as the target data;

[0093] If not satisfied, perform document supplementary annotation on the supplementary annotated sample data until the supplementary annotated sample data meets the preset standard, and use the supplementary annotated sample data as the target data.

[0094] By performing manual annotation on the sample data, the initially annotated sample data is obtained. Then, document supplementary annotation is performed on the initially annotated sample data to obtain the supplementary annotated sample data, and the supplementary annotated sample data is detected to determine whether it meets the preset standard. Among them, the preset standard can be that the annotation accuracy is greater than the threshold. When the supplementary annotated sample data meets the preset standard, the supplementary annotated sample data is directly used as the target data. If the supplementary annotated sample data does not meet the preset standard, document supplementary annotation is performed again until the supplementary annotated sample data meets the preset standard. Through the above data preprocessing, the accuracy of annotating the sample data can be improved, and thus the accuracy of the result output by the information extraction model can be improved.

[0095] Step 3: Input the target data into the model to be trained, and obtain the target entities, target entity relationships, and target entity attributes output by the model to be trained.

[0096] The model to be trained includes a semantic parsing module, an encoding module, and a decoding module. After obtaining the target data, the target data is input into the model to be trained for training. The semantic parsing module parses the target data to obtain the corresponding words, and performs word vector representation on the words to obtain dynamic word vectors. The encoding module encodes the dynamic word vectors to obtain the corresponding encoded features. The decoding module decodes the feature encoding to output the target entities, target entity relationships, and target entity attributes.

[0097] Step 4: Determine whether the target entities, the target entity relationships, and the target entity attributes meet the preset conditions.

[0098] The preset conditions can be set by technicians according to the actual situation. As an example, the preset condition is that the error between the result output by the model to be trained and the standard result is less than the threshold. The preset conditions can represent the minimum requirements for the accuracy of the result output by the information extraction model. By determining whether the target entities, target entity relationships, and target entity attributes meet the preset conditions, it is determined whether the accuracy of the result output by the current model to be trained meets the minimum requirements.

[0099] Step 5: If satisfied, use the model to be trained as the information extraction model.

[0100] If the result output by the model to be trained meets the preset conditions, it indicates that the accuracy of information extraction of the current model to be trained meets the requirements, and the current model to be trained can be used as the information extraction model.

[0101] Step 6: If not satisfied, adjust the to-be-trained model and return to Step 2 until the target entity, the target entity relationship, and the target entity attributes meet the preset conditions, and use the to-be-trained model as the information extraction model.

[0102] If the result output by the to-be-trained model does not meet the preset conditions, it indicates that the accuracy of information extraction of the current to-be-trained model does not meet the requirements. Adjust the to-be-trained model according to the output result, and re-execute Step 2 until the result output by the to-be-trained model meets the preset conditions, and use the to-be-trained model as the information extraction model.

[0103] Through the above training method, an information extraction model is obtained, which has a high accuracy in the output result of extracting data information retrieval statements, and thus can improve the accuracy of retrieval.

[0104] In addition, the sample data provided in this application includes structured data, semi-structured data, and unstructured data. For the sample data, an embodiment of constructing a database is also provided, which is specifically as follows:

[0105] Perform entity linking on the target entities extracted from the semi-structured data and the unstructured data and the entities in the knowledge base;

[0106] Perform knowledge merging on the target entities extracted from the structured data and the entities in the knowledge base;

[0107] Construct the database according to the knowledge base.

[0108] In the embodiments of this application, a method of knowledge fusion can be used to construct a database, where knowledge fusion includes entity linking and knowledge merging. The sample data includes structured data, semi-structured data, and unstructured data. Perform entity linking on the target entities extracted from the semi-structured data and the unstructured data and the entities in the knowledge base to establish the corresponding relationship between the semi-structured data and the unstructured data and the knowledge base; perform knowledge merging on the target entities extracted from the structured data and the entities in the knowledge base to establish the corresponding relationship between the structured data and the knowledge base. So far, the corresponding relationships between the unstructured data, the semi-structured data, and the structured data and the knowledge base have been established. Construct a database according to the knowledge base, and a database corresponding to the sample data can be obtained.

[0109] Through the above method of constructing a database, a database corresponding to the sample data is established with the same structural format, which can improve the retrieval speed in the database.

[0110] The above are some specific implementation manners of the information data retrieval method provided in the embodiments of this application. Based on this, this application also provides a corresponding device. Next, the device provided in the embodiments of this application will be introduced from the perspective of functional modularization.

[0111] See Figure 3 The structural schematic diagram of the retrieval device 300 for information data shown in the figure. The device 300 includes an acquisition module 301, an information extraction module 302, a keyword retrieval module 303, a knowledge graph retrieval module 304, and a display module 305.

[0112] The acquisition module 301 is used to acquire a data information retrieval statement;

[0113] The information extraction module 302 is used to input the data information retrieval statement into an information extraction model to obtain entities in the data information retrieval statement, as well as the entity relationships and entity attributes of the entities. The information extraction model includes a semantic parsing module, an encoding module, and a decoding module. The semantic parsing module is used to parse the data information retrieval statement to obtain dynamic word vectors, the encoding module is used to encode the dynamic word vectors to obtain encoded features, and the decoding module is used to decode the encoded features to obtain entities, the entity relationships, and the entity attributes;

[0114] The keyword retrieval module 303 is used to perform keyword retrieval in the database according to the entities and the entity attributes to obtain a keyword retrieval result;

[0115] The knowledge graph retrieval module 304 is used to perform knowledge graph retrieval in the database according to the entities and the entity relationships to obtain a knowledge graph retrieval result;

[0116] The display module 305 is used to jointly display the keyword retrieval result and the knowledge graph retrieval result.

[0117] In a feasible implementation manner provided by the present application, the training process of the information extraction model is as follows:

[0118] An acquisition unit is used to acquire sample data, and the sample data includes semi-structured data, unstructured data, and structured data;

[0119] A processing unit is used to perform data preprocessing on the sample data to obtain target data, and the data preprocessing includes manual annotation and document supplementary annotation;

[0120] An input unit is used to input the target data into a model to be trained to obtain target entities, target entity relationships, and target entity attributes output by the model to be trained. The model to be trained includes a semantic parsing module, an encoding module, and a decoding module;

[0121] A judgment unit, configured to judge whether the target entity, the target entity relationship, and the target entity attribute meet preset conditions; if so, use the to-be-trained model as an information extraction model; if not, adjust the to-be-trained model, re-input the target data into the to-be-trained model until the target entity, the target entity relationship, and the target entity attribute meet the preset conditions, and use the to-be-trained model as the information extraction model.

[0122] In a feasible implementation manner provided by the present application, the processing unit is specifically configured to perform manual annotation on the sample data to obtain initially annotated sample data; perform document re-annotation on the initially annotated sample data to obtain re-annotated sample data; perform detection on the re-annotated sample data to judge whether the re-annotated sample data meets a preset standard; if so, use the re-annotated sample data as the target data; if not, perform document re-annotation on the re-annotated sample data until the re-annotated sample data meets the preset standard, and use the re-annotated sample data as the target data.

[0123] In a feasible implementation manner provided by the present application, the keyword retrieval module is specifically configured to perform index query in the database according to the entity and the entity attribute to obtain a query result list, where the query result list is a list including at least two query results; score each query result in the query result list according to a scoring algorithm to obtain the scores of each query result; re-order according to the scores of each query result to obtain a keyword retrieval result.

[0124] In a feasible implementation manner provided by the present application, the construction process of the database includes:

[0125] Perform entity linking on the target entity extracted from the semi-structured data and the unstructured data with the entity in the knowledge base;

[0126] Perform knowledge merging on the target entity extracted from the structured data with the entity in the knowledge base;

[0127] Construct the database according to the knowledge base. [[ID= (20)]]

[0128] [ [ In a feasible implementation manner provided by the present application, the keyword retrieval uses a distributed full-text retrieval technology.

[0129] In a feasible implementation manner provided by the present application, the knowledge graph retrieval uses Neo4j retrieval technology.

[0130] A data information retrieval device provided by the present application. After obtaining a data information retrieval statement, the data information retrieval statement is input into an information extraction model, and the information extraction model is used to parse the data information retrieval statement to extract entities, entity relationships, and entity attributes; then keyword retrieval and knowledge graph retrieval are respectively performed, where keyword retrieval can be performed based on semantics, and knowledge graph retrieval can be performed based on logical relationships, so that the retrieval result is more matched with the user's needs and has higher accuracy.

[0131] The embodiments of the present application also provide corresponding devices and computer storage media for implementing the solutions provided by the embodiments of the present application.

[0132] Among them, the device includes a memory and a processor. The memory is used to store instructions or codes, and the processor is used to execute the instructions or codes so that the device executes the data information retrieval method described in any embodiment of the present application.

[0133] The computer storage medium stores codes. When the codes are run, the device running the codes implements the data information retrieval method described in any embodiment of the present application.

[0134] In the embodiments of the present application, the "first", "second" (if any) in the names such as "first" and "second" are only used as name identifiers and do not represent the first and second in order.

[0135] Through the description of the above embodiments, those skilled in the art can clearly understand that all or part of the steps in the above embodiment methods can be implemented by means of software plus a general hardware platform. Based on such an understanding, the technical solution of the present application can be embodied in the form of a software product. The computer software product can be stored in a storage medium, such as read-only memory (ROM) / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network communication device such as a router) to execute the methods described in each embodiment or some parts of the embodiments of the present application.

[0136] Each embodiment in this specification is described in a progressive manner. The same or similar parts between each embodiment can be referred to each other, and the key points of each embodiment are the differences from other embodiments. In particular, for the device embodiments, since they are basically similar to the method embodiments, they are described relatively simply, and the relevant parts can refer to the partial descriptions of the method embodiments. One can select some or all of the modules according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement without creative work.

[0137] The above are only exemplary embodiments of the present application and are not intended to limit the protection scope of the present application.

Claims

1. A method for retrieving data information, characterized in that, The method includes: Obtaining a data information retrieval statement; Inputting the data information retrieval statement into an information extraction model to obtain entities in the data information retrieval statement, as well as entity relationships and entity attributes of the entities. The information extraction model includes a semantic parsing module, an encoding module, and a decoding module. The semantic parsing module is used to parse the data information retrieval statement to obtain dynamic word vectors, the encoding module is used to encode the dynamic word vectors to obtain encoded features, and the decoding module is used to decode the encoded features to obtain entities, the entity relationships, and the entity attributes; Performing a keyword search in a database according to the entities and the entity attributes to obtain a keyword search result; Performing a knowledge graph search in the database according to the entities and the entity relationships to obtain a knowledge graph search result; Jointly displaying the keyword search result and the knowledge graph search result.

2. The method according to claim 1, wherein The training process of the information extraction model is as follows: Obtaining sample data, where the sample data includes semi-structured data, unstructured data, and structured data; Performing data preprocessing on the sample data to obtain target data, where the data preprocessing includes manual annotation and document supplementary annotation; Inputting the target data into a model to be trained to obtain target entities, target entity relationships, and target entity attributes output by the model to be trained. The model to be trained includes a semantic parsing module, an encoding module, and a decoding module; Judging whether the target entities, the target entity relationships, and the target entity attributes meet preset conditions; If they meet the conditions, using the model to be trained as the information extraction model; If they do not meet the conditions, adjusting the model to be trained, and re-inputting the target data into the model to be trained until the target entities, the target entity relationships, and the target entity attributes meet the preset conditions, and using the model to be trained as the information extraction model.

3. The method according to claim 2, wherein The performing data preprocessing on the sample data to obtain target data includes: Performing manual annotation on the sample data to obtain initially annotated sample data; Performing document supplementary annotation on the initially annotated sample data to obtain supplementary annotated sample data; Detecting the supplementary annotated sample data to judge whether the supplementary annotated sample data meets a preset standard; If it meets the conditions, using the supplementary annotated sample data as the target data; If it does not meet the conditions, performing document supplementary annotation on the supplementary annotated sample data again until the supplementary annotated sample data meets the preset standard, and using the supplementary annotated sample data as the target data.

4. The method according to claim 1, wherein The performing a keyword search in a database according to the entities and the entity attributes to obtain a keyword search result includes: Performing an index query in the database according to the entities and the entity attributes to obtain a query result list, where the query result list is a list including at least two query results; Scoring each query result in the query result list according to a scoring algorithm to obtain scores of each query result; Re-ordering according to the scores of each query result to obtain a keyword search result.

5. The method according to claim 2, wherein The construction process of the database includes: Perform entity linking between the target entities extracted from the semi-structured data and the unstructured data and the entities in the knowledge base; Perform knowledge merging between the target entities extracted from the structured data and the entities in the knowledge base; Construct the database according to the knowledge base.

6. The method according to claim 1, wherein The keyword retrieval uses distributed full-text retrieval technology.

7. The method according to claim 1, characterized in that The knowledge graph retrieval uses Neo4j retrieval technology.

8. A retrieval device for data information, characterized in that, The device includes: An acquisition module, configured to acquire a data information retrieval statement; An information extraction module, configured to input the data information retrieval statement into an information extraction model to obtain the entities in the data information retrieval statement, as well as the entity relationships and entity attributes of the entities. The information extraction model includes a semantic parsing module, an encoding module, and a decoding module. The semantic parsing module is configured to parse the data information retrieval statement to obtain dynamic word vectors, the encoding module is configured to encode the dynamic word vectors to obtain encoded features, and the decoding module is configured to decode the encoded features to obtain the entities, the entity relationships, and the entity attributes; A keyword retrieval module, configured to perform keyword retrieval in the database according to the entities and the entity attributes to obtain a keyword retrieval result; A knowledge graph retrieval module, configured to perform knowledge graph retrieval in the database according to the entities and the entity relationships to obtain a knowledge graph retrieval result; A display module, configured to jointly display the keyword retrieval result and the knowledge graph retrieval result.

9. A computer device, characterized in that, Includes: A memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the retrieval method of data information according to any one of claims 1-7 is implemented.

10. A computer-readable storage medium, characterized in that, Instructions are stored in the computer-readable storage medium. When the instructions run on the terminal device, the terminal device is caused to execute the retrieval method of data information according to any one of claims 1-7.

Citation Information

Patent Citations

  • Session processing method and device, electronic equipment and storage medium

    CN111159376A

  • Database query method and device

    US20160275148A1