Method and apparatus for processing query request, device and storage medium

By using machine learning models to break down and refine user query requests in conversational interactive applications, the problem of unexpected query results in existing technologies is solved, and more accurate and efficient query result generation is achieved.

WO2025231710A1PCT designated stage Publication Date: 2025-11-13BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/091930
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-05-09
Publication Date
2025-11-13

AI Technical Summary

Technical Problem

Existing query systems struggle to accurately understand unclear user queries, resulting in query results that do not meet user expectations.

Method used

By using machine learning models to perform semantic analysis on user query requests in conversational interactive applications, the query requests are split and refined to generate a clearer second query request, and the corresponding response is obtained to generate the final query result.

Benefits of technology

It improves the accuracy and efficiency of query results, and can better meet users' query needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024091930_13112025_PF_FP_ABST
    Figure CN2024091930_13112025_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the embodiments of the present disclosure are a method and apparatus for processing a query request, a device and a storage medium. The method comprises: in response to receiving a first query request from a user, determining whether the first query request can be used for generating a first response to the first query request; in response to determining that the first query request cannot be used for generating a first response to the first query request, generating a second query request on the basis of the first query request, wherein the second query request can be used for generating a first response to the first query request; acquiring a second response to the second query request; and, on the basis of the second response, generating a first response to the first query request. Thus, decomposing or refining query requests of users to generate query requests of higher definition can more accurately meet the query requests of the users, providing more accurate information for the users.
Need to check novelty before this filing date? Find Prior Art

Description

Methods, apparatus, devices, and storage media for processing query requests Technical Field

[0001] 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. Background Technology

[0002] 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.

[0003] Summary of the Invention

[0004] 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.

[0005] In a second aspect of this disclosure, an apparatus for processing a query request 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 generate a second query request based on the first query request in response to determining that the first clarity of the first query request does not meet the predetermined conditions, wherein the second clarity of the second query request meets the predetermined conditions; a response acquisition module configured to acquire a second response to the second query request; and a response generation module configured to generate a first response to the first query request based on the second response.

[0006] 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.

[0007] 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.

[0008] 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.

[0009] 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. Attached Figure Description

[0010] 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:

[0011] Figure 1 shows a schematic diagram of an example environment in which embodiments of the present disclosure can be implemented;

[0012] Figure 2 illustrates a schematic diagram of a process for processing a query request according to some embodiments of the present disclosure;

[0013] Figures 3A to 3D illustrate schematic diagrams of example interfaces related to processing query requests according to some embodiments of the present disclosure;

[0014] Figures 4A to 4H illustrate schematic diagrams of relevant example interfaces for processing query requests according to other embodiments of the present disclosure;

[0015] Figure 5 shows a schematic structural block diagram of an apparatus for processing query requests according to some embodiments of the present disclosure; and

[0016] Figure 6 shows a block diagram of an electronic device in which one or more embodiments of the present disclosure may be implemented. Detailed Implementation

[0017] 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.

[0018] 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.

[0019] 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.

[0020] 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.

[0021] 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.

[0022] 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.

[0023] As an optional but non-restrictive implementation, in response to a user's active request, a prompt message can be sent to the user, such as a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0024] 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.

[0025] 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.

[0026] 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.

[0027] Machine learning typically comprises 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 meet 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 an 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 the application or inference phase, the trained model can be used to process actual model inputs based on the trained parameter values ​​to determine the corresponding model output.

[0028] Example Environment

[0029] 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.

[0030] 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.

[0031] 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.

[0032] 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.

[0033] The process of querying

[0034] Traditionally, applications or systems that provide query services can respond to multiple keyword query requests from users (e.g., "Please tell me the sales percentage of model A, model B, and model C"). Based on this query request, the application or system either directly retrieves data from the database that matches the query, or it uses previously learned knowledge to determine the matching data. The application or system can then determine the query results based on this data. If the application does not clearly understand the meaning of the query request, directly searching the database or querying previously learned knowledge may not find data that matches the query request, and the application will not be able to provide accurate query results to the user.

[0035] 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.

[0036] 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.

