Intelligent retrieval method and device, storage medium and terminal

By acquiring user-input query statements and historical records, and using a pre-trained large language model to determine the target query information, the problem of inaccurate retrieval language in enterprise knowledge bases is solved, and efficient and personalized information retrieval services are achieved.

CN122045331APending Publication Date: 2026-05-15BEIJING QIHOOD TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING QIHOOD TECHNOLOGY CO LTD
Filing Date
2024-11-13
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

In an enterprise's internal knowledge base, inaccurate user search language leads to poor search results and makes it difficult to meet information retrieval needs.

Method used

By acquiring the user's input query and historical query records, a pre-trained large language model is used to determine the target query information, including the query intent and time range, and then natural language processing capabilities are combined to perform accurate retrieval.

Benefits of technology

It improves search accuracy and recall, ensures that search results meet users' timeliness needs, and provides personalized, high-quality query services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122045331A_ABST
    Figure CN122045331A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent retrieval method and device, a storage medium and a terminal, and the method comprises the steps: obtaining a query statement and a historical query record input by a user in response to a query operation of the user; the query statement and the historical query record are input into a pre-training large language model, target query information output by the pre-training large language model is determined, and the target query information comprises at least one of a query intention and a query time range; and performing retrieval in a database based on the query statement and the target query information to obtain a retrieval result corresponding to the query statement. Due to the fact that the current query statement and the historical query record of the user can effectively illustrate the requirements of the user, the intention of the user and the required information time range can be understood and analyzed based on the natural language processing capacity and the context understanding capacity of the large language model. The intention analysis can accurately capture the real purpose and demand of the user query, and the time analysis can ensure that the retrieval result meets the timeliness demand of the user for the information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to an intelligent retrieval method, device, storage medium, and terminal. Background Technology

[0002] Within enterprises, massive databases of information often accumulate from numerous professional reports, technical documents, project plans, and other materials. Effective management of these resources allows employees to retrieve and use documents and data according to their needs. However, while document retrieval functions can promote efficient information flow and utilization, they still face efficiency bottlenecks in practice due to multiple factors. First, as the volume of data increases, the accuracy of retrieved data becomes unstable. Besides the impact of large databases on retrieval accuracy, the ambiguity of user queries is also a significant factor affecting the final search results. Therefore, ensuring the accuracy and relevance of search results is a key optimization objective in current retrieval scenarios. Summary of the Invention

[0003] This application provides an intelligent retrieval method, device, storage medium, and terminal, which can solve the technical problem of poor retrieval results caused by inaccurate retrieval language in related technologies.

[0004] In a first aspect, embodiments of this application provide an intelligent retrieval method, the method comprising:

[0005] In response to user queries, retrieve the user's input query statement and historical query records;

[0006] Input the query statement and historical query records into the pre-trained large language model to determine the target query information output by the pre-trained large language model. The target query information includes at least one of the following: query intent and query time range.

[0007] The database is searched based on the query statement and the target query information to obtain the search results corresponding to the query statement.

[0008] Secondly, embodiments of this application provide an intelligent retrieval device, the device comprising:

[0009] The query input module is used to respond to user query operations and obtain the query statement entered by the user as well as historical query records;

[0010] The query understanding module is used to input the query statement and historical query records into the pre-trained large language model and determine the target query information output by the pre-trained large language model. The target query information includes at least one of the following: query intent and query time range.

[0011] The retrieval output module is used to retrieve the corresponding search results from the database based on the query statement and the target query information.

[0012] Thirdly, embodiments of this application provide a computer storage medium storing multiple instructions adapted for loading by a processor and executing the steps of the above-described method.

[0013] Fourthly, embodiments of this application provide a terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being adapted to be loaded by the processor and to execute the steps of the above-described method.

[0014] The beneficial effects of the technical solutions provided in some embodiments of this application include at least the following:

[0015] This application provides an intelligent retrieval method that, in response to a user's query, acquires the user's input query statement and historical query records; inputs the query statement and historical query records into a pre-trained large language model to determine the target query information output by the pre-trained large language model, which includes at least one of query intent and query time range; and retrieves the corresponding search results from the database based on the query statement and target query information. Since the user's current query statement and historical query records effectively illustrate the user's needs, and based on the natural language processing and contextual understanding capabilities of the large language model, the user's intent and required information time range can be understood and analyzed. Intent parsing accurately captures the user's true purpose and needs in the query, while time analysis adds a time dimension to the query, ensuring that the search results meet the user's timeliness requirements. The integration of intent and time information effectively improves retrieval accuracy and recall, thereby enhancing the user's information retrieval experience. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 An exemplary system architecture diagram of an intelligent retrieval method provided in this application embodiment;

[0018] Figure 2 A flowchart illustrating an intelligent retrieval method provided in an embodiment of this application;

[0019] Figure 3A flowchart illustrating an intelligent retrieval method provided in an embodiment of this application;

[0020] Figure 4 This is a schematic diagram of the logic modules in an intelligent retrieval method provided in an embodiment of this application;

[0021] Figure 5 A flowchart illustrating an intelligent retrieval method provided in an embodiment of this application;

