Information retrieval method and device, equipment and medium

By constructing a knowledge graph and integrating community summaries, the method addresses the limitations of LLMs in integrating information across large document collections, achieving more comprehensive and accurate retrieval results.

CN119202166APending Publication Date: 2024-12-27SHENZHEN QIANHAI HUANRONG LIANYI INFORMATION TECHNOLOGY SERVICES CO LTD

Patent Information

Application Number
CN202411242922.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-05
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

Existing Large Language Models (LLMs) struggle with integrating information from different sources and performing poorly on global understanding tasks, leading to low-quality and incomplete retrieval results when faced with problems requiring aggregation across large document collections.

Method used

Construct a knowledge graph based on a configured data source, divide nodes into communities according to dimensions, generate community summaries, and integrate response data from each community to enhance retrieval accuracy and comprehensiveness.

Benefits of technology

Enhances retrieval results by providing holistic understanding and accurate, multi-dimensional information integration, outperforming traditional methods in terms of comprehensiveness and diversity, especially with smaller context windows.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119202166A_ABST
    Figure CN119202166A_ABST
Patent Text Reader

Abstract

The invention relates to an artificial intelligence technology, and provides an information retrieval method and device, equipment and a medium, on one hand, a knowledge graph is constructed based on a configuration data source, community division and community summarization are performed on nodes in the knowledge graph according to configuration dimensions, scattered information points can be connected, and the information retrieval efficiency is improved; overall understanding is provided for a large-scale document set or a long document, and under the condition that general retrieval needs to be carried out in a cross-document or cross-theme mode, the defects of processing a global problem are overcome; on the other hand, the retrieval condition is used as an initial cue word of the information retrieval model, the community summary of each community is used as a knowledge base of the information retrieval model for retrieval to obtain response data of each community, and the response data of each community is fused to the initial cue word to obtain a target cue word; the target cue word obtained after fusion is used for retrieval to obtain the retrieval result, the retrieval result covering multiple angles and dimensions in original information can be provided, and the retrieval result is more comprehensive and accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to an information retrieval method, device, equipment and medium. Background Art

[0002] Currently, Large Language Models (LLM) are widely used in various text analysis tasks. Traditional RAG (Retrieval-augmented Generation) technology retrieves relevant information from external knowledge sources and adds it as context to the large language model to generate answers. However, when faced with problems that require global understanding across the entire text corpus, traditional RAG methods often perform poorly because such problems are essentially query-focused summarization (QFS) tasks, not just simple information retrieval tasks.

[0003] Therefore, when using existing large language models for information retrieval, if answering questions requires integrating information from different sources through shared attributes, existing large language models will find it difficult to connect scattered information points; when faced with global problems that require aggregating information from a large collection of documents to form an answer, existing large language models also perform poorly. Summary of the invention

[0004] The embodiments of the present application provide an information retrieval method, apparatus, device and medium, which are intended to solve the problem of low quality and accuracy of retrieval results and insufficient integrity of original information in the retrieval results when it is necessary to integrate information from different sources through shared attributes, or when facing a global problem of needing to aggregate information from a large number of document collections for retrieval.

[0005] In a first aspect, an embodiment of the present application provides an information retrieval method, which includes:

[0006] In response to an information retrieval instruction based on a configuration data source, construct a knowledge graph based on the configuration data source;

[0007] Dividing the nodes in the knowledge graph into communities according to the configuration dimension to obtain at least one community;

[0008] Generate a community summary for each community;

[0009] Parsing the information retrieval instruction to obtain retrieval conditions;

[0010] Using the search conditions as initial prompt words of the information retrieval model and using the community summary of each community as the knowledge base of the information retrieval model to perform retrieval and obtain response data of each community;

[0011] The response data of each community is integrated into the initial prompt word to obtain the target prompt word;

[0012] Based on the target prompt word, the configuration data source is used as the knowledge base of the information retrieval model to perform a search to obtain a search result.

