Dialogue answering method, device and storage medium

The dialogue answering method enhances response accuracy and user experience in group chat scenarios by using preset keywords, trained classifiers, and user personality attributes to determine and send responses at optimal times, addressing the challenges of one-to-many interactions in human-computer dialogue systems.

CN113569029BActive Publication Date: 2024-12-03BEIJING XIAOMI MOBILE SOFTWARE CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110858124.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-28
Publication Date
2024-12-03
Estimated Expiration
2041-07-28

AI Technical Summary

Technical Problem

Existing human-computer dialogue systems face challenges in accurately determining the timing of responses in group chat scenarios, leading to low answer accuracy and poor interaction ability due to one-to-many interactions with multiple users.

Method used

A dialogue answering method that involves acquiring conversation information, determining whether to respond based on preset keywords and trained classifiers, generating response information considering user personality attributes, and sending responses at appropriate times, while adapting to interactions with multiple users.

Benefits of technology

Improves dialogue response accuracy and user experience by ensuring timely and relevant responses in group chat scenarios, enhancing the intelligence and interaction capabilities of chat robots.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113569029B_ABST
    Figure CN113569029B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a method, device and storage medium for dialogue response. The dialogue response method comprises: obtaining dialogue information; judging whether to conduct dialogue response for the dialogue information based on the dialogue information; generating target response information according to the dialogue information when it is determined to conduct dialogue response for the dialogue information; and sending the target response information to complete the response to the dialogue information when the response time arrives. The method disclosed in the present disclosure can accurately respond to the dialogue information at the accurate response time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of human-computer dialogue, and in particular to a dialogue response method, device and storage medium. Background Art

[0002] With the development of Internet technology, information and communication technology, and artificial intelligence technology, the natural convenience of conversational systems has made it a new generation of interaction paradigm. Conversational technology has been applied by the industry to various types of products and services. In the growing application of conversational systems, as AI intelligence gradually improves, people are also beginning to put forward more advanced requirements for conversational systems. Summary of the invention

[0003] In order to overcome the problems existing in the related art, the present disclosure provides a dialogue answering method, device and storage medium to solve the problems existing in the related art.

[0004] According to a first aspect of an embodiment of the present disclosure, a conversation answering method is provided, the method comprising:

[0005] Get conversation information;

[0006] Determining whether to conduct a dialogue response to the dialogue information based on the dialogue information;

[0007] In the case of determining to conduct a dialogue response for the dialogue information, generating target response information according to the dialogue information;

[0008] When the response time is reached, the target response information is sent to complete the response to the dialog information.

[0009] In some embodiments, the determining whether to perform a dialogue response to the dialogue information based on the dialogue information includes:

[0010] Determining whether there is a preset keyword in the conversation information;

[0011] When the preset keyword exists in the dialogue information, it is determined to perform a dialogue response for the dialogue information.

[0012] In some embodiments, the determining whether to perform a dialogue response to the dialogue information based on the dialogue information includes:

[0013] Inputting the dialogue information into a trained answering classifier to obtain an output value output by the answering classifier indicating whether a dialogue response is made with respect to the dialogue information;

[0014] When the output value is greater than a preset threshold, it is determined to perform a dialogue response for the dialogue information.

[0015] In some embodiments, generating target response information according to the dialogue information includes:

[0016] Determining historical personality attribute information of the first user who outputs the conversation information;

[0017] The dialogue information and the historical personality attribute information of the first user are input into the trained dialogue model to obtain the target response information output by the dialogue model.

[0018] In some embodiments, the method further comprises:

[0019] If, before the response time arrives, first response information of the second user in response to the dialog information is detected, new target response information is generated according to the dialog information and the first response information, wherein the new target response information includes the feature information in the first response information;

[0020] The sending of the target response information to complete the response to the dialogue information includes:

[0021] The new target response message is sent to complete the response to the dialog message.

[0022] In some embodiments, generating new target response information according to the conversation information and the first response information includes:

[0023] Acquire historical personality attribute information of the second user who outputs the first response information;

[0024] The conversation information, the historical personality attribute information of the first user, the first response information, and the historical personality attribute information of the second user are input into the trained conversation model to obtain the new target response information output by the conversation model.

[0025] In some embodiments, before generating new target response information according to the conversation information and the first response information, the method further includes:

[0026] Detecting whether the dialogue model has generated the target response information according to the dialogue information and the historical personality attribute information of the first user;

[0027] In the case where it is detected that the dialogue model has not generated the target response information, the operation of the dialogue model to generate the target response information according to the dialogue information and the historical personality attribute information of the first user is interrupted.