[0022] Figure 6 A structural block diagram of an intelligent retrieval device provided in an embodiment of this application;

[0023] Figure 7 This is a schematic diagram of the structure of a terminal provided in an embodiment of this application. Detailed Implementation

[0024] To make the features and advantages of this application more apparent and understandable, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0025] In the following description, when referring to the accompanying drawings, the same numbers in different drawings denote the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0026] In enterprise knowledge base systems, document retrieval is crucial for promoting efficient information flow and utilization. However, in practice, it often faces efficiency bottlenecks due to multiple factors. First, from the perspective of retrieval scope, enterprise knowledge bases typically cover a wide and deep range of content areas, usually including but not limited to basic employee handbooks, complex technical documents, market reports, and project archives. While this broad coverage provides users with abundant information resources, it also inherently increases the difficulty of accurately retrieving the required information.

[0027] Secondly, the precision of the search terms used by users when searching for documents significantly impacts search results. Due to differences in user background, professional knowledge level, and expression habits, search terms may be vague, imprecise, or even incorrect. For example, users may use non-technical terms, abbreviations, synonyms, or near-synonyms to express their query intent, which may not accurately match the tags and keywords of the actual documents in the knowledge base, thus making it difficult for the search system to meet the user's information query needs.

[0028] Therefore, this application provides an intelligent retrieval method to solve the technical problem of poor retrieval results caused by inaccurate retrieval language.

[0029] Please see Figure 1 , Figure 1 This is an exemplary system architecture diagram of an intelligent retrieval method provided in an embodiment of this application.

[0030] like Figure 1 As shown, the system architecture may include a terminal 101, a network 102, and a server 103. The network 102 serves as the medium for providing a communication link between the terminal 101 and the server 103. The network 102 may include various types of wired or wireless communication links, such as wired communication links including fiber optic cables, twisted-pair cables, or coaxial cables, and wireless communication links including Bluetooth communication links, Wireless-Fidelity (Wi-Fi) communication links, or microwave communication links, etc.

[0031] Terminal 101 can interact with server 103 via network 102 to receive messages from or send messages to server 103. Alternatively, terminal 101 can interact with server 103 via network 102 to receive messages or data sent to server 103 by other users. Terminal 101 can be hardware or software. When terminal 101 is hardware, it can be various electronic devices, including but not limited to smartphones, tablets, laptops, and desktop computers. When terminal 101 is software, it can be installed in the aforementioned electronic devices and can be implemented as multiple software programs or software modules (e.g., to provide distributed services) or as a single software program or software module; no specific limitation is made here.

[0032] In this embodiment, terminal 101 first responds to the user's query operation by obtaining the query statement input by the user and historical query records; further, terminal 101 inputs the query statement and historical query records into a pre-trained large language model to determine the target query information output by the pre-trained large language model, wherein the target query information includes at least one of query intent and query time range; based on this, terminal 101 performs a search in the database based on the query statement and the target query information to obtain the search results corresponding to the query statement.

[0033] Server 103 can be a business server providing various services. It should be noted that server 103 can be either hardware or software. When server 103 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When server 103 is software, it can be implemented as multiple software programs or software modules (e.g., used to provide distributed services), or as a single software program or software module; no specific limitations are made here.

[0034] Alternatively, the system architecture may not include server 103. In other words, server 103 may be an optional device in the embodiments of this specification. That is, the method provided in the embodiments of this specification can be applied to a system structure that only includes terminal 101. The embodiments of this application do not limit this.

[0035] It should be understood that Figure 1 The number of terminals, networks, and servers shown is only illustrative; the number can be any number of terminals, networks, and servers depending on the implementation requirements.

[0036] Please see Figure 2 , Figure 2 This is a flowchart illustrating an intelligent retrieval method provided in an embodiment of this application. The execution entity in this embodiment can be a terminal executing the intelligent retrieval, a processor within the terminal executing the intelligent retrieval method, or an intelligent retrieval service within the terminal executing the intelligent retrieval method. For ease of description, the following uses the processor within the terminal as an example to describe the specific execution process of the intelligent retrieval method.

[0037] like Figure 2 As shown, intelligent retrieval methods can include at least:

[0038] S202. In response to the user's query operation, obtain the query statement entered by the user and the historical query records.

[0039] Optionally, in an enterprise knowledge base system, document retrieval is the core of efficient information flow. However, with a wide search scope, while abundant information resources are available for users to query and use, the difficulty of precise retrieval also increases. Furthermore, the imprecision of user search terms makes it difficult for user-inputted queries to accurately match knowledge base tags, affecting search results. Therefore, to optimize the user's information retrieval experience, it is necessary to more meticulously capture and analyze the user's query intent. Thus, in addition to analyzing and retrieving the current query, it is also possible to review the user's historical query records. Historical query records can reflect the user's interests and needs through previous queries and search results. Changes from historical query records to the current query can also reveal the user's information exploration trajectory and patterns.