[0013] In a second aspect, an embodiment of the present application provides an information retrieval device, which includes:

[0014] A construction unit, configured to respond to an information retrieval instruction based on a configuration data source and to construct a knowledge graph based on the configuration data source;

[0015] A partitioning unit, configured to partition the nodes in the knowledge graph into communities according to a configuration dimension to obtain at least one community;

[0016] A generation unit, used to generate a community summary for each community;

[0017] A parsing unit, used for parsing the information retrieval instruction to obtain a retrieval condition;

[0018] A retrieval unit, used to use the retrieval conditions as initial prompt words of the information retrieval model and the community summary of each community as the knowledge base of the information retrieval model to perform retrieval and obtain response data of each community;

[0019] A fusion unit, used for fusing the response data of each community into the initial prompt word to obtain a target prompt word;

[0020] The retrieval unit is further used to perform retrieval based on the target prompt word and use the configuration data source as the knowledge base of the information retrieval model to obtain a retrieval result.

[0021] In a third aspect, an embodiment of the present application further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the information retrieval method described in the first aspect when executing the computer program.

[0022] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the information retrieval method described in the first aspect above.

[0023] The embodiments of the present application provide an information retrieval method, apparatus, device and medium. On the one hand, a knowledge graph is constructed based on a configured data source, and nodes in the knowledge graph are divided into communities and summarized according to the configured dimensions. This can connect scattered information points and provide a holistic understanding of large-scale document collections or long documents, solving the shortcomings in dealing with global problems when general retrieval across documents or across topics is required. On the other hand, the retrieval conditions are used as the initial prompt words of the information retrieval model, and the community summary of each community is used as the knowledge base of the information retrieval model to retrieve the response data of each community, and the response data of each community is fused to the initial prompt words to obtain the target prompt words, and the target prompt words obtained after the fusion are used to retrieve to obtain the retrieval results, which can provide retrieval results covering multiple angles and dimensions in the original information, making the retrieval results more comprehensive and accurate. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0025] Figure 1 A schematic diagram of an application scenario of the information retrieval method provided in an embodiment of the present application;

[0026] Figure 2 A flowchart of an information retrieval method provided in an embodiment of the present application;

[0027] Figure 3 A schematic block diagram of an information retrieval device provided in an embodiment of the present application;

[0028] Figure 4 A schematic block diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0029] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0030] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0031] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0032] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0033] See also Figure 1 and Figure 2 , Figure 1 A schematic diagram of an application scenario of the information retrieval method provided in an embodiment of the present application; Figure 2 This is a flow chart of an information retrieval method provided in an embodiment of the present application. The information retrieval method is applied in a server and is executed by application software installed in the server.

[0034] like Figure 2 As shown, the method includes steps S101 to S107.

[0035] S101. In response to an information retrieval instruction based on a configured data source, a knowledge graph is constructed based on the configured data source.

[0036] In this embodiment, the technical solution is described with the server as the execution subject. The user terminal (such as a smart phone, tablet computer and other intelligent terminals) used by the user can interact with the server for data. Specifically, the server provides an information retrieval platform, and the user can log in to the information retrieval platform using the user terminal. The user interaction interface of the information retrieval platform is displayed on the terminal interface of the user terminal, and there is at least one information input interface in the user interaction interface. When the user enters the search conditions, the subsequent information retrieval can be performed in the server.

[0037] In this embodiment, the configuration data source may include a private data source that is not used to train the information retrieval model. The private data source may include a collection of local, non-public or unseen text data sources and web page data sources.

[0038] Of course, in other embodiments, the configuration data source may also be an open source data source, and may also be retrieved using the information retrieval method in this application.

[0039] In this embodiment, the step of constructing a knowledge graph based on the configured data source includes:

[0040] Converting the configuration data source into a text block;

[0041] Extracting entities in the text block and relationships between entities;

[0042] generating a summary of each entity, and determining the summary of each entity as additional information of each entity;

[0043] Taking each entity as a node and connecting each node based on the relationship between the entities to obtain an initial graph;

