Generating responses in a conversation

By capturing user and environmental signals in the chatbot and determining response patterns to generate expressive responses, the problem of unfriendly chatbot conversations is solved and a more communicative and intelligent interactive experience is achieved.

CN111971670BActive Publication Date: 2024-09-03MICROSOFT TECHNOLOGY LICENSING LLC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201880092289.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-11-02
Publication Date
2024-09-03
Estimated Expiration
2038-11-02

AI Technical Summary

Technical Problem

Existing chatbots lack consideration of environmental signals and conversation patterns during conversations, resulting in unfriendly interactions with human users and the inability to provide attractive topics and adapt to changes in the conversation environment.

Method used

Simulate the empathy and communication of human conversation by capturing user and environmental signals on the client device and transmitting them to the chat server, determining response patterns to generate expressive responses, including output in the form of voice, images, videos, etc. sex.

Benefits of technology

It achieves a more communicative and intelligent chat experience, can provide friendly dialogue support in different scenarios, such as driving, traveling, jogging, etc., and enhances the interactive experience with users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111971670B
    Figure CN111971670B
Patent Text Reader

Abstract

The present disclosure provides a method and apparatus for generating a response in a conversation. At least one signal may be received from at least one signal source. A text message may be generated based on at least one received signal. A response mode may be determined based at least on the text message. In some implementations, the response mode may indicate an expression style of the response to be generated. A response may be generated based at least on the text message and the response mode.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0001] Artificial intelligence (AI) chatbots are becoming more and more popular and are being applied in more and more scenarios. Chatbots are designed to simulate conversations with people and can chat with users through text, voice, images, etc. Typically, chatbots can scan keywords in messages entered by users or apply natural language processing to messages, and provide users with responses with the most matching keywords or the most similar wording patterns. Summary of the invention

[0002] This summary is provided to introduce a selection of design concepts that are further described in the detailed description below. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.

[0003] Embodiments of the present disclosure provide methods and apparatus for generating responses in a conversation. At least one signal may be received from at least one signal source. Text information may be generated based on at least one received signal. A response mode may be determined based at least on the text information. The response mode may indicate an expression style of a response to be generated. A response may be generated based at least on the text information and the response mode.

[0004] It should be noted that one or more of the above aspects include features that are fully described below and specifically pointed out in the claims. The following description and drawings set forth in detail certain illustrative features of one or more aspects. These features are merely indicative of various ways in which the principles of the various aspects can be used, and the present disclosure is intended to include all such aspects and their equivalents. BRIEF DESCRIPTION OF THE DRAWINGS

[0005] The disclosed aspects will be described hereinafter in conjunction with the accompanying drawings, which are provided for the purpose of illustrating the disclosed aspects rather than limiting them.

[0006] Figure 1 is an exemplary implementation architecture of a dialog according to an embodiment.

[0007] Figure 2 An exemplary general process for generating a response based on a received signal is shown in accordance with an embodiment.

[0008] Figure 3 is a block diagram of an exemplary response generation system according to an embodiment.

[0009] Figure 4 An exemplary response mode determination model is shown according to an embodiment.

[0010] Figure 5An exemplary response generation model with a text attention model is shown according to an embodiment.

[0011] Figure 6 An exemplary process for generating a response based on a speech signal or a text signal is shown according to an embodiment.

[0012] Figure 7 An exemplary process for generating a response based on an image signal is shown according to an embodiment.

[0013] Figure 8 An exemplary spatial attention model is shown according to an embodiment.

[0014] Fig. 9 An exemplary adaptive attention model is shown according to an embodiment.

[0015] Fig.10 An exemplary process for generating a response based on an audio signal is shown in accordance with an embodiment.

[0016] Fig.11 An exemplary process for generating a response based on an image signal and an audio signal is shown according to an embodiment.

[0017] Fig.12 An exemplary conversation window showing a conversation between a user and a chatbot according to an embodiment.

[0018] Fig.13 A flow chart of an exemplary method for generating a response in a conversation is shown according to an embodiment.

[0019] Fig.14 According to an embodiment, an exemplary apparatus for generating a response in a conversation is shown.

[0020] Fig.15 According to an embodiment, an exemplary apparatus for generating a response in a conversation is shown. DETAILED DESCRIPTION

[0021] The present disclosure will now be discussed with reference to several example implementations. It should be understood that these implementations are discussed only to enable those skilled in the art to better understand and thereby implement embodiments of the present disclosure and not to suggest any limitation on the scope of the present disclosure.

[0022] The chatbot can have various conversations with the user, such as chatting with the user, performing tasks requested by the user, etc. Generally, the chatbot can randomly start a topic or maintain a topic based only on the conversation history without considering environmental signals and conversation patterns or expression styles. Therefore, the chatbot may not be very friendly to another participant (e.g., a person) in the conversation.

[0023] In many cases, for example, in a casual chat, when a user feels bored or lonely, it is desirable that a chatbot can accompany the user. Therefore, the chatbot can be designed to have the ability to propose attractive topics for the conversation so as to be more friendly to human users. In addition, considering that in a person-to-person casual chat, topics may be highly triggered by a person based on environmental signals (e.g., when a person sees or hears something interesting), and the conversation mode or expression style may change during the conversation, it is also desirable to make the chatbot have similar behavior to that of a human.

[0024] Embodiments of the present disclosure propose methods and apparatus for generating a response by considering both user signals and environmental signals in a conversation and considering a response pattern indicating an expression style of a response to be generated.

[0025] Examples disclosed herein are directed to methods and apparatus for implementing an interactive chatbot on a client device. Through the disclosed examples, a client device may be equipped with a chatbot that is capable of understanding and interpreting signals received from a user and / or environment, and capable of determining a response pattern indicating an expression style of a response to be generated (which is similar to a response pattern that occurs in a conversation between people), so as to generate a response based at least on the received signal and the response pattern.

[0026] To create an intelligent chatbot, the examples disclosed herein can capture various relevant user and environmental signals on a client device, and transmit the captured user and environmental signals to a chat server to determine a response pattern, and generate a response based at least on the response pattern and the received signals.

[0027] Examples of signals may include, but are not limited to, voice signals from a user, image signals from the environment, and any audio signals from the environment, such as background sound signals including voice signals from other users and / or noise from the environment. In this article, "environmental signals" refer to signals related to the surrounding environment, location, or other activities being performed that are captured by one or more sensors or electronic components of a computing device. For example, environmental signals may include audio signals detected by a microphone of a client device, such as, but not limited to, wind, rain, sounds from other speakers, and car horns or any other noise.

[0028] For example, the sound of rain can be received by a microphone and can be used to generate a text message such as "it is raining". In some examples, the text message can be generated by the client device from the ambient signals and then sent to the chat server. In an alternative example, the ambient signals can be processed by the chat server, which receives these signals from the client device over the network.