[0040] Specifically, when a user performs a document search, the terminal can quickly receive and respond to the user's query. Based on the query, in addition to obtaining the core information of this search interaction—the query statement—it also retrieves the historical query records preceding this query. These historical query records not only map the user's past information needs but also serve as an important reference for reflecting user preferences and optimizing search results. By combining the query statement and the user's historical query records, the terminal can more accurately grasp the user's query habits, true intentions, and potential needs, providing strong support for the current query processing.

[0041] Optionally, organizing by topic facilitates the management of multiple search activities conducted by users within the same topic. In the user client, a user can create a new search conversation for a new topic, during which they can ask multiple questions about the topic. Past conversations within the same topic serve as the historical query records for this current query, accurately reflecting the user's search needs within that topic.

[0042] S204. Input the query statement and historical query records into the pre-trained large language model, and determine the target query information output by the pre-trained large language model. The target query information includes at least one of the following: query intent and query time range.

[0043] Optionally, in order to achieve a deeper understanding of the query statement and historical query records, artificial intelligence technologies, such as deep learning and machine learning, can be used to train a Large Language Model (LLM). This large language model, through its natural language processing and contextual understanding capabilities, can process and analyze the query statement and historical query records, deeply understand the deeper meaning of the user's query, and thus output target query information that can reflect the user's query needs in multiple dimensions.

[0044] In one feasible implementation, the target query information includes at least one of query intent and query time range. The query intent focuses on representing the user's true purpose in searching for documents, which may involve various types such as specific data queries, trend analysis, and comparative analysis. Simultaneously, the query time range refers to the query time that the user may be concerned with. The model can automatically determine the query time range based on the query content. This can be a time period explicitly specified by the user, or a reasonable time span intelligently inferred by the model based on the query context. Intent parsing accurately captures the true purpose and needs behind the user's query, while time analysis adds a time dimension to the query, ensuring that the search results obtained based on the target query information not only meet the user's current immediate needs but also satisfy the user's requirements for information timeliness. In addition, the target query information may also include other advanced features, such as data granularity requirements and sorting methods, to meet the diverse query needs of users.

[0045] Optionally, to determine query intent and query time range, the large language model needs to be thoroughly trained during the construction phase. Training data should include sample data of multiple query statements and historical query records, labeled with accurate query intent and query time range tags. The model can learn how to accurately interpret the deeper meaning of input data based on these samples. Once the large language model converges, it is deployed in real-world application scenarios. When inputting query statements and historical query records, the model uses its internally learned knowledge and rules to reason and analyze these features, ultimately determining the corresponding target query information. To improve accuracy, multi-model fusion techniques can be employed to combine the prediction results of multiple models to make the final judgment.

[0046] Optionally, during the targeted training of the large language model, the initial large language model is controlled to output predicted labels for multiple sample data. These predicted labels represent the target query information output by the initial large language model for the multiple sample data. The difference between the predicted labels and the original standard labels of the sample data represents the difference between the current state of the initial large language model and its expected performance. Further, the training loss value of the model can be calculated based on the predicted labels and the standard labels of the multiple sample data. The parameters in the initial large language model are adjusted based on the training loss value until the initial large language model converges to obtain the trained large language model. The model's training termination conditions may include, for example, the loss function value satisfying the target value condition or the number of iterations reaching a preset threshold. Specific training termination conditions can be determined based on actual circumstances and are not specifically limited here.

[0047] Optionally, when outputting the target query information, an intent-recognition agent can be further constructed based on the large language model. An agent is an autonomous entity capable of perceiving its environment, making decisions, and executing actions. It is goal-oriented and can adjust its behavioral strategies based on the current state and expected future results, typically used in practical operation and control scenarios. By invoking its internal large language model through the intent-recognition agent, it can autonomously perform a series of actions in a real-world environment based on a specific query time, including but not limited to obtaining the query statement and historical query records as input, understanding the input, and outputting the target query information.

[0048] S206. Based on the query statement and the target query information, retrieve the corresponding search results from the database.

[0049] Optionally, after obtaining the target query information, the system can perform a retrieval based on the parsed target query information and the original user-input query. Specifically, based on the query statement and target query information, the system executes corresponding query operations in the database to quickly retrieve documents and data that meet the criteria. This retrieved document data is then organized into an easy-to-view format so that users can intuitively obtain the information they need. When presenting the results, personalized display methods can be further provided based on user preferences and query habits, such as highlighting key information and providing relevant mind maps, to enhance the user experience. In summary, by inputting query statements and historical records into a pre-trained large language model and performing accurate retrieval in the database based on the target query information output by the model, an efficient and intelligent information retrieval process can be achieved, providing users with more personalized and high-quality query services.

[0050] This application provides an intelligent retrieval method that, in response to a user's query operation, acquires the user's input query statement and historical query records; inputs the query statement and historical query records into a pre-trained large language model to determine the target query information output by the pre-trained large language model, the target query information including at least one of query intent and query time range; and retrieves the corresponding search results from the database based on the query statement and target query information. Since the user's current query statement and historical query records effectively illustrate the user's needs, and based on the natural language processing and contextual understanding capabilities of the large language model, the user's intent and required information time range can be understood and analyzed. Intent parsing accurately captures the user's true purpose and needs for the query, while time analysis adds a time dimension to the query, ensuring that the search results meet the user's timeliness requirements. The integration of intent and time information effectively improves retrieval accuracy and recall, thereby enhancing the user's information retrieval experience.

