Data recall method and device, storage medium and program product

By determining target parameters based on query content and knowledge base information in multi-knowledge base scenarios and dynamically selecting parallel or serial retrieval methods, the inefficiency problem in existing technologies is solved, achieving more efficient and accurate knowledge retrieval.

CN121255893APending Publication Date: 2026-01-02ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511323836.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-16
Publication Date
2026-01-02

AI Technical Summary

Technical Problem

Existing technologies employ fixed recall methods in multi-knowledge-base scenarios, resulting in low retrieval efficiency and insufficient accuracy of recall results. This is especially true when the target knowledge is unevenly distributed, leading to wasted computing resources and increased redundant information.

Method used

The target parameters are determined based on the query content and relevant information in the knowledge base. Parallel or serial recall methods are dynamically selected. The target parameters reflect the characteristics of knowledge distribution, and recall strategies are flexibly selected to improve retrieval efficiency and accuracy.

Benefits of technology

By dynamically adjusting the recall method, the efficiency and accuracy of multi-knowledge base retrieval are improved, processing resources are saved, and the comprehensiveness and accuracy of the recall results are ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121255893A_ABST
    Figure CN121255893A_ABST
Patent Text Reader

Abstract

The invention provides a data recall method and device, a storage medium and a program product. Obtaining query content input by a user, and determining target parameters used for reflecting the distribution uniformity of target knowledge related to the query content in at least two knowledge bases based on the query content and / or preset related information of the at least two knowledge bases, based on the target parameter, determining a recall mode of recalling the target knowledge from at least two preset knowledge bases, the recall mode comprising recalling the target knowledge from the at least two knowledge bases in parallel, or recalling the target knowledge from the at least two knowledge bases in series according to a preset priority order; recalling the target knowledge from the at least two knowledge bases based on the recall mode, and sorting the target knowledge; and obtaining a query result corresponding to the query content based on the sorting result, and returning the query result to the user.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] One or more embodiments of the present specification relate to the technical field of retrieval, and in particular, to a data recall method, device, storage medium and program product. BACKGROUND

[0002] In many application scenarios, a knowledge base can be constructed in advance, and after receiving a query request of a user, relevant knowledge can be recalled from the knowledge base, a corresponding query result is obtained based on the recalled relevant knowledge, and is returned to the user. For example, with the development of artificial intelligence technology, various types of intelligent agents emerge in an endless stream, and different professional-level intelligent agents can be constructed for different fields to implement intelligent decision-making. When constructing an intelligent agent, a corresponding knowledge base can be constructed so that the intelligent agent can recall relevant knowledge from the knowledge base after receiving a query request of a user, and return a corresponding query result. In related technologies, for a multi-knowledge base scenario, relevant knowledge is usually recalled from the knowledge base according to a fixed recall strategy. With the increasing number and types of knowledge bases, the recall efficiency of this recall method is relatively low, and the accuracy of the recall result needs to be improved. SUMMARY

[0003] Therefore, one or more embodiments of the present specification provide technical solutions as follows.

[0004] According to a first aspect of one or more embodiments of the present specification, a data recall method is provided, and the method comprises:

[0005] obtaining query content input by a user;

[0006] determining a target parameter based on the query content and / or relevant information of at least two preset knowledge bases, the target parameter reflecting uniformity of distribution of target knowledge related to the query content in the at least two knowledge bases;

[0007] determining a recall manner of recalling the target knowledge from the at least two preset knowledge bases based on the target parameter, the recall manner comprising recalling target knowledge related to the query content from the at least two knowledge bases in parallel, or recalling target knowledge related to the query content from the at least two knowledge bases in a preset priority order in series until the recalled target knowledge meets a preset condition;

[0008] recalling the target knowledge from the at least two knowledge bases based on the recall manner, and performing sorting processing on the target knowledge;

[0009] obtaining a query result corresponding to the query content based on the sorting result, and returning the query result to the user.

[0010] According to a second aspect of one or more embodiments of the present specification, a data recall device is provided, the device comprising:

[0011] an acquisition module configured to acquire query content input by a user;

[0012] a target parameter determination module configured to determine a target parameter based on the query content and / or relevant information of at least two knowledge bases preset, the target parameter being used to reflect uniformity of distribution of target knowledge related to the query content in the at least two knowledge bases;

[0013] a recall mode determination module configured to determine a recall mode for recalling the target knowledge from the at least two knowledge bases based on the target parameter, the recall mode comprising recalling the target knowledge related to the query content from the at least two knowledge bases in parallel, or recalling the target knowledge related to the query content from the at least two knowledge bases in a preset priority order in series until the recalled target knowledge meets a preset condition;

[0014] an ordering module configured to recall the target knowledge from the at least two knowledge bases based on the recall mode and perform ordering processing on the target knowledge;

[0015] a query result determination module configured to obtain a query result corresponding to the query content based on an ordering result and return the query result to the user.

[0016] According to a third aspect of an embodiment of the present specification, an electronic device is provided, comprising:

[0017] a processor;

[0018] a memory for storing processor-executable instructions;

[0019] wherein the processor executes the executable instructions to implement the method of the first aspect.

[0020] According to a fourth aspect of an embodiment of the present specification, a computer-readable storage medium is provided, having a computer program stored thereon, the program being executed by a processor to implement the steps of the method of the first aspect.

[0021] According to a fifth aspect of an embodiment of the present specification, a computer program product is provided, comprising a computer program, the computer program being executed by a processor to implement the steps of the method of the first aspect.

[0022] From the above embodiments, it can be seen that the present specification considers that the distribution characteristics of the target knowledge related to different query content in multiple knowledge bases are also different, for example, some query content related target knowledge may be concentrated in a few knowledge bases, and some query content related target knowledge may be evenly distributed in all knowledge bases. Therefore, after obtaining the query content input by the user, one or more of the query content and the preset related information of the at least two knowledge bases can be used to determine a target parameter, which can be used to reflect the uniformity of the distribution of the target knowledge related to the query content in the at least two knowledge bases. Then, based on the target parameter, it can be determined whether to use a recall mode of recalling target knowledge from at least two knowledge bases in parallel, or a recall mode of recalling target knowledge from at least two knowledge bases in series according to a preset priority order until the recalled target knowledge meets a preset condition. By flexibly selecting the optimal recall mode in the current query scene based on the distribution characteristics (such as concentrated distribution or uniform distribution) of the target knowledge related to the query content in multiple knowledge bases, compared with using a fixed recall strategy, the retrieval efficiency can be greatly improved, the processing resources can be saved, and the comprehensiveness and accuracy of the recall result can be guaranteed. BRIEF DESCRIPTION OF DRAWINGS

[0023] Figure 1 FIG. 1 is a schematic diagram of an application scenario provided by an example embodiment.

[0024] Figure 2 FIG. 2 is a flowchart of a data recall method provided by an example embodiment.

