Method, device and equipment for dialogue interaction and storage medium

By generating requests for target entities in the dialogue system and using their responses to generate knowledge records, the problem of excessive amount of knowledge base data in the traditional dialogue system is solved, and dialogue interaction capabilities and replies efficiency are improved.

CN119631091APending Publication Date: 2025-03-14BEIJING YOUZHUJU NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202480003479.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-13
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

Traditional dialogue systems cannot actively acquire external knowledge, resulting in too large amount of knowledge base data, affecting retrieval efficiency and accuracy.

Method used

By generating a request for the target entity based on user input, a knowledge record is generated using the response provided by the target entity and stored in the knowledge base.

Benefits of technology

It improves the dialogue interaction capabilities and the accuracy and efficiency of the dialogue system, reduces the amount of data stored in the knowledge base, and improves the retrieval efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119631091A_ABST
    Figure CN119631091A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a dialogue interaction method and device, equipment and a storage medium. The method comprises: based on a first user input indicating a first task, using a first model to generate a request for a target entity to instruct the target entity to provide information related to the first task; based on the response of the target entity to the request, providing an execution result of the first task as a reply input for the first user; and based on the response and the first user input, generating a knowledge record for storage into a knowledge base, the knowledge base being used by the first model. Therefore, the task indicated by the user input can be executed by means of the target entity. The dialogue interaction capability of the dialogue system is improved, and the accuracy and efficiency of reply provided by the dialogue system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Example embodiments of the present disclosure generally relate to the field of computers, and more particularly, to methods, devices, apparatuses, and computer-readable storage media for dialog interaction. Background Art

[0002] With the development of information technology, various terminal devices can provide various services to people in work and life. Applications and / or systems that provide services can be deployed in terminal devices. The terminal device presents corresponding content and interacts with users through the user interface of the application / system to meet various needs of users. In some cases, users can initiate dialogue interaction requests within the application / system. The application / system can provide corresponding replies to users based on user input from the user. Therefore, how to improve the accuracy and efficiency of generating replies is a problem of concern. Summary of the invention

[0003] In a first aspect of the present disclosure, a method for dialog interaction is provided. The method includes: based on a first user input indicating a first task, using a first model, generating a request for a target entity to instruct the target entity to provide information related to the first task; based on a response of the target entity to the request, providing an execution result of the first task as a reply to the first user input; and based on the response and the first user input, generating a knowledge record for storage in a knowledge base, the knowledge base being used by the first model.

[0004] In a second aspect of the present disclosure, a device for dialog interaction is provided. The device includes: a request generation module configured to generate a request for a target entity based on a first user input indicating a first task, using a first model, to instruct the target entity to provide information related to the first task; a reply providing module configured to provide an execution result of the first task as a reply to the first user input based on a response of the target entity to the request; and a record generation module configured to generate a knowledge record for storage in a knowledge base based on the response and the first user input, and the knowledge base is used by the first model.

[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] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:

[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 an architecture for dialog interaction according to some embodiments of the present disclosure;

[0012] Figure 3 A schematic diagram showing an example of a conversation interaction according to some embodiments of the present disclosure;

[0013] Figure 4 A flowchart showing a process for dialog interaction according to some embodiments of the present disclosure is shown;

[0014] Figure 5 A schematic structural block diagram showing an apparatus for dialog interaction according to some embodiments of the present disclosure; 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] 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.

[0017] 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. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

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

[0019] 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 the relevant laws and regulations may also be applied to the implementation of the present disclosure.

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

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

[0022] It should be noted that the titles of any sections / subsections provided herein are not restrictive. Various embodiments are described throughout this article, and any type of embodiment may be included under any section / subsection. In addition, the embodiments described in any section / subsection may be combined in any manner with any other embodiments described in the same section / subsection and / or different sections / subsections.

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

[0024] 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 be included below. The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may be included below.

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

[0026] A "neural network" is a machine learning network based on deep learning. A neural network is capable of processing inputs and providing corresponding outputs, 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.

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

[0028] Figure 1 A schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented is shown. The environment 100 involves a dialog system 110, which can support interaction with a user 145. For example, the dialog system 110 can support the user 145 to ask questions in natural language, and can provide answers to the questions to the user 145. The user 145 can be referred to as an end user of the dialog system 110.