[0051] Please see Figure 3 , Figure 3 This is a flowchart illustrating an intelligent retrieval method provided in an embodiment of this application.

[0052] like Figure 3 As shown, intelligent retrieval methods can include at least:

[0053] S302. In response to the user's query operation, obtain the query statement entered by the user and the historical query records.

[0054] S304. Input the query statement and historical query records into the pre-trained large language model, and determine the target query information output by the pre-trained large language model. The target query information includes at least one of the following: query intent and query time range.

[0055] For details regarding steps S302-S304, please refer to the detailed descriptions in steps S202-S204, which will not be repeated here.

[0056] S306. Based on the query statement and target query information, perform an initial retrieval in the database to obtain the first retrieval result corresponding to the query statement; rewrite the query statement according to the query statement and the initial retrieval result.

[0057] Optionally, due to differences in user background, professional knowledge level, and expression habits, the wording of their input queries may be vague, imprecise, or even incorrect. For example, users may use non-technical terms, abbreviations, synonyms, or near-synonyms to express their query intent, or they may only enter one or two words for searching. These expressions, due to inaccuracy and limited information, may be difficult to accurately match with the tags and keywords of actual documents in the database, thus making it difficult for the retrieval system to meet the user's information query needs. Based on this, please refer to... Figure 4 , Figure 4 This is a schematic diagram of the logical modules in an intelligent retrieval method provided in an embodiment of this application. For example... Figure 4 As shown, an initial retrieval can be performed based on the user's input query statement. Then, the original query statement is rewritten based on the query statement and the initial retrieval results. Furthermore, more relevant details are added to the query statement using documents and data related to the original query statement. Similar to using an intent-recognition agent to obtain target query information, a query rewriting agent can be used in this embodiment to rewrite the query statement. The query rewriting agent can also autonomously complete specific target tasks by calling a large language model. The specific process is similar to that of the intent-recognition agent and will not be elaborated here. It should be noted that whether the query statement needs to be rewritten can also be determined autonomously by the query rewriting agent based on the amount of information contained in the original query statement and whether there are any errors or omissions.

[0058] Optionally, an initial search is performed in the database based on the user-input query to obtain the first search results. After obtaining the initial search results, the original query is rewritten based on the initial search results and the original query. This step aims to optimize the accuracy and richness of the information contained in the query by adjusting the query logic, changing the query order, adding or modifying query conditions, thereby making subsequent query results more accurate. Finally, a search is performed again based on the optimized and rewritten query to obtain the final query results, which better meet the user's data retrieval needs.

[0059] Further, please refer to Figure 4 Considering that each retrieval method has its own advantages and disadvantages, a hybrid retrieval path can be constructed in the retrieval system. Multiple retrieval methods can be used to search for the query statement, and then the results of multiple retrieval methods can be integrated to combine the advantages of each retrieval method, retrieve more matching results, improve the retrieval recall rate, and ensure the reliability of each retrieval result.

[0060] Specifically, in this embodiment, two retrieval methods can be adopted: vector retrieval and full-text retrieval. Vector retrieval can handle complex and ambiguous expressions in natural language, such as synonyms, near-synonyms, and language variations. It is also adept at capturing semantic relationships between texts, such as hyponyms, causal relationships, and similarity relationships. Combining the semantic understanding capabilities of vector retrieval with the precise keyword matching capabilities of full-text retrieval aims to achieve better retrieval results. Keyword-based text retrieval, on the other hand, offers faster retrieval speeds and is suitable for scenarios requiring rapid matching of specific words, such as text search and log analysis. It is also applicable to structured data and document searches with clearly defined content. Therefore, by integrating the dual advantages of vector retrieval and full-text retrieval, users can enjoy a fast and accurate retrieval experience.

[0061] Optionally, when dealing with a specific query statement in an application scenario, it is necessary to determine at least one keyword in the query statement and the vector features corresponding to the query statement. Among them, at least one keyword can be obtained by performing word segmentation on the query statement. When the query statement is relatively long, it is necessary to first split the text fragment and then perform word segmentation on the statements in each text fragment to obtain all keywords. In the word segmentation process, it is first necessary to preprocess the statement or document to be segmented, including removing stop words (such as common but less significant words for retrieval like "of", "is", etc.), stemming (还原词汇到其基本形式,如将“running”和“ran”都转化为“run”), and possible synonym normalization, etc., to optimize the accuracy and efficiency of the index. Subsequently, the preprocessed statement is split into words. When obtaining the vector features of the query statement, a pre-trained language model (such as BERT, GPT, etc.) can be used to convert the text into a high-dimensional vector representation, and these vector features can capture the semantic information and context relationships in the text.