[0025] Figure 3 FIG. 3 is a flowchart of recalling target knowledge related to query content from multiple knowledge bases in parallel provided by an example embodiment.

[0026] Figure 4 FIG. 4 is a flowchart of recalling target knowledge related to query content from multiple knowledge bases in series provided by an example embodiment.

[0027] Figure 5 FIG. 5 is a schematic diagram of an intelligent agent development page provided by an example embodiment.

[0028] Figure 6 FIG. 6 is a structural schematic diagram of an electronic device provided by an example embodiment.

[0029] Figure 7 FIG. 7 is a block diagram of a data recall device provided by an example embodiment. DETAILED DESCRIPTION

[0030] In order for those skilled in the art to better understand the technical solutions in the specification, the technical solutions in the specification will be clearly and completely described below in conjunction with the drawings in the embodiments of the specification. Obviously, the described embodiments are only part of the embodiments of the specification, not all. Based on the embodiments in the specification, all other embodiments obtained by those of ordinary skill in the art without creative labor should be within the scope of protection of the specification.

[0031] The user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the specification are information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation portal for user to choose authorization or refusal.

[0032] The knowledge base is a structured and systematic collection of stored and managed knowledge. It organizes scattered information according to specific rules to form a knowledge system that can be efficiently retrieved, reused and updated. In many application fields, efficient retrieval and information management can be achieved by building a knowledge base.

[0033] For example, taking the construction of an agent as an example, when constructing an agent, a corresponding knowledge base can usually be constructed so that the agent can recall relevant knowledge from the knowledge base after receiving a user query request and return the corresponding query result. In order to meet the diversified retrieval needs of users, the number of constructed knowledge bases usually includes multiple, and different knowledge bases can be used to store knowledge in different types, different fields or different use scenarios. In related technologies, after receiving a user query request, a fixed recall method is usually used to recall the knowledge that the user wants from multiple knowledge bases, for example, for a multi-knowledge base scenario, the recall method provided in related technologies usually initiates a retrieval request to multiple preset knowledge bases at the same time, and then sorts the results returned by each knowledge base.

[0034] Obviously, when the target knowledge related to the query content is mainly concentrated in a few knowledge bases, parallel retrieval of all knowledge bases will lead to invalid access to low-relevance knowledge bases, consuming a large amount of computing resources, and may introduce redundant information, increasing the complexity of subsequent sorting processing, resulting in low retrieval efficiency.

[0035] Based on this, embodiments of this specification provide a data retrieval method. Considering that the distribution characteristics of target knowledge related to different query content vary across multiple knowledge bases—for example, target knowledge related to some query content may be concentrated in a few knowledge bases, while target knowledge related to some query content may be evenly distributed across all knowledge bases—after obtaining the query content input by the user, target parameters can be determined based on the query content and one or more of the relevant information from at least two preset knowledge bases. These target parameters can be used to reflect the uniformity of the distribution of target knowledge related to the query content across the at least two knowledge bases. If the target parameters determine that the target knowledge is evenly distributed across the at least two knowledge bases, a retrieval method that retrieves target knowledge from the at least two knowledge bases in parallel can be adopted. If the target parameters determine that the target knowledge is concentrated in a few knowledge bases, a retrieval method that retrieves target knowledge serially from the at least two knowledge bases according to a preset priority order until the retrieved target knowledge meets preset conditions can be adopted. By flexibly selecting the optimal recall method for the current query scenario based on the distribution characteristics of target knowledge related to the query content across multiple knowledge bases (e.g., concentrated or uniform distribution), compared to using a fixed recall strategy, retrieval efficiency can be greatly improved, processing resources can be saved, and the comprehensiveness and accuracy of the recall results can be guaranteed.

[0036] The following uses an intelligent agent as an example to illustrate an application scenario of the embodiments in this specification. Figure 1 This is a schematic diagram of the architecture of an intelligent agent service system provided in an exemplary embodiment. For example... Figure 1 As shown, the intelligent agent service system may include a server 11, a network 12, and several electronic devices, such as a PC (Personal Computer) 13, a mobile phone 14, etc.

[0037] Server 11 can be a physical server containing an independent host, or it can be a virtual server hosted in a host cluster. During operation, server 11 can run server-side programs for a specific agent service to implement the relevant functions of that agent service. For example, when server 11 runs the agent service program, it can function as a corresponding agent service platform. The server side stores multiple pre-built knowledge bases related to the agent's functions, such as Knowledge Base 1, Knowledge Base 2, etc.

[0038] PC13 and mobile phone14 are just some of the types of electronic devices that users can use. In reality, users can obviously also use electronic devices such as tablets, laptops, PDAs (Personal Digital Assistants), wearable devices (such as smart glasses, smartwatches, etc.), etc., and one or more embodiments in this specification do not limit this. During operation, the electronic device can run a client-side program for a certain intelligent agent service to implement the relevant functions of that intelligent agent service. For example, when the electronic device runs the intelligent agent service program, it can act as a client for that intelligent agent service. The aforementioned intelligent agent service client application can be launched and run on the electronic device. This client-side program can be a native application installed on the electronic device, or it can be a mini-program, quick app, or other similar form. Of course, when using web technologies such as HTML5 or similar, the relevant functions can be implemented through a page displayed by a browser. This browser can be a standalone browser application or a browser module embedded in some applications.

[0039] As for the network 12 that enables interaction between electronic devices such as PC13 and mobile phone 14 and server 11, communication can be achieved using either wired or wireless networks, depending on the communication methods supported by the respective electronic devices. This specification does not impose any restrictions on this. For example, PC13 can support both wired and wireless communication, so it can use either wired or wireless networks as needed. Mobile phone 14 typically only supports wireless communication, so it can use a wireless network for communication.

[0040] Taking the intelligent agent as an example of intelligent customer service, users can input query content through the client in PC13 or mobile phone14. The client can send the query content to the server in server11. The server can query knowledge related to the query content from multiple pre-set knowledge bases, obtain the corresponding query results, and return them to the client so that the client can display the query results to the user.

[0041] like Figure 2 As shown, the method may include the following steps:

[0042] S202. Obtain the query content input by the user;

[0043] In step S202, the query content input by the user can be obtained. The query content can be text, images, or other information input by the user. For example, the query content can be keywords, a question, a paragraph, one or more images, etc.

[0044] S204. Based on the query content and / or relevant information from at least two preset knowledge bases, determine target parameters, wherein the target parameters are used to reflect the uniformity of the distribution of target knowledge related to the query content in the at least two knowledge bases.

[0045] In step S204, after obtaining the query content, target parameters can be determined based on the query content and one or more of the relevant information from at least two preset knowledge bases. These target parameters can reflect the uniformity of the distribution of target knowledge related to the query content across the at least two knowledge bases. The relevant information from the at least two knowledge bases can be descriptive information about the knowledge bases, such as their topics, introductions, etc., or the coverage of content within the knowledge bases, historical query hit rates, etc.

