Information retrieval method and device, electronic equipment and storage medium
Patent Information
- Application Number
- CN202611313529.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-27
- Publication Date
- 2026-10-30
AI Technical Summary
[0011]在本申请实施例中,获取检索请求信息;基于检索请求信息,获取与检索请求信息匹配的P个检索指令模板,每个检索指令模板包括一个应用垂类数据和一个检索方式,P为正整数;通过每个检索指令模板的检索方式,基于检索请求信息和每个检索指令模板的应用垂类数据执行检索。在本申请中,电子设备可以基于检索请求信息,确定匹配的P个检索指令模板,即确定P个应用垂类数据和检索方式的组合,于是,对于每个检索指令模板,电子设备可以通过该检索指令模板的检索方式,在该检索指令模板的应用垂类数据中基于检索请求信息执行对应的检索操作,也就是说,电子设备可以通过应用垂类数据和检索方式进行检索指令模板的划分,即可以形成分层式的检索方法,如确定具体的通过什么检索方法,在什么应用垂类数据中检索,而并不局限于单一维度的信息检索。同时,由于P个检索指令模板是基于检索请求信息所获取或确定的,所以可以理解的是,电子设备可以基于用户实际需求,动态选择匹配的检索指令模板,从而可以提供更为符合用户实际需求的检索结果,如此,提升了信息检索的准确性。
Smart Images

Figure CN123012012A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of artificial intelligence technology, specifically relating to an information retrieval method, device, electronic device, and storage medium. Background Technology
[0002] Users use electronic devices in their daily lives to download data, record life events, and plan work. Given this high frequency of use, various data and information are stored in different applications on the electronic device. For example, a recording application might contain a user's meeting minutes, a communication application might store office documents or meeting recordings sent by others, a calendar application might contain a user's meeting to-do items, and a contacts application might contain the phone numbers of colleagues the user needs to communicate with.
[0003] Given the fragmented and complex data distribution mentioned above, improving the accuracy of information retrieval is a technical problem that urgently needs to be solved. Summary of the Invention
[0004] The purpose of this application is to provide an information retrieval method, apparatus, electronic device, and storage medium that can improve the accuracy of information retrieval.
[0005] In a first aspect, embodiments of this application provide an information retrieval method, which includes: obtaining retrieval request information; obtaining P retrieval instruction templates that match the retrieval request information based on the retrieval request information, each retrieval instruction template including an application vertical category data and a retrieval method, where P is a positive integer; and performing a retrieval based on the retrieval request information and the application vertical category data of each retrieval instruction template through the retrieval method of each retrieval instruction template.
[0006] Secondly, embodiments of this application provide an information retrieval device, which includes: an acquisition module and a processing module; the acquisition module is used to acquire retrieval request information; the acquisition module is also used to acquire P retrieval instruction templates that match the retrieval request information based on the retrieval request information, each retrieval instruction template including an application vertical category data and a retrieval method, where P is a positive integer; the processing module is used to perform a retrieval based on the retrieval request information and the application vertical category data of each retrieval instruction template acquired by the acquisition module through the retrieval method of each retrieval instruction template.
[0007] Thirdly, embodiments of this application provide an electronic device including a processor and a memory, the memory storing programs or instructions executable on the processor, the programs or instructions, when executed by the processor, implementing the steps of the method described in the first aspect.
[0008] Fourthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first aspect.
[0009] Fifthly, embodiments of this application provide a chip, the chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the method as described in the first aspect.
[0010] In a sixth aspect, embodiments of this application provide a computer program / program product stored in a storage medium, which is executed by at least one processor to implement the method described in the first aspect.
[0011] In this embodiment, retrieval request information is obtained; based on the retrieval request information, P retrieval instruction templates matching the retrieval request information are obtained. Each retrieval instruction template includes an application vertical data and a retrieval method, where P is a positive integer; the retrieval is performed based on the retrieval request information and the application vertical data of each retrieval instruction template using the retrieval method of each retrieval instruction template. In this application, the electronic device can determine the P matching retrieval instruction templates based on the retrieval request information, that is, determine the combination of P application vertical data and retrieval methods. Thus, for each retrieval instruction template, the electronic device can perform the corresponding retrieval operation based on the retrieval request information in the application vertical data of that retrieval instruction template using the retrieval method of that retrieval instruction template. In other words, the electronic device can divide the retrieval instruction templates by application vertical data and retrieval methods, that is, it can form a hierarchical retrieval method, such as determining which retrieval method to use and in which application vertical data to search, rather than being limited to a single-dimensional information retrieval. Meanwhile, since the P search instruction templates are obtained or determined based on the search request information, it is understandable that electronic devices can dynamically select matching search instruction templates based on the user's actual needs, thereby providing search results that better meet the user's actual needs and thus improving the accuracy of information retrieval. Attached Figure Description
[0012] Figure 1 This is one of the flowcharts of an information retrieval method provided in the embodiments of this application;
[0013] Figure 2 This is one of the example diagrams of a search interface provided in the embodiments of this application;
[0014] Figure 3 This is a second flowchart of an information retrieval method provided in an embodiment of this application;
[0015] Figure 4This is a flowchart illustrating a method for calculating priority information provided in an embodiment of this application;
[0016] Figure 5A This is a second example of a search interface provided in an embodiment of this application;
[0017] Figure 5B This is a third example of a search interface provided in the embodiments of this application;
[0018] Figure 5C This is a fourth example of a search interface provided in the embodiments of this application;
[0019] Figure 6 This is a flowchart of a model training method provided in an embodiment of this application;
[0020] Figure 7A This is the fifth example of a search interface provided in the embodiments of this application;
[0021] Figure 7B This is a sixth example of a search interface provided in the embodiments of this application;
[0022] Figure 7C This is the seventh example of a search interface provided in the embodiments of this application;
[0023] Figure 7D This is the eighth example of a search interface provided in the embodiments of this application;
[0024] Figure 7E This is the ninth example of a search interface provided in the embodiments of this application;
[0025] Figure 7F This is the tenth example of a search interface provided in the embodiments of this application;
[0026] Figure 8A This is the third flowchart of an information retrieval method provided in the embodiments of this application;
[0027] Figure 8B This is the fourth flowchart of an information retrieval method provided in the embodiments of this application;
[0028] Figure 9 This is a schematic diagram of the structure of an information retrieval device provided in an embodiment of this application;
[0029] Figure 10 This is one of the hardware structure diagrams of an electronic device provided in the embodiments of this application;
[0030] Figure 11 This is a second schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0031] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0032] The terms "first," "second," etc., used in this application's specification are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class, without limiting the number of objects. For example, a first object can be one or more, where "more" means at least two. Furthermore, in the specification, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0033] The terms "at least one" and "at least one of" in this application's specification refer to any one, any two, or a combination of two or more of the included objects. For example, "at least one of a, b, and c" can mean "a", "b", "c", "a and b", "a and c", "b and c", and "a, b, and c", where a, b, and c can be single or multiple, and multiple means at least two. Similarly, "at least two" means two or more, and its meaning is similar to "at least one". The identifiers in this application are text, symbols, images, etc., used to indicate information, and can use controls or other containers as carriers for displaying information, including but not limited to text identifiers, symbol identifiers, and image identifiers.
[0034] The terminology used in the implementation section of this application is only for explaining specific embodiments of this application and is not intended to limit this application. The terminology involved in the embodiments of this application is explained below.
[0035] Controls: Elements in a graphical user interface that can receive user input to perform corresponding processing or display relevant data. Controls can include, but are not limited to, virtual buttons, sliders, progress bars, and checkboxes.
[0036] Interface: Refers to the medium through which users interact with electronic devices. The interface allows users to send commands to the system via input devices and receive feedback information via output devices. Input devices can be keyboards, mice, touchscreens, etc.; monitors, speakers, etc.
[0037] In today's society, users use electronic devices such as mobile phones and computers to download data, record life events, and plan work. With such high-frequency use, various data and information are stored on these devices. For example, recording apps may store meeting minutes, WeChat may save office documents or meeting recordings sent by others, calendar apps may store meeting tasks, and contact apps may store the phone numbers of colleagues the user needs to communicate with. Overall, user data is fragmented and complex. This fragmented and complex data distribution is constantly increasing the search and integration costs for user information. Users hope to find the content they want quickly and accurately through a single entry point.
[0038] Currently, the mainstream search solutions mainly adopt a one-size-fits-all Retrieval-Augmented Generation (RAG) retrieval scheme. However, this one-size-fits-all retrieval has more or less defects and cannot meet the increasingly complex search needs of users.
[0039] For example, electronic devices can concurrently retrieve data from all application verticals, then integrate, sort, and display all the data. However, this approach can easily lead to significant resource waste for some clear and simple requests. For instance, a user's request to "find my meeting recordings" is a very clear retrieval need, meaning there's no need to search for data in their photo album.
[0040] Electronic devices can use intent recognition models to select the top_k vertical categories for searching. However, for generalized requests, intent recognition models may miss the correct content the user wants to search for due to the fragmented nature of data storage. For example, searching for "meeting-related information" requires searching data from multiple application verticals such as recordings, WeChat, and calendars. If the top_k parameter is not chosen appropriately, the search results may be incomplete.
[0041] In addition, searching for each type of data involves calling multiple retrieval schemes simultaneously, such as inverted indexes, vector indexes, SQL indexes, and knowledge graphs. This approach not only results in significant resource waste, but also means that different retrieval schemes have significantly different time consumptions, and the user's waiting time depends on the longest-consuming retrieval scheme, leading to a poor user experience.
[0042] Therefore, improving the accuracy of information retrieval is an urgent technical problem to be solved in the face of the aforementioned fragmented and complex data distribution.
[0043] The information retrieval method provided in this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.
[0044] The information retrieval method provided in this application can be applied to scenarios where information retrieval is performed based on user retrieval request information. For example, if a user wants to view weekend-related plans stored in an electronic device, the user can enter retrieval request information, such as "weekend plans," in the search box. The electronic device can then obtain matching retrieval instruction templates for P based on the user's input of "weekend plans," such as [Application Vertical Data 1_Retrieval Method 1], [Application Vertical Data 2_Retrieval Method 1], and [Application Vertical Data 3_Retrieval Method 2]. The electronic device can then perform a retrieval operation based on the retrieval request information and the application vertical data of each retrieval instruction template, obtaining and displaying the retrieval results. For example, an electronic device can perform a search operation using search method 1, based on the search request information "weekend plans" and application vertical data 1, to obtain search result 1, which is then displayed on the screen of the electronic device. Similarly, the electronic device can perform a search operation using search method 1, based on the search request information "weekend plans" and application vertical data 2, to obtain search result 2, which is also displayed on the screen. Finally, the electronic device can perform a search operation using search method 2, based on the search request information "weekend plans" and application vertical data 3, to obtain search result 3, which is also displayed on the screen. Therefore, after the search is completed, the screen of the electronic device displays search result 1, search result 2, and search result 3.
[0045] It should be noted that the above scenario is only an example of a possible application scenario of the embodiments of this application. In actual implementation, the embodiments of this application can also be applied to any possible scenario such as performing information retrieval based on user retrieval request information. The embodiments of this application are not limited here.
[0046] Based on the scenarios described in the embodiments of this application, the information retrieval method provided in this application allows an electronic device to determine P matching search instruction templates based on search request information. This means determining a combination of P application vertical data and search methods. For each search instruction template, the electronic device can perform a corresponding search operation based on the search request information within the application vertical data of that search instruction template using the search method specified in that template. In other words, the electronic device can divide search instruction templates using application vertical data and search methods, forming a hierarchical search method. This allows for determining the specific search method used and the search criteria within the application vertical data, rather than being limited to a single-dimensional information retrieval. Furthermore, since the P search instruction templates are obtained or determined based on search request information, it is understandable that the electronic device can dynamically select matching search instruction templates based on the user's actual needs, thereby providing search results that better meet the user's actual requirements and improving the accuracy of information retrieval.
[0047] The information retrieval method provided in this application is executed by an information retrieval device, which can be an electronic device, or a functional module or entity within an electronic device. This application does not limit the specific implementation of this method. The following will use an electronic device as an example to illustrate the information retrieval method provided in this application.
[0048] This application provides an information retrieval method. Figure 1 A flowchart of an information retrieval method provided in an embodiment of this application is shown. Figure 1 As shown, the information retrieval method provided in this application embodiment may include the following steps 201 to 203.
[0049] Step 201: The electronic device obtains the retrieval request information.
[0050] In some embodiments of this application, users can input the above-mentioned search request information through editing input, voice input, or any other possible form.
[0051] For example, a mobile phone is used as an example for illustration. Figure 2 As shown, when the mobile phone displays the search interface 20, the user can manually edit the search request information in the search box of the search interface 20, such as "weekend plan".
[0052] In some embodiments of this application, the electronic device can obtain the above-mentioned search request information in the search box of any interface, or the electronic device can obtain the above-mentioned search request information in the search box of a special search interface, so as to execute the information retrieval method provided in the embodiments of this application.
[0053] In some embodiments of this application, when a user inputs the above-mentioned search request information through the search box of any interface of the electronic device, the user can trigger the electronic device to execute the information retrieval method provided in the embodiments of this application by inputting special symbols or special input methods.
[0054] Step 202: The electronic device obtains P search instruction templates that match the search request information based on the search request information.
[0055] In some embodiments of this application, each of the P search instruction templates may include an application vertical data and a search method.
[0056] Where P is a positive integer.
[0057] In some embodiments of this application, the electronic device may pre-store at least one search instruction template determined based on application vertical data and search method.
[0058] In some embodiments of this application, the above-mentioned application vertical data can be understood as the data corresponding to the application.
[0059] In some embodiments of this application, the applications corresponding to the above-mentioned application vertical data may include, but are not limited to, at least one of the following: documents, notes, calendars, contacts, and text messages.
[0060] In some embodiments of this application, the above retrieval methods may include, but are not limited to, at least one of the following: cache retrieval, inverted index retrieval, vector retrieval, Structured Query Language (SQL) retrieval, and knowledge graph retrieval.
[0061] In some embodiments of this application, the electronic device can preset different levels of preset logic based on the performance and time consumption of the retrieval method of at least one retrieval instruction template.
[0062] For example, when the retrieval methods include [cached retrieval, inverted index retrieval, vector retrieval, SQL retrieval, and knowledge graph retrieval], the electronic device can obtain [[cached retrieval, inverted index retrieval], [vector retrieval], [SQL retrieval, and knowledge graph retrieval]] based on performance and time consumption. Among them, [cached retrieval and inverted index retrieval] has the lowest time consumption and a priority of 1, [vector retrieval] has the second lowest time consumption and a priority of 2, and [SQL retrieval and knowledge graph retrieval] has the highest time consumption and a weight priority of 3.
[0063] For example, when the application corresponding to the vertical category data includes documents, notes, calendars, contacts, and SMS messages, and the retrieval methods include cache retrieval, inverted index retrieval, vector retrieval, and SQL retrieval, the above-mentioned at least one retrieval instruction template may include: [Document_Cache Retrieval], [Document_Inverted Index Retrieval], [Document_Vector Retrieval], [Document_SQL Retrieval], [Notes_Cache Retrieval], [Notes_Inverted Index Retrieval], [Notes_Vector Retrieval], [Notes_SQL Retrieval], [Calendar_Cache Retrieval], [Calendar_Inverted Index Retrieval], [Calendar_Vector Retrieval], [Calendar_SQL Retrieval], [Contacts_Cache Retrieval], [Contacts_Inverted Index Retrieval], [Contacts_Vector Retrieval], [Contacts_SQL Retrieval], [SMS_Cache Retrieval], [SMS_Inverted Index Retrieval], [SMS_Vector Retrieval], [SMS_SQL Retrieval].
[0064] In some embodiments of this application, the above-mentioned P search instruction templates may be at least a portion of the above-mentioned at least one search instruction template.
[0065] It should be noted that, in this embodiment of the application, the search instruction template is determined by two search dimensions. For search instruction templates with three or more search dimensions, the usage method is similar to that provided in this embodiment of the application, and will not be described in detail here.
[0066] For example, electronic devices can also formulate appropriate task prioritization schemes based on users' usual search habits, such as user search preferences and data field information. The data field information may include, but is not limited to, at least one of the following: title, content, tags, and summary.
[0067] In some embodiments of this application, the electronic device may determine the P search instruction templates based on the similarity between the search request information and the at least one search instruction template, or the priority corresponding to the at least one search instruction template.
[0068] In some embodiments of this application, when P>1, the electronic device can also determine the execution method of the P retrieval instruction templates, such as parallel execution or execution in a certain order.
[0069] Understandably, electronic devices can dynamically plan based on the complexity of user requests, thereby planning a reasonable order of retrieval task execution to achieve a dynamic balance between user experience and electronic device performance.
[0070] In some embodiments of this application, combined with Figure 1 ,like Figure 3 As shown, step 202 can be specifically implemented through steps 202a1 to 202a4.
[0071] Step 202a1: The electronic device determines the retrieval weight of the application vertical data of at least one retrieval instruction template based on the retrieval request information and at least one retrieval instruction template.
[0072] In some embodiments of this application, the above-mentioned search weights can be used to represent the probability that a search operation can be performed using application vertical data.
[0073] Step 202a2: The electronic device determines the first priority information based on the retrieval weight.
[0074] In some embodiments of this application, the aforementioned first priority information can characterize the retrieval priority corresponding to the application vertical data of at least one retrieval instruction template.
[0075] In some embodiments of this application, the electronic device can utilize an intent recognition model to calculate the weights of vertical search priority based on the input request. It also divides the vertical categories to be searched into different search priorities based on the preset application weight segmentation hyperparameter threshold_list.
[0076] For example, [[Application vertical information 1, application vertical data 3], [Application vertical data 2], [Application vertical data 5, application vertical data 4], ...]. Among them, [Application vertical information 1, application vertical data 3] has the highest probability, with a priority of 1; [Application vertical data 2] has the second highest probability, with a priority of 2; and [Application vertical data 5, application vertical data 4] has the lowest probability, with a priority of 3.
[0077] It should be noted that the threshold_list mentioned above can be a set of values set from largest to smallest, such as [ , , ],in, .
[0078] For example, such as Figure 4Steps A1 to A4 are shown below. Assume the application vertical data includes [documents, notes, calendars, contacts, SMS messages], and the preset threshold_list is [0.7, 0.3, 0.1]. The electronic device can first use the intent recognition model to infer the probability distribution corresponding to different application vertical data, such as [0.2, 0.36, 0.4, 0.01, 0.03]. That is, the probability of the electronic device performing a search operation through documents is 0.2; the probability of the electronic device performing a search operation through notes is 0.36; the probability of the electronic device performing a search operation through calendars is 0.4; the probability of the electronic device performing a search operation through contacts is 0.01; and the probability of the electronic device performing a search operation through SMS messages is 0.03. Then, the electronic device can use threshold_list[0.7, 0.3, 0.1] to divide the vertical data into four retrieval priorities. Vertical data with a probability between 1 and 0.7 has a retrieval priority of 1; those between 0.7 and 0.3 have a priority of 2; those between 0.3 and 0.1 have a priority of 3; and those between 0.1 and 0 have a priority of 4. That is, documents have a retrieval priority of 3, notes have a retrieval priority of 2, calendar events have a retrieval priority of 2, contacts have a retrieval priority of 4, and SMS messages have a retrieval priority of 4.
[0079] Step 202a3: The electronic device determines the second priority information based on the retrieval request information and the retrieval method of at least one retrieval instruction template.
[0080] In some embodiments of this application, the aforementioned second priority information can characterize the retrieval priority corresponding to the retrieval method of at least one retrieval instruction template.
[0081] In some embodiments of this application, the electronic device can utilize the model to output a retrieval method that matches the retrieval request information based on the difficulty of the retrieval request information, the context, and the characteristics of different retrieval methods.
[0082] For example, for simple search requests, i.e., when the search difficulty is low, use [[inverted index]], and for complex search requests, i.e., when the search difficulty is relatively high, use [inverted index, vector search, ...].
[0083] For example, combined Figure 4In steps A5 and A6, the electronic device can use the model to determine the search method to be used, such as [inverted index search, SQL search], based on the search request information "weekend plan", the characteristics of various search methods, context and other descriptions, and further set the corresponding priority, such as the priority of inverted index search being 1 and the priority of SQL search being 2.
[0084] Step 202a4: The electronic device determines P search instruction templates from at least one search instruction template based on the first priority information and the second priority information.
[0085] In some embodiments of this application, the electronic device can determine P retrieval instruction templates from the above-mentioned at least one retrieval instruction template based on the sum of the first priority information and the second priority information, and can determine the priority level corresponding to each retrieval instruction template based on the priority information corresponding to each retrieval instruction template.
[0086] It is understandable that electronic devices can combine planned tasks into a progressive search execution sequence. For example, the result of its intent recognition model is [[Application vertical information 1, Application vertical data 3], [Application vertical data 2], [Application vertical data 5, Application vertical data 4], ...], and the retrieval method list is [Inverted index retrieval, Vector retrieval]. Combining the preset retrieval method priorities, the priorities of each dimension are added together as the priority of the final task sequence execution. The constructed result is as follows: [[Application vertical data 1_Inverted index (2), Application vertical data 3_Inverted index retrieval (2)], [Application vertical data 1_Vector retrieval (3), Application vertical data 3_Vector retrieval (3), Application vertical data 2_Inverted index retrieval (3)], [Application vertical data 2_Vector retrieval (4)], ...], and this execution sequence is added to the queue. Among them, the value in parentheses can be used to represent the priority after poor calculation. The lower the value, the higher the priority.
[0087] For example, combined Figure 4In steps A7 and A8, the electronic device can calculate the following based on the priority information of the application vertical data and the priority information of the retrieval method: Document_Inverted Search->3+1->4; Document_SQL Search->3+2->5; Notes_Inverted Search->2+1->3; Notes_SQL Search->2+2->4; Schedule_Inverted Search->2+1->3; Schedule_SQL Search->2+2->4; Contacts_Inverted Search->4+1->5; Contacts_SQL Search->4+2->6; SMS_Inverted Search->4+1->5; SMS_SQL Search->4+2->6. The lower the priority of the data, the higher the corresponding priority level. Therefore, the electronic device can obtain the following priority levels based on the priority information: Priority Level 1 [Schedule_Inverted Search, Notes_Inverted Search]; Priority Level 2 [Document_Inverted Search, Notes_SQL Search, Schedule_SQL Search]; Priority Level 3 [Document_SQL Search, Contacts_Inverted Search, SMS_Inverted Search]; Priority Level 4 [Contacts_SQL Search, SMS_SQL Search].
[0088] In some embodiments of this application, multiple search instruction templates at the same priority level can be searched in parallel, and multiple search instruction templates at different priority levels can be searched sequentially from high to low according to their priority level.
[0089] In some embodiments of this application, step 202 can be specifically implemented by steps 202b1 and 202b2.
[0090] Step 202b1: The electronic device calculates the similarity between the description vector corresponding to the retrieval request information and the retrieval capability description vector corresponding to at least one retrieval instruction template.
[0091] Step 202b2: The electronic device obtains P search instruction templates that meet the similarity conditions based on similarity.
[0092] In some embodiments of this application, the electronic device can input the above-mentioned retrieval request information into a model related to inference retrieval to obtain the description vector vec_context corresponding to the retrieval request information.
[0093] For example, an electronic device can retrieve the request information "weekend plan" by inputting a preset inference retrieval model, and then output the description vector vec_context corresponding to the current model context content through the retrieve_head component in the inference retrieval model.
[0094] In some embodiments of this application, the electronic device may pre-store the retrieval capability description vector vec_atom_x corresponding to each of the above-mentioned at least one retrieval instruction template.
[0095] In some embodiments of this application, the above-mentioned retrieval capability description vector can be used to describe the atomic retrieval capability of the reasoning retrieval model, i.e., the above-mentioned retrieval instruction template.
[0096] In some embodiments of this application, an electronic device can use the atomic encoder component in a preset inference retrieval model to calculate the vector representation vec_atom_x corresponding to the semantic description of all atomic retrieval capabilities and save it to a vector database.
[0097] It should be noted that electronic devices can also obtain the retrieval capability description vector corresponding to the atomic retrieval skill used to invoke any MCP skill, in order to provide more forms of operation.
[0098] In some embodiments of this application, the aforementioned preset similarity condition may include, but is not limited to, any of the following: similarity greater than a preset similarity threshold; similarity among the top k items when arranged based on numerical value.
[0099] For example, an electronic device can calculate the similarity between the description vector vec_context and all retrieval capability description vectors vec_atom_x to obtain at least one of the aforementioned similarities, and select the top_k as the retrieval capability to be performed currently.
[0100] It should be noted that the value of k can be determined according to actual needs, and this application embodiment does not limit it here.
[0101] In this embodiment, the electronic device can determine the search instruction template that matches the search request information based on the similarity between the search request information and the atomic search capabilities corresponding to at least one search instruction template. That is, the electronic device can filter at least one preset search instruction template, thereby reducing or avoiding the waste of resources consumed by performing searches through irrelevant search capabilities, and improving the accuracy of information retrieval.
[0102] Step 203: The electronic device performs a search based on the search request information and the application vertical data of each search instruction template, using the search method of each search instruction template.
[0103] In some embodiments of this application, step 203 can be implemented by steps 203a and 203b, or steps 203a and 203c.
[0104] Step 203a: The electronic device obtains the request data from the application vertical data of each search instruction template based on the search request information by using the search method of each search instruction template included in the first search instruction template, and obtains the first search result corresponding to the first search instruction template.
[0105] In some embodiments of this application, the first search index template can be at least one search instruction template with the highest priority level among P search instruction templates.
[0106] For example, combined Figure 4 The aforementioned first search instruction template may include priority level 1 [Schedule_Inverted Search, Notes_Inverted Search]. Thus, the electronic device can obtain the requested data from the schedule based on the search request information "Weekend Plan" through inverted search to obtain search result 1, and obtain the requested data from the notes based on the search request information "Weekend Plan" through inverted search to obtain search result 2, that is, obtain the aforementioned first search result.
[0107] It is understandable that electronic devices can perform search operations based on P search instruction templates in descending order of priority to obtain search results.
[0108] It should be noted that, when using a search command to retrieve data, the amount of requested data obtained from the application vertical data of the search command template based on the search request information can be determined according to actual needs, and this embodiment of the application does not limit it here.
[0109] In some embodiments of this application, when the electronic device obtains the first detection result described above, the electronic device can detect whether the search results with a relevance level of the first relevance level in the first search results meet the search requirement determination conditions.
[0110] In some embodiments of this application, when the electronic device obtains the first search result described above, the electronic device can calculate the relevance between each search result and the search request information, classify them into different relevance levels, and store them in different result pools.
[0111] In some embodiments of this application, when the electronic device obtains a search result, the electronic device can directly calculate the relevance corresponding to that search result.
[0112] In some embodiments of this application, the aforementioned correlation levels may include: highly correlated, partially correlated, and completely uncorrelated.
[0113] In some embodiments of this application, highly relevant search results can be placed into a promotion pool and displayed directly on the screen of an electronic device.
[0114] In some embodiments of this application, some relevant search results can be placed in a candidate pool so that they can be displayed if the search results in the subsequent promotion pool cannot fully meet the user's needs.
[0115] In some embodiments of this application, completely irrelevant search results can be placed in a rejection pool and not displayed at all in subsequent processes.
[0116] In some embodiments of this application, the electronic device can continuously monitor the contents of the promotion pool list, the candidate pool list, and the elimination pool list through a background service.
[0117] It is understandable that, when the electronic device does not perform information retrieval, the promotion pool list, the candidate pool list, and the elimination pool list can be empty, i.e., promotion pool list: [ ]; candidate pool list: [ ]; elimination pool list: [ ].
[0118] For example, when the electronic device obtains the above search result 1 and search result 2, the electronic device can store them accordingly based on the relevant level. At this time, the promotion pool list may include: [Schedule: Reading plan, Document: Weekend course schedule.xlsx]; the alternative pool list may include: [Schedule: Want to go to paint]; the elimination pool list may include: [Document: How to plan your weekend time.pdf].
[0119] In some embodiments of this application, the above-mentioned detection of whether the search results with a relevance level of the first relevance level in the first search results meet the search requirements can be automatically executed by the electronic device based on a preset model.
[0120] It should be noted that the specific model preset above can be determined according to actual needs, and the above search requirement determination conditions can also be determined based on actual needs. This application embodiment does not limit these aspects.
[0121] In some embodiments of this application, the electronic device can, upon completing a task of a certain priority level, determine whether the results of the promotion pool can fully answer the user's request, and thus stop the search or proceed to the next priority level. This process continues until all P search instruction templates have been searched, and then the results of the candidate pool are combined to further determine whether the user's request can be fully answered. Specifically, see any one of steps 203b to 203d below, or the content of steps 203e1 and 203e2.
[0122] Step 203b: If the search results with a relevance level of the first relevance level in the first search results meet the search requirement determination conditions, the electronic device displays the search results with a relevance level of the first relevance level in the first search results.
[0123] For example, combined Figure 4 When an electronic device performs an information retrieval and obtains search results 1 and 2 corresponding to priority level 1 [Schedule_Inverted Search, Notes_Inverted Search], and the promotion pool list includes: [Schedule: Reading Plan, Document: Weekend Course Schedule.xlsx]; the alternative pool list includes: [Schedule: Want to Go Drawing]; and the elimination pool list includes: [Document: How to Plan Your Weekend Time.pdf], the electronic device can determine whether [Schedule: Reading Plan, Document: Weekend Course Schedule.xlsx] in the promotion pool list meets the retrieval requirement judgment conditions. If satisfied, it displays as follows: Figure 5A The interface shown displays the search results 21 for "reading plan" and 22 for "weekend course schedule".
[0124] In some embodiments of this application, if the search results included in the promotion pool list meet the search requirement determination conditions, the electronic device can send a stop signal to the execution queue to stop the subsequent execution of information retrieval based on the search instruction template.
[0125] Step 203c: If the search results with a relevance level of the first relevance level in the first search results do not meet the search requirement determination conditions, the electronic device displays the search results with a relevance level of the first relevance level in the first search results, and performs a search operation through the second search instruction template to obtain the second search results, and displays the search results with a relevance level of the first relevance level in the second search results.
[0126] In some embodiments of this application, the second search instruction template can be at least one of the P search instruction templates with the second highest priority level.
[0127] It is understandable that the second-highest priority level can be lower than the highest priority level.
[0128] For example, combined Figure 4 The second highest priority level mentioned above is priority level 2, meaning the second search instruction template can be [document_inverted search, notes_SQL search, schedule_SQL search].
[0129] Understandably, after the electronic device obtains the first search result, it can first display the search results with the first relevance level in the first search result on the screen of the electronic device, and then, when the second search result is obtained subsequently, supplement the display with the search results with the first relevance level in the second search result.
[0130] Understandably, electronic devices can be designed with streaming interactive schemes to ensure that users can quickly see highly relevant results and avoid waiting time.
[0131] For example, combined Figure 5A ,like Figure 5B As shown, electronic devices can retrieve and display the search result "20260620 Shopping List.txt" using the search command template "document_inverted search". At this point, the promotion pool list includes: [Schedule: Reading Plan, Document: Weekend Course Schedule.xlsx, Document: 20260620 Shopping List.txt]; the alternative pool list includes: [Schedule: Want to Go Painting]; and the elimination pool list includes: [Document: How to Plan Your Weekend Time.pdf].
[0132] In some embodiments of this application, the electronic device can perform a search operation through the second search instruction template to obtain the second search result, and further determine whether the search result with the first relevance level in the first search result and the search result with the first relevance level in the second search result meet the search requirement determination conditions. If the search requirement determination conditions are met, the subsequent search process is stopped.
[0133] In this embodiment of the application, the electronic device can analyze the quality of the returned results through model reflection to determine whether to execute subsequent retrieval tasks, thereby reducing the resources consumed by directly executing the full retrieval task, and avoiding the occurrence of missed retrieval results as much as possible through multiple rounds of detection.
[0134] In some embodiments of this application, step 203 described above can be implemented by step 203d described below.
[0135] Step 203d: If the search results with a relevance level of the first relevance level among the P third search results obtained based on the P search instruction templates do not meet the search requirement judgment conditions, the electronic device displays the search results with a relevance level of the first relevance level among the P third search results, obtains the search results with a relevance level of the second relevance level among the P third search results, and displays the search results with a relevance level of the second relevance level among the P third search results.
[0136] In some embodiments of this application, the second relevance level may be lower than the first relevance level.
[0137] It is understandable that the partial relevance corresponding to the second relevance level mentioned above refers to the retrieval results stored in the candidate pool list.
[0138] Understandably, if the electronic device completes all searches based on P search instruction templates, and if the "highly relevant" search results among the P third-party search results still cannot meet the search requirement criteria, the electronic device can first display the "highly relevant" search results on the screen of the electronic device, and then, if it subsequently obtains the "partially relevant" search results among the P third-party search results, it can then supplement the display with the "partially relevant" search results among the P third-party search results.
[0139] In some embodiments of this application, if the search results with a first relevance level among the P third search results obtained based on P search instruction templates do not meet the search requirement determination conditions, the electronic device can determine whether the search requirement determination conditions are met based on the search results with a first relevance level and a second relevance level among the P third search results, and if they are met, stop executing the subsequent search process.
[0140] For example, suppose the phone has completed information retrieval based on the following priority levels: 1 (Schedule_Inverted Search, Notes_Inverted Search), 2 (Document_Inverted Search, Notes_SQL Search, Schedule_SQL Search), 3 (Document_SQL Search, Contacts_Inverted Search, SMS_Inverted Search), and 4 (Contacts_SQL Search, SMS_SQL Search). The current promotion pool list includes: [Schedule: Reading Plan, Document: Weekend Course Schedule.xlsx, Document: 20260620 Shopping List.txt]; the alternative pool list includes: [Schedule: Want to Draw]; and the elimination pool list includes: [Document: How to Plan Your Weekend Time.pdf]. The phone can display as follows: Figure 5B The search interface 20 shown allows the mobile phone to determine whether the search criteria are met based on the search results 21 ("Reading Plan"), 22 ("Weekend Course Schedule"), and 23 ("20260620 Shopping List.txt"). If the criteria are not met, the mobile phone will then... Figure 5CAs shown, the search result 24 for "want to draw" is displayed. The phone can then further determine whether the search criteria are met. If met, a stop signal is sent to the execution queue to halt subsequent tasks. If not met, the relevant steps in steps 203e1 and 203e2 are executed.
[0141] In some embodiments of this application, step 203 can be specifically implemented by the following steps 203e1 and 203e2.
[0142] Step 203e1: If the search results with the first and second relevance levels among the P third search results obtained based on the P search instruction templates do not meet the search requirement determination conditions, the electronic device edits the search request information based on the intent information of the search request information.
[0143] In some embodiments of this application, the above editing process may include at least one of the following: error correction processing and expansion processing.
[0144] Step 203e2: The electronic device performs a search operation based on the edited search request information and P search instruction templates, and obtains and displays the search results corresponding to the edited search request information.
[0145] In some embodiments of this application, if the P third-party search results corresponding to the aforementioned P search instruction templates still cannot meet the search requirement judgment conditions, such as the promotion pool and the candidate pool being empty, or the search results contained in the promotion pool and the candidate pool being insufficient, the electronic device can use the model to, based on the user's request, the search results in the promotion pool and the candidate pool, and the context information, tell the model that no relevant information that can well satisfy the user has been found, determine whether the user's request is clear and normal, and perform error correction and expansion to generate a new search request, so as to re-execute the information retrieval method provided in the embodiments of this application based on the edited search request information. The entire process automatically ends when the user actively triggers the retrieval to stop, or when the number of repeated searches reaches the preset maximum number of loops N_iter.
[0146] In this embodiment of the application, the electronic device can analyze the quality of the returned results through model reflection, and avoid the occurrence of result omissions as much as possible through request rewriting and multi-round retrieval mode.
[0147] Furthermore, electronic devices can effectively balance the seesaw problem between user waiting time, electronic device computing costs, and search result quality through various design modules such as dynamic programming, streaming display, and iterative reflection. This solves the problem of high performance loss and poor performance that cannot be adjusted in traditional RAG solutions, and achieves experience optimization in the whole-domain search scenario.
[0148] In the information retrieval method provided in this application embodiment, the electronic device can determine P matching search instruction templates based on search request information, that is, determine P combinations of application vertical data and search methods. Therefore, for each search instruction template, the electronic device can perform a corresponding search operation based on the search request information within the application vertical data of that search instruction template using the search method specified in that template. In other words, the electronic device can divide search instruction templates by application vertical data and search methods, thus forming a hierarchical search method. This allows for determining the specific search method and the application vertical data used for retrieval, rather than being limited to a single-dimensional information retrieval. Furthermore, since the P search instruction templates are obtained or determined based on search request information, it is understandable that the electronic device can dynamically select matching search instruction templates based on the user's actual needs, thereby providing search results that better meet the user's actual needs and improving the accuracy of information retrieval.
[0149] In some embodiments of this application, after step 201 above, the information retrieval method provided by the embodiments of this application may further include the following steps 401 and 402, and step 202 above can be specifically implemented by the following step 403.
[0150] Step 401: The electronic device inputs the retrieval request information into the inference retrieval model and outputs and displays the streaming response information.
[0151] In some embodiments of this application, the above-mentioned streaming response information can be understood as: information pushed by the inference retrieval model in real time, word by word, during the process of the inference retrieval model generating the final output retrieval results based on the retrieval request information.
[0152] In some embodiments of this application, the above-described streaming response information can help users understand the thought process of the reasoning retrieval model.
[0153] Step 402: During the display of streaming response information, the electronic device calculates the retrieval trigger probability based on the displayed streaming response information using an inference retrieval model.
[0154] Step 403: When the retrieval trigger probability is greater than or equal to a preset threshold, the electronic device obtains P retrieval instruction templates that match the retrieval request information based on the retrieval request information.
[0155] In some embodiments of this application, such as Figure 6 As shown, the components of the above inference retrieval model can be trained and jointly fine-tuned through the following steps B1 to B5:
[0156] Step B1: Based on atomic descriptions, positive queries, and negative queries, construct triples (atom_description, positive_queries, negative_queries), train the atomic encoder component, and learn the mapping relationship between atomic retrieval skill descriptions and queries.
[0157] Step B2: Construct a pair (query, atom_description), freeze the atom_encoder using a dual-tower structure, and train only the retrieve_head component to learn the ability of the current inference retrieval model to map latent representations to atomic retrieval skills;
[0158] Step B3: Based on the query information, retrieval results, and reference answers, construct a triple (query, retrieval_result, teacher_answer), train the KV-Adapter component, and learn the ability to convert retrieval results into KV_cache.
[0159] Step B4: Construct a pair (prompt, should_retrieve), and train the retrieve gate module by inputting the content into the inference retrieval model and whether to retrieve the tag, so as to learn the ability to trigger retrieval when.
[0160] Step B5: Freeze the base model parameters, perform joint fine-tuning of relevant model components, and optimize the entire inference retrieval model.
[0161] In some embodiments of this application, the electronic device may also construct a user-input KV_cache component, so that the inference retrieval model can insert the user's intermediate information in real time and participate in the subsequent retrieval planning and execution, instead of interrupting the current execution of the system and re-executing it from the beginning.
[0162] In some embodiments of this application, the electronic device can inject the prompt and user retrieval request information into the inference retrieval model so that the inference retrieval model can generate the next token to output and display streaming response information.
[0163] In some embodiments of this application, during the process of outputting and displaying streaming response information by the inference retrieval model, the kv_cache state curr_kv_cache and the hidden layer information hidden_state can be maintained in the current state.
[0164] In some embodiments of this application, the electronic device can determine whether the inference retrieval model is a termination token. <eos>If yes, then stop streaming and end the current search process; otherwise, stream the token and record the current kv_cache status.
[0165] In some embodiments of this application, during the process of the inference retrieval model outputting and displaying streaming response information, the inference retrieval model can calculate the retrieve_prob probability corresponding to the content displayed on the current interface through the base model and retrieve_gate.
[0166] In some embodiments of this application, when the retrieve_prob trigger probability is greater than a preset threshold α, the inference retrieval model can obtain P retrieval instruction templates that match the retrieval request information based on the retrieval request information; correspondingly, when the retrieve_prob trigger probability is less than or equal to the preset threshold α, the inference retrieval model can not update curr_kv_cache and can continue to calculate or monitor the retrieval trigger probability.
[0167] In some embodiments of this application, the electronic device may display the currently executing search method, such as "search_schechdule_keyword", at the end of the streaming response information, and prompt the user that a search is currently in progress through a breathing light.
[0168] For example, combined Figure 2 ,like Figure 7A As shown, the mobile phone can automatically output and display streaming response information, such as "This needs to be considered in your case." The mobile phone can infer the retrieval model, calculate the retrieval trigger probability based on the displayed streaming response information, and determine if the retrieval trigger probability is greater than or equal to a preset threshold. For example, if the retrieval trigger probability corresponding to the displayed streaming response information "This needs to be considered in your specific case" is greater than or equal to the preset threshold, the mobile phone can start to obtain P retrieval instruction templates matching the retrieval request information "Weekend Plans." For example, based on the similarity between the retrieval request information vec_context and all retrieval capability description vectors vec_atom_x, the top_k templates are selected as the retrieval instruction templates to be executed. Furthermore, as shown... Figure 7B As shown, the mobile phone can display the currently executing search method, such as "search_schechdule_keyword", at the end of the streaming response information, and prompt the user to conduct a search through a breathing light.
[0169] In some embodiments of this application, step 203 can be specifically implemented by step 301.
[0170] Step 301: The electronic device retrieves the request data from the application vertical data of each search instruction template based on the search request information, using the search method of each search instruction template, and obtains P third search results, and displays the overview information corresponding to the P third search results.
[0171] In some embodiments of this application, the electronic device can convert the search results into `retrieve_result_kv_cache`, update `curr_kv_cache`, and convert `retrieve_result` into `retrieve_result_kv_cache` through the KV-Adapter component of the aforementioned inference retrieval model. Thus, the electronic device can update the current `curr_kv_cache`. That is, the electronic device can update the response content displayed on the screen.
[0172] In some embodiments of this application, the above overview information can be understood as the extraction or summarization of important information about the target retrieval structure.
[0173] In some embodiments of this application, the electronic device may also provide corresponding suggestion information to the user based on the aforementioned P third search results.
[0174] For example, combined Figure 7B The mobile phone can execute the corresponding search command in the background to obtain the search result `retrieve_result`. Assuming the mobile phone selects `top_2` as the current search command template, it can first execute the search operation using the search command corresponding to the first search command template to obtain the result as shown below. Figure 7C The overview information shown is "I see I'm free on Saturday morning and going to the gym in the afternoon," and the phone can provide corresponding suggestions, such as... Figure 7D The suggested information is "You could consider going to a park or amusement park in the morning"; furthermore, the mobile phone can first execute a search operation using the search command corresponding to the second search command template to obtain results such as... Figure 7D The overview information shown is "Going to a popular Japanese restaurant I booked tonight."
[0175] In some embodiments of this application, if there is a conflict between the suggested information provided by the electronic device and the subsequent search results, the electronic device may supplement it with more accurate suggested information.
[0176] For example, suppose the electronic device provides the suggestion "You could consider going to the park or amusement park on Saturday morning" based on the first search result, and if subsequent search results reveal a schedule for Saturday morning, such as shopping, the electronic device can provide more accurate suggestions, such as "Sorry, based on the schedule, I found that you plan to go shopping on Saturday morning. I suggest you go to shopping mall A near the gym so that you can go to the gym in the afternoon."
[0177] In this embodiment of the application, the electronic device can describe P third search results through summary information, so as to provide users with more convenient descriptive information and improve the convenience of users obtaining information.
[0178] In some embodiments of this application, the above overview information includes P reference identifiers. Each reference identifier corresponds to a search result and a search instruction. After step 301 above, the information retrieval method provided in the embodiments of this application may further include the following steps 302 and 303.
[0179] Step 302: The electronic device receives the selection input for the target reference identifier.
[0180] In some embodiments of this application, the target reference identifier can be any one of P reference identifiers.
[0181] Step 303: In response to the selected input, the electronic device displays the search results and search instruction information corresponding to the target reference identifier.
[0182] In some embodiments of this application, the display format of the above-mentioned target reference identifier can be determined according to actual needs, and this application embodiment does not limit it here.
[0183] In some embodiments of this application, the above-mentioned input selection can be click input, voice input, or any other feasible input, and this application embodiment does not limit it.
[0184] For example, suppose the reference identifier can be the symbol @. Combined with Figure 7D ,like Figure 7E As shown, the phone can display a target reference identifier at the location corresponding to each search metric, such as "This needs to be considered in light of your specific situation. @Seeing that you are free on Saturday morning but have to go to the gym in the afternoon, you could consider going to the park or Beihai Park in the morning, @and having Japanese food at the popular restaurant you booked in the evening." Thus, as... Figure 7F As shown, users can click on the first symbol @ and display the search results and search instructions corresponding to the first symbol @ through the floating window 31, such as "Search method: Keyword search in schedule; Weekend plan: No plans in the morning; Search method: Semantic search in notes; Search results: Go to the gym on Saturday afternoon; ...".
[0185] In some embodiments of this application, the above-mentioned input selection may not affect the execution of the question-and-answer process, that is, it may not affect the electronic device from performing subsequent search operations.
[0186] In this embodiment of the application, when the electronic device presents P third search results through overview information, the electronic device can provide a way to view the original search information through reference identifiers. That is, users can obtain different forms of search structures according to their needs, thereby improving the diversity of information display.
[0187] In view of the various scenarios in which the embodiments of this application can be applied, and in conjunction with the various implementation schemes of the embodiments of this application described above, specific examples are given below to illustrate the implementation process of the embodiments of this application in various scenarios.
[0188] Example 1: Figure 8A A flowchart of an information retrieval method provided in an embodiment of this application is shown. (In conjunction with...) Figure 8A The steps C1 to C15 shown in this application embodiment can include the implementation process of the following embodiments of an information retrieval method.
[0189] The mobile phone can pre-determine at least one search instruction template based on vertical data and search methods. Assuming there are 5 application vertical data categories, such as documents, notes, calendar, contacts, and SMS; and 4 search methods, such as cache search, inverted index search, vector search, and SQL search, then there are 20 search instruction templates, such as [Document_Cache Search], [Document_Inverted Index Search], [Document_Vector Search], [Document_SQL Search], [Notes_Cache Search], [Notes_Inverted Index Search], [Notes_Vector Search], [Notes_SQL Search], [Calendar_Cache Search], [Calendar_Inverted Index Search], [Calendar_Vector Search], [Calendar_SQL Search], [Contacts_Cache Search], [Contacts_Inverted Index Search], [Contacts_Vector Search], [Contacts_SQL Search], [SMS_Cache Search], [SMS_Inverted Index Search], [SMS_Vector Search], [SMS_SQL Search]. Simultaneously, the electronic device can preset a set of application weighting hyperparameters: threshold_list = [0.7, 0.3, 0.1]. Electronic devices can preset different levels of logic for retrieval methods based on performance and time consumption, for example, [cached retrieval, inverted index retrieval] > [SQL retrieval, vector retrieval].
[0190] Upon receiving a search request, the electronic device can first use an intent recognition model to infer the probability distribution corresponding to different application vertical data, such as [0.2, 0.36, 0.4, 0.01, 0.03]. This means the probability of the electronic device performing a search operation via a document is 0.2; via notes is 0.36; via calendar is 0.4; via contacts is 0.01; and via SMS is 0.03. Then, the electronic device can use threshold_list [0.7, 0.3, 0.1] to divide the vertical data into four search priorities: 1 for vertical data with probabilities between 1 and 0.7, 2 for those between 0.7 and 0.3, 3 for those between 0.3 and 0.1, and 4 for those between 0.1 and 0. In other words, the search priority for documents is 3, for notes it is 2, for schedules it is 2, for contacts it is 4, and for text messages it is 4.
[0191] Furthermore, electronic devices can use models to determine the appropriate search method, such as [inverted index search, SQL search], based on the search request information "weekend plan", the characteristics of various search methods, context, and other descriptions. They can then set the corresponding priorities, such as a priority of 1 for inverted index search and a priority of 2 for SQL search.
[0192] Therefore, based on the priority information of application vertical data and the priority information of retrieval methods, electronic devices can calculate the following: Document_Inverted Index -> 3+1->4; Document_SQL Retrieval -> 3+2->5; Notes_Inverted Index -> 2+1->3; Notes_SQL Retrieval -> 2+2->4; Calendar_Inverted Index -> 2+1->3; Calendar_SQL Retrieval -> 2+2->4; Contact_Inverted Index -> 4+1->5; Contact_SQL Retrieval -> 4+2->6; SMS_Inverted Index -> 4+1->5; SMS_SQL Retrieval -> 4+2->6. The lower the priority of the data, the higher the corresponding priority level. Thus, electronic devices can obtain priority level 1 [Calendar_Inverted Index, Notes_Inverted Index]; priority level 2 [Document_Inverted Index, Notes_SQL Retrieval, Calendar_SQL Retrieval]; priority level 3 [Document_SQL Retrieval, Contact_Inverted Index, SMS_Inverted Index]; and priority level 4 [Contact_SQL Retrieval, SMS_SQL Retrieval].
[0193] Electronic devices can perform retrieval tasks based on priority levels. After completing a task at each priority level, the electronic device can add the retrieval results to the result pool one by one. For each retrieval result added, the electronic device can use a model to determine whether it is highly relevant to the user's request: if highly relevant, it is added to the promotion pool and simultaneously returned to the UI for display; if partially relevant, it is added to the candidate pool; if completely irrelevant, it is directly added to the rejection pool.
[0194] The electronic device can, upon completing each priority level task, use a model to determine whether the results in the promotion pool fully answer the user's request, and then stop searching or proceed to the next priority level. This process continues until all P search instruction templates have been searched, at which point the results from the candidate pool are combined to further determine whether the user's request can be fully answered.
[0195] If all search results in the promotion pool and candidate pool still cannot fully answer the user's request, the model can be informed that no relevant information has been found that satisfies the user's needs. The model can then determine if the user's request is clear and valid, correct the error, and generate a new search request using an expanded method, re-executing the information retrieval process. This process continues until the user actively stops or the search is repeated a fixed number of times (N_iter), at which point the entire process ends.
[0196] In this way, electronic devices can build modular task planning modules based on the hierarchical retrieval method of user requests, from the dimensions of vertical data types and retrieval methods, so that the entire retrieval system can dynamically select reasonable retrieval schemes and task execution sequences according to the complexity of user requests.
[0197] Furthermore, by establishing a performance-priority strategy, employing a promotion pool, a candidate pool, and a rejection pool, and designing a streaming interactive scheme, we can ensure that users can quickly see highly relevant results and minimize waiting time. In addition, through model reflection and analysis of the quality of the returned results, and by rewriting requests and using a multi-round retrieval pattern, we can minimize the occurrence of missed results.
[0198] In other words, through dynamic programming, streaming display, and iterative reflection, multiple design modules can effectively balance the seesaw problem between user waiting time, terminal computing cost, and search result quality. This solves the problem of high performance loss and poor performance that cannot be adjusted in traditional RAG solutions, and achieves experience optimization in the whole-domain search scenario.
[0199] Example 2: Figure 8B A flowchart of an information retrieval method provided in an embodiment of this application is shown. (In conjunction with...) Figure 8B The steps D1 to D18 shown in this application embodiment indicate that the information retrieval method provided may include the implementation process of the following embodiments.
[0200] The electronic device can first train relevant component models and perform joint fine-tuning to obtain an inference retrieval model. The electronic device can use the atom_encoder component in the inference retrieval model to calculate the vector representation vec_atom_x corresponding to the semantic description of all atomic retrieval capabilities and save it to a vector database.
[0201] Upon receiving a retrieval request, the electronic device can inject the prompt and user request into the inference retrieval model to generate the next token; and maintain the kv_cache state curr_kv_cache and the hidden layer information hidden_state in the current state.
[0202] Electronic devices can calculate the probability of triggering a retrieval (retrieve_prob) using the base model and retrieve_gate; and determine whether the inference retrieval model is a termination token. <eos>If yes, then stop streaming and end the current search process; otherwise, stream the token and record the current kv_cache status.
[0203] If the electronic device determines that `retrieve_prob` is greater than the threshold α, it can output the `vec_context` corresponding to the current model context content via `retrieve_head`, calculate the similarity between `vec_context` and all retrieval capability description vectors `vec_atom_x`, and select the top `k` as the retrieval capabilities to be executed. Then, the electronic device can display the currently executing retrieval method at the end of the streaming display, indicating to the user that a retrieval is in progress via a breathing light. At this point, the background can execute the corresponding retrieval command to obtain the retrieve_result.
[0204] The electronic device can convert `retrieve_result` into `retrieve_result_kv_cache` via the KV-Adapter component and update the current `curr_kv_cache`. After the search is complete, the electronic device can cancel the search instruction indicator displayed by the breathing light in the UI and display a reference icon in that location. The search content and search instruction information are stored on a secondary page, and users can click the reference icon to view the relevant content returned by the search. Specifically, the user's click on the reference does not affect the execution of the question-and-answer process.
[0205] Furthermore, the electronic device can continue to perform the next round of retrieval until the reasoning retrieval model determines that the token represents the termination. <eos>Stop streaming and end the current search process.
[0206] In this way, electronic devices can train an inference retrieval model, internalizing the triggering timing and planning of retrieval capabilities into the model's internal parameters. This allows the inference retrieval model to perform retrieval while thinking, making the triggering timing and selection of atomic retrieval skills more automated and precise. This avoids subjective bias caused by external intervention. Furthermore, electronic devices can display the system's execution chain through a two-level page display, increasing the confidence level of the streamed information.
[0207] Meanwhile, converting search results into a KV_cache format can avoid token consumption caused by recalculating prompts, reduce dialogue rounds, and provide users with a more human-like experience.
[0208] It should be noted that the above-described method embodiments, or the various possible implementations of the method embodiments, can be executed individually, or, provided there are no contradictions, they can be combined with each other. The specific implementation can be determined according to actual usage requirements, and this application embodiment does not impose any restrictions on this.
[0209] It should be noted that the information retrieval method provided in this application embodiment can be executed by an information retrieval device. This application embodiment uses an information retrieval device executing the information retrieval method as an example to illustrate the information retrieval device provided in this application embodiment.
[0210] Figure 9 A schematic diagram of a possible structure of the information retrieval device involved in an embodiment of this application is shown. For example... Figure 9 As shown, the information retrieval device 70 may include: an acquisition module 71 and a processing module 72;
[0211] Among them, the acquisition module 71 is used to acquire retrieval request information;
[0212] The acquisition module 71 is also used to acquire P search instruction templates that match the search request information based on the search request information. Each search instruction template includes an application vertical data and a search method, where P is a positive integer.
[0213] The processing module 72 is used to perform a search based on the search request information and the application vertical data of each search instruction template obtained by the acquisition module 71.
[0214] In one possible implementation, the information retrieval device 70 provided in this application embodiment may further include: a determining module; the determining module is configured to determine, based on retrieval request information and at least one retrieval instruction template, the retrieval weight representing the probability that a retrieval operation can be performed using the application vertical data; and based on the retrieval weight, determine first priority information, the first priority information representing the retrieval priority corresponding to the application vertical data of the at least one retrieval instruction template; and based on the retrieval request information and the retrieval method of the at least one retrieval instruction template, determine second priority information, the second priority information representing the retrieval priority corresponding to the retrieval method of the at least one retrieval instruction template; and based on the first priority information and the second priority information, determine P retrieval instruction templates from the at least one retrieval instruction template.
[0215] In one possible implementation, the information retrieval device 70 provided in this application embodiment may further include: a display module; the aforementioned processing module 72 is specifically used to obtain request data from the application vertical category data of each search instruction template based on the search request information, according to the search method of each search instruction template included in the first search instruction template, to obtain a first search result corresponding to the first search instruction template, wherein the first search indicator template is at least one search instruction template with the highest priority level among P search instruction templates; the display module is used to display the search result with the first relevance level in the first search result when the search result with the first relevance level meets the search requirement determination condition. The display module is configured to display the search results with a relevance level of the first relevance level in the first search results, or, if the search results with a relevance level of the first relevance level in the first search results do not meet the search requirement determination conditions, the processing module 72 is configured to perform a search operation through the second search instruction template to obtain the second search results, and the display module is also configured to display the search results with a relevance level of the first relevance level in the second search results, wherein the second search instruction template is at least one search instruction template with the second highest priority level among P search instruction templates.
[0216] In one possible implementation, the display module is specifically used to display the search results with a first relevance level among the P third search results obtained based on P search instruction templates when the search results with a first relevance level do not meet the search requirement determination conditions. The acquisition module 71 is specifically used to acquire the search results with a second relevance level among the P third search results. The display module is specifically used to display the search results with a second relevance level among the P third search results; wherein the second relevance level is lower than the first relevance level.
[0217] In one possible implementation, the processing module 72 is further configured to, when the search results with relevance levels of first and second relevance levels among the P third search results obtained based on the P search instruction templates do not meet the search requirement determination conditions, edit the search request information based on the intent information of the search request information. The editing process includes at least one of the following: error correction processing and expansion processing; and perform a search operation based on the edited search request information and the P search instruction templates to obtain and display the search results corresponding to the edited search request information.
[0218] In one possible implementation, the information retrieval device 70 provided in this application embodiment may further include: a calculation module; the calculation module is used to calculate the similarity based on the description vector corresponding to the retrieval request information and the retrieval capability description vector corresponding to at least one retrieval instruction template; the aforementioned acquisition module 71 is further used to acquire P retrieval instruction templates that satisfy the similarity condition based on the similarity.
[0219] In one possible implementation, the processing module 72 is specifically used to obtain request data from the application vertical data of each search instruction template based on the search request information, according to the search method of each search instruction template, to obtain P third search results, and display the overview information corresponding to the P third search results.
[0220] In one possible implementation, the aforementioned overview information includes P reference identifiers; each reference identifier corresponds to a search result and a search instruction; the information retrieval device 70 provided in this application embodiment may further include: a receiving module and a display module; the receiving module is configured to receive a selection input for a target reference identifier after displaying the overview information corresponding to the P third search results, wherein the target reference identifier is any one of the P reference identifiers; the display module is configured to display the search result and search instruction information corresponding to the target reference identifier in response to the selection input.
[0221] In one possible implementation, the information retrieval device 70 provided in this application embodiment may further include: a calculation module; the processing module 72 is further configured to, after obtaining the retrieval request information, input the retrieval request information into the inference retrieval model, output and display the streaming response information; the calculation module is configured to, during the display of the streaming response information, calculate the retrieval trigger probability based on the displayed streaming response information through the inference retrieval model; the acquisition module 71 is specifically configured to, when the retrieval trigger probability is greater than or equal to a preset threshold, acquire P retrieval instruction templates matching the retrieval request information based on the retrieval request information.
[0222] In the information retrieval device provided in this application embodiment, the electronic device can determine P matching search instruction templates based on search request information, that is, determine P combinations of application vertical data and search methods. Therefore, for each search instruction template, the electronic device can perform a corresponding search operation based on the search request information within the application vertical data of that search instruction template using the search method specified in that template. In other words, the electronic device can divide search instruction templates by application vertical data and search methods, thus forming a hierarchical search method. This allows for determining the specific search method and the application vertical data used for retrieval, rather than being limited to a single-dimensional information retrieval. Furthermore, since the P search instruction templates are obtained or determined based on search request information, it is understandable that the electronic device can dynamically select matching search instruction templates based on the user's actual needs, thereby providing search results that better meet the user's actual needs and improving the accuracy of information retrieval.
[0223] The information retrieval device in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the device.
[0224] The information retrieval device in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit the specific operating system used.
[0225] The information retrieval device provided in this application embodiment can implement all the processes implemented in the above method embodiments, and will not be described again here to avoid repetition.
[0226] Optionally, such as Figure 10 As shown, this application embodiment also provides an electronic device 90, including a processor 91 and a memory 92. The memory 92 stores a program or instructions that can run on the processor 91. When the program or instructions are executed by the processor 91, they implement the various steps of the above-described information retrieval method embodiment and can achieve the same technical effect. To avoid repetition, they will not be described again here.
[0227] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.
[0228] Figure 11 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of this application.
[0229] The electronic device 100 includes, but is not limited to, components such as: radio frequency unit 101, network module 102, audio output unit 103, input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, and processor 110.
[0230] Those skilled in the art will understand that the electronic device 100 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 110 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 11 The electronic device structure shown does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.
[0231] The processor 110 is used to acquire retrieval request information; and based on the retrieval request information, acquire P retrieval instruction templates that match the retrieval request information, each retrieval instruction template including an application vertical data and a retrieval method, where P is a positive integer; and perform a retrieval based on the retrieval request information and the application vertical data of each retrieval instruction template through the retrieval method of each retrieval instruction template.
[0232] Optionally, the processor 110 is specifically configured to: determine the retrieval weight of the application vertical data of at least one retrieval instruction template based on retrieval request information and at least one retrieval instruction template, wherein the retrieval weight represents the probability that a retrieval operation can be performed using the application vertical data; determine first priority information based on the retrieval weight, wherein the first priority information represents the retrieval priority corresponding to the application vertical data of at least one retrieval instruction template; determine second priority information based on the retrieval request information and the retrieval method of at least one retrieval instruction template, wherein the second priority information represents the retrieval priority corresponding to the retrieval method of at least one retrieval instruction template; and determine P retrieval instruction templates from at least one retrieval instruction template based on the first priority information and the second priority information.
[0233] Optionally, the processor 110 is specifically used to obtain request data from the application vertical data of each search instruction template based on the search request information, according to the search method of each search instruction template included in the first search instruction template, to obtain the first search result corresponding to the first search instruction template. The first search instruction template is at least one search instruction template with the highest priority level among the P search instruction templates. The display unit 106 is used to display the search results with the first relevance level in the first search results when the search results with the first relevance level in the first search results meet the search requirement determination conditions; or, the display unit 106 is used to display the search results with the first relevance level in the first search results when the search results with the first relevance level in the first search results do not meet the search requirement determination conditions. The processor 110 is used to perform a search operation through the second search instruction template to obtain the second search result, and the display unit 106 is used to display the search results with the first relevance level in the second search results. The second search instruction template is at least one search instruction template with the second highest priority level among the P search instruction templates.
[0234] Optionally, the display unit 106 is specifically used to display the search results with a first relevance level among the P third search results obtained based on P search instruction templates when the search results with a first relevance level do not meet the search requirement determination conditions. The processor 110 is specifically used to obtain the search results with a second relevance level among the P third search results. The display unit 106 is specifically used to display the search results with a second relevance level among the P third search results; wherein the second relevance level is lower than the first relevance level.
[0235] Optionally, the processor 110 is specifically configured to, when the search results with relevance levels of first and second relevance levels among the P third search results obtained based on P search instruction templates do not meet the search requirement determination conditions, edit the search request information based on the intent information of the search request information. The editing process includes at least one of the following: error correction processing and expansion processing; and perform a search operation based on the edited search request information and the P search instruction templates to obtain and display the search results corresponding to the edited search request information.
[0236] Optionally, the processor 110 is specifically used to calculate the similarity between the description vector corresponding to the retrieval request information and the retrieval capability description vector corresponding to at least one retrieval instruction template; and based on the similarity, to obtain P retrieval instruction templates that satisfy the similarity condition.
[0237] Optionally, the processor 110 is specifically used to obtain request data from the application vertical data of each search instruction template based on the search request information, and obtain P third search results, and the display unit 106 is used to display the overview information corresponding to the P third search results.
[0238] Optionally, the above overview information includes P reference identifiers; each reference identifier corresponds to a search result and a search instruction; the user input unit 107 is used to receive a selection input for a target reference identifier after displaying the overview information corresponding to the P third search results, wherein the target reference identifier is any one of the P reference identifiers; the display unit 106 is used to display the search result and search instruction information corresponding to the target reference identifier in response to the selection input.
[0239] Optionally, the processor 110 is further configured to, after obtaining the retrieval request information, input the retrieval request information into the inference retrieval model, output and display the streaming response information; and during the display of the streaming response information, calculate the retrieval trigger probability based on the displayed streaming response information through the inference retrieval model; specifically, the processor 110 is configured to, when the retrieval trigger probability is greater than or equal to a preset threshold, obtain P retrieval instruction templates that match the retrieval request information based on the retrieval request information.
[0240] In the electronic device provided in this application embodiment, the electronic device can determine P matching search instruction templates based on search request information, that is, determine P combinations of application vertical data and search methods. Therefore, for each search instruction template, the electronic device can perform a corresponding search operation based on the search request information within the application vertical data of that search instruction template using the search method specified in that template. In other words, the electronic device can divide search instruction templates by application vertical data and search methods, thus forming a hierarchical search method. This allows for determining the specific search method and the application vertical data used for retrieval, rather than being limited to a single-dimensional information retrieval. Furthermore, since the P search instruction templates are obtained or determined based on search request information, it is understandable that the electronic device can dynamically select matching search instruction templates based on the user's actual needs, thereby providing search results that better meet the user's actual needs and improving the accuracy of information retrieval.
[0241] The electronic device provided in this application embodiment can implement the various processes implemented in the above method embodiments and achieve the same technical effect. To avoid repetition, it will not be described again here.
[0242] For details on the beneficial effects of the various implementation methods in this embodiment, please refer to the beneficial effects of the corresponding implementation methods in the above method embodiments. To avoid repetition, these will not be repeated here.
[0243] It should be understood that, in this embodiment, the input unit 104 may include a graphics processing unit (GPU) 1041 and a microphone 1042. The GPU 1041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 106 may include a display panel 1061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 107 includes at least one of a touch panel 1071 and other input devices 1072. The touch panel 1071 is also called a touch screen. The touch panel 1071 may include a touch detection device and a touch controller. Other input devices 1072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, and joysticks, which will not be described in detail here.
[0244] The memory 109 can be used to store software programs and various data. The memory 109 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 109 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 109 in the embodiments of this application includes, but is not limited to, these and any other suitable types of memory.
[0245] Processor 110 may include one or more processing units; optionally, processor 110 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 110.
[0246] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.
[0247] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0248] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above method embodiments and achieve the same technical effect. To avoid repetition, it will not be described again here.
[0249] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0250] This application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the above method embodiments and achieve the same technical effects. To avoid repetition, it will not be described again here.
[0251] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, 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, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one…" does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0252] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0253] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.< / eos> < / eos> < / eos>
Claims
1. An information retrieval method, characterized in that, The method includes: Obtain search request information; Based on the search request information, obtain P search instruction templates that match the search request information. Each search instruction template includes an application vertical data and a search method, where P is a positive integer. The retrieval is performed based on the retrieval request information and the application vertical data of each retrieval instruction template, using the retrieval method of each retrieval instruction template.
2. The method according to claim 1, characterized in that, The step of obtaining P search instruction templates that match the search request information based on the search request information includes: Based on the search request information and at least one search instruction template, the search weight of the application vertical data of the at least one search instruction template is determined, and the search weight is used to represent the probability that a search operation can be performed using the application vertical data; Based on the retrieval weight, a first priority information is determined, wherein the first priority information represents the retrieval priority corresponding to the application vertical data of the at least one retrieval instruction template; Based on the search request information and the search method of the at least one search instruction template, a second priority information is determined, wherein the second priority information represents the search priority corresponding to the search method of the at least one search instruction template; Based on the first priority information and the second priority information, the P search instruction templates are determined from the at least one search instruction template.
3. The method according to claim 1 or 2, characterized in that, The retrieval method based on each retrieval instruction template, and the retrieval performed according to the retrieval request information and the application vertical data of each retrieval instruction template, includes: Based on the search request information, the search request data is obtained from the application vertical data of each search instruction template through the search method of each search instruction template included in the first search instruction template, and the first search result corresponding to the first search instruction template is obtained. The first search indicator template is at least one search instruction template with the highest priority level among the P search instruction templates. If, in the first search results, the search results with a relevance level of "first relevance" meet the search requirement determination criteria, then the search results with a relevance level of "first relevance" in the first search results are displayed; or, If the search results with a relevance level of the first relevance level in the first search results do not meet the search requirement determination conditions, the search results with a relevance level of the first relevance level in the first search results are displayed, and the search operation is performed through the second search instruction template to obtain the second search results. The search results with a relevance level of the first relevance level in the second search results are also displayed. The second search instruction template is at least one search instruction template with the second highest priority level among the P search instruction templates.
4. The method according to claim 3, characterized in that, The retrieval method based on each retrieval instruction template, and the retrieval performed according to the retrieval request information and the application vertical data of each retrieval instruction template, includes: If the search results with a first relevance level among the P third search results obtained based on the P search instruction templates do not meet the search requirement determination conditions, then the search results with a first relevance level among the P third search results are displayed, and the search results with a second relevance level among the P third search results are obtained and displayed. The second correlation level is lower than the first correlation level.
5. The method according to claim 3, characterized in that, The retrieval method based on each retrieval instruction template, and the retrieval performed according to the retrieval request information and the application vertical data of each retrieval instruction template, includes: If the search results with a relevance level of first relevance level and second relevance level among the P third search results obtained based on the P search instruction templates do not meet the search requirement determination conditions, the search request information is edited based on the intent information of the search request information. The editing process includes at least one of the following: error correction and expansion. Based on the edited search request information and the P search instruction templates, a search operation is performed to obtain and display the search results corresponding to the edited search request information.
6. The method according to claim 1, characterized in that, The step of obtaining P search instruction templates that match the search request information based on the search request information includes: Based on the description vector corresponding to the search request information and the search capability description vector corresponding to at least one search instruction template, the similarity is calculated. Based on the similarity, obtain P search instruction templates that meet the similarity conditions.
7. The method according to claim 1, characterized in that, The retrieval method based on each retrieval instruction template, and the retrieval performed according to the retrieval request information and the application vertical data of each retrieval instruction template, includes: Based on the search request information, the search request data is obtained from the application vertical data of each search instruction template according to the search method of each search instruction template, resulting in P third search results, and the summary information corresponding to the P third search results is displayed.
8. The method according to claim 7, characterized in that, The overview information includes P reference identifiers; each reference identifier corresponds to a search result and a search instruction. After displaying the overview information corresponding to the P third search results, the method further includes: Receive input selecting a target reference identifier, wherein the target reference identifier is any one of the P reference identifiers; In response to the selection input, the search results and search instruction information corresponding to the target reference identifier are displayed.
9. The method according to claim 1, characterized in that, After obtaining the retrieval request information, the method further includes: The retrieval request information is input into the inference retrieval model, and the streaming response information is output and displayed. During the process of displaying the streaming response information, the reasoning retrieval model calculates the retrieval trigger probability based on the displayed streaming response information. The step of obtaining P search instruction templates that match the search request information based on the search request information includes: If the probability of triggering the search is greater than or equal to a preset threshold, P search instruction templates that match the search request information are obtained based on the search request information.
10. An information retrieval device, characterized in that, The information retrieval device includes: an acquisition module and a processing module; The acquisition module is used to acquire retrieval request information; The acquisition module is further configured to acquire P search instruction templates that match the search request information based on the search request information. Each search instruction template includes an application vertical data and a search method, where P is a positive integer. The processing module is used to perform a search based on the search request information and the application vertical data of each search instruction template obtained by the acquisition module.
11. An electronic device, characterized in that, It includes a processor and a memory, the memory storing programs or instructions that can run on the processor, the programs or instructions being executed by the processor to implement the steps of the information retrieval method as described in any one of claims 1 to 9.
12. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the information retrieval method as described in any one of claims 1 to 9.