[0029] In some embodiments, the dialogue system 110 may include or be implemented as a digital assistant 122. The digital assistant 122 may be configured to have an intelligent dialogue. As an example, the digital assistant 122 may be configured as an independently running application, such as a web application or other types of applications. As another example, the digital assistant 122 may be configured within the application as part of the application. In such an example, the digital assistant 122 and the application may be considered as the same application. The digital assistant 122 is provided to assist users in various task processing requirements in different applications and scenarios. In the interactive process with the digital assistant 122, the user inputs an interactive message, and the digital assistant 122 provides a reply message in response to the user input. Typically, the digital assistant 122 can support users to input questions in a natural language, and perform tasks and provide replies based on the understanding of the natural language input and the ability of logical reasoning. The digital assistant 122 or at least a portion thereof may be implemented as an intelligent agent. In this article, digital assistants and agents are used interchangeably.

[0030] For each user 145, the client of the dialogue system 110 may present an interaction window 142 of the digital assistant 122 in the client interface, such as a dialogue window with the digital assistant 122. The user 145 may enter a message in the dialogue window, and the dialogue system 110 may determine a reply message of the digital assistant 122 and present it to the user 145 in the interaction window 142. In some embodiments, the interaction messages of the dialogue system 110 may include messages in multimodal forms, such as text messages (e.g., natural language text), voice messages, image messages, video messages, and the like.

[0031] The dialogue system 110 may be deployed locally on the terminal device of each user 145, and / or may be supported by a server device. For example, the terminal device of the user 145 may run a client of the dialogue system 110, which may support the interaction between the user and the part provided by the server. In the case where the dialogue system 110 runs locally on the user's terminal device, the user 145 may directly interact with the local dialogue system 110 using the terminal device. In the case where the dialogue system 110 runs on the server device, the server device may provide services to the client running in the terminal device based on the communication connection with the terminal device. The dialogue system 110 may present a corresponding interface to the user 145 based on the operation of the user 145, so as to output and / or receive relevant information to the user 145.

[0032] In some embodiments, at least some of the functions of the dialogue system 110 and / or at least some of the functions of the digital assistant 122 in the dialogue system 110 may be implemented based on models. During the operation of the dialogue system 110, one or more models may be called, such as the model 155. In the dialogue system 110, the digital assistant 122 may use the model 155 to understand the user input and provide a response to the user based on the output of the model 155.

[0033] Although shown as being independent of the dialogue system 110, one or more models 155 may run on the dialogue system 110, or other remote servers. In some embodiments, the model 155 may be a machine learning model, a deep learning model, a learning model, a neural network, etc. In some embodiments, the model may be based on a language model (LM). The language model can have question-answering capabilities by learning from a large amount of corpus. The model 155 may also be based on other appropriate models.

[0034] The dialogue system 110 can run on appropriate electronic devices. The electronic devices here can be any type of device with computing capabilities, including terminal devices or server devices. The terminal device 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. The server device can include, for example, a computing system / server, such as a mainframe, an edge computing node, a computing device in a cloud environment, and the like. In some embodiments, the dialogue system 110 can be implemented based on a cloud service.

[0035] It should be understood that the structure and functionality of environment 100 are described for exemplary purposes only and does not imply any limitation on the scope of the present disclosure.

[0036] Traditionally, a dialogue system can only provide dialogue services to users based on the knowledge or data it has already acquired, and it cannot actively acquire external knowledge. The knowledge that the dialogue system has acquired can be, for example, knowledge stored in a knowledge base. As more knowledge is acquired, the content in the knowledge base will also increase. Traditional dialogue systems often directly add historical information to the knowledge base, which will result in a large amount of knowledge base data, affecting retrieval efficiency and accuracy.

[0037] In view of this, according to an embodiment of the present disclosure, an improved scheme for dialogue interaction is proposed. In the scheme, based on a first user input indicating a first task, a request is generated for a target entity using a first model to instruct the target entity to provide information related to the first task. Based on the target entity's response to the request, an execution result of the first task is provided as a reply to the first user input. Based on the response and the first user input, a knowledge record is generated for storage in a knowledge base, and the knowledge base is used by the first model.