[0046] Generally, the more complex the query content, the higher the openness, and the more generalized the query intent, the more likely the related target knowledge is to be distributed across various knowledge bases. That is, the target knowledge may be relatively evenly distributed across at least two knowledge bases. Therefore, the target parameter can be determined based on these characteristic attributes of the query content. For example, one of the characteristic attributes can be used as the target parameter, or multiple characteristic attributes can be processed to obtain the target parameter. In this way, the target parameter can be used to reflect the evenness of the distribution of the target knowledge related to the query content across at least two knowledge bases.

[0047] Furthermore, if the relevance of the query content to one knowledge base is significantly higher than that to other knowledge bases, or if the recall results for historical queries of the same type as the query content are mainly concentrated in one or more knowledge bases, it indicates that the target knowledge related to the query content is likely concentrated in a few knowledge bases, meaning the distribution uniformity is low. Therefore, based on relevant information in the query content and knowledge bases, association attributes characterizing the relationship between the query content and the knowledge bases can be determined. The target parameter can then be determined based on these association attributes. For example, a single association attribute can be used as the target parameter, or multiple association attributes can be processed to obtain the target parameter. This allows the target parameter to reflect the uniformity of the distribution of target knowledge related to the query content across at least two knowledge bases.

[0048] S206. Based on the target parameters, determine a recall method for recalling the target knowledge from at least two preset knowledge bases. The recall method includes recalling target knowledge related to the query content from the at least two knowledge bases in parallel, or recalling target knowledge related to the query content from the at least two knowledge bases in a serial order according to a preset priority, until the recalled target knowledge meets the preset conditions.

[0049] In step S206, after determining the target parameters, a retrieval method can be determined based on the target parameters to retrieve target knowledge related to the query content from at least two preset knowledge bases. This retrieval method includes retrieving target knowledge from at least two knowledge bases in parallel or sequentially. For example, if the target parameters indicate a good even distribution of target knowledge across all knowledge bases, meaning that target knowledge related to the query content is evenly distributed in each knowledge base, then to improve retrieval efficiency, the at least two knowledge bases can be searched in parallel to retrieve the target knowledge from each knowledge base. This improves retrieval efficiency and ensures the comprehensiveness of the retrieved content. If the target parameters indicate a poor even distribution of target knowledge across all knowledge bases, meaning that target knowledge may be concentrated in a few knowledge bases, then the at least two knowledge bases can be searched sequentially. That is, priority is given to searching the knowledge bases where target knowledge is concentrated, so that the search is paused when the retrieved target knowledge meets certain conditions, avoiding searching all knowledge bases and improving retrieval efficiency. The preset conditions can be flexibly set based on the actual query scenario and needs. For example, the number of recalled target knowledge can reach a certain number, or there can be target knowledge with a high degree of matching among the recalled target knowledge.

[0050] S208. Retrieve the target knowledge from the at least two knowledge bases based on the recall method, and sort the target knowledge.

[0051] In step S208, after determining the recall method, target knowledge related to the query content can be recalled from the at least two knowledge bases based on the determined recall method. Then, the target knowledge recalled from each knowledge base can be sorted, for example, the recalled target knowledge can be sorted in descending order of relevance to the query content.

[0052] S210. Obtain the query results corresponding to the query content based on the sorting results, and return them to the user.

[0053] In step S210, the query results corresponding to the query content can be obtained based on the ranking results. For example, in some scenarios, a portion of the target knowledge can be selected from the recalled target knowledge based on the ranking results, and returned to the user as the query results for the query content. In some scenarios, all recalled target knowledge bases can also be returned to the user as query results. When displaying the query results to the user, the results can be presented in descending order of relevance to the query content.

[0054] Of course, in some embodiments, some or all of the target knowledge can be selected from the recalled target knowledge based on the ranking results as the recall results. Then, prompt words can be constructed based on the recall results, the prompt words can be input into a preset language model, the language model can be used to output the query results, and the results can be returned to the user.

[0055] In some embodiments, the target parameter includes the complexity of the query content. When determining the retrieval method for retrieving target knowledge from at least two preset knowledge bases based on the target parameter, it can be determined whether the complexity is higher than the preset complexity. If the complexity is higher than the preset complexity, the retrieval method is to retrieve the target knowledge from at least two knowledge bases in parallel.

[0056] The complexity of the query content is used as a target parameter to measure the distribution characteristics of the target knowledge. By quantitatively analyzing dimensions such as the logical hierarchy, information relevance, and reasoning depth of the query content (e.g., determining whether the question involves multiple factors, requires cross-domain knowledge integration, or includes multi-level logical reasoning), a comparable complexity index is formed and compared with a preset complexity threshold to dynamically select the recall method. For example, when the complexity of the query content is higher than the preset threshold (such as questions involving multi-dimensional analysis and requiring the integration of multi-source knowledge, like "analyzing the market potential and three core challenges of an emerging industry in conjunction with technological development and policy guidance"), it can be assumed that the relevant target knowledge is more likely to be scattered across multiple knowledge bases. In this case, a parallel recall mechanism is automatically triggered, simultaneously initiating search requests to all preset knowledge bases to comprehensively capture relevant information from each base. If the complexity is lower than the threshold (such as questions with simple logic and concentrated knowledge, like "the basic definition of a term"), a lighter approach such as serial recall can be selected. This dynamic adjustment mechanism ensures the quality of results for complex queries while also taking into account the efficiency of simple queries, thus achieving a balance between resource utilization and user experience, and enabling different types of queries to obtain efficient and accurate results.

[0057] In some embodiments, the target parameter includes the openness of the query content. When determining the retrieval method for retrieving target knowledge from at least two preset knowledge bases based on the target parameter, it can be determined whether the openness is higher than a preset openness. If it is higher, the retrieval method is to retrieve the target knowledge from at least two knowledge bases in parallel. The openness of the query content is used as a target parameter reflecting the uniformity of the distribution of target knowledge across multiple knowledge bases. The openness of the query content is quantitatively evaluated (e.g., determining whether the question has a unique answer, whether it involves cross-domain information, whether multi-dimensional analysis is required, etc.) and compared with a preset openness threshold to dynamically decide the retrieval method. For example, when the openness of the query content is higher than the preset threshold, it is determined that the target knowledge is more likely to be scattered across multiple knowledge bases. In this case, a parallel retrieval method is automatically adopted, simultaneously initiating retrieval requests to all preset knowledge bases. For example, for questions like "analyze the development trends and potential risks of a certain industry over the next five years"—questions without fixed answers that require the integration of information from multiple domains—the relevant knowledge may be scattered across multiple knowledge bases. Therefore, a parallel retrieval method can be used to improve retrieval efficiency and the completeness of the retrieval results. If the openness level is below the threshold, for example, if the query content is "the specific time when a certain historical event occurred" (a question with clear answers and concentrated in a specific knowledge base), then more efficient methods such as serial recall can be chosen.