[0029] In some examples, the user input signal and the environmental signal are analyzed and / or converted into text information by the client device or the chat server to determine the response mode by the response mode determination module. Herein, the user input signal and the environmental signal can be any form of text signal, image signal, audio signal, video signal or any other detected signal. A response for interacting with a participant (e.g., user) of the conversation can be generated by the response generation module based on the comprehensive text information generated from the user input signal and / or the environmental signal.

[0030] The response output module may be used to select one of the generated responses to be output in the form of text, voice, image, or video, taking into account the relevance between the received signal and the generated response and / or any other factors, such as semantic information extracted from the user's voice signal, text information converted from environmental signals, conversation logs, user profiles, etc. For example, the response output module may select the generated response with the highest relevance score as the response to be output.

[0031] The generated response is not limited to a simple description of the captured image signal, audio signal, video signal, etc., but can also contain the chatbot's emotions and / or opinions, which can be called an "empathic response". A chatbot that can generate such an empathic response can provide a more communicative and intelligent chat experience than those traditional chatbots. Such a chatbot can be applied to various scenarios, such as driving companionship, travel companionship, jogging companionship, etc.

[0032] In the present disclosure, "conversation" or "chat conversation" refers to an electronic interaction between a chatbot and a user, or between a chatbot and a virtual user, such as a sequence of exchanged texts, videos, images, audio, etc. A virtual user may refer to an electronic chat participant.

[0033] As used herein, a "user profile" refers to a collection of electronically stored information about a user. Such information may include the user's name, age, gender, height, weight, demographics, current location, place of residence, citizenship, family, friends, schooling, occupation, hobbies, skills, interests, web searches, health information, birthday, anniversaries, holidays celebrated, moods, and any other personalized information associated with the user.

[0034] Having generally provided an overview of some of the disclosed examples, attention is drawn to the accompanying drawings to further illustrate some additional details. Illustrative configurations and operating sequences are provided to help the reader understand some aspects of the disclosed examples. The accompanying drawings are not meant to limit all examples, and thus some examples may include different components, devices, or operating sequences without departing from the scope of the disclosed examples discussed herein. In other words, some examples may be embodied or function in ways different from those shown.

[0035] Figure 1 It is an exemplary implementation architecture of a dialog according to an embodiment. There may be a client device 100, a user 101, an environment 102 in which a dialog is conducted, a network 103, a chat server 132, and a database 134 involved in the exemplary implementation architecture of the dialog.

[0036] In some examples, client device 100 has at least one processor 106 , a transceiver 108 , one or more presentation components 110 , one or more input / output (I / O) ports 112 , one or more I / O components 114 , and memory 124 .

[0037] The client device 100 may take the form of a mobile computing device or any other portable device, such as a mobile phone, a laptop, a tablet, a computing tablet device, a notebook computer, a gaming device, a portable media player, etc. The client device 100 may also include less portable devices, such as a desktop personal computer, an information kiosk, a desktop device, an industrial control device, a wireless charging station, an electric vehicle charging station, an onboard device, etc. Furthermore, the client device 100 may alternatively take the form of an electronic component of a vehicle, such as a vehicle computer equipped with a microphone or other sensor; or any other computing device.

[0038] Processor 106 may include a variable number of processing units and is programmed to execute computer executable instructions for implementing aspects of the present disclosure. The instructions may be executed by a processor within the client device, or by a processor external to the client device. In some examples, processor 106 is programmed to perform methods according to embodiments of the present disclosure. Additionally or alternatively, processor 106 may be programmed to present the chat in a user interface (“UI”), e.g., Fig.12 The UI shown in .

[0039] The transceiver 108 is an antenna capable of sending and receiving signals. Those skilled in the art will appreciate and understand that a variety of antennas and corresponding chipsets may be used to provide communication capabilities between the client device 100 and other remote devices.

[0040] The presentation component 110 visually or audibly presents information on the client device 100. Examples of the presentation component 110 include, but are not limited to, a computer display screen, a television, a projector, a touch screen, a phone display, a flat panel display, a wearable device screen, a speaker, a vibration device, and any other device configured to display, verbally communicate, or otherwise indicate a chat response to a user.

[0041] The I / O ports 112 allow the client device 100 to be logically coupled to other devices and I / O components 114, some of which may be built into the client device 100 and others may be external. Specific to the examples discussed herein, the I / O components 114 include a microphone 116, one or more sensors 118, a camera 120, and a touch device 122. The microphone 116 captures voice signals from the user 101 and background sound signals from the environment 102 as audio signals. The sensor 118 may include any number of sensors in the client device 100. In addition, the sensor 118 may include an accelerometer, a magnetometer, a pressure sensor, a photometer, a thermometer, a global positioning system (“GPS”) chip or circuit, a barcode scanner, a biometric scanner for scanning fingerprints, palm prints, blood, eyes, etc., a gyroscope, a near field communication (“NFC”) receiver, an odor sensor, or any other sensor configured to capture signals from the user 101 or the environment 102. The camera 120 may capture images or video from the environment 102. Touch device 122 may include a touchpad, trackpad, touch screen, or other touch capture device. Although I / O components 114 are shown as included in client device 100, any of these I / O components may also be external to client device 100.