[0044] The additional information of each entity is added to the node attributes of the corresponding node in the initial graph to obtain the knowledge graph.

[0045] The configuration data source may be converted into text blocks by using text extraction and block segmentation technology.

[0046] Moreover, as the number of extractions increases linearly, the number of entities also increases linearly, and the smaller the text block, the higher the rate of change.

[0047] The extracting of entities and relationships between entities in the text block includes, but is not limited to, any of the following methods:

[0048] (1) extracting entities and relationships between entities in the text block using the CasRel model;

[0049] (2) extracting entities from the text block using a named entity recognition (NER) model, and predicting and determining whether there is a certain relationship between the extracted entities using a relation classification (RC) model;

[0050] (3) Using a large language model (LLM) to extract entities in the text block and the relationships between entities.

[0051] The generating of a summary of each entity includes:

[0052] Retrieving text content related to each entity in the text block using a vector recall method;

[0053] Summarize the text content related to each entity to obtain a summary of each entity.

[0054] For example, the summary may be an introduction to each entity and other content related to the corresponding entity, such as an introduction to Company A.

[0055] In the above embodiment, the constructed knowledge graph can comprehensively summarize the configured data source, connect scattered information points to identify the relationship between data, and retain the content related to the node as node attribute information. It can retain more complete and multi-dimensional original information as much as possible, which is especially suitable for situations where new insights need to be synthesized across documents or topics.

[0056] S102: Divide the nodes in the knowledge graph into communities according to the configuration dimension to obtain at least one community.

[0057] In this embodiment, the configuration dimensions may be configured according to actual application scenarios and requirements. For example, the configuration dimensions may include a regional dimension, an industry dimension, and the like.

[0058] In this embodiment, the nodes in the knowledge graph are divided into communities according to the configuration dimension to obtain at least one community, including:

[0059] Constructing a query statement of the neo4j database with the configuration dimension as a label; wherein the query statement is used to filter the node attributes of each node, and query the relationship of each node obtained after filtering in any direction in the knowledge graph, and obtain another node connected to each queried relationship, and the obtained nodes are not repeated;

[0060] Perform a query on the knowledge graph based on the query statement to obtain a query result;

[0061] The at least one community is generated according to the query result.

[0062] For example, the query statement constructed can be:

[0063] MATCH(n:Label{property:'value'})-[*]-(related)

[0064] RETURN DISTINCT related

[0065] Among them, Label represents the configuration dimension, property:'value' represents filtering the node attributes of the node, -[*] represents the relationship of each node in any direction obtained after querying and filtering in the knowledge graph, (related) represents another node connected to each queried relationship, and DISTINCT related represents ensuring that the returned nodes are not repeated.

[0066] Through the above embodiments, it is possible to identify close connections between entities and adaptively divide the nodes in the knowledge graph into communities according to different dimensions.

[0067] S103: Generate a community summary for each community.

[0068] In this embodiment, generating a community summary for each community includes:

[0069] Generate prompt words for generating a community summary of each community according to the nodes of each community and the corresponding node attributes;

[0070] Generate a community summary for each community based on each generated cue word and any large language model.

[0071] Specifically, the nodes of each community and the corresponding node attributes are used as part of the prompt of the large language model, and the large language model summarizes these contents.

[0072] Of course, in other embodiments, other artificial intelligence models may be used to summarize each community, and this application does not limit the method of community summarization.

[0073] In the above embodiment, by constructing a knowledge graph and generating predefined community summaries for closely related entity groups in the knowledge graph, community summaries can be generated at different levels, thereby providing more comprehensive and richer information, and solving the shortcomings of traditional retrieval enhancement generation methods in dealing with global problems.

[0074] S104: parse the information search instruction to obtain search conditions.

[0075] In this embodiment, the search conditions may include dimensions, search content, etc.

[0076] S105 , using the search conditions as initial prompt words of the information retrieval model and the community summary of each community as the knowledge base of the information retrieval model to perform retrieval and obtain response data of each community.

