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

By using machine learning models in query service applications for semantic analysis and splitting query requests, the problem of users not being clear query requests is solved, and more accurate and efficient query results are achieved to meet user needs.

CN119213419APending Publication Date: 2024-12-27BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202480002158.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-09
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

Existing query service applications find it difficult to accurately understand users' unclear query requests, resulting in the query results not meeting user expectations, affecting the accuracy and efficiency of the query.

Method used

In a conversational interactive application, the machine learning model is used to perform semantic analysis to determine the clarity of the query request. If the predetermined conditions are not met, a clearer second query request is generated, a corresponding response is obtained, and the final response is generated based on the response. Query results.

Benefits of technology

By disassembling and refining users' query needs, more accurate information is provided, meeting user expectations, and improving the accuracy and efficiency of query.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119213419A_ABST
    Figure CN119213419A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a method and device for processing a query request, equipment and a storage medium. The method comprises the following steps: in response to a received first query request from a user, determining whether the first query request can be used for generating a first response for the first query request; in response to determining that the first query request cannot be used for generating a first response for the first query request, generating a second query request based on the first query request, the second query request being used for generating the first response for the first query request; obtaining a second response for the second query request; and generating a first response to the first query request based on the second response. Therefore, the query request with higher definition is generated by disassembling or refining the query demand of the user, so that the query demand of the user can be more accurately met, and more accurate information is provided for the user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Exemplary implementations of the present disclosure generally relate to the field of computers, and in particular, to methods, devices, apparatuses, and computer-readable storage media for processing query requests. Background Art

[0002] With the rapid development of the Internet, more and more applications are designed to provide various services to users. For example, applications can provide query services to users. Applications can obtain query requests from users (such as query text entered by users, that is, "questions") and provide query results corresponding to the questions based on the query requests. However, since the user's query request may not clearly describe the user's needs, the query results provided by existing applications may not meet the user's expectations, so it is expected that the accuracy and efficiency of queries can be improved. Summary of the invention

[0003] In a first aspect of the present disclosure, a method for 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 a predetermined condition, generating a second query request based on the first query request, wherein a second clarity of the second query request meets the predetermined condition; obtaining a second response to the second query request; and generating a first response to the first query request based on the second response.

[0004] In a second aspect of the present disclosure, a device for processing a query request is provided. The device includes: a clarity determination module configured to determine a first clarity of a first query request in a conversational interactive application 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 a predetermined condition, wherein the second clarity of the second query request meets the predetermined condition; 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.

[0005] In a third aspect of the present disclosure, an electronic device is provided. The electronic device includes: at least one processing unit; and at least one memory, the at least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit, and when the instructions are executed by the at least one processing unit, the electronic device executes the method according to the first aspect of the present disclosure.

[0006] In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the processor implements the method according to the first aspect of the present disclosure.

[0007] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the method according to the first aspect of the present disclosure is implemented.

[0008] It should be understood that the content described in this content section is not intended to limit the key features or important features of the implementation of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easy to understand through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In the following, in conjunction with the accompanying drawings and with reference to the following detailed description, the above and other features, advantages and aspects of various implementations of the present disclosure will become more apparent. In the accompanying drawings, the same or similar figure labels represent the same or similar elements, wherein:

[0010] Figure 1 A schematic diagram showing an example environment in which embodiments of the present disclosure can be implemented;

[0011] Figure 2 A schematic diagram showing a process for processing a query request according to some embodiments of the present disclosure is shown;

[0012] Figures 3A to 3D A schematic diagram showing an example interface for processing a query request according to some embodiments of the present disclosure;

[0013] 4A to 4H A schematic diagram showing a related example interface for processing a query request according to other embodiments of the present disclosure;

[0014] Figure 5 A schematic structural block diagram of an apparatus for processing a query request according to some embodiments of the present disclosure is shown; and

[0015] Figure 6 A block diagram of an electronic device is shown in which one or more embodiments of the present disclosure may be implemented. DETAILED DESCRIPTION

[0016] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0017] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may also be included below.

[0018] Herein, unless explicitly stated, executing a step “in response to A” does not mean executing the step immediately after “A” but may include one or more intermediate steps.

[0019] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0020] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0021] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information, so that the user can independently choose whether to provide personal information to software or hardware such as electronic devices, applications, servers or storage media that execute operations of the technical solution of the present disclosure based on the prompt message.

[0022] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information is sent to the user in a manner such as a pop-up window, in which the prompt information can be presented in text form. In addition, the pop-up window can also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0023] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0024] As used herein, the term "model" can learn the association between the corresponding input and output from the training data, so that after the training is completed, the corresponding output can be generated for a given input. The generation of the model can be based on machine learning technology. Deep learning is a machine learning algorithm that processes inputs and provides corresponding outputs by using multi-layer processing units. A neural network model is an example of a model based on deep learning. In this article, "model" may also be referred to as "machine learning model", "learning model", "machine learning network" or "learning network", and these terms are used interchangeably in this article.