[0062] Optionally, after obtaining the keywords and vector features for the query statement, the matching results of the keywords and vector features can be retrieved in the database. That is, text retrieval is performed in the database based on each keyword to obtain the text retrieval result. The specific process is to perform keyword matching on each document in the database for each keyword. When there are the same words hit by the keyword in each document, it means that the target document hit by the query statement has been obtained through the keyword. On the other hand, at the same time, vector retrieval is performed in the database based on the vector features to obtain the vector retrieval result. The specific process is to match the vector features of the query statement with the vector features of each document in the database. If the matching degree of the vector features of the two satisfies a certain threshold, it means that the target document related to the query statement has been matched through the vector features. It should be noted that the vector features of the query statement and the vector features of the documents in the database can be generated based on the same feature extraction network or different feature extraction networks, but the vector features of the two need to maintain the same format, length, etc. in the output form to facilitate vector matching during retrieval.

[0063] Furthermore, the text search results and vector search results are integrated, meaning that the target documents in the text search results and the target documents in the vector search results are combined as a mixed search result corresponding to the query. During the integration of the two types of search results, data processing operations can be performed, such as deduplication, reordering, and filtering. Deduplication involves retaining only one copy of the duplicate target documents from both search results and removing the redundant ones. Reordering involves re-sorting all retrieved target documents for a more reasonable order. Filtering involves selecting only the top K documents from all target documents as the final search results displayed to the user. This mixed search strategy combines the advantages of multiple search methods, allowing them to complement each other, thereby significantly improving the accuracy and recall of search results. This ensures that users can quickly find the information they truly need, thus improving user experience and satisfaction.

[0064] Optionally, to improve retrieval recall through hybrid retrieval, a document database supporting hybrid retrieval needs to be constructed. First, the documents to be retrieved are obtained. These documents can be the user's desired documents stored in the target knowledge base. However, the target knowledge base also contains a large amount of redundant and useless data; therefore, data cleaning can be performed on the target knowledge base to remove redundant data and improve the quality of the retrieved data. After obtaining the documents to be retrieved, an index relationship based on vocabulary and vector features needs to be constructed for each document to support subsequent user retrieval operations. Each document is segmented to obtain multiple sub-vocabularies corresponding to it, converting each document into a series of independent vocabulary units. Finally, a preset vector extraction network is used to calculate the vector features corresponding to the documents to be retrieved. These vector features can capture semantic information and contextual relationships in the text.

[0065] Optionally, when the document to be retrieved is too long, direct word segmentation may be prone to errors, and generating a single vector feature from a long text can easily lead to semantic loss in the vector feature. Therefore, when the document to be retrieved is a long text, the document is first split into at least one text segment, and then each text segment is segmented to obtain multiple words corresponding to the document to be retrieved, as well as vector features corresponding to each text segment.

[0066] Optionally, after obtaining the segmented terms and vector features of the document to be retrieved, a precise and efficient indexing mechanism can be further established. An inverted index relationship is established between each segmented term and the document to be retrieved based on the document's segmented terms. An inverted index is a widely used indexing structure in modern search engines and database management systems. When a segmented term is hit by a query, it can quickly index to the storage location of the document to be retrieved. Similarly, a vector index relationship is also established between vector features and the document to be retrieved. Specifically, an index is created for these document vectors in the vector space to enable rapid calculation of similarity between vectors. The documents to be retrieved with the constructed inverted index and vector index relationships are stored in the database to support user indexing and retrieval of these documents, facilitating user access.

[0067] S308. Determine the target retrieval range in the database corresponding to the query operation based on the target query information.

[0068] Alternatively, please continue reading Figure 4 By analyzing user-input queries and historical query records, the intent recognition agent can utilize a pre-trained large language model to understand the input and output target query information such as query intent, query time range, data granularity requirements, and sorting method. By comprehensively considering the user's query purpose, data usage, and potential data correlations, it can accurately locate the corresponding target retrieval range in the database, thereby avoiding unnecessary data scanning and improving query efficiency in large volumes of document data. This ensures that subsequent operations focus on the most relevant and valuable datasets in the database, significantly enhancing the targeting and efficiency of the query.

[0069] S310. Based on the query statement, perform a search within the target search range to obtain the search results corresponding to the query statement.

[0070] Optionally, if the target search scope has already been determined based on the target query information during the final search, then the search can be performed directly within the target search scope. If the current query statement has been rewritten, then the second search result, i.e., the final search result, is obtained based on the rewritten query statement and the target query information within the target search scope. If the current query statement has not been rewritten, then the search is performed directly based on the original query statement.

[0071] This application provides an intelligent retrieval method. Based on a query statement and target query information, an initial retrieval is performed in the database to obtain the first retrieval result corresponding to the query statement. The query statement is then rewritten based on the query statement and the initial retrieval result. By adjusting the query logic, changing the query order, and adding or modifying query conditions, the accuracy and richness of the information contained in the query statement are optimized, thereby making subsequent query results more precise. A parallel hybrid retrieval based on keywords and vectors is implemented for the query statement, combining the semantic understanding of vector retrieval and the keyword matching advantages of full-text retrieval. This allows for the retrieval of more matching results, improving retrieval recall, while also reducing retrieval time and improving retrieval efficiency. Determining the target retrieval range in the database based on the target query information allows for precise location of the corresponding target retrieval range in the database, thereby avoiding unnecessary data scanning and improving query efficiency in large volumes of document data.