[0028] In some embodiments, the response time is determined based on the timestamp of the conversation information and the number of characters in the target response information.

[0029] In some embodiments, before generating target response information according to the dialogue information, the method further includes:

[0030] Extracting the personality attribute information in the dialogue information based on the preset attribute dimension;

[0031] The historical personal attribute information of the first user is updated according to the extracted personal attribute information.

[0032] According to a second aspect of an embodiment of the present disclosure, a conversation answering device is provided, the device comprising:

[0033] An acquisition module, configured to acquire conversation information;

[0034] A determination module, configured to determine whether to perform a dialogue response to the dialogue information based on the dialogue information;

[0035] A first generating module is configured to generate target response information according to the dialogue information when it is determined that a dialogue response is to be performed for the dialogue information;

[0036] The response module is configured to send the target response information to complete the response to the dialogue information when the response time is reached.

[0037] In some embodiments, the determination module includes:

[0038] A determination submodule is configured to determine whether there is a preset keyword in the dialogue information;

[0039] The first determining submodule is configured to determine to make a dialogue response to the dialogue information if the preset keyword exists in the dialogue information.

[0040] In some embodiments, the determination module includes:

[0041] A first input submodule is configured to input the dialogue information into a trained answering classifier to obtain an output value output by the answering classifier indicating whether a dialogue response is made with respect to the dialogue information;

[0042] The second determining submodule is configured to determine to perform a dialogue response for the dialogue information when the output value is greater than a preset threshold.

[0043] In some embodiments, the first generating module includes:

[0044] A first acquisition submodule is configured to determine historical personality attribute information of the first user who outputs the conversation information;

[0045] The second input submodule is configured to input the dialogue information and the historical personality attribute information of the first user into the trained dialogue model to obtain the target response information output by the dialogue model.

[0046] In some embodiments, the apparatus further comprises:

[0047] The second generation module is configured to generate new target response information based on the conversation information and the first response information if a first response information of the second user in response to the conversation information is detected before the response time arrives, wherein the new target response information includes the feature information in the first response information; accordingly, the response module is also configured to send the new target response information to complete the response to the conversation information.

[0048] In some embodiments, the second generation module includes:

[0049] A second acquisition submodule is configured to acquire historical personality attribute information of the second user who outputs the first response information;

[0050] The third input submodule is configured to input the conversation information, the historical personality attribute information of the first user, the first response information, and the historical personality attribute information of the second user into the trained conversation model to obtain the new target response information output by the conversation model.

[0051] In some embodiments, the apparatus further comprises:

[0052] an interruption module, configured to detect whether the dialogue model has generated the target response information according to the dialogue information and the historical personality attribute information of the first user before generating new target response information according to the dialogue information and the first response information;

[0053] In the case where it is detected that the dialogue model has not generated the target response information, the operation of the dialogue model to generate the target response information according to the dialogue information and the historical personality attribute information of the first user is interrupted.

[0054] In some embodiments, the response time is determined based on the timestamp of the conversation information and the number of characters in the target response information.

[0055] In some embodiments, the apparatus further comprises:

[0056] The updating module is configured to extract the personality attribute information in the conversation information based on a preset attribute dimension before generating the target response information according to the conversation information; and update the historical personality attribute information of the first user according to the extracted personality attribute information.

[0057] According to a third aspect of an embodiment of the present disclosure, a conversation answering device is provided, the device comprising:

[0058] processor;

[0059] a memory for storing processor-executable instructions;

[0060] Wherein, the processor is configured to:

[0061] Get conversation information;

[0062] Determining whether to conduct a dialogue response to the dialogue information based on the dialogue information;

[0063] In the case of determining to conduct a dialogue response for the dialogue information, generating target response information according to the dialogue information;

[0064] When the response time is reached, the target response information is sent to complete the response to the dialog information.

[0065] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the conversation answering method provided in the first aspect of the present disclosure are implemented.

[0066] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0067] By acquiring the dialogue information and judging whether to answer the dialogue information based on the dialogue information. This method of judging the timing of answering the dialogue for each dialogue information can improve the accuracy of dialogue answering. In the case of determining to answer the dialogue information, target answering information is generated according to the dialogue information. In the case of reaching the answering time, the target answering information is sent to complete the answering of the dialogue information, which can enhance the dialogue answering effect and improve the user experience. With this method disclosed in the present invention, accurate answering can be performed at an accurate answering time.

[0068] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0070] Figure 1 The figure is a flow chart of a method for answering a conversation according to an exemplary embodiment of the present disclosure.

[0071] Figure 2 It is a structural diagram of a dialogue model according to an exemplary embodiment of the present disclosure.