[0058] In some embodiments, the target parameter includes the degree of difference in relevance between the query content and the descriptive information (e.g., the topic, domain scope, and introduction of the knowledge base) of at least two knowledge bases. When determining the retrieval method for retrieving target knowledge from at least two preset knowledge bases based on the target parameter, it can be determined whether the degree of difference is greater than a preset degree. If the degree of difference is less than or equal to the preset degree, the retrieval method is to retrieve the target knowledge from at least two knowledge bases in parallel. If the degree of difference is greater than the preset degree, the retrieval method is to retrieve the target knowledge from at least two knowledge bases serially. The priority order of the at least two knowledge bases is determined based on the aforementioned relevance; for example, knowledge bases with higher relevance are ranked higher.

[0059] By calculating the relevance of the query content to the descriptive information of each knowledge base, such as its topic, domain scope, and content summary, and then measuring the dispersion (i.e., the degree of difference) between these relevances, a decision-making recall method is adopted. If the degree of difference is less than or equal to the preset degree, for example, the relevance scores of the query content to each knowledge base are relatively close, all in the range of 0.7-0.8, it indicates that the target knowledge may be evenly distributed across multiple knowledge bases. In this case, a parallel recall method is used, simultaneously retrieving from all knowledge bases to comprehensively cover relevant information. If the degree of difference is greater than the preset degree, for example, some knowledge bases have significantly higher relevance than others (e.g., knowledge base A: 0.9, knowledge base B: 0.8, knowledge base C: 0.2), it is determined that the target knowledge is more concentrated in one or more knowledge bases. In this case, a serial recall method is adopted, searching in descending order of relevance, prioritizing the results of highly relevant knowledge bases. If the results do not meet the preset conditions, the next level of knowledge base is called. By accurately predicting the distribution characteristics of knowledge through the degree of relevance differences, dynamic adaptation of recall methods can be achieved. This avoids the waste of resources caused by fixed strategies and takes into account the retrieval quality under different distribution scenarios, achieving a balance between efficiency and comprehensiveness, and improving the adaptability and user experience of multi-knowledge base retrieval systems.

[0060] In some embodiments, the target parameter includes the distribution uniformity of recall results corresponding to historical query content of the same type across at least two knowledge bases. When determining the recall method for retrieving target knowledge from at least two preset knowledge bases based on the target parameter, it can be determined whether the distribution uniformity is greater than a preset uniformity. If the distribution uniformity is greater than or equal to the preset uniformity, the recall method is to recall target knowledge from at least two knowledge bases in parallel. If the distribution uniformity is less than the preset uniformity, the recall method is to recall target knowledge from at least two knowledge bases serially. The priority order of the at least two knowledge bases is determined based on the distribution of recall results corresponding to historical query content across at least two knowledge bases; for example, the knowledge base with a higher distribution of recall results for historical query content is ranked higher.

[0061] By analyzing the distribution uniformity of recall results corresponding to historical queries of the same type across at least two knowledge bases as the core objective parameter, the distribution characteristics of recall results for similar queries in history are analyzed across different knowledge bases. For example, whether the proportion of valid results contributed by each knowledge base is balanced is considered. A quantitative distribution uniformity index is calculated and compared with a preset uniformity threshold to dynamically determine the recall method. For instance, if the distribution uniformity is greater than or equal to the preset uniformity (i.e., the results of similar historical queries are evenly distributed across multiple knowledge bases), it indicates that the target knowledge for the current query may also be evenly distributed across multiple knowledge bases. In this case, a parallel recall method is used, simultaneously retrieving from all knowledge bases to ensure comprehensiveness. If the distribution uniformity is less than the preset uniformity (i.e., the results of similar historical queries are concentrated in a few knowledge bases), it is determined that the target knowledge for the current query is more likely to be concentrated. In this case, a serial recall method is used, and the results are retrieved sequentially in descending order of contribution from historical distribution (i.e., knowledge bases that have historically returned more valid results are prioritized). If the recall results from the preceding knowledge base do not meet the preset conditions, subsequent knowledge bases are called. This dynamic adjustment mechanism based on historical patterns not only improves the accuracy of decision-making but also takes into account the retrieval efficiency and quality under different distribution scenarios, enabling the system to adapt to diverse query types and ultimately optimize the user experience.

[0062] In some embodiments, such as Figure 3 As shown, this recall method retrieves target knowledge from at least two knowledge bases in parallel. When retrieving target knowledge from at least two knowledge bases based on the recall method and sorting the target knowledge, the at least two knowledge bases can be searched in parallel to retrieve target knowledge related to the query content. Then, the target knowledge retrieved from the at least two knowledge bases can be re-sorted based on the matching degree between each retrieved target knowledge and the query content. The matching degree between the target knowledge and the query content in different knowledge bases is calculated in the same way.

[0063] When retrieving target knowledge from a single knowledge base, the methods for calculating the matching degree between knowledge and query content may differ. When using a parallel retrieval approach, search requests can be initiated simultaneously to at least two pre-defined knowledge bases, synchronously retrieving target knowledge related to the query content from each base. After all knowledge bases return results, the method is no longer limited to the source or initial order of the target knowledge. Instead, the matching degree between each piece of target knowledge and the query content is calculated uniformly using the same method. Based on this matching degree, all retrieved knowledge is globally reordered, ultimately forming a result sequence arranged from highest to lowest relevance. Using the matching degree obtained through the same calculation method to globally reorder target knowledge retrieved from multiple knowledge bases breaks down the boundaries of knowledge bases, allowing the most relevant knowledge to be presented first regardless of its source. This ensures both the comprehensiveness and accuracy of the results, while parallel processing reduces retrieval time.

[0064] In some embodiments, for parallel recall scenarios, considering that the weights of different knowledge bases may differ for different query content, these weights can be preset by the user or determined in real time based on relevant information about the query content and the knowledge base. When re-ranking the target knowledge recalled from at least two knowledge bases based on the matching degree between each recalled target knowledge and the query content, the matching degree between the target knowledge recalled from that knowledge base and the query content can be weighted according to the weight of each knowledge base in the at least two knowledge bases, and the target knowledge recalled from the at least two knowledge bases can be re-ranked based on the weighted matching degree.

[0065] For parallel retrieval scenarios, knowledge base weights can be introduced to dynamically adjust the matching degree. Different weights can be assigned to each knowledge base participating in parallel retrieval for different query content. These weights can be pre-set by the user based on scenario requirements or domain experience (e.g., increasing the weight of professional domain knowledge bases), or calculated in real-time based on information such as the topic relevance and historical contribution of the query content to the knowledge base. When ranking the target knowledge in parallel retrieval, the matching degree of each target knowledge is first weighted by the weight of its respective knowledge base to obtain a weighted matching degree. Then, all knowledge from all sources is globally re-ranked based on this weighted matching degree. This weighting mechanism achieves differentiated consideration of the "authority" or "relevance" of different knowledge bases, ensuring that the ranking results reflect both the matching degree between the knowledge itself and the query content, as well as the reliability or domain adaptability of its source, significantly improving the accuracy of the ranking.