[0077] In this embodiment, the information retrieval model may include a large language model trained based on an external data source.

[0078] In this embodiment, a partial response can be generated using the community summary for the search condition.

[0079] S106: Merge the response data of each community into the initial prompt word to obtain a target prompt word.

[0080] For example: when the initial prompt word is "summarize the characteristics of customer groups", the response data of community A is the characteristics of the first customer group, and the response data of community B is the characteristics of the second customer group, then the target prompt word can be "combining the characteristics of the first customer group and the second customer group, summarizing the overall customer group characteristics."

[0081] In this embodiment, it is equivalent to integrating the search conditions on the basis of the responses of each community, integrating the responses of each community as the context of the search conditions into the initial prompt words, so that the final response integrates information from different communities, provides multi-angle and multi-dimensional results, and then can generate more clear prompt words to ask questions to the large model.

[0082] S107: Based on the target prompt word, perform a search using the configured data source as a knowledge base of the information retrieval model to obtain a search result.

[0083] In this embodiment, the integrity of the relevant information of each node is guaranteed when constructing the knowledge graph, and the knowledge graph can improve the ability to deal with problems that require integrating information across multiple documents. At the same time, by dividing the community and summarizing the community, the content of the entire data source can be better understood to extract key topics and concepts from it. Furthermore, the response data of each community is integrated into the initial prompt word and then retrieved based on the information retrieval model, which can ensure that the generated answers are both comprehensive and diverse, and cover multiple perspectives and information sources.

[0084] For example, when faced with a large-scale document collection or a long document, especially when the question requires a general answer rather than a specific fact retrieval, the information retrieval method of this embodiment can provide a holistic understanding.

[0085] It has been experimentally verified that the information retrieval method used in this embodiment is capable of processing very large data sets (such as data sets within the range of 1 million tokens), and can exhibit better performance than traditional retrieval schemes. Moreover, even with a smaller context window (such as 8k token), high-quality responses can be generated, that is, the required computing resources can be reduced while maintaining high performance. Tests under multiple conditions have shown that the information retrieval method used in this embodiment is significantly better than the original graph retrieval enhancement generation technology in terms of average win rate, especially in terms of comprehensiveness and diversity, with average win rates of 58.1% and 52.4%, respectively. In addition, studies have shown that smaller context windows (such as 8k tokens) effectively reduce computational costs while maintaining high-quality answers.

[0086] In this embodiment, after obtaining the response data of each community, the method further includes:

[0087] When the search condition includes any sub-dimension under the configuration dimension, at least one target community is screened out from the at least one community according to the any sub-dimension;

[0088] The response data of each target community is integrated into the initial prompt word to obtain the target prompt word.

[0089] For example: when the configuration dimension is a regional dimension, if the search condition includes region A in the regional dimension, at least one target community belonging to region A can be first screened out from the at least one community, and the response data of each target community can be integrated into the initial prompt word to obtain the target prompt word, so that the user can locate the community of interest and conduct in-depth mining, thereby improving the efficiency of the user's understanding and application of information.

[0090] It can be seen from the above technical solutions that, on the one hand, a knowledge graph is constructed based on the configured data source, and the nodes in the knowledge graph are divided into communities and summarized according to the configured dimensions, which can connect scattered information points and provide a holistic understanding of large-scale document collections or long documents, solving the shortcomings in dealing with global problems when general retrieval across documents or topics is required; on the other hand, the retrieval conditions are used as the initial prompt words of the information retrieval model, and the community summary of each community is used as the knowledge base of the information retrieval model to retrieve the response data of each community, and the response data of each community is fused to the initial prompt words to obtain the target prompt words, and the fusion of the target prompt words is used to obtain the retrieval results, which can provide retrieval results covering multiple angles and dimensions of the original information, making the retrieval results more comprehensive and accurate.

