Query method and device, equipment and storage medium
The method and device enhance query accuracy and efficiency by determining search requirements and using search systems with machine learning to generate responsive query results.
Patent Information
- Application Number
- CN202480002204.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-27
- Publication Date
- 2024-12-27
AI Technical Summary
Existing applications fail to provide query results that accurately meet user needs in terms of accuracy and efficiency.
A method and device for querying that involves determining whether a query request involves a search requirement, using a search system to obtain multiple search results, and generating a response based on these results, while utilizing machine learning models for semantic analysis and a generation system to enhance accuracy and efficiency.
Improves the accuracy and efficiency of query responses by leveraging search systems and machine learning to provide relevant and timely results.
Smart Images

Figure CN119213429A_ABST
Abstract
Description
Technical Field
[0001] Exemplary implementations of the present disclosure generally relate to the field of computers, and in particular, 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 designed to provide various services to users. For example, applications can provide query services to users. Applications can obtain query requests from users (such as query text entered by users, i.e., "questions") and provide query results corresponding to the questions based on the query requests. However, the query results provided by existing applications may not meet user needs, so it is expected that the accuracy and efficiency of queries can be improved. Summary of the invention
[0003] 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, using a search system to obtain a plurality of search results matching the query request; and presenting a response to the query request, the response being generated based on the plurality of search results.
[0004] In a second aspect of the present disclosure, a device for querying is provided. The device includes: a demand determination module configured to determine whether a query request involves a search demand in a conversational interactive application in response to receiving a query request from a user; a result acquisition module configured to obtain multiple search results matching the query request using a search system in response to determining that the query request involves a search demand; and a response presentation module configured to present a response to the query request, the response being generated based on the multiple search results.
[0005] 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, the at least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit, and when the instructions are executed by the at least one processing unit, the electronic device executes the method according to the first aspect of the present disclosure.
[0006] 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.
[0007] 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.
[0008] It should be understood that the content described in this content 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
[0009] In the following, in conjunction with the accompanying drawings and with reference to the following detailed description, the above and other features, advantages and aspects of various implementations of the present disclosure will become more apparent. In the accompanying drawings, the same or similar figure labels represent the same or similar elements, wherein:
[0010] Figure 1 A schematic diagram showing an example environment in which embodiments of the present disclosure can be implemented;
[0011] Figure 2 A schematic diagram showing a framework for querying according to some embodiments of the present disclosure is shown;
[0012] 3A to 3H A schematic diagram showing an example page according to some embodiments of the present disclosure;
[0013] Figure 4 A flowchart showing a process for querying according to some embodiments of the present disclosure is shown;
[0014] Figure 5 A schematic structural block diagram of an apparatus for querying according to some embodiments of the present disclosure is shown; and
[0015] Figure 6 A block diagram of an electronic device is shown in which one or more embodiments of the present disclosure may be implemented. DETAILED DESCRIPTION
[0016] Embodiments of the present disclosure will be described in more detail below 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 being limited to the embodiments set forth herein. On the contrary, 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 only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0017] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "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 also be included below.
[0018] Herein, unless explicitly stated, executing a step “in response to A” does not mean executing the step immediately after “A” but may include one or more intermediate steps.
[0019] 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) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0020] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present 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.
[0021] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt 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 software or hardware such as electronic devices, applications, servers or storage media that execute operations of the technical solution of the present disclosure based on the prompt message.
[0022] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information is sent to the user in a manner such as a pop-up window, in which the prompt information can be presented in text form. In addition, the pop-up window can also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0023] 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 meet relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0024] As used herein, the term "model" can learn the association between the corresponding input and output from the training data, so that after the training is completed, the corresponding output can be generated for a given input. 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 multi-layer 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.
[0025] A "neural network" is a machine learning network based on deep learning. A neural network is capable of processing inputs and providing corresponding outputs, and typically includes an input layer and an output layer and one or more hidden layers between the input layer and the output layer. 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 input from the previous layer.
[0026] Generally, 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.
[0027] Example Environment
[0028] Figure 1 A schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented is shown. 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 an attached device of the terminal device 110.
[0029] In some embodiments, application 120 may be any suitable application that can provide query services. Figure 1 In the environment 100, if the application 120 is in an active state, the terminal device 110 can present a page 150 of the application 120. The page 150 can include various pages that the application 120 can provide, such as a query page, a search page, a search result presentation page, and the like.
[0030] In some embodiments, the terminal device 110 communicates with the server 130 to provide the service of the application 120. The terminal device 110 can be any type of mobile terminal, fixed terminal or portable terminal, including mobile phones, desktop computers, laptop computers, notebook computers, netbook computers, tablet computers, media computers, multimedia tablets, personal communication systems (PCS) devices, personal navigation devices, personal digital assistants (PDAs), audio / video players, digital cameras / camcorders, positioning devices, television receivers, radio broadcast receivers, e-book devices, gaming devices, or any combination of the foregoing, 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 "wearable" circuits, 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.
[0031] It should be understood that the structure and function of the various elements in the environment 100 are described for exemplary purposes only and do not imply any limitation on the scope of the present disclosure.
[0032] The process used for querying
[0033] Traditionally, an application or system that can provide a query service can determine data matching the query request from a database directly based on the query request in response to receiving a query request from a user, or determine data matching the query request based on previously learned knowledge. The application or system can determine a query result for the query request based on the data. If the database or previously learned knowledge does not include data matching the query request, the application cannot provide accurate query results to the user.
[0034] In order to at least partially solve the deficiencies in the prior art, according to an embodiment of the present disclosure, a method for querying is proposed. Figure 2 Describing an overview of an exemplary embodiment according to the present disclosure, Figure 2 A schematic diagram of a framework 200 for querying according to some embodiments of the present disclosure is shown. The framework 200 may be implemented at a terminal device 110 and a server 130. Specifically, the terminal device 110 may receive a query request 220 in a conversational interactive application and access a query system 210 at a server device, wherein the query system 210 includes a search system 212 and a generation system 214.
[0035] 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 by the present 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, etc.
[0036] In one embodiment, the terminal device 110 may access the server 130 to perform a query process, and the terminal device 110 may perform a demand identification 222 on the query request 220 in response to receiving a query request 220 from a user to determine whether the query request 220 involves a search demand. The terminal device 110 may then use the query system 210 to determine a query result 230 for the query request 220 based on the result of determining whether the search demand is involved.
[0037] 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, determining that the query request involves the search requirement; for another example, in response to determining that the query request includes a predetermined search keyword associated with the search requirement, determining that the query request involves the search requirement.
[0038] 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 the 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 the 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 the search demand.
[0039] 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 needs can be predefined, such as changes, weather, forecasts, flights, tickets, tickets, or keywords that specify 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.
[0040] 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 the 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.
[0041] When it is determined that the query request 220 includes multiple sub-requests, multiple search results matching the multiple sub-requests are determined respectively by using the query system 210. For example, the terminal device 110 can determine whether the multiple sub-requests include a sub-request involving a search requirement, and when it is determined that the sub-request involving the search requirement is included, the search system 212 is used to obtain search results matching the sub-request involving the search requirement.
[0042] In some embodiments, the terminal device 110 may also determine the user's potential needs based on the query request 220, and the potential needs may, for example, indicate a subsequent query request 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. Exemplarily, 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", "XX tourist attractions food", "XX tourist attractions best travel month", etc. It should be understood that although the above describes the process of performing demand identification 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.
[0043] 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 matching 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, which 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, etc. 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.
[0044] 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 (the knowledge base may be a local database of the terminal device 110 or a database installed on other devices) or previously learned knowledge, and generate a query result 230 for the query request based on the obtained data using a generation system. It is understood that, in the case where the query request 220 includes multiple sub-requests, for sub-requests that do not involve a search requirement, 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.
[0045] The terminal device 110 can then present the query result 230 to the user as a response to the query request. Exemplarily, if the query request input by the user is in the form of a conversation message in the conversation window, the terminal device 110 can also present the query result 230 to the user in the form of a response message to the conversation message.
[0046] By using the embodiments of the present disclosure, when it is determined that the query request involves a search requirement, the search system can be used to determine the search results, and then the response to the query request can be determined based on the search results, which helps to improve the accuracy and efficiency of the query.
[0047] Sample page for querying
[0048] 3A to 3H Schematic diagrams of example pages 300A to 300H (also referred to as examples 300A to 300H) according to some embodiments of the present disclosure are shown. It should be understood that the pages shown in the drawings are only examples, and various page designs may actually exist. The various graphical elements in the pages may have different arrangements and different visual representations, one or more of which may be omitted or replaced, and one or more other elements may also exist. The embodiments of the present disclosure are not limited in this respect.
[0049] The pages shown in Examples 300A to 300H may be presented at the terminal device 110. For ease of discussion, reference will be made to Figure 1 Environment 100 and Figure 2 Examples 300A to 300H are described based on the framework 200 of FIG. It should be noted that the operations performed by the terminal device 110 described above and the operations performed by the terminal device 110 described later may be performed by related applications (such as application 120) installed on the terminal device 110. In some embodiments, the operations performed on the terminal device 110 may be completed with the assistance of the server 130.
[0050] In some embodiments, the terminal device 110 may provide a conversational query page. The terminal device 110 may receive a conversation message from a user via the conversational query page and determine the message as a query request from the user. Figure 3A As shown, example 300A shows an example of a conversational query page. Example 300A may include, for example, an input box. Terminal device 110 may receive user input from a user via the input box, and present the user input as a conversation message (e.g., conversation message 301) from the user in example 300A. Here, the user inquires about the changes of a specific product "XXXX" via conversation message 301.
[0051] As mentioned above, the terminal device 110 may determine the conversation message 301 as a query request from the user, and determine whether the query request involves a search requirement (i.e., whether it is necessary to use the search system 212 to perform an online search). In response to determining that the query request involves a search requirement, the terminal device 110 may use the search system 212 in the query system 210 to obtain a plurality of search results matching the query request. Further, the generation system 214 in the query system 210 may be used to generate a query result for the query request (i.e., a response to the query request) based on the plurality of search results. The terminal device 110 may present the response to the query request.
[0052] Regarding the specific manner of presenting the response, in some embodiments, since it takes a certain amount of time for the query system 210 to obtain the search results, the terminal device 110 may also present a prompt message for waiting for the search in the conversational query page. This prompt message may include any appropriate content, such as text, images, videos, etc. For example, Figure 3A As shown, the terminal device 110 may also present prompt information 302 for waiting for search in example 300A, and the prompt information 302 may include, for example, the text “Searching...” The terminal device 110 may no longer present the prompt information 302 in response to obtaining multiple search results.
[0053] 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 matching the query request with the help of the search system 212, or after obtaining multiple search results matching the query request with the help of the search system 212. This group of information items respectively corresponds to a group of search results in the 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 directly obtain the information items from the search results, or generate the information items based on the content of the search results. The terminal device 110 may present the target information item in a target area in a group of areas 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.
[0054] In some embodiments, a group of regions and a group of search results may correspond one-to-one according to the order of a group of search results, for example, the Nth region in a group of regions corresponds to the Nth search result in a 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 a group of regions according to the order in which the group of information items are determined, for example, if the Nth information item in a group of information items is the i-th generated, the terminal device 110 may present the information item in the i-th region.
[0055] For example, Figure 3B and Figure 3C As shown, Example 300B and Example 300C show two examples of conversational query pages. Example 300B may include and area 310. Area 310 may be used, for example, 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 in a group of information items being generated. 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 in a group of information items being generated. The target information item may include, for example, any appropriate content such as images, videos, audio, text, and picture and text collections.
[0056] In some embodiments, the terminal device 110 may also continue to present prompt information for waiting for a response in the conversational query page in response to a period in which a set of information items has been presented but no response to the query request has been generated. This prompt information may also include any appropriate content, such as text, images, videos, etc. In example 300C, the terminal device 110 may continue to present prompt information 304 for waiting for a response below the area 310, and the prompt information 304 may include, for example, the text "Continuing to answer". For example, the terminal device 110 may no longer present the prompt information 304 in response to a response being generated. Figure 3D As shown, the terminal device 110 may present the response 305 in the example 300D in response to the generated response 305 , instead of presenting the prompt information 304 .
[0057] In some embodiments, the terminal device 110 may also determine, in response to receiving a first interaction with the target information item, a candidate information item to be presented in 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 other search results 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.
[0058] In some embodiments, since the page area of example 300B is limited, 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 (such as 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 (that is, present 2.5 information items), and a group of areas may include, for example, 10 areas (that is, a group of information items includes 10 information items). The terminal device 110 may present other areas outside the 2.5 areas of the 10 areas (that is, present other information items outside the 2.5 information items of the 10 information items) in response to receiving a sliding operation for the 2.5 areas (which may also be referred to as the 2.5 information items). Figure 3D and Figure 3E As shown, the terminal device 110 may present the example 300E in response to receiving a leftward sliding operation on the area 310 in the example 300D. The example 300E may include information items different from some of the information items in the example 300D.
[0059] For example, if the plurality of search results include 20 search results, and a group of search results includes the first 10 (e.g., 1-10) search results, the terminal device 110 may present a group of information items corresponding to the 10 search results in the area 310. In response to receiving a left sliding operation on the last media item in the group of information items, the terminal device 110 may present candidate information items corresponding to the last 10 (e.g., 11-20) search results of the 20 search results in the area 310.
[0060] 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 (i.e., a landing page) corresponding to the website 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 closing a control).
[0061] In some embodiments, the terminal device 110 may also present an access control for accessing multiple search results in the conversational query page, and present multiple search results in the list page in response to receiving a fourth interaction for the access control. Exemplarily, the terminal device 110 may present a conversation message for viewing multiple search results in the conversational query page in response to searching for multiple search results, and the conversation message may be regarded as an access control.
[0062] Returning to example 300B, example 300B may also include a conversation message 303. The terminal device 110 may present the conversation message 303 in response to obtaining multiple search results. The terminal device 110 may present the conversation message 303 in response to receiving a trigger operation on the conversation message 303. Figure 3F The search result presentation page including multiple search results (i.e., example 300F) is shown. Example 300F may include, for example, 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. In response to receiving a trigger operation on the return control 321, the terminal device 110 may return to present example 300B.
[0063] Alternatively or additionally, in some embodiments, the terminal device 110 may also present a specific access control for accessing the plurality of search results in the area 310. Figure 3E , the terminal device 110 may present the access control 311 behind a group of regions in the region 310. For example, the terminal device 110 may present the following in response to receiving a trigger operation on the access control 311: Figure 3F A search results presentation page is shown including multiple search results.
[0064] 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 of 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 cannot be obtained. Figure 3G As shown, 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 can present area 312 and control 313 in area 310. Area 312 presents a gray image, which can be presented in a gray style to indicate that the target search result is not obtained (that is, the query is abnormal), and there is no information item. For example, the terminal device 110 can present the abnormality details in response to receiving a trigger operation on the control 313.
[0065] In addition to the exceptions caused by the inability to obtain multiple search results, the exceptions may also include, for example, the exceptions due to the inability to generate information items based on the search results, the inability to determine answers based on the search results, and the like. Figure 3H As shown, example 300H shows an example of a conversational query page. In example 300H, if a response (i.e., a query result) cannot be generated based on the search results, the terminal device 110 can present a set of information items in area 310, and present a message 306 and a control 307 in example 300H. Message 306 can indicate the cause of the exception, for example, the symbol "..." can indicate that the response cannot be determined. For example, the terminal device 110 can present the detailed information of the exception in response to receiving a trigger operation on the control 307.
[0066] In summary, according to the embodiments of the present disclosure, when it is determined that the query request involves a search requirement, the search system can be used to determine the search results, and then the response to the query request can be determined based on the search results. This helps to improve the accuracy and efficiency of the query.
[0067] Example Process
[0068] The above has described the specific details of each step of the query and provided a method for querying. Figure 4 FIG. 4 is a flowchart of a process 400 for querying according to some embodiments of the present disclosure. The process 400 may be implemented at the terminal device 110. Figure 1 Process 400 is described.
[0069] In block 410 , in a conversational interaction application, in response to receiving a query request from a user, the terminal device 110 determines whether the query request involves a search requirement.
[0070] 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 matching the query request.
[0071] At block 430 , the terminal device 110 presents a response to the query request, the response being generated based on the plurality of search results.
[0072] 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 the 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 the search requirement in response to determining that the query request includes a predetermined search keyword associated with the search requirement.
[0073] 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.
[0074] 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 content, determining that the query request includes multiple sub-requests.
[0075] In some embodiments, obtaining multiple search results further includes: determining a user's potential needs based on the query request, the potential needs indicating 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.
[0076] 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 that corresponds to the target information item in the set of search results.
[0077] 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.
[0078] 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.
[0079] 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.
[0080] 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.
[0081] In some embodiments, process 400 further includes: presenting prompt information for waiting for a response in the conversational query page.
[0082] In some embodiments, in response to determining that the target search result is successfully obtained, the target information item indicates the 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 that the target search result cannot be obtained.
[0083] Example devices and equipment
[0084] The embodiments of the present disclosure also provide corresponding devices for implementing the above methods or processes. Figure 5 A schematic structural block diagram of an apparatus 500 for querying according to some embodiments of the present disclosure is shown. The apparatus 500 may be implemented as or included in a terminal device 110. Each module / component in the apparatus 500 may be implemented by hardware, software, firmware, or any combination thereof.
[0085] like Figure 5 As shown, the apparatus 500 includes a demand determination module 510, which is configured to determine whether the query request involves a search demand in response to receiving a query request from a user in a conversational interactive application. The apparatus 500 also includes a result acquisition module 520, which is configured to obtain multiple search results matching the query request using a search system in response to determining that the query request involves a search demand. The apparatus 500 also includes a response presentation module 530, which is configured to present a response to the query request, and the response is generated based on the multiple search results.
[0086] 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.
[0087] 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.
[0088] 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; in response to determining that the semantic content includes multiple semantic contents, determine that the query request includes multiple sub-requests.
[0089] 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.
[0090] In some embodiments, the device 500 further includes: an information item presentation module, configured to present a group of information items corresponding to a group of search results in multiple search results, respectively, 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 a group of search results.
[0091] 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.
[0092] In some embodiments, the device 500 further includes: a candidate information item determination module, configured to determine, in response to receiving a first interaction with a target information item, a candidate information item to be presented among multiple 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 position associated with the target information item.
[0093] 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.
[0094] In some embodiments, the device 500 further includes: an access control presentation module configured to present access controls for accessing multiple search results in the conversational query page; and a multiple results presentation module configured to present multiple search results in the list page in response to receiving a fourth interaction with the access control.
[0095] In some embodiments, the apparatus 500 further comprises: a prompt information presenting module configured to present prompt information for waiting for a response in the conversational query page.
[0096] In some embodiments, in response to determining that the target search result is successfully obtained, the target information item indicates the 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 that the target search result cannot be obtained.
[0097] 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. As an 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 chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0098] It should be understood that one or more steps in the above method can be performed by a suitable electronic device or a combination of electronic devices. Such an electronic device or a combination of electronic devices may include, for example, Figure 1 The terminal device 110 in.
[0099] Figure 6 1 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 Figure 6 The electronic device 600 shown is merely exemplary and should not constitute any limitation on the functionality and scope of the embodiments described herein. Figure 6 The electronic device 600 shown can be used to implement Figure 1 terminal device 110.
[0100] like Figure 6 As shown, the electronic device 600 is in the form of a general electronic device. The components of the electronic device 600 may include, but are not limited to, one or more processors or processing units 610, a memory 620, a storage device 630, one or more communication units 640, one or more input devices 650, and one or more output devices 660. The processing unit 610 may be an actual or virtual processor and is capable of performing various processes according to a program stored in the memory 620. In a multi-processor system, multiple processing units execute computer executable instructions in parallel to improve the parallel processing capability of the electronic device 600.
[0101] 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, caches, random access memory (RAM)), a non-volatile memory (e.g., a read-only memory (ROM), an 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, which can be used to store information and / or data and can be accessed within the electronic device 600.
[0102] The electronic device 600 may further include additional removable / non-removable, volatile / non-volatile storage media. Figure 6 As shown in , 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 the 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 that are configured to perform various methods or actions of various embodiments of the present disclosure.
[0103] The communication unit 640 implements communication with other electronic devices through a communication medium. Additionally, the functions of the components of the electronic device 600 can be implemented with a single computing cluster or multiple computing machines that can communicate through a communication connection. Therefore, 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.
[0104] The input device 650 may be one or more input devices, such as a mouse, a keyboard, a tracking ball, etc. The output device 660 may be one or more output devices, such as a display, a speaker, a printer, etc. 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, etc., communicate with one or more devices that allow a user to interact with the electronic device 600, or communicate 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).
[0105] 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.
[0106] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices, equipment, and computer program products implemented according to the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0107] 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, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0108] 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, so that the instructions executed on the computer, other programmable data processing apparatus, or other device implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0109] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple implementations of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of a module, program segment or instruction includes one or more executable instructions for realizing the logical function of the specification. In some implementations as replacements, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square 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.
[0110] The above descriptions of various implementations of the present disclosure are exemplary, non-exhaustive, and not limited to the disclosed implementations. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described implementations. The selection of terms used herein is intended to best explain the principles of the implementations, practical applications, or improvements to the technology in the marketplace, or to enable other persons of ordinary skill 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, the potential demand indicating 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 are 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, presenting the target information item 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 in the plurality of search results based on a direction of the first interaction; as well as The candidate information item is 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 respect to 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: Prompt information for waiting for the response is presented in 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, wherein 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, the at least one memory being 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
Cited By
Information processing method and device, equipment and storage medium
CN120764682A
Human-computer interaction method, computing device, server, storage medium, and program product
WO2026153050A1