[0066] In some embodiments, such as Figure 4 As shown, when reordering target knowledge retrieved from at least two knowledge bases based on the matching degree between each retrieved target knowledge and the query content, the correlation between results can be strengthened through a sequential, iterative approach. For example, the target knowledge with the highest matching degree among all retrieved target knowledge can be ranked first and used as the current target knowledge. This target knowledge with the highest matching degree is then concatenated with the query content, and the concatenated content is used as the current content to be matched. The following sorting operation is then performed: The matching degree between each unsorted target knowledge among all retrieved target knowledge and the current content to be matched is determined. The target knowledge with the highest matching degree is ranked after the current target knowledge. It is then determined whether there is any unsorted target knowledge among all retrieved target knowledge. If so, the target knowledge with the highest matching degree among the unsorted target knowledge among all retrieved target knowledge is taken as the current target knowledge and concatenated with the current content to be matched. The concatenated content is used as the new current content to be matched, and the above sorting operation is returned. If this is the case, the sorting is considered complete.

[0067] For example, suppose the query content is query text, and there are 5 target knowledge items retrieved from at least two knowledge bases. The matching degree between each target knowledge item and the query text is as follows: Knowledge 1 (0.9), Knowledge 2 (0.8), Knowledge 3 (0.7), Knowledge 4 (0.6), and Knowledge 5 (0.7). Then, Knowledge 1, with the highest matching degree, can be selected from the 5 target knowledge items and ranked first. Next, the query text can be concatenated with Knowledge 1 to obtain "Query Text + Knowledge 1". Then, the matching degree between "Query Text + Knowledge 1" and Knowledge 2, Knowledge 3, Knowledge 4, and Knowledge 5 can be calculated, for example: Knowledge 2 (0.75), Knowledge 3 (0.85), Knowledge 4 (0.7), and Knowledge 5 (0.6). Knowledge 3, with the highest matching degree, can be selected and ranked second. Then, "Query Text + Knowledge 1" can be concatenated with Knowledge 3 to obtain "Query Text + Knowledge 1 + Knowledge 3". Then, the matching degree between "Query Text + Knowledge 1 + Knowledge 3" and Knowledge 2, Knowledge 4, and Knowledge 5 can be calculated. Based on the matching degree, the knowledge item ranked third can be selected. Repeat the above process until the five target knowledge items are sorted.

[0068] By using the "query content + sorted knowledge" formed by iterative splicing as a dynamic matching benchmark, the relevance between subsequent knowledge and previous text can be continuously strengthened, making the sorted results form a logically coherent information chain. This better aligns with the user's information acquisition logic of extending from core needs to details, while avoiding the fragmentation of content that may result from simply relying on the initial matching degree for sorting. This significantly improves the coherence and usability of the results and optimizes the user's reading and information integration experience.

[0069] In some embodiments, the recall method involves sequentially recalling the target knowledge from at least two knowledge bases. When recalling target knowledge from at least two knowledge bases based on the recall method and sorting the target knowledge, the at least two knowledge bases can be retrieved sequentially according to a preset priority order to recall target knowledge related to the query content. For the currently retrieved knowledge base, it can be determined whether the target knowledge recalled from this knowledge base and all previous knowledge bases meets preset conditions. If so, the retrieval of the next knowledge base is stopped, and the target knowledge recalled from each retrieved knowledge base is sorted according to priority order to obtain a sorting result.

[0070] If a serial retrieval method is used, searches can be initiated on at least two knowledge bases one by one according to a preset priority order (e.g., the priority order can be set based on the topic relevance of the knowledge base to the query content, historical hit rate, etc., and the priority order can also be predefined by the user). For example, the knowledge base ranked first is searched first to obtain target knowledge related to the query content; then it is determined whether the retrieved knowledge meets preset conditions (e.g., the number of results reaches the TopN threshold, the matching degree is higher than the minimum standard, etc.). If not, the search continues to the next priority knowledge base until the conditions are met and the search stops. During the final sorting, the knowledge retrieved from each knowledge base is directly concatenated according to the retrieval order (i.e., the results of the knowledge base retrieved earlier are ranked first, and the results of the knowledge base retrieved later are ranked last), without cross-database re-sorting.

[0071] Serial retrieval combined with a conditional termination mechanism can promptly stop searching low-priority knowledge bases when a sufficient quantity or quality of knowledge has been obtained, significantly reducing unnecessary computational resource consumption and greatly improving retrieval efficiency. The direct sorting method based on priority preserves the priority of results from high-priority knowledge bases (meeting preset domain authority or relevance judgments) while avoiding the additional computational cost of cross-database sorting. This is particularly suitable for scenarios where target knowledge is concentrated in high-priority knowledge bases, ensuring result validity while responding quickly to user needs in a lighter manner, thus optimizing the balance between system performance and user experience.

[0072] In some embodiments, the above-mentioned preset conditions include one or more of the following:

[0073] The cumulative number of target knowledge retrieved from the currently retrieved knowledge base is greater than the preset number.

[0074] For example, whether the cumulative number of target knowledge items recalled from the currently retrieved knowledge base exceeds 10.

[0075] Among the target knowledge retrieved from the currently searched knowledge base, at least one piece of target knowledge has a matching degree greater than or equal to the preset matching degree with the query content.

[0076] For example, if there is a target knowledge that matches the query content with a score higher than 0.9.

[0077] The preset conditions can vary depending on the query scenario. For example, in scenarios requiring precise retrieval (such as when the answer to a user's question is fixed), users often want to obtain that unique answer. Therefore, the decision to terminate the search can be based on whether the unique answer has been found (using matching degree determination). Conversely, in scenarios requiring generalized retrieval (such as when the answer to a user's question is not unique), the quantity of retrieved knowledge can be used as a constraint to determine whether to terminate the search. By precisely controlling the timing of search termination through quantified preset conditions, this approach avoids both the resource waste caused by "over-searching" (such as continuing to call low-priority libraries even after obtaining sufficient information) and the negative impact on user experience caused by "insufficient retrieval" (such as too few results or a lack of highly relevant knowledge).

[0078] In some embodiments, the retrieval of each knowledge in the at least two knowledge bases is performed as follows: a target retrieval strategy is determined from a set of pre-set retrieval strategies based on the query content. Different retrieval strategies determine the matching degree between the query content and the knowledge in the knowledge base in different ways. Target knowledge related to the query content is retrieved from the knowledge base based on the target retrieval strategy. For retrieval of a single knowledge base, the retrieval strategy can be dynamically adjusted during the retrieval process. For example, a target retrieval strategy can be matched to the current knowledge base from a set of pre-set retrieval strategies based on the characteristics of the query content (such as topic, complexity, intent type, etc.). The difference between different retrieval strategies lies in the way the matching degree between the query content and the knowledge in the knowledge base is calculated. For example, for generalized retrieval, a semantic matching-based retrieval strategy is often suitable, while for precise retrieval, a keyword matching-based retrieval strategy is often suitable. In some scenarios requiring comprehensive retrieval, a combination of the above two strategies may be necessary. When retrieving a single knowledge base, the retrieval strategy can be dynamically adjusted based on the query content, ensuring that the matching degree calculation method is highly compatible with the needs of the query content. This avoids the limitations of a single retrieval strategy in diverse query scenarios and significantly improves the accuracy of single-base retrieval.