[0072] Please see Figure 5 , Figure 5 This is a flowchart illustrating an intelligent retrieval method provided in an embodiment of this application.

[0073] like Figure 5 As shown, intelligent retrieval methods can include at least:

[0074] S502. In response to the user's query operation, obtain the query statement entered by the user and the historical query records.

[0075] S504. Input the query statement and historical query records into the pre-trained large language model, and determine the target query information output by the pre-trained large language model. The target query information includes at least one of the following: query intent and query time range.

[0076] S506. Based on the query statement and the target query information, retrieve the corresponding search results from the database.

[0077] For details regarding steps S502-S506, please refer to the detailed descriptions in steps S202-S206, which will not be repeated here.

[0078] S508. Generate corresponding query answers for the search results and display the query answers on the display interface.

[0079] Optionally, to optimize the user's search experience, the results retrieved based on the user's query can be intelligently organized to generate corresponding search answers, which are then displayed on the user's terminal interface in an intuitive and clear manner. Please continue reading. Figure 4This process can be completed by an intelligent question-answering agent. The intelligent question-answering agent analyzes the search results autonomously and answers the user's query questions with search results composed of simple and clear natural language. This process allows users to obtain the information they need at a glance.

[0080] S510. Based on the query statement, target query information, and search results, determine the extended query statement that satisfies the preset relevance of the query statement, and display the shortcut query button corresponding to the extended query statement on the display interface.

[0081] Optionally, to further enhance user convenience and depth of exploration, a series of extended query statements can be intelligently generated based on the current query, target query information, and search results by analyzing the potential relationships between various information. For details, please refer to [link / reference]. Figure 4 The process of expanding related questions can be implemented by an extended question agent. The relevance between these extended query statements and the original query statements is above a preset relevance threshold, ensuring that these extended query statements maintain a certain degree of relevance with the original query statements, thereby effectively broadening the user's query scope and guiding the user to discover more relevant information.

[0082] Optionally, to make it easier for users to initiate these extended queries, quick query buttons can be cleverly embedded in the display interface, with each button corresponding to a specific extended query statement. Users can simply click these buttons to trigger the search process for the extended query statement, seamlessly switching to a new query direction without having to re-enter complex query statements, greatly improving the smoothness of the query and the user experience.

[0083] S512. In response to the user's selection of the quick query button, determine the query operation for the extended query statement and input the extended query statement into the pre-trained large language model.

[0084] Optionally, when a user selects a shortcut query button, the query operation for that extended query statement is quickly determined. Then, using this extended query statement as input, the complete search process for that extended query statement is executed, allowing the user to quickly obtain the search results corresponding to the extended query statement.

[0085] This application provides an intelligent retrieval method that offers users a retrieval question-and-answer function. It organizes the documents and other data retrieved by the user and displays them on the user's terminal interface in a clear and intuitive manner, helping users efficiently and accurately obtain the professional information they need. Furthermore, it proactively expands upon the user's query. Users can simply click these buttons to trigger a retrieval process for the expanded query, seamlessly switching to a new query direction without needing to re-enter complex query statements, greatly improving the fluency of the query and the user experience.

[0086] Please see Figure 6 , Figure 6 This is a structural block diagram of an intelligent retrieval device provided in an embodiment of this application.

[0087] like Figure 6 As shown, the intelligent retrieval device 600 includes:

[0088] The query input module 610 is used to respond to the user's query operation and obtain the query statement entered by the user and the historical query records;

[0089] The query understanding module 620 is used to input the query statement and historical query records into the pre-trained large language model, and determine the target query information output by the pre-trained large language model. The target query information includes at least one of the query intent and query time range.

[0090] The retrieval output module 630 is used to retrieve the retrieval results corresponding to the query statement from the database based on the query statement and the target query information.

[0091] Optionally, the retrieval output module 630 is also used to determine the target retrieval range in the database corresponding to the query operation based on the target query information; and to perform a retrieval within the target retrieval range based on the query statement to obtain the retrieval results corresponding to the query statement.

[0092] Optionally, the retrieval output module 630 is further configured to determine at least one keyword in the query statement and the vector feature corresponding to the query statement; perform text retrieval within the target retrieval range based on each keyword to obtain text retrieval results, and perform vector retrieval within the target retrieval range based on the vector feature to obtain vector retrieval results; and integrate the text retrieval results and the vector retrieval results to obtain the mixed retrieval results corresponding to the query statement.

[0093] Optionally, the intelligent retrieval device 600 further includes: a query rewriting module, used to perform an initial retrieval in the database based on the query statement and target query information to obtain a first retrieval result corresponding to the query statement; and to rewrite the query statement based on the query statement and the initial retrieval result; and a retrieval output module 630, used to perform a second retrieval in the database based on the rewritten query statement and target query information to obtain a second retrieval result corresponding to the rewritten query statement.