[0091] The present application also provides an information retrieval device, which is used to execute any embodiment of the above-mentioned information retrieval method. Figure 3 , Figure 3 It is a schematic block diagram of the information retrieval device 100 provided in an embodiment of the present application.

[0092] Among them, Figure 3 As shown, the information retrieval device 100 includes a construction unit 101, a division unit 102, a generation unit 103, a parsing unit 104, a retrieval unit 105, and a fusion unit 106.

[0093] The construction unit 101 is used to respond to an information retrieval instruction based on a configured data source and construct a knowledge graph based on the configured data source.

[0094] In this embodiment, the technical solution is described with the server as the execution subject. The user terminal (such as a smart phone, tablet computer and other intelligent terminals) used by the user can interact with the server for data. Specifically, the server provides an information retrieval platform, and the user can log in to the information retrieval platform using the user terminal. The user interaction interface of the information retrieval platform is displayed on the terminal interface of the user terminal, and there is at least one information input interface in the user interaction interface. When the user enters the search conditions, the subsequent information retrieval can be performed in the server.

[0095] In this embodiment, the configuration data source may include a private data source that is not used to train the information retrieval model. The private data source may include a collection of local, non-public or unseen text data sources and web page data sources.

[0096] Of course, in other embodiments, the configuration data source may also be an open source data source, and may also be retrieved using the information retrieval method in this application.

[0097] In this embodiment, the construction unit 101 constructs a knowledge graph based on the configuration data source, including:

[0098] Converting the configuration data source into a text block;

[0099] Extracting entities in the text block and relationships between entities;

[0100] generating a summary of each entity, and determining the summary of each entity as additional information of each entity;

[0101] Taking each entity as a node and connecting each node based on the relationship between the entities to obtain an initial graph;

[0102] The additional information of each entity is added to the node attributes of the corresponding node in the initial graph to obtain the knowledge graph.

[0103] The configuration data source may be converted into text blocks by using text extraction and block segmentation technology.

[0104] Moreover, as the number of extractions increases linearly, the number of entities also increases linearly, and the smaller the text block, the higher the rate of change.

[0105] The construction unit 101 extracts entities and relationships between entities in the text block in the following ways, but is not limited to:

[0106] (1) extracting entities and relationships between entities in the text block using the CasRel model;

[0107] (2) extracting entities from the text block using a named entity recognition (NER) model, and predicting and determining whether there is a certain relationship between the extracted entities using a relation classification (RC) model;

[0108] (3) Using a large language model (LLM) to extract entities in the text block and the relationships between entities.

[0109] The construction unit 101 generates a summary of each entity, including:

[0110] Retrieving text content related to each entity in the text block using a vector recall method;

[0111] Summarize the text content related to each entity to obtain a summary of each entity.

[0112] For example, the summary may be an introduction to each entity and other content related to the corresponding entity, such as an introduction to Company A.

[0113] In the above embodiment, the constructed knowledge graph can comprehensively summarize the configured data source, connect scattered information points to identify the relationship between data, and retain the content related to the node as node attribute information. It can retain more complete and multi-dimensional original information as much as possible, which is especially suitable for situations where new insights need to be synthesized across documents or topics.

[0114] The division unit 102 is used to divide the nodes in the knowledge graph into communities according to the configuration dimension to obtain at least one community.

[0115] In this embodiment, the configuration dimensions may be configured according to actual application scenarios and requirements. For example, the configuration dimensions may include a regional dimension, an industry dimension, and the like.

[0116] In this embodiment, the division unit 102 divides the nodes in the knowledge graph into communities according to the configuration dimension to obtain at least one community, including:

[0117] Constructing a query statement of the neo4j database with the configuration dimension as a label; wherein the query statement is used to filter the node attributes of each node, and query the relationship of each node obtained after filtering in any direction in the knowledge graph, and obtain another node connected to each queried relationship, and the obtained nodes are not repeated;

[0118] Perform a query on the knowledge graph based on the query statement to obtain a query result;

[0119] The at least one community is generated according to the query result.