[0079] In some embodiments, the retrieval strategy includes one or more of the following: a keyword-based retrieval strategy, a semantic-based retrieval strategy, and a hybrid retrieval strategy, wherein the hybrid retrieval strategy indicates that knowledge is retrieved from the knowledge base simultaneously based on the keyword-based retrieval strategy and the semantic retrieval strategy.

[0080] Keyword-based retrieval strategies extract core words from the query content and perform precise or fuzzy matching (such as exact match, synonym expansion match, etc.) with keywords in the knowledge base to determine the matching degree. This strategy is suitable for precise retrieval scenarios. Semantic-based retrieval strategies, on the other hand, use natural language processing models to understand the deep semantic connections between the query content and knowledge (such as context and implicit intent) to calculate the matching degree. They are not limited to literal keywords and are suitable for generalized retrieval scenarios. Hybrid retrieval strategies combine the advantages of the first two methods, ensuring retrieval efficiency and accuracy through keyword matching while capturing implicit connections through semantic analysis, covering more complex matching scenarios.

[0081] In some embodiments, when retrieving target knowledge related to the query content from the knowledge base based on a target retrieval strategy, the matching degree between each piece of knowledge in the knowledge base and the query content can be determined first based on the target retrieval strategy. Then, candidate knowledge with a matching degree greater than a preset matching degree can be selected from the knowledge base and sorted in descending order of matching degree. The top N candidate knowledge pieces are selected as target knowledge, where N is a positive integer. For example, the matching degree between each piece of knowledge in the knowledge base and the query content can be calculated based on the currently selected target retrieval strategy (e.g., a keyword matching retrieval strategy). Then, knowledge with a matching degree higher than a preset threshold is filtered out as candidate knowledge, excluding low-relevance information. Subsequently, the candidate knowledge is sorted in descending order of matching degree, and the top N pieces (N is a preset positive integer, such as 5 or 10 pieces) are selected as the final target knowledge retrieved from the database. By filtering with a matching degree threshold, irrelevant or low-quality knowledge can be effectively eliminated, reducing redundant information in subsequent processing. The operation of sorting and extracting the first N items ensures that the knowledge retrieved from a single database is the most relevant and valuable core content. This controls the number of results to avoid information overload and also guarantees the accuracy of the knowledge in the single database.

[0082] The following section provides a detailed description of the data retrieval method provided in the embodiments of this specification, using a specific example: the construction of an intelligent agent. Currently, many language model open platforms offer intelligent agent construction functionality, allowing developers to build professional-grade intelligent agents that meet their needs. When constructing an intelligent agent, developers can set up multiple knowledge bases and select retrieval strategies on the development page to retrieve knowledge related to the user's query content from multiple knowledge bases. Figure 5 The image shown is a development page for building an intelligent agent according to one embodiment. For example, the recall strategy may include: a preferred selection strategy, a list-order strategy, and an automatic switching strategy (i.e., automatically selecting one from the preferred selection strategy and the list-order strategy).

[0083] (1) Optimal selection strategy: If the developer chooses the optimal selection strategy for the recall of the agent, after the agent is built, when the user inputs the query content to the agent, the agent can simultaneously send retrieval requests to all knowledge bases (parallel recall), mix and sort the results returned by all knowledge sources (i.e., perform global reordering), and select the part with a higher degree of matching with the question as the recall result.

[0084] (2) List-Order Strategy: If the developer selects the optimal selection strategy for the agent's recall strategy, the developer can set the priority order of multiple knowledge bases. After the agent is built, when the user inputs query content into the agent, the agent can call the knowledge bases one by one according to the preset priority order. If the result of the current knowledge base does not meet the preset conditions, it continues to call the next one (i.e., serial recall) until the recall result meets the preset conditions, and then stops calling the next knowledge base. Then, the recall results are directly concatenated according to the priority order of the knowledge bases (e.g., [M1, M2, M3], where Mi is the array of knowledge base results in the corresponding order), and the first N items are taken (without cross-database reordering).

[0085] (3) Automatic switching strategy: If the developer selects the automatic switching strategy as the recall strategy for the agent, after the agent is built, when the user inputs query content into the agent, the agent can determine the target parameters that reflect the uniformity of the distribution of target knowledge related to the query content in at least two knowledge bases based on the query content and the relevant information of multiple pre-set knowledge bases. Based on the target parameters, the agent determines whether to use the best selection strategy or the list order strategy for the current query. The priority order of multiple knowledge bases can be preset by the user or automatically determined by the agent through analysis of the association attributes of the query content and knowledge bases.

[0086] Meanwhile, developers can also pre-set retrieval strategies for single knowledge bases. For example, retrieval strategies may include: keyword matching-based retrieval strategy, semantic matching-based retrieval strategy, hybrid retrieval strategy, and automatic switching strategy (i.e., selecting one of the above three retrieval strategies).

[0087] The above approach allows developers to configure different recall and retrieval strategies based on the actual use cases of the intelligent agent. It enables automatic switching between recall and retrieval strategies across multiple knowledge bases to meet the query needs of different scenarios and improve recall efficiency and accuracy.

[0088] Figure 6 This is a schematic structural diagram of a device provided in an exemplary embodiment. For example... Figure 6As shown, device 400 mainly consists of a communication interface 402, a user interface 404, a processor 406, and a data storage 408. These components are interconnected and communicate with each other via a system bus, network, or other connection mechanism 410. The communication interface 402 enables device 400 to communicate with other devices, access networks, and transmission networks via analog or digital modulation. For example, the communication interface 402 may include a chipset and antenna for wireless communication with a radio access network or access point. Furthermore, the communication interface 402 can be a wired interface such as Ethernet, Token Ring, or a USB port, or a wireless interface such as Wi-Fi, Bluetooth, Global Positioning System (GPS), or a wide-area wireless interface (e.g., WiMAX or LTE). Of course, the communication interface 402 can also support other forms of physical layer interfaces and standard or proprietary communication protocols. The communication interface 402 may also include multiple physical communication interfaces, such as Wi-Fi, Bluetooth, and wide-area wireless interfaces.