[0094] Optionally, the intelligent retrieval device 600 further includes: an index building module, used to obtain the document to be retrieved, perform word segmentation on the document to be retrieved to obtain multiple segmented words corresponding to the document to be retrieved, and generate vector features corresponding to the document to be retrieved; establish an inverted index relationship between each segmented word and the document to be retrieved, establish a vector index relationship between the vector features and the document to be retrieved; and store the document to be retrieved with the inverted index relationship and vector index relationship already built into the database.

[0095] Optionally, the intelligent retrieval device 600 also includes an intelligent question-and-answer module, which generates corresponding query answers for the search results and displays the query answers on the display interface.

[0096] Optionally, the intelligent retrieval device 600 further includes: a question expansion module, used to determine an expanded query statement that satisfies a preset relevance to the query statement based on the query statement, the target query information and the retrieval results, and to display the shortcut query button corresponding to the expanded query statement in the display interface; in response to the user's selection operation triggered by the shortcut query button, to determine the query operation for the expanded query statement, and to input the expanded query statement into the pre-trained large language model.

[0097] In this embodiment, an intelligent retrieval device is provided, comprising: a query input module for responding to a user's query operation and acquiring the user's input query statement and historical query records; a query understanding module for inputting the query statement and historical query records into a pre-trained large language model to determine the target query information output by the pre-trained large language model, wherein the target query information includes at least one of query intent and query time range; and a retrieval output module for performing a retrieval in a database based on the query statement and target query information to obtain the retrieval results corresponding to the query statement. Since the user's current query statement and historical query records effectively illustrate the user's needs, and based on the natural language processing and contextual understanding capabilities of the large language model, the user's intent and required information time range can be understood and analyzed. Intent parsing can accurately capture the user's true purpose and needs in the query, while time analysis adds a time dimension to the query, ensuring that the retrieval results meet the user's timeliness requirements for information. The integration of intent and time information can effectively improve retrieval accuracy and recall, thereby enhancing the user's information retrieval experience.

[0098] This application also provides a computer storage medium that can store multiple instructions adapted for loading by a processor and executing the steps of any of the methods described in the above embodiments.

[0099] Please see Figure 7 , Figure 7 This is a schematic diagram of the structure of a terminal provided in an embodiment of this application. Figure 7 As shown, terminal 700 may include: at least one terminal processor 701, at least one network interface 704, user interface 703, memory 705, and at least one communication bus 702.

[0100] The communication bus 702 is used to enable communication between these components.

[0101] The user interface 703 may include a display screen and a camera. Optionally, the user interface 703 may also include a standard wired interface and a wireless interface.

[0102] The network interface 704 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).

[0103] The terminal processor 701 may include one or more processing cores. The terminal processor 701 connects to various parts within the terminal 700 using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 705, and by calling data stored in the memory 705. Optionally, the terminal processor 701 may be implemented using at least one hardware form selected from Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The terminal processor 701 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required for display on the screen; and the modem handles wireless communication. It is understood that the modem may also be implemented as a separate chip without being integrated into the terminal processor 701.

[0104] The memory 705 may include random access memory (RAM) or read-only memory (ROM). Optionally, the memory 705 may include a non-transitory computer-readable storage medium. The memory 705 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 705 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 705 may also be at least one storage device located remotely from the aforementioned terminal processor 701. Figure 7 As shown, the memory 705, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and an intelligent retrieval program.

[0105] exist Figure 7 In the terminal 700 shown, the user interface 703 is mainly used to provide an input interface for the user and to obtain the user's input data; while the terminal processor 701 can be used to call the intelligent retrieval program stored in the memory 705 and specifically perform the following operations:

[0106] In response to user queries, retrieve the user's input query statement and historical query records;

[0107] Input the query statement and historical query records into the pre-trained large language model to determine the target query information output by the pre-trained large language model. The target query information includes at least one of the following: query intent and query time range.

[0108] The database is searched based on the query statement and the target query information to obtain the search results corresponding to the query statement.

[0109] In some embodiments, when the terminal processor 701 performs a retrieval in the database based on the query statement and the target query information to obtain the retrieval result corresponding to the query statement, it specifically performs the following steps: determining the target retrieval range in the database corresponding to the query operation based on the target query information; and performing a retrieval within the target retrieval range based on the query statement to obtain the retrieval result corresponding to the query statement.

[0110] In some embodiments, when the terminal processor 701 performs a search based on a query statement within a target search range to obtain the search results corresponding to the query statement, it specifically performs the following steps: performing a text search based on each keyword within the target search range to obtain text search results, performing a vector search based on vector features within the target search range to obtain vector search results; and integrating the text search results and the vector search results to obtain the mixed search results corresponding to the query statement.

[0111] In some embodiments, after executing the target query information output by the intent recognition agent, the terminal processor 701 further performs the following steps: performing an initial retrieval in the database based on the query statement and the target query information to obtain a first retrieval result corresponding to the query statement; rewriting the query statement based on the query statement and the initial retrieval result; when the terminal processor 701 executes the retrieval in the database based on the query statement and the target query information to obtain the retrieval result corresponding to the query statement, it further performs the following steps: performing a second retrieval in the database based on the rewritten query statement and the target query information to obtain a second retrieval result corresponding to the rewritten query statement.