[0072] Figure 3 The figure is a block diagram of a conversation answering device according to an exemplary embodiment of the present disclosure.

[0073] Figure 4 It is a block diagram of another conversation answering device according to an exemplary embodiment of the present disclosure.

[0074] Figure 5 It is a block diagram of another conversation answering device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0075] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0076] With the development of the Internet, information communication and artificial intelligence technology, the natural convenience of human-computer dialogue systems has made them the next generation of interaction paradigm in the future. Human-computer dialogue technology has been applied to various types of products and services by the industry, such as Apple's Siri, Microsoft's Cortana, Google's Allo, Baidu's DuerOS, Amazon's Echo smart home service system, Alibaba's Xiaomi e-commerce intelligent customer service system, Xiaomi's smart life assistant Xiao Ai, etc. These human-computer dialogue products have brought great convenience to people's daily lives and affected hundreds of millions of consumer users.

[0077] In the ever-growing human-computer dialogue system applications, as AI intelligence gradually improves, people are also beginning to have a need for intelligent assistants to chat and accompany them. They hope that the dialogue robot can accompany, care for, and chat with them like a real person or friend. In addition, they also hope that the dialogue robot can participate in group chats. Group chat scenarios pose new challenges to chat robots. In chat groups, chat robots are no longer one-on-one human-computer interactions with users, but one-to-many interactions with multiple users at the same time.

[0078] The inventor found in the research that a major difference between the group chat mode and the one-to-one human-computer dialogue mode is that there is a "answering" opportunity in the group chat scenario. Specifically, in the group chat scenario, any conversation message sent by a group member may be directed to all members of the group, or it may be directed to some members of the group. For example, when the conversation message includes keywords such as "@all", it indicates that the conversation message may be directed to all members of the group. When the conversation message includes the keyword "@a certain name", it indicates that the conversation message may be directed to the member corresponding to the certain name in the group. When the conversation message does not include the keywords "@all" or "@a certain name", the conversation message may be directed to all or some members of the group. It can be seen that the scene of the chat group puts forward higher intelligence requirements for the chat robot, and the chat robot is required to judge the timing of answering the conversation, so as to accurately answer the conversation message at the appropriate time, thereby avoiding the problem of low answer accuracy or poor interaction ability caused by forcibly answering or not answering each conversation message.

[0079] In view of this, the embodiments of the present disclosure provide a conversation answering method, device and storage medium to solve the above problems.

[0080] Before describing the technical solution of the present invention in detail, it should be stated that the information used in the present invention, such as dialogue information, response information, historical personality attribute information, etc., is obtained or used with the legal authorization of the user.

[0081] Figure 1It is a flowchart of a method for answering a conversation according to an exemplary embodiment. The method for answering a conversation can be applied to an electronic device, for example, a mobile terminal or a server. The mobile terminal includes a mobile phone, a notebook, a tablet computer, a desktop computer, a POS machine, a smart wearable device, a smart TV, a PDA (English: Personal Digital Assistant, Chinese: Personal Digital Assistant), etc. The server includes: a local server and a cloud server. The method for answering a conversation can also be applied to an application preinstalled or installed on the electronic device. The human-computer interaction system for answering a conversation in the application can be called a robot (for the convenience of the description of the subsequent embodiments, the software product corresponding to the method for answering a conversation is called a bot). Bot can be specifically applied to a chat group in an instant messaging software carried on an electronic device, for chatting and interacting with group members; bot can also be applied to social communication software carried on an electronic device, such as a post bar, a forum, a blog, a microblog, etc., for commenting on the dynamics shared by each user (it is worth noting that the scene of commenting on the dynamics shared by each user can also be considered as a group chat scene).

[0082] like Figure 1 As shown, the conversation answering method disclosed in the present invention may specifically include the following steps.

[0083] In step S11, the conversation information is acquired.

[0084] For example, the conversation information may be voice information or text information. When the conversation information is voice information, the electronic device may perform semantic recognition on the conversation information, convert it into text information, and then perform the following steps according to the text information. Alternatively, when the conversation information is text information, the electronic device may perform text conversion on the conversation information to obtain voice information, and then perform the following steps according to the voice information.

[0085] In addition, the dialogue information may be a dialogue information in the form of a question, or may be a dialogue information in the form of a non-question. In this regard, the type of dialogue information disclosed herein is not specifically limited.

[0086] In step S12, it is determined based on the dialog information whether to perform a dialog response to the dialog information.

[0087] In a possible implementation manner, the determining, based on the dialogue information, whether to perform a dialogue response for the dialogue information may include the following steps:

[0088] Determine whether there is a preset keyword in the dialogue information; if the preset keyword exists in the dialogue information, determine to perform a dialogue response for the dialogue information.