[0120] For example, the query statement constructed can be:

[0121] MATCH(n:Label{property:'value'})-[*]-(related)

[0122] RETURN DISTINCT related

[0123] Among them, Label represents the configuration dimension, property:'value' represents filtering the node attributes of the node, -[*] represents the relationship of each node in any direction obtained after querying and filtering in the knowledge graph, (related) represents another node connected to each queried relationship, and DISTINCT related represents ensuring that the returned nodes are not repeated.

[0124] Through the above embodiments, it is possible to identify close connections between entities and adaptively divide the nodes in the knowledge graph into communities according to different dimensions.

[0125] The generating unit 103 is used to generate a community summary for each community.

[0126] In this embodiment, the generating unit 103 generates a community summary for each community, including:

[0127] Generate prompt words for generating a community summary of each community according to the nodes of each community and the corresponding node attributes;

[0128] Generate a community summary for each community based on each generated cue word and any large language model.

[0129] Specifically, the nodes of each community and the corresponding node attributes are used as part of the prompt of the large language model, and the large language model summarizes these contents.

[0130] Of course, in other embodiments, other artificial intelligence models may be used to summarize each community, and this application does not limit the method of community summarization.

[0131] In the above embodiment, by constructing a knowledge graph and generating predefined community summaries for closely related entity groups in the knowledge graph, community summaries can be generated at different levels, thereby providing more comprehensive and richer information, and solving the shortcomings of traditional retrieval enhancement generation methods in dealing with global problems.

[0132] The parsing unit 104 is used to parse the information retrieval instruction to obtain a retrieval condition.

[0133] In this embodiment, the search conditions may include dimensions, search content, etc.

[0134] The retrieval unit 105 is used to use the retrieval conditions as initial prompt words of the information retrieval model and the community summary of each community as the knowledge base of the information retrieval model to perform retrieval and obtain response data of each community.

[0135] In this embodiment, the information retrieval model may include a large language model trained based on an external data source.

[0136] In this embodiment, a partial response can be generated using the community summary for the search condition.

[0137] The fusion unit 106 is used to fuse the response data of each community into the initial prompt word to obtain a target prompt word.

[0138] For example: when the initial prompt word is "summarize the characteristics of customer groups", the response data of community A is the characteristics of the first customer group, and the response data of community B is the characteristics of the second customer group, then the target prompt word can be "combining the characteristics of the first customer group and the second customer group, summarizing the overall customer group characteristics."

[0139] In this embodiment, it is equivalent to integrating the search conditions on the basis of the responses of each community, integrating the responses of each community as the context of the search conditions into the initial prompt words, so that the final response integrates information from different communities, provides multi-angle and multi-dimensional results, and then can generate more clear prompt words to ask questions to the large model.

[0140] The retrieval unit 105 is further configured to perform retrieval based on the target prompt word and use the configuration data source as the knowledge base of the information retrieval model to obtain a retrieval result.

[0141] In this embodiment, the integrity of the relevant information of each node is guaranteed when constructing the knowledge graph, and the knowledge graph can improve the ability to deal with problems that require integrating information across multiple documents. At the same time, by dividing the community and summarizing the community, the content of the entire data source can be better understood to extract key topics and concepts from it. Furthermore, the response data of each community is integrated into the initial prompt word and then retrieved based on the information retrieval model, which can ensure that the generated answers are both comprehensive and diverse, and cover multiple perspectives and information sources.

[0142] For example, when faced with a large-scale document collection or a long document, especially when the question requires a general answer rather than a specific fact retrieval, the information retrieval method of this embodiment can provide a holistic understanding.

[0143] It has been experimentally verified that the information retrieval method used in this embodiment is capable of processing very large data sets (such as data sets within the range of 1 million tokens), and can exhibit better performance than traditional retrieval schemes. Moreover, even with a smaller context window (such as 8k token), high-quality responses can be generated, that is, the required computing resources can be reduced while maintaining high performance. Tests under multiple conditions have shown that the information retrieval method used in this embodiment is significantly better than the original graph retrieval enhancement generation technology in terms of average win rate, especially in terms of comprehensiveness and diversity, with average win rates of 58.1% and 52.4%, respectively. In addition, studies have shown that smaller context windows (such as 8k tokens) effectively reduce computational costs while maintaining high-quality answers.