[0025] A "neural network" is a machine learning network based on deep learning. A neural network is capable of processing inputs and providing corresponding outputs, and typically includes an input layer and an output layer and one or more hidden layers between the input layer and the output layer. Neural networks used in deep learning applications typically include many hidden layers, thereby increasing the depth of the network. The layers of a neural network are connected in sequence so that the output of the previous layer is provided as input to the next layer, where the input layer receives the input of the neural network and the output of the output layer serves as the final output of the neural network. Each layer of a neural network includes one or more nodes (also called processing nodes or neurons), each of which processes input from the previous layer.

[0026] Generally, machine learning can be roughly divided into three stages, namely the training stage, the testing stage, and the application stage (also called the inference stage). In the training stage, a given model can be trained using a large amount of training data, and the parameter values ​​are continuously updated iteratively until the model can obtain consistent inferences that meet the expected goals from the training data. Through training, the model can be considered to be able to learn the association between input and output (also called input-to-output mapping) from the training data. The parameter values ​​of the trained model are determined. In the testing stage, the test input is applied to the trained model to test whether the model can provide the correct output, thereby determining the performance of the model. The testing stage can sometimes be integrated into the training stage. In the application or inference stage, the trained model can be used to process the actual model input based on the parameter values ​​obtained through training to determine the corresponding model output.

[0027] Example Environment

[0028] Figure 1 A schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented is shown. In the example environment 100, an application 120 is installed in a terminal device 110. A user 140 can interact with the application 120 via the terminal device 110 and / or an attached device of the terminal device 110.

[0029] In some embodiments, application 120 may be any suitable application that can provide query services. Figure 1 In the environment 100, if the application 120 is in an active state, the terminal device 110 can present a page 150 of the application 120. The page 150 can include various pages that the application 120 can provide, such as a query page, a search page, a search result presentation page, and the like.

[0030] In some embodiments, the terminal device 110 communicates with the server 130 to provide the service of the application 120. The terminal device 110 can be any type of mobile terminal, fixed terminal or portable terminal, including mobile phones, desktop computers, laptop computers, notebook computers, netbook computers, tablet computers, media computers, multimedia tablets, personal communication systems (PCS) devices, personal navigation devices, personal digital assistants (PDAs), audio / video players, digital cameras / camcorders, positioning devices, television receivers, radio broadcast receivers, e-book devices, gaming devices, or any combination of the foregoing, including accessories and peripherals of these devices or any combination thereof. In some embodiments, the terminal device 110 can also support any type of interface for the user (such as "wearable" circuits, etc.). The server 130 can be various types of computing systems / servers that can provide computing power, including but not limited to mainframes, edge computing nodes, computing devices in cloud environments, and the like.

[0031] It should be understood that the structure and function of the various elements in the environment 100 are described for exemplary purposes only and do not imply any limitation on the scope of the present disclosure.

[0032] The process used for querying

[0033] Traditionally, an application or system that can provide query services can respond to receiving multiple keyword query requests from users (for example, please tell me the sales share of model A, model B, and model C). Based directly on the query request, data matching the query request is determined from the database, or data matching the query request is determined based on previously learned knowledge. The application or system can determine the query result for the query request based on the data. If the application cannot clearly understand the meaning of the query request, directly searching the database or querying the previously learned knowledge cannot find data matching the query request, and the application cannot provide accurate query results to the user.

[0034] For another example, an application or system that can provide query services needs to obtain more detailed information when searching based on a user's unclear query request. For example, a user wants to query "What concerts are there in the first half of this year?" At this time, based on the user's query information, the application or system that can provide query services also needs to obtain more detailed information such as "Where is the concert?" For another example, for example, a user wants to query "What should I do if my neck hurts?" At this time, based on the user's query information, the application or system that can provide query services also needs to obtain more detailed information such as "Pain duration", "Are there any historical medical records?", etc.

[0035] In view of this, according to an embodiment of the present disclosure, a method for processing a query request is proposed. The method includes, in response to receiving a first query request from a user, determining 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 a 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 a first response to the first query request. Obtain a second response to the second query request. Generate a first response to the first query request based on the second response. Thus, by disassembling the user's query needs, the user's query needs are met, thereby providing the user with more accurate information. It should be understood that although the above describes that the above method is performed by a terminal device, alternatively and / or additionally, the terminal device calls the processing capability of the server to perform the above method.

[0036] Some example embodiments of the present disclosure are described below with continued reference to the accompanying drawings.

[0037] The following will refer to Figure 2 A flowchart describing the process of the present disclosure for processing a query request. Figure 2 FIG. 2 is a schematic diagram of a process 200 for processing a query request according to some embodiments of the present disclosure. The process 200 may be implemented at the terminal device 110. Figure 1 Process 200 is described.

[0038] 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, the terminal device 110 may receive a first query request from a user (e.g., user 140). The terminal device 110 may receive the first query request from the user in any appropriate manner, which is not limited in the present disclosure. For example, the terminal device 110 may provide an input box and receive the first query request from the user via the input box. The first query request may be of any appropriate type, including but not limited to text, voice, video, image, and the like.