[0042] Memory 124 includes a variable number of storage devices associated with or accessible by client device 100. Memory 124 may be internal to client device 100 (e.g., Figure 1 As shown), outside the client device 100 ( Figure 1 Examples of memory 124 may include, but are not limited to, random access memory (RAM), read-only memory (ROM), electronically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, CDROM, digital versatile disk (DVD) or other optical or holographic media, magnetic cassettes, magnetic tape, disk storage or other magnetic storage devices, memory connected to an analog computing device, or any other medium for encoding the desired information and for access by client device 100. Memory 124 stores various device applications that, when executed by processor 106, are used to perform functions on computing device 100, as well as other data.

[0043] Specifically, the instructions stored in the memory 124 include a communication interface application 126, a user interface application 128, and a chat application 130. In some examples, the communication interface application 126 includes computer executable instructions for operating a network interface card and / or a driver for operating a network interface card. Communication between the client device 100 and other devices can occur over a wired or wireless connection, or across the network 104, using any protocol or mechanism. In some examples, the communication interface application 126 can use electronic tags (such as NFC tags, Bluetooth brand tags, etc.) to operate using RF and short-range communication technologies.

[0044] In some examples, user interface application 128 includes a graphics application for displaying information to a user and receiving information from a user. User interface application 128 may also include computer executable instructions for operating a graphics card to display chat responses and corresponding images or voices on or through presentation component 110. User interface application 128 may also interact with various sensors 118 to capture and present information through presentation component 110.

[0045] In some examples, chat application 130, when executed, can retrieve user signals and / or environmental signals captured via I / O component 114 and transmit the retrieved user and environmental signals to a remote server, such as chat server 132, via network 104. Chat application 130 can include instructions for determining a response mode on client device 100.

[0046] In other examples, instead of making such a determination on the client device 100, the chat server 132 can operate a server application that is configured to: determine a response mode based on the transmitted user signal and the environmental signal, generate a chat response based at least on the response mode, and transmit the chat response back to the client device 100 for display or output via the presentation component 110. The chat server 132 represents a server or a collection of servers that are configured to execute different network service computer executable instructions. The determination of the response mode can be performed by the chat application 130 in the client device 100 or by the chat server 132.

[0047] Response mode can include various types of modes, for example, positive response mode and negative response mode. As an alternative, response mode can also include at least one of the following: topic initiation mode, topic maintenance mode, topic switching mode, etc. As another alternative, response mode can specifically include at least one of the following: topic initiation statement mode, topic initiation question mode, topic initiation answer mode, topic maintenance statement mode, topic maintenance question mode, topic maintenance answer mode, topic switching statement mode, topic switching question mode, topic switching answer mode, etc. In some implementations, those topic initiation modes can be incorporated into the corresponding topic switching mode as the specific initialization situation of the topic switching mode. For example, the topic initiation statement mode can be incorporated into the topic switching statement mode, the topic initiation question mode can be incorporated into the topic switching question mode, the topic initiation answer mode can be incorporated into the topic switching answer mode, etc.

[0048] In some examples, the response mode can be determined by interpreting, recognizing or analyzing text signals, video signals, image signals, audio signals, touch signals or any other detected signals (e.g., speed signals, odor signals, temperature signals, etc., originating from the user and / or the environment and captured or detected on the client device). In some examples, the audio signal can also be further classified into a voice signal from the user and a background sound signal from the environment.

[0049] For example, the response mode indicates that the expression style of the response to be generated is a topic-maintaining question mode, and the text information is "flower, red". Then, responses such as "Do you think this red flower beautiful?", "Is this red flower a rose?", and "Do you like this red flower?" can be generated based on such a topic-maintaining question mode and text information. The most appropriate response (e.g., "Do you like this red flower?") can be selected from the generated responses to be output to the user.

[0050] The network 104 may include any computer network, such as the Internet, a private network, a local area network (LAN), a wide area network (WAN), etc. The network 104 may include various network interfaces, adapters, modems, and other networking devices for communicatively connecting the client devices 100, the chat server 132, and the database 134.

[0051] The database 134 provides backend storage for web pages, user and context data, which can be accessed by the chat server 132 or the client device 100 via the network 104. The data stored in the database includes, for example, but not limited to, user profiles 136, conversation logs 138, etc. Additionally or alternatively, some or all of the captured user and context data can be sent to the database 134 for storage. For example, information related to user profiles or conversations collected by the chat application 130 on the client device 100 can be stored on the database 134.

[0052] User profile 136 may include any of the previously mentioned data for each user.Conversation log 138 may refer to a conversation history or a record of a conversation.

[0053] It should be understood that although an exemplary client device including several components is described above, any other components may be added to the client device 100, and / or any illustrated components in the client device 100 may be omitted or replaced with other components.

[0054] Figure 2 An exemplary general process 200 for generating a response based on a received signal is shown in accordance with an embodiment.

[0055] At 210, one or more signals may be received from at least one signal source. For example, signals may be received from a participant in a conversation (e.g., user 101) and / or from an environment 102 in which the conversation is conducted. The received signals may include text signals and / or non-text signals, such as a text signal from user 101, a voice signal from user 101, an image signal from environment 102, a background sound signal from environment 102, and any other signal from environment 102. In this context, the non-text signal may include at least one of an image signal, an audio signal, and a video signal, and the audio signal includes at least one of a voice signal and a background sound signal.

[0056] At 220, text information may be generated from the received signal. The text information may refer to at least one of the following: semantic content of text represented by the text signal, semantic content of speech represented by the speech signal, image caption of an image represented by the image signal, properties of a background sound signal, or any other detected signal, etc.

[0057] In some examples, when the received signal is a text signal, the text information may be generated directly from the semantic content of the text signal.

[0058] In some examples, when the received signal is a speech signal, the text information may be generated by identifying the semantic content of the speech signal through speech recognition. Herein, the semantic content of the speech signal may represent what the user is saying.

[0059] In some other examples, when the received signal is an image signal, text information can be generated by performing an image capture process on the received image signal. For example, when the received image signal shows yellow flowers on the roadside, the image description of the image "There are yellow flowers on the roadside" can be used as the text information of the image.

[0060] Still in other examples, when the received signal is a background sound signal, text information can be generated by performing audio analysis on the background sound signal to obtain the properties of the signal as text information. For example, when the background sound signal indicates that the wind is very loud, the property of the background sound signal can be analyzed as "wind, loud", which can be regarded as text information generated from the received background sound signal. In some other examples, when the background sound signal is a sound from other speakers, the property of the background sound signal can be analyzed as "people are speaking", "here is human voice" or "someone is speaking", which can be regarded as text information.

[0061] Additionally or alternatively, one or more signals (e.g., some specific signals) can be selected from the received signals, and text information can be generated from the one or more selected signals. Compared with processing all received signals, it can reduce the processing burden by processing one or more selected signals. The selection operation can be performed based on predefined conditions. In some implementations, such conditions can include at least one of the following: the signal difference between the previously received signal and the currently received signal is higher than a threshold, the signal difference is lower than a threshold, a predefined time period, and a conversation log.

[0062] Herein, the signal difference between the previously received signal and the current signal may be expressed as a signal vector difference between the previously received signal and the currently received signal. The threshold may be preset by the user (e.g., based on his / her preferences), or automatically determined by the chatbot based at least on a user profile and / or a conversation log. For example, in the case where a camera in the chatbot continuously captures images, the chatbot may not need to process each captured image. When the camera captures an image with a flower different from a previously captured image, the signal vector difference between the current image signal and the previous image signal may increase significantly, and the chatbot may select the image with the flower from many captured images for generating text information from the selected image.

[0063] In some implementations, one or more signals may be selected from the received signals for generating text information based on a predefined period. The predefined period may be preset by the user or determined randomly or automatically by the chatbot based at least on the user profile and / or the conversation log. For example, a signal may be selected from the received signals every 10 seconds, every 5 minutes, or based on any other period.

[0064] In some other implementations, one or more signals may be selected from the received signals based on a conversation log of a conversation between a user and a chatbot. For example, when one or more captured signals (e.g., images or sounds) are relevant to the content in the conversation log, such one or more captured signals may be selected for generating text information.

[0065] It should be understood that all the above examples are only for illustration and do not limit the scope of the present disclosure.

[0066] At 230, a response mode may be determined based on the text information generated at 220. The response mode may indicate an expressive style of a response to be generated.

[0067] At 240 , a response may be generated based on at least the textual information, the expression style indicated by the response mode, and optionally, some type of environmental signal (eg, an image signal).

[0068] Figure 3 is a block diagram of an exemplary response generation system 300 according to an embodiment.

[0069] Generally, the response generation system 300 may include a response mode determination module 310 , a response generation module 320 , and a response output module 330 .

[0070] The generated text information 302 may be provided to a response mode determination module 310 to determine a response mode for a response 304 to be generated.

[0071] When the response pattern is determined in the response pattern determination module 310, it can be fed to the response generation module 320 together with the text information 302 to generate a response. Herein, the response pattern can also be in text form and combined with the text information to generate a text sequence as an output of the response pattern determination module 310 to be provided to the response generation module 320.

[0072] Although the response generation module 320 is shown as a single module, it will be appreciated by those skilled in the art that the response generation module 320 can actually be scalable. In some examples, the response generation module 320 can include a text encoder 322, a text attention model 324, and a decoder 326. Herein, the text encoder 322 can receive a text sequence including text information and a response pattern, and perform encoding on the text sequence to generate a text vector. The text vector can be provided to the text attention model 324 to generate a text attention feature through a text attention process. The decoder 326 can receive such a text attention feature and perform a decoding process to generate a response.

[0073] The generated responses may be input to the response output module 330. The response output module 330 selects an appropriate response from the generated responses to output. The appropriate response may be selected based on predefined conditions or by any other available technique (e.g., any existing sorting or ranking technique). For example, the response with the highest relevance score may be selected as the appropriate response to be output.

[0074] It should be understood that although the response output module 330 is shown as being separate from the response generation module 320, it may also be incorporated into the response generation module 320. That is, the response generation module 320 may generate and output a suitable response 304.

[0075] Figure 4 An exemplary response mode determination model 400 is shown according to an embodiment.

[0076] The response mode determination model 400 can be used in Figure 3 The response mode determination module 310 in the embodiment may be implemented by a neural network classifier.

[0077] like Figure 4 As shown, text information 402 can be input into the response mode determination model 400. In this article, the text information 402 can be divided into a sentence sequence s1-s2. v , each sentence s i The word sequence w i1 -w it In some examples, a sentence may be a short sentence including only one or a few words and / or one or a few phrases, or a long sentence including multiple words and / or multiple phrases. Figure 4As shown, sentence s1 can be expressed using w 11 -w 1t To express; sentence s2 can be expressed by w 21 -w 2t To express; sentence s v You can use w v1 -w vt To represent. An encoder (such as a hierarchical encoder) can be used to encode the sentence sequence s1-s v Encode to generate a hidden vector sequence h for text information s 1-h s v , which can be concatenated into a hidden vector h s An encoder (e.g., a gated recurrent unit (GRU)) can be used to encode several response patterns m1-m n is encoded to generate a hidden vector sequence h for the response pattern m 1-h m n , which can be concatenated into a hidden vector h m The hidden vector h can be s and h m is fed into a multi-layer perceptron (MLP) to compute the probability distribution of the response pattern for the next turn in the conversation, which can be represented as p m1 ,p m2 ...p mn ,like Figure 4 and can be calculated as follows:

[0078]

[0079] Among them, m i represents the response mode of the i-th round of conversation in the dialogue, d i ={(s1,m1),(s2,m2)...(s i-1 ,m i-1 )} represents the conversation set in the dialogue, f MLP Represents the MLP function.

[0080] According to each response mode m i The calculated probability p mi , can determine the appropriate response mode m for the i-th turn in the conversation i .

[0081] Figure 5 According to an embodiment, an exemplary response generation model 500 with a text attention model is shown. The response generation model 500 can be used in Figure 3 The response generation module 310 in the embodiment may be implemented by a neural network.

[0082] like Figure 5 As shown, for each sentence s i , which can be based on the determined response mode m i and the received sentences i-1 To generate. In this paper, sentence s i and i-1 can be represented as word sequences [w i,1 ... i,t ] and [w i-1,1 ... i-1,t ] Determine the response mode m i Can be attached to sentences as special words i-1 , to form a sequence of words encoded by the encoder to generate the vector set [v0,v1,...,v t ]. Herein, the encoder may be implemented by a neural network, such as a bidirectional recurrent neural network with a gated recurrent unit (biGRU). It should be understood that although m i Attach to Figure 5 The word sequence in [w i-1,1 ... i-1,t-1 ], but it can be appended to the end of a word sequence, or can be embedded anywhere in a word sequence, if applicable.

[0083] The generated vector set [v0,v1,...,v t ] is input to the text attention model to generate the attention vector set, [v'1,v'2,...,v' t-1 The decoder will focus on the set of vectors [v'1,v'2,...,v' t-1 ] as input and generates a response through a language model with an attention mechanism. Through the decoding process, it can obtain the word sequence [w i, 1...w i,t-1 ], which can then be passed through a softmax layer to output words, for example, Figure 5 The exemplary w shown i,3 It should be understood that although only the output w is shown i,3 , but there should be one or more words output from the decoder to generate a response. It should also be understood that although Figure 5 The input of the encoder is m i And the word sequence [w i-1,1 ... i-1,t-1 ] indicates sentence s i-1 , but there can also be s in the conversation log i-2 ,s i-3 ,...,s1 is to be input to the encoder. Figure 4 and Figure 5In the example shown in , a response may be generated based at least on the determined response pattern and one or more sentences included in the text information.

[0084] Figure 6 An exemplary process 600 for generating a response based on a speech signal or a text signal is shown according to an embodiment.

[0085] like Figure 6 As shown, the process for generating a response based on the voice signal 602 is similar to the process for the text signal 602', except that the text information 610 can be generated directly from the received text signal 602' without any additional recognition or conversion processing, and therefore, for simplicity, a detailed description of the processing of the text signal 602' is omitted herein, and the processing of the audio signal 602 may be described below as an example.

[0086] When an audio signal 602 is received, it may be fed to a user ID recognition module 604 to identify whether the audio signal is a voice signal 606 from a user who is having a conversation with the chatbot. For example, the user ID recognition module 604 may extract audio features of the audio signal 602 to match it with a pre-stored user ID. If a match is found, the audio signal 602 may be considered to be a voice signal from the user and fed to a voice recognition module 608. The voice recognition module 608 may transform or convert the voice signal into text information 610 through various voice-to-text techniques. The text information 610 may be input to a response mode determination module 620 for determining a response mode.

[0087] The response generation module 630 may receive the determined response mode and text information 610 and generate one or more responses based at least on the response mode and text information. Herein, the response generation module 630 may include a text encoder 632, a text attention model 634, and a decoder 636, which are Figure 3 The response generation module 320 shown includes a text encoder 322, a text attention model 324, and a decoder 326. Specifically, the text information 610 and the response pattern can be fed to a text encoder 632 included in the response generation module 630. For simplicity, a detailed description of the text encoder 632, the text attention model 634, and the decoder 636 is omitted herein.

[0088] The generated one or more responses may be fed to the response output module 640 to select the appropriate response to be output. Figure 3 The response output module 640 is similar to the response output module 330 shown in FIG. 6 , and thus a detailed description of the response output module 640 is omitted herein for simplicity.

[0089] Figure 7 An exemplary process 700 for generating a response based on an image signal is shown according to an embodiment.

[0090] An image signal 702 may be received and fed to an image description module 704. The image description module 704 performs image description on the image signal 702 to transform or convert the image signal 702 into text information 706. The response mode determination module 708 may receive text information for determining a response mode. The response generation module 710 may receive the determined response mode and the text information 706 from the response mode determination module 708 to generate a response based on at least the received response mode and text information. Figure 7 As shown, the response generation module 701 in this implementation includes a text encoder 711, a text attention model 712, an image encoder 713, a spatial attention model 714, an adaptive attention model 715, and a decoder 716. Specifically, the text information 706 and the response pattern can be fed to the text encoder 711 in the response generation module 710. In this paper, the operation of the text encoder 711 and the text attention model 712 is similar to Figure 3 The text encoder 322 and the text attention model 324 in are similar, and their detailed descriptions are omitted for simplicity.

[0091] Additionally or alternatively, the image signal 702 may be fed into an image encoder 713. The image encoder 713 may perform encoding on the image signal 702 to generate an image vector. The spatial attention model 714 may receive the image vector and extract spatial image features indicating a spatial map highlighting an image region associated with each generated word. Figure 8 An exemplary structure of the spatial attention model 714 is described.

[0092] The adaptive attention model 715 can receive the spatial image features from the spatial attention model 714 and the text attention features from the text attention model 712 to generate the adaptive attention features. The adaptive attention model 715 can be configured to determine when to rely on the image signal and when to rely on the language model to generate the next word. When relying on the image signal, the adaptive attention model 715 can also determine where it should pay attention to, that is, which image area. Fig. 9 An exemplary structure of the adaptive attention model 715 is described.

[0093] The decoder 716 may receive the adaptive attention feature from the adaptive attention model 715 and generate a response based at least on the adaptive attention feature.

[0094] The generated responses from decoder 716 may be passed to response output module 720 for selecting an appropriate response for output. The operations for selecting an appropriate response in response output module 720 may be similar to those in response output module 330 and are therefore omitted for simplicity.

[0095] Additionally or alternatively, the response output module 720 may include a convolutional feature extraction module 721 and a dual attention module 722. The convolutional feature extraction module 721 may receive the image signal 702 and extract convolutional features of the image signal. The extracted features of the image signal may be fed to the dual attention module 722 in text form together with the generated response from the decoder 716. The dual attention module 722 may combine visual and textual attention models, and perform a dual attention mechanism on the extracted features of the image signal 702 and the generated response, for example, comparing the two inputs to output an appropriate response. The visual attention model may focus on a specific area in the image to extract image attention features, and the textual attention model may focus on specific words or sentences in the text content to extract textual attention features from the text. In some examples, the dual attention module 722 may perform image-text matching by comparing the extracted features of the image signal with the textual content of the generated response, and may estimate the similarity between the features of the image signal and the textual content of the response by focusing on their common semantics.

[0096] It should be understood that although the convolutional feature extraction module 721 and the dual attention module 722 are shown as being included in the response output module 720, they may also be separated from the response output module 720 and / or may be omitted or replaced by any other suitable modules.

[0097] Figure 8 According to an embodiment, an exemplary spatial attention model 800 is shown, which is Figure 7 Corresponding to the spatial attention model 714 in.

[0098] Herein, the spatial attention model 800 can be implemented by a neural network to generate a spatial attention vector c of an image. t .like Figure 8 As shown, x t and h t-1 is input to the long short-term memory unit (LSTM) to generate the hidden state h of the LSTM t In this paper, x t represents the input vector at time t, h t represents the hidden state of LSTM at time t-1, h t represents the hidden state of LSTM at time t. The generated vector h tcan be fed to the attention model together with the spatial image feature set V, which can be expressed as V = [v1, ...v k ], where each v i is a multidimensional representation corresponding to the region of the image. Through the attention model, the spatial attention vector c t It can be generated as follows:

[0099] c t =g(V,h t ) Equation (2)

[0100] Here, g is the attention function.

[0101] The generated spatial attention vector c t Can be used with h t are fed to the MLP together to pass through the MLP function f MLP Generate an output vector y corresponding to the word t :

[0102] y t =f MLP ([c t ,h t ]) Equation (3)

[0103] It should be understood that although not Figure 8 As shown in , there may be an attention weight α on each spatial image feature v in the spatial image feature set V.

[0104] Fig. 9 According to an embodiment, an exemplary adaptive attention model 900 is shown, which is Figure 7 Corresponding to the adaptive attention model 715 in.

[0105] The adaptive attention model 900 can be implemented by a neural network to generate an adaptive attention vector c′ for both images and texts. t .

[0106] and Figure 8 Similarly, x t and h t-1 Input to the long short-term memory unit (LSTM) to generate the hidden state h of the LSTM t In this paper, from the input vector x t Extract the indicator vector i from t , to indicate whether to focus on the text. The indicator vector i can be calculated by the following equation: t :

[0107] i t =g t ⊙tanh(m t ) Equation (4)

[0108] g t =σ(W x x t +W h h t-1 ) Equation (5)

[0109] Among them, g t Represents the memory unit m applied to LSTM t The gate on the top, ⊙ represents the element-by-element product, W x and W h Represents the input vector x t and the hidden state h t-1 , and σ represents the logistic sigmoid activation.

[0110] Based on the generated indicator vector i t and spatial image feature set V = [v1,...v k ], the adaptive attention vector c' can be calculated by the following equation t :

[0111] c′ t =β t i t +(1-β t )c t =β t i t +(1-β t )g(V,h t ) Equation (6)

[0112] Among them, β t represents the probability of focusing on the text at time t, which is in the range [0,1], where a value of 1 means that only text features are used when generating the next word, and a value of 0 means that only spatial image features are used when generating the next word; and c t represents the spatial attention vector, as represented by g(V,h t ) calculated.

[0113] Additionally or alternatively, such as Fig. 9 As shown, each spatial image feature v i Alpha i represents the corresponding attention weight on each spatial image feature.

[0114] Although not in Fig. 9 However, it can be based on the adaptive attention vector c' t , instead of Figure 8 The spatial attention vector c in t , generate the output y through MLP t.

[0115] Fig.10 An example process 1000 for generating a response based on an audio signal is shown in accordance with an embodiment.

[0116] When the audio signal 1002 is received, it can be fed to the user ID recognition module 1004 to identify whether the audio signal is a voice signal from the user 1006. If the audio signal is not considered to be a voice signal from the user, the audio signal 1002 can be considered to be a background sound signal, such as wind, rain, sound from other speakers, etc., and can be fed to the audio analysis module 1008. The audio analysis module 1008 can analyze the audio signal to extract text information 1010 therefrom. The text information 1010 can be input to the response mode determination module 1020 for determining the response mode.

[0117] Since the operation of the user ID recognition module 1004 is Figure 6 The user ID identification module 604 in FIG. 1 is similar to that in FIG. 1 , and the operation of the response mode determination module 1020 is similar to that in FIG. Figure 6 The user ID recognition module 1004 and the response mode determination module 1020 are similar, so the detailed description of the user ID recognition module 1004 and the response mode determination module 1020 may be omitted in this document.

[0118] The response generation module 1030 may receive the determined response mode and text information 1010 and generate one or more responses based at least on the response mode and text information. Herein, the response generation module 1030 may include a text encoder 1032, a text attention model 1034, and a decoder 1036, which operate similarly to Figure 3 The response generation module 320 and Figure 6 The operation of the response generation module 630 in is similar. For simplicity, a detailed description of the text encoder 1032, the text attention model 1034 and the decoder 1036 is omitted herein.

[0119] The generated one or more responses may be fed to the response output module 1040 to select the appropriate response to output. Figure 3 The response output module 330 and Figure 6 The illustrated response output module 630 is similar, and thus a detailed description of the response output module 1040 is omitted herein for simplicity.

[0120] Additionally or alternatively, the response output module 1040 may include a text-to-speech (TTS) module 1042 for converting text signals into speech signals and generating speech outputs. It should be understood that although the TTS module 1042 is shown as being included in the response output module 1040, they may also be separated from the response output module 1040 and / or may be omitted or replaced by any other suitable module.

[0121] Fig.11 An exemplary process 1100 for generating a response based on an image signal and an audio signal is shown according to an embodiment.

[0122] Since the process 1100 for generating a response based on an image signal and an audio signal can be viewed as Figure 6 , Figure 7 and Fig.10 The combination of the processes shown in Fig.11 A detailed description of the module in .

[0123] When the image signal 1102 is received, it may be fed to the image description module 1104. The image description module 1104 performs image description on the image signal 1102 to transform or convert the image signal 1102 into textual information as part of the textual information 1116.

[0124] When the audio signal 1106 is received, it may be fed to the user ID recognition module 1108 to identify whether the audio signal is a voice signal 1110 from the user. If the audio signal 1106 is considered to be a voice signal from the user, it may be fed to the voice recognition module 1114. The voice recognition module 1114 may transform or convert the voice signal into text information as part of the text information 1116. If it is determined that the audio signal is not a voice signal from the user, the audio signal 1106 may be considered to be a background sound signal, such as wind, rain, sound from other speakers, etc., and may be fed to the audio analysis module 1112. The audio analysis module 1112 may analyze the audio signal to extract text information therefrom as part of the text information 1116.

[0125] The text information 1116 may be generated by combining the respective text information of the received two or more signals, such as the image signal 1102 and the audio signal 1106. For example, the text information converted from the image signal 1102 and the text information converted or extracted from the audio signal 1106 may be combined to generate the text information 1116.

[0126] The text information 1116 may be input to a response mode determination module 1118 for determining a response mode.

[0127] The response generation module 1120 may receive the determined response mode and the text information 1116 from the response mode determination module 1118 to generate a response based at least on the received response mode and text information. Fig.11 As shown, the response generation module 1120 in this implementation includes a text encoder 1121, a text attention model 1122, an image encoder 1123, a spatial attention model 1124, an adaptive attention model 1125, and a decoder 1126. Specifically, the text information 1116 can be fed to the text encoder 1121 in the response generation module 1120 together with the determined response mode.

[0128] In this paper, since the operations of the text encoder 1121 and the text attention model 1122 are respectively Figure 3 The text encoder 322 and the text attention model 324 in Figure 6 The text encoder 632 and the text attention model 634 in Figure 7 The text encoder 711 and the text attention model 712 in FIG. 1 are similar, so for simplicity, their detailed description is omitted in this paper. In addition, since the operations of the image encoder 1123, the spatial attention model 1124, the adaptive attention model 1125 and the decoder 1126 are similar Figure 7 The image encoder 713, spatial attention model 714, adaptive attention model 715 and decoder 716 in are similar, so for simplicity, their detailed descriptions are omitted in this article.

[0129] The generated responses from decoder 1126 may be passed to response output module 1130 to select an appropriate response for output. The operation for selecting an appropriate response in response output module 1130 may be similar to Figure 3 The operation in the response output module 330 is similar, so it is omitted for simplicity.

[0130] Additionally or alternatively, the response output module 1130 may include a convolutional feature extraction module 1131, a dual attention module 1132, and an optional TTS module 1133. Figure 7 The convolution feature extraction module 721 and the dual attention module 722 in FIG. 1 are similar, so for simplicity, their detailed descriptions are omitted in this paper. In addition, since the operation of the TTS module 1133 is similar to that of FIG. Fig.10 The TTS modules 1042 in FIG. 1 are similar, so for simplicity, their detailed descriptions are omitted in this article.

[0131] According to the exemplary process for generating a response based at least on a response pattern and textual information from an audio signal and / or an image signal as described above, Fig.12 An exemplary conversation window 1200 for a conversation between a user and a chatbot is shown according to an embodiment.

[0132] exist Fig.12 In the example of , for the convenience of description, the semantic information or content spoken by the user and / or the chat robot is shown in text form in the dotted box outside the dialogue window (which may not be visible in the dialogue window). Fig.12 In the example of FIG. 4 , a description of capturing an environmental signal is shown in a solid line block outside the dialog window.

[0133] like Fig.12 As shown in 1201 in, when the chatbot detects that there is something different from the previous scene, for example, there are some yellow flowers on the roadside, it can capture an image with yellow flowers, and can initiate or switch topics based on the captured image. The initial response mode can be determined by a response mode determination model based on information extracted from the image. For example, the initial response mode can be determined as a positive response mode and / or a topic initiation statement mode. A response can be generated based on at least the initial response mode and text information from the captured image (such as the focus feature of "yellow, flowers") and any other possible information in the user profile and / or the conversation log. An exemplary response can be output as "Look! The yellow flowers are blooming. My mother grew the same flowers in the garden when I was young", as shown in 1211.

[0134] When the user provides the voice message shown in 1221, the chatbot can generate the following text information "Oh, yes. They are so beautiful" from the voice signal of the voice message and determine a response pattern for a response to be generated based on the text information, for example, a positive response pattern based on the positive word "beautiful" and / or a topic-maintaining question pattern based on the sentence "They are so beautiful". Based on the determined response pattern and the generated text information, the chatbot can generate and output a response "Would you like to grow some in your garden?" as shown by 1212 in the topic-maintaining question mode.

[0135] When the chatbot receives the voice message shown in 1222, the chatbot can generate text information "Actually, not. Because I am allergic to pollen" from the received signal and determine the response mode as a positive response mode and / or a topic maintenance statement mode based on the generated text information. In addition, based on at least the attention features "not" and "allergic to pollen" and the determined response maintenance statement mode, the chatbot can generate and output a response "It is also a good way to have alook far away", as shown in 1213, to maintain the current topic in the conversation.

[0136] In addition to receiving voice / audio signals, the chatbot may receive signals in other forms. For example, the chatbot may receive a message in text form from the user, such as the word "Yes" shown in 1223.

[0137] At the same time or a few minutes later, the chatbot can detect an audio signal and can identify the text information "Michael Jackson's music" from the audio signal through an audio analysis module, as shown in 1202. Based on the identified or generated text information, the chatbot can determine the response mode as a positive response mode and / or a topic switching statement mode. A response such as "Oh, I like Michael Jackson but I prefer his slow songs compared to this one" can be generated based on the determined response mode and the identified text information, as shown in 1214. When receiving a voice message from a user, the chatbot can generate text information from the voice signal of the voice message, i.e., "Could you recommend one of his slow songs?", as shown in 1224. Based on the generated text information, the chatbot can determine a response mode for the next response, such as a positive response mode and / or a topic maintenance answer mode. The next response "Sure. Let me play it for you" may be generated based on the determined response mode and text information as shown in 1215. The next response may be output in speech form through the TTS module. Alternatively, the response may be output in text form.

[0138] After a few minutes, the chatbot can detect the background sound signal through the microphone and capture the image signal through the camera. The background sound signal can be analyzed to generate the text information "loud noise", and the image signal can be processed through the image description to generate the text information "many people", as shown in 1203. The chatbot can determine a response mode based at least on the generated text information, such as a negative response mode and / or a topic switching question mode. A response as shown in 1216 can be generated based on the determined response mode together with the generated text information (e.g., the text focus feature "loud noise" from the text information), for example, "It's sonoisy. What happened?".

[0139] The user can provide the chatbot with a voice message as shown in 1226 to answer his question. The chatbot receives the voice message and recognizes it as the text information "There is a rock festival". The chatbot can determine a response mode based on the text information, such as a negative response mode and / or a topic switching statement mode. Therefore, a response as shown in 1217: "Oh, I don't like rock music. There is so crowded. Let's leave here" can be generated based on the response mode and the text information, and the response can be output in voice form through the TTS module.

[0140] It should be understood that the conversation between the user and the chatbot can be conducted in any form such as text, voice, image, video, etc. or any combination thereof.

[0141] Fig.13 A flow chart of an exemplary method 1300 for generating a response in a conversation is shown according to an embodiment.

[0142] At 1310, at least one signal can be received from at least one signal source.

[0143] At 1320, text information may be generated based on the at least one received signal.

[0144] At 1330, a response mode can be determined based at least on the text information. In some implementations, the response mode can indicate an expressive style of a response to be generated.

[0145] At 1340, a response can be generated based at least on the text information and the response mode.

[0146] In one implementation, at least one signal source may include a participant in a conversation or an environment in which a conversation is taking place.

[0147] In one implementation, at least one received signal may include a text signal and / or a non-text signal. In some examples, the non-text signal may include at least one of an image signal, an audio signal, and a video signal, and the audio signal may include at least one of a speech signal and a background sound signal.

[0148] In one implementation, the at least one received signal may include two or more signals.In some examples, generating the text information may include generating the text information by combining respective text information of the two or more signals.

[0149] In one implementation, the response mode may include at least one of a positive response mode and a negative response mode.

[0150] In one implementation, the response mode may include at least one of the following: a topic-maintaining statement mode, a topic-maintaining question mode, a topic-maintaining answer mode, a topic-switching statement mode, a topic-switching question mode, and a topic-switching answer mode.

[0151] In one implementation, determining the response pattern may include determining the response pattern based on at least text information by a neural network classifier.

[0152] In one implementation, generating a response may include: generating at least one text attention feature based on text information and a response pattern through a text attention model; and generating a response based at least on the at least one text attention feature.

[0153] In one implementation, at least one received signal may include a non-text signal.In some examples, generating the text information includes generating the text information by performing signal analysis on the non-text signal.

[0154] In one implementation, the non-text signal is an image signal, and generating a response may include: generating at least one image attention feature based on the image signal through a spatial attention model; generating at least one text attention feature based on text information and a response pattern through a text attention model; and generating a response based on at least at least one image attention feature and at least one text attention feature.

[0155] In one implementation, generating a response may include: generating at least one adaptive attention feature based on the at least one image attention feature and the at least one text attention feature by an adaptive attention model; and generating the response based at least on the at least one adaptive attention feature.

[0156] It should be understood that method 1300 may also include any steps / processes for generating responses in a conversation according to embodiments of the present disclosure as described above.

[0157] Fig.14 An exemplary apparatus 1400 for generating a response in a conversation is shown according to an embodiment.

[0158] The apparatus 1400 may include: a signal receiving module 1410 for receiving at least one signal from at least one signal source; a text information generating module 1420 for generating text information based on at least one received signal; a response mode determining module 1430 for determining a response mode based at least on the text information, the response mode indicating an expression style of a response to be generated; and a response generating module 1440 for generating a response based at least on the text information and the response mode.

[0159] In one implementation, at least one signal source may include a participant in a conversation or an environment in which a conversation is conducted, and wherein at least one received signal may include a text signal and / or a non-text signal, the non-text signal may include at least one of an image signal, an audio signal, and a video signal, and the audio signal includes at least one of a speech signal and a background sound signal.

[0160] In one implementation, the at least one received signal includes two or more signals, and the text information generation module 1420 is further configured to generate the text information by combining respective text information of the two or more signals.

[0161] In one implementation, the response generation module 1440 is further configured to: generate at least one text attention feature based on the text information and the response pattern through a text attention model; and generate a response based at least on the at least one text attention feature.

[0162] In one implementation, the response mode may include at least one of the following: a topic-maintaining statement mode, a topic-maintaining question mode, a topic-maintaining answer mode, a topic-switching statement mode, a topic-switching question mode, and a topic-switching answer mode.

[0163] In one implementation, at least one received signal may include a non-text signal. In some examples, the text information generation module is further configured to generate text information by performing signal analysis on the non-text signal.

[0164] In one implementation, the non-text signal is an image signal. In some examples, the response generation module 1440 is further configured to: generate at least one image attention feature based on the image signal through a spatial attention model; generate at least one text attention feature based on text information and a response pattern through a text attention model; and generate a response based on at least one image attention feature and at least one text attention feature.

[0165] In one implementation, the response generation module 1440 is further configured to: generate at least one adaptive attention feature based on at least one image attention feature and at least one text attention feature through an adaptive attention model; and generate a response based at least on the at least one adaptive attention feature.

[0166] In addition, the apparatus 1400 may further include any other modules configured to generate a response in a conversation according to the embodiments of the present disclosure as described above.

[0167] Fig.15 According to an embodiment, an exemplary apparatus 1500 for generating a response in a conversation is shown. The apparatus 1500 may include one or more processors 1510 and a memory 1520 storing computer executable instructions. When executing the computer executable instructions, the one or more processors 1510 may: receive at least one signal from at least one signal source; generate text information based on at least one received signal; determine a response mode based at least on the text information, the response mode indicating an expression style of a response to be generated; and generate a response based at least on the text information and the response mode.

[0168] Embodiments of the present disclosure may be embodied as non-transitory computer-readable media. The non-transitory computer-readable media may include instructions that, when executed, cause one or more processors to perform any operations of the method for generating a response in a conversation according to embodiments of the present disclosure as described above.

[0169] It should be understood that all operations in the above methods are merely exemplary, and the present disclosure is not limited to any operations in these methods or the sequential order of these operations, and should cover all other equivalents under the same or similar concepts.

[0170] It should also be understood that all modules in the above device can be implemented in various ways. These modules can be implemented as hardware, software or a combination thereof. In addition, any one of these modules can also be functionally divided into submodules or combined together.

[0171] Processors have been described in conjunction with various devices and methods. These processors can be implemented using electronic hardware, computer software, or any combination thereof. Whether these processors are implemented as hardware or software will depend on specific applications and the overall design constraints imposed on the system. By way of example, the processors provided in this disclosure, any part of the processors, or any combination of processors can be implemented using microprocessors, microcontrollers, digital signal processors (DSPs), field programmable gate arrays (FPGAs), programmable logic devices (PLDs), state machines, gated logic, discrete hardware circuits, and other suitable processing components configured to perform the various functions described throughout this disclosure. The functions of the processors provided in this disclosure, any part of the processors, or any combination of processors can be implemented using software executed by a microprocessor, microcontrollers, DSPs, or other suitable platforms.

[0172] Software should be broadly interpreted as meaning instructions, instruction sets, codes, code segments, program codes, programs, subroutines, software modules, applications, software applications, software packages, routines, subroutines, objects, execution threads, processes, functions, etc. Software can be located on a computer-readable medium. For example, a computer-readable medium can include a memory, such as a magnetic storage device (e.g., a hard disk, a floppy disk, a tape), an optical disk, a smart card, a flash memory device, a random access memory (RAM), a read-only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), a register, or a removable disk. Although the memory is shown as being separated from the processor in various aspects provided throughout the present disclosure, the memory can be inside the processor, for example, a cache or a register.