[0038] In this way, the target entity can be used to perform the task indicated by the user input. This helps improve the dialogue interaction capabilities of the dialogue system and improves the accuracy and efficiency of the responses provided by the dialogue system. Furthermore, the response provided by the target entity can be used to summarize knowledge and add it to the knowledge base for subsequent use. On the one hand, this can make up for the lack of the model's own reflective ability, and on the other hand, it can truly allow the model to obtain the domain knowledge hidden behind the answer.

[0039] Some example embodiments of the present disclosure will be described below with continued reference to the accompanying drawings.

[0040] Example Architecture

[0041] Figure 2 Schematic diagram of an architecture 200 for dialog interaction according to some embodiments of the present disclosure is shown. The architecture 200 may be implemented at the dialog system 110. For ease of discussion, reference will be made to Figure 1 The architecture 200 is described with reference to the environment 100 of FIG.

[0042] like Figure 2 As shown, the architecture 200 includes a module 210, which can be used to implement the dialogue system 110 or the digital assistant 122, for example. The module 210 is used to receive a user input 201 from a user. The user input 201 can be any suitable type of user input, including but not limited to text, voice, image, gesture, etc. The module 201 can receive the user input 201 in any suitable manner. For example, the user input 201 can be received via an input box in the interactive window 142.

[0043] The user input 201 may indicate any appropriate task. For example, if the user input 201 includes the text "generate an image", the user input 201 may indicate an image generation task. If the user input 201 includes a question, the user input may indicate a question-answering task. The module 210 may generate a request 220 for the target entity 230 using the first model 211 based on the user input 201 indicating the first task (also referred to as the first user input), to instruct the target entity 230 to provide information related to the first task.

[0044] The request 220 may, for example, instruct the target entity 230 to complete the entire first task. For example, if the first task is a question-answering task for a certain question, the request 220 may instruct the target entity 230 to provide an answer to the question. The request 220 may, for example, instruct the target entity 230 to provide partial information for the first task. For example, if the first task is a question-answering task for a certain question, the request 220 may instruct the target entity 230 to provide relevant information for the question.

[0045] Regarding the specific manner of generating the request 220, in some embodiments, the module 210 may generate a first prompt information (prompt) for the first model 211 based on the first user input. The module 210 may provide the first prompt information to the first model 211. The first model 211 may, for example, generate a model output for the first prompt information based on the first prompt information. The model output may, for example, directly include the request 220. The module 210 may obtain the request 220 outputted by the first model 211.

[0046] Alternatively or additionally, in some embodiments, the model output of the first model 211 may include, for example, a first query for a target database. The module 210 may obtain the first query outputted by the first model 211 and provide the first query to the target database. Alternatively or additionally, the first query may also be directly provided by the first model to the target database. The target database may be a general database or a specific database for the first task. The module 210 may obtain the result for the first query from the target database.

[0047] In response to not obtaining the result of the first query from the target database, the module 210 may generate a request 220 based on the first query and / or the first user input. For example, the module 210 may instruct the first model 211 to generate the request 220. The module 220 may also generate the request 220 in any other appropriate manner, such as by using an executor to generate the request 220, or by using other models to generate the request 220, etc. The present disclosure does not limit the specific request generation method.

[0048] The target entity 230 may include a predetermined user 231 and / or a third model 232 different from the first model. If the first task belongs to the first field, the predetermined user 231 may be, for example, a professional in the first field. For example, if the first task is a question-and-answer task in the field of vehicle maintenance, the predetermined user 231 may be a professional in the field of vehicle maintenance. Similarly, the third model 232 may be a model trained for the first field. For example, the third model 232 may be a specific model in the field of vehicle maintenance. Alternatively or additionally, the third model 232 may also be a model trained for the type of the first task. For example, if the first task is an image generation task, the type of the first task is the type of image generation, and the third model may be an image generation model. The third model 232 may also be, for example, a model with a larger number of parameters. For example, the number of parameters of the third model 232 may be greater than the number of parameters of the first model, the complexity of the third model is higher than that of the first model, and the third model may perform tasks that are more difficult than the first model.