[0112] In some embodiments, the terminal processor 701 further performs the following steps: obtaining the document to be retrieved, performing word segmentation on the document to be retrieved to obtain multiple segmented words corresponding to the document to be retrieved, and generating vector features corresponding to the document to be retrieved; establishing an inverted index relationship between each segmented word and the document to be retrieved, and establishing a vector index relationship between the vector features and the document to be retrieved; and storing the document to be retrieved with the inverted index relationship and vector index relationship already constructed into the database.

[0113] In some embodiments, after the terminal processor 701 performs a retrieval in the database based on the query statement and the target query information to obtain the retrieval results corresponding to the query statement, it further performs the following steps: generating a corresponding query answer for the retrieval results and displaying the query answer on the display interface.

[0114] In some embodiments, the terminal processor 701 further performs the following steps: determining an extended query statement that satisfies a preset relevance to the query statement based on the query statement, the target query information, and the retrieval results, and displaying the shortcut query button corresponding to the extended query statement in the display interface; in response to the user's selection operation triggered by the shortcut query button, determining a query operation for the extended query statement, and inputting the extended query statement into the pre-trained large language model.

[0115] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.

[0116] The modules described as separate components may or may not be physically separate. Similarly, the components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0117] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When these computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this specification are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in or transmitted through a computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The aforementioned available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., Digital Versatile Discs (DVDs)), or semiconductor media (e.g., Solid State Disks (SSDs)).

[0118] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0119] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0120] The above is a description of an intelligent retrieval method, device, storage medium, and terminal provided in this application. For those skilled in the art, based on the ideas of the embodiments of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. An intelligent retrieval method, characterized in that, The method includes: In response to a user's query, the system retrieves the user's input query statement and historical query records. The query statement and the historical query records are input into the pre-trained large language model to determine the target query information output by the pre-trained large language model. The target query information includes at least one of query intent and query time range. Based on the query statement and the target query information, a search is performed in the database to obtain the search results corresponding to the query statement.

2. The method according to claim 1, characterized in that, The step of retrieving the search results corresponding to the query statement from the database based on the query statement and the target query information includes: The target retrieval range of the query operation in the database is determined based on the target query information. Based on the query statement, a search is performed within the target search range to obtain the search results corresponding to the query statement.

3. The method according to claim 2, characterized in that, The process of obtaining the search results corresponding to the query statement within the target search range based on the query statement includes: Determine at least one keyword in the query statement and the vector features corresponding to the query statement; Text search results are obtained by performing text search based on each keyword within the target search range, and vector search results are obtained by performing vector search based on the vector features within the target search range. By integrating the text search results and the vector search results, a hybrid search result corresponding to the query statement is obtained.

4. The method according to claim 1, characterized in that, After determining the target query information output by the intent recognition agent, the method further includes: Based on the query statement and the target query information, an initial retrieval is performed in the database to obtain the first retrieval result corresponding to the query statement; The query statement is rewritten based on the query statement and the initial search results; The step of retrieving the search results corresponding to the query statement from the database based on the query statement and the target query information includes: Based on the rewritten query statement and the target query information, a second search result corresponding to the rewritten query statement is obtained by searching the database again.

5. The method according to claim 3, characterized in that, The method further includes: Obtain the document to be retrieved, perform word segmentation on the document to be retrieved to obtain multiple segmented words corresponding to the document to be retrieved, and generate vector features corresponding to the document to be retrieved; Establish an inverted index relationship between each segmented word and the document to be retrieved, and establish a vector index relationship between the vector features and the document to be retrieved; The documents to be retrieved, for which the inverted index relationship and the vector index relationship have been constructed, are stored in the database.

6. The method according to claim 1, characterized in that, After obtaining the search results corresponding to the query statement by retrieving them from the database based on the query statement and the target query information, the method further includes: Generate corresponding query answers for the search results and display the query answers on the display interface.

7. The method according to claim 1, characterized in that, The method further includes: Based on the query statement, the target query information, and the search results, determine the extended query statement that satisfies the preset relevance to the query statement, and display the quick query button corresponding to the extended query statement in the display interface; In response to the user's selection of the quick query button, a query operation for the extended query statement is determined, and the extended query statement is input into the pre-trained large language model.

8. An intelligent retrieval device, characterized in that, The device includes: The query input module is used to respond to the user's query operation and obtain the query statement entered by the user and the historical query records; The query understanding module is used to input the query statement and the historical query records into the pre-trained large language model, and determine the target query information output by the pre-trained large language model. The target query information includes at least one of query intent and query time range. The retrieval output module is used to retrieve the retrieval results corresponding to the query statement by searching the database based on the query statement and the target query information.

9. A computer storage medium, characterized in that, The computer storage medium stores a plurality of instructions adapted for loading by a processor and executing the steps of the method as described in any one of claims 1 to 7.

10. A terminal, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the steps of the method as described in any one of claims 1 to 7.