[0144] In this embodiment, after the response data of each community is obtained, when the search condition includes any sub-dimension under the configuration dimension, at least one target community is screened out from the at least one community according to the any sub-dimension;

[0145] The response data of each target community is integrated into the initial prompt word to obtain the target prompt word.

[0146] For example: when the configuration dimension is a regional dimension, if the search condition includes region A in the regional dimension, at least one target community belonging to region A can be first screened out from the at least one community, and the response data of each target community can be integrated into the initial prompt word to obtain the target prompt word, so that the user can locate the community of interest and conduct in-depth mining, thereby improving the efficiency of the user's understanding and application of information.

[0147] It can be seen from the above technical solutions that, on the one hand, a knowledge graph is constructed based on the configured data source, and the nodes in the knowledge graph are divided into communities and summarized according to the configured dimensions, which can connect scattered information points and provide a holistic understanding of large-scale document collections or long documents, solving the shortcomings in dealing with global problems when general retrieval across documents or topics is required; on the other hand, the retrieval conditions are used as the initial prompt words of the information retrieval model, and the community summary of each community is used as the knowledge base of the information retrieval model to retrieve the response data of each community, and the response data of each community is fused to the initial prompt words to obtain the target prompt words, and the fusion of the target prompt words is used to obtain the retrieval results, which can provide retrieval results covering multiple angles and dimensions of the original information, making the retrieval results more comprehensive and accurate.

[0148] The above-mentioned information retrieval device can be implemented in the form of a computer program. The computer program can be Figure 4 Runs on the computer device shown.

[0149] See also Figure 4 , Figure 4 4 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device 400 is a server, or a server cluster. The server can be an independent server, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0150] See also Figure 4 The computer device 400 includes a processor 402 , a memory and a network interface 405 connected via a device bus 401 , wherein the memory may include a storage medium 403 and an internal memory 404 .

[0151] The storage medium 403 may store an operating system 4031 and a computer program 4032. When the computer program 4032 is executed, the processor 402 may execute the information retrieval method.

[0152] The processor 402 is used to provide computing and control capabilities to support the operation of the entire computer device 400 .

[0153] The internal memory 404 provides an environment for the operation of the computer program 4032 in the storage medium 403. When the computer program 4032 is executed by the processor 402, the processor 402 can execute the information retrieval method.

[0154] The network interface 405 is used for network communication, such as providing data information transmission, etc. Those skilled in the art will understand that Figure 4 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device 400 to which the solution of the present application is applied. The specific computer device 400 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0155] The processor 402 is used to run a computer program 4032 stored in the memory to implement the information retrieval method disclosed in the embodiment of the present application.

[0156] Those skilled in the art will understand that Figure 4The embodiments of the computer device shown in the figure do not constitute a limitation on the specific composition of the computer device. In other embodiments, the computer device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. For example, in some embodiments, the computer device may only include a memory and a processor. In such embodiments, the structure and function of the memory and the processor are the same as those of the embodiment of the present invention. Figure 4 The embodiments shown are consistent and will not be described again here.

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

[0158] In another embodiment of the present application, a computer-readable storage medium is provided. The computer-readable storage medium may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the information retrieval method disclosed in the embodiment of the present application is implemented.

[0159] It should be noted that the data involved in this case were all obtained legally.

[0160] It will be clear to those skilled in the art that, for the convenience and simplicity of description, the specific working process of the above-described equipment, devices and units can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. It will be appreciated by those of ordinary skill in the art that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0161] In the several embodiments provided in the present application, it should be understood that the disclosed equipment, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, and units with the same function may be combined into one unit. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices or units, or may be electrical, mechanical or other forms of connection.

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