[0037] The following description continues with reference to the accompanying drawings, which will illustrate some exemplary embodiments of this disclosure.

[0038] 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.

[0039] 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.

[0040] 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.

[0041] 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.

[0042] 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.

[0043] 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 in the query request may be extracted to determine whether the query request clearly describes the user's needs, and so on.

[0044] 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.

[0045] 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".

[0046] 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.

[0047] 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.

[0048] 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.

[0049] 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".

[0050] 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.

[0051] 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.

[0052] The following describes how terminal device 110 executes multiple sub-requests in parallel to obtain a second response.

[0053] 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.

[0054] For example, if terminal device 110 determines that the sub-requests "the state of cherry blossoms in City A in March this year" and "the state of cherry blossoms in City A in April this year" corresponding to the first query request are in parallel, then it will search in parallel for the state of cherry blossoms in March and April to determine the corresponding sub-responses, and then summarize the sub-responses to form the second response.

[0055] 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.

[0056] 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.

[0057] 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.

[0058] 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, describing how terminal device 110 executes 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. The first and second sub-requests are parallel, and a third sub-request is serially related to the first and second sub-requests. Terminal device 110 updates the third sub-request based on the first and second sub-responses. Then, terminal device 110 generates a second response based on the third sub-response for the updated third sub-request.

[0059] 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.

[0060] 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".

[0061] 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.

[0062] 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.

[0063] In some embodiments, after determining the multiple sub-requests associated with the first query request, the terminal device 110 may also determine the user's potential query requests based on the query request. In some embodiments, the user's potential query requests indicate subsequent query requests that the user will issue after the first query request.

[0064] 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.

[0065] 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.

[0066] 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.

[0067] 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.

[0068] 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.

[0069] 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.

[0070] 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.

[0071] 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.

[0072] 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.

[0073] The foregoing describes the scheme disclosed herein for processing query requests, which is implemented by the terminal device 110 based on the user's operation of the launch control. Furthermore, when the user's query request is not clear enough, the terminal device 110 can provide prompts in one or more rounds, thereby facilitating the user to refine their query request.

[0074] 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.

[0075] 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.

[0076] 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.

[0077] 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.

[0078] 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 schematic diagrams of relevant example interfaces 400A to 400H for processing query requests according to other embodiments of this disclosure.

[0079] 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.

[0080] 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.

[0081] 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.

[0082] 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.

[0083] 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 terminal device 110 provides the user with options (e.g., model X, model XXX, model XXXXXX) for user 140 to select.

[0084] 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.

[0085] 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.

[0086] 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.

[0087] 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.

[0088] 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.

[0089] Example devices and equipment

[0090] Embodiments of this disclosure also provide corresponding apparatus for implementing the methods or processes described above. 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 implemented by hardware, software, firmware, or any combination thereof.

[0091] 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.

[0092] 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.

[0093] 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.

[0094] 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.

[0095] 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.

[0096] 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.

[0097] 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.

[0098] 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.

[0099] 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.

[0100] 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.

[0101] 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.

[0102] 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.

[0103] 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.

[0104] The units and / or modules included in device 500 can be implemented in various ways, including software, hardware, firmware, or any combination thereof. In some embodiments, one or more units and / or modules can be implemented using software and / or firmware, such as machine-executable instructions stored on a storage medium. In addition to or as an alternative to machine-executable instructions, some or all of the units and / or modules in device 500 can 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 can be used include field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-chips (SoCs), complex programmable logic devices (CPLDs), and so on.

[0105] 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.

[0106] 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.

[0107] 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.

[0108] 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 can include machine-readable media, such as flash drives, disks, or any other media capable of storing information and / or data and accessible within electronic device 600.

[0109] 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.

[0110] 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.

[0111] 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).

[0112] 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.

[0113] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatuses, devices, and computer program products implemented according to this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.

[0114] 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.

[0115] 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.

[0116] 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.

[0117] Various implementations of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed implementations. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described implementations. The terminology used herein is 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

1. A method for processing query requests, comprising: 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; In response to determining that the first query request cannot be used to generate the first response to the first query request, a second query request is generated based on the first query request, and the second query request can be used to generate the first response to the first query request; Obtain the second response to the second query request; as well as The first response to the first query request is generated based on the second response.