[0049] In some embodiments, the target entity 230 may provide a corresponding response 240 for the received request 220. The response 240 may, for example, include information related to the first task. For example, if the first task is a question-and-answer task for a certain question, the response 240 may include an answer to the question, and an analysis of the answer. The module 210 may, for example, provide the execution result of the first task as a reply to the first user input based on the response 240. For example, if the first task is a question-and-answer task for a certain question, the module 210 may provide an answer to the question as a reply to the first user input. If the first task is an image generation task, the module 210 may provide a generated image as a reply to the first user input. In some embodiments, the module 210 may provide the reply to the user via the interactive window 142.

[0050] In some embodiments, the module 210 may also generate a knowledge record 213 for storage in the knowledge base 212 based on the response 240 and the first user input. The knowledge base 212 may also be a memory for storing historical records. The knowledge base 212 is used by the first model 211. The first model 211 may, for example, execute the first user input based on the content stored in the knowledge base 212. The first model 211 may generate a request 220 or generate a query for a target database only if it is determined that the first user input cannot be executed based on the knowledge base 212.

[0051] In some embodiments, module 210 may generate knowledge record 213 in any appropriate manner. For example, module 210 may generate knowledge record 213 based on a predetermined rule or algorithm. For another example, module 210 may generate knowledge record 213 using second model 214. Second model 214 may be the same model as first model 211 or a different model from first model 211. Second model 214 may also be referred to as a reflective model. Module 210 may generate second prompt information for second model 214 based on response 240 and first user input. The second prompt information may instruct second model 214 to extract knowledge related to the first task from response 240. Module 210 may then provide the second prompt information to second model 214 to obtain knowledge record 213. Thus, knowledge record may be extracted based on the content obtained from target entity 230, and if first model 211 encounters the same type of task again in the future, it may directly perform the task based on its own knowledge base. This may enable dialogue system 110 / digital assistant 122 to continuously obtain external information and continuously improve its own dialogue interaction capabilities. In addition, the knowledge records are obtained through extraction, which avoids the situation where all the content is stored as knowledge records in the knowledge base, can reduce the amount of data to be stored, and improve the efficiency of the first model in retrieving the knowledge base.

[0052] It should be noted that if module 210 can obtain the result for the first query from the target knowledge base, module 210 can directly provide the execution result of the first task as a response to the first user input. Module 210 does not need to generate request 220, let alone obtain response 240 and obtain knowledge record 213.

[0053] Regarding the training method of the first model 211, the first model 211 can be trained at the electronic device where the dialogue system 110 runs. The first model 211 can also be trained at other electronic devices other than the electronic device where the dialogue system 110 runs. In this case, the electronic device 110 trained by the dialogue system 110 can obtain the trained first model 211, or, via a communication connection with other electronic devices, perform dialogue interaction with the trained first model 211 deployed at other electronic devices. For ease of description, the electronic device that trains the first model 211 is referred to as a training device below.

[0054] The training device may obtain a training sample including a reference user input indicating a reference task and a reference execution result of the reference task. The training device generates a processing result for the reference user input using the first model 211, and determines a feedback score for the training sample based on the reference execution result and the processing result.

[0055] Regarding the specific method of determining the feedback score, the training device may assign a first score as the feedback score in response to the processing result including the execution result of the reference task and the included execution result matching the reference execution result. The training device may assign a second score as the feedback score in response to the processing result including the execution result of the reference task and the included execution result not matching the reference execution result. The training device may also assign a third score as the feedback score in response to the processing result indicating a request for information related to the reference task from the target entity. The first score here is higher than the third score, and the third score is higher than the second score. For example, the first score may be 1, the third score may be 0.8, and the second score may be 0.

[0056] Exemplarily, if the reference task is a question-answering task, the training device may determine that the corresponding feedback score is 1 in response to the first model 211 being able to directly determine the answer to the question, and the answer is correct. The training device may determine that the corresponding feedback score is 0 in response to the first model 211 determining that the answer is wrong. The training device may determine that the corresponding feedback score is 0.8 in response to the first model 211 needing to generate a request to determine the answer to the question with the help of a target entity or a target database.

[0057] The training device 110 may obtain the feedback score of the first model 211 for one or more training samples, and update the model parameters of the first model according to the feedback score. The update goal is to improve the feedback score as much as possible. For example, if there are 100 training samples in total, the update goal is to make the sum of the feedback scores of the 100 training samples as close to 100 as possible.