[0089] User interface 404 includes receiving user input and providing output to the user. Therefore, user interface 404 may include input components such as a keypad, keyboard, touch-sensitive or presence-sensitive panel, computer mouse, trackball, joystick, microphone, still camera, and video camera, and output components such as a display screen (which may be combined with a touch-sensitive panel), CRT, LCD, LED, display using DLP technology, printer, and other similar devices known or developed in the future. User interface 404 may also generate auditory output via speakers, speaker jacks, audio output ports, audio output devices, headphones, and other similar devices known or developed in the future. In some embodiments, user interface 404 may include software, circuitry, or other forms of logic capable of transmitting and receiving data from external user input / output devices. Additionally or alternatively, device 400 may support remote access from other devices via communication interface 402 or another physical interface (not shown). User interface 404 may be configured to receive user input, the position and movement of which may be indicated by indicators or cursors described herein. User interface 404 may also be configured as a display device for rendering or displaying text fragments.

[0090] Processor 406 may contain one or more general-purpose processors and / or special-purpose processors.

[0091] Data storage 408 may include one or more volatile and / or non-volatile storage components and may be integrated wholly or partially with processor 406. Data storage 408 may include removable and non-removable components.

[0092] Processor 406 is capable of executing program instructions 418 (e.g., compiled or uncompiled program logic and / or machine code) stored in data storage 408 to perform the various functions described herein. Data storage 408 may contain a non-transitory computer-readable medium on which program instructions are stored, which, when executed by device 400, enable device 400 to perform any methods, processes, or functions disclosed in this specification and / or the accompanying drawings. Processor 406 executing program instructions 418 may result in processor 406 using data 412.

[0093] For example, program instructions 418 may include an operating system 422 (e.g., an operating system kernel, device drivers, and / or other modules) installed on device 400 and one or more applications 420 (e.g., a browser, social application, or game application). Similarly, data 412 may include operating system data 416 and application data 414. Operating system data 416 is primarily accessible to the operating system 422, while application data 414 is primarily accessible to one or more applications 420. Application data 414 may reside in a file system visible or hidden from the user of device 400.

[0094] Application 420 can communicate with operating system 422 through one or more application programming interfaces (APIs). These APIs help application 420 read and / or write application data 414, transmit or receive information via communication interface 402, receive or display information on user interface 404, etc.

[0095] In some terminology, application 420 may be simply referred to as "app". Furthermore, application 420 can be downloaded to device 400 through one or more online app stores or app markets. However, applications can also be installed on device 400 in other ways, such as through a web browser or a physical interface on device 400 (e.g., a USB port).

[0096] Please refer to Figure 7 Data retrieval devices can be applied to, for example... Figure 6 The device shown implements the technical solution described in this specification. The data retrieval device may include:

[0097] The acquisition module 72 is used to acquire the query content input by the user;

[0098] The target parameter determination module 74 is used to determine target parameters based on the query content and / or relevant information from at least two preset knowledge bases. The target parameters are used to reflect the uniformity of the distribution of target knowledge related to the query content in the at least two knowledge bases.

[0099] The recall method determination module 76 is used to determine a recall method for recalling the target knowledge from at least two preset knowledge bases based on the target parameters. The recall method includes recalling the target knowledge related to the query content from the at least two knowledge bases in parallel, or recalling the target knowledge related to the query content from the at least two knowledge bases in a serial order according to a preset priority, until the recalled target knowledge meets the preset conditions.

[0100] The sorting module 78 is used to recall the target knowledge from the at least two knowledge bases based on the recall method, and to sort the target knowledge.

[0101] The query result determination module 710 is used to obtain the query result corresponding to the query content based on the sorting result and return it to the user.

[0102] For ease of description, the above devices are described by dividing them into various modules or units based on their functions. Of course, when implementing one or more of these specifications, the functions of each module or unit can be implemented in the same or different software and / or hardware, or a module that performs the same function can be implemented by a combination of multiple sub-modules or sub-units, etc. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.

[0103] Based on the same concept as the methods described above, this specification also provides an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein the processor performs the steps of the method as described in any of the above embodiments by executing the executable instructions.

[0104] Based on the same concept as the methods described above, this specification also provides a computer-readable storage medium having computer instructions stored thereon that, when executed by a processor, implement the steps of the methods as described in any of the above embodiments.

[0105] Based on the same concept as the methods described above, this specification also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the methods as described in any of the above embodiments.

[0106] What those skilled in the art will understand is:

[0107] In this specification, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, product, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, product, or apparatus. Without further limitation, the presence of additional identical or equivalent elements in a process, method, product, or apparatus that includes said elements is not excluded.

[0108] In this specification, “a,” “an,” and “the” do not specifically refer to the singular, but may also include the plural.

[0109] In this specification, ordinal numbers such as "first," "second," etc., do not necessarily indicate order; they are often used to distinguish between objects. For example, "first server" and "second server" usually refer to two servers. To differentiate between these two servers, they are described as "first server" and "second server." Of course, sometimes these two servers may be the same server.

[0110] In this specification, unless explicitly stated otherwise, "receiving and sending data" does not necessarily mean direct receiving and sending; it can also mean indirect receiving and sending. For example, A receiving data sent by B can be understood as A directly receiving the data sent by B, or it can be understood as A indirectly receiving the data sent by B through other entities such as C. Similarly, B sending data to A can be understood as B sending the data directly to A, or it can be understood as B indirectly sending the data to A through other entities such as C. Here, C can be one entity, or it can be two or more entities.

[0111] In this specification, unless explicitly stated otherwise, the relationships between structures can be direct or indirect. For example, when describing "A is connected to B," unless it is explicitly stated that A and B are directly connected, it should be understood that A can be directly connected to B or indirectly connected to B. Similarly, when describing "A is on top of B," unless it is explicitly stated that A is directly above B (AB is adjacent and A is above B), it should be understood that A can be directly above B or indirectly above B (AB is separated by other elements, and A is above B). And so on.

[0112] This specification uses specific terms to describe embodiments thereof. Terms such as "an embodiment," "one embodiment," and / or "some embodiments" refer to a particular feature, structure, or characteristic associated with at least one embodiment of this specification. Therefore, it should be emphasized and noted that references to "an embodiment," "one embodiment," or "an alternative embodiment" in different locations throughout this specification do not necessarily refer to the same embodiment. Furthermore, those skilled in the art can combine and integrate the different embodiments or examples described herein, as well as the features of those different embodiments or examples, without contradiction.

[0113] Although one or more embodiments of this specification provide method steps as described in the embodiments or flowcharts, it is understood that the order of steps listed in the embodiments or flowcharts is only one of many possible execution orders and does not represent the only execution order. Therefore, when the claims involve method steps, any changes or adjustments to the order of such steps, or the parallelism between steps, are also within the scope of protection of the claims.

Claims

1. A data retrieval method, the method comprising: Get the query content entered by the user; Based on the query content and / or relevant information from at least two preset knowledge bases, target parameters are determined. These target parameters are used to reflect the uniformity of the distribution of target knowledge related to the query content in the at least two knowledge bases. Based on the target parameters, a recall method is determined to retrieve the target knowledge from at least two preset knowledge bases. The recall method includes retrieving target knowledge related to the query content from the at least two knowledge bases in parallel, or retrieving target knowledge related to the query content from the at least two knowledge bases in a serial order according to a preset priority, until the retrieved target knowledge meets the preset conditions. Based on the recall method, the target knowledge is recalled from the at least two knowledge bases, and the target knowledge is sorted. The query results corresponding to the query content are obtained based on the sorting results and returned to the user.