2. The method of claim 1, wherein determining whether the first query request can be used to generate the first response to the first query request comprises determining whether the first query request can be used to generate the 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.

3. The method according to claim 1, wherein generating the second query request based on the first query request comprises: Identify multiple sub-requests associated with the first query request; as well as The second query request is generated based on the multiple sub-requests.

4. The method of claim 3, wherein obtaining the second response comprises: Determine the logical relationships between the multiple sub-requests; as well as The multiple sub-requests are executed according to the stated logical relationship in order to obtain the second response.

5. The method of claim 4, further comprising: In response to determining the parallel relationship indicated by the logical relationship, multiple sub-responses are obtained for the multiple sub-requests respectively; as well as The second response is generated based on the plurality of sub-responses.

6. The method of claim 4, further comprising: In response to determining the logical relationship indicating a serial relationship, a first sub-response is obtained for the first sub-request among the plurality of sub-requests; as well as Update the second sub-request among the plurality of sub-requests based on the first sub-response; as well as The second response is generated based on the second sub-response to the updated second sub-request.

7. The method of claim 4, further comprising: In response to determining the logical relationship indicating the combination relationship, a first sub-response for the first sub-request and a second sub-response for the second sub-request are obtained respectively, wherein there is a parallel relationship between the first sub-request and the second sub-request, and there is a serial relationship between the third sub-request and the first sub-request and the second sub-request. The third sub-request is updated based on the first sub-response and the second sub-response; as well as The second response is generated based on the third sub-response to the updated third sub-request.

8. The method of claim 1, wherein determining the plurality of sub-requests associated with the first query request further comprises: Based on the query request, the user's potential query requests are determined, and the potential query requests indicate subsequent query requests that the user will issue after the first query request.

9. The method of claim 1, further comprising: In the first query mode of a conversational interactive application, a launch control is provided to initiate the second query mode; as well as The method is executed in response to receiving a user action on the launch control.

10. The method of claim 9, further comprising: An intermediate response area is presented in the conversational interactive application, the intermediate response area including the second query request and the second response; as well as. In response to determining that the first response has been generated, in the conversational interaction application Hide the intermediate response area.

11. The method according to claim 1, wherein generating the second query request based on the first query request comprises: Provide first prompt information to refine the first query request; as well as In response to receiving the first feedback regarding the first prompt information, the second query request is generated based on the first feedback.

12. The method of claim 11, further comprising: In response to determining that the second query request cannot be used to generate the first response to the first query request, a second prompt message is provided to refine the first query request; as well as In response to receiving a second feedback regarding the second prompt information, the second query request is generated based on the second feedback.

13. The method of claim 11, wherein providing the prompt information comprises: Identify multiple dimensions associated with the first query request; as well as The prompt information is provided based on the aforementioned multiple dimensions.

14. An apparatus comprising: The determination module is configured to, in response to receiving a first query request from a user, determine whether the first query request is available for generating a first response to the first query request; A request generation module is configured to generate a second query request based on the first query request in response to determining that the first query request cannot be used to generate the first response to the first query request, wherein the second query request can be used to generate the first response to the first query request; The acquisition module is configured to acquire a second response to the second query request; as well as The response generation module is configured to generate the first response to the first query request based on the second response.

15. An electronic device comprising: At least one processing unit; as well as At least one memory, coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, which, when executed by the at least one processing unit, cause the electronic device to perform the method according to any one of claims 1 to 13.

16. A computer-readable storage medium having a computer program stored thereon, the computer program being executable by a processor to implement the method according to any one of claims 1 to 13.

17. A computer program product comprising a computer program, wherein the computer program, when executed by a processor, implements the method according to any one of claims 1 to 13.

Citation Information

Patent Citations

  • Query request response method and device

    CN115114424A

  • Question and answer method, device and equipment and readable medium

    CN117743546A

  • Interaction method and device, equipment and storage medium

    CN117908736A

  • Generation of conversational responses using neural networks

    US20230316000A1