WO2025231710A1 - Method and apparatus for processing query request, device and storage medium - Google Patents
Method and apparatus for processing query request, device and storage mediumInfo
- Publication number
- WO2025231710A1 WO2025231710A1 PCT/CN2024/091930 CN2024091930W WO2025231710A1 WO 2025231710 A1 WO2025231710 A1 WO 2025231710A1 CN 2024091930 W CN2024091930 W CN 2024091930W WO 2025231710 A1 WO2025231710 A1 WO 2025231710A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- response
- query request
- sub
- request
- query
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2453—Query optimisation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2455—Query execution
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2457—Query processing with adaptation to user needs
Definitions
- the exemplary implementations of this disclosure generally relate to the field of computers, and in particular to methods, apparatus, devices, and computer-readable storage media for processing query requests.
- applications can provide query services.
- Applications can obtain query requests from users (such as the query text entered by the user, i.e., the "question") and provide query results corresponding to that question based on the query request.
- users such as the query text entered by the user, i.e., the "question”
- query results corresponding to that question based on the query request.
- user query requests may not clearly describe user needs, the query results provided by existing applications may not meet user expectations, thus there is a desire to improve the accuracy and efficiency of queries.
- a method for processing a query request includes: in a conversational interactive application, in response to receiving a first query request from a user, determining a first clarity of the first query request; in response to determining that the first clarity of the first query request does not meet the predetermined conditions, generating a second query request based on the first query request, wherein a second clarity of the second query request meets the predetermined conditions; obtaining a second response to the second query request; and generating a first response to the first query request based on the second response.
- an apparatus for processing query requests includes: a clarity determination module configured to, in a conversational interactive application, determine a first clarity of the first query request in response to receiving a first query request from a user; a request generation module configured to, in response to determining that the first clarity of the first query request does not meet a predetermined condition, generate a second query request based on the first query request, wherein the second clarity of the second query request meets the predetermined condition; and a response acquisition module configured to acquire a response to the second query request.
- the second response to the query request; and the response generation module configured to generate a first response to the first query request based on the second response.
- an electronic device in a third aspect of this disclosure, 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 causing the electronic device to perform the method according to a first aspect of this disclosure when executed by the at least one processing unit.
- a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, causes the processor to implement the method according to a first aspect of this disclosure.
- Figure 1 shows a schematic diagram of an example environment in which embodiments of the present disclosure can be implemented
- Figure 2 illustrates a schematic diagram of a process for processing a query request according to some embodiments of the present disclosure
- FIGS. 3A to 3D illustrate schematic diagrams of example interfaces related to processing query requests according to some embodiments of the present disclosure
- FIGS. 4A to 4H illustrate schematic diagrams of relevant example interfaces for processing query requests according to other embodiments of the present disclosure
- Figure 5 illustrates an apparatus for processing query requests according to some embodiments of the present disclosure.
- Figure 6 shows a block diagram of an electronic device in which one or more embodiments of the present disclosure may be implemented.
- performing a step in response to A does not mean that the step is performed immediately after A, but may include one or more intermediate steps.
- the method of making a request and sending a prompt to the user can be, for example, a pop-up window, in which the prompt message can be presented in text form.
- the pop-up window can also contain a selection control for the user to choose "agree” or "disagree” to provide personal information to the electronic device.
- model refers to a model that learns the relationship between inputs and outputs from training data, enabling it to generate corresponding outputs for a given input after training. Model generation can be based on machine learning techniques. Deep learning is a machine learning algorithm that processes inputs and provides corresponding outputs using multiple layers of processing units. A neural network model is an example of a deep learning-based model. In this paper, “model” may also be referred to as a “machine learning model,” “learning model,” “machine learning network,” or “learning network,” and these terms are used interchangeably.
- a neural network is a machine learning network based on deep learning.
- a neural network processes input and provides a corresponding output, typically consisting of 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 often include many hidden layers, thus increasing the network's depth.
- the layers of a neural network are connected sequentially, so that the output of the previous layer is provided as the input to the next layer.
- the input layer receives the input to the neural network, while the output layer's output serves as the final output.
- Each layer of a neural network includes one or more nodes (also called processing nodes or neurons), each node processing the input from the layer above.
- machine learning can be broadly categorized into three phases: training, testing, and application (also known as inference).
- training phase a given model is trained using a large amount of training data, iteratively updating parameter values until the model can consistently generate inferences that satisfy the expected goals from the training data.
- the model can be considered to have learned the relationship between inputs and outputs (also known as the input-output mapping) from the training data.
- the parameter values of the trained model are determined.
- test inputs are applied to the trained model to test whether it can provide the correct output, thus determining the model's performance.
- the testing phase can sometimes be integrated into the training phase.
- application or... During the inference phase, the trained model can be used to process the actual model input based on the parameter values obtained during training, and determine the corresponding model output.
- Figure 1 illustrates a schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented.
- an application 120 is installed on 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.
- application 120 can be any suitable application that can provide query services.
- terminal device 110 can display page 150 of application 120.
- Page 150 may include various types of pages that application 120 can provide, such as query pages, search pages, search result display pages, etc.
- terminal device 110 communicates with server 130 to provide services to application 120.
- 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 system (PCS) devices, personal navigation devices, personal digital assistants (PDAs), audio/video players, digital cameras/camcorders, positioning devices, television receivers, radio receivers, e-book devices, gaming devices, or any combination thereof, including accessories and peripherals of these devices or any combination thereof.
- terminal device 110 can also support any type of user-facing interface (such as "wearable" circuitry).
- Server 130 can be various types of computing systems/servers capable of providing computing power, including but not limited to mainframes, edge computing nodes, computing devices in cloud environments, etc.
- the system can handle multiple keyword queries from a user (e.g., "Please tell me the sales percentage of model A, model B, and model C"). Based on this query, the system either directly retrieves matching data from the database or uses previously learned knowledge to determine the matching data. The application or system can then use this data to determine the query results for that query request. If the application does not clearly understand the meaning of the query request, directly searching the database or using previously learned knowledge will not find matching data, and the application will be unable to provide accurate query results to the user.
- keyword queries e.g., "Please tell me the sales percentage of model A, model B, and model C"
- applications or systems providing query services need to obtain more detailed information. For instance, if a user wants to search for "what concerts are happening in the first half of this year,” the application or system providing the query service would need to obtain more detailed information such as "where are the concerts held?" Similarly, if a user wants to search for "what to do about neck pain,” the application or system providing the query service would need to obtain more detailed information such as "when the pain started” and "whether there are any previous medical records,” etc.
- a method for processing query requests includes: in response to receiving a first query request from a user, determining whether the first query request is available for generating a first response to the first query request; in response to determining that the first query request is not available for generating a first response to the first query request, generating a second query request based on the first query request, the second query request being available for generating a first response to the first query request; obtaining a second response to the second query request; and generating a first response to the first query request based on the second response.
- the terminal device may invoke the processing capabilities of a server to perform the method.
- FIG2 shows a schematic diagram of a process 200 for processing a query request according to some embodiments of the present disclosure.
- Process 200 may be implemented at a terminal device 110.
- Process 200 will now be described with reference to FIG1.
- terminal device 110 may receive the first query request from a user (e.g., user 140). Terminal device 110 may receive the first query request from the user in any suitable manner, and this disclosure is not limited thereto. For example, terminal device 110 may provide an input field and receive the first query request from the user via the input field.
- the first query request may be of any suitable type, including but not limited to text, voice, video, images, etc.
- the terminal device 110 determines whether the first query request can be used to generate a first response to the first query request. In some embodiments, the terminal device 110 may determine whether the first query request can be used to generate a first response to the first query request based on semantic analysis of the first query request.
- terminal device 110 after receiving a first query request from a user, terminal device 110 performs semantic analysis on the first query request to determine whether it can be used to generate a first response to the first query request. In some examples, terminal device 110 may access server 130 to determine whether the first query request can be used to generate a first response to the first query request.
- Terminal device 110 can determine whether a first query request is usable for generating a first response to the first query request using any suitable method. For example, sharpness (e.g., a value between 0 and 100) can be used to represent whether the first query request is usable for generating a first response to the first query request. If the sharpness is higher than a predetermined threshold (e.g., 70 or another value), it is determined that the first query request is usable for generating a first response to the first query request.
- Terminal device 110 can perform semantic analysis on the first query request using a machine learning model (e.g., a splitting model, and/or a refinement model) to determine the first sharpness of the first query request.
- This machine learning model can be any suitable model, such as including a transformer model, RNN, CNN, etc.
- the machine learning model can be trained using labeled samples, and the trained machine learning model can directly output the sharpness corresponding to the query request.
- terminal device 110 may also determine, based on text analysis, whether the first query request can be used to generate a first response to the first query request. Specifically, Keywords can be extracted from query requests to determine whether the query clearly describes the user's needs, and so on.
- the terminal device 110 in response to determining that the first query request cannot be used to generate a first response to the first query request, the terminal device 110 generates a second query request based on the first query request.
- the second query request can be used to generate a first response to the first query request. That is, the second query request can clearly describe the user's needs, thereby obtaining a response that is more in line with the user's expectations.
- terminal device 110 determines that the clarity of the first query request does not meet a predetermined condition
- terminal device 110 determines that the clarity of the first query request does not meet a predetermined condition. For example, if the user's first query request is "When do the cherry blossoms in City A bloom this year? And what is the best time to visit?", since the user's first query request lacks a specific time, terminal device 110 determines that the first clarity of the first query request does not meet the predetermined condition. Therefore, terminal device 110 generates a second query request based on the first query request.
- a machine learning model can be used to generate the second query request. For example, the machine learning model can break down the first query request into: "The state of cherry blossoms in City A during March this year" and "The state of cherry blossoms in City A during April this year".
- terminal device 110 determines multiple sub-requests associated with a first query request, and then generates a second query request based on the multiple sub-requests. In some examples, when determining the second query request, terminal device 110 may determine multiple sub-requests associated with the first query request. Semantic analysis may be performed on the first query request to determine the semantic content expressed by the first query request, and in response to determining that the semantic content includes multiple semantic contents, it is determined that the first query request includes multiple sub-requests.
- the terminal device 110 can determine multiple sub-requests such as "The status of cherry blossoms in City A blooming in March this year", “The status of cherry blossoms in City A blooming in April this year", and so on.
- terminal device 110 obtains a second response to the second query request.
- terminal device 110 generates a first response to the first query request based on the second response.
- terminal device 110 obtains responses corresponding to the multiple sub-requests included in the second query request, and generates a first response based on the responses corresponding to the multiple sub-requests. For example, if terminal device 110 determines the multiple sub-requests based on the first query request as "the state of cherry blossoms in City A during March this year” and "the state of cherry blossoms in City A during April this year", then terminal device 110 determines multiple responses based on the aforementioned multiple sub-requests and generates a first response. For example, "In City A, the cherry blossom blooming period is generally between March and April, XXXX".
- the terminal device 110 can also determine the logical relationship between multiple sub-requests. Then, the terminal device 110 executes the multiple sub-requests according to the logical relationship between them. This allows a second response to be obtained. In this way, multiple sub-requests can be executed according to different logical relationships, thereby obtaining a response more suited to complex queries.
- the logical relationship between multiple sub-requests can be parallel, serial, or combined.
- Terminal device 110 executes multiple sub-requests in parallel to obtain a second response.
- Terminal device 110 executes multiple sub-requests in serial order to obtain a second response.
- Terminal device 110 executes multiple sub-requests in combined order to obtain a second response. The following will describe the execution of multiple sub-requests to obtain a second response according to different logical relationships.
- terminal device 110 in response to determining a logical relationship indicating a parallel relationship, obtains multiple sub-responses for multiple sub-requests respectively. Then, terminal device 110 generates a second response based on the multiple sub-responses. In some examples, if terminal device 110 determines that the logical relationship between the multiple sub-requests is a parallel relationship, it searches the multiple sub-requests in parallel to obtain sub-responses for each sub-request. Then, terminal device 110 summarizes the sub-responses to generate a second response. In this way, responses for each sub-request can be obtained in parallel in a simpler and more efficient manner.
- terminal device 110 determines the sub-request "The status of cherry blossoms in City A in March this year” and the sub-request "The status of cherry blossoms in City A in April this year” corresponding to the first query request. If the "opening state" is a parallel relationship, then the cherry blossoms in March and April are searched in parallel to determine the corresponding sub-responses, and then the sub-responses are summarized to form the second response.
- terminal device 110 executes multiple sub-requests in a parallel manner to obtain a second response.
- the following describes how terminal device 110 executes multiple sub-requests in a serial manner to obtain a second response.
- terminal device 110 in response to determining a logical relationship indicating a serial relationship, obtains a first sub-response for a first sub-request among the multiple sub-requests.
- terminal device 110 updates a second sub-request among the multiple sub-requests based on the first sub-response.
- terminal device 110 generates a second response based on the second sub-response for the updated second sub-request. In this manner, query requests involving multiple queries can be processed more accurately.
- terminal device 110 determines that the logical relationship between multiple sub-requests is sequential, it first obtains the first response of the first sub-request among the multiple sub-requests. Then, terminal device 110 updates the second sub-request among the multiple requests based on the first response. Based on the second sub-request, terminal device 110 determines the second sub-response. Finally, based on the second sub-response, terminal device 110 generates the second response.
- terminal device 110 splits the first sub-request of the first query request into "the author of work XX".
- Terminal device 110 determines the first sub-response "the author of work XX is author A” based on the first sub-request, and updates the second sub-request corresponding to the first query request to "the latest work of author A" based on the first sub-response.
- terminal device 110 determines the second sub-response based on the second sub-request "the latest work of author A” to generate the second response. In this way, a response that more closely matches the user's expectations can be obtained.
- terminal device 110 executes multiple sub-requests in a serial manner to obtain a second response.
- the following description continues, showing terminal device 110 executing multiple sub-requests in a combined manner to obtain a second response.
- terminal device 110 in response to determining a logical relationship indicating a combined relationship, obtains a first response for a first sub-request and a second sub-response for a second sub-request.
- Terminal device 110 ...
- the third sub-request is updated based on the first and second sub-responses.
- the terminal device 110 generates a second response based on the third sub-response to the updated third sub-request.
- the terminal device 110 updates the third sub-request among the multiple sub-requests based on the first sub-response and the second sub-response. There is a serial relationship between the third sub-request and the first and second sub-requests. The terminal device 110 generates a second response based on the third sub-response corresponding to the third sub-request.
- terminal device 110 splits the first query request into a first sub-request of "sales of product AA” and a second sub-request of "sales of product BB".
- Terminal device 110 determines the first sub-response based on the first sub-request as "sales of product AA is XXX", and the second sub-response of the second sub-request as "sales of product BB is XXXX".
- Terminal device 110 updates the third sub-request corresponding to the first query request to "Which is higher?" based on the first sub-response "Sales volume of product AA is XXX" and the second sub-response "Sales volume of product BB is XXXX”. Finally, terminal device 110 determines the third sub-response based on the third sub-request "Which is higher?" to generate the second response.
- a search system and/or a language model can be invoked to process each sub-request.
- a search system can be invoked to determine the sales volume of product AA (XXX) and product BB (XXXX) respectively, and a language model with reasoning capabilities can be invoked to compare sales volumes XXX and XXXX, thereby generating the second response.
- a sub-request can be further broken down into multiple smaller sub-requests with parallel, serial, or combined relationships.
- the decomposition model can transform complex query requests into executable sub-requests, and reasoning capabilities can be achieved by executing each sub-request in a more reasonable manner, thereby obtaining a response that better meets user expectations.
- the terminal device 110 may further determine the user's potential query request based on the query request.
- the user's potential query request indicates what the user will do after the first query request. Subsequent query requests were issued.
- terminal device 110 can determine potential query requests: the user's travel method, the user's place of residence, etc. In some examples, terminal device 110 can respond based on the user's potential query requests. For example, terminal device 110 can recommend air tickets, high-speed rail tickets to City A, hotels, guesthouses, etc., that are convenient for cherry blossom viewing in City A. Thus, this method can satisfy the user's complex search needs.
- the terminal device 110 in a first query mode (e.g., a regular query mode) of a dialog interaction application, the terminal device 110 provides a launch control for initiating a second query mode (e.g., an expert query mode). Then, in response to receiving a user operation on the launch control, the terminal device 110 executes the method disclosed herein for processing query requests.
- a first query mode e.g., a regular query mode
- a second query mode e.g., an expert query mode
- Figures 3A to 3D show schematic diagrams of example interfaces 301 to 304 related to processing query requests according to some embodiments of this disclosure. The following description will refer to Figure 1 for ease of discussion.
- terminal device 110 provides a launch control for initiating an expert query mode in a dialog-based interactive application. If user 140 clicks the launch control provided by terminal device 110, terminal device 110 will execute the method disclosed herein for processing query requests based on user 140's query request. In some embodiments, if user 140 does not click the launch control provided by terminal device 110, terminal device 110 will perform a regular query based on user 140's query request. In this way, subsequent query processes can be executed based on the user's desired query mode.
- terminal device 110 performs a query based on the user's first query request 310.
- terminal device 110 presents an intermediate response area 311 in a conversational interactive application.
- the intermediate response area 311 can be used to indicate the query process of terminal device 110.
- the query process of terminal device 110 can be presented on the page in the form of cards. By presenting its query process on the page, terminal device 110 allows users to have a more intuitive understanding of the query process.
- the intermediate response area 311 includes a second query request and a second query response.
- the terminal device 110 responds to a first query request 310 from user 140, and the first clarity corresponding to the first query request 310 does not meet a predetermined condition.
- the terminal device 110 performs semantic and/or text analysis on the first query request, splitting the first query request 310 into a second query request 312, and presenting the second query request 312 on page 301.
- the terminal device 110 presents multiple sub-requests included in the second query request 312 on page 301, such as sub-request 312-1, sub-request 312-2, etc.
- terminal device 110 in response to determining that a first response has been generated, hides the intermediate response area in a conversational interactive application. As shown in example interface 304 of FIG3D, if a first response 331 has been generated, terminal device 110 may hide the intermediate response area in area 340. In this way, the final query response (i.e., the first response 331) can be presented in a more prominent manner.
- terminal device 110 provides user 140 with a hidden control 341 to allow user 140 to expand the intermediate response area. For instance, after terminal device 110 generates the first response 331, it hides the intermediate response area. If the user then clicks the hidden control 341, terminal device 110 expands the intermediate response area. Subsequently, if the user clicks the hidden control 341 again, terminal device 110 hides the intermediate response area again. This allows the user to easily view the process of obtaining the final query response and the data source.
- terminal device 110 executes this procedure based on user operations on the startup control.
- a solution for handling query requests is provided. Furthermore, when a user's query request is not clear enough, the terminal device 110 can provide prompts in one or more rounds, thereby making it easier for the user to refine their query request.
- terminal device 110 may first determine multiple dimensions associated with the first query request. Then, terminal device 110 provides prompts based on each of these multiple dimensions. For example, if user 140's first query request is "What concerts are happening in the first half of this year?", terminal device 110 determines that the multiple dimensions associated with the first query request could be: language (Chinese, English), category (singer, group), host city (city B, city C), style (rock, pop, classical), etc.
- the following first describes a method for processing a query request in a scenario where the terminal device 110 provides prompt information in one round.
- the terminal device 110 may also provide first prompt information to refine the first query request.
- the terminal device 110 in response to receiving first feedback on the first prompt information, the terminal device 110 generates a second query request based on the first feedback.
- terminal device 110 may provide initial prompts in a single round to refine the initial query request.
- Terminal device 110 presents the initial prompts on a page, which include multiple refinement questions. For example, if user 140's initial query is "What concerts are happening in the first half of this year?", the initial prompts provided by terminal device 110 could include the refinement question "What language of concert would you like to attend?".
- the options provided by terminal device 110 for the refinement questions could be Chinese, English, Italian, etc., for user 140 to choose from.
- terminal device 110 generates a second query request based on user 140's feedback to the first prompt. For example, continuing the above example, if user 140 selects Chinese, terminal device 110 generates a second query request, "What are the Chinese concerts in the first half of this year?", based on user 140's selection. Finally, terminal device 110 generates a first response based on the second response to the second query request.
- the query request can be progressively refined over multiple rounds.
- the following description illustrates a method for processing a query request using terminal device 110 in a scenario where prompts are provided over multiple rounds.
- Figures 4A to 4H show relevant example interfaces 400A to 400H for processing query requests according to other embodiments of this disclosure. Schematic diagram.
- the terminal device 110 determines that the second query request cannot be used to generate a first response to the first query request, it provides second hints to refine the first query request. Then, in response to receiving second feedback on the second hints, the terminal device 110 generates a second query request based on the second feedback. In other words, if the machine learning model deems the refined second query request still insufficiently clear, it can provide more hints in more rounds to further refine the query request.
- terminal device 110 determines that the second resolution of the second query request does not meet predetermined conditions, it will provide multiple rounds of prompts until the second resolution meets the predetermined conditions.
- Terminal device 110 generates a second query request based on user 140's feedback to each round of prompts. Then, terminal device 110 generates a first response based on the second response to the second query request.
- terminal device 110 can invoke a machine learning model to train a refined model of query intent and multi-round processing. If terminal device 110 determines that the clarity of the user's first query request does not meet predetermined conditions, it can use the refined model to conduct multiple rounds of queries against the user to provide more accurate information to the user based on the first query.
- the terminal device 110 determines that the clarity of the first query request 410 does not meet the predetermined conditions, then it provides the user 140 with a prompt message 411 that refines the first query request 410, and displays it in the intermediate response area 311.
- the prompt message 411 includes the first question 412 "What is the specific brand of your computer?", and the terminal device 110 provides the user with options (e.g., brand A, brand B, brand C) for the user 140 to choose from.
- terminal device 110 can generate a query request based on user 140's feedback. If terminal device 110 determines that the resolution corresponding to the query request does not yet meet the predetermined conditions, it will continue to provide user 140 with a prompt message 430 for refining the first query request 410, which will be displayed in the intermediate response area 311.
- the prompt message 430 includes a second question 431, "What is the model of your computer?", and the terminal device...
- the backup 110 provides the user with options (e.g., model X, model XXX, model XXXXX) for the user 140 to choose from.
- terminal device 110 can generate a query request based on user 140's feedback. If terminal device 110 determines that the resolution corresponding to the query request still does not meet the predetermined conditions, it continues to provide user 140 with prompt information 450 for refining the first query request 410.
- Prompt information 450 includes a third question 451, "What is the specific malfunction of your computer?", and terminal device 110 provides the user with options (e.g., unable to boot, running slowly, blue screen) for user 140 to choose from.
- terminal device 110 can generate a query request based on user 140's feedback. In this manner, multiple rounds of prompts are provided until the clarity of the query request meets predetermined conditions. Based on all feedback from user 140, terminal device 110 generates a second query request.
- terminal device 110 when providing prompt information to user 140, may also provide input box 471 to user 140 in intermediate response area 311 for user 140 to input feedback on the questions included in the prompt information.
- terminal device 110 Based on the second response corresponding to the second query request, terminal device 110 generates a first response 481 corresponding to the first query request 410.
- terminal device 110 may also provide a control 482 for reading the response in the intermediate response area 311. When user 140 clicks the control 482 for reading the response, terminal device 110 will display the first response it generated.
- this disclosure can utilize splitting and/or refining models to handle unclear user queries, and through reasoning, splitting, and refining, obtain query requests that more clearly describe user needs.
- the obtained query requests can more accurately meet the user's query requirements, thereby providing the user with more precise information.
- the device 500 includes a determining module 510 configured to, in response to receiving a first query request from a user, determine whether the first query request can be used to generate a first response to the first query request.
- the device 500 also includes a request generating module 520 configured to, in response to determining that the first query request cannot be used to generate the first response to the first query request, generate a second query request based on the first query request, wherein the second query request can be used to generate the first response to the first query request.
- the device 500 further includes an acquiring module 530 configured to acquire a second response to the second query request.
- the device 500 also includes a response generating module 540 configured to generate the first response to the first query request based on the second response.
- the determining module 510 is further configured to determine whether a first query request can be used to generate a first response to the first query request, including determining whether a first query request can be used to generate a first response to the first query request based on at least one of the following: based on semantic analysis of the first query request; or based on text analysis of the first query request.
- the request generation module 520 is further configured to determine a plurality of sub-requests associated with the first query request; and to generate a second query request based on the plurality of sub-requests.
- the acquisition module 530 is further configured to determine a logical relationship between a plurality of sub-requests; and to execute the plurality of sub-requests according to the logical relationship in order to acquire a second response.
- the apparatus 500 further includes a response generation module configured to, in response to determining a logical relationship indicating a parallel relationship, acquire multiple sub-responses for multiple sub-requests respectively; and generate a second response based on the multiple sub-responses.
- a response generation module configured to, in response to determining a logical relationship indicating a parallel relationship, acquire multiple sub-responses for multiple sub-requests respectively; and generate a second response based on the multiple sub-responses.
- the response generation module is further configured to, in response to determining the logical relationship indicating the combination relationship, obtain a first sub-response for a first sub-request among a plurality of sub-requests and a second sub-response for a second sub-request among a plurality of sub-requests, wherein there is a parallel relationship between the first sub-request and the second sub-request, and there is a serial relationship between a third sub-request among a plurality of sub-requests and the first sub-request and the second sub-request; update the third sub-request based on the first sub-response and the second sub-response; and generate a second response based on the third sub-response for the updated third sub-request.
- the request generation module 520 further includes a request determination module configured to determine a user’s potential query requests based on the query request, the potential query requests indicating subsequent query requests that the user will issue after the first query request.
- the device 500 further includes a region hiding module configured to present an intermediate response region in a conversational interactive application, the intermediate response region including a second query request and a second response; and to hide the intermediate response region in the conversational interactive application in response to determining that a first response has been generated.
- a region hiding module configured to present an intermediate response region in a conversational interactive application, the intermediate response region including a second query request and a second response; and to hide the intermediate response region in the conversational interactive application in response to determining that a first response has been generated.
- the request generation module 520 is further configured to provide first prompt information for refining the first query request; and in response to receiving first feedback on the first prompt information, to generate a second query request based on the first feedback.
- the request generation module 520 is further configured to provide second prompt information for refining the first query request in response to determining that it cannot be used to generate a first response to the first query request; and to generate a second query request based on the second feedback in response to receiving the second prompt information.
- the request generation module 520 further includes an information providing module configured to determine multiple dimensions associated with the first query request; and to provide prompt information based on the multiple dimensions respectively.
- the units and/or modules included in the device 500 can be implemented in various ways, including software, hardware, firmware, or any combination thereof.
- one or more units Elements and/or modules may be implemented using software and/or firmware, such as machine-executable instructions stored on a storage medium.
- some or all of the elements and/or modules in device 500 may be implemented at least partially by one or more hardware logic components.
- exemplary types of hardware logic components 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 so on.
- Such electronic devices or combinations of electronic devices may, for example, include the terminal device 110 in FIG1.
- Figure 6 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 Figure 6 is merely exemplary and should not constitute any limitation on the functionality and scope of the embodiments described herein. The electronic device 600 shown in Figure 6 can be used to implement the terminal device 110 of Figure 1.
- the electronic device 600 is in the form of a general-purpose electronic device.
- Components of the 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.
- the processing unit 610 may be a physical or virtual processor and is capable of performing various processes according to programs stored in memory 620. In a multiprocessor system, multiple processing units execute computer-executable instructions in parallel to improve the parallel processing capability of the electronic device 600.
- Electronic device 600 typically includes multiple computer storage media. Such media can be any available media accessible to electronic device 600, including but not limited to volatile and non-volatile media, removable and non-removable media.
- Memory 620 can be volatile memory (e.g., registers, cache, random access memory (RAM)), non-volatile memory (e.g., read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof.
- Storage device 630 can be removable or non-removable media and may include machine-readable media, such as flash drives, disks, or any other media capable of storing information and/or data. Accessed within electronic device 600.
- Electronic device 600 may further include additional removable/non-removable, volatile/non-volatile storage media.
- disk drives for reading from or writing to removable, non-volatile disks (e.g., "floppy disks") and optical disk drives for reading from or writing to removable, non-volatile optical disks may be provided.
- each drive may be connected to a bus (not shown) via one or more data media interfaces.
- Memory 620 may include computer program product 625 having one or more program modules configured to perform various methods or actions of various embodiments of the present disclosure.
- the communication unit 640 enables communication with other electronic devices via a communication medium. Additionally, the functionality of the components of the electronic device 600 can be implemented using a single computing cluster or multiple computing machines capable of communicating via communication connections. Therefore, the electronic device 600 can operate in a networked environment using logical connections to one or more other servers, network personal computers (PCs), or another network node.
- PCs network personal computers
- Input device 650 can be one or more input devices, such as a mouse, keyboard, trackball, etc.
- Output device 660 can be one or more output devices, such as a monitor, speaker, printer, etc.
- Electronic device 600 can also communicate with one or more external devices (not shown) via communication unit 640 as needed. These external devices include storage devices, display devices, etc., and can communicate with one or more devices that enable user interaction with electronic device 600, or with any device that enables electronic device 600 to communicate with one or more other electronic devices (e.g., network card, modem, etc.). Such communication can be performed via input/output (I/O) interface (not shown).
- I/O input/output
- a computer-readable storage medium that stores computer-executable instructions thereon, wherein the computer-executable instructions are executed by a processor to implement the methods described above.
- a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, which are executed by a processor to implement the methods described above.
- 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 apparatus to produce a machine such that, when executed by the processing unit of the computer or other programmable data processing apparatus, they create means for implementing the functions/actions specified in one or more blocks of the flowchart and/or block diagram.
- These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and/or other device to operate in a particular manner.
- the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions/actions specified in one or more blocks of the flowchart and/or block diagram.
- Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions that execute on the computer, other programmable data processing apparatus, or other device to perform the functions/actions specified in one or more boxes of a flowchart and/or block diagram.
- each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction, which contains one or more executable instructions for implementing the specified logical function.
- the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
本公开的示例性实现方式总体涉及计算机领域,特别地涉及用于处理查询请求的方法、装置、设备和计算机可读存储介质。The exemplary implementations of this disclosure generally relate to the field of computers, and in particular to methods, apparatus, devices, and computer-readable storage media for processing query requests.
随着互联网的飞速发展,越来越多的应用被设计来向用户提供各种服务。例如,应用可以向用户提供查询服务。应用可以获取来自用户的查询请求(例如用户输入的查询文本,也即“问题”),并基于该查询请求提供与该问题对应的查询结果。然而,由于用户的查询请求可能并不能清晰地描述用户需求,已有应用所提供的查询结果可能并不符合用户预期,因而期望可以提升查询的准确性和效率。With the rapid development of the internet, more and more applications are designed to provide users with various services. For example, applications can provide query services. Applications can obtain query requests from users (such as the query text entered by the user, i.e., the "question") and provide query results corresponding to that question based on the query request. However, because user query requests may not clearly describe user needs, the query results provided by existing applications may not meet user expectations, thus there is a desire to improve the accuracy and efficiency of queries.
发明内容Summary of the Invention
在本公开的第一方面,提供了一种用于处理查询请求的方法。该方法包括:在对话式交互应用中,响应于接收到来自用户的第一查询请求,确定第一查询请求的第一清晰度;响应于确定第一查询请求的第一清晰度不满足预定条件,基于第一查询请求生成第二查询请求,第二查询请求的第二清晰度满足预定条件;获取针对第二查询请求的第二应答;以及基于第二应答来生成针对第一查询请求的第一应答。In a first aspect of this disclosure, a method for processing a query request is provided. The method includes: in a conversational interactive application, in response to receiving a first query request from a user, determining a first clarity of the first query request; in response to determining that the first clarity of the first query request does not meet the predetermined conditions, generating a second query request based on the first query request, wherein a second clarity of the second query request meets the predetermined conditions; obtaining a second response to the second query request; and generating a first response to the first query request based on the second response.
在本公开的第二方面,提供了一种用于处理查询请求的装置。该装置包括:清晰度确定模块,被配置为在对话式交互应用中,响应于接收到来自用户的第一查询请求,确定第一查询请求的第一清晰度;请求生成模块,被配置为响应于确定第一查询请求的第一清晰度不满足预定条件,基于第一查询请求生成第二查询请求,第二查询请求的第二清晰度满足预定条件;应答获取模块,被配置为获取针对第二查 询请求的第二应答;以及应答生成模块,被配置为基于第二应答来生成针对第一查询请求的第一应答。In a second aspect of this disclosure, an apparatus for processing query requests is provided. The apparatus includes: a clarity determination module configured to, in a conversational interactive application, determine a first clarity of the first query request in response to receiving a first query request from a user; a request generation module configured to, in response to determining that the first clarity of the first query request does not meet a predetermined condition, generate a second query request based on the first query request, wherein the second clarity of the second query request meets the predetermined condition; and a response acquisition module configured to acquire a response to the second query request. The second response to the query request; and the response generation module, configured to generate a first response to the first query request based on the second response.
在本公开的第三方面,提供了一种电子设备。该电子设备包括:至少一个处理单元;以及至少一个存储器,至少一个存储器被耦合到至少一个处理单元并且存储用于由至少一个处理单元执行的指令,指令在由至少一个处理单元执行时使电子设备执行根据本公开第一方面的方法。In a third aspect of this 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 causing the electronic device to perform the method according to a first aspect of this disclosure when executed by the at least one processing unit.
在本公开的第四方面,提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序在被处理器执行时使处理器实现根据本公开第一方面的方法。In a fourth aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, causes the processor to implement the method according to a first aspect of this disclosure.
根据本公开的第五方面,提供了一种计算机程序产品,包括计算机程序,其中计算机程序被处理器执行时实现根据本公开的第一方面的方法。According to a fifth aspect of this disclosure, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, it implements the method according to a first aspect of this disclosure.
应当理解,本内容部分中所描述的内容并非旨在限定本公开的实现方式的关键特征或重要特征,也不用于限制本公开的范围。本公开的其它特征将通过以下的描述而变得容易理解。It should be understood that the content described in this content section is not intended to limit the key or essential features of the implementation of this disclosure, nor is it intended to restrict the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description.
在下文中,结合附图并参考以下详细说明,本公开各实现方式的上述和其他特征、优点及方面将变得更加明显。在附图中,相同或相似的附图标注表示相同或相似的元素,其中:In the following detailed description, the above and other features, advantages, and aspects of the various implementations of this disclosure will become more apparent, taken in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals denote the same or similar elements, wherein:
图1示出了本公开的实施例能够在其中实现的示例环境的示意图;Figure 1 shows a schematic diagram of an example environment in which embodiments of the present disclosure can be implemented;
图2示出了根据本公开的一些实施例的用于处理查询请求的过程的示意图;Figure 2 illustrates a schematic diagram of a process for processing a query request according to some embodiments of the present disclosure;
图3A至3D示出了根据本公开的一些实施例的处理查询请求的相关示例界面的示意图;Figures 3A to 3D illustrate schematic diagrams of example interfaces related to processing query requests according to some embodiments of the present disclosure;
图4A至图4H示出了根据本公开的另一些实施例的用于处理查询请求的相关示例界面的示意图;Figures 4A to 4H illustrate schematic diagrams of relevant example interfaces for processing query requests according to other embodiments of the present disclosure;
图5示出了根据本公开的一些实施例的用于处理查询请求的装置 的示意性结构框图;以及Figure 5 illustrates an apparatus for processing query requests according to some embodiments of the present disclosure. A schematic structural block diagram; and
图6示出了其中可以实现本公开的一个或多个实施例的电子设备的框图。Figure 6 shows a block diagram of an electronic device in which one or more embodiments of the present disclosure may be implemented.
下面将参照附图更详细地描述本公开的实施例。虽然附图中示出了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例,相反,提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
在本公开的实施例的描述中,术语“包括”及其类似用语应当理解为开放性包含,即“包括但不限于”。术语“基于”应当理解为“至少部分地基于”。术语“一个实施例”或“该实施例”应当理解为“至少一个实施例”。术语“一些实施例”应当理解为“至少一些实施例”。下文还可能包括其他明确的和隐含的定义。In the description of embodiments of this disclosure, the term "comprising" and similar terms should be understood as open-ended inclusion, i.e., "including but not limited to". The term "based on" should be understood as "at least partially based 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.
在本文中,除非明确说明,“响应于A”执行一个步骤并不意味着在“A”之后立即执行该步骤,而是可以包括一个或多个中间步骤。In this document, unless explicitly stated otherwise, performing a step in response to A does not mean that the step is performed immediately after A, but may include one or more intermediate steps.
可以理解的是,本技术方案所涉及的数据(包括但不限于数据本身、数据的获得或使用)应当遵循相应法律法规及相关规定的要求。It is understood 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 related provisions.
可以理解的是,在使用本公开各实施例公开的技术方案之前,均应当根据相关法律法规通过适当的方式对本公开所涉及个人信息的类型、使用范围、使用场景等告知用户并获得用户的授权。It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure through appropriate means in accordance with relevant laws and regulations, and user authorization should be obtained.
例如,在响应于接收到用户的主动请求时,向用户发送提示信息,以明确地提示用户,其请求执行的操作将需要获得和使用到用户的个人信息,从而使得用户可以根据提示信息来自主地选择是否向执行本公开技术方案的操作的电子设备、应用程序、服务器或存储介质等软件或硬件提供个人信息。For example, in response to receiving a user's active request, a prompt message is sent to the user to clearly inform the user that the requested operation will require the acquisition and use of the user's personal information, thereby enabling the user to choose whether to provide personal information to the software or hardware such as electronic devices, applications, servers or storage media that perform the operation of the technical solution disclosed herein, based on the prompt message.
作为一种可选的但非限制性的实现方式,响应于接收到用户的主 动请求,向用户发送提示信息的方式,例如可以是弹窗的方式,弹窗中可以以文字的方式呈现提示信息。此外,弹窗中还可以承载供用户选择“同意”或“不同意”向电子设备提供个人信息的选择控件。As an optional but non-restrictive implementation, in response to receiving the user's main... The method of making a request and sending a prompt to the user can be, for example, a pop-up window, in which the prompt message can be presented in text form. In addition, the pop-up window can also contain a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
可以理解的是,上述通知和获得用户授权过程仅是示意性的,不对本公开的实现方式构成限定,其他满足相关法律法规的方式也可应用于本公开的实现方式中。It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.
如本文中所使用的,术语“模型”可以从训练数据中学习到相应的输入与输出之间的关联关系,从而在训练完成后可以针对给定的输入,生成对应的输出。模型的生成可以基于机器学习技术。深度学习是一种机器学习算法,通过使用多层处理单元来处理输入和提供相应输出。神经网络模型是基于深度学习的模型的一个示例。在本文中,“模型”也可以被称为“机器学习模型”、“学习模型”、“机器学习网络”或“学习网络”,这些术语在本文中可互换地使用。As used in this paper, the term "model" refers to a model that learns the relationship between inputs and outputs from training data, enabling it to generate corresponding outputs for a given input after training. Model generation can be based on machine learning techniques. Deep learning is a machine learning algorithm that processes inputs and provides corresponding outputs using multiple layers of processing units. A neural network model is an example of a deep learning-based model. In this paper, "model" may also be referred to as a "machine learning model," "learning model," "machine learning network," or "learning network," and these terms are used interchangeably.
“神经网络”是一种基于深度学习的机器学习网络。神经网络能够处理输入并且提供相应输出,其通常包括输入层和输出层以及在输入层与输出层之间的一个或多个隐藏层。在深度学习应用中使用的神经网络通常包括许多隐藏层,从而增加网络的深度。神经网络的各个层按顺序相连,从而前一层的输出被提供作为后一层的输入,其中输入层接收神经网络的输入,而输出层的输出作为神经网络的最终输出。神经网络的每个层包括一个或多个节点(也称为处理节点或神经元),每个节点处理来自上一层的输入。A neural network is a machine learning network based on deep learning. A neural network processes input and provides a corresponding output, typically consisting of 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 often include many hidden layers, thus increasing the network's depth. The layers of a neural network are connected sequentially, so that the output of the previous layer is provided as the input to the next layer. The input layer receives the input to the neural network, while the output layer's output serves as the final output. Each layer of a neural network includes one or more nodes (also called processing nodes or neurons), each node processing the input from the layer above.
通常,机器学习大致可以包括三个阶段,即训练阶段、测试阶段和应用阶段(也称为推理阶段)。在训练阶段,给定的模型可以使用大量的训练数据进行训练,不断迭代更新参数值,直到模型能够从训练数据中获得一致的满足预期目标的推理。通过训练,模型可以被认为能够从训练数据中学习从输入到输出之间的关联(也称为输入到输出的映射)。训练后的模型的参数值被确定。在测试阶段,将测试输入应用到训练后的模型,以测试模型是否能够提供正确的输出,从而确定模型的性能。测试阶段有时候可以被融合在训练阶段。在应用或 推理阶段,已训练的模型可以被用于基于训练得到的参数值,对实际的模型输入进行处理,确定对应的模型输出。Generally, machine learning can be broadly categorized into three phases: training, testing, and application (also known as inference). In the training phase, a given model is trained using a large amount of training data, iteratively updating parameter values until the model can consistently generate inferences that satisfy the expected goals from the training data. Through training, the model can be considered to have learned the relationship between inputs and outputs (also known as the input-output mapping) from the training data. The parameter values of the trained model are determined. In the testing phase, test inputs are applied to the trained model to test whether it can provide the correct output, thus determining the model's performance. The testing phase can sometimes be integrated into the training phase. In application or... During the inference phase, the trained model can be used to process the actual model input based on the parameter values obtained during training, and determine the corresponding model output.
示例环境Example Environment
图1示出了本公开的实施例能够在其中实现的示例环境100的示意图。在该示例环境100中,终端设备110中安装有应用120。用户140可以经由终端设备110和/或终端设备110的附接设备来与应用120进行交互。Figure 1 illustrates a schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented. In this example environment 100, an application 120 is installed on 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.
在一些实施例中,应用120可以是任意适当的、可以提供查询服务的应用。在图1的环境100中,如果应用120处于活动状态,终端设备110可以呈现应用120的页面150。页面150可以包括应用120所能提供的各类页面,诸如查询页面、搜索页面、搜索结果呈现页面等等。In some embodiments, application 120 can be any suitable application that can provide query services. In environment 100 of FIG1, if application 120 is active, terminal device 110 can display page 150 of application 120. Page 150 may include various types of pages that application 120 can provide, such as query pages, search pages, search result display pages, etc.
在一些实施例中,终端设备110与服务器130通信,以实现对应用120的服务的供应。终端设备110可以是任意类型的移动终端、固定终端或便携式终端,包括移动手机、台式计算机、膝上型计算机、笔记本计算机、上网本计算机、平板计算机、媒体计算机、多媒体平板、个人通信系统(PCS)设备、个人导航设备、个人数字助理(PDA)、音频/视频播放器、数码相机/摄像机、定位设备、电视接收器、无线电广播接收器、电子书设备、游戏设备或者前述各项的任意组合,包括这些设备的配件和外设或者其任意组合。在一些实施例中,终端设备110也能够支持任意类型的针对用户的接口(诸如“可佩戴”电路等)。服务器130可以是能够提供计算能力的各种类型的计算系统/服务器,包括但不限于大型机、边缘计算节点、云环境中的计算设备,等等。In some embodiments, terminal device 110 communicates with server 130 to provide services to application 120. 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 system (PCS) devices, personal navigation devices, personal digital assistants (PDAs), audio/video players, digital cameras/camcorders, positioning devices, television receivers, radio receivers, e-book devices, gaming devices, or any combination thereof, including accessories and peripherals of these devices or any combination thereof. In some embodiments, terminal device 110 can also support any type of user-facing interface (such as "wearable" circuitry). Server 130 can be various types of computing systems/servers capable of providing computing power, including but not limited to mainframes, edge computing nodes, computing devices in cloud environments, etc.
应当理解,仅出于示例性的目的描述环境100中各个元素的结构和功能,而不暗示对于本公开的范围的任何限制。It should be understood that the structure and function of the various elements in environment 100 are described for illustrative purposes only and do not imply any limitation on the scope of this disclosure.
用于查询的过程The process of querying
传统上,可以提供查询服务的应用或系统可以响应于接收来自用 户的多个关键词查询请求(例如,请把机型A、机型B、机型C的销售占比告诉我)。直接基于该查询请求,从数据库中确定与该查询请求相匹配的数据,或者基于先前学习到的知识来确定与该查询请求相匹配的数据。应用或系统可以基于该数据确定针对查询请求的查询结果。如果应用不能清晰理解查询请求的含义,则直接检索数据库或者查询先前学习到的知识并不能找到与查询请求相匹配的数据,应用就无法向用户提供准确的查询结果。Traditionally, applications or systems that provide query services can respond to receiving data from their users. The system can handle multiple keyword queries from a user (e.g., "Please tell me the sales percentage of model A, model B, and model C"). Based on this query, the system either directly retrieves matching data from the database or uses previously learned knowledge to determine the matching data. The application or system can then use this data to determine the query results for that query request. If the application does not clearly understand the meaning of the query request, directly searching the database or using previously learned knowledge will not find matching data, and the application will be unable to provide accurate query results to the user.
又例如,可以提供查询服务的应用或系统在基于用户的不够清晰的查询请求进行搜索时,需要获取更多细化信息。例如,用户想要查询“今年上半年有什么演唱会”,此时,针对用户的查询信息,可以提供查询服务的应用或系统还需获取“在哪里的演唱会”这样的更细化的信息。又例如,例如,用户想要查询“脖子痛怎么办”,此时,针对用户的查询信息,可以提供查询服务的应用或系统还需获取“疼痛时间”、“有没有历史诊疗记录”,等等更细化的信息。For example, when searching based on a user's unclear query, applications or systems providing query services need to obtain more detailed information. For instance, if a user wants to search for "what concerts are happening in the first half of this year," the application or system providing the query service would need to obtain more detailed information such as "where are the concerts held?" Similarly, if a user wants to search for "what to do about neck pain," the application or system providing the query service would need to obtain more detailed information such as "when the pain started" and "whether there are any previous medical records," etc.
有鉴于此,根据本公开的实施例,提出了一种用于处理查询请求的方法。该方法包括,响应于接收到来自用户的第一查询请求,确定第一查询请求是否可用于生成针对第一查询请求的第一应答。响应于确定第一查询请求不可用于生成针对第一查询请求的第一应答,基于第一查询请求生成第二查询请求,第二查询请求可用于生成针对第一查询请求的第一应答。获取针对第二查询请求的第二应答。基于第二应答来生成针对第一查询请求的第一应答。由此,通过对用户的查询需求进行拆解,满足用户的查询需求,从而为用户提供更精确的信息。应当理解,尽管上文描述了由终端设备来执行上述方法,备选地和/或附加地,终端设备调用服务器的处理能力,来执行上述方法。In view of this, according to embodiments of the present disclosure, a method for processing query requests is proposed. The method includes: in response to receiving a first query request from a user, determining whether the first query request is available for generating a first response to the first query request; in response to determining that the first query request is not available for generating a first response to the first query request, generating a second query request based on the first query request, the second query request being available for generating a first response to the first query request; obtaining a second response to the second query request; and generating a first response to the first query request based on the second response. Thus, by breaking down the user's query needs, the user's query requirements are met, thereby providing the user with more accurate information. It should be understood that although the above description indicates that the method is performed by a terminal device, alternatively and/or additionally, the terminal device may invoke the processing capabilities of a server to perform the method.
以下继续参考附图描述本公开的一些示例实施例。The following description continues with reference to the accompanying drawings, which will illustrate some exemplary embodiments of this disclosure.
下文将参考图2描述本公开用于处理查询请求的过程的流程图。图2示出了根据本公开的一些实施例的用于处理查询请求的过程200的示意图。过程200可以被实现在终端设备110处。下面参考图1描述过程200。 The following description will use FIG2 to illustrate a flowchart of the process for processing a query request according to the present disclosure. FIG2 shows a schematic diagram of a process 200 for processing a query request according to some embodiments of the present disclosure. Process 200 may be implemented at a terminal device 110. Process 200 will now be described with reference to FIG1.
在框210,响应于接收到来自用户的第一查询请求,确定第一查询请求是否可用于生成针对第一查询请求的第一应答。在一些实施例中,终端设备110可以接收来自用户(例如用户140)的第一查询请求。终端设备110可以采用任意适当方式接收来自用户的第一查询请求,本公开对此不作限定。例如,终端设备110可以提供输入框,并经由输入框接收来自用户的第一查询请求。第一查询请求可以是任意适当类型,包括但不限于文本、语音、视频、图像等等。In block 210, in response to receiving a first query request from a user, it is determined whether the first query request can be used to generate a first response to the first query request. In some embodiments, terminal device 110 may receive the first query request from a user (e.g., user 140). Terminal device 110 may receive the first query request from the user in any suitable manner, and this disclosure is not limited thereto. For example, terminal device 110 may provide an input field and receive the first query request from the user via the input field. The first query request may be of any suitable type, including but not limited to text, voice, video, images, etc.
终端设备110根据用户的第一查询请求,确定第一查询请求是否可用于生成针对第一查询请求的第一应答。在一些实施例中,终端设备110可以基于针对第一查询请求的语义分析,确定第一查询请求是否可用于生成针对第一查询请求的第一应答。Based on the user's first query request, the terminal device 110 determines whether the first query request can be used to generate a first response to the first query request. In some embodiments, the terminal device 110 may determine whether the first query request can be used to generate a first response to the first query request based on semantic analysis of the first query request.
在一些示例中,终端设备110在接收到来自用户的第一查询请求后,对第一查询请求进行语义分析,确定第一查询请求是否可用于生成针对第一查询请求的第一应答。在一些示例中,可以由终端设备110访问服务器130来确定第一查询请求是否可用于生成针对第一查询请求的第一应答。In some examples, after receiving a first query request from a user, terminal device 110 performs semantic analysis on the first query request to determine whether it can be used to generate a first response to the first query request. In some examples, terminal device 110 may access server 130 to determine whether the first query request can be used to generate a first response to the first query request.
终端设备110可以采用任意适当方式来确定第一查询请求是否可用于生成针对第一查询请求的第一应答。例如,可以利用清晰度(例如,0-100之间的数值)来表示第一查询请求是否可用于生成针对第一查询请求的第一应答。如果清晰度高于预定阈值(例如,70或者其他数值),则确定第一查询请求可用于生成针对第一查询请求的第一应答。终端设备110可以借助机器学习模型(例如,拆分模型、和/或细化模型),针对第一查询请求来执行语义分析进而确定第一查询请求的第一清晰度。这个机器学习模型可以是任意适当的模型,例如可以包括transformer模型、RNN、CNN等等。在此,该机器学习模型可以是利用带标记的样本来训练的,并且训练后的机器学习模型可以直接输出该查询请求对应的清晰度。Terminal device 110 can determine whether a first query request is usable for generating a first response to the first query request using any suitable method. For example, sharpness (e.g., a value between 0 and 100) can be used to represent whether the first query request is usable for generating a first response to the first query request. If the sharpness is higher than a predetermined threshold (e.g., 70 or another value), it is determined that the first query request is usable for generating a first response to the first query request. Terminal device 110 can perform semantic analysis on the first query request using a machine learning model (e.g., a splitting model, and/or a refinement model) to determine the first sharpness of the first query request. This machine learning model can be any suitable model, such as including 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 the sharpness corresponding to the query request.
备选地和/或附加地,终端设备110还可以基于文本分析来确定第一查询请求是否可用于生成针对第一查询请求的第一应答。具体地, 可以提取查询请求中的关键字,进而确定查询请求是否清晰描述用户需求,等等。Alternatively and/or additionally, terminal device 110 may also determine, based on text analysis, whether the first query request can be used to generate a first response to the first query request. Specifically, Keywords can be extracted from query requests to determine whether the query clearly describes the user's needs, and so on.
在框220,终端设备110响应于确定第一查询请求不可用于生成针对第一查询请求的第一应答,基于第一查询请求生成第二查询请求,第二查询请求可用于生成针对第一查询请求的第一应答。也即,第二查询请求能够清晰描述用户需求,进而可以获得更加匹配于用户预期的应答。In box 220, in response to determining that the first query request cannot be used to generate a first response to the first query request, the terminal device 110 generates a second query request based on the first query request. The second query request can be used to generate a first response to the first query request. That is, the second query request can clearly describe the user's needs, thereby obtaining a response that is more in line with the user's expectations.
在一些示例中,如果终端设备110确定第一查询请求的清晰度不满足预定条件,则终端设备110根据第一查询请求生成第二查询请求。例如,用户所输入的第一查询请求为“今年A市的樱花在什么时间盛开?且最佳的旅游时间是什么时候?”,由于用户输入的第一查询请求缺乏具体时间,因此,终端设备110确定第一查询请求的第一清晰度不满足预定条件。进而,终端设备110根据第一查询请求,生成第二查询请求。具体地,可以利用机器学习模型来生成第二查询请求。例如,机器学习模型可以将第一查询请求拆分为:“A市的樱花在今年三月份盛开的状态”、“A市的樱花在今年四月份盛开的状态”。In some examples, if terminal device 110 determines that the clarity of the first query request does not meet a predetermined condition, then terminal device 110 generates a second query request based on the first query request. For example, if the user's first query request is "When do the cherry blossoms in City A bloom this year? And what is the best time to visit?", since the user's first query request lacks a specific time, terminal device 110 determines that the first clarity of the first query request does not meet the predetermined condition. Therefore, terminal device 110 generates a second query request based on the first query request. Specifically, a machine learning model can be used to generate the second query request. For example, the machine learning model can break down the first query request into: "The state of cherry blossoms in City A during March this year" and "The state of cherry blossoms in City A during April this year".
在一些实施例中,终端设备110确定与第一查询请求相关联的多个子请求,进而,根据多个子请求生成第二查询请求。在一些示例中,在确定第二查询请求时,终端设备110可以确定与第一查询请求相关联的多个子请求。可以针对第一查询请求执行语义分析以确定第一查询请求所表达的语义内容,并且响应于确定语义内容包括多个语义内容,确定第一查询请求包括多个子请求。In some embodiments, terminal device 110 determines multiple sub-requests associated with a first query request, and then generates a second query request based on the multiple sub-requests. In some examples, when determining the second query request, terminal device 110 may determine multiple sub-requests associated with the first query request. Semantic analysis may be performed on the first query request to determine the semantic content expressed by the first query request, and in response to determining that the semantic content includes multiple semantic contents, it is determined that the first query request includes multiple sub-requests.
例如,如果用户输入的第一查询请求为“今年A市的樱花在什么时间盛开?且最佳的旅游时间是什么时候?”,则终端设备110确定的多个子请求可以为:“A市的樱花在今年三月份盛开的状态”、“A市的樱花在今年四月份盛开的状态”等等。For example, if the user's first query is "When do the cherry blossoms in City A bloom this year? And when is the best time to visit?", the terminal device 110 can determine multiple sub-requests such as "The status of cherry blossoms in City A blooming in March this year", "The status of cherry blossoms in City A blooming in April this year", and so on.
在框230,终端设备110获取针对第二查询请求的第二应答。在框240,终端设备110根据第二应答,生成针对第一查询请求的第一应答。 In box 230, terminal device 110 obtains a second response to the second query request. In box 240, terminal device 110 generates a first response to the first query request based on the second response.
在一些示例中,终端设备110获取针对第二查询请求所包括的多个子请求分别对应的应答,并基于多个子请求分别对应的应答生成第一应答。例如,如果终端设备110基于第一查询请求确定的多个子请求为“A市的樱花在今年三月份盛开的状态”、“A市的樱花在今年四月份盛开的状态”。此时,终端设备110基于上述多个子请求确定多个应答,并生成第一应答。例如,“在A市,樱花的花期一般在三月至四月之间,XXXX”。In some examples, terminal device 110 obtains responses corresponding to the multiple sub-requests included in the second query request, and generates a first response based on the responses corresponding to the multiple sub-requests. For example, if terminal device 110 determines the multiple sub-requests based on the first query request as "the state of cherry blossoms in City A during March this year" and "the state of cherry blossoms in City A during April this year", then terminal device 110 determines multiple responses based on the aforementioned multiple sub-requests and generates a first response. For example, "In City A, the cherry blossom blooming period is generally between March and April, XXXX".
在一些实施例中,终端设备110还可以确定多个子请求之间的逻辑关系。然后,终端设备110按照多个子请求之间的逻辑关系,来执行多个子请求。由此,可以获取第二应答。以此方式,可以分别按照不同的逻辑关系来执行多个子请求,进而获得更加匹配于复杂查询的应答。In some embodiments, the terminal device 110 can also determine the logical relationship between multiple sub-requests. Then, the terminal device 110 executes the multiple sub-requests according to the logical relationship between them. This allows a second response to be obtained. In this way, multiple sub-requests can be executed according to different logical relationships, thereby obtaining a response more suited to complex queries.
在一些示例中,多个子请求之间的逻辑关系可以为并行关系、串行关系、或者组合关系。终端设备110按照并行关系,来执行多个子请求,以获取第二应答。终端设备110按照串行关系,来执行多个子请求,以获取第二应答。终端设备110按照组合关系,来执行多个子请求,以获取第二应答。下文将分别描述按照不同的逻辑关系,执行多个子请求来获取第二应答。In some examples, the logical relationship between multiple sub-requests can be parallel, serial, or combined. Terminal device 110 executes multiple sub-requests in parallel to obtain a second response. Terminal device 110 executes multiple sub-requests in serial order to obtain a second response. Terminal device 110 executes multiple sub-requests in combined order to obtain a second response. The following will describe the execution of multiple sub-requests to obtain a second response according to different logical relationships.
以下首先描述终端设备110按照并行关系,来执行多个子请求,以获取第二应答。The following describes how terminal device 110 executes multiple sub-requests in parallel to obtain a second response.
在一些实施例中,终端设备110响应于确定逻辑关系指示并行关系,分别获取针对多个子请求的多个子应答。随后,终端设备110基于多个子应答生成第二应答。在一些示例中,如果终端设备110确定多个子请求的逻辑关系为并行的关系,则并行搜索多个子请求,以分别获取多个子请求的子应答。然后,终端设备110总结子应答,以生成第二应答。以此方式,可以按照更为简单并且有效的方式来并行地获得针对各个子请求的应答。In some embodiments, in response to determining a logical relationship indicating a parallel relationship, terminal device 110 obtains multiple sub-responses for multiple sub-requests respectively. Then, terminal device 110 generates a second response based on the multiple sub-responses. In some examples, if terminal device 110 determines that the logical relationship between the multiple sub-requests is a parallel relationship, it searches the multiple sub-requests in parallel to obtain sub-responses for each sub-request. Then, terminal device 110 summarizes the sub-responses to generate a second response. In this way, responses for each sub-request can be obtained in parallel in a simpler and more efficient manner.
例如,终端设备110确定第一查询请求对应的子请求“A市的樱花在今年三月份盛开的状态”和子请求“A市的樱花在今年四月份盛 开的状态”为并行关系,则并行搜索三月份、四月份樱花盛开的状态以确定分别对应的子应答,进而总结子应答形成第二应答。For example, terminal device 110 determines the sub-request "The status of cherry blossoms in City A in March this year" and the sub-request "The status of cherry blossoms in City A in April this year" corresponding to the first query request. If the "opening state" is a parallel relationship, then the cherry blossoms in March and April are searched in parallel to determine the corresponding sub-responses, and then the sub-responses are summarized to form the second response.
上文描述了终端设备110按照并行关系,来执行多个子请求,以获取第二应答。以下继续描述终端设备110按照串行关系,来执行多个子请求,以获取第二应答。在一些实施例中,终端设备110响应于确定逻辑关系指示串行关系,获取针对多个子请求的第一子请求的第一子应答。随后,终端设备110基于第一子应答更新多个子请求中的第二子请求。进而,终端设备110基于针对更新的第二子请求的第二子应答,生成第二应答。以此方式,可以以更为准确的方式来处理涉及多次查询的查询请求。The preceding text describes how terminal device 110 executes multiple sub-requests in a parallel manner to obtain a second response. The following describes how terminal device 110 executes multiple sub-requests in a serial manner to obtain a second response. In some embodiments, terminal device 110, in response to determining a logical relationship indicating a serial relationship, obtains a first sub-response for a first sub-request among the multiple sub-requests. Subsequently, terminal device 110 updates a second sub-request among the multiple sub-requests based on the first sub-response. Furthermore, terminal device 110 generates a second response based on the second sub-response for the updated second sub-request. In this manner, query requests involving multiple queries can be processed more accurately.
在一些示例中,如果终端设备110确定多个子请求的逻辑关系为串行的关系,则先获取多个子请求中的第一子请求的第一应答。随后,终端设备110根据第一应答更新多个请求中的第二子请求。终端设备110根据第二子请求,确定第二子应答。最后,终端设备110根据第二子应答,生成第二应答。In some examples, if terminal device 110 determines that the logical relationship between multiple sub-requests is sequential, it first obtains the first response of the first sub-request among the multiple sub-requests. Then, terminal device 110 updates the second sub-request among the multiple requests based on the first response. Based on the second sub-request, terminal device 110 determines the second sub-response. Finally, based on the second sub-response, terminal device 110 generates the second response.
例如,如果用户的第一查询请求为“XX作品的作者的最新作品”,则终端设备110拆分第一查询请求的第一子请求为“XX作品的作者”。终端设备110根据第一子请求确定第一子应答“XX作品的作者为A作者”,且根据第一子应答更新第一查询请求对应的第二子请求为“A作者的最新作品”。最终,终端设备110根据第二子请求“A作者的最新作品”,确定第二子应答,以生成第二应答。以此方式,可以获得更加符合用户预期的应答。For example, if a user's first query request is "the latest work of the author of work XX", then terminal device 110 splits the first sub-request of the first query request into "the author of work XX". Terminal device 110 determines the first sub-response "the author of work XX is author A" based on the first sub-request, and updates the second sub-request corresponding to the first query request to "the latest work of author A" based on the first sub-response. Finally, terminal device 110 determines the second sub-response based on the second sub-request "the latest work of author A" to generate the second response. In this way, a response that more closely matches the user's expectations can be obtained.
上文描述了终端设备110按照串行关系,来执行多个子请求,以获取第二应答。以下继续描述终端设备110按照组合关系,来执行多个子请求,以获取第二应答。在一些实施例中,终端设备110响应于确定逻辑关系指示组合关系,分别获取针对多个子请求中的第一子请求的第一应答和针对多个子请求中的第二子请求的第二子应答。第一子请求与第二子请求之间存在并行关系,并且多个子请求中的第三子请求与第一子请求、第二子请求之间存在串行关系。终端设备110根 据第一子应答和第二子应答更新第三子请求。然后,终端设备110基于针对更新的第三子请求的第三子应答,生成第二应答。The preceding text describes how terminal device 110 executes multiple sub-requests in a serial manner to obtain a second response. The following description continues, showing terminal device 110 executing multiple sub-requests in a combined manner to obtain a second response. In some embodiments, in response to determining a logical relationship indicating a combined relationship, terminal device 110 obtains a first response for a first sub-request and a second sub-response for a second sub-request. There is a parallel relationship between the first and second sub-requests, and a serial relationship between a third sub-request and the first and second sub-requests. Terminal device 110... The third sub-request is updated based on the first and second sub-responses. Then, the terminal device 110 generates a second response based on the third sub-response to the updated third sub-request.
在一些示例中,如果第一查询请求对应的多个子请求之间的逻辑关系为组合关系,则分别获取多个子请求中的属于并行关系的第一子请求和第二子请求对应的第一子应答和第二子应答。随后,终端设备110根据第一字应答和第二子应答,更新多个子请求中的第三子请求。第三子请求与第一子请求、第二子请求之间存在串行关系。终端设备110根据第三子请求对应的第三子应答,生成第二应答。In some examples, if the logical relationship between the multiple sub-requests corresponding to the first query request is a composite relationship, then the first sub-response and the second sub-response corresponding to the first and second sub-requests that belong to a parallel relationship among the multiple sub-requests are obtained respectively. Subsequently, the terminal device 110 updates the third sub-request among the multiple sub-requests based on the first sub-response and the second sub-response. There is a serial relationship between the third sub-request and the first and second sub-requests. The terminal device 110 generates a second response based on the third sub-response corresponding to the third sub-request.
例如,如果用户的第一查询请求为“产品AA和产品BB的销量哪个更高”,则终端设备110拆分第一查询请求的第一子请求为“产品AA的销量”,第二子请求为“产品BB的销量”。终端设备110根据第一子请求确定第一子应答“产品AA的销量为XXX”,第二子请求的第二子应答为“产品BB的销量为XXXX”。For example, if a user's first query request is "Which has higher sales, product AA or product BB?", then terminal device 110 splits the first query request into a first sub-request of "sales of product AA" and a second sub-request of "sales of product BB". Terminal device 110 determines the first sub-response based on the first sub-request as "sales of product AA is XXX", and the second sub-response of the second sub-request as "sales of product BB is XXXX".
终端设备110根据第一子应答“产品AA的销量为XXX”和第二子应答“产品BB的销量为XXXX”,更新第一查询请求对应的第三子请求为“哪个更高”。最终,终端设备110根据第三子请求“哪个更高”,确定第三子应答,以生成第二应答。在此,可以调用搜索系统和/或语言模型来处理各个子请求。例如,可以调用搜索系统来分别确定产品AA的销量XXX和BB的销量XXXX,可以调用具有推理能力的语言模型来比较销量XXX和XXXX,进而生成第二应答。Terminal device 110 updates the third sub-request corresponding to the first query request to "Which is higher?" based on the first sub-response "Sales volume of product AA is XXX" and the second sub-response "Sales volume of product BB is XXXX". Finally, terminal device 110 determines the third sub-response based on the third sub-request "Which is higher?" to generate the second response. Here, a search system and/or a language model can be invoked to process each sub-request. For example, a search system can be invoked to determine the sales volume of product AA (XXX) and product BB (XXXX) respectively, and a language model with reasoning capabilities can be invoked to compare sales volumes XXX and XXXX, thereby generating the second response.
应当理解,尽管上文仅以并行关系、串行关系和组合关系为示例描述了多个子请求之间的逻辑关系。可以存在更为复杂的逻辑关系,例如,某个子请求可以被进一步拆分为具有并行关系、串行关系、或者组合关系的多个更小的子请求。以此方式,拆分模型可以将复杂查询请求转换为可执行的子请求,可以通过以更为合理的方式执行各个子请求来实现推理能力,从而获得更加符合用户预期的应答。It should be understood that although the above only uses parallel, serial, and combined relationships as examples to describe the logical relationships between multiple sub-requests, more complex logical relationships can exist. For example, a sub-request can be further broken down into multiple smaller sub-requests with parallel, serial, or combined relationships. In this way, the decomposition model can transform complex query requests into executable sub-requests, and reasoning capabilities can be achieved by executing each sub-request in a more reasonable manner, thereby obtaining a response that better meets user expectations.
在一些实施例中,终端设备110在确定第一查询请求相关联的多个子请求后,还可以根据查询请求确定用户的潜在查询请求。在一些实施例中,用户的潜在查询请求指示用户在第一查询请求之后,将要 发出的后续查询请求。In some embodiments, after determining the multiple sub-requests associated with the first query request, the terminal device 110 may further determine the user's potential query request based on the query request. In some embodiments, the user's potential query request indicates what the user will do after the first query request. Subsequent query requests were issued.
例如,如果用户的第一查询请求为“今年A市的樱花在什么时间盛开?且最佳的旅游时间是什么时候?”,则终端设备110可以确定潜在查询请求:用户出行方式、用户居住地方等等。在一些示例中,终端设备110可以基于用户的潜在查询请求,进行应答。例如,终端设备110可以为用户推荐到达A市的机票、高铁票、在A市方便看樱花的酒店、民宿等等。由此,通过此种方式可以满足用户相关的复杂搜索的需求。For example, if a user's initial query is "When do the cherry blossoms in City A bloom this year? And what is the best time to visit?", then terminal device 110 can determine potential query requests: the user's travel method, the user's place of residence, etc. In some examples, terminal device 110 can respond based on the user's potential query requests. For example, terminal device 110 can recommend air tickets, high-speed rail tickets to City A, hotels, guesthouses, etc., that are convenient for cherry blossom viewing in City A. Thus, this method can satisfy the user's complex search needs.
在一些实施例中,终端设备110在对话交互应用中的第一查询模式(例如,常规查询模式)下,提供用于启动第二查询模式(例如,专家查询模式)的启动控件。然后,终端设备110响应于接收到针对启动控件的用户操作,执行本公开用于处理查询请求的方法。In some embodiments, in a first query mode (e.g., a regular query mode) of a dialog interaction application, the terminal device 110 provides a launch control for initiating a second query mode (e.g., an expert query mode). Then, in response to receiving a user operation on the launch control, the terminal device 110 executes the method disclosed herein for processing query requests.
因此,为便于理解下文将参考图3A至图3D,以及图4A至图4H描述用户(也可称为用户140)与终端设备110的交互过程。图3A至3D示出了根据本公开的一些实施例的处理查询请求的相关示例界面301至304的示意图。以下为便于讨论将参考图1进行描述。Therefore, for ease of understanding, the interaction process between the user (also referred to as user 140) and the terminal device 110 will be described below with reference to Figures 3A to 3D, and Figures 4A to 4H. Figures 3A to 3D show schematic diagrams of example interfaces 301 to 304 related to processing query requests according to some embodiments of this disclosure. The following description will refer to Figure 1 for ease of discussion.
在一些实施例中,终端设备110在对话交互应用中提供用于启动专家查询模式的启动控件。如果用户140点击终端设备110提供的启动控件,终端设备110将基于用户140的查询请求,执行本公开用于处理查询请求的方法。在一些实施例中,如果用户140未点击终端设备110提供的启动控件,终端设备110将基于用户140的查询请求,进行常规查询。以此方式,可以基于用户期望的查询模式来执行后续查询过程。In some embodiments, terminal device 110 provides a launch control for initiating an expert query mode in a dialog-based interactive application. If user 140 clicks the launch control provided by terminal device 110, terminal device 110 will execute the method disclosed herein for processing query requests based on user 140's query request. In some embodiments, if user 140 does not click the launch control provided by terminal device 110, terminal device 110 will perform a regular query based on user 140's query request. In this way, subsequent query processes can be executed based on the user's desired query mode.
如图3A所示示例界面301,终端设备110响应于用户140点击启动控件后,针对用户的第一查询请求310进行查询。在一些实施例中,终端设备110在对话式交互应用中呈现中间应答区域311。中间应答区域311可以用于指示终端设备110的查询过程。终端设备110的查询过程可以以卡片形式呈现在页面中。终端设备110将其查询过程呈现在页面中,可使用户有更直观的感知终端设备110的查询过程。 As shown in the example interface 301 of Figure 3A, in response to user 140 clicking the start control, terminal device 110 performs a query based on the user's first query request 310. In some embodiments, terminal device 110 presents an intermediate response area 311 in a conversational interactive application. The intermediate response area 311 can be used to indicate the query process of terminal device 110. The query process of terminal device 110 can be presented on the page in the form of cards. By presenting its query process on the page, terminal device 110 allows users to have a more intuitive understanding of the query process.
在一些实施例中,中间应答区域311包括第二查询请求和第二查询应答。如图3A至3C所示示例界面301至303,终端设备110响应于来自用户140的第一查询请求310,且第一查询请求310对应的第一清晰度不满足预定条件。此时,终端设备110通过对第一查询请求进行语义、和/或文本分析,将第一查询请求310拆分为第二查询请求312,并在页面301中呈现第二查询请求312。终端设备110在页面301中呈现第二查询请求312所包括多个子请求,例如,子请求312-1、子请求312-2,等等。In some embodiments, the intermediate response area 311 includes a second query request and a second query response. As shown in the example interfaces 301 to 303 of Figures 3A to 3C, the terminal device 110 responds to a first query request 310 from user 140, and the first clarity corresponding to the first query request 310 does not meet a predetermined condition. At this time, the terminal device 110 performs semantic and/or text analysis on the first query request, splitting the first query request 310 into a second query request 312, and presenting the second query request 312 on page 301. The terminal device 110 presents multiple sub-requests included in the second query request 312 on page 301, such as sub-request 312-1, sub-request 312-2, etc.
随后,终端设备110根据第二查询请求312确定第二应答321,并在页面302中呈现第二应答321。在一些实施例中,终端设备110根据第二查询请求312包括的多个子请求中的每个子请求,分别生成其对应的子应答。例如,子请求312-1对应的子应答321-1、子请求312-2对应的子应答321-2。终端设备110根据子应答,生成并在页面302呈现第二应答321。最后,终端设备110根据第二应答321生成第一查询请求310的第一应答331,并在页面303呈现第一应答331。在上文已详细描述终端设备110根据第二查询请求312,生成第二应答321,在此将不在重复叙述。Subsequently, terminal device 110 determines the second response 321 according to the second query request 312 and presents the second response 321 on page 302. In some embodiments, terminal device 110 generates a corresponding sub-response for each of the multiple sub-requests included in the second query request 312. For example, sub-response 321-1 corresponds to sub-request 312-1, and sub-response 321-2 corresponds to sub-request 312-2. Terminal device 110 generates and presents the second response 321 on page 302 based on the sub-responses. Finally, terminal device 110 generates the first response 331 of the first query request 310 based on the second response 321 and presents the first response 331 on page 303. The process of terminal device 110 generating the second response 321 according to the second query request 312 has been described in detail above and will not be repeated here.
在一些实施例中,终端设备110响应于确定第一应答已经被生成,在对话式交互应用中隐藏中间应答区域。如图3D所示示例界面304,如果第一应答331已经被生成,终端设备110在区域340中可以隐藏中间应答区域。以此方式,可以以更为突出的方式来呈现最终的查询应答(也即,第一应答331)。In some embodiments, in response to determining that a first response has been generated, terminal device 110 hides the intermediate response area in a conversational interactive application. As shown in example interface 304 of FIG3D, if a first response 331 has been generated, terminal device 110 may hide the intermediate response area in area 340. In this way, the final query response (i.e., the first response 331) can be presented in a more prominent manner.
在一些示例中,终端设备110为用户140提供隐藏控件341,以供用户140展开中间应答区域。例如,在终端设备110生成第一应答331后,终端设备110将中间应答区域隐藏。此时,如果用户点击隐藏控件341,终端设备110展开中间应答区域。随后,如果再次点击隐藏控件341,终端设备110将再次隐藏中间应答区域。以此方式,可以便于用户查看获得最终的查询应答的过程和数据来源。In some examples, terminal device 110 provides user 140 with a hidden control 341 to allow user 140 to expand the intermediate response area. For instance, after terminal device 110 generates the first response 331, it hides the intermediate response area. If the user then clicks the hidden control 341, terminal device 110 expands the intermediate response area. Subsequently, if the user clicks the hidden control 341 again, terminal device 110 hides the intermediate response area again. This allows the user to easily view the process of obtaining the final query response and the data source.
上文描述了终端设备110基于用户对启动控件的操作,执行本公 开用于处理查询请求的方案。进一步,在用户的查询请求不够清晰的情况下,终端设备110可以在一轮或者多轮中提供提示信息,进而便于用户细化查询请求。The above describes how terminal device 110 executes this procedure based on user operations on the startup control. A solution for handling query requests is provided. Furthermore, when a user's query request is not clear enough, the terminal device 110 can provide prompts in one or more rounds, thereby making it easier for the user to refine their query request.
在一些实施例中,终端设备110可以先确定与第一查询请求相关联的多个维度。随后,终端设备110分别基于多个维度来提供提示信息。例如,如果用户140的第一查询请求为“今年上半年有哪些演唱会”,则终端设备110确定与第一查询请求相关联的多个维度可以为语言:中文、英文,分类:歌手、组合,举办城市:B城市、C城市,风格:摇滚、流行、古典,等等。In some embodiments, terminal device 110 may first determine multiple dimensions associated with the first query request. Then, terminal device 110 provides prompts based on each of these multiple dimensions. For example, if user 140's first query request is "What concerts are happening in the first half of this year?", terminal device 110 determines that the multiple dimensions associated with the first query request could be: language (Chinese, English), category (singer, group), host city (city B, city C), style (rock, pop, classical), etc.
以下首先描述终端设备110在一轮中提供提示信息的场景下用于处理查询请求的方法。在一些实施例中,终端设备110还可以提供用于细化第一查询请求的第一提示信息。然后,终端设备110响应于接收到针对第一提示信息的第一反馈,基于第一反馈生成第二查询请求。The following first describes a method for processing a query request in a scenario where the terminal device 110 provides prompt information in one round. In some embodiments, the terminal device 110 may also provide first prompt information to refine the first query request. Then, in response to receiving first feedback on the first prompt information, the terminal device 110 generates a second query request based on the first feedback.
在一些示例中,终端设备110可以在一轮中提供用于细化第一查询请求的第一提示信息。终端设备110在页面中呈现第一提示信息,第一提示信息包括多个细化问题。例如,如果用户140的第一查询请求为“今年上半年有哪些演唱会”,终端设备110向用户提供的第一提示信息可以包括的细化问题为“请问您想要听什么语言的演唱会”。终端设备110针对细化问题向用户提供的选项可以为中文、英文、意大利语,等等,以供用户140选择。In some examples, terminal device 110 may provide initial prompts in a single round to refine the initial query request. Terminal device 110 presents the initial prompts on a page, which include multiple refinement questions. For example, if user 140's initial query is "What concerts are happening in the first half of this year?", the initial prompts provided by terminal device 110 could include the refinement question "What language of concert would you like to attend?". The options provided by terminal device 110 for the refinement questions could be Chinese, English, Italian, etc., for user 140 to choose from.
然后,终端设备110根据用户140对第一提示信息的反馈生成第二查询请求。例如,继续上述例子,如果用户140选择中文,则终端设备110根据用户140的选择,生成第二查询请求“今年上半年的中文演唱会有哪些”。最终,终端设备110根据第二查询请求的第二应答生成第一应答。Then, terminal device 110 generates a second query request based on user 140's feedback to the first prompt. For example, continuing the above example, if user 140 selects Chinese, terminal device 110 generates a second query request, "What are the Chinese concerts in the first half of this year?", based on user 140's selection. Finally, terminal device 110 generates a first response based on the second response to the second query request.
备选地和/或附加地,可以在多个轮次中逐渐细化查询请求。以下参考图4A至图4H描述终端设备110在多轮中提供提示信息的场景下,用于处理查询请求的方法。图4A至图4H示出了根据本公开的另一些实施例的用于处理查询请求的相关示例界面400A至400H的 示意图。Alternatively and/or additionally, the query request can be progressively refined over multiple rounds. The following description, with reference to Figures 4A to 4H, illustrates a method for processing a query request using terminal device 110 in a scenario where prompts are provided over multiple rounds. Figures 4A to 4H show relevant example interfaces 400A to 400H for processing query requests according to other embodiments of this disclosure. Schematic diagram.
在一些实施例中,如果终端设备110确定第二查询请求不可用于生成针对第一查询请求的第一应答,则提供用于细化第一查询请求的第二提示信息。然后,终端设备110响应于接收到针对第二提示信息的第二反馈,根据第二反馈生成第二查询请求。换言之,如果机器学习模型认为细化后的第二查询请求仍然不够清晰,则可以在更多轮次中提供更多的提示信息,以便进一步细化查询请求。In some embodiments, if the terminal device 110 determines that the second query request cannot be used to generate a first response to the first query request, it provides second hints to refine the first query request. Then, in response to receiving second feedback on the second hints, the terminal device 110 generates a second query request based on the second feedback. In other words, if the machine learning model deems the refined second query request still insufficiently clear, it can provide more hints in more rounds to further refine the query request.
在一些示例中,如果终端设备110确定第二查询请求的第二清晰度不满足预定条件,则将提供多轮的提示信息,直到第二清晰度满足预定条件。终端设备110根据用户140对多轮提示信息中每一轮提示信息的反馈,生成第二查询请求。然后终端设备110根据第二查询请求的第二应答,生成第一应答。In some examples, if terminal device 110 determines that the second resolution of the second query request does not meet predetermined conditions, it will provide multiple rounds of prompts until the second resolution meets the predetermined conditions. Terminal device 110 generates a second query request based on user 140's feedback to each round of prompts. Then, terminal device 110 generates a first response based on the second response to the second query request.
在一些示例中,终端设备110可以调用机器学习模型训练一个反问意图和多轮处理的细化模型。如果终端设备110确定用户的第一查询请求的清晰度不满足预定条件,则可以利用细化模型对用户进行多轮的反问,以达到针对用户的第一查询信息,能够为用户提供更精确的信息。In some examples, terminal device 110 can invoke a machine learning model to train a refined model of query intent and multi-round processing. If terminal device 110 determines that the clarity of the user's first query request does not meet predetermined conditions, it can use the refined model to conduct multiple rounds of queries against the user to provide more accurate information to the user based on the first query.
如图4A至图4H所示示例界面400A至400H,如果第一查询请求410为“电脑怎么突然出现故障了”,终端设备110确定第一查询请求410的清晰度不满足预定条件,则向用户140提供针对细化第一查询请求410的提示信息411,并呈现在中间应答区域311中。提示信息411包括第一个问题412“请问您的电脑的具体品牌是什么?”,并且终端设备110向用户提供选项(例如,A品牌、B品牌、C品牌),以供用户140选择。As shown in the example interfaces 400A to 400H in Figures 4A to 4H, if the first query request 410 is "Why is my computer suddenly malfunctioning?", and the terminal device 110 determines that the clarity of the first query request 410 does not meet the predetermined conditions, then it provides the user 140 with a prompt message 411 that refines the first query request 410, and displays it in the intermediate response area 311. The prompt message 411 includes the first question 412 "What is the specific brand of your computer?", and the terminal device 110 provides the user with options (e.g., brand A, brand B, brand C) for the user 140 to choose from.
如果用户140选择B品牌421,则终端设备110可以根据用户140的反馈,生成查询请求。如果终端设备110确定查询请求对应的清晰度还不满足预定条件,则继续向用户140提供针对细化第一查询请求410的提示信息430,并呈现在中间应答区域311中。提示信息430包括第二个问题431“请问您的电脑的型号是什么?”,并且终端设 备110向用户提供选项(例如,型号X、型号XXX、型号XXXXXX),以供用户140选择。If user 140 selects brand B 421, terminal device 110 can generate a query request based on user 140's feedback. If terminal device 110 determines that the resolution corresponding to the query request does not yet meet the predetermined conditions, it will continue to provide user 140 with a prompt message 430 for refining the first query request 410, which will be displayed in the intermediate response area 311. The prompt message 430 includes a second question 431, "What is the model of your computer?", and the terminal device... The backup 110 provides the user with options (e.g., model X, model XXX, model XXXXXX) for the user 140 to choose from.
如果用户140选择型号X 441,则终端设备110可以根据用户140的反馈,生成查询请求。如果终端设备110确定查询请求对应的清晰度仍然不满足预定条件,则继续向用户140提供针对细化第一查询请求410的提示信息450。提示信息450包括第三个问题451“请问您的电脑的具体故障表现是什么?”,并且终端设备110向用户提供选项(例如,无法开机、运行缓慢、出现蓝屏),以供用户140选择。If user 140 selects model X 441, terminal device 110 can generate a query request based on user 140's feedback. If terminal device 110 determines that the resolution corresponding to the query request still does not meet the predetermined conditions, it continues to provide user 140 with prompt information 450 for refining the first query request 410. Prompt information 450 includes a third question 451, "What is the specific malfunction of your computer?", and terminal device 110 provides the user with options (e.g., unable to boot, running slowly, blue screen) for user 140 to choose from.
如果用户140选择无法开机461,则终端设备110可以根据用户140的反馈,生成查询请求。按照此种方式,提供多轮的提示信息,直至查询请求的清晰度满足预定条件,终端设备110根据用户140的所有反馈,生成第二查询请求。If user 140 selects "Cannot power on 461", then terminal device 110 can generate a query request based on user 140's feedback. In this manner, multiple rounds of prompts are provided until the clarity of the query request meets predetermined conditions. Based on all feedback from user 140, terminal device 110 generates a second query request.
在一些实施例中,终端设备110在为用户140提供提示信息时,还可以在中间应答区域311向用户140提供输入框471,以供用户140输入关于提示信息中包括的问题的反馈。In some embodiments, when providing prompt information to user 140, terminal device 110 may also provide input box 471 to user 140 in intermediate response area 311 for user 140 to input feedback on the questions included in the prompt information.
终端设备110根据第二查询请求对应的第二应答,生成第一查询请求410对应的第一应答481。在一些示例中,终端设备110还可以在中间应答区域311提供阅读回应对应的控件482。用户140点击阅读回应对应的控件482,终端设备110将呈现其生成的第一应答。Based on the second response corresponding to the second query request, terminal device 110 generates a first response 481 corresponding to the first query request 410. In some examples, terminal device 110 may also provide a control 482 for reading the response in the intermediate response area 311. When user 140 clicks the control 482 for reading the response, terminal device 110 will display the first response it generated.
综上,本公开可以利用拆分模型和/或细化模型来处理不够清晰的用户查询,并且通过推理、拆分、细化等方式来获得更为清晰地描述用户需求的查询请求。此时,获得的查询请求能够更加准确地满足用户的查询需求,从而为用户提供更精确的信息。In summary, this disclosure can utilize splitting and/or refining models to handle unclear user queries, and through reasoning, splitting, and refining, obtain query requests that more clearly describe user needs. In this case, the obtained query requests can more accurately meet the user's query requirements, thereby providing the user with more precise information.
示例装置和设备Example devices and equipment
本公开的实施例还提供了用于实现上述方法或过程的相应装置。图5示出了根据本公开的一些实施例的用于处理查询请求的装置500的示意性结构框图。装置500可以被实现为或者被包括在终端设备110中。装置500中的各个模块/组件可以由硬件、软件、固件或者它 们的任意组合来实现。Embodiments of this disclosure also provide corresponding apparatus for implementing the above-described methods or processes. Figure 5 shows a schematic structural block diagram of an apparatus 500 for processing query requests according to some embodiments of this disclosure. The apparatus 500 may be implemented as or included in the terminal device 110. The various modules/components in the apparatus 500 may be hardware, software, firmware, or other components. It can be achieved through any combination of them.
如图5所示,装置500包括确定模块510,被配置为确定模块,响应于接收到来自用户的第一查询请求,确定所述第一查询请求是否可用于生成针对所述第一查询请求的第一应答。装置500还包括请求生成模块520,被配置为响应于确定所述第一查询请求不可用于生成针对所述第一查询请求的所述第一应答,基于所述第一查询请求生成第二查询请求,所述第二查询请求可用于生成针对所述第一查询请求的所述第一应答。装置500还包括获取模块530,被配置为获取针对所述第二查询请求的第二应答。装置500还包括应答生成模块540,被配置为基于所述第二应答来生成针对所述第一查询请求的所述第一应答。As shown in Figure 5, the device 500 includes a determining module 510 configured to, in response to receiving a first query request from a user, determine whether the first query request can be used to generate a first response to the first query request. The device 500 also includes a request generating module 520 configured to, in response to determining that the first query request cannot be used to generate the first response to the first query request, generate a second query request based on the first query request, wherein the second query request can be used to generate the first response to the first query request. The device 500 further includes an acquiring module 530 configured to acquire a second response to the second query request. The device 500 also includes a response generating module 540 configured to generate the first response to the first query request based on the second response.
在一些实施例中,确定模块510,还被配置为确定第一查询请求是否可用于生成针对第一查询请求的第一应答包括基于以下至少任一项来确定第一查询请求是否可用于生成针对第一查询请求的第一应答:基于针对第一查询请求的语义分析;或者基于针对第一查询请求的文本分析。In some embodiments, the determining module 510 is further configured to determine whether a first query request can be used to generate a first response to the first query request, including determining whether a first query request can be used to generate a first response to the first query request based on at least one of the following: based on semantic analysis of the first query request; or based on text analysis of the first query request.
在一些实施例中,请求生成模块520,还被配置为确定与第一查询请求相关联的多个子请求;以及基于多个子请求来生成第二查询请求。In some embodiments, the request generation module 520 is further configured to determine a plurality of sub-requests associated with the first query request; and to generate a second query request based on the plurality of sub-requests.
在一些实施例中,获取模块530,还被配置为确定多个子请求之间的逻辑关系;以及按照逻辑关系来执行多个子请求,以便获取第二应答。In some embodiments, the acquisition module 530 is further configured to determine a logical relationship between a plurality of sub-requests; and to execute the plurality of sub-requests according to the logical relationship in order to acquire a second response.
在一些实施例中,装置500还包括应答生成模块,被配置为响应于确定逻辑关系指示并行关系,分别获取针对多个子请求的多个子应答;以及基于多个子应答来生成第二应答。In some embodiments, the apparatus 500 further includes a response generation module configured to, in response to determining a logical relationship indicating a parallel relationship, acquire multiple sub-responses for multiple sub-requests respectively; and generate a second response based on the multiple sub-responses.
在一些实施例中,应答生成模块还被配置为响应于确定逻辑关系指示串行关系,获取针对多个子请求中的第一子请求的第一子应答;以及基于第一子应答来更新多个子请求中的第二子请求;以及基于针对更新的第二子请求的第二子应答,生成第二应答。 In some embodiments, the response generation module is further configured to, in response to determining a logical relationship indicating a serial relationship, obtain a first sub-response for a first sub-request among a plurality of sub-requests; update a second sub-request among the plurality of sub-requests based on the first sub-response; and generate a second response based on the second sub-response for the updated second sub-request.
在一些实施例中,应答生成模块还被配置为响应于确定逻辑关系指示组合关系,分别获取针对多个子请求中的第一子请求的第一子应答和针对多个子请求中的第二子请求的第二子应答,第一子请求与第二子请求之间存在并行关系,并且多个子请求中的第三子请求与第一子请求、第二子请求之间存在串行关系;基于第一子应答和第二子应答来更新第三子请求;以及基于针对更新的第三子请求的第三子应答,生成第二应答。In some embodiments, the response generation module is further configured to, in response to determining the logical relationship indicating the combination relationship, obtain a first sub-response for a first sub-request among a plurality of sub-requests and a second sub-response for a second sub-request among a plurality of sub-requests, wherein there is a parallel relationship between the first sub-request and the second sub-request, and there is a serial relationship between a third sub-request among a plurality of sub-requests and the first sub-request and the second sub-request; update the third sub-request based on the first sub-response and the second sub-response; and generate a second response based on the third sub-response for the updated third sub-request.
在一些实施例中,请求生成模块520还包括请求确定模块,被配置为基于查询请求确定用户的潜在查询请求,潜在查询请求指示由用户在第一查询请求之后将要发出的后续查询请求。In some embodiments, the request generation module 520 further includes a request determination module configured to determine a user’s potential query requests based on the query request, the potential query requests indicating subsequent query requests that the user will issue after the first query request.
在一些实施例中,装置500还包括执行模块,被配置为在对话式交互应用中的第一查询模式下,提供用于启动第二查询模式的启动控件;以及响应于接收到针对启动控件的用户操作,调用确定模块510。In some embodiments, the apparatus 500 further includes an execution module configured to provide a launch control for initiating a second query mode in a first query mode of a conversational interactive application; and to invoke a determination module 510 in response to receiving a user operation on the launch control.
在一些实施例中,装置500还包括区域隐藏模块,被配置为在对话式交互应用中呈现中间应答区域,中间应答区域包括第二查询请求和第二应答;以及响应于确定第一应答已经被生成,在对话式交互应用中隐藏中间应答区域。In some embodiments, the device 500 further includes a region hiding module configured to present an intermediate response region in a conversational interactive application, the intermediate response region including a second query request and a second response; and to hide the intermediate response region in the conversational interactive application in response to determining that a first response has been generated.
在一些实施例中,请求生成模块520,还被配置为提供用于细化第一查询请求的第一提示信息;以及响应于接收到针对第一提示信息的第一反馈,基于第一反馈生成第二查询请求。In some embodiments, the request generation module 520 is further configured to provide first prompt information for refining the first query request; and in response to receiving first feedback on the first prompt information, to generate a second query request based on the first feedback.
在一些实施例中,请求生成模块520,还被配置为响应于确定不可用于生成针对第一查询请求的第一应答,提供用于细化第一查询请求的第二提示信息;以及响应于接收到针对第二提示信息的第二反馈,基于第二反馈生成第二查询请求。In some embodiments, the request generation module 520 is further configured to provide second prompt information for refining the first query request in response to determining that it cannot be used to generate a first response to the first query request; and to generate a second query request based on the second feedback in response to receiving the second prompt information.
在一些实施例中,请求生成模块520还包括信息提供模块,被配置为确定与第一查询请求相关联的多个维度;以及分别基于多个维度来提供提示信息。In some embodiments, the request generation module 520 further includes an information providing module configured to determine multiple dimensions associated with the first query request; and to provide prompt information based on the multiple dimensions respectively.
装置500中所包括的单元和/或模块可以利用各种方式来实现,包括软件、硬件、固件或其任意组合。在一些实施例中,一个或多个单 元和/或模块可以使用软件和/或固件来实现,例如存储在存储介质上的机器可执行指令。除了机器可执行指令之外或者作为替代,装置500中的部分或者全部单元和/或模块可以至少部分地由一个或多个硬件逻辑组件来实现。作为示例而非限制,可以使用的示范类型的硬件逻辑组件包括现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准品(ASSP)、片上系统(SOC)、复杂可编程逻辑器件(CPLD),等等。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 Elements and/or modules may 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 elements and/or modules in device 500 may be implemented at least partially by one or more hardware logic components. By way of example and not limitation, exemplary types of hardware logic components that may 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 so on.
应当理解,以上方法中的一个或多个步骤可以由适当的电子设备或电子设备的组合来执行。这样的电子设备或电子设备的组合例如可以包括图1中的终端设备110。It should be understood that one or more steps in the above methods can be performed by suitable electronic devices or combinations of electronic devices. Such electronic devices or combinations of electronic devices may, for example, include the terminal device 110 in FIG1.
图6示出了其中可以实施本公开的一个或多个实施例的电子设备600的框图。应当理解,图6所示出的电子设备600仅仅是示例性的,而不应当构成对本文所描述的实施例的功能和范围的任何限制。图6所示出的电子设备600可以用于实现图1的终端设备110。Figure 6 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 Figure 6 is merely exemplary and should not constitute any limitation on the functionality and scope of the embodiments described herein. The electronic device 600 shown in Figure 6 can be used to implement the terminal device 110 of Figure 1.
如图6所示,电子设备600是通用电子设备的形式。电子设备600的组件可以包括但不限于一个或多个处理器或处理单元610、存储器620、存储设备630、一个或多个通信单元640、一个或多个输入设备650以及一个或多个输出设备660。处理单元610可以是实际或虚拟处理器并且能够根据存储器620中存储的程序来执行各种处理。在多处理器系统中,多个处理单元并行执行计算机可执行指令,以提高电子设备600的并行处理能力。As shown in Figure 6, the electronic device 600 is in the form of a general-purpose electronic device. Components of the 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. The processing unit 610 may be a physical or virtual processor and is capable of performing various processes according to programs stored in memory 620. In a multiprocessor system, multiple processing units execute computer-executable instructions in parallel to improve the parallel processing capability of the electronic device 600.
电子设备600通常包括多个计算机存储介质。这样的介质可以是电子设备600可访问的任何可以获得的介质,包括但不限于易失性和非易失性介质、可拆卸和不可拆卸介质。存储器620可以是易失性存储器(例如寄存器、高速缓存、随机访问存储器(RAM))、非易失性存储器(例如,只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、闪存)或它们的某种组合。存储设备630可以是可拆卸或不可拆卸的介质,并且可以包括机器可读介质,诸如闪存驱动、磁盘或者任何其他介质,其可以能够用于存储信息和/或数据并且可以 在电子设备600内被访问。Electronic device 600 typically includes multiple computer storage media. Such media can be any available media accessible to electronic device 600, including but not limited to volatile and non-volatile media, removable and non-removable media. Memory 620 can be volatile memory (e.g., registers, cache, random access memory (RAM)), non-volatile memory (e.g., read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. Storage device 630 can be removable or non-removable media and may include machine-readable media, such as flash drives, disks, or any other media capable of storing information and/or data. Accessed within electronic device 600.
电子设备600可以进一步包括另外的可拆卸/不可拆卸、易失性/非易失性存储介质。尽管未在图6中示出,可以提供用于从可拆卸、非易失性磁盘(例如“软盘”)进行读取或写入的磁盘驱动和用于从可拆卸、非易失性光盘进行读取或写入的光盘驱动。在这些情况中,每个驱动可以由一个或多个数据介质接口被连接至总线(未示出)。存储器620可以包括计算机程序产品625,其具有一个或多个程序模块,这些程序模块被配置为执行本公开的各种实施例的各种方法或动作。Electronic device 600 may further include additional removable/non-removable, volatile/non-volatile storage media. Although not shown in FIG. 6, disk drives for reading from or writing to removable, non-volatile disks (e.g., "floppy disks") and optical disk drives for reading from or writing to removable, non-volatile optical disks may be provided. In these cases, each drive may be connected to a bus (not shown) via one or more data media interfaces. Memory 620 may include computer program product 625 having one or more program modules configured to perform various methods or actions of various embodiments of the present disclosure.
通信单元640实现通过通信介质与其他电子设备进行通信。附加地,电子设备600的组件的功能可以以单个计算集群或多个计算机器来实现,这些计算机器能够通过通信连接进行通信。因此,电子设备600可以使用与一个或多个其他服务器、网络个人计算机(PC)或者另一个网络节点的逻辑连接来在联网环境中进行操作。The communication unit 640 enables communication with other electronic devices via a communication medium. Additionally, the functionality of the components of the electronic device 600 can be implemented using a single computing cluster or multiple computing machines capable of communicating via communication connections. Therefore, the electronic device 600 can operate in a networked environment using logical connections to one or more other servers, network personal computers (PCs), or another network node.
输入设备650可以是一个或多个输入设备,例如鼠标、键盘、追踪球等。输出设备660可以是一个或多个输出设备,例如显示器、扬声器、打印机等。电子设备600还可以根据需要通过通信单元640与一个或多个外部设备(未示出)进行通信,外部设备诸如存储设备、显示设备等,与一个或多个使得用户与电子设备600交互的设备进行通信,或者与使得电子设备600与一个或多个其他电子设备通信的任何设备(例如,网卡、调制解调器等)进行通信。这样的通信可以经由输入/输出(I/O)接口(未示出)来执行。Input device 650 can be one or more input devices, such as a mouse, keyboard, trackball, etc. Output device 660 can be one or more output devices, such as a monitor, speaker, printer, etc. Electronic device 600 can also communicate with one or more external devices (not shown) via communication unit 640 as needed. These external devices include storage devices, display devices, etc., and can communicate with one or more devices that enable user interaction with electronic device 600, or with any device that enables electronic device 600 to communicate with one or more other electronic devices (e.g., network card, modem, etc.). Such communication can be performed via input/output (I/O) interface (not shown).
根据本公开的示例性实施例,提供了一种计算机可读存储介质,其上存储有计算机可执行指令,其中计算机可执行指令被处理器执行以实现上文描述的方法。根据本公开的示例性实施例,还提供了一种计算机程序产品,计算机程序产品被有形地存储在非瞬态计算机可读介质上并且包括计算机可执行指令,而计算机可执行指令被处理器执行以实现上文描述的方法。According to exemplary embodiments of the present disclosure, a computer-readable storage medium is provided that stores computer-executable instructions thereon, wherein the computer-executable instructions are executed by a processor to implement the methods described above. According to exemplary embodiments 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, which are executed by a processor to implement the methods described above.
这里参照根据本公开实现的方法、装置、设备和计算机程序产品 的流程图和/或框图描述了本公开的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。Reference is made herein to methods, apparatus, devices, and computer program products implemented according to this disclosure. The flowcharts and/or block diagrams describe various aspects of this disclosure. It should be understood that each block of the flowcharts and/or block diagrams, as well as combinations of blocks in the flowcharts and/or block diagrams, can be implemented by computer-readable program instructions.
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其他可编程数据处理装置的处理单元,从而生产出一种机器,使得这些指令在通过计算机或其他可编程数据处理装置的处理单元执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。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 apparatus to produce a machine such that, when executed by the processing unit of the computer or other programmable data processing apparatus, they create means for implementing the functions/actions specified in one or more blocks of the flowchart and/or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and/or other device to operate in a particular manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions/actions specified in one or more blocks of the flowchart and/or block diagram.
可以把计算机可读程序指令加载到计算机、其他可编程数据处理装置、或其他设备上,使得在计算机、其他可编程数据处理装置或其他设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其他可编程数据处理装置、或其他设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions that execute on the computer, other programmable data processing apparatus, or other device to perform the functions/actions specified in one or more boxes of a flowchart and/or block diagram.
附图中的流程图和框图显示了根据本公开的多个实现的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction, which contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and/or flowcharts, and combinations of blocks in the block diagrams and/or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
以上已经描述了本公开的各实现,上述说明是示例性的,并非穷 尽性的,并且也不限于所公开的各实现。在不偏离所说明的各实现的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实现的原理、实际应用或对市场中的技术的改进,或者使本技术领域的其他普通技术人员能理解本文公开的各个实施例。 The various implementations of this disclosure have been described above. The above description is exemplary and not exhaustive. The embodiments described herein are exhaustive and not limited to those disclosed. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical applications, or improvements to technology in the market, or to enable others skilled in the art to understand the various embodiments disclosed herein.
Claims (17)
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2024/091930 WO2025231710A1 (en) | 2024-05-09 | 2024-05-09 | Method and apparatus for processing query request, device and storage medium |
| CN202480002158.4A CN119213419A (en) | 2024-05-09 | 2024-05-09 | Method, device, equipment and storage medium for processing query request |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2024/091930 WO2025231710A1 (en) | 2024-05-09 | 2024-05-09 | Method and apparatus for processing query request, device and storage medium |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2025231710A1 true WO2025231710A1 (en) | 2025-11-13 |
Family
ID=94074427
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2024/091930 Pending WO2025231710A1 (en) | 2024-05-09 | 2024-05-09 | Method and apparatus for processing query request, device and storage medium |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN119213419A (en) |
| WO (1) | WO2025231710A1 (en) |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115114424A (en) * | 2022-07-14 | 2022-09-27 | 北京百度网讯科技有限公司 | Response method and device for query request |
| US20230316000A1 (en) * | 2022-04-05 | 2023-10-05 | Nvidia Corporation | Generation of conversational responses using neural networks |
| CN117743546A (en) * | 2023-12-20 | 2024-03-22 | 京东城市(北京)数字科技有限公司 | Method, apparatus, device and readable medium for question and answer |
| CN117908736A (en) * | 2024-01-24 | 2024-04-19 | 北京字跳网络技术有限公司 | Interaction method, device, equipment and storage medium |
-
2024
- 2024-05-09 WO PCT/CN2024/091930 patent/WO2025231710A1/en active Pending
- 2024-05-09 CN CN202480002158.4A patent/CN119213419A/en active Pending
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20230316000A1 (en) * | 2022-04-05 | 2023-10-05 | Nvidia Corporation | Generation of conversational responses using neural networks |
| CN115114424A (en) * | 2022-07-14 | 2022-09-27 | 北京百度网讯科技有限公司 | Response method and device for query request |
| CN117743546A (en) * | 2023-12-20 | 2024-03-22 | 京东城市(北京)数字科技有限公司 | Method, apparatus, device and readable medium for question and answer |
| CN117908736A (en) * | 2024-01-24 | 2024-04-19 | 北京字跳网络技术有限公司 | Interaction method, device, equipment and storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN119213419A (en) | 2024-12-27 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US20230273923A1 (en) | Generating and/or utilizing a machine learning model in response to a search request | |
| US8984012B2 (en) | Self-tuning alterations framework | |
| US20220043810A1 (en) | Reinforcement learning techniques to improve searching and/or to conserve computational and network resources | |
| US12437012B2 (en) | Autonomously providing search results post-facto, including in assistant context | |
| US8972388B1 (en) | Demotion of already observed search query completions | |
| US9594838B2 (en) | Query simplification | |
| US10970293B2 (en) | Ranking search result documents | |
| US20100318567A1 (en) | Use of data patterns for rapid search of complex rules in a rules-based search engine | |
| WO2024240105A1 (en) | Method and apparatus for information processing, and device and storage medium | |
| US8868591B1 (en) | Modifying a user query to improve the results | |
| JP2025526228A (en) | Aggregating information from different data feed services | |
| WO2024253682A1 (en) | Rendering suggestion for searching entity within application in response to determining the entity is associated with the application | |
| WO2025223030A1 (en) | Information processing method and apparatus, and device and storage medium | |
| WO2025223031A1 (en) | Information processing method and apparatus, and device and storage medium | |
| WO2025231710A1 (en) | Method and apparatus for processing query request, device and storage medium | |
| US20210073239A1 (en) | Method and system for ranking plurality of digital documents | |
| WO2017049767A1 (en) | Method and apparatus for generating query result | |
| US10978178B2 (en) | Systems and methods for providing a specificity-based network analysis algorithm for searching and ranking therapeutic molecules | |
| CN113535927A (en) | Method, medium, apparatus and computing device for obtaining similar text | |
| WO2025245698A1 (en) | Query method and apparatus, device, and storage medium | |
| WO2025199828A1 (en) | Query method and apparatus, device and storage medium | |
| WO2025108115A1 (en) | Data processing method and apparatus, device, and storage medium | |
| WO2025245697A1 (en) | Method and apparatus for processing image by using digital assistant, device, and storage medium | |
| WO2025245791A1 (en) | Method and apparatus for generating media content, device, and storage medium | |
| CN120470089A (en) | Processing method, device, electronic device and storage medium |