2. The method according to claim 1, wherein the target parameter includes the complexity of the query content, and the step of determining a retrieval method for retrieving the target knowledge from at least two preset knowledge bases based on the target parameter includes: If the complexity is higher than the preset complexity, the recall method is to recall target knowledge related to the query content from the at least two knowledge bases in parallel. and / or The target parameter includes the openness of the query content. The step of determining the retrieval method for retrieving the target knowledge from at least two preset knowledge bases based on the target parameter includes: if the openness is higher than the preset openness, the retrieval method is to retrieve the target knowledge related to the query content from the at least two knowledge bases in parallel.

3. The method according to claim 1, wherein the target parameter includes the degree of difference in relevance between the query content and the descriptive information of each of the at least two knowledge bases, and the step of determining the retrieval method for retrieving the target knowledge from the preset at least two knowledge bases based on the target parameter includes: If the degree of difference is less than or equal to a preset degree, the recall method is to recall target knowledge related to the query content from the at least two knowledge bases in parallel. If the degree of difference is greater than a preset degree, the recall method is to sequentially recall target knowledge related to the query content from the at least two knowledge bases according to a preset priority order until the recalled target knowledge meets the preset conditions, wherein the priority order of the at least two knowledge bases is determined based on the relevance.

4. The method according to claim 1, wherein the target parameter includes the distribution uniformity of recall results corresponding to historical query content of the same type as the query content in the at least two knowledge bases, and the step of determining the recall method for recalling the target knowledge from the preset at least two knowledge bases based on the target parameter includes: If the distribution uniformity is greater than or equal to the preset uniformity, the recall method is to recall target knowledge related to the query content from the at least two knowledge bases in parallel. If the distribution uniformity is less than the preset uniformity, the recall method is to sequentially recall target knowledge related to the query content from the at least two knowledge bases according to a preset priority order until the recalled target knowledge meets the preset conditions, wherein the priority order of the at least two knowledge bases is determined based on the distribution of the recall results corresponding to the historical query content in the at least two knowledge bases.

5. The method according to claim 1, wherein the recall method involves concurrently recalling target knowledge related to the query content from the at least two knowledge bases, and the step of recalling the target knowledge from the at least two knowledge bases based on the recall method and sorting the target knowledge includes: The at least two knowledge bases are searched in parallel to recall target knowledge related to the query content; Based on the matching degree between each retrieved target knowledge and the query content, the target knowledge retrieved from the at least two knowledge bases is reordered, wherein the matching degree between the target knowledge and the query content in different knowledge bases is calculated in the same way.

6. The method according to claim 5, wherein the reordering of the target knowledge recalled from the at least two knowledge bases based on the matching degree between each recalled target knowledge and the query content includes: For each of the at least two knowledge bases, the matching degree between the target knowledge retrieved from the knowledge base and the query content is weighted based on the weight of the knowledge base. The target knowledge retrieved from the at least two knowledge bases is reordered based on the weighted matching degree.

7. The method according to claim 5, wherein the target knowledge retrieved from the at least two knowledge bases is reordered based on the matching degree between each retrieved target knowledge and the query content, comprising: The target knowledge with the highest matching degree among all recalled target knowledge is ranked first and used as the current target knowledge. The target knowledge with the highest matching degree with the query content is concatenated with the query content, and the concatenated content is used as the current content to be matched. Perform the following sorting operation: determine the matching degree between each unsorted target knowledge in all recalled target knowledge and the current content to be matched, and sort the target knowledge with the highest matching degree to the current content to be matched after the current target knowledge; Determine whether there is any unsorted target knowledge among all the recalled target knowledge. If so, take the target knowledge with the highest matching degree with the current content to be matched from all the unsorted target knowledge among all the recalled target knowledge as the current target knowledge, and concatenate it with the current content to be matched. Take the concatenated content as the new current content to be matched, and return to execute the sorting operation. If so, the sorting is considered complete.

8. The method according to claim 1, wherein the recall method is to sequentially recall target knowledge related to the query content from the at least two knowledge bases according to a preset priority order until the recalled target knowledge meets a preset condition, and the step of recalling the target knowledge from the at least two knowledge bases based on the recall method and sorting the target knowledge includes: The search is performed sequentially from the at least two knowledge bases according to a preset priority order to retrieve target knowledge related to the query content. For the currently retrieved knowledge base, determine whether the target knowledge recalled from this knowledge base and all previous knowledge bases meets the preset conditions; If so, then stop searching the next knowledge base of this knowledge base, and sort the target knowledge retrieved from the currently searched knowledge bases according to the priority order to obtain the sorting result.

9. The method according to claim 1 or 8, wherein the preset conditions include one or more of the following: The current cumulative amount of recalled target knowledge exceeds the preset amount; Among the currently recalled target knowledge, at least one target knowledge has a matching degree with the query content that is greater than or equal to the preset matching degree.

10. The method according to claim 1, wherein in the process of recalling the target knowledge from the at least two knowledge bases based on the recall method, the method for retrieving each piece of knowledge in the at least two knowledge bases is as follows: Based on the query content, a target retrieval strategy is determined from a variety of pre-set retrieval strategies, wherein, Different retrieval strategies determine the matching degree between the query content and the knowledge in the knowledge base in different ways; Based on the target retrieval strategy, target knowledge related to the query content is retrieved from the knowledge base.

11. The method according to claim 10, wherein the retrieval strategy includes one or more of the following: a keyword-based retrieval strategy, a semantic-based retrieval strategy, and a hybrid retrieval strategy, wherein, The hybrid retrieval strategy indicates that knowledge is retrieved from the knowledge base simultaneously based on the keyword matching strategy and the semantic retrieval strategy.

12. The method according to claim 10 or 11, wherein retrieving target knowledge related to the query content from the knowledge base based on the target retrieval strategy includes: The matching degree between each piece of knowledge in the knowledge base and the query content is determined based on the target retrieval strategy. Candidate knowledge with a matching degree greater than a preset matching degree is selected from the knowledge base; The candidate knowledge is sorted in descending order of matching degree, and the top N candidate knowledge items are selected as the target knowledge, where N is a positive integer.

13. An electronic device, characterized in that, include: processor; A memory for storing processor-executable instructions; wherein the processor implements the steps of the method as described in any one of claims 1-12 by executing the executable instructions.

14. A computer-readable storage medium, characterized in that, It stores computer instructions that, when executed by a processor, implement the steps of the method as described in any one of claims 1-12.

15. A computer program product, characterized in that, Includes a computer program / instructions that, when executed by a processor, implement the steps of the method as described in any one of claims 1-12.