[0173] The foregoing description is provided to enable any person skilled in the art to implement the various aspects described herein. Various modifications to these aspects will be apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects. Therefore, the claims are not intended to be limited by the aspects shown herein. All structures and functions that are known or will be known to those of ordinary skill in the art and are equivalent to the elements of the various aspects described throughout this disclosure are expressly incorporated herein by reference and are intended to be included in the claims.

Claims

1. A method for generating a response in a conversation, comprising: receiving at least one signal from at least one signal source, wherein the at least one signal source includes participants of the conversation and an environment in which the conversation is conducted; generating text information based on signals received from the participant and signals from the environment; determining a response mode based at least on the text information, the response mode indicating an expression style of a response to be generated and comprising at least one of the following: a topic initiation statement mode, a topic initiation question mode, a topic initiation answer mode, a topic maintenance statement mode, a topic maintenance question mode, a topic maintenance answer mode, a topic switching statement mode, a topic switching question mode, and a topic switching answer mode; and The response is generated based at least on the text information and the response pattern.

2. The method according to claim 1, wherein: The at least one received signal includes a text signal and / or a non-text signal, the non-text signal includes at least one of an image signal, an audio signal and a video signal, and the audio signal includes at least one of a speech signal and a background sound signal.

3. The method according to claim 1, wherein: The at least one received signal includes two or more signals, and generating the text information includes: The text information is generated by combining respective text information of the two or more signals.