[0058] In addition to the above training methods, the training device can also use other training methods to train the first model. For example, the training device can also use traditional supervised training methods to train the first model. The present disclosure does not limit the specific training method.

[0059] Figure 3 A schematic diagram of an example 300 for dialog interaction according to some embodiments of the present disclosure is shown. Example 300 may be executed at the dialog system 110 or the digital assistant 122. The following is an exemplary description of example 300 being executed at the dialog system 110.

[0060] At block 301 , the dialog system 110 receives user input from a user.

[0061] At block 302 , the dialog system 110 starts a new dialog in response to receiving user input. The dialog system 110 can start the new dialog in the interaction window 142 , for example.

[0062] At block 303 , the dialog system 110 may search a knowledge base based on user input.

[0063] If the dialog system 110 can retrieve content associated with the task indicated by the user input in the knowledge base, the dialog system 110 executes block 304. At block 304, the dialog system 110 provides a response to the user input based on the content retrieved from the knowledge base.

[0064] If the dialogue system 110 cannot retrieve the content associated with the task indicated by the user input in the knowledge base, the dialogue system 110 can determine on its own whether to execute box 305 or box 306. In some embodiments, the dialogue system 110 can receive user configuration in advance and determine the priority of box 305 and box 306 based on the user configuration. If the priority of box 305 is higher, the dialogue system 110 can prioritize the execution of box 305. Similarly, if the priority of box 306 is higher, the dialogue system 110 can prioritize the execution of box 306. It can be understood that the dialogue system 110 can determine whether to execute box 305 or box 306 first based on any appropriate method, and the present disclosure does not limit the specific determination method.

[0065] At block 305, the dialog system 110 may generate a request for the target entity and determine a response to the user input with the help of the target entity. For example, the dialog system 110 may generate a request for the target entity based on the user input using the first model, and provide a response to the user input based on the target entity's response to the request.

[0066] At block 306, the dialogue system 110 may search the database. Specifically, the dialogue system 110 may generate prompt information for the first model based on the user input. The dialogue system 110 may provide the prompt information to the first model to obtain a query for the database output by the first model. The dialogue system 110 may obtain a result for the query from the database.

[0067] At block 307 , the dialog system 110 may provide a reply to the user input based on the result of the query in response to obtaining the result from the database.

[0068] At block 308, the dialog system 110 may generate a request for a target entity based on at least one of the query or the user input in response to not obtaining a result of the first query from the target database. Similar to block 305, the dialog system 110 may determine a response to the user input with the help of the target entity.

[0069] Thus, based on the search results of the knowledge base, it can be determined whether the task needs to be performed with the help of the target entity or target database. This enables the dialogue system 110 to automatically seek help from the outside world (such as the target entity or target database), which helps to improve the dialogue interaction capability of the dialogue system.

[0070] In summary, according to the embodiments of the present disclosure, the target entity can be used to perform the task indicated by the user input. This helps to improve the dialogue interaction capability of the dialogue system and improve the accuracy and efficiency of the responses provided by the dialogue system. Furthermore, the response provided by the target entity can be used to summarize knowledge to add it to the knowledge base for subsequent use. In addition, the amount of data included in the summarized knowledge will be smaller than the amount of data in the response itself, which helps to reduce the amount of data stored in the knowledge base and improve the efficiency and accuracy of retrieving the knowledge base. On the one hand, this can make up for the lack of the model's own reflective ability, and on the other hand, it can truly allow the model to obtain the domain knowledge hidden behind the answer.

[0071] Example Process

[0072] Figure 4 4 is a flowchart of a process 400 for dialog interaction according to some embodiments of the present disclosure. The process 400 may be implemented at the dialog system 110. For ease of discussion, reference will be made to Figure 1 The process 400 is described with reference to the environment 100 of FIG.

[0073] In block 410 , the dialog system 110 generates a request for a target entity using a first model based on a first user input indicating a first task to instruct the target entity to provide information related to the first task.

[0074] In block 420 , the dialog system 110 provides an execution result of the first task as a reply to the first user input based on the response of the target entity to the request.