[0089] Among them, the preset keywords can be used to indicate the prompt information containing the target user group. The preset keywords represent that the conversation information is an identification word for the conversation with the target user group, or represent the prompt word used to prompt the target user group to pay attention to the conversation information. The preset keywords may include various types of text and special symbols. For example, the preset keywords may include at least one of @all, @someone's name, and a noun. It is worth noting that the @ symbol can be replaced based on the pre-definition of the software system architecture, such as being replaced with the # sign; accordingly, the preset keywords may include at least one of #all and #someone's name. That is to say, the preset keywords in the embodiments of the present disclosure are not limited to @all and @someone's name.

[0090] For example, assuming that the preset keywords include @all, then when the dialogue information is "@all, is it raining outside?", it can be determined that a dialogue response is required for the dialogue information.

[0091] As another example, assuming that the preset keywords include @bot, then when the dialogue information is "@bot, how is the weather tomorrow?", it can be determined that a dialogue response is required for the dialogue information.

[0092] In another possible implementation, the determining, based on the dialogue information, whether to perform a dialogue response for the dialogue information may include the following steps:

[0093] The dialogue information is input into a trained answering classifier to obtain an output value of the answering classifier indicating whether a dialogue response is to be made for the dialogue information; if the output value is greater than a preset threshold, it is determined that a dialogue response is to be made for the dialogue information.

[0094] The call-answering classifier may be a binary classifier. The call-answering classifier may be trained in the following manner: obtaining historical group chat information; dividing the historical group chat information into multiple rounds of chat information groups according to chat topics; for each chat information group, identifying sample conversation information in the chat information group, and marking whether there is sample response information in the chat information group. The call-answering classifier is trained according to the sample conversation information in each chat information group and the marking results to obtain a trained call-answering classifier.

[0095] The conversation classifier can be encoded using the model framework of the BERT encoder in the related art.

[0096] The conversation classifier is specifically used to encode the input dialogue information and input the encoding result into the dense layer. The dense layer outputs an output value representing whether a dialogue response is made for the input dialogue information. The output value is a value between 0 and 1.

[0097] When the preset threshold is 0.5, if the output value is less than or equal to 0.5, it indicates that the input dialogue information is not responded to. Correspondingly, if the output value is greater than 0.5, it indicates that the input dialogue information needs to be responded to.

[0098] In a possible implementation, the above two implementations may be used simultaneously to determine whether to perform a dialogue response to the dialogue information. For example, the method of determining whether to perform a dialogue response to the dialogue information includes the following steps:

[0099] Determine whether there are preset keywords in the dialogue information; if the preset keywords exist in the dialogue information, determine to perform a dialogue response for the dialogue information; if the preset keywords do not exist in the dialogue information, input the dialogue information into a trained answering classifier to obtain an output value of the answering classifier representing whether to perform a dialogue response for the dialogue information; if the output value is greater than a preset threshold, determine to perform a dialogue response for the dialogue information; if the output value is less than or equal to the preset threshold, determine not to perform a dialogue response for the dialogue information.

[0100] In step S13, when it is determined that a dialogue response is to be performed in response to the dialogue information, target response information is generated according to the dialogue information.

[0101] In step S14, when the response time is reached, the target response information is sent to complete the response to the dialogue information.

[0102] In a possible implementation, the response time may be the time when the target response information is generated, so that a quick response can be made to the dialogue information.

[0103] In another possible implementation, the answering time may be the time corresponding to the timestamp of the dialogue information plus a preset time length, wherein the preset time length is adaptively set according to demand.

[0104] In a possible implementation, the response time is determined based on the timestamp of the dialogue information and the number of characters in the target response information.

[0105] For example, a preset correspondence between the number of characters and the preset time can be set, so that the target preset time can be determined according to the number of characters in the target response information and the preset correspondence between the number of characters and the preset time, and the response time can be calculated according to the target preset time and the timestamp of the conversation information. The preset correspondence between the number of characters and the preset time can be determined based on the statistically obtained time of the user actually inputting each character.

[0106] By adopting the dialogue response method disclosed in the present invention, dialogue information is obtained, and based on the dialogue information, it is determined whether to conduct a dialogue response for the dialogue information. This method of determining the timing of answering the call for each dialogue information can improve the accuracy of dialogue response. In the case of determining to conduct a dialogue response for the dialogue information, target response information is generated according to the dialogue information. When the response time is reached, the target response information is sent to complete the response to the dialogue information, which can enhance the dialogue response effect and improve the user experience. By adopting the method disclosed in the present invention, accurate responses can be made at accurate response times.

[0107] In some embodiments, generating target response information according to the dialogue information may include the following steps:

[0108] Determine historical personality attribute information of the first user who outputs the dialogue information; input the dialogue information and the historical personality attribute information of the first user into the trained dialogue model to obtain the target response information output by the dialogue model.

[0109] The user's historical personality attribute information may include age, gender, nationality, education, major, occupation, hobbies, personality, style, books read, opinions expressed, speeches expressed, etc. The user's historical personality attribute information helps to analyze the user's specific personality. In the present disclosure, the historical personality attribute information of the first user is input into the dialogue model, which helps the dialogue model to generate target response information covering the historical personality attribute information of the first user, so that the bot can accompany, care for, chat with, and interact with the first user like a real person or friend.

[0110] In order to improve the accuracy and richness of the user's historical personality attribute information, the personality attribute information in the conversation information can be extracted based on preset attribute dimensions after each acquisition of conversation information and / or before generating target response information based on the conversation information; and the historical personality attribute information of the first user can be updated based on the extracted personality attribute information.

[0111] Among them, there are preset attribute dimensions such as age dimension, preference dimension, event view dimension, gender dimension, nationality dimension, education dimension, major dimension, occupation dimension, personality style dimension, knowledge reserve dimension, published speech dimension, etc.

[0112] For example, assuming that the conversation information is "I am seven and a half years old this year", based on the preset attribute dimension, the personality attribute information "seven and a half years old" in the conversation information is extracted; according to the extracted personality attribute information "seven and a half years old", the information corresponding to the user's age dimension is updated.

[0113] As historical character attribute information is continuously updated, it will become richer and richer. Then, the amount of text corresponding to the historical character attribute information will be larger. In order to input the rich historical character attribute information into the dialogue model, the rich historical character attribute information can be encoded first, and the vector average of each character attribute information is taken as the historical character attribute information input into the dialogue model.

[0114] In a possible implementation, the dialog model in the present disclosure may be similar to the architecture of a speaker-aware dialog model.

[0115] The input information of the dialogue model, namely the dialogue information, and the historical personality attribute information of the first user are both vector information.

[0116] like Figure 2 As shown, the dialogue information can be regarded as the input sequence of the dialogue model. The first computer token (each token represents a unit character) of each input sequence is always a special classification embedding [CLS] symbol, and each subsequent token represents a Chinese character (or word) in the dialogue information. The CLS symbols in the embodiments of the present disclosure all represent special classification embedding [CLS] symbols of the dialogue model, which are consistent with the classification embedding [CLS] symbols in the BERT model of the related art.

[0117] Further, continue to refer to Figure 2 In the present disclosure, the input vector input embeddings of the dialogue module is the sum of the unit character vector token embeddings, the segmentation vector segmentation embeddings, the position vector positionembeddings and the user historical personality attribute vector speaker embedding. Among them, tokenembeddings, segmentation embeddings and position embeddings are the results of encoding the dialogue information. Speaker embedding represents the historical personality attribute information of the first user after encoding. It is worth explaining that, among them, token embeddings are word (character) vectors, segment embeddings are used to distinguish the corresponding vector parts in the dialogue information and the content inserted into the vector input embeddings, or segment embeddings are used to distinguish multiple sentences (multiple sentences of the same user or multiple sentences of multiple users), and position embedding is used to carry the position information of each token.

[0118] In addition, it is worth mentioning that the dialogue model can be trained in the following way:

[0119] Acquire a dialogue information sample and a response information sample corresponding to the dialogue information sample, wherein the dialogue information sample includes at least one user's dialogue information and corresponding historical personality attribute information; train a dialogue model according to the dialogue information sample and the response information sample corresponding to the dialogue information sample to obtain a trained dialogue model.

[0120] In a possible scenario, when the response time is determined based on the timestamp of the conversation information and the number of characters in the target response information, there may be a scenario where the second user (other user) responds first before the response time. In this scenario, in order to make the generated target response information have the characteristics of interacting with the first user and the second user at the same time, it is possible to detect whether the second user responds first before the response time. If the first response information of the second user responding to the conversation information is detected before the response time arrives, new target response information is generated based on the conversation information and the first response information, wherein the new target response information includes the characteristic information in the first response information; accordingly, sending the target response information to complete the response to the conversation information includes: sending the new target response information to complete the response to the conversation information.

[0121] For example, suppose the dialogue message input by the first user is: "Did everyone get wet in the rain? @all". The first response message of the second user is: "No". Then the new target response message generated by the above method of the present disclosure may be "Same as the one above, me too".