4. The method according to claim 1, wherein: The response mode includes at least one of a positive response mode and a negative response mode.

5. The method according to claim 1, wherein: Determining the response mode includes: The response pattern is determined by a neural network classifier based at least on the textual information.

6. The method according to claim 1, wherein: Generating the response includes: generating at least one text attention feature based on the text information and the response pattern through a text attention model; and The response is generated based at least on the at least one text-focus feature.

7. The method according to claim 1, wherein: The at least one received signal comprises a non-text signal, and generating the text information comprises: The text information is generated by performing signal analysis on the non-text signal.

8. The method according to claim 7, wherein: The non-text signal is an image signal, and generating the response includes: generating at least one image attention feature based on the image signal by a spatial attention model; generating at least one text attention feature based on the text information and the response mode through a text attention model; and The response is generated based at least on the at least one image focus feature and the at least one text focus feature.

9. The method according to claim 8, wherein: Generating the response includes: generating at least one adaptive attention feature based on the at least one image attention feature and the at least one text attention feature by an adaptive attention model; and The response is generated based at least on the at least one adaptive attention feature.

10. An apparatus for generating a response in a conversation, comprising: a signal receiving module, configured to receive at least one signal from at least one signal source, wherein the at least one signal source includes a participant of the conversation and an environment in which the conversation is conducted; a text information generation module for generating text information based on the signal received from the participant and the signal of the environment; a response mode determination module, configured to determine a response mode based at least on the text information, the response mode indicating an expression style of a response to be generated and comprising at least one of the following: a topic initiation statement mode, a topic initiation question mode, a topic initiation answer mode, a topic maintenance statement mode, a topic maintenance question mode, a topic maintenance answer mode, a topic switching statement mode, a topic switching question mode, and a topic switching answer mode; and A response generation module is used to generate the response based on at least the text information and the response mode.

11. The device according to claim 10, wherein: The at least one received signal includes a text signal and / or a non-text signal, the non-text signal includes at least one of an image signal, an audio signal and a video signal, and the audio signal includes at least one of a speech signal and a background sound signal.

12. The device according to claim 10, wherein: The at least one received signal includes two or more signals, and the text information generation module is further configured to generate the text information by combining respective text information of the two or more signals.

13. The device according to claim 10, wherein: The response generation module is also used for: generating at least one text attention feature based on the text information and the response mode through a text attention model; and The response is generated based at least on the at least one text-focus feature.

14. The device according to claim 10, wherein: The at least one received signal comprises a non-text signal, and the text information generation module is further configured to: The text information is generated by performing signal analysis on the non-text signal.

15. The device according to claim 14, wherein: The non-text signal is an image signal, and the response generation module is further configured to: generating at least one image attention feature based on the image signal by a spatial attention model; generating at least one text attention feature based on the text information and the response mode through a text attention model; and The response is generated based at least on the at least one image focus feature and the at least one text focus feature.

16. The device according to claim 15, wherein: The response generation module is also used for: generating at least one adaptive attention feature based on the at least one image attention feature and the at least one text attention feature by an adaptive attention model; and The response is generated based at least on the at least one adaptive attention feature.

17. An apparatus for generating a response in a conversation, comprising: one or more processors; as well as a memory storing computer executable instructions that, when executed, cause the one or more processors to: receiving at least one signal from at least one signal source, wherein the at least one signal source includes participants of the conversation and an environment in which the conversation is conducted; generating text information based on signals received from the participant and signals from the environment; determining a response mode based at least on the text information, the response mode indicating an expression style of a response to be generated and comprising at least one of the following: a topic initiation statement mode, a topic initiation question mode, a topic initiation answer mode, a topic maintenance statement mode, a topic maintenance question mode, a topic maintenance answer mode, a topic switching statement mode, a topic switching question mode, and a topic switching answer mode; and The response is generated based at least on the text information and the response pattern.