[0075] At block 430 , the dialog system 110 generates a knowledge record for storage in a knowledge base based on the response and the first user input, the knowledge base being used by the first model.

[0076] In some embodiments, generating a request for a target entity includes: generating first prompt information for a first model based on a first user input; and providing the first prompt information to the first model to obtain a request output by the first model.

[0077] In some embodiments, generating a request for a target entity includes: generating first prompt information for a first model based on a first user input; providing the first prompt information to the first model to obtain a first query for a target database output by the first model; and in response to not obtaining a result of the first query from the target database, generating a request based on at least one of the first query or the first user input.

[0078] In some embodiments, generating a knowledge record for storage in a knowledge base includes: generating second prompt information for a second model based on the response and the first user input, the second prompt information instructing the second model to extract knowledge related to the first task from the response; and providing the second prompt information to the second model to obtain the knowledge record.

[0079] In some embodiments, the target entity includes at least one of: a third model different from the first model, or a predetermined user.

[0080] In some embodiments, the third model satisfies at least one of the following conditions: the number of parameters of the third model is greater than that of the first model, or the third model is trained for the type of the first task.

[0081] In some embodiments, process 400 also includes: generating a second query for the target database using the first model based on a second user input indicating a second task; and providing an execution result of the second task as a response to the second user input based on a result of the second query obtained from the target database.

[0082] In some embodiments, the first model is trained as follows: obtaining a training sample, the training sample including a reference user input indicating a reference task and a reference execution result of the reference task; using the first model, generating a processing result for the reference user input; determining a feedback score for the training sample based on the reference execution result and the processing result; and updating the model parameters of the first model according to the feedback score.

[0083] In some embodiments, determining a feedback score for a processing result includes: in response to the processing result including an execution result of a reference task and the included execution result matches the reference execution result, assigning a first score as a feedback score; in response to the processing result including an execution result of a reference task and the included execution result does not match the reference execution result, assigning a second score as a feedback score; and in response to the processing result indicating a request for information related to the reference task to a target entity, assigning a third score as a feedback score, wherein the first score is higher than the third score, and the third score is higher than the second score.

[0084] Example devices and equipment

[0085] Figure 5A schematic structural block diagram of an apparatus 500 for dialog interaction according to some embodiments of the present disclosure is shown. The apparatus 500 may be implemented as or included in the dialog system 110. Each module / component in the apparatus 500 may be implemented by hardware, software, firmware, or any combination thereof.

[0086] As shown in the figure, the device 500 includes a request generation module 510, which is configured to generate a request for a target entity based on a first user input indicating a first task, using a first model, to instruct the target entity to provide information related to the first task. The device 500 also includes a reply providing module 520, which is configured to provide an execution result of the first task as a reply to the first user input based on the target entity's response to the request. The device 500 also includes a record generation module 530, which is configured to generate a knowledge record for storage in a knowledge base based on the response and the first user input, and the knowledge base is used by the first model.

[0087] In some embodiments, the request generation module 510 includes: a first information generation module, configured to generate first prompt information for the first model based on a first user input; and a first request generation module, configured to provide the first prompt information to the first model to obtain a request for the first model output.

[0088] In some embodiments, the request generation module 510 includes: a second information generation module, configured to generate first prompt information for the first model based on the first user input; a first query generation module, configured to provide the first prompt information to the first model to obtain a first query for the target database output by the first model; and a second request generation module, configured to generate a request based on at least one of the first query or the first user input in response to not obtaining the result of the first query from the target database.

[0089] In some embodiments, the record generation module 530 includes: a third information generation module, configured to generate second prompt information for the second model based on the response and the first user input, the second prompt information instructing the second model to extract knowledge related to the first task from the response; and a first record acquisition module, configured to provide the second prompt information to the second model to obtain a knowledge record.

[0090] In some embodiments, the target entity includes at least one of: a third model different from the first model, or a predetermined user.

[0091] In some embodiments, the third model satisfies at least one of the following conditions: the number of parameters of the third model is greater than that of the first model, or the third model is trained for the type of the first task.

[0092] In some embodiments, the device 500 also includes: a second query generation module, configured to generate a second query for the target database based on a second user input indicating a second task and using the first model; and a first answer providing module, configured to provide an execution result of the second task as a reply to the second user input based on the result of the second query obtained from the target database.

