WO2020155619A1 - 带情感的机器聊天方法、装置、计算机设备及存储介质 - Google Patents
带情感的机器聊天方法、装置、计算机设备及存储介质 Download PDFInfo
- Publication number
- WO2020155619A1 WO2020155619A1 PCT/CN2019/103516 CN2019103516W WO2020155619A1 WO 2020155619 A1 WO2020155619 A1 WO 2020155619A1 CN 2019103516 W CN2019103516 W CN 2019103516W WO 2020155619 A1 WO2020155619 A1 WO 2020155619A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- response
- model
- chat
- sentence
- chat sentence
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
Definitions
- This application relates to the field of artificial intelligence technology, and in particular to an emotional machine chat method, device, computer equipment, and storage medium.
- chatbots have gradually emerged.
- a chatbot is a program used to simulate human conversations or chats. It can be used for practical purposes, such as customer service and consultation. There are also some social robots used to chat with people.
- chatbots will be equipped with a natural language processing system, but more of them extract keywords from input sentences, and then retrieve answers based on keywords from the database.
- the answers of these chat robots are usually pretty, non-emotional, and the chat mode is the same, which leads to people's low interest in chatting with them, and the utilization rate of chat robots is also low.
- This application provides an emotional machine chatting method, device, computer equipment, and storage medium to solve the problem that chat robots answer the same question without emotion.
- An emotional machine chat method includes the following steps:
- the candidate response with the largest deep reinforcement learning value is returned as the response sentence of the chat sentence.
- An emotional machine chat device including:
- Obtaining module used to obtain chat sentences input by the user
- a generating module configured to input the chat sentence into a preset response generation model, and obtain an initial response output by the response generation model in response to the chat sentence;
- a processing module configured to input the initial response into a preset emotion generation model, and obtain at least two candidate responses that carry emotion that are output by the emotion generation model in response to the initial response;
- a calculation module configured to input the candidate response and the chat sentence into a trained deep-strength learning network model to obtain the deep-strength learning value of each candidate response;
- the execution module is used to return the candidate response with the largest deep reinforcement learning value as the response sentence of the chat sentence.
- a computer device includes a memory and a processor, wherein computer readable instructions are stored in the memory, and when the computer readable instructions are executed by the processor, the processor implements the following steps: acquiring a chat input by a user Statement
- the candidate response with the largest deep reinforcement learning value is returned as the response sentence of the chat sentence.
- a computer-readable storage medium having computer-readable instructions stored thereon, and when the computer-readable instructions are executed by a processor, the following steps are implemented:
- the candidate response with the largest deep reinforcement learning value is returned as the response sentence of the chat sentence.
- the beneficial effects of the embodiments of the present application are: by acquiring the chat sentence input by the user; inputting the chat sentence into a preset response generation model, and obtaining the initial response output by the response generation model in response to the chat sentence;
- the initial response is input into a preset emotion generation model, and at least two candidate responses that carry emotions output by the emotion generation model in response to the initial response are obtained; and the candidate response and the chat sentence are input into the process
- the deep reinforcement learning value of each candidate response is obtained; and the candidate response with the largest deep reinforcement learning value is returned as the response sentence of the chat sentence. It returns emotional responses to the chat sentences entered by the user, making machine chat more natural and humane.
- Figure 1 is a schematic diagram of the basic flow of an emotional machine chat method according to an embodiment of this application
- Figure 2 is a schematic diagram of the flow of generating an initial response according to an embodiment of this application
- FIG. 3 is a schematic diagram of the process of generating an initial response through a question-and-answer knowledge base according to an embodiment of the application
- FIG. 4 is a schematic diagram of the training process of an emotion generation model according to an embodiment of the application
- FIG. 5 is a schematic diagram of a process of deep learning enhanced network training according to an embodiment of this application.
- FIG. 6 is a basic structural block diagram of an emotional machine chat device according to an embodiment of this application.
- Fig. 7 is a block diagram of the basic structure of a computer device according to an embodiment of the application.
- terminal and terminal equipment used herein include both wireless signal receiver equipment, which only has equipment with wireless signal receivers without transmitting capability, and also includes receiving and transmitting hardware equipment.
- a device which has a device capable of performing two-way communication receiving and transmitting hardware on a two-way communication link.
- Such equipment may include: cellular or other communication equipment, which has a single line display or multi-line display or cellular or other communication equipment without a multi-line display; PCS (Personal Communications Service, personal communication system), which can combine voice and data Processing, fax and/or data communication capabilities; PDA (Personal Digital Assistant), which can include radio frequency receivers, pagers, Internet/Intranet access, web browsers, notepads, calendars and/or GPS (Global Positioning System (Global Positioning System) receiver; conventional laptop and/or palmtop computer or other device, which has and/or includes a radio frequency receiver.
- PCS Personal Communications Service, personal communication system
- PDA Personal Digital Assistant
- GPS Global Positioning System (Global Positioning System) receiver
- conventional laptop and/or palmtop computer or other device which has and/or includes a radio frequency receiver.
- terminal and terminal equipment used here may be portable, transportable, installed in vehicles (aviation, sea and/or land), or suitable and/or configured to operate locally, and/or In a distributed form, it runs on the earth and/or any other location in space.
- the "terminal” and “terminal equipment” used here can also be communication terminals, internet terminals, music/video playback terminals, for example, PDAs, MIDs (Mobile Internet Devices, mobile Internet devices) and/or music/video playback Functional mobile phones can also be devices such as smart TVs and set-top boxes.
- FIG. 1 is a schematic diagram of the basic flow of an emotional machine chat method in this embodiment.
- an emotional machine chat method includes the following steps:
- S 10K obtains the chat sentence entered by the user
- the language information input by the user is acquired through the interactive page on the terminal.
- the received information can be text information or voice information.
- the voice information is converted into text information through a voice recognition device.
- the response generation model can use the trained Seq2Seq model.
- the specific training process is to prepare the training corpus, that is, prepare the input sequence and the corresponding output sequence, input the input sequence into the Seq2Seq model, calculate the probability of the output sequence, and adjust the parameters of the Seq2Seq model , So that the entire sample, that is, all input sequences, has the highest probability of outputting the corresponding output sequence after Seq2Seq.
- the process of using the Seq2Seq model to generate the initial response is to first vectorize the chat sentence, for example, use the one-hot vocabulary encoding method to obtain the word vector, and input it to the Encoder layer, where the Encoder layer uses the bidirectional LSTM layer as the basic neuron unit Multi-layer neuron layer;
- the output state vector of the encoder is input to the Decoder layer, where the Decoder layer is also a multi-layer neural network with the bidirectional LSTM (Long Short-Term Memory) layer as the basic neuron unit;
- the decoder layer is output
- the final_state state vector is input to the Softmax layer, and the initial response content with the highest probability is obtained.
- machine chat is applied to a question answering scenario, and the response generation model adopted is a question-and-answer knowledge base.
- the response generation model adopted is a question-and-answer knowledge base.
- the machine chat is used to accompany the user in small talk and to answer the user's question.
- the response generation model is selected by first determining whether it is a question answering scene. Please refer to FIG. 2 for specific description.
- S103 Input the initial response into a preset emotion generation model, and obtain at least two candidate responses that carry emotions output by the emotion generation model in response to the initial response.
- the preset emotion generation model contains at least two emotion generation sub-models, which can transform the initial response into emotion. For example, changing the initial response with neutral emotion to a response with positive emotion, or changing the initial response with neutral emotion to a response with negative emotion.
- Any emotion generation sub-model is based on the pre-trained Seq2Seq model.
- An emotion generation sub-model is a Seq2Seq model that outputs a candidate response that carries emotion.
- Each Seq2Seq model in the preset emotion generation model generates emotion due to different training corpus The factors are different, the output port Emotional candidate responses are also different.
- the initial response is input to each Seq2Seq model in the preset emotion generation model, and candidate responses carrying various emotions are output. It is worth noting that the Seq2Seq model used for emotion generation here is different from the aforementioned Seq2Seq model used for generating initial responses, and the specific training process of the Seq2Seq model used for emotion generation is shown in FIG. 4.
- the deep reinforcement learning network combines the perception ability of the deep learning network and the decision-making ability of the reinforcement learning network, and determines which candidate response to adopt by calculating the reinforcement learning value of each candidate response. Among them, the deep reinforcement learning network has the following loss
- Q is the true deep reinforcement learning value
- 0 is the deep reinforcement learning value predicted by the deep reinforcement learning network.
- the training process of the deep reinforcement learning network is to prepare training samples.
- Each sample in the training sample contains the input chat sentence and the candidate response corresponding to the chat sentence and the deep learning value of each candidate response; the deep learning value is based on the preset Rule labeling. For example, when a candidate response to a chat sentence causes the user to directly end the conversation, the deep learning value of the candidate response is low. When a candidate response to a chat sentence makes the user’s next chat sentence input If there is a positive change in emotion, the deep learning value of the candidate response is high.
- the candidate response with the largest deep reinforcement learning value is considered to be the most appropriate response to the chat sentence input by the current user.
- the response sentence is returned to the client terminal, and the text information is displayed on the terminal screen.
- the text information can also be converted to audio first.
- the audio output device of the terminal outputs language information.
- the preset response generation model includes M response generation sub-models, where M is a positive integer greater than 1, and when the chat sentence is input into the preset response generation model, the initial response is obtained
- M is a positive integer greater than 1
- machine chat When machine chat is applied to a variety of scenarios, for example, it is applied to both the question answering scene and the non-question answering scene.
- the scene is first identified, and then the corresponding response is determined according to the scene to generate a sub-model, which can make the generated response more Targeted.
- the scene recognition model can be based on keywords to determine whether it is a problem-solving scene or a non-question-answering scene. It can be judged whether the input chat sentence contains keywords that express questions, such as "?" What" "How much” "Where” "How” and other interrogative particles. You can also use a regular matching algorithm to judge whether the chat is a question or not.
- a regular expression is a logical formula for string manipulation. It uses predefined specific characters and combinations of these specific characters to form a "regular character” String", this "rule string” is used to express a filtering logic for strings.
- the scene is a non-question answering scene. Identify whether it is a problem-solving scene, and further, you can subdivide the scenes, for example, the non-problem-solving scene can be subdivided into small chat, appreciation, and complaints; the problem-solving scene can be subdivided into pre-sales consultation, after-sales service, etc.
- the segmented scenes can be judged by the preset keyword list. For each type of segmented scene, a keyword list is preset. When the extracted keywords in the input chat sentence are in the keyword list corresponding to a certain type of segmented scene When the words are the same, it is considered that the input chat sentence corresponds to the segmented scene.
- a pre-trained LSTM-CNN neural network model is used for scene recognition. Specifically, for the input content, the Chinese word segmentation is performed first, and the basic word segmentation database is used, and the stop words, punctuation marks, etc. are removed sequentially, and the word embedding vector is obtained through the word vector model, and then passed into the neural network model based on LSTM-CNN. That is, the word embedding vector enters the multi-layer LSTM neural unit to obtain the state vector and output of each stage; then, based on the state vector of each stage, perform convolution and pooling operations (CNN) to obtain the integrated vector index; then integrate The vector index is input into the softmax function to obtain the probability of the corresponding scene. The scene with the highest probability is selected as the scene corresponding to the input chat sentence.
- CNN convolution and pooling operations
- the response generation model determines a response generation submodel corresponding to the chat sentence; the response generation model presets M response generation submodels, and the response generation submodel has a mapping relationship with the scenario.
- the scene of the input chat sentence is determined, and the response generation sub-model corresponding to the user input chat sentence is determined according to the mapping relationship between the scene and the response generation sub-model.
- the mapping relationship between the response generation sub-model and the scene is that when the scene is a question answering type, the question and answer knowledge base is used as the response generation sub-model, and when the scene is a non-question answering type, Use the trained Seq2Seq model.
- the chat sentence into the response generation sub-model corresponding to the scene, and the response generation sub-model responds to the chat sentence to output the initial response.
- the initial response is generated by the Seq2Seq model.
- the process of generating the initial response is shown in Fig. 3.
- the two-way maximum matching method is adopted in the embodiment of this application.
- the two-way maximum matching method is a dictionary-based word segmentation method.
- the dictionary-based word segmentation method is to match the Chinese character string to be analyzed with the entry in a machine dictionary according to a certain strategy. If a certain character string is found in the dictionary, the matching is successful.
- the dictionary-based word segmentation method is divided into forward matching and reverse matching according to different scanning directions, and divided into maximum matching and minimum matching according to the difference in length.
- the two-way maximum matching method compares the word segmentation results obtained by the forward maximum matching method and the reverse maximum matching method to determine the correct word segmentation method. According to research, about 90.0% of the sentences in Chinese, the forward maximum matching method and the reverse maximum matching method are completely coincident and correct.
- the word segmentation result can also be matched with a preset stop word list, the stop words are removed, and the keywords of the chat sentence are obtained.
- the Q&A knowledge base is searched according to keywords, and search results matching the keywords are obtained.
- a third-party search engine can be used to search the Q & A knowledge base.
- the Q&A knowledge base is retrieved by keywords, and there are multiple retrieval results. In the embodiment of the application, it is determined that among the retrieval results, the top ranked result is used as the initial response of the chat sentence.
- the emotion generation model is based on N pre-trained Seq2Seq models. After each Seq2Seq model is trained, different emotions are added to the initial response. The training of any Seq2Seq model includes the following steps:
- S 13K Obtain training corpus, the training corpus includes a number of input sequence and output sequence pairs, where the output sequence is the expression of the specified emotion type of the input sequence;
- the training corpus is a number of sequence pairs, including an input sequence and an output sequence, where the output sequence is the expression of the specified emotion type of the input sequence, for example, the input sequence is a neutral expression "Today's weather is sunny, temperature is 25 degrees, air quality index 20", the expected output sequence is a positive expression "the weather is great today, the temperature is at a comfortable 25 degrees, and the air quality is good”.
- S132 Input the input sequence into the Seq2Seq model, and adjust the parameters of the Seq2Seq model so that the Seq2Seq model has the greatest probability of outputting the output sequence in response to the input sequence.
- the parameter file obtained at this time defines the Seq2Seq model that generates the specified emotion type.
- the training of the deep reinforcement learning network model is performed through the following steps:
- each sample in the training samples includes the input chat sentence and the candidate response corresponding to the chat sentence and the deep reinforcement learning value of each candidate response.
- Each sample in the training sample contains the input chat sentence and the candidate response corresponding to the chat sentence and the deep learning value of each candidate response; the deep learning value is labeled according to preset rules, for example, If a candidate response of the user directly ends the dialogue, the deep learning value of the candidate response is low.
- the candidate response to the chat sentence causes the user to enter the next round of chat sentences with a positive change in emotion, then the The candidate response has a high deep learning value.
- S142 Input the training samples into a deep reinforcement learning network model, and obtain the deep reinforcement learning value predicted by the deep reinforcement learning network model.
- Deep reinforcement learning can be analogous to supervised learning. Deep reinforcement learning tasks are usually described by Markov decision process.
- the robot is in an environment, and each state is the robot's perception of the environment. When the robot performs an action, it will make the environment transfer to another state according to probability; at the same time, the environment will be given to the robot according to the reward function.
- S143 Calculate the value of the loss function L(w) according to the predicted deep learning value. Substitute the deep reinforcement learning value predicted by the deep reinforcement learning network model and the actual deep learning value of the sample into the above loss function L(w), and calculate the value of the loss function.
- the goal of training is the convergence of the loss function L(w), that is, when the network parameters of the deep reinforcement learning network model are continuously adjusted, the value of the loss function no longer decreases, but increases instead, the training ends.
- the obtained parameter file is It is a file that defines the deep reinforcement learning network model.
- Fig. 6 is a basic structural block diagram of an emotional machine chat device according to this embodiment.
- an emotional machine chat device includes: an acquisition module 210, a generation module 220, a processing module 230, a calculation module 240, and an execution module 250.
- the obtaining module 210 is used to obtain the chat sentence input by the user;
- the generating module 220 is used to input the chat sentence into a preset response generation model, and obtain the output of the response generation model in response to the chat sentence Initial response;
- a processing module 230 configured to input the initial response into a preset emotion generation model, and obtain at least two emotion-carrying candidate responses output by the emotion generation model in response to the initial response;
- calculation module 240 Used to input the candidate response and the chat sentence into the trained deep reinforcement learning network model to obtain the deep reinforcement learning value of each candidate response;
- the execution module 250 is used to return the candidate response with the largest deep reinforcement learning value As a response sentence of the chat sentence.
- the embodiment of the application obtains the chat sentence input by the user; inputs the chat sentence into a preset response generation model, and obtains the initial response output by the response generation model in response to the chat sentence; and input the initial response
- a preset emotion generation model obtain at least two candidate responses carrying emotions output by the emotion generation model in response to the initial response; input the candidate responses and the chat sentence into the trained deep reinforcement learning
- the deep reinforcement learning value of each candidate response is obtained; and the candidate response with the largest deep reinforcement learning value is returned as the response sentence of the chat sentence. It returns emotional responses to the chat sentences entered by the user, making machine chat more natural and more humane.
- the generation module includes: a first recognition sub-module, a first confirmation sub-module, and a first generation sub-module, wherein the first recognition sub-module is used to input the chat sentence into a preset In the scene recognition model, obtain the scene output by the scene recognition model in response to the chat sentence; a first confirmation sub-module, configured to determine a response generation sub-model corresponding to the chat sentence according to the scene; first generation A sub-module for inputting the chat sentence into the response generation sub-model, Acquire the initial response output by the response generation sub-model in response to the chat sentence.
- the first recognition sub-module includes: a first matching sub-module, a second confirming sub-module, and a third confirming sub-module, wherein the first matching sub-module is configured to combine the chat sentence with a preset The regular expression matching of the chat sentence, where the preset regular expression contains the characteristics of the question sentence; the second confirmation sub-module is used to determine the question corresponding to the chat sentence when the chat sentence matches the preset regular expression Answering scenario; the third confirmation sub-module is used to determine that the chat sentence corresponds to a non-question answering scenario when the chat sentence does not match the preset regular expression.
- the first generation submodule includes: a first word segmentation submodule, a first search submodule, and a first execution submodule, wherein the first word segmentation submodule performs word segmentation on the chat sentence to obtain Keywords of the chat sentence; a first search sub-module for searching the question and answer knowledge base according to the keywords to obtain search results that match the keywords; a first execution sub-module for returning the The search result is used as the initial response of the chat sentence.
- the emotion generation model in the emotional machine chat device is based on N pre-trained Seq2Seq models
- the emotional machine chat device further includes: a first acquisition submodule, a first calculation A sub-module, wherein the first acquisition sub-module is used to acquire training corpus, the training corpus includes a number of input sequence and output sequence pairs, wherein the output sequence is the expression of the specified emotion type of the input sequence; first The calculation sub-module is configured to input the input sequence into the Seq2Seq model and adjust the parameters of the Seq2Seq model to maximize the probability of the Seq2Seq model outputting the output sequence in response to the input sequence.
- Q is the true deep reinforcement learning value
- 0 is the deep reinforcement learning value predicted by the deep reinforcement learning network.
- the emotional machine chat device further includes: a second acquisition sub-module, a second calculation sub-module, a third calculation sub-module, and a first adjustment sub-module, wherein the second acquisition sub-module uses To obtain training samples, each of the training samples includes the input chat sentence and the candidate response corresponding to the chat sentence and the deep reinforcement learning value of each candidate response; the second calculation sub-module is used to combine the training sample Input to the deep reinforcement learning network model to obtain the deep reinforcement learning value predicted by the deep reinforcement learning network model; the third calculation sub-module is used for the deep learning according to the prediction Value, calculate the value of the loss function L(w); the first adjustment sub-module is used to adjust the network parameters of the deep reinforcement learning network model, and end when the value of the loss function L(w) is minimum.
- the second acquisition sub-module uses To obtain training samples, each of the training samples includes the input chat sentence and the candidate response corresponding to the chat sentence and the deep reinforcement learning value of each candidate response; the second calculation sub-module is used to
- Fig. 7 is a block diagram of the basic structure of the computer device in this embodiment.
- the computer device includes a processor, a nonvolatile storage medium, a memory, and a network interface connected through a system bus.
- the non-volatile storage medium of the computer device stores an operating system, a database, and computer-readable instructions.
- the database may store a control information sequence.
- the processor of the computer device is used to provide calculation and control capabilities, and supports the operation of the entire computer device.
- Computer readable instructions may be stored in the memory of the computer device, and when the computer readable instructions are executed by the processor, the processor can make the processor execute an emotional machine chat method.
- the network interface of the computer equipment is used to connect and communicate with the terminal.
- the processor is used to execute the specific content of the acquisition module 210, the generation module 220, the processing module 230, the calculation module 240, and the execution module 250 in FIG. 6, and the memory stores the program codes and various data required to execute the above modules.
- the network interface is used for data transmission between user terminals or servers.
- the memory in this embodiment stores the program code and data required to execute all the sub-modules in the emotional machine chat method, and the server can call the program code and data of the server to execute the functions of all the sub-modules.
- the computer device obtains the chat sentence input by the user; inputs the chat sentence into a preset response generation model, obtains the initial response output by the response generation model in response to the chat sentence; and inputs the initial response to the pre- In the sentiment generation model, obtain at least two candidate responses carrying emotions output by the sentiment generation model in response to the initial response; input the candidate responses and the chat sentence into a trained deep reinforcement learning network model In the process, the deep reinforcement learning value of each candidate response is obtained; and the candidate response with the largest deep reinforcement learning value is returned as the response sentence of the chat sentence. It returns emotional responses to the chat sentences entered by the user, making machine chat more natural and humane.
- the present application also provides a storage medium storing computer-readable instructions.
- the computer-readable instructions are executed by one or more processors, the one or more processors can execute any of the foregoing
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Life Sciences & Earth Sciences (AREA)
- Molecular Biology (AREA)
- Artificial Intelligence (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Health & Medical Sciences (AREA)
- Machine Translation (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本申请实施例行公开了一种带情感的机器聊天的方法、装置、计算机设备及存储介质,其中方法包括下述步骤:通过获取用户输入的聊天语句;将所述聊天语句输入到预设的应答生成模型中,获取所述应答生成模型响应所述聊天语句而输出的初始应答;将所述初始应答输入到预设的情感生成模型中,获取所述情感生成模型响应所述初始应答而输出的至少两个携带情感的候选应答;将所述候选应答和所述聊天语句输入到经过训练的深度强化学习网络模型中,获取各候选应答的深度强化学习值;返回深度强化学习值最大的候选应答作为所述聊天语句的应答语句。对用户输入的聊天语句,返回带情感的答复,使机器聊天更自然、更人性化。
Description
带情感的机器聊天方法、 装置、 计算机设备及存储介质
【交叉引用】
本申请以 2019年 1月 28日申请号为 2019100819896, 名称为 “带情感的机器 聊天方法、 装置、 计算机设备及存储介质” 的中国发明专利申请为基础, 并要 求其优先权。
【技术领域】
本申请涉及人工智能技术领域, 尤其涉及一种带情感的机器聊天方法、 装 置、 计算机设备及存储介质。
【背景技术】
随着人工智能技术的发展, 聊天机器人也逐渐兴起。 聊天机器人是一个用 来模拟人类对话或聊天的程序, 可以用于实用的目的, 例如客户服务、 咨询问 答, 也有一部分的社交机器人, 用来与人们聊天。
有些聊天机器人会搭载自然语言处理系统, 但更多的从输入语句中提取关 键字,再从数据库中根据关键字检索答案。这些聊天机器人回答通常中规中矩, 不带感情色彩, 聊天模式千篇一律, 导致人们与之聊天的兴趣不高, 聊天机器 人的利用率也较低。
【发明内容】
本申请提供一种带情感的机器聊天方法、 装置、 计算机设备及存储介质, 以解决聊天机器人回答千篇一律, 不带感情色彩的问题。
一种带情感的机器聊天方法, 包括如下步骤:
获取用户输入的聊天语句;
将所述聊天语句输入到预设的应答生成模型中, 获取所述应答生成模型响 应所述聊天语句而输出的初始应答;
将所述初始应答输入到预设的情感生成模型中, 获取所述情感生成模型响 应所述初始应答而输出的至少两个携带情感的候选应答;
将所述候选应答和所述聊天语句输入到经过训练的深度强化学习网络模型 中, 获取各候选应答的深度强化学习值;
返回深度强化学习值最大的候选应答作为所述聊天语句的应答语句。
一种带情感的机器聊天装置, 包括:
获取模块, 用于获取用户输入的聊天语句;
生成模块, 用于将所述聊天语句输入到预设的应答生成模型中, 获取所述 应答生成模型响应所述聊天语句而输出的初始应答;
处理模块, 用于将所述初始应答输入到预设的情感生成模型中, 获取所述 情感生成模型响应所述初始应答而输出的至少两个携带情感的候选应答;
计算模块, 用于将所述候选应答和所述聊天语句输入到经过训练的深度强 化学习网络模型中, 获取各候选应答的深度强化学习值;
执行模块, 用于返回深度强化学习值最大的候选应答作为所述聊天语句的 应答语句。
一种计算机设备, 包括存储器和处理器, 所述存储器中存储有计算机可读 指令, 所述计算机可读指令被所述处理器执行时, 使得所述处理器实现以下步 骤: 获取用户输入的聊天语句;
将所述聊天语句输入到预设的应答生成模型中, 获取所述应答生成模型响 应所述聊天语句而输出的初始应答;
将所述初始应答输入到预设的情感生成模型中, 获取所述情感生成模型响 应所述初始应答而输出的至少两个携带情感的候选应答;
将所述候选应答和所述聊天语句输入到经过训练的深度强化学习网络模型 中, 获取各候选应答的深度强化学习值;
返回深度强化学习值最大的候选应答作为所述聊天语句的应答语句。 一种计算机可读存储介质, 所述计算机可读存储介质上存储有计算机可读 指令, 所述计算机可读指令被处理器执行时实现如下步骤:
获取用户输入的聊天语句;
将所述聊天语句输入到预设的应答生成模型中, 获取所述应答生成模型响 应所述聊天语句而输出的初始应答;
将所述初始应答输入到预设的情感生成模型中, 获取所述情感生成模型响 应所述初始应答而输出的至少两个携带情感的候选应答;
将所述候选应答和所述聊天语句输入到经过训练的深度强化学习网络模型 中, 获取各候选应答的深度强化学习值;
返回深度强化学习值最大的候选应答作为所述聊天语句的应答语句。
本申请实施例的有益效果为: 通过获取用户输入的聊天语句; 将所述聊天 语句输入到预设的应答生成模型中, 获取所述应答生成模型响应所述聊天语句 而输出的初始应答; 将所述初始应答输入到预设的情感生成模型中, 获取所述 情感生成模型响应所述初始应答而输出的至少两个携带情感的候选应答; 将所 述候选应答和所述聊天语句输入到经过训练的深度强化学习网络模型中, 获取 各候选应答的深度强化学习值; 返回深度强化学习值最大的候选应答作为所述 聊天语句的应答语句。 对用户输入的聊天语句, 返回带情感的答复, 使机器聊 天更自然、 更人性化。
【附图说明】
为了更清楚地说明本申请实施例中的技术方案, 下面将对实施例描述中所需要 使用的附图作简单地介绍, 显而易见地, 下面描述中的附图仅仅是本申请的一 些实施例, 对于本领域技术人员来讲, 在不付出创造性劳动的前提下, 还可以 根据这些附图获得其他的附图
图 1为本申请实施例一种带情感的机器聊天方法基本流程示意图; 图 2为本申请实施例生成初始应答的流程示意图;
图 3为本申请实施例通过问答知识库生成初始应答的流程示意图; 图 4为本申请实施例情感生成模型训练的流程示意图;
图 5为本申请实施例深度学习强化网络训练的流程示意图;
图 6为本申请实施例一种带情感的机器聊天装置基本结构框图;
图 7为本申请实施例计算机设备基本结构框图。
【具体实施方式】 为了使本技术领域的人员更好地理解本申请方案, 下面将结合本申请实施 例中的附图, 对本申请实施例中的技术方案进行清楚、 完整地描述。
在本申请的说明书和权利要求书及上述附图中的描述的一些流程中, 包含 了按照特定顺序出现的多个操作, 但是应该清楚了解, 这些操作可以不按照其
在本文中出现的顺序来执行或并行执行, 操作的序号如 101、 102等, 仅仅是用 于区分开各个不同的操作, 序号本身不代表任何的执行顺序。 另外, 这些流程 可以包括更多或更少的操作, 并且这些操作可以按顺序执行或并行执行。 需要 说明的是, 本文中的“第一”、 “第二’’等描述, 是用于区分不同的消息、 设备、 模 块等, 不代表先后顺序, 也不限定“第一”和“第二”是不同的类型。
下面将结合本申请实施例中的附图, 对本申请实施例中的技术方案进行清 楚、 完整地描述, 显然, 所描述的实施例仅仅是本申请一部分实施例, 而不是 全部的实施例。 基于本申请中的实施例, 本领域技术人员在没有作出创造性劳 动前提下所获得的所有其他实施例, 都属于本申请保护的范围。
实施例
本技术领域技术人员可以理解, 这里所使用的“终端”、“终端设备”既包括无 线信号接收器的设备, 其仅具备无发射能力的无线信号接收器的设备, 又包括 接收和发射硬件的设备, 其具有能够在双向通信链路上, 执行双向通信的接收 和发射硬件的设备。 这种设备可以包括: 蜂窝或其他通信设备, 其具有单线路 显示器或多线路显示器或没有多线路显示器的蜂窝或其他通信设备; PCS (Personal Communications Service, 个人通信系统), 其可以组合语音、 数据处 理、传真和 /或数据通信能力; PDA( Personal Digital Assistant , 个人数字助理), 其可以包括射频接收器、 寻呼机、 互联网 /内联网访问、 网络浏览器、 记事本、 日历和 /或 GPS (Global Positioning System, 全球定位系统) 接收器; 常规膝上 型和 /或掌上型计算机或其他设备, 其具有和 /或包括射频接收器的常规膝上型和 /或掌上型计算机或其他设备。这里所使用的“终端”、“终端设备”可以是便携式、 可运输、 安装在交通工具 (航空、 海运和 /或陆地) 中的, 或者适合于和 /或配置 为在本地运行, 和 /或以分布形式, 运行在地球和 /或空间的任何其他位置运行。 这里所使用的“终端”、 “终端设备”还可以是通信终端、 上网终端、 音乐 /视频播 放终端, 例如可以是 PDA、 MID ( Mobile Internet Device, 移动互联网设备) 和 /或具有音乐 /视频播放功能的移动电话, 也可以是智能电视、 机顶盒等设备。
本实施方式中的终端即为上述的终端。 具体地, 请参阅图 1, 图 1为本实施例一种带情感的机器聊天方法的基本流 程示意图。
如图 1所示, 一种带情感的机器聊天方法, 包括下述步骤:
S 10K 获取用户输入的聊天语句;
通过终端上可交互的页面获取用户输入的语言信息, 接收到的信息可以是 文本信息, 也可以是语音信息, 通过语音识别装置, 将语音信息转化为文本信 息。
5102、 将所述聊天语句输入到预设的应答生成模型中, 获取所述应答生成 模型响应所述聊天语句而输出的初始应答;
应答生成模型可以采用经过训练的 Seq2Seq模型, 具体的训练过程为准备 训练语料, 即准备输入序列和对应的输出序列, 将输入序列输入到 Seq2Seq模 型, 计算得到输出序列的概率, 调整 Seq2Seq模型的参数, 使整个样本, 即所 有输入序列经过 Seq2Seq输出对应输出序列的概率最高。 采用 Seq2Seq模型生 成初始应答的过程为, 首先将聊天语句向量化, 例如采用 one-hot词汇编码方式 得到词向量, 输入到 Encoder层, 其中, Encoder层是以双向 LSTM层作为基本 的神经元单位的多层神经元层; 输出的 encoder的状态向量, 输入到 Decoder层 中, 其中 Decoder层也是以双向 LSTM ( Long Short-Term Memory) 层作为基本 的神经元单位的多层神经网络; 将 Decoder层输出的 final_state状态向量输入到 Softmax层, 得到概率最高的初始应答内容。
在一些实施方式中, 机器聊天应用于问题解答型场景, 采用的应答生成模 型为问答知识库, 通过关键词检索, 获得针对用户输入的聊天语句中所含问题 的答案, 返回该答案作为初始应答。
在一些实施方式中, 机器聊天既用来陪用户闲聊也可以解答用户的问题, 通过先确定是否为问题解答型场景来选择应答生成模型, 具体描述请参见图 2。
5103、 将所述初始应答输入到预设的情感生成模型中, 获取所述情感生成 模型响应所述初始应答而输出的至少两个携带情感的候选应答;
将初始应答输入到预设的情感生成模型中, 获取情感生成模型输出的候选 应答, 预设的情感生成模型至少包含两个情感生成子模型, 可以将初始应答进 行情感转化。 例如, 将情感为中性的初始应答转为带积极情感的应答, 或将情 感为中性的初始应答转为带消极情感的应答。
任意一个情感生成子模型都基于预先训练的 Seq2Seq模型, 一个情感生成 子模型是一个 Seq2Seq模型, 输出一个携带情感的候选应答, 预设的情感生成 模型中的各 Seq2Seq模型由于训练语料不同, 生成情感因素不同, 所输出的携
带情感的候选应答也不同。 将初始应答输入到预设的情感生成模型中的各 Seq2Seq模型, 输出携带各种情感的候选应答。 值得注意的是, 这里用于情感生 成的 Seq2Seq模型区别于前述的用于生成初始应答的 Seq2Seq模型, 用于情感 生成的 Seq2Seq模型具体的训练过程请参见图 4。
5104、 将所述候选应答和所述聊天语句输入到经过训练的深度强化学习网 络模型中, 获取各候选应答的深度强化学习值;
将生成的候选应答和用户输入的聊天语句都输入到经过训练的深度强化学 习网络模型中, 获取各候选应答的深度强化学习值。 深度强化学习网络将深度 学习网络的感知能力和强化学习网络的决策能力相结合, 通过计算各候选应答 的强化学习值来决策采用哪一个候选应答。 其中深度强化学习网络以下述损失
网络参数, Q为真实的深度强化学习值, 0为深度强化学习网络预测的深度强化 学习值。
深度强化学习网络的训练过程为, 准备训练样本, 训练样本中的每一个样 本都包含输入的聊天语句及聊天语句对应的候选应答以及各候选应答的深度学 习值; 深度学习值根据预先设定的规则标注, 例如, 当针对聊天语句的某一候 选应答导致用户直接结束对话, 则将该候选应答的深度学习值低, 当针对聊天 语句的某一候选应答使用户下一轮输入的聊天语句的情感有积极的变化, 则将 该候选应答的深度学习值高。
将训练样本输入到深度强化学习网络模型, 获取深度强化学习网络模型预 测的深度强化学习值, 将深度强化学习网络模型预测的深度强化学习值和样本 实际的深度学习值代入到上述损失函数 L(w), 调整深度强化学习网络模型的网 络参数, 至 L(w)最小时结束。
5105、 返回深度强化学习值最大的候选应答作为所述聊天语句的应答语句。 深度强化学习值最大的候选应答认为是对当前用户输入的聊天语句的最合 适的答复, 将应答语句返回至客户终端, 通过终端的屏幕显示文本信息, 也可 以先对文本信息进行音频的转换, 通过终端的音频输出装置, 输出语言信息。
如图 2所示, 所述预设的应答生成模型包含 M个应答生成子模型, M为大 于 1 的正整数, 在将所述聊天语句输入到预设的应答生成模型中, 获取初始应
答的步骤中, 包括下述步骤:
5111、 将所述聊天语句输入到预设的场景识别模型中, 获取所述场景识别 模型响应所述聊天语句而输出的场景;
当机器聊天应用于多种场景时, 例如既应用于问题解答型场景, 又应用于 非问题解答型场景, 先对场景识别, 再根据场景确定对应的应答生成子模型, 可以使生成的应答更有针对性。
场景识别模型可以基于关键字, 判断是问题解答型场景还是非问题解答型 场景,可以通过判断输入的聊天语句中是否包含表示疑问的关键词,例如 “?”” 什么” “多少”“哪里”“怎么” 等表示疑问的语气词。 也可以采用正则匹配的 算法, 判断输入的聊天是否疑问句, 正则表达式是对字符串操作的一种逻辑公 式, 用事先定义好的一些特定字符、 及这些特定字符的组合, 组成一个“规则 字符串”, 这个“规则字符串” 用来表达对字符串的一种过滤逻辑。
当输入的聊天语句不是疑问句, 则判断场景为非问题解答型场景。 识别出 是否为问题解答型场景, 进一步地, 可以细分场景, 例如非问题解答型下可细 分为闲聊、 赞赏、 吐槽; 问题解答型场景下细分为售前咨询、 售后服务等。 细 分的场景可以通过预设的关键词列表判断, 每一类细分场景, 预设一个关键词 列表, 当提取的输入聊天语句中的关键词与某类细分场景对应的关键词列表中 的词一致时, 认为输入聊天语句对应细分场景。
在一些实施方式中通过预先训练的 LSTM-CNN神经网络模型进行场景识别。 具体地, 对输入的内容, 首先进行中文分词, 采用基本分词库, 依次进入去除 停用词、 标点符号等、 通过词向量模型获得词嵌入向量, 传入基于 LSTM-CNN 的神经网络模型。 即词嵌入向量, 进入多层 LSTM神经单元, 得到各个阶段的 状态向量和输出; 然后, 基于各个阶段的状态向量, 进行卷积操作和池化操作 (CNN) , 得到综合向量指标; 然后将综合向量指标输入 softmax函数, 得到对 应的场景的概率。 取概率最高的场景为输入聊天语句对应的场景。
5112、 根据所述场景, 确定与所述聊天语句对应的应答生成子模型; 应答生成模型预设了 M个应答生成子模型, 且应答生成子模型与场景具有 映射关系。 确定了输入的聊天语句的场景, 根据场景与应答生成子模型的映射 关系, 确定用户输入聊天语句对应的应答生成子模型。
本申请实施例中, 应答生成子模型与场景的映射关系为, 当场景为问题解 答型时, 使用问答知识库作为应答生成子模型, 当场景为非问题解答型时, 使
用经过训练的 Seq2Seq模型。
S 113、 将所述聊天语句输入到所述应答生成子模型中, 获取所述应答生成 子模型响应所述聊天语句而输出的初始应答。
将聊天语句输入到与场景对应的应答生成子模型中, 应答生成子模型响应 聊天语句输出初始应答。本申请实施例中, 当聊天语句对应非问题解答型场景, 初始应答通过 Seq2Seq模型生成, 具体的过程请参见 S 102的描述, 当聊天语句 对应问题解答型场景, 生成初始应答的过程请参见图 3。
如图 3 所示, 当聊天语句对应问题解答型场景, 确定与所述聊天语句对应 的应答生成子模型为问答知识库; 在 S 111中, 还包括下述步骤:
S 12K 将所述聊天语句进行分词, 得到所述聊天语句的关键词;
本申请实施例中采用双向最大匹配法。 双向最大匹配方法是一种基于词典 的分词方法。 基于词典的分词方法是按照一定策略将待分析的汉字串与一个机 器词典中的词条进行匹配, 若在词典中找到某个字符串, 则匹配成功。 基于词 典的分词方法按照扫描方向的不同分为正向匹配和逆向匹配, 按照长度的不同 分为最大匹配和最小匹配。 双向最大匹配法是将正向最大匹配法得到的分词结 果和逆向最大匹配法的到的结果进行比较, 从而决定正确的分词方法。 根据研 究表明, 中文中 90.0%左右的句子, 正向最大匹配法和逆向最大匹配法完全重 合且正确, 只有大概 9.0%的句子两种切分方法得到的结果不一样, 但其中必有 一个是正确的, 只有不到 1.0%的句子, 或者正向最大匹配法和逆向最大匹配法 的切分虽重合却是错的, 即有歧义的, 或者正向最大匹配法和逆向最大匹配法 切分不同但两个都不对。 所以为了使切分出来的词汇能准确的反映句子的意思, 采用双向最大匹配法分词。
对聊天语句进行分词后, 还可以将分词结果与预设的停用词表进行匹配, 去除停用词, 得到聊天语句的关键词。
5122、 根据所述关键词检索所述问答知识库, 得到与所述关键词匹配的检 索结果;
根据关键词检索问答知识库, 得到与关键词匹配的检索结果。 根据关键词 检索问答知识库, 可以采用第三方的搜索引擎, 对问答知识库进行检索。
5123、 返回所述检索结果作为所述聊天语句的初始应答。
通常通过关键词对问答知识库进行检索, 检索结果有多个, 本申请实施例 中确定检索结果中, 排名最前的结果作为聊天语句的初始应答。
如图 4所示, 情感生成模型基于 N个预先训练的 Seq2Seq模型, 每一个 Seq2Seq模型被训练后, 为初始应答添加不同的情感, 其中, 任一 Seq2Seq模型 的训练包括以下步骤:
S 13K 获取训练语料, 所述训练语料包含若干输入序列和输出序列对, 其 中, 所述输出序列为所述输入序列的指定情感类型的表达;
训练语料是若干的序列对, 包含输入序列和输出序列, 其中, 输出序列为 输入序列的指定情感类型的表达, 例如, 输入序列为中性的表达“今天天气晴、 气温 25度、空气质量指数 20”,预期的输出序列为积极的表达“今天天气很棒, 温度在舒适的 25度, 空气质量优良” 。
S 132、将所述输入序列输入到 Seq2Seq模型中,调整 Seq2Seq模型的参数, 使 Seq2Seq模型响应所述输入序列而输出所述输出序列的概率最大。
将训练语料中的输入序列输入到 Seq2Seq模型中, 通过梯度下降法, 调整 Seq2Seq模型各节点的参数,使 Seq2Seq模型输出预期的输出序列的概率最大时, 训练结束。此时得到的参数文件即定义了生成该指定情感类型的 Seq2Seq模型。
如图 5 所示, 本申请实施例中, 深度强化学习网络模型的训练通过下述步 骤进行训练:
5141、 获取训练样本, 所述训练样本中的每一个样本都包含输入的聊天语 句及聊天语句对应的候选应答及各候选应答的深度强化学习值;
准备训练样本, 训练样本中的每一个样本都包含输入的聊天语句及聊天语 句对应的候选应答以及各候选应答的深度学习值; 深度学习值根据预先设定的 规则标注, 例如, 当针对聊天语句的某一候选应答导致用户直接结束对话, 则 将该候选应答的深度学习值低, 当针对聊天语句的某一候选应答使用户下一轮 输入的聊天语句的情感有积极的变化, 则将该候选应答的深度学习值高。
5142、 将所述训练样本输入到深度强化学习网络模型, 获取所述深度强化 学习网络模型预测的深度强化学习值;
将训练样本输入到深度强化学习网络模型, 获取深度强化学习网络模型预 测的深度强化学习值。 深度强化学习可以类比为监督学习, 深度强化学习任务 通常使用马尔可夫决策过程描述, 机器人处在一个环境中, 每个状态为机器人 对环境的感知。 当机器人执行一个动作后, 会使得环境按概率转移到另一个状 态; 同时, 环境会根据奖励函数给机器人。
5143、 根据所述预测的深度学习值, 计算所述损失函数 L(w)的值;
将深度强化学习网络模型预测的深度强化学习值和样本实际的深度学习值 代入到上述损失函数 L(w), 计算损失函数的值。
S 144、 调整深度强化学习网络模型的网络参数, 至所述损失函数 L(w)的值 最小时结束。
训练的目标是损失函数 L(w)收敛, 即当继续调整深度强化学习网络模型的 网络参数时, 损失函数的值不再减少, 反而增大时, 训练结束, 此时, 得到的 参数文件即为定义该深度强化学习网络模型的文件。
为解决上述技术问题本申请实施例还提供一种带情感的机器聊天装置。 具 体请参阅图 6, 图 6为本实施例带情感的机器聊天装置的基本结构框图。
如图 6所示, 一种带情感的机器聊天装置, 包括: 获取模块 210、 生成模块 220、 处理模块 230、 计算模块 240和执行模块 250。 其中, 获取模块 210, 用于 获取用户输入的聊天语句; 生成模块 220, 用于将所述聊天语句输入到预设的应 答生成模型中, 获取所述应答生成模型响应所述聊天语句而输出的初始应答; 处理模块 230, 用于将所述初始应答输入到预设的情感生成模型中, 获取所述情 感生成模型响应所述初始应答而输出的至少两个携带情感的候选应答; 计算模 块 240, 用于将所述候选应答和所述聊天语句输入到经过训练的深度强化学习网 络模型中, 获取各候选应答的深度强化学习值; 执行模块 250, 用于返回深度强 化学习值最大的候选应答作为所述聊天语句的应答语句。
本申请实施例通过获取用户输入的聊天语句; 将所述聊天语句输入到预设 的应答生成模型中, 获取所述应答生成模型响应所述聊天语句而输出的初始应 答; 将所述初始应答输入到预设的情感生成模型中, 获取所述情感生成模型响 应所述初始应答而输出的至少两个携带情感的候选应答; 将所述候选应答和所 述聊天语句输入到经过训练的深度强化学习网络模型中, 获取各候选应答的深 度强化学习值; 返回深度强化学习值最大的候选应答作为所述聊天语句的应答 语句。 对用户输入的聊天语句, 返回带情感的答复, 使机器聊天更自然、 更人 性化。
在一些实施方式中, 所述生成模块包括: 第一识别子模块、 第一确认子模 块和第一生成子模块, 其中, 第一识别子模块, 用于将所述聊天语句输入到预 设的场景识别模型中, 获取所述场景识别模型响应所述聊天语句而输出的场景; 第一确认子模块, 用于根据所述场景, 确定与所述聊天语句对应的应答生成子 模型; 第一生成子模块, 用于将所述聊天语句输入到所述应答生成子模型中,
获取所述应答生成子模型响应所述聊天语句而输出的初始应答。
在一些实施方式中, 所述第一识别子模块包括: 第一匹配子模块、 第二确 认子模块和第三确认子模块, 其中第一匹配子模块, 用于将所述聊天语句与预 设的正则表达式匹配, 其中, 所述预设的正则表达式包含疑问句特征; 第二确 认子模块, 用于当所述聊天语句与预设的正则表达式匹配时, 确定所述聊天语 句对应问题解答型场景; 第三确认子模块, 用于当所述聊天语句与预设的正则 表达式不匹配时, 确定所述聊天语句对应非问题解答型场景。
在一些实施方式中, 所述第一生成子模块包括: 第一分词子模块、 第一检 索子模块和第一执行子模块, 其中, 第一分词子模块, 将所述聊天语句进行分 词, 得到所述聊天语句的关键词; 第一检索子模块, 用于根据所述关键词检索 所述问答知识库, 得到与所述关键词匹配的检索结果; 第一执行子模块, 用于 返回所述检索结果作为所述聊天语句的初始应答。
在一些实施方式中,所述带情感的机器聊天装置中所述情感生成模型基于 N 个预先训练的 Seq2Seq模型, 所述带情感的机器聊天装置中还包括: 第一获取 子模块、 第一计算子模块, 其中, 第一获取子模块, 用于获取训练语料, 所述 训练语料包含若干输入序列和输出序列对, 其中, 所述输出序列为所述输入序 列的指定情感类型的表达; 第一计算子模块, 用于将所述输入序列输入到 Seq2Seq模型中, 调整 Seq2Seq模型的参数, 使 Seq2Seq模型响应所述输入序列 而输出所述输出序列的概率最大。
在一些实施方式中, 所述带情感的机器聊天装置中所述深度强化学习网络
网络参数, Q为真实的深度强化学习值, 0为深度强化学习网络预测的深度强化 学习值。
在一些实施方式中,所述带情感的机器聊天装置还包括: 第二获取子模块、 第二计算子模块、 第三计算子模块和第一调节子模块, 其中, 第二获取子模块, 用于获取训练样本, 所述训练样本中的每一个样本都包含输入的聊天语句及聊 天语句对应的候选应答及各候选应答的深度强化学习值; 第二计算子模块, 用 于将所述训练样本输入到深度强化学习网络模型, 获取所述深度强化学习网络 模型预测的深度强化学习值; 第三计算子模块, 用于根据所述预测的深度学习
值, 计算所述损失函数 L(w)的值; 第一调节子模块, 用于调整深度强化学习网 络模型的网络参数, 至所述损失函数 L(w)的值最小时结束。
为解决上述技术问题, 本申请实施例还提供计算机设备。 具体请参阅图 7, 图 7为本实施例计算机设备基本结构框图。 如图 7所示, 计算机设备的内部结构示意图。 如图 7所示, 该计算机设备 包括通过系统总线连接的处理器、 非易失性存储介质、 存储器和网络接口。 其 中, 该计算机设备的非易失性存储介质存储有操作系统、 数据库和计算机可读 指令, 数据库中可存储有控件信息序列, 该计算机可读指令被处理器执行时, 可使得处理器实现上述任意实施例的带情感的机器聊天的方法。 该计算机设备 的处理器用于提供计算和控制能力, 支撑整个计算机设备的运行。 该计算机设 备的存储器中可存储有计算机可读指令, 该计算机可读指令被处理器执行时, 可使得处理器执行一种带情感的机器聊天的方法。 该计算机设备的网络接口用 于与终端连接通信。 本领域技术人员可以理解, 图 7 中示出的结构, 仅仅是与 本申请方案相关的部分结构的框图, 并不构成对本申请方案所应用于其上的计 算机设备的限定, 具体的计算机设备可以包括比图中所示更多或更少的部件, 或者组合某些部件, 或者具有不同的部件布置。
本实施方式中处理器用于执行图 6中获取模块 210、 生成模块 220、 处理模 块 230、 计算模块 240和执行模块 250的具体内容, 存储器存储有执行上述模块 所需的程序代码和各类数据。 网络接口用于向用户终端或服务器之间的数据传 输。 本实施方式中的存储器存储有带情感的机器聊天方法中执行所有子模块所 需的程序代码及数据, 服务器能够调用服务器的程序代码及数据执行所有子模 块的功能。
计算机设备通过获取用户输入的聊天语句; 将所述聊天语句输入到预设的 应答生成模型中, 获取所述应答生成模型响应所述聊天语句而输出的初始应答; 将所述初始应答输入到预设的情感生成模型中, 获取所述情感生成模型响应所 述初始应答而输出的至少两个携带情感的候选应答; 将所述候选应答和所述聊 天语句输入到经过训练的深度强化学习网络模型中, 获取各候选应答的深度强 化学习值; 返回深度强化学习值最大的候选应答作为所述聊天语句的应答语句。 对用户输入的聊天语句, 返回带情感的答复, 使机器聊天更自然、 更人性化。
本申请还提供一种存储有计算机可读指令的存储介质, 所述计算机可读指 令被一个或多个处理器执行时, 使得一个或多个处理器执行上述任一实施例所
Claims
1、 一种带情感的机器聊天方法, 其特征在于, 包括下述步骤:
获取用户输入的聊天语句;
将所述聊天语句输入到预设的应答生成模型中, 获取所述应答生成模型响 应所述聊天语句而输出的初始应答;
将所述初始应答输入到预设的情感生成模型中, 获取所述情感生成模型响 应所述初始应答而输出的至少两个携带情感的候选应答;
将所述候选应答和所述聊天语句输入到经过训练的深度强化学习网络模型 中, 获取各候选应答的深度强化学习值;
返回深度强化学习值最大的候选应答作为所述聊天语句的应答语句。
2、 根据权利要求 1所述的带情感的机器聊天方法, 其特征在于, 所述预设 的应答生成模型包含至少两个应答生成子模型, 在将所述聊天语句输入到预设 的应答生成模型中, 获取初始应答的步骤中, 包括下述步骤:
将所述聊天语句输入到预设的场景识别模型中, 获取所述场景识别模型响 应所述聊天语句而输出的场景;
根据所述场景, 确定与所述聊天语句对应的应答生成子模型;
将所述聊天语句输入到所述应答生成子模型中, 获取所述应答生成子模型 响应所述聊天语句而输出的初始应答。
3、 根据权利要求 2所述的带情感的机器聊天方法, 其特征在于, 预设的场 景识别模型采用正则匹配算法, 在所述将所述聊天语句输入到预设的场景识别 模型中, 获取所述场景识别模型响应所述聊天语句而输出的场景的步骤中, 包 括下述步骤:
将所述聊天语句与预设的正则表达式匹配, 其中, 所述预设的正则表达式 包含疑问句特征;
当所述聊天语句与预设的正则表达式匹配时, 确定所述聊天语句对应问题 解答型场景;
当所述聊天语句与预设的正则表达式不匹配时, 确定所述聊天语句对应非 问题解答型场景。
4、 根据权利要求 3所述的带情感的机器聊天方法, 其特征在于, 所述根据 所述场景, 确定与所述聊天语句对应的应答生成子模型的步騍为:
根据问题解答型场景, 确定与所述聊天语句对应的应答生成子模型为问答 知识库;
在所述将所述聊天语句输入到所述应答生成子模型中, 获取所述应答生成 子模型响应所述聊天语句而输出的初始应答的步騍中, 包括下述步騍:
将所述聊天语句进行分词, 得到所述聊天语句的关键词;
根据所述关键词检索所述问答知识库, 得到与所述关键词匹配的检索结果; 返回所述检索结果作为所述聊天语句的初始应答。
5、 根据权利要求 1所述的带情感的机器聊天方法, 其特征在于, 所述情感 生成模型基于 N个预先训练的 Seq2Seq模型, 其中, 任一 Seq2Seq模型的训练 包括以下步骤:
获取训练语料, 所述训练语料包含若干输入序列和输出序列对, 其中, 所 述输出序列为所述输入序列的指定情感类型的表达;
将所述输入序列输入到 Seq2Seq 模型中, 调整 Seq2Seq 模型的参数, 使 Seq2Seq模型响应所述输入序列而输出所述输出序列的概率最大。
6、 根据权利要求 1所述的带情感的机器聊天方法, 其特征在于, 所述深度
网络参数, Q为真实的深度强化学习值, 0为深度强化学习网络预测的深度强化 学习值。
7、 根据权利要求 6所述的带情感的机器聊天方法, 其特征在于, 所述深度 强化学习网络模型的训练通过下述步骤进行训练:
获取训练样本, 所述训练样本中的每一个样本都包含输入的聊天语句及聊 天语句对应的候选应答及各候选应答的深度强化学习值;
将所述训练样本输入到深度强化学习网络模型, 获取所述深度强化学习网 络模型预测的深度强化学习值;
根据所述预测的深度学习值, 计算所述损失函数 L( w)的值;
调整深度强化学习网络模型的网络参数, 至所述损失函数 L(w)的值最小时 结束。
8、 一种带情感的机器聊天装置, 其特征在于, 包括:
获取模块, 用于获取用户输入的聊天语句;
生成模块, 用于将所述聊天语句输入到预设的应答生成模型中, 获取所述 应答生成模型响应所述聊天语句而输出的初始应答;
处理模块, 用于将所述初始应答输入到预设的情感生成模型中, 获取所述 情感生成模型响应所述初始应答而输出的至少两个携带情感的候选应答;
计算模块, 用于将所述候选应答和所述聊天语句输入到经过训练的深度强 化学习网络模型中, 获取各候选应答的深度强化学习值;
执行模块, 用于返回深度强化学习值最大的候选应答作为所述聊天语句的 应答语句。
9、 根据权利要求 8所述的带情感的机器聊天装置, 其特征在于, 所述生成 模块包括:
第一识别子模块, 用于将所述聊天语句输入到预设的场景识别模型中, 获 取所述场景识别模型响应所述聊天语句而输出的场景;
第一确认子模块, 用于根据所述场景, 确定与所述聊天语句对应的应答生 成子模型;
第一生成子模块, 用于将所述聊天语句输入到所述应答生成子模型中, 获 取所述应答生成子模型响应所述聊天语句而输出的初始应答。
10、 根据权利要求 9所述的带情感的机器聊天装置, 其特征在于, 所述第 一识别子模块包括:
第一匹配子模块, 用于将所述聊天语句与预设的正则表达式匹配, 其中, 所述预设的正则表达式包含疑问句特征;
第二确认子模块, 用于当所述聊天语句与预设的正则表达式匹配时, 确定 所述聊天语句对应问题解答型场景;
第三确认子模块, 用于当所述聊天语句与预设的正则表达式不匹配时, 确 定所述聊天语句对应非问题解答型场景。
11、 一种计算机设备, 包括存储器和处理器, 所述存储器中存储有计算机 可读指令, 所述计算机可读指令被所述处理器执行时, 使得所述处理器实现以 下步骤: 获取用户输入的聊天语句;
将所述聊天语句输入到预设的应答生成模型中, 获取所述应答生成模型响 应所述聊天语句而输出的初始应答;
将所述初始应答输入到预设的情感生成模型中, 获取所述情感生成模型响
应所述初始应答而输出的至少两个携带情感的候选应答;
将所述候选应答和所述聊天语句输入到经过训练的深度强化学习网络模型 中, 获取各候选应答的深度强化学习值;
返回深度强化学习值最大的候选应答作为所述聊天语句的应答语句。
12、 根据权利要求 11所述的计算机设备, 其特征在于, 所述预设的应答生 成模型包含至少两个应答生成子模型, 在将所述聊天语句输入到预设的应答生 成模型中, 获取初始应答的步骤中, 包括下述步骤:
将所述聊天语句输入到预设的场景识别模型中, 获取所述场景识别模型响 应所述聊天语句而输出的场景;
根据所述场景, 确定与所述聊天语句对应的应答生成子模型;
将所述聊天语句输入到所述应答生成子模型中, 获取所述应答生成子模型 响应所述聊天语句而输出的初始应答。
13、 根据权利要求 12所述的计算机设备, 其特征在于, 预设的场景识别模 型采用正则匹配算法, 在所述将所述聊天语句输入到预设的场景识别模型中, 获取所述场景识别模型响应所述聊天语句而输出的场景的步骤中, 包括下述步 骤:
将所述聊天语句与预设的正则表达式匹配, 其中, 所述预设的正则表达式 包含疑问句特征;
当所述聊天语句与预设的正则表达式匹配时, 确定所述聊天语句对应问题 解答型场景;
当所述聊天语句与预设的正则表达式不匹配时, 确定所述聊天语句对应非 问题解答型场景。
14、根据权利要求 12所述的计算机设备,其特征在于,所述根据所述场景, 确定与所述聊天语句对应的应答生成子模型的步骤为:
根据问题解答型场景, 确定与所述聊天语句对应的应答生成子模型为问答 知识库;
在所述将所述聊天语句输入到所述应答生成子模型中, 获取所述应答生成 子模型响应所述聊天语句而输出的初始应答的步騍中, 包括下述步騍:
将所述聊天语句进行分词, 得到所述聊天语句的关键词;
根据所述关键词检索所述问答知识库, 得到与所述关键词匹配的检索结果; 返回所述检索结果作为所述聊天语句的初始应答。
15、 根据权利要求 11所述的计算机设备, 其特征在于, 所述情感生成模型 基于 N个预先训练的 Seq2Seq模型, 其中, 任一 Seq2Seq模型的训练包括以下 步骤:
获取训练语料, 所述训练语料包含若干输入序列和输出序列对, 其中, 所 述输出序列为所述输入序列的指定情感类型的表达;
将所述输入序列输入到 Seq2Seq 模型中, 调整 Seq2Seq 模型的参数, 使 Seq2Seq模型响应所述输入序列而输出所述输出序列的概率最大。
16、 一种计算机可读存储介质, 所述计算机可读存储介质上存储有计算机 可读指令, 所述计算机可读指令被处理器执行时实现以下步骤:
获取用户输入的聊天语句;
将所述聊天语句输入到预设的应答生成模型中, 获取所述应答生成模型响 应所述聊天语句而输出的初始应答;
将所述初始应答输入到预设的情感生成模型中, 获取所述情感生成模型响 应所述初始应答而输出的至少两个携带情感的候选应答;
将所述候选应答和所述聊天语句输入到经过训练的深度强化学习网络模型 中, 获取各候选应答的深度强化学习值;
返回深度强化学习值最大的候选应答作为所述聊天语句的应答语句。
17、 根据权利要求 16所述的计算机可读存介质, 其特征在于, 所述预设的 应答生成模型包含至少两个应答生成子模型, 在将所述聊天语句输入到预设的 应答生成模型中, 获取初始应答的步骤中, 包括下述步骤:
将所述聊天语句输入到预设的场景识别模型中, 获取所述场景识别模型响 应所述聊天语句而输出的场景;
根据所述场景, 确定与所述聊天语句对应的应答生成子模型;
将所述聊天语句输入到所述应答生成子模型中, 获取所述应答生成子模型 响应所述聊天语句而输出的初始应答。
18、 根据权利要求 17所述的计算机可读存介质, 其特征在于, 预设的场景 识别模型采用正则匹配算法, 在所述将所述聊天语句输入到预设的场景识别模 型中, 获取所述场景识别模型响应所述聊天语句而输出的场景的步骤中, 包括 下述步骤:
将所述聊天语句与预设的正则表达式匹配, 其中, 所述预设的正则表达式 包含疑问句特征;
当所述聊天语句与预设的正则表达式匹配时, 确定所述聊天语句对应问题 解答型场景;
当所述聊天语句与预设的正则表达式不匹配时, 确定所述聊天语句对应非 问题解答型场景。
19、 根据权利要求 18所述的计算机可读存介质, 其特征在于, 所述根据所 述场景, 确定与所述聊天语句对应的应答生成子模型的步騍为:
根据问题解答型场景, 确定与所述聊天语句对应的应答生成子模型为问答 知识库;
在所述将所述聊天语句输入到所述应答生成子模型中, 获取所述应答生成 子模型响应所述聊天语句而输出的初始应答的步騍中, 包括下述步騍:
将所述聊天语句进行分词, 得到所述聊天语句的关键词;
根据所述关键词检索所述问答知识库, 得到与所述关键词匹配的检索结果; 返回所述检索结果作为所述聊天语句的初始应答。
20、 根据权利要求 18所述的计算机可读存介质, 其特征在于, 所述情感生 成模型基于 N个预先训练的 Seq2Seq模型, 其中, 任一 Seq2Seq模型的训练包 括以下步骤:
获取训练语料, 所述训练语料包含若干输入序列和输出序列对, 其中, 所 述输出序列为所述输入序列的指定情感类型的表达;
将所述输入序列输入到 Seq2Seq 模型中, 调整 Seq2Seq 模型的参数, 使 Seq2Seq模型响应所述输入序列而输出所述输出序列的概率最大。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910081989.6A CN109977201B (zh) | 2019-01-28 | 2019-01-28 | 带情感的机器聊天方法、装置、计算机设备及存储介质 |
| CN201910081989.6 | 2019-01-28 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2020155619A1 true WO2020155619A1 (zh) | 2020-08-06 |
Family
ID=67076749
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2019/103516 Ceased WO2020155619A1 (zh) | 2019-01-28 | 2019-08-30 | 带情感的机器聊天方法、装置、计算机设备及存储介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN109977201B (zh) |
| WO (1) | WO2020155619A1 (zh) |
Cited By (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112163078A (zh) * | 2020-09-29 | 2021-01-01 | 彩讯科技股份有限公司 | 智能应答方法、装置、服务器及存储介质 |
| CN112560447A (zh) * | 2020-12-22 | 2021-03-26 | 联想(北京)有限公司 | 回复信息获取方法、装置及计算机设备 |
| CN113360614A (zh) * | 2021-05-31 | 2021-09-07 | 多益网络有限公司 | 生成式聊天机器人回复情感控制方法、装置、终端及介质 |
| CN114187997A (zh) * | 2021-11-16 | 2022-03-15 | 同济大学 | 一种面向抑郁人群的心理咨询聊天机器人实现方法 |
| CN114297364A (zh) * | 2021-12-31 | 2022-04-08 | 山东科技大学 | 一种基于深度学习和强化学习的自动回复对话系统 |
| CN116303944A (zh) * | 2023-02-23 | 2023-06-23 | 重庆特斯联启智科技有限公司 | 基于离线强化学习的任务型对话方法和系统 |
| CN116486816A (zh) * | 2023-05-06 | 2023-07-25 | 平安科技(深圳)有限公司 | 车险理赔风险识别方法、装置、计算机设备及存储介质 |
| CN116932704A (zh) * | 2022-04-01 | 2023-10-24 | 中移信息技术有限公司 | 智能问答方法及系统 |
| CN120297424A (zh) * | 2025-06-12 | 2025-07-11 | 中国工程物理研究院计算机应用研究所 | 一种针对聊天大模型服务的可用性评估方法及系统 |
Families Citing this family (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109977201B (zh) * | 2019-01-28 | 2023-09-22 | 平安科技(深圳)有限公司 | 带情感的机器聊天方法、装置、计算机设备及存储介质 |
| CN110717022A (zh) * | 2019-09-18 | 2020-01-21 | 平安科技(深圳)有限公司 | 一种机器人对话生成方法、装置、可读存储介质及机器人 |
| CN112750430B (zh) * | 2019-10-29 | 2024-12-24 | 微软技术许可有限责任公司 | 在自动聊天中提供响应 |
| CN111241250B (zh) * | 2020-01-22 | 2023-10-24 | 中国人民大学 | 一种情感对话生成系统和方法 |
| CN111400466A (zh) * | 2020-03-05 | 2020-07-10 | 中国工商银行股份有限公司 | 一种基于强化学习的智能对话方法及装置 |
| CN111553171B (zh) * | 2020-04-09 | 2024-02-06 | 北京小米松果电子有限公司 | 语料处理方法、装置及存储介质 |
| CN111985216A (zh) * | 2020-08-25 | 2020-11-24 | 武汉长江通信产业集团股份有限公司 | 基于强化学习和卷积神经网络的情感倾向性分析方法 |
| CN113094490B (zh) * | 2021-05-13 | 2022-11-22 | 度小满科技(北京)有限公司 | 一种会话交互方法、装置、电子设备及存储介质 |
| CN113868386A (zh) * | 2021-09-18 | 2021-12-31 | 天津大学 | 一种可控情感对话生成的方法 |
| CN114118451B (zh) * | 2021-11-29 | 2025-05-30 | 平安科技(深圳)有限公司 | 智能交互模型的训练方法、交互方法、装置及设备 |
| CN116860913A (zh) * | 2023-06-13 | 2023-10-10 | 北京中科声智科技有限公司 | 语音交互方法、装置、设备及存储介质 |
| CN116775834A (zh) * | 2023-06-25 | 2023-09-19 | 上海顺诠科技有限公司 | 具有复合式有限状态机的主动聊天机器人的系统及其方法 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20140324429A1 (en) * | 2013-04-25 | 2014-10-30 | Elektrobit Automotive Gmbh | Computer-implemented method for automatic training of a dialogue system, and dialogue system for generating semantic annotations |
| CN108874972A (zh) * | 2018-06-08 | 2018-11-23 | 青岛里奥机器人技术有限公司 | 一种基于深度学习的多轮情感对话方法 |
| CN108960402A (zh) * | 2018-06-11 | 2018-12-07 | 上海乐言信息科技有限公司 | 一种面向聊天机器人的混合策略式情感安抚系统 |
| CN109129501A (zh) * | 2018-08-28 | 2019-01-04 | 西安交通大学 | 一种陪伴式智能家居中控机器人 |
| CN109977201A (zh) * | 2019-01-28 | 2019-07-05 | 平安科技(深圳)有限公司 | 带情感的机器聊天方法、装置、计算机设备及存储介质 |
Family Cites Families (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104809103B (zh) * | 2015-04-29 | 2018-03-30 | 北京京东尚科信息技术有限公司 | 一种人机对话的语义分析方法及系统 |
| CN106910513A (zh) * | 2015-12-22 | 2017-06-30 | 微软技术许可有限责任公司 | 情绪智能聊天引擎 |
| JP6660770B2 (ja) * | 2016-03-02 | 2020-03-11 | 株式会社アイ・ビジネスセンター | 対話システムおよびプログラム |
| US11580350B2 (en) * | 2016-12-21 | 2023-02-14 | Microsoft Technology Licensing, Llc | Systems and methods for an emotionally intelligent chat bot |
| CN110674270B (zh) * | 2017-08-28 | 2022-01-28 | 大国创新智能科技(东莞)有限公司 | 基于人工智能的幽默生成与情感交互方法及机器人系统 |
| CN107679234B (zh) * | 2017-10-24 | 2020-02-11 | 上海携程国际旅行社有限公司 | 客服信息提供方法、装置、电子设备、存储介质 |
-
2019
- 2019-01-28 CN CN201910081989.6A patent/CN109977201B/zh active Active
- 2019-08-30 WO PCT/CN2019/103516 patent/WO2020155619A1/zh not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20140324429A1 (en) * | 2013-04-25 | 2014-10-30 | Elektrobit Automotive Gmbh | Computer-implemented method for automatic training of a dialogue system, and dialogue system for generating semantic annotations |
| CN108874972A (zh) * | 2018-06-08 | 2018-11-23 | 青岛里奥机器人技术有限公司 | 一种基于深度学习的多轮情感对话方法 |
| CN108960402A (zh) * | 2018-06-11 | 2018-12-07 | 上海乐言信息科技有限公司 | 一种面向聊天机器人的混合策略式情感安抚系统 |
| CN109129501A (zh) * | 2018-08-28 | 2019-01-04 | 西安交通大学 | 一种陪伴式智能家居中控机器人 |
| CN109977201A (zh) * | 2019-01-28 | 2019-07-05 | 平安科技(深圳)有限公司 | 带情感的机器聊天方法、装置、计算机设备及存储介质 |
Cited By (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112163078A (zh) * | 2020-09-29 | 2021-01-01 | 彩讯科技股份有限公司 | 智能应答方法、装置、服务器及存储介质 |
| CN112163078B (zh) * | 2020-09-29 | 2024-06-07 | 彩讯科技股份有限公司 | 智能应答方法、装置、服务器及存储介质 |
| CN112560447A (zh) * | 2020-12-22 | 2021-03-26 | 联想(北京)有限公司 | 回复信息获取方法、装置及计算机设备 |
| CN113360614A (zh) * | 2021-05-31 | 2021-09-07 | 多益网络有限公司 | 生成式聊天机器人回复情感控制方法、装置、终端及介质 |
| CN114187997A (zh) * | 2021-11-16 | 2022-03-15 | 同济大学 | 一种面向抑郁人群的心理咨询聊天机器人实现方法 |
| CN114297364A (zh) * | 2021-12-31 | 2022-04-08 | 山东科技大学 | 一种基于深度学习和强化学习的自动回复对话系统 |
| CN116932704A (zh) * | 2022-04-01 | 2023-10-24 | 中移信息技术有限公司 | 智能问答方法及系统 |
| CN116303944A (zh) * | 2023-02-23 | 2023-06-23 | 重庆特斯联启智科技有限公司 | 基于离线强化学习的任务型对话方法和系统 |
| CN116486816A (zh) * | 2023-05-06 | 2023-07-25 | 平安科技(深圳)有限公司 | 车险理赔风险识别方法、装置、计算机设备及存储介质 |
| CN120297424A (zh) * | 2025-06-12 | 2025-07-11 | 中国工程物理研究院计算机应用研究所 | 一种针对聊天大模型服务的可用性评估方法及系统 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN109977201A (zh) | 2019-07-05 |
| CN109977201B (zh) | 2023-09-22 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2020155619A1 (zh) | 带情感的机器聊天方法、装置、计算机设备及存储介质 | |
| CN110046221B (zh) | 一种机器对话方法、装置、计算机设备及存储介质 | |
| CN111914551B (zh) | 自然语言处理方法、装置、电子设备及存储介质 | |
| CN114596844B (zh) | 声学模型的训练方法、语音识别方法及相关设备 | |
| CN111966800B (zh) | 情感对话生成方法、装置及情感对话模型训练方法、装置 | |
| CN112528637B (zh) | 文本处理模型训练方法、装置、计算机设备和存储介质 | |
| US20190278857A1 (en) | Sequence to Sequence Conversational Query Understanding | |
| CN111967224A (zh) | 对话文本的处理方法、装置、电子设备及存储介质 | |
| CN111428010A (zh) | 人机智能问答的方法和装置 | |
| CN114840671A (zh) | 对话生成方法、模型的训练方法、装置、设备及介质 | |
| CN116913278B (zh) | 语音处理方法、装置、设备和存储介质 | |
| CN110083693A (zh) | 机器人对话回复方法及装置 | |
| CN108959388B (zh) | 信息生成方法及装置 | |
| CN111797220A (zh) | 对话生成方法、装置、计算机设备和存储介质 | |
| CN111191450A (zh) | 语料清洗方法、语料录入设备及计算机可读存储介质 | |
| CN117972160B (zh) | 一种多模态信息处理方法及装置 | |
| CN118364060B (zh) | 文本生成模型训练方法、文本生成方法及答案生成方法 | |
| CN109857865B (zh) | 一种文本分类方法及系统 | |
| CN117971420A (zh) | 任务处理、交通任务处理以及任务处理模型训练方法 | |
| CN114333790B (zh) | 数据处理方法、装置、设备、存储介质及程序产品 | |
| CN120937017A (zh) | 具有仅解码器语言模型的多模态神经网络 | |
| CN117455009A (zh) | 联邦学习方法、联邦预测方法、装置、设备及存储介质 | |
| CN118484517A (zh) | 文本查询方法及装置、电子设备、存储介质 | |
| CN117807181A (zh) | 文本处理方法、对象搜索方法及文本处理模型的训练方法 | |
| CN117746862A (zh) | 基于改进的seq2seq模型的多意图识别方法、装置、设备及介质 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19912414 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 19912414 Country of ref document: EP Kind code of ref document: A1 |