[0163] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0164] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a background server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a disk or an optical disk.

[0165] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. An information retrieval method, characterized in that: include: In response to an information retrieval instruction based on a configuration data source, construct a knowledge graph based on the configuration data source; Dividing the nodes in the knowledge graph into communities according to the configuration dimension to obtain at least one community; Generate a community summary for each community; Parsing the information retrieval instruction to obtain retrieval conditions; Using the search conditions as initial prompt words of the information retrieval model and using the community summary of each community as the knowledge base of the information retrieval model to perform retrieval and obtain response data of each community; The response data of each community is integrated into the initial prompt word to obtain the target prompt word; Based on the target prompt word, the configuration data source is used as the knowledge base of the information retrieval model to perform a search to obtain a search result.

2. The information retrieval method according to claim 1, characterized in that: The configuration data source includes a private data source that is not used to train the information retrieval model; the information retrieval model includes a large language model trained based on an external data source.

3. The information retrieval method according to claim 1, characterized in that: The constructing a knowledge graph based on the configured data source includes: Converting the configuration data source into a text block; Extracting entities in the text block and relationships between entities; generating a summary of each entity, and determining the summary of each entity as additional information of each entity; Taking each entity as a node and connecting each node based on the relationship between the entities to obtain an initial graph; The additional information of each entity is added to the node attributes of the corresponding node in the initial graph to obtain the knowledge graph.

4. The information retrieval method according to claim 3, characterized in that: The summary of each entity is generated, including: Retrieving text content related to each entity in the text block using a vector recall method; Summarize the text content related to each entity to obtain a summary of each entity.

5. The information retrieval method according to claim 3, characterized in that: The step of dividing the nodes in the knowledge graph into communities according to the configuration dimension to obtain at least one community includes: Constructing a query statement of the neo4j database with the configuration dimension as a label; wherein the query statement is used to filter the node attributes of each node, and query the relationship of each node obtained after filtering in any direction in the knowledge graph, and obtain another node connected to each queried relationship, and the obtained nodes are not repeated; Perform a query on the knowledge graph based on the query statement to obtain a query result; The at least one community is generated according to the query result.

6. The information retrieval method according to claim 1, characterized in that: The community summary of each community is generated, including: Generate prompt words for generating a community summary of each community according to the nodes of each community and the corresponding node attributes; Generate a community summary for each community based on each generated cue word and any large language model.

7. The information retrieval method according to claim 1, characterized in that: After obtaining the response data of each community, the method further includes: When the search condition includes any sub-dimension under the configuration dimension, at least one target community is screened out from the at least one community according to the any sub-dimension; The response data of each target community is integrated into the initial prompt word to obtain the target prompt word.

8. An information retrieval device, characterized in that: include: A construction unit, configured to respond to an information retrieval instruction based on a configuration data source and to construct a knowledge graph based on the configuration data source; A partitioning unit, configured to partition the nodes in the knowledge graph into communities according to a configuration dimension to obtain at least one community; A generation unit, used to generate a community summary for each community; A parsing unit, used for parsing the information retrieval instruction to obtain a retrieval condition; A retrieval unit, used to use the retrieval conditions as initial prompt words of the information retrieval model and the community summary of each community as the knowledge base of the information retrieval model to perform retrieval and obtain response data of each community; A fusion unit, used for fusing the response data of each community into the initial prompt word to obtain a target prompt word; The retrieval unit is further used to perform retrieval based on the target prompt word and use the configuration data source as the knowledge base of the information retrieval model to obtain a retrieval result.

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

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, causes the processor to perform the information retrieval method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Retrieval enhancement method and device, electronic equipment and storage medium

    CN118210908A

  • Construction method of RAG system based on Graph

    CN118503407A

Cited By

  • Intelligent question answering method, system and equipment based on GraphRAG and medium

    CN119988572A

  • Object information acquisition method and device, storage medium and program product

    CN120851220A