[0039] The terminal device 110 determines whether the first query request can be used to generate a first response to the first query request based on the user's first query request. In some embodiments, the terminal device 110 can 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.

[0040] In some examples, after receiving the first query request from the user, the terminal device 110 performs semantic analysis on the first query request to determine whether the first query request can be used to generate a first response to the first query request. In some examples, the terminal device 110 can access the server 130 to determine whether the first query request can be used to generate a first response to the first query request.

[0041] The terminal device 110 may use any appropriate method to determine whether the first query request can be used to generate a first response to the first query request. For example, clarity (e.g., a value between 0-100) may be used to indicate whether the first query request can be used to generate a first response to the first query request. If the clarity is higher than a predetermined threshold (e.g., 70 or other values), it is determined that the first query request can be used to generate a first response to the first query request. The terminal device 110 may perform semantic analysis on the first query request with the help of a machine learning model (e.g., a splitting model, and / or a refinement model) to determine the first clarity of the first query request. This machine learning model may be any appropriate model, for example, it may include a transformer model, RNN, CNN, etc. Here, the machine learning model may be trained using labeled samples, and the trained machine learning model may directly output the clarity corresponding to the query request.

[0042] Alternatively and / or additionally, the terminal device 110 may also determine whether the first query request can be used to generate a first response to the first query request based on text analysis. Specifically, keywords in the query request may be extracted to determine whether the query request clearly describes the user's needs, and so on.

[0043] In block 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, and 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, and thus can obtain a response that better matches the user's expectations.

[0044] In some examples, if the terminal device 110 determines that the clarity of the first query request does not meet the predetermined conditions, the terminal device 110 generates a second query request based on the first query request. For example, the first query request input by the user is "When will the cherry blossoms in City A bloom this year? And when is the best time to travel?" Since the first query request input by the user lacks a specific time, the terminal device 110 determines that the first clarity of the first query request does not meet the predetermined conditions. Then, the 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 split the first query request into: "The state of cherry blossoms in City A blooming in March this year", "The state of cherry blossoms in City A blooming in April this year".

[0045] In some embodiments, the terminal device 110 determines multiple sub-requests associated with the 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, the 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.

[0046] For example, if the first query request input by the user is "When will the cherry blossoms in City A be in full bloom this year? And when is the best time to travel?", the multiple sub-requests determined by the terminal device 110 may be: "The status of the cherry blossoms in City A in full bloom in March this year", "The status of the cherry blossoms in City A in full bloom in April this year", and so on.

[0047] In block 230, the terminal device 110 obtains a second response to the second query request. In block 240, the terminal device 110 generates a first response to the first query request based on the second response.

[0048] In some examples, the 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 the multiple sub-requests determined by the terminal device 110 based on the first query request are "the state of cherry blossoms in City A in full bloom in March this year", "the state of cherry blossoms in City A in full bloom in April this year". At this time, the terminal device 110 determines multiple responses based on the above multiple sub-requests and generates a first response. For example, "In City A, the flowering period of cherry blossoms is generally between March and April, XXXX".

[0049] In some embodiments, the terminal device 110 may also determine the logical relationship between the multiple sub-requests. Then, the terminal device 110 executes the multiple sub-requests according to the logical relationship between the multiple sub-requests. Thus, a second response may be obtained. In this way, multiple sub-requests may be executed according to different logical relationships, thereby obtaining a response that better matches the complex query.

[0050] In some examples, the logical relationship between the multiple sub-requests may be a parallel relationship, a serial relationship, or a combined relationship. The terminal device 110 executes the multiple sub-requests in a parallel relationship to obtain the second response. The terminal device 110 executes the multiple sub-requests in a serial relationship to obtain the second response. The terminal device 110 executes the multiple sub-requests in a combined relationship to obtain the second response. The following will describe how to execute multiple sub-requests to obtain the second response according to different logical relationships.

[0051] The following first describes that the terminal device 110 executes multiple sub-requests in parallel to obtain the second response.

[0052] In some embodiments, the terminal device 110 obtains multiple sub-responses for multiple sub-requests in response to determining that the logical relationship indicates a parallel relationship. Subsequently, the terminal device 110 generates a second response based on the multiple sub-responses. In some examples, if the terminal device 110 determines that the logical relationship of the multiple sub-requests is a parallel relationship, the multiple sub-requests are searched in parallel to obtain the sub-responses of the multiple sub-requests respectively. Then, the terminal device 110 summarizes the sub-responses to generate the second response. In this way, responses to each sub-request can be obtained in parallel in a simpler and more efficient manner.

[0053] For example, the terminal device 110 determines that the sub-request "the state of cherry blossoms in City A in March this year" and the sub-request "the state of cherry blossoms in City A in April this year" corresponding to the first query request are in a parallel relationship, and then searches in parallel for the state of cherry blossoms in March and April to determine the corresponding sub-responses respectively, and then summarizes the sub-responses to form a second response.