[0093] In some embodiments, the first model is trained as follows: obtaining a training sample, the training sample including a reference user input indicating a reference task and a reference execution result of the reference task; using the first model, generating a processing result for the reference user input; determining a feedback score for the training sample based on the reference execution result and the processing result; and updating the model parameters of the first model according to the feedback score.

[0094] In some embodiments, determining a feedback score for a processing result includes: in response to the processing result including an execution result of a reference task and the included execution result matches the reference execution result, assigning a first score as a feedback score; in response to the processing result including an execution result of a reference task and the included execution result does not match the reference execution result, assigning a second score as a feedback score; and in response to the processing result indicating a request for information related to the reference task to a target entity, assigning a third score as a feedback score, wherein the first score is higher than the third score, and the third score is higher than the second score.

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

[0096] 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 dialogue system 110 in .

[0097] 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 6The 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 The dialogue system 110 or Figure 5 Device 500.

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

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

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

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

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

[0103] According to an exemplary implementation 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 implementation 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.

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

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

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

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

[0108] 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 market, or to enable other persons of ordinary skill in the art to understand the various implementations disclosed herein.

Claims

1. A conversation interaction method, comprising: Based on a first user input indicating a first task, using a first model, generating a request to a target entity to instruct the target entity to provide information related to the first task; Based on a response of the target entity to the request, providing an execution result of the first task as a reply to the first user input; as well as Based on the response and the first user input, a knowledge record is generated for storage in a knowledge base, the knowledge base being used by the first model.

2. The method of claim 1 , wherein generating a request for the target entity comprises: Based on the first user input, generate first prompt information for the first model; as well as The first prompt information is provided to the first model to obtain the request output by the first model.

3. The method of claim 1 , wherein generating a request for the target entity comprises: Based on the first user input, generate first prompt information for the first model; Providing the first prompt information to the first model to obtain a first query for a target database output by the first model; as well as In response to not obtaining a result of the first query from the target database, the request is generated based on at least one of the first query or the first user input.

4. The method of claim 1, wherein generating a knowledge record for storage in a knowledge base comprises: Based on the response and the first user input, generating second prompt information for a second model, the second prompt information instructing the second model to extract knowledge related to the first task from the response; as well as The second prompt information is provided to the second model to obtain the knowledge record.

5. The method according to claim 1, wherein the target entity comprises at least one of the following: a third model different from the first model, or Booked user.

6. The method according to claim 5, wherein the third model satisfies at least one of the following conditions: The third model has a larger number of parameters than the first model, or The third model is trained for the type of the first task.

7. The method according to claim 1, further comprising: Based on a second user input indicating a second task, generating a second query for the target database using the first model; as well as Based on the result of the second query obtained from the target database, an execution result of the second task is provided as a reply to the second user input.

8. The method of claim 1, wherein the first model is trained as follows: Acquire a training sample, wherein the training sample includes a reference user input indicating a reference task and a reference execution result of the reference task; generating, using the first model, a processing result for the reference user input; Determining a feedback score for the training sample based on the reference execution result and the processing result; as well as According to the feedback score, model parameters of the first model are updated.

9. The method of claim 8, wherein determining a feedback score for the processing result comprises: In response to the processing result including an execution result of the reference task and the included execution result matches the reference execution result, assigning a first score as the feedback score; In response to the processing result including an execution result of the reference task and the included execution result not matching the reference execution result, assigning a second score as the feedback score; as well as in response to the processing result indicating requesting information related to the reference task from the target entity, assigning a third score as the feedback score, The first score is higher than the third score, and the third score is higher than the second score.

10. A device for conversational interaction, comprising: a request generation module configured to generate a request for a target entity based on a first user input indicating a first task and using a first model to instruct the target entity to provide information related to the first task; a reply providing module, configured to provide, based on a response of the target entity to the request, an execution result of the first task as a reply to the first user input; as well as A record generation module is configured to generate a knowledge record for storage in a knowledge base based on the response and the first user input, the knowledge base being used by the first model.

11. 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 10 when executed by the at least one processing unit.

12. 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 10.

13. 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 10.