[0122] In some embodiments, if the first response information of the second user in response to the dialogue information is detected, the method of continuing to detect whether the information input by the second user is the first response information can be specifically a method of detecting the relevance between the information input by the second user and the context. Alternatively, the information input by the second user is input into a call classifier for classification, and if it is determined that the information input by the second user is a response, it is then detected whether the information input by the second user is associated with the dialogue information. If it is determined that the information input by the second user is associated with the dialogue information, it can be determined that the information input by the second user is the first response information.

[0123] If before the response time, multiple pieces of first response information in which multiple users respond to the dialog information are detected, new target response information is generated according to the dialog information and the multiple pieces of first response information.

[0124] The dialogue information samples for training the dialogue model may include the dialogue information of the first user and the corresponding historical personality attribute information, the response information of the second user and the corresponding historical personality attribute information.

[0125] In some implementations, generating new target response information according to the dialogue information and the first response information may specifically include the following steps:

[0126] Obtain historical personality attribute information of the second user who outputs the first response information; input the conversation information, the historical personality attribute information of the first user, the first response information, and the historical personality attribute information of the second user into the trained conversation model to obtain the new target response information output by the conversation model.

[0127] Furthermore, before executing the step of generating new target response information based on the conversation information and the first response information, if it is detected that the conversation model has not yet generated the target response information based on the conversation information and the historical personality attribute information of the first user, the operation of the conversation model generating the target response information based on the conversation information and the historical personality attribute information of the first user can be interrupted, and then the step of generating new target response information based on the conversation information and the first response information is executed.

[0128] Among them, the updating method of the historical personality attribute information of the second user is consistent with the updating method of the historical personality attribute information of the first user mentioned above, and will not be repeated here.

[0129] In addition, after generating new target response information, the response time may be recalculated based on the timestamp of the first response information (or the timestamp of the dialog information) and the new target response information, or the response time may be directly updated to the time when the new target response information is generated.

[0130] In a possible implementation, after the conversation information, the historical personality attribute information of the first user, the first response information, and the historical personality attribute information of the second user are input into the trained conversation model, the conversation model can first use the first user as the response object of the target response information based on the first user tag of the conversation information, and generate and output the target response information for the response object. For example, the target response information can include the keyword "@first user".

[0131] In another possible implementation, after the dialogue information, the historical personality attribute information of the first user, the first response information, and the historical personality attribute information of the second user are input into the trained dialogue model, the dialogue model can first generate target response information. If the generated target response information covers semantic information that agrees with or disagrees with the second user's point of view, the second user can be used as the response object of the target response information, and the target response information is output for the response object. In this case, the target response information can include the keyword "@second user". If the generated target response information does not cover semantic information that agrees with or disagrees with the second user's point of view, the target response information is output for the first user. In this case, the target response information can include the keyword "@first user".

[0132] In another possible implementation, after the dialogue information, the historical personality attribute information of the first user, the first response information, and the historical personality attribute information of the second user are input into the trained dialogue model, the dialogue model can first use the first user as the response object of the target response information based on the first user tag of the dialogue information, and generate the target response information for the response object. Determine whether the semantics of the target response information covers the agreement or disagreement with the second user's point of view. If the target response information covers the semantic information of agreement or disagreement with the second user's point of view, the second user is set as a new response object, and the target response information is output for the second user. In this case, the target response information may include the keyword "@second user". If the target response information does not cover the semantic information of agreement or disagreement with the second user's point of view, the target response information is output for the first user. In this case, the target response information may include the keyword "@first user".

[0133] Figure 3 FIG. 1 is a block diagram of a conversation answering device according to an exemplary embodiment. Figure 3 The dialogue answering device 300 includes an acquisition module 310, a judgment module 320, a first generation module 330 and a response module 340.

[0134] The acquisition module 310 is configured to acquire conversation information.

[0135] The determination module 320 is configured to determine whether to perform a dialogue response to the dialogue information based on the dialogue information.

[0136] The first generating module 330 is configured to generate target response information according to the dialogue information when it is determined that a dialogue response is to be performed in response to the dialogue information.

[0137] The response module 340 is configured to send the target response information to complete the response to the dialogue information when the response time is reached.

[0138] By adopting the device disclosed in the present invention, the conversation information is obtained, and based on the conversation information, it is determined whether to respond to the conversation information. This method of judging the timing of answering the conversation for each conversation information can improve the accuracy of the conversation response. In the case of determining to respond to the conversation information, target response information is generated according to the conversation information. When the response time is reached, the target response information is sent to complete the response to the conversation information, which can enhance the conversation response effect and improve the user experience. By adopting the method disclosed in the present invention, accurate responses can be made at accurate response times.

[0139] In some embodiments, the determination module 320 includes:

[0140] A determination submodule is configured to determine whether there is a preset keyword in the dialogue information;

[0141] The first determining submodule is configured to determine to make a dialogue response to the dialogue information if the preset keyword exists in the dialogue information.

[0142] In some embodiments, the determination module 320 includes:

[0143] A first input submodule is configured to input the dialogue information into a trained answering classifier to obtain an output value output by the answering classifier indicating whether a dialogue response is made with respect to the dialogue information;

[0144] The second determining submodule is configured to determine to perform a dialogue response for the dialogue information when the output value is greater than a preset threshold.

[0145] In some embodiments, the first generating module 330 includes:

[0146] A first acquisition submodule is configured to determine historical personality attribute information of the first user who outputs the conversation information;

[0147] The second input submodule is configured to input the dialogue information and the historical personality attribute information of the first user into the trained dialogue model to obtain the target response information output by the dialogue model.

[0148] In some embodiments, the apparatus 300 further includes:

[0149] The second generation module is configured to generate new target response information based on the conversation information and the first response information if a first response information of the second user in response to the conversation information is detected before the response time arrives, wherein the new target response information includes the feature information in the first response information; accordingly, the response module is also configured to send the new target response information to complete the response to the conversation information.

[0150] In some embodiments, the second generation module includes:

[0151] A second acquisition submodule is configured to acquire historical personality attribute information of the second user who outputs the first response information;

[0152] The third input submodule is configured to input the conversation information, the historical personality attribute information of the first user, the first response information, and the historical personality attribute information of the second user into the trained conversation model to obtain the new target response information output by the conversation model.

[0153] In some embodiments, the apparatus 300 further includes:

[0154] an interruption module, configured to detect whether the dialogue model has generated the target response information according to the dialogue information and the historical personality attribute information of the first user before generating new target response information according to the dialogue information and the first response information;

[0155] In the case where it is detected that the dialogue model has not generated the target response information, the operation of the dialogue model to generate the target response information according to the dialogue information and the historical personality attribute information of the first user is interrupted.

[0156] In some embodiments, the response time is determined based on the timestamp of the conversation information and the number of characters in the target response information.

[0157] In some embodiments, the apparatus 300 further includes:

[0158] The updating module is configured to extract the personality attribute information in the conversation information based on a preset attribute dimension before generating the target response information according to the conversation information; and update the historical personality attribute information of the first user according to the extracted personality attribute information.

[0159] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0160] The present disclosure also provides a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, implement the steps of the conversation answering method provided by the present disclosure.

[0161] Figure 4 8 is a block diagram of a device 800 for answering a conversation according to an exemplary embodiment. For example, the device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0162] Reference Figure 4 , the device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .

[0163] The processing component 802 generally controls the overall operation of the device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned conversation answering method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0164] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0165] The power component 806 provides power to the various components of the device 800. The power component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 800.

[0166] The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0167] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the device 800 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.

[0168] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.

[0169] The sensor assembly 814 includes one or more sensors for providing various aspects of the status assessment of the device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the device 800, and the sensor assembly 814 can also detect the position change of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration / deceleration of the device 800, and the temperature change of the device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0170] The communication component 816 is configured to facilitate wired or wireless communication between the device 800 and other devices. The device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0171] In an exemplary embodiment, the apparatus 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above-mentioned conversation answering method.

[0172] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by the processor 820 of the device 800 to complete the above-mentioned conversation answering method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0173] In another exemplary embodiment, a computer program product is also provided. The computer program product includes a computer program that can be executed by a programmable device, and the computer program has a code portion for executing the above-mentioned dialogue answering method when executed by the programmable device.

[0174] Figure 5 1 is a block diagram of a device 1900 for dialogue answering according to an exemplary embodiment. For example, the device 1900 may be provided as a server. Figure 5 , the apparatus 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions, such as an application, that can be executed by the processing component 1922. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the steps of the above-mentioned dialogue answering method.

[0175] The device 1900 may also include a power supply component 1926 configured to perform power management of the device 1900, a wired or wireless network interface 1950 configured to connect the device 1900 to a network, and an input / output (I / O) interface 1958. The device 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server 2000. TM , MacOS X TM , Unix TM , Linux TM , FreeBSD TM or similar.

[0176] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. This application is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0177] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A conversation answering method, characterized in that: The method comprises: Get conversation information; Determining whether to conduct a dialogue response to the dialogue information based on the dialogue information; In the case of determining to conduct a dialogue response for the dialogue information, generating target response information according to the dialogue information; The generating target response information according to the dialogue information comprises: Determining historical personality attribute information of the first user who outputs the conversation information; Inputting the conversation information and the historical personality attribute information of the first user into the trained conversation model to obtain the target response information output by the conversation model; When the response time is reached, sending the target response information to complete the response to the dialogue information; The method further comprises: If, before the response time arrives, first response information of the second user in response to the dialog information is detected, new target response information is generated according to the dialog information and the first response information, wherein the new target response information includes the feature information in the first response information; The sending of the target response information to complete the response to the dialogue information includes: Sending the new target response information to complete the response to the dialogue information; Before generating new target response information according to the dialogue information and the first response information, the method further includes: Detecting whether the dialogue model has generated the target response information according to the dialogue information and the historical personality attribute information of the first user; In the case where it is detected that the dialogue model has not generated the target response information, the operation of the dialogue model to generate the target response information according to the dialogue information and the historical personality attribute information of the first user is interrupted.

2. The method according to claim 1, characterized in that: The determining whether to perform a dialogue response to the dialogue information based on the dialogue information includes: Determining whether there is a preset keyword in the conversation information; When the preset keyword exists in the dialogue information, it is determined to perform a dialogue response for the dialogue information.

3. The method according to claim 1, characterized in that The determining whether to perform a dialogue response to the dialogue information based on the dialogue information includes: Inputting the dialogue information into a trained answering classifier to obtain an output value output by the answering classifier indicating whether a dialogue response is made with respect to the dialogue information; When the output value is greater than a preset threshold, it is determined to perform a dialogue response for the dialogue information.

4. The method according to claim 1, characterized in that: The generating new target response information according to the dialogue information and the first response information includes: Acquire historical personality attribute information of the second user who outputs the first response information; The conversation information, the historical personality attribute information of the first user, the first response information, and the historical personality attribute information of the second user are input into the trained conversation model to obtain the new target response information output by the conversation model.

5. The method according to claim 1, characterized in that The response time is determined based on the timestamp of the dialogue information and the number of characters in the target response information.

6. The method according to claim 1, characterized in that Before generating target response information according to the dialogue information, the method further includes: Extracting the personality attribute information in the dialogue information based on the preset attribute dimension; The historical personal attribute information of the first user is updated according to the extracted personal attribute information.

7. A conversation answering device, characterized in that: The device comprises: An acquisition module, configured to acquire conversation information; A determination module, configured to determine whether to perform a dialogue response to the dialogue information based on the dialogue information; A first generating module is configured to generate target response information according to the dialogue information when it is determined that a dialogue response is to be performed for the dialogue information; The first generating module comprises: A first acquisition submodule is configured to determine historical personality attribute information of a first user who outputs the conversation information; A second input submodule is configured to input the dialogue information and the historical personality attribute information of the first user into the trained dialogue model to obtain the target response information output by the dialogue model; A response module, configured to send the target response information to complete the response to the dialogue information when the response time is reached; The device also includes: The second generating module is configured to generate new target response information according to the dialog information and the first response information if the first response information of the second user in response to the dialog information is detected before the response time arrives, wherein the new target response information includes the feature information in the first response information; correspondingly, the response module is further configured to send the new target response information to complete the response to the dialog information; The device also includes: an interruption module, configured to detect whether the dialogue model has generated the target response information according to the dialogue information and the historical personality attribute information of the first user before generating new target response information according to the dialogue information and the first response information; In the case where it is detected that the dialogue model has not generated the target response information, the operation of the dialogue model to generate the target response information according to the dialogue information and the historical personality attribute information of the first user is interrupted.

8. A conversation answering device, characterized in that: The device comprises: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to: Get conversation information; Determining whether to conduct a dialogue response to the dialogue information based on the dialogue information; In the case of determining to conduct a dialogue response for the dialogue information, generating target response information according to the dialogue information; The generating target response information according to the dialogue information comprises: Determining historical personality attribute information of the first user who outputs the conversation information; Inputting the conversation information and the historical personality attribute information of the first user into the trained conversation model to obtain the target response information output by the conversation model; When the response time is reached, sending the target response information to complete the response to the dialogue information; If, before the response time arrives, first response information of the second user in response to the dialog information is detected, new target response information is generated according to the dialog information and the first response information, wherein the new target response information includes the feature information in the first response information; The sending of the target response information to complete the response to the dialogue information includes: Sending the new target response information to complete the response to the dialogue information; Before generating new target response information according to the dialogue information and the first response information, the method further includes: Detecting whether the dialogue model has generated the target response information according to the dialogue information and the historical personality attribute information of the first user; In the case where it is detected that the dialogue model has not generated the target response information, the operation of the dialogue model to generate the target response information according to the dialogue information and the historical personality attribute information of the first user is interrupted.

9. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the steps of the method described in any one of claims 1 to 6 are implemented.