[0054] The above describes that the terminal device 110 executes multiple sub-requests in a parallel relationship to obtain a second response. The following continues to describe that the terminal device 110 executes multiple sub-requests in a serial relationship to obtain a second response. In some embodiments, the terminal device 110 obtains a first sub-response for a first sub-request of multiple sub-requests in response to determining that the logical relationship indicates a serial relationship. Subsequently, the terminal device 110 updates the second sub-request in the multiple sub-requests based on the first sub-response. Furthermore, the terminal device 110 generates a second response based on the second sub-response for the updated second sub-request. In this way, query requests involving multiple queries can be processed in a more accurate manner.

[0055] In some examples, if the terminal device 110 determines that the logical relationship of the multiple sub-requests is a serial relationship, the terminal device 110 first obtains a first response to the first sub-request in the multiple sub-requests. Subsequently, the terminal device 110 updates the second sub-request in the multiple requests according to the first response. The terminal device 110 determines a second sub-response according to the second sub-request. Finally, the terminal device 110 generates a second response according to the second sub-response.

[0056] For example, if the user's first query request is "the latest work of the author of XX work", the terminal device 110 splits the first sub-request of the first query request into "the author of XX work". The terminal device 110 determines the first sub-response "the author of XX work is author A" according to the first sub-request, and updates the second sub-request corresponding to the first query request to "the latest work of author A" according to the first sub-response. Finally, the terminal device 110 determines the second sub-response according to the second sub-request "the latest work of author A" to generate a second response. In this way, a response that better meets the user's expectations can be obtained.

[0057] The above describes that the terminal device 110 executes multiple sub-requests in a serial relationship to obtain a second response. The following continues to describe that the terminal device 110 executes multiple sub-requests in a combined relationship to obtain a second response. In some embodiments, the terminal device 110 obtains a first response to a first sub-request among multiple sub-requests and a second sub-request for a second sub-request among multiple sub-requests in response to determining a logical relationship indicating a combined relationship. 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 among the multiple sub-requests and the first sub-request and the second sub-request. The terminal device 110 updates the third sub-request according to the first sub-request and the second sub-request. Then, the terminal device 110 generates a second response based on the third sub-request for the updated third sub-request.

[0058] In some examples, if the logical relationship between the multiple sub-requests corresponding to the first query request is a combination relationship, the first sub-response and the second sub-response corresponding to the first sub-request and the second sub-request in the multiple sub-requests that are in a parallel relationship are obtained respectively. Subsequently, the terminal device 110 updates the third sub-request in the multiple sub-requests according to the first sub-response and the second sub-response. There is a serial relationship between the third sub-request and the first sub-request and the second sub-request. The terminal device 110 generates a second response according to the third sub-response corresponding to the third sub-request.

[0059] For example, if the user's first query request is "Which product AA or product BB has higher sales volume", the terminal device 110 splits the first query request into a first sub-request "product AA sales volume" and a second sub-request "product BB sales volume". The terminal device 110 determines a first sub-response "product AA sales volume is XXX" based on the first sub-request, and a second sub-response "product BB sales volume is XXXX" for the second sub-request.

[0060] The terminal device 110 updates the third sub-request corresponding to the first query request to "which is higher" based on the first sub-reply "the sales volume of product AA is XXX" and the second sub-reply "the sales volume of product BB is XXXX". Finally, the terminal device 110 determines the third sub-reply based on the third sub-request "which is higher" to generate a second response. Here, the search system and / or language model can be called to process each sub-request. For example, the search system can be called to determine the sales volume XXX of product AA and the sales volume XXXX of BB respectively, and the language model with reasoning ability can be called to compare the sales volume XXX and XXXX, and then generate a second response.

[0061] It should be understood that although the above only describes the logical relationship between multiple sub-requests by taking parallel relationship, serial relationship and combination relationship as examples, there may be more complex logical relationships. For example, a sub-request may be further split into multiple smaller sub-requests with parallel relationship, serial relationship or combination relationship. In this way, the split model can convert complex query requests into executable sub-requests, and can realize reasoning ability by executing each sub-request in a more reasonable way, thereby obtaining a response that better meets the user's expectations.

[0062] 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 request according to the query request. In some embodiments, the user's potential query request indicates a subsequent query request that the user will issue after the first query request.

[0063] For example, if the user's first query request is "When will the cherry blossoms in City A bloom this year? And when is the best time to travel?", the terminal device 110 can determine potential query requests: user travel mode, user residence, etc. In some examples, the terminal device 110 can respond based on the user's potential query request. For example, the terminal device 110 can recommend air tickets to City A, high-speed rail tickets, hotels and homestays that are convenient for viewing cherry blossoms in City A, etc. Therefore, this method can meet the user's related complex search needs.

[0064] In some embodiments, the terminal device 110 provides a start control for starting a second query mode (e.g., an expert query mode) in a first query mode (e.g., a regular query mode) in a dialog interaction application. Then, in response to receiving a user operation on the start control, the terminal device 110 executes the method for processing a query request disclosed herein.

[0065] Therefore, for ease of understanding, the following will refer to FIG. 3A to FIG. 3D ,as well as 4A to 4H Describe the interaction process between a user (also referred to as user 140 ) and the terminal device 110 . Figures 3A to 3D Schematic diagrams of example interfaces 301 to 304 for processing query requests according to some embodiments of the present disclosure are shown. Figure 1 Give a description.

[0066] In some embodiments, the terminal device 110 provides a start control for starting the expert query mode in the conversation interaction application. If the user 140 clicks the start control provided by the terminal device 110, the terminal device 110 will execute the method for processing the query request disclosed in the present disclosure based on the query request of the user 140. In some embodiments, if the user 140 does not click the start control provided by the terminal device 110, the terminal device 110 will perform a conventional query based on the query request of the user 140. In this way, the subsequent query process can be executed based on the query mode desired by the user.

[0067] like Figure 3A In the example interface 301 shown, the terminal device 110 performs a query for the user's first query request 310 in response to the user 140 clicking the start control. In some embodiments, the terminal device 110 presents an intermediate answer area 311 in the conversational interactive application. The intermediate answer area 311 can be used to indicate the query process of the terminal device 110. The query process of the terminal device 110 can be presented in the page in the form of a card. The terminal device 110 presents its query process in the page, which allows the user to have a more intuitive perception of the query process of the terminal device 110.

[0068] In some embodiments, the intermediate response area 311 includes a second query request and a second query response. Figures 3A to 3CIn the example interfaces 301 to 303 shown, the terminal device 110 responds to a first query request 310 from the user 140, and the first clarity corresponding to the first query request 310 does not meet the predetermined condition. At this time, the terminal device 110 splits the first query request 310 into a second query request 312 by performing semantic and / or text analysis on the first query request, and presents the second query request 312 in the page 301. The terminal device 110 presents multiple sub-requests included in the second query request 312 in the page 301, for example, sub-request 312-1, sub-request 312-2, and so on.

[0069] Subsequently, the terminal device 110 determines the second response 321 according to the second query request 312, and presents the second response 321 on the page 302. In some embodiments, the terminal device 110 generates a corresponding sub-response according to each of the multiple sub-requests included in the second query request 312. For example, the sub-response 321-1 corresponding to the sub-request 312-1 and the sub-response 321-2 corresponding to the sub-request 312-2. The terminal device 110 generates and presents the second response 321 on the page 302 according to the sub-responses. Finally, the terminal device 110 generates the first response 331 of the first query request 310 according to the second response 321, and presents the first response 331 on the page 303. The generation of the second response 321 by the terminal device 110 according to the second query request 312 has been described in detail above, and will not be repeated here.

[0070] In some embodiments, in response to determining that the first response has been generated, the terminal device 110 hides the intermediate response area in the conversational interactive application. Figure 3D In the example interface 304 shown, if the first answer 331 has been generated, the terminal device 110 can hide the intermediate answer area in the area 340. In this way, the final query answer (ie, the first answer 331) can be presented in a more prominent manner.

[0071] In some examples, the terminal device 110 provides the user 140 with a hide control 341 for the user 140 to expand the intermediate answer area. For example, after the terminal device 110 generates the first answer 331, the terminal device 110 hides the intermediate answer area. At this time, if the user clicks the hide control 341, the terminal device 110 expands the intermediate answer area. Subsequently, if the hide control 341 is clicked again, the terminal device 110 will hide the intermediate answer area again. In this way, it is convenient for the user to view the process and data source of obtaining the final query answer.

[0072] The above describes that the terminal device 110 executes the solution for processing query requests disclosed in the present disclosure based on the user's operation on the startup control. Further, when the user's query request is not clear enough, the terminal device 110 can provide prompt information in one or more rounds to facilitate the user to refine the query request.

[0073] In some embodiments, the terminal device 110 may first determine multiple dimensions associated with the first query request. Subsequently, the terminal device 110 provides prompt information based on the multiple dimensions. For example, if the first query request of the user 140 is "What concerts are there in the first half of this year", the terminal device 110 determines that the multiple dimensions associated with the first query request may be language: Chinese, English, category: singer, group, host city: city B, city C, style: rock, pop, classical, etc.

[0074] The following first describes a method for processing a query request in a scenario where the terminal device 110 provides prompt information in a round. In some embodiments, the terminal device 110 may also provide first prompt information for refining the first query request. Then, in response to receiving a first feedback for the first prompt information, the terminal device 110 generates a second query request based on the first feedback.

[0075] In some examples, the terminal device 110 may provide first prompt information for refining the first query request in one round. The terminal device 110 presents the first prompt information on the page, and the first prompt information includes multiple detailed questions. For example, if the first query request of the user 140 is "What concerts are there in the first half of this year", the first prompt information provided by the terminal device 110 to the user may include the detailed question "What language do you want to listen to the concert in?" The options provided by the terminal device 110 to the user for the detailed question may be Chinese, English, Italian, etc., for the user 140 to choose.

[0076] Then, the terminal device 110 generates a second query request based on the user 140's feedback on the first prompt information. For example, continuing the above example, if the user 140 selects Chinese, the terminal device 110 generates a second query request "What are the Chinese concerts in the first half of this year" based on the user 140's selection. Finally, the terminal device 110 generates a first response based on the second response to the second query request.

[0077] Alternatively and / or additionally, the query request may be gradually refined in multiple rounds. 4A to 4H A method for processing a query request in a scenario where the terminal device 110 provides prompt information in multiple rounds is described. 4A to 4H Schematic diagrams of related example interfaces 400A to 400H for processing query requests according to other embodiments of the present disclosure are shown.

[0078] In some embodiments, if the terminal device 110 determines that the second query request is not usable to generate a first response to the first query request, second prompt information for refining the first query request is provided. Then, in response to receiving a second feedback for the second prompt information, the terminal device 110 generates a second query request according to the second feedback. In other words, if the machine learning model believes that the refined second query request is still not clear enough, more prompt information may be provided in more rounds to further refine the query request.

[0079] In some examples, if the terminal device 110 determines that the second definition of the second query request does not meet the predetermined condition, multiple rounds of prompt information will be provided until the second definition meets the predetermined condition. The terminal device 110 generates a second query request based on the user 140's feedback on each round of prompt information in the multiple rounds of prompt information. Then the terminal device 110 generates a first response based on the second response to the second query request.

[0080] In some examples, the terminal device 110 may call a machine learning model to train a refinement model of a counter-question intention and multiple rounds of processing. If the terminal device 110 determines that the clarity of the user's first query request does not meet the predetermined condition, the refinement model may be used to conduct multiple rounds of counter-questions to the user to achieve the first query information of the user, so as to provide the user with more accurate information.

[0081] like 4A to 4H In the example interfaces 400A to 400H shown, if the first query request 410 is "Why did the computer suddenly break down", the terminal device 110 determines that the clarity of the first query request 410 does not meet the predetermined condition, and then provides the user 140 with prompt information 411 for refining the first query request 410, and presents it in the middle answer area 311. The prompt information 411 includes a 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.

[0082] If the user 140 selects brand B 421, the terminal device 110 may generate a query request according to the feedback of the user 140. If the terminal device 110 determines that the clarity corresponding to the query request does not meet the predetermined condition, it continues to provide the user 140 with prompt information 430 for refining the first query request 410, and presents it in the intermediate answer area 311. The prompt information 430 includes a second question 431 "What is the model of your computer?", and the terminal device 110 provides the user with options (e.g., model X, model XXX, model XXXXXX) for the user 140 to choose.

[0083] If the user 140 selects model X 441, the terminal device 110 may generate a query request according to the feedback of the user 140. If the terminal device 110 determines that the clarity corresponding to the query request still does not meet the predetermined condition, it continues to provide the user 140 with prompt information 450 for refining the first query request 410. The prompt information 450 includes a third question 451 "What is the specific malfunction of your computer?", and the terminal device 110 provides the user with options (e.g., unable to boot, slow running, blue screen) for the user 140 to choose.

[0084] If the user 140 selects "cannot start the device 461", the terminal device 110 may generate a query request based on the feedback of the user 140. In this way, multiple rounds of prompt information are provided until the clarity of the query request meets the predetermined condition, and the terminal device 110 generates a second query request based on all the feedback of the user 140.

[0085] In some embodiments, when providing prompt information to the user 140 , the terminal device 110 may also provide the user 140 with an input box 471 in the intermediate answer area 311 for the user 140 to input feedback on the questions included in the prompt information.

[0086] The terminal device 110 generates a first response 481 corresponding to the first query request 410 according to the second response corresponding to the second query request. In some examples, the terminal device 110 may also provide a control 482 corresponding to the reading response in the middle response area 311. The user 140 clicks the control 482 corresponding to the reading response, and the terminal device 110 presents the first response it generated.

[0087] In summary, the present disclosure can use the split model and / or refinement model to process unclear user queries, and obtain query requests that more clearly describe user needs through reasoning, splitting, refinement, etc. At this time, the obtained query request can more accurately meet the user's query needs, thereby providing the user with more accurate information.

[0088] Example devices and equipment

[0089] The embodiments of the present disclosure also provide corresponding devices for implementing the above methods or processes. Figure 5 A schematic structural block diagram of an apparatus 500 for processing a query request according to some embodiments of the present disclosure is shown. The apparatus 500 may be implemented as or included in a terminal device 110. Each module / component in the apparatus 500 may be implemented by hardware, software, firmware, or any combination thereof.

[0090] like Figure 5As shown, the apparatus 500 includes a determination module 510, configured as a determination module, in response to receiving a first query request from a user, determining whether the first query request can be used to generate a first answer to the first query request. The apparatus 500 also includes a request generation module 520, 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 answer to the first query request, and the second query request can be used to generate the first answer to the first query request. The apparatus 500 also includes an acquisition module 530, configured to acquire a second answer to the second query request. The apparatus 500 also includes an answer generation module 540, configured to generate the first answer to the first query request based on the second answer.

[0091] In some embodiments, the determination module 510 is further configured to determine whether the first query request can be used to generate a first response to the first query request, including determining whether the first query request can be used to generate a first response to the first query request based on at least any one of the following: based on semantic analysis of the first query request; or based on text analysis of the first query request.

[0092] 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 generate a second query request based on the plurality of sub-requests.

[0093] In some embodiments, the acquisition module 530 is further configured to determine a logical relationship between the multiple sub-requests; and execute the multiple sub-requests according to the logical relationship to obtain a second response.

[0094] In some embodiments, the apparatus 500 further comprises a response generation module configured to, in response to determining that the logical relationship indicates a parallel relationship, respectively obtain a plurality of sub-responses for the plurality of sub-requests; and generate a second response based on the plurality of sub-responses.

[0095] In some embodiments, the response generation module is also configured to obtain a first sub-response for a first sub-request among multiple sub-requests in response to determining that the logical relationship indicates a serial relationship; and update a second sub-request among the multiple 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.

[0096] In some embodiments, the response generation module is also configured to obtain, in response to determining that the logical relationship indicates a combination relationship, a first sub-response for a first sub-request among multiple sub-requests and a second sub-response for a second sub-request among the multiple sub-requests, respectively, where 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 the multiple 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 to the updated third sub-request.

[0097] In some embodiments, the request generation module 520 further includes a request determination module configured to determine a potential query request of the user based on the query request, where the potential query request indicates a subsequent query request to be issued by the user after the first query request.

[0098] In some embodiments, the apparatus 500 further includes an execution module configured to provide a start control for starting a second query mode in a first query mode in a conversational interactive application; and to call the determination module 510 in response to receiving a user operation on the start control.

[0099] In some embodiments, device 500 also includes an area hiding module, which is configured to present an intermediate response area in the conversational interactive application, the intermediate response area including a second query request and a second response; and in response to determining that the first response has been generated, hide the intermediate response area in the conversational interactive application.

[0100] 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 a first feedback on the first prompt information, generate a second query request based on the first feedback.

[0101] In some embodiments, the request generation module 520 is further configured to, in response to determining that it is not possible to generate a first response to the first query request, provide second prompt information for refining the first query request; and in response to receiving second feedback for the second prompt information, generate a second query request based on the second feedback.

[0102] 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 provide prompt information based on the multiple dimensions respectively.

[0103] The units and / or modules included in the device 500 can be implemented in various ways, including software, hardware, firmware, or any combination thereof. In some embodiments, one or more units and / or modules can be implemented using software and / or firmware, such as machine executable instructions stored on a storage medium. In addition to or as an alternative to machine executable instructions, some or all of the units and / or modules in the device 500 can be implemented at least in part by one or more hardware logic components. As an example and not limitation, exemplary types of hardware logic components that can be used include field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0104] It should be understood that one or more steps in the above method can be performed by a suitable electronic device or a combination of electronic devices. Such an electronic device or a combination of electronic devices may include, for example, Figure 1 The terminal device 110 in.

[0105] Figure 6 1 shows a block diagram of an electronic device 600 in which one or more embodiments of the present disclosure may be implemented. It should be understood that Figure 6 The electronic device 600 shown is merely exemplary and should not constitute any limitation on the functionality and scope of the embodiments described herein. Figure 6 The electronic device 600 shown can be used to implement Figure 1 terminal device 110.

[0106] like Figure 6 As shown, the electronic device 600 is in the form of a general electronic device. The components of the electronic device 600 may include, but are not limited to, one or more processors or processing units 610, a memory 620, a storage device 630, one or more communication units 640, one or more input devices 650, and one or more output devices 660. The processing unit 610 may be an actual or virtual processor and is capable of performing various processes according to a program stored in the memory 620. In a multi-processor system, multiple processing units execute computer executable instructions in parallel to improve the parallel processing capability of the electronic device 600.

[0107] The electronic device 600 typically includes a plurality of computer storage media. Such media can be any available media accessible to the electronic device 600, including but not limited to volatile and non-volatile media, removable and non-removable media. The memory 620 can be a volatile memory (e.g., registers, caches, random access memory (RAM)), a non-volatile memory (e.g., a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), flash memory) or some combination thereof. The storage device 630 can be a removable or non-removable medium, and can include a machine-readable medium, such as a flash drive, a disk, or any other medium, which can be used to store information and / or data and can be accessed within the electronic device 600.

[0108] The electronic device 600 may further include additional removable / non-removable, volatile / non-volatile storage media. Figure 6 As shown in , a disk drive for reading or writing from a removable, non-volatile disk (e.g., a "floppy disk") and an optical drive for reading or writing from a removable, non-volatile optical disk may be provided. In these cases, each drive may be connected to the bus (not shown) by one or more data media interfaces. The memory 620 may include a computer program product 625 having one or more program modules that are configured to perform various methods or actions of various embodiments of the present disclosure.

[0109] The communication unit 640 implements communication with other electronic devices through a communication medium. Additionally, the functions of the components of the electronic device 600 can be implemented with a single computing cluster or multiple computing machines that can communicate through a communication connection. Therefore, the electronic device 600 can operate in a networked environment using a logical connection with one or more other servers, a network personal computer (PC), or another network node.

[0110] The input device 650 may be one or more input devices, such as a mouse, a keyboard, a tracking ball, etc. The output device 660 may be one or more output devices, such as a display, a speaker, a printer, etc. The electronic device 600 may also communicate with one or more external devices (not shown) through the communication unit 640 as needed, such as a storage device, a display device, etc., communicate with one or more devices that allow a user to interact with the electronic device 600, or communicate with any device that allows the electronic device 600 to communicate with one or more other electronic devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface (not shown).

[0111] According to an exemplary embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer-executable instructions are stored, wherein the computer-executable instructions are executed by a processor to implement the method described above. According to an exemplary embodiment of the present disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method described above.

[0112] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices, equipment, and computer program products implemented according to the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0113] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0114] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, so that the instructions executed on the computer, other programmable data processing apparatus, or other device implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0115] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple implementations of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of a module, program segment or instruction includes one or more executable instructions for realizing the logical function of the specification. In some implementations as replacements, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.

[0116] The above descriptions of various implementations of the present disclosure are exemplary, non-exhaustive, and not limited to the disclosed implementations. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described implementations. The selection of terms used herein is intended to best explain the principles of the implementations, practical applications, or improvements to the technology in the marketplace, or to enable other persons of ordinary skill in the art to understand the various embodiments disclosed herein.

Claims

1. A method for processing a query request, comprising: In response to receiving a first query request from a user, determining whether the first query request can be used to generate a first answer to the first query request; In response to determining that the first query request is not usable to generate the first answer to the first query request, generating a second query request based on the first query request, wherein the second query request can be used to generate the first answer to the first query request; Obtaining a 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 answer to the first query request comprises determining whether the first query request can be used to generate the first answer to the first query request based on at least any 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: Determining a plurality of 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 according to claim 3, wherein obtaining the second response comprises: Determining a logical relationship between the plurality of sub-requests; as well as The multiple sub-requests are executed according to the logical relationship to obtain the second response.

5. The method according to claim 4, further comprising: In response to determining that the logical relationship indicates a parallel relationship, obtaining a plurality of sub-responses for the plurality of sub-requests respectively; as well as The second response is generated based on the plurality of sub-responses.

6. The method according to claim 4, further comprising: In response to determining that the logical relationship indicates a serial relationship, obtaining a first sub-reply for a first sub-request of the plurality of sub-requests; as well as updating a second sub-request among the plurality of sub-requests based on the first sub-answer; as well as The second response is generated based on a second sub-response to the updated second sub-request.

7. The method according to claim 4, further comprising: In response to determining that the logical relationship indicates a combination relationship, respectively obtaining a first sub-reply for a first sub-request among the multiple sub-requests and a second sub-reply for a second sub-request among the multiple sub-requests, wherein a parallel relationship exists between the first sub-request and the second sub-request, and a serial relationship exists between a third sub-request among the multiple sub-requests and the first sub-request and the second sub-request; updating the third sub-request based on the first sub-response and the second sub-response; as well as The second response is generated based on a third sub-response to the updated third sub-request.

8. The method of claim 1, wherein determining a plurality of sub-requests associated with the first query request further comprises: A potential query request of the user is determined based on the query request, where the potential query request indicates a subsequent query request to be issued by the user after the first query request.

9. The method according to claim 1, further comprising: In a first query mode in a conversational interactive application, providing a start control for starting a second query mode; as well as In response to receiving a user operation on the start control, the method is executed.

10. The method according to claim 9, further comprising: presenting an intermediate response area 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, hiding the intermediate response area in the conversational interactive application.

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

12. The method according to 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, providing second prompt information for refining the first query request; as well as In response to receiving a second feedback for the second prompt information, generating the second query request based on the second feedback.

13. The method according to claim 11, wherein providing the prompt information comprises: determining a plurality of dimensions associated with the first query request; as well as The prompt information is provided based on the multiple dimensions respectively.

14. A device comprising: a determination module, 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; a request generation module, configured to generate a second query request based on the first query request in response to determining that the first query request is not usable 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; an acquisition module, 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, the at least one memory being coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions causing the electronic device to perform the method according to any one of claims 1 to 13 when executed by the at least one processing unit.

16. A computer-readable storage medium having a computer program stored thereon, wherein the computer program can be executed by a processor to implement the method according to any one of claims 1 to 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

  • Analyzing natural language questions to determine missing information in order to improve accuracy of answers

    CN104699741A

  • Question and answer method and device, electronic equipment and storage medium

    CN116955561A