Query method and apparatus, device and storage medium
By determining the search requirements of the query request in a conversational interactive application, using the search system to obtain multiple search results and generate responses, the problems of insufficient query result accuracy and efficiency in the existing technology are solved, and more efficient query result generation is achieved.
Patent Information
- Application Number
- PCT/CN2024/084220
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-03-27
- Publication Date
- 2025-10-02
AI Technical Summary
Existing applications cannot meet user needs when providing query results, resulting in insufficient accuracy and efficiency of query results.
In conversational interactive applications, by determining whether a query request involves a search requirement, a search system is used to obtain multiple search results and generate responses based on these results.
Improves the accuracy and efficiency of queries, ensuring that query results better meet user needs.
Smart Images

Figure CN2024084220_02102025_PF_FP_ABST
Abstract
Description
Method, device, equipment and storage medium for query Technical Field
[0001] Exemplary implementations of the present disclosure generally relate to the field of computers, and more particularly, to methods, devices, apparatuses, and computer-readable storage media for querying. Background Art
[0002] With the rapid development of the internet, more and more applications are being designed to provide various services to users. For example, applications can provide query services to users. Applications can receive query requests from users (e.g., query text entered by the user, also known as "questions") and, based on the query requests, provide query results corresponding to the questions. However, the query results provided by existing applications may not meet user needs, so there is a desire to improve the accuracy and efficiency of queries.
[0003] Summary of the Invention
[0004] In a first aspect of the present disclosure, a method for querying is provided. The method includes: in a conversational interactive application, in response to receiving a query request from a user, determining whether the query request involves a search requirement; in response to determining that the query request involves the search requirement, obtaining, using a search system, a plurality of search results matching the query request; and presenting a response to the query request, the response generated based on the plurality of search results.
[0005] In a second aspect of the present disclosure, a device for querying is provided. The device includes: a demand determination module configured to, in a conversational interactive application, determine whether a query request involves a search demand in response to receiving a query request from a user; a result acquisition module configured to, in response to determining that the query request involves a search demand, utilize a search system to acquire multiple search results that match the query request; and a response presentation module configured to present a response to the query request, wherein the response is generated based on the multiple search results.
[0006] In a third aspect of the present disclosure, an electronic device is provided. The electronic device includes: at least one processing unit; and at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions, when executed by the at least one processing unit, causing the electronic device to perform the method according to the first aspect of the present disclosure.
[0007] In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the processor implements the method according to the first aspect of the present disclosure.
[0008] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the method according to the first aspect of the present disclosure is implemented.
[0009] It should be understood that the content described in this summary section is not intended to limit the key features or important features of the implementation of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easy to understand through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The above and other features, advantages and aspects of various implementations of the present disclosure will become more apparent hereinafter with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:
[0011] FIG1 shows a schematic diagram of an example environment in which embodiments of the present disclosure can be implemented;
[0012] FIG2 shows a schematic diagram of a framework for querying according to some embodiments of the present disclosure;
[0013] 3A to 3H are schematic diagrams illustrating example pages according to some embodiments of the present disclosure;
[0014] FIG4 shows a flowchart of a process for querying according to some embodiments of the present disclosure;
[0015] FIG5 shows a schematic structural block diagram of an apparatus for querying according to some embodiments of the present disclosure; and
[0016] FIG6 illustrates a block diagram of an electronic device in which one or more embodiments of the present disclosure may be implemented. DETAILED DESCRIPTION
[0017] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.
[0018] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, i.e., "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may be included below.
[0019] Herein, unless explicitly stated otherwise, executing a step “in response to A” does not mean executing the step immediately after “A” but may include one or more intermediate steps.
[0020] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) must comply with the requirements of relevant laws, regulations and relevant provisions.
[0021] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0022] For example, in response to receiving a user's active request, a prompt message is sent to the user to clearly remind the user that the operation requested to be performed will require obtaining and using the user's personal information, so that the user can independently choose whether to provide personal information to the electronic device, application, server or storage medium and other software or hardware that performs the operation of the technical solution of the present disclosure based on the prompt message.
[0023] As an optional but non-limiting implementation, in response to receiving a user's active request, a prompt message may be sent to the user, for example, in the form of a pop-up window, in which the prompt message may be presented in text form. Furthermore, the pop-up window may also include a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0024] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0025] As used herein, the term "model" can learn the association between corresponding inputs and outputs from training data, so that after training is completed, corresponding outputs can be generated for given inputs. The generation of the model can be based on machine learning technology. Deep learning is a machine learning algorithm that processes inputs and provides corresponding outputs by using multiple layers of processing units. A neural network model is an example of a model based on deep learning. In this article, "model" may also be referred to as "machine learning model", "learning model", "machine learning network" or "learning network", and these terms are used interchangeably in this article.
[0026] A "neural network" is a machine learning network based on deep learning. A neural network is capable of processing inputs and providing corresponding outputs. It typically includes an input layer, an output layer, and one or more hidden layers between the input and output layers. Neural networks used in deep learning applications typically include many hidden layers, thereby increasing the depth of the network. The layers of a neural network are connected in sequence so that the output of the previous layer is provided as input to the next layer, where the input layer receives the input of the neural network and the output of the output layer serves as the final output of the neural network. Each layer of a neural network includes one or more nodes (also called processing nodes or neurons), each of which processes the input from the previous layer.
[0027] Generally speaking, machine learning can be roughly divided into three stages, namely the training stage, the testing stage, and the application stage (also called the inference stage). In the training stage, a given model can be trained using a large amount of training data, and the parameter values are continuously updated iteratively until the model can obtain consistent inferences that meet the expected goals from the training data. Through training, the model can be considered to be able to learn the association between input and output (also called input-to-output mapping) from the training data. The parameter values of the trained model are determined. In the testing stage, the test input is applied to the trained model to test whether the model can provide the correct output, thereby determining the performance of the model. The testing stage can sometimes be integrated into the training stage. In the application or inference stage, the trained model can be used to process the actual model input based on the parameter values obtained through training to determine the corresponding model output.
[0028] Sample Environment
[0029] 1 shows a schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented. In the example environment 100, an application 120 is installed in a terminal device 110. A user 140 can interact with the application 120 via the terminal device 110 and / or a device attached to the terminal device 110.
[0030] In some embodiments, application 120 may be any suitable application that can provide query services. In environment 100 of FIG1 , if application 120 is active, terminal device 110 may present page 150 of application 120. Page 150 may include various pages that application 120 can provide, such as a query page, a search page, a search result presentation page, and the like.
[0031] In some embodiments, the terminal device 110 communicates with the server 130 to enable the supply of services to the application 120. The terminal device 110 can be any type of mobile terminal, fixed terminal or portable terminal, including a mobile phone, a desktop computer, a laptop computer, a notebook computer, a netbook computer, a tablet computer, a media computer, a multimedia tablet, a personal communication system (PCS) device, a personal navigation device, a personal digital assistant (PDA), an audio / video player, a digital camera / camcorder, a positioning device, a television receiver, a radio broadcast receiver, an e-book device, a gaming device or any combination thereof, including accessories and peripherals of these devices or any combination thereof. In some embodiments, the terminal device 110 can also support any type of interface for the user (such as a "wearable" circuit, etc.). The server 130 can be various types of computing systems / servers that can provide computing power, including but not limited to mainframes, edge computing nodes, computing devices in cloud environments, and the like.
[0032] It should be understood that the structure and function of the various elements in the environment 100 are described for illustrative purposes only and do not imply any limitation on the scope of the present disclosure.
[0033] The process used for querying
[0034] Traditionally, an application or system that provides a query service can, in response to a query request received from a user, directly determine data matching the query request from a database based on the query request, or determine data matching the query request based on previously learned knowledge. The application or system can then determine a query result for the query request based on this data. If the database or previously learned knowledge does not include data matching the query request, the application will be unable to provide accurate query results to the user.
[0035] To at least partially address the deficiencies in the prior art, according to an embodiment of the present disclosure, a method for querying is proposed. Referring to FIG. 2 , an overview of an exemplary embodiment of the present disclosure is described. FIG. 2 shows a schematic diagram of a querying framework 200 according to some embodiments of the present disclosure. Framework 200 can be implemented on a terminal device 110 and a server 130 . Specifically, terminal device 110 can receive a query request 220 in a conversational interactive application and access a query system 210 on a server device. Query system 210 includes a search system 212 and a generation system 214 .
[0036] The terminal device 110 may receive a query request 220 from a user (e.g., user 140). The terminal device 110 may receive the query request 220 from the user in any appropriate manner, which is not limited in this disclosure. For example, the terminal device 110 may provide an input box and receive the query request 220 from the user via the input box. The query request 220 may be of any appropriate type, including but not limited to text, voice, video, image, and the like.
[0037] In one embodiment, the terminal device 110 may access the server 130 to perform a query process. In response to receiving a query request 220 from a user, the terminal device 110 may perform requirement identification 222 on the query request 220 to determine whether the query request 220 involves a search requirement. The terminal device 110 may then utilize the query system 210 to determine a query result 230 for the query request 220 based on the result of determining whether the search requirement is involved.
[0038] In one embodiment, whether a query request involves a search requirement can be determined based on a variety of methods: for example, in response to determining that the semantic content expressed by the query request matches a predetermined search semantic associated with the search requirement, it is determined that the query request involves a search requirement; for another example, in response to determining that the query request includes a predetermined search keyword associated with the search requirement, it is determined that the query request involves a search requirement.
[0039] Regarding the specific method of determining the demand, the terminal device 110 can use any appropriate method to determine whether the query request 220 involves a search demand. For example, the terminal device 110 can use a machine learning model (also referred to as a model) to perform semantic analysis on the query request and then determine whether the query request 220 involves a search demand. This machine learning model can be any appropriate model, for example, it can include a transformer model, RNN, CNN, etc. Here, the machine learning model can be trained using labeled samples, and the trained machine learning model can directly output whether the query request involves a search demand.
[0040] Alternatively and / or additionally, whether the query request 220 involves a search demand can be determined based on text analysis. Assuming that the result of the text analysis indicates that the query request 220 involves time-sensitive content (that is, content that is updated in real time), it is determined that the query request 220 involves a search demand. For another example, assuming that the result of the text analysis indicates that the query request 220 involves knowledge content (that is, content that will not be updated in real time), it is determined that the query request 220 does not involve a search demand. Specifically, keywords involving search demands can be pre-defined, such as changes, weather, forecasts, flights, tickets, tickets, or keywords specifying future time points, etc. At this time, assuming that the query request is "Changes in product XXXX", it can be determined that the query request involves a search request.
[0041] In some embodiments, when performing demand identification 222, the terminal device 110 may determine whether the query request 220 includes multiple sub-requests. Semantic analysis may be performed on the query request to determine the semantic content expressed by the query request, and in response to determining that the semantic content includes multiple semantic contents, it is determined that the query request includes multiple sub-requests. Specifically, for example, a model may be used to determine whether the query request 220 includes multiple sub-requests. If multiple sub-requests are included, the specific contents of these multiple sub-requests are determined with the help of a model. Here, the machine learning model may be trained using labeled samples, and the trained machine learning model may directly output the multiple sub-requests included in the query request. Alternatively and / or additionally, appropriate prompt words may be input into the language model, and the language model may be used to implement the process of splitting the sub-requests.
[0042] If it is determined that the query request 220 includes multiple sub-requests, the query system 210 is used to determine multiple search results that match the multiple sub-requests. For example, the terminal device 110 can determine whether the multiple sub-requests include a sub-request related to the search requirement, and if it is determined that the sub-request includes a sub-request related to the search requirement, the search system 212 is used to obtain search results that match the sub-request related to the search requirement.
[0043] In some embodiments, the terminal device 110 may also determine the user's potential needs based on the query request 220. The potential needs may, for example, indicate subsequent query requests to be issued by the user after the query request 220. The terminal device 110 may then use the search system 212 to obtain search results that match the potential needs. For example, if the query request 220 is "XX tourist attractions", the query system 210 may determine that the potential needs corresponding to the query request 220 may include "travel guide for XX tourist attractions", "accommodation recommendations for XX tourist attractions", "food at XX tourist attractions", "best travel months for XX tourist attractions", etc. It should be understood that although the above describes the process of demand identification performed by the terminal device 110, the above process may be performed by the server 130, and / or both the server 130 and the terminal device 110.
[0044] If it is determined that the query request 220 involves a search demand, the terminal device 110 can call the search system 212 in the query system 210 to obtain multiple search results that match the query request 220, and then use the generation system 214 to generate a query result 230 for the query request 220 based on the multiple search results (that is, the query result 230 is generated based on the multiple search results). The search system 210 can, for example, include any appropriate search engine that can obtain information matching the query request 220 from the Internet (this process can also be referred to as online search). This information can include naturally existing web pages, videos, images, and the like. The generation system 214 can, for example, include any appropriate machine learning model, such as a language model (LM), a generative model based on multimodality, and the like.
[0045] In some embodiments, if it is determined that the query request 220 does not involve a search requirement, the query system 210 may directly obtain data matching the query request 220 from a knowledge base (which may be a local database of the terminal device 110 or a database installed on another device) or previously learned knowledge, and utilize a generation system to generate a query result 230 for the query request based on the obtained data. It will be understood that, if the query request 220 includes multiple sub-requests, the query system 210 may also directly obtain data matching the sub-requests that do not involve a search requirement from a database or previously learned knowledge.
[0046] The terminal device 110 may then present the query result 230 to the user as a response to the query request. For example, if the query request input by the user is in the form of a conversation message in a conversation window, the terminal device 110 may also present the query result 230 to the user in the form of a response message to the conversation message.
[0047] By using the embodiments of the present disclosure, when it is determined that a query request involves a search requirement, the search system can be used to determine the search results, and then determine a response to the query request based on the search results. This helps to improve the accuracy and efficiency of the query.
[0048] Sample page for querying
[0049] Figures 3A to 3H show schematic diagrams of example pages 300A to 300H (also referred to as examples 300A to 300H) according to some embodiments of the present disclosure. It should be understood that the pages shown in the drawings are merely examples, and a variety of page designs may exist. The various graphical elements in the pages may have different arrangements and different visual representations, one or more elements may be omitted or replaced, and one or more other elements may also be present. The embodiments of the present disclosure are not limited in this respect.
[0050] The pages shown in Examples 300A to 300H may be presented at a terminal device 110. For ease of discussion, Examples 300A to 300H will be described with reference to the environment 100 of FIG. 1 and the framework 200 of FIG. 2 . It should be noted that the operations performed by the aforementioned terminal device 110 and the operations performed by the terminal device 110 described subsequently may be performed by a related application (e.g., application 120) installed on the terminal device 110. In some embodiments, the operations performed on the terminal device 110 may be performed with the assistance of the server 130.
[0051] In some embodiments, the terminal device 110 may provide a conversational query page. The terminal device 110 may receive a conversational message from a user via the conversational query page and determine the message as a query request from the user. Exemplarily, as shown in FIG3A , example 300A shows an example of a conversational query page. Example 300A may include, for example, an input box. The terminal device 110 may receive user input from the user via the input box and present this user input as a conversational message from the user (e.g., conversational message 301) in example 300A. Here, the user inquires about changes in a specific product "XXXX" via conversational message 301.
[0052] As mentioned above, terminal device 110 may determine that conversation message 301 is a query request from a user and determine whether the query request involves a search requirement (i.e., whether an online search using search system 212 is required). In response to determining that the query request involves a search requirement, terminal device 110 may utilize search system 212 within query system 210 to obtain multiple search results that match the query request. Furthermore, generation system 214 within query system 210 may be utilized to generate a query result (i.e., a response to the query request) based on the multiple search results. Terminal device 110 may then present the response to the query request.
[0053] Regarding the specific method of presenting responses, in some embodiments, since it takes a certain amount of time for the query system 210 to obtain search results, the terminal device 110 may also present a prompt message on the conversational query page, indicating that the user is waiting for the search. This prompt message may include any appropriate content, such as text, images, videos, etc. For example, as shown in FIG3A , the terminal device 110 may also present a prompt message 302 in example 300A indicating that the user is waiting for the search. Prompt message 302 may, for example, include the text "Searching..." For example, in response to obtaining multiple search results, the terminal device 110 may no longer present prompt message 302.
[0054] In some embodiments, the terminal device 110 may present a group of areas corresponding to a group of information items (also referred to as media items, media content items, etc.) in a conversational query page during the process of obtaining multiple search results that match the query request with the help of the search system 212, or after obtaining multiple search results that match the query request with the help of the search system 212. This group of information items corresponds to a group of search results in multiple search results, and each of the information items may be generated based on the corresponding search results. For example, the terminal device 110 may obtain the information items directly from the search results, or generate the information items based on the content of the search results. In response to determining that a target information item in a group of information items (the target information item is generated based on a target search result corresponding to the target information item in a group of search results) is generated, the terminal device 110 may present the target information item in a target area in a group of areas.
[0055] In some embodiments, a group of regions and a group of search results may correspond one-to-one according to the order of the group of search results. For example, the Nth region in the group of regions corresponds to the Nth search result in the group of search results. In response to the Nth information item corresponding to the Nth search result being generated, the terminal device 110 may present the information item in the corresponding Nth region. In some embodiments, the terminal device 110 may also present the group of information items in the group of regions according to the order in which the group of information items was determined. For example, if the Nth information item in the group of information items is the i-th generated, the terminal device 110 may present the information item in the i-th region.
[0056] Exemplarily, as shown in Figures 3B and 3C, Example 300B and Example 300C illustrate two examples of conversational query pages. Example 300B may include and area 310. Area 310, for example, may be used to present a group of areas corresponding to a group of information items (for example, a group of areas may be presented in the form of cards). The terminal device 110 may present Example 300C in response to a target information item being generated in a group of information items. In Example 300C, the terminal device 110 may present the target information item in a target area of a group of areas in area 310 in response to a target information item being generated in a group of information items. The target information item may, for example, include any appropriate content such as images, videos, audio, text, and photo collections.
[0057] In some embodiments, the terminal device 110 may also continue to present a prompt message for waiting for a response in the conversational query page in response to having presented a set of information items but not generating a response to the query request. This prompt message may also include any appropriate content, such as text, images, videos, etc. In example 300C, the terminal device 110 may continue to present a prompt message 304 for waiting for a response below the area 310. The prompt message 304 may, for example, include the text "Continuing to answer." The terminal device 110 may, for example, no longer present the prompt message 304 in response to generating a response. As shown in Figure 3D, the terminal device 110 may present the response 305 in example 300D in response to the generated response 305, and no longer present the prompt message 304.
[0058] In some embodiments, the terminal device 110 may also, in response to receiving a first interaction with the target information item, determine a candidate information item to be presented from the multiple search results based on the direction of the first interaction. The first interaction here may, for example, include a sliding operation. The candidate information item may, for example, be an information item corresponding to a search result other than a group of search results in the multiple search results. The terminal device 110 may also present the candidate information item at a location associated with the target information item.
[0059] In some embodiments, due to the limited page area of example 300B, the terminal device 110 may present a partial area of a group of areas in area 310. For example, the terminal device 110 may present more areas outside the partial area of a group of areas in response to receiving a trigger operation for a group of areas (e.g., a left sliding operation, a right sliding operation, a double-click operation, etc.). For example, the terminal device 110 may present, for example, 2.5 areas in area 310 (i.e., present 2.5 information items), and a group of areas may include, for example, 10 areas (i.e., a group of information items includes 10 information items). The terminal device 110 may present other areas outside the 2.5 areas in the 10 areas (i.e., present other information items outside the 2.5 information items in the 10 information items) in response to receiving a sliding operation for the 2.5 areas (also referred to as the 2.5 information items). As shown in Figures 3D and 3E, the terminal device 110 may present example 300E in response to receiving a left sliding operation for area 310 in example 300D. Example 300E may include information items that are different from some of the information items in Example 300D.
[0060] For example, if the plurality of search results includes 20 search results, and a group of search results includes the first 10 search results (e.g., 1-10), the terminal device 110 may present a group of information items corresponding to these 10 search results in area 310. In response to receiving a left swipe operation on the last media item in the group of information items, the terminal device 110 may present, in area 310, candidate information items corresponding to the last 10 search results (e.g., 11-20) of the 20 search results.
[0061] In some embodiments, the terminal device 110 may also present the target search results in response to receiving a second interaction for the target information item. For example, the terminal device 110 may present a presentation page of the target information item in response to receiving a second interaction for the target information item (e.g., a trigger operation for the target information item), and present the target search results in the presentation page. For example, if the target search result is a website, the terminal device 110 may present a web page corresponding to the website (i.e., a landing page) in response to receiving the second interaction for the target information item. For example, the terminal device 110 may also return to the conversational query page in response to receiving a third interaction for closing the target search results (e.g., a trigger operation for a close control).
[0062] In some embodiments, the terminal device 110 may further present an access control for accessing multiple search results on the conversational query page, and in response to receiving a fourth interaction with the access control, present the multiple search results on the list page. For example, in response to finding multiple search results, the terminal device 110 may present a conversation message for viewing the multiple search results on the conversational query page, which may be considered an access control.
[0063] Returning to example 300B, example 300B may also include, for example, a conversation message 303. For example, the terminal device 110 may present the conversation message 303 in response to obtaining multiple search results. For example, the terminal device 110 may present, in response to receiving a trigger operation on the conversation message 303, a search result presentation page (i.e., example 300F) including multiple search results as shown in FIG3F . Example 300F may, for example, include a return control 321, a search box 322, and multiple search results (e.g., search result 323, search result 324, search result 325, search result 326, etc.). The terminal device 110 may present the query request in the search box 322. The terminal device 110 may return to presenting example 300B in response to receiving a trigger operation on the return control 321.
[0064] Alternatively or additionally, in some embodiments, the terminal device 110 may further present a specific access control for accessing multiple search results in area 310. For example, returning to FIG3E , the terminal device 110 may present an access control 311 behind a group of areas in area 310. For example, in response to receiving a triggering operation on the access control 311, the terminal device 110 may present a search result presentation page including multiple search results as shown in FIG3F .
[0065] In some embodiments, if the target search result is successfully obtained, the target information item presented by the terminal device 110 may indicate the content in the target search result. If the target search result is not successfully obtained, the target information item presented by the terminal device 110 indicates that the target search result has not been obtained. As shown in Figure 3G, example 300G shows an example of a conversational query page. In example 300G, if the target search result is not successfully obtained, the terminal device 110 may present area 312 and control 313 in area 310. Area 312 presents a gray image, which may be presented in a gray style to indicate that the target search result has not been obtained (i.e., the query is abnormal) and there is no information item. For example, the terminal device 110 may present the abnormality details in response to receiving a trigger operation on control 313.
[0066] In addition to the exceptions caused by the inability to obtain multiple search results, the exceptions may also include, for example, the exception due to the inability to generate an information item based on the search results, the exception due to the inability to determine an answer based on the search results, and the like. As shown in Figure 3H, Example 300H shows an example of a conversational query page. In Example 300H, if an answer (i.e., a query result) cannot be generated based on the search results, the terminal device 110 may present a set of information items in area 310 and present a message 306 and a control 307 in Example 300H. Message 306 may indicate the cause of the exception, for example, the symbol "..." may indicate that an answer cannot be determined. For example, the terminal device 110 may present detailed information about the exception in response to receiving a trigger operation on the control 307.
[0067] In summary, according to the embodiments of the present disclosure, when it is determined that a query request involves a search requirement, the search system can be used to determine the search results, and then determine the response to the query request based on the search results. This helps to improve the accuracy and efficiency of the query.
[0068] Example Process
[0069] The above has described the specific details of each query step, providing a method for querying. FIG4 shows a flowchart of a query process 400 according to some embodiments of the present disclosure. Process 400 can be implemented at terminal device 110. Process 400 is described below with reference to FIG1.
[0070] In block 410 , in a conversational interaction application, the terminal device 110 , in response to receiving a query request from a user, determines whether the query request involves a search requirement.
[0071] In block 420 , in response to determining that the query request involves a search requirement, the terminal device 110 utilizes a search system to obtain a plurality of search results that match the query request.
[0072] At block 430 , the terminal device 110 presents a response to the query request, where the response is generated based on the plurality of search results.
[0073] In some embodiments, determining whether a query request involves a search requirement includes at least any one of the following: determining that the query request involves a search requirement in response to determining that the semantic content expressed by the query request matches a predetermined search semantic associated with the search requirement; or determining that the query request involves a search requirement in response to determining that the query request includes a predetermined search keyword associated with the search requirement.
[0074] In some embodiments, obtaining the plurality of search results includes: in response to determining that the query request includes a plurality of sub-requests, respectively determining a plurality of search results that match the plurality of sub-requests.
[0075] In some embodiments, determining that the query request includes multiple sub-requests includes: performing semantic analysis on the query request to determine semantic content expressed by the query request; and in response to determining that the semantic content includes multiple semantic contents, determining that the query request includes multiple sub-requests.
[0076] In some embodiments, obtaining multiple search results further includes: determining a user's potential needs based on the query request, where the potential needs indicate subsequent query requests to be issued by the user after the query request; and using a search system to obtain search results matching the potential needs.
[0077] In some embodiments, process 400 further includes presenting a set of information items that respectively correspond to a set of search results in the plurality of search results, wherein for a target information item in the set of information items, the target information item is generated based on a target search result corresponding to the target information item in the set of search results.
[0078] In some embodiments, process 400 is implemented in a conversational query page, and presenting a set of information items includes: presenting a target area corresponding to the target information item in the conversational query page; and in response to determining that the target information item is generated, presenting the target information item in the target area.
[0079] In some embodiments, process 400 further includes: in response to receiving a first interaction with the target information item, determining a candidate information item to be presented in the plurality of search results based on a direction of the first interaction; and presenting the candidate information item at a location associated with the target information item.
[0080] In some embodiments, process 400 further includes: in response to receiving a second interaction for the target information item, presenting the target search result; and in response to receiving a third interaction for closing the target search result, returning to the conversational query page.
[0081] In some embodiments, process 400 further includes: presenting an access control for accessing the plurality of search results in the conversational query page; and in response to receiving a fourth interaction with the access control, presenting the plurality of search results in the list page.
[0082] In some embodiments, process 400 further includes: presenting prompt information for waiting for a response in the conversational query page.
[0083] In some embodiments, in response to determining that the target search result is successfully obtained, the target information item indicates content in the target search result; and in response to determining that the target search result is not successfully obtained, the target information item indicates failure to obtain the target search result.
[0084] Example devices and equipment
[0085] Embodiments of the present disclosure also provide corresponding apparatuses for implementing the above-described methods or processes. FIG5 shows a schematic structural block diagram of an apparatus 500 for querying according to some embodiments of the present disclosure. Apparatus 500 may be implemented as or included in terminal device 110. Each module / component in apparatus 500 may be implemented by hardware, software, firmware, or any combination thereof.
[0086] As shown in FIG5 , apparatus 500 includes a requirement determination module 510 configured to, in a conversational interactive application, determine, in response to receiving a query request from a user, whether the query request involves a search requirement. Apparatus 500 also includes a result acquisition module 520 configured to, in response to determining that the query request involves a search requirement, utilize a search system to acquire multiple search results matching the query request. Apparatus 500 also includes a response presentation module 530 configured to present a response to the query request, the response generated based on the multiple search results.
[0087] In some embodiments, the determination module 510 is further configured to: determine that the query request involves the search requirement in response to determining that the semantic content expressed by the query request matches the predetermined search semantics associated with the search requirement; or determine that the query request involves the search requirement in response to determining that the query request includes a predetermined search keyword associated with the search requirement.
[0088] In some embodiments, the result acquisition module 520 is further configured to: in response to determining that the query request includes multiple sub-requests, respectively determine multiple search results that match the multiple sub-requests.
[0089] In some embodiments, the result acquisition module 520 is further configured to: perform semantic analysis on the query request to determine the semantic content expressed by the query request; and in response to determining that the semantic content includes multiple semantic contents, determine that the query request includes multiple sub-requests.
[0090] In some embodiments, the result acquisition module 520 further includes: a potential demand determination module, configured to determine the user's potential demand based on the query request, the potential demand indicating a subsequent query request to be issued by the user after the query request; and a search result acquisition module, configured to utilize the search system to obtain search results that match the potential demand.
[0091] In some embodiments, the apparatus 500 further includes: an information item presentation module configured to present a group of information items corresponding respectively to a group of search results in a plurality of search results, wherein for a target information item in a group of information items, the target information item is generated based on a target search result corresponding to the target information item in the group of search results.
[0092] In some embodiments, the device 500 is implemented in a conversational query page, and the information item presentation module includes: a target area presentation module, configured to present a target area corresponding to a target information item in the conversational query page; and a target information item presentation module, configured to present the target information item in the target area in response to determining that the target information item is generated.
[0093] In some embodiments, the apparatus 500 further includes: a candidate information item determination module configured to, in response to receiving a first interaction with a target information item, determine a candidate information item to be presented from a plurality of search results based on a direction of the first interaction; and a candidate information item presentation module configured to present the candidate information item at a location associated with the target information item.
[0094] In some embodiments, the device 500 further includes: a target search result presentation module, configured to present the target search result in response to receiving a second interaction for the target information item; and a query page return module, configured to return the conversational query page in response to receiving a third interaction for closing the target search result.
[0095] In some embodiments, the device 500 further includes: an access control presentation module configured to present access controls for accessing multiple search results in a conversational query page; and a multiple results presentation module configured to present multiple search results in a list page in response to receiving a fourth interaction with the access control.
[0096] In some embodiments, the apparatus 500 further comprises: a prompt information presentation module configured to present prompt information for waiting for a response in the conversational query page.
[0097] In some embodiments, in response to determining that the target search result is successfully obtained, the target information item indicates content in the target search result; and in response to determining that the target search result is not successfully obtained, the target information item indicates failure to obtain the target search result.
[0098] The units and / or modules included in the device 500 can be implemented in various ways, including software, hardware, firmware, or any combination thereof. In some embodiments, one or more units and / or modules can be implemented using software and / or firmware, such as machine executable instructions stored on a storage medium. In addition to or as an alternative to machine executable instructions, some or all of the units and / or modules in the device 500 can be implemented at least in part by one or more hardware logic components. By way of example and not limitation, exemplary types of hardware logic components that can be used include field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0099] It should be understood that one or more steps in the above method may be performed by an appropriate electronic device or combination of electronic devices, such as the terminal device 110 in FIG1 .
[0100] FIG6 shows a block diagram of an electronic device 600 in which one or more embodiments of the present disclosure may be implemented. It should be understood that the electronic device 600 shown in FIG6 is merely exemplary and should not be construed as limiting the functionality and scope of the embodiments described herein. The electronic device 600 shown in FIG6 can be used to implement the terminal device 110 of FIG1 .
[0101] As shown in FIG6 , electronic device 600 is a general-purpose electronic device. Components of electronic device 600 may include, but are not limited to, one or more processors or processing units 610, memory 620, storage device 630, one or more communication units 640, one or more input devices 650, and one or more output devices 660. Processing unit 610 may be a real or virtual processor and is capable of performing various processes according to programs stored in memory 620. In a multi-processor system, multiple processing units execute computer-executable instructions in parallel to enhance the parallel processing capabilities of electronic device 600.
[0102] The electronic device 600 typically includes a plurality of computer storage media. Such media can be any available media accessible to the electronic device 600, including but not limited to volatile and non-volatile media, removable and non-removable media. The memory 620 can be a volatile memory (e.g., registers, cache, random access memory (RAM)), a non-volatile memory (e.g., read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. The storage device 630 can be a removable or non-removable medium and can include a machine-readable medium, such as a flash drive, a disk, or any other medium that can be used to store information and / or data and can be accessed within the electronic device 600.
[0103] The electronic device 600 may further include additional removable / non-removable, volatile / non-volatile storage media. Although not shown in FIG6 , a disk drive for reading or writing from a removable, non-volatile disk (e.g., a “floppy disk”) and an optical drive for reading or writing from a removable, non-volatile optical disk may be provided. In these cases, each drive may be connected to a bus (not shown) by one or more data media interfaces. The memory 620 may include a computer program product 625 having one or more program modules configured to perform various methods or actions of various embodiments of the present disclosure.
[0104] The communication unit 640 enables communication with other electronic devices via a communication medium. Additionally, the functions of the components of the electronic device 600 can be implemented in a single computing cluster or multiple computing machines that can communicate via a communication connection. Thus, the electronic device 600 can operate in a networked environment using a logical connection with one or more other servers, a network personal computer (PC), or another network node.
[0105] The input device 650 may be one or more input devices, such as a mouse, keyboard, or trackball. The output device 660 may be one or more output devices, such as a display, a speaker, or a printer. The electronic device 600 may also communicate with one or more external devices (not shown) through the communication unit 640 as needed, such as a storage device, a display device, or the like, with one or more devices that allow a user to interact with the electronic device 600, or with any device that allows the electronic device 600 to communicate with one or more other electronic devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface (not shown).
[0106] According to an exemplary embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer-executable instructions are stored, wherein the computer-executable instructions are executed by a processor to implement the method described above. According to an exemplary embodiment of the present disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method described above.
[0107] Various aspects of the present disclosure are described herein with reference to flowcharts and / or block diagrams of methods, apparatuses, devices, and computer program products implemented according to the present disclosure. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.
[0108] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, such that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device is generated that implements the functions / actions specified in one or more blocks in the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, where these instructions cause the computer, programmable data processing device, and / or other device to operate in a specific manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0109] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0110] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple implementations of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a part for a module, program segment or instruction, and a part for a module, program segment or instruction comprises one or more executable instructions for realizing the logical function of the specification. In some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.
[0111] While various implementations of the present disclosure have been described above, the above descriptions are exemplary, non-exhaustive, and not intended to be limiting of the disclosed implementations. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described implementations. The terminology used herein is selected to best explain the principles of the implementations, their practical applications, or improvements to existing technologies, or to enable others skilled in the art to understand the various embodiments disclosed herein.
Claims
1. A method for querying, comprising: In a conversational interactive application, in response to receiving a query request from a user, determining whether the query request involves a search requirement; In response to determining that the query request involves a search requirement, using a search system to obtain a plurality of search results matching the query request; as well as A response to the query request is presented, the response being generated based on the plurality of search results.
2. The method according to claim 1, wherein determining whether the query request involves a search requirement comprises at least any one of the following: In response to determining that the semantic content expressed by the query request matches a predetermined search semantic associated with the search requirement, determining that the query request relates to a search requirement; or In response to determining that the query request includes a predetermined search keyword associated with the search requirement, it is determined that the query request relates to the search requirement.
3. The method according to claim 1, wherein obtaining the plurality of search results comprises: In response to determining that the query request includes multiple sub-requests, the multiple search results matching the multiple sub-requests are respectively determined.
4. The method of claim 1 , wherein determining that the query request includes the plurality of sub-requests comprises: Performing semantic analysis on the query request to determine the semantic content expressed by the query request; In response to determining that the semantic content includes a plurality of semantic contents, determining that the query request includes the plurality of sub-requests.
5. The method according to claim 1, wherein obtaining the plurality of search results further comprises: determining a potential demand of the user based on the query request, where the potential demand indicates a subsequent query request to be issued by the user after the query request; as well as The search system is used to obtain search results that match the potential demand.
6. The method according to claim 1, further comprising: A group of information items respectively corresponding to a group of search results in the plurality of search results is presented, wherein for a target information item in the group of information items, the target information item is generated based on a target search result corresponding to the target information item in the group of search results.
7. The method of claim 4, wherein the method is implemented in a conversational query page, and presenting the set of information items comprises: presenting a target area corresponding to the target information item in the conversational query page; as well as In response to determining that the target information item is generated, the target information item is presented in the target area.
8. The method according to claim 6, further comprising: In response to receiving a first interaction with the target information item, determining candidate information items to be presented from the plurality of search results based on a direction of the first interaction; as well as The candidate information items are presented at a position associated with the target information item.
9. The method according to claim 6, further comprising: In response to receiving a second interaction with the target information item, presenting the target search result; as well as In response to receiving a third interaction for closing the target search result, returning to the conversational query page.
10. The method according to claim 7, further comprising: presenting, in the conversational query page, access controls for accessing the plurality of search results; as well as In response to receiving a fourth interaction with the access control, presenting the plurality of search results in a list page.
11. The method according to claim 7, further comprising: A prompt message for waiting for the response is presented on the conversational query page.
12. The method according to claim 7, wherein: In response to determining that the target search result is successfully obtained, the target information item indicates content in the target search result; as well as In response to determining that the target search result is not successfully acquired, the target information item indicates that the target search result cannot be acquired.
13. A device for querying, comprising: a demand determination module, configured to, in response to receiving a query request from a user, determine whether the query request involves a search demand; A result acquisition module is configured to, in response to determining that the query request involves a search requirement, use a search system to acquire a plurality of search results matching the query request; as well as The response presentation module is configured to present a response to the query request, where the response is generated based on the plurality of search results.
14. An electronic device comprising: at least one processing unit; as well as At least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions causing the electronic device to perform the method according to any one of claims 1 to 12 when executed by the at least one processing unit.
15. A computer-readable storage medium having a computer program stored thereon, wherein the computer program can be executed by a processor to implement the method according to any one of claims 1 to 12.
16. A computer program product comprising a computer program, wherein the computer program, when executed by a processor, implements the method according to any one of claims 1 to 12.
Citation Information
Patent Citations
Search result sorting method and search result sorting device
CN103593373A
Method and apparatus for searching on terminal device, and device
CN105843817A
Search result display method and device, electronic equipment and storage medium
CN116467369A
Response information generation method and device, storage medium and electronic equipment
CN117076622A
Relevance model for session search
US10078661B1