Intelligent dialogue methods, devices, equipment and storage media
By recognizing user emotions and selecting personalized, real-person reassurance language from a reassurance corpus, the shortcomings of intelligent customer service in alleviating negative emotions are addressed, improving dialogue quality and user experience.
Patent Information
- Application Number
- CN202211173179.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-26
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2042-09-26
AI Technical Summary
During intelligent dialogue, the intelligent customer service system struggles to output high-quality reassuring language to alleviate users' negative emotions, thus affecting the quality of the conversation.
By acquiring conversation data, identifying users' emotion types, and searching for candidate reassurance data that match the emotion types from the reassurance corpus, personalized reassurance can be carried out using historical reassurance data from human customer service representatives, thereby improving the quality and effectiveness of the data.
It improved the quality of conversations between users and the intelligent customer service, enhanced the reassurance effect, and improved the user experience through personalized output of real-person reassurance language data.
Smart Images

Figure CN115658857B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to an intelligent dialogue method, apparatus, device, and storage medium. Background Technology
[0002] Intelligent customer service facilitates communication between businesses and users, serving as a crucial technological tool for businesses to receive user feedback, resolve user issues, and enhance user experience. However, users may experience negative emotions during their interactions with intelligent customer service. In such cases, the intelligent customer service system needs to soothe and alleviate the user's negative feelings.
[0003] Among these factors, the ability of intelligent customer service to provide users with accurate and reassuring language is a key factor affecting the quality of the conversation. Therefore, how to provide users with high-quality reassuring language during intelligent dialogue has become a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0004] This application provides an intelligent dialogue method, apparatus, device, and storage medium, which can improve the dialogue quality between users and intelligent customer service. The technical solution is as follows:
[0005] On the one hand, an intelligent dialogue method is provided, the method comprising:
[0006] Obtain the first dialogue data during the current conversation between the first person and the intelligent customer service device;
[0007] Based on the first dialogue data, the emotion type of the first subject is determined; wherein, the emotion type includes positive emotions and negative emotions;
[0008] If the first object's emotion type is negative, multiple candidate reassurance messages matching the first object's emotion type are searched in the reassurance corpus; wherein, the reassurance corpus is used to store historical reassurance messages output by human customer service to the second object;
[0009] Determine the first semantic correlation between the first dialogue corpus and each candidate reassurance corpus;
[0010] Based on the determined first semantic relevance, the first reassurance corpus is determined from the multiple candidate reassurance corpora;
[0011] Output the first reassurance corpus to the first object.
[0012] In one possible implementation, the negative emotions are divided into multiple levels;
[0013] The step of searching the reassurance corpus for multiple candidate reassurance phrases that match the emotional type of the first object includes:
[0014] Determine the first level of the negative emotions of the first object;
[0015] Determine the second semantic correlation between each word in the first dialogue corpus and the target soothing corpus in the soothing corpus; wherein, the soothing corpus is used to store soothing corpus corresponding to multiple levels of negative emotions; the target soothing corpus is the soothing corpus corresponding to the first level;
[0016] Based on the determined second semantic correlation, a third semantic correlation between the first dialogue corpus and the target reassurance corpus is determined;
[0017] Based on the determined third semantic relevance, the multiple candidate reassurance corpora are determined from the target reassurance corpus.
[0018] In another possible implementation, the negative emotions are divided into multiple levels. If the negative emotion level of the first object is the first level, the method further includes:
[0019] Obtain the first response corpus from the first object's response based on the first reassurance corpus;
[0020] Based on the first response corpus, the emotion type of the first object is determined again;
[0021] If the first object's emotion type is still negative, determine the second level to which the first object's negative emotion belongs;
[0022] If the second level is lower than the first level, the first reassurance corpus and the first level are added to the corpus set accordingly; wherein, the corpus set is used to store historical reassurance corpus that reduces the level of negative emotion and the negative emotion level.
[0023] In another possible implementation, the method further includes:
[0024] Obtain the second dialogue data during the conversation between the third object and the intelligent customer service device;
[0025] Based on the second dialogue data, the emotion type of the third object is determined;
[0026] If the emotion type of the third object is negative, determine the third level to which the negative emotion of the third object belongs;
[0027] Based on the third level, a second reassurance corpus is determined from the corpus set, and the second reassurance corpus is output to the third object.
[0028] In another possible implementation, the process of generating the reassurance corpus includes:
[0029] Obtain multiple first historical dialogue records; wherein, the first historical dialogue records are the dialogue records between the human customer service representative and the second object;
[0030] Multiple second-historical dialogues were identified as having a negative emotion type from the aforementioned multiple first-historical dialogues.
[0031] For each second historical dialogue corpus, a third historical dialogue corpus is determined from the second historical dialogue corpus; the third historical dialogue corpus is the corpus output by the human customer service representative to the second object;
[0032] We identified historical reassurance corpus containing reassurance keywords from multiple identified third-party historical dialogue corpora.
[0033] Obtain the corpus tags of the historical appeasement corpus; wherein, the corpus tags include positive tags and negative tags; the positive tags are used to mark the historical appeasement corpus as having standard language, and the negative tags are used to mark the historical appeasement corpus as having non-standard language;
[0034] The appeasement corpus is composed of historical appeasement corpora with positive labels.
[0035] In another possible implementation, determining the emotion type of the first object based on the first dialogue corpus includes:
[0036] The first dialogue data is input into the emotion recognition model to obtain the emotion type of the first object output by the emotion recognition model.
[0037] The emotion recognition model is trained based on explicit sample corpus and implicit sample corpus. The explicit sample corpus is a dialogue corpus that includes negative emotion keywords, and the implicit sample corpus is a dialogue corpus that does not include negative emotion keywords, but the emotion type of the sample object is negative.
[0038] On the one hand, an intelligent dialogue device is provided, the device comprising:
[0039] The first acquisition module is used to acquire the first dialogue data during the current dialogue between the first object and the intelligent customer service device.
[0040] The first determining module is used to determine the emotion type of the first object based on the first dialogue data; wherein the emotion type includes positive emotions and negative emotions;
[0041] The search module is used to search for multiple candidate reassurance messages in the reassurance corpus that match the emotional type of the first object if the first object's emotional type is negative; wherein, the reassurance corpus is used to store historical reassurance messages output by human customer service to the second object;
[0042] The second determining module is used to determine the first semantic correlation degree between the first dialogue corpus and each candidate reassurance corpus;
[0043] The third determining module is used to determine the first appeasement corpus from the multiple candidate appeasement corpora based on the determined first semantic relevance.
[0044] The first output module is used to output the first reassurance corpus to the first object.
[0045] In one possible implementation, the negative emotions are divided into multiple levels;
[0046] The search module is used to determine the first level of the negative emotion of the first object; determine the second semantic correlation between each word in the first dialogue corpus and the target soothing corpus in the soothing corpus; wherein, the soothing corpus is used to store soothing corpus corresponding to multiple levels of negative emotions; the target soothing corpus is the soothing corpus corresponding to the first level; based on the determined second semantic correlation, determine the third semantic correlation between the first dialogue corpus and the target soothing corpus; based on the determined third semantic correlation, determine the multiple candidate soothing corpus from the target soothing corpus.
[0047] In another possible implementation, the negative emotions are divided into multiple levels. If the negative emotion level of the first object is the first level, the device further includes:
[0048] The second acquisition module is used to acquire the first response corpus in which the first object responds based on the first reassurance corpus;
[0049] The fourth determining module is used to determine the emotion type of the first object again based on the first response corpus;
[0050] The fifth determining module is used to determine the second level of the negative emotion of the first object if the emotion type of the first object is still negative.
[0051] An addition module is used to add the first reassurance corpus and the first level to the corpus set if the second level is lower than the first level; wherein the corpus set is used to store historical reassurance corpus that reduces the level of negative emotion and the negative emotion level.
[0052] In another possible implementation, the device further includes:
[0053] The third acquisition module is used to acquire the second dialogue data during the dialogue between the third object and the intelligent customer service device.
[0054] The sixth determining module is used to determine the emotion type of the third object based on the second dialogue data;
[0055] The seventh determining module is used to determine the third level of the negative emotion of the third object if the emotion type of the third object is negative emotion;
[0056] The second output module is used to determine the second reassurance corpus from the corpus set based on the third level, and output the second reassurance corpus to the third object.
[0057] In another possible implementation, the device further includes:
[0058] The fourth acquisition module is used to acquire multiple first historical dialogue data; wherein, the first historical dialogue data is the dialogue data between the human customer service representative and the second object;
[0059] The eighth determining module is used to determine multiple second historical dialogues with negative emotion type from the multiple first historical dialogues;
[0060] The ninth determining module is used to determine a third historical dialogue from the second historical dialogue for each second historical dialogue; the third historical dialogue is the dialogue output by the human customer service to the second object;
[0061] The tenth determination module is used to identify historical appeasement corpora containing appeasement keywords from a set of determined third-party historical dialogue corpora.
[0062] The fifth acquisition module is used to acquire the corpus tags of the historical appeasement corpus; wherein, the corpus tags include positive tags and negative tags; the positive tags are used to mark the historical appeasement corpus as corpus with standard language, and the negative tags are used to mark the historical appeasement corpus as corpus with non-standard language;
[0063] The component module is used to assemble the historical reassurance corpus by labeling the corpus with positive labels.
[0064] In another possible implementation, the first determining module is used to input the first dialogue corpus into an emotion recognition model to obtain the emotion type of the first object output by the emotion recognition model; wherein, the emotion recognition model is trained based on explicit sample corpus and implicit sample corpus, the explicit sample corpus is dialogue corpus including negative emotion keywords, and the implicit sample corpus is dialogue corpus that does not include negative emotion keywords, but the emotion type of the sample object is negative emotion.
[0065] On the one hand, an electronic device is provided, the electronic device including a processor and a memory, the memory storing at least one piece of program code, the at least one piece of program code being loaded and executed by the processor to implement the above-mentioned intelligent dialogue method.
[0066] On the one hand, a computer-readable storage medium is provided, wherein at least one piece of program code is stored in the computer-readable storage medium, the at least one piece of program code being loaded and executed by the processor to implement the above-mentioned intelligent dialogue method.
[0067] On the one hand, a computer program product is provided, wherein at least one piece of program code is stored in the computer program product, and the at least one piece of program code is loaded and executed by a processor to realize the above-mentioned intelligent dialogue method.
[0068] The beneficial effects of the technical solutions provided in this application include at least the following:
[0069] This application provides an intelligent dialogue method. When the first target's emotional type is negative, the method first searches a corpus of soothing phrases for multiple candidate soothing phrases that match the first target's emotional type. Then, it determines the first soothing phrase for soothing the first target from among these candidate phrases. Since the soothing corpus stores real-person soothing phrases output by human customer service representatives to the second target, the final determined first soothing phrase is also a real-person soothing phrase. Therefore, this method uses real-person soothing phrases to comfort users. Compared to soothing phrases generated based on fixed templates, real-person soothing phrases are of higher quality and have a better soothing effect, thereby improving the dialogue quality between users and intelligent customer service. Attached Figure Description
[0070] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0071] Figure 1This is a schematic diagram of the implementation environment of an intelligent dialogue method provided in an embodiment of this application;
[0072] Figure 2 This is a flowchart of an intelligent dialogue method provided in an embodiment of this application;
[0073] Figure 3 This is a flowchart of an intelligent dialogue method provided in an embodiment of this application;
[0074] Figure 4 This is a schematic diagram illustrating the determination of a first reassurance corpus based on a reassurance corpus, provided in an embodiment of this application.
[0075] Figure 5 This is a schematic diagram of the structure of an intelligent dialogue device provided in an embodiment of this application;
[0076] Figure 6 This is a structural block diagram of a terminal provided in an embodiment of this application;
[0077] Figure 7 This is a structural block diagram of a server provided in an embodiment of this application. Detailed Implementation
[0078] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0079] The terms "first," "second," "third," and "fourth," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.
[0080] It should be noted that all information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in this application have been authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the dialogue data and reassurance data involved in this application were obtained with full authorization.
[0081] Figure 1 This is a schematic diagram illustrating the implementation environment of an intelligent dialogue method provided in an embodiment of this application. See also... Figure 1The implementation environment includes an electronic device, which can be provided as a terminal 101, a server 102, or both. If the electronic device is provided as a terminal 101 and a server 102, the terminal 101 and the server 102 can be connected via a wireless or wired network. In this embodiment, the electronic device is not specifically limited.
[0082] If the electronic device is provided as terminal 101, then terminal 101 determines the first reassurance data based on the first dialogue data during the current dialogue between the first object and the intelligent customer service device, and then outputs the first reassurance data to the first object to reassure the first object. The intelligent customer service device can be terminal 101, or can be deployed within terminal 101.
[0083] If the electronic device is provided as server 102, the implementation environment further includes: terminal 101, which sends a first dialogue data to server 102; server 102 determines a first reassurance data based on the first dialogue data and then sends the first reassurance data to terminal 101; terminal 101 outputs the first reassurance data to a first object to reassure the first object.
[0084] If the electronic device provides a terminal 101 and a server 102, then the terminal 101 acquires the first dialogue data and then sends the first dialogue data to the server 102. The server 102 determines the first reassurance data based on the first dialogue data and then sends the first reassurance data to the terminal 101. The terminal 101 outputs the first reassurance data to the first target to reassure the target.
[0085] Terminal 101 can be at least one of the following: mobile phone, tablet computer, PC (Personal Computer) device, intelligent voice interaction device, and vehicle terminal. Server 102 can be at least one of the following: a single server, a server cluster consisting of multiple servers, a cloud server, a cloud computing platform, and a virtualization center.
[0086] The intelligent dialogue method provided in this application can be applied to various intelligent dialogue scenarios, such as shared vehicle scenarios, ticket booking scenarios, and business inquiry or processing scenarios. The following description uses the shared vehicle scenario as an example.
[0087] Users may encounter various problems before, during, or after using shared bicycles. For example, a shared bicycle may not lock, or it may continue to charge even after locking. In such cases, users can interact with a smart customer service device to report these issues. This smart customer service device is deployed within an electronic device, allowing the device to capture the conversation between the user and the device. During the conversation, the user may express negative emotions. In this case, the electronic device determines reassuring language based on the conversation. Once the reassuring language is determined, it is output to the user to soothe them.
[0088] Figure 2 This is a flowchart of an intelligent dialogue method provided in an embodiment of this application, executed by an electronic device. See also... Figure 2 The method includes:
[0089] Step 201: The electronic device acquires the first dialogue data during the current conversation between the first object and the intelligent customer service device.
[0090] Step 202: The electronic device determines the emotion type of the first subject based on the first dialogue data.
[0091] Emotion types include positive emotions and negative emotions. Negative emotions include fear, sadness, disgust, anger, rage, and sarcasm. In this embodiment, the specific categories of negative emotions are not specifically limited.
[0092] Step 203: If the emotion type of the first object is negative, the electronic device searches the reassurance corpus for multiple candidate reassurance corpora that match the emotion type of the first object.
[0093] The reassurance corpus is used to store historical reassurance messages delivered by human customer service representatives to the second party. This historical reassurance corpus consists of reassurance messages delivered by human customer service representatives to the second party when the second party's emotional type is negative.
[0094] Step 204: The electronic device determines the first semantic correlation between the first dialogue corpus and each candidate reassurance corpus.
[0095] Step 205: The electronic device determines the first reassurance corpus from multiple candidate reassurance corpora based on the determined first semantic relevance.
[0096] Step 206: The electronic device outputs the first reassuring corpus to the first object.
[0097] This application provides an intelligent dialogue method. When the first target's emotional type is negative, the method first searches a corpus of soothing phrases for multiple candidate soothing phrases that match the first target's emotional type. Then, it determines the first soothing phrase for soothing the first target from among these candidate phrases. Since the soothing corpus stores real-person soothing phrases output by human customer service representatives to the second target, the final determined first soothing phrase is also a real-person soothing phrase. Therefore, this method uses real-person soothing phrases to comfort users. Compared to soothing phrases generated based on fixed templates, real-person soothing phrases are of higher quality and have a better soothing effect, thereby improving the dialogue quality between users and intelligent customer service.
[0098] In this embodiment, when the emotion type of the first object is negative, the electronic device can directly search for candidate soothing phrases matching the negative emotion in the soothing phrase corpus, and then determine the first soothing phrase from the candidate soothing phrase corpus, as described above. Figure 2 The method described above. Electronic devices can also first determine the level of negative emotion of the first target, then search a corpus of reassurance language for candidate reassurance phrases that match that level, and finally determine the first reassurance phrase from the candidate reassurance phrases, as shown below. Figure 3 The method described in the text will be explained in detail below. Figure 3 The method in the middle.
[0099] Figure 3 This is a flowchart of an intelligent dialogue method provided in an embodiment of this application, executed by an electronic device. See also... Figure 3 The method includes:
[0100] Step 301: The electronic device acquires the first dialogue data during the current dialogue between the first object and the intelligent customer service device.
[0101] The first dialogue corpus includes the dialogue output by the first object, and may also include the dialogue output by the intelligent customer service device to the first object. If the first dialogue corpus only includes the dialogue output by the first object, then the first dialogue corpus is the corpus output by the first object to the intelligent customer service device each time. If the first dialogue corpus includes both the dialogue output by the first object and the dialogue output by the intelligent customer service device to the first object, then the first dialogue corpus may include one or more rounds of dialogue between the first object and the intelligent customer service device.
[0102] In this embodiment, the first dialogue data can be either text dialogue data or voice dialogue data, without specific limitation. If the first dialogue data is text dialogue data, the electronic device directly executes step 302. If the first dialogue data is voice dialogue data, the electronic device first converts the voice dialogue data into text dialogue data, and then executes step 302 based on the text dialogue data.
[0103] Step 302: The electronic device determines the emotion type of the first object based on the first conversation corpus.
[0104] The emotion types include positive emotions and negative emotions.
[0105] In an embodiment of the present application, the electronic device can determine the emotion type of the first object through an emotion recognition model. Correspondingly, this process can be: The electronic device inputs the first conversation corpus into the emotion recognition model and obtains the emotion type of the first object output by the emotion recognition model.
[0106] Among them, the training process of the emotion recognition model can be executed by the electronic device or by other devices, and then the electronic device obtains the emotion recognition model trained by other devices, which is not specifically limited. In an embodiment of the present application, only the case where the electronic device trains to obtain the emotion recognition model is used for illustration.
[0107] The electronic device obtains explicit sample corpora and their corresponding emotion types and implicit sample corpora and their corresponding emotion types, and performs model training based on the explicit sample corpora and their corresponding emotion types and the implicit sample corpora and their corresponding emotion types to obtain an emotion recognition model. Among them, the explicit sample corpus is a conversation corpus including negative emotion keywords, and the implicit sample corpus is a conversation corpus that does not include negative emotion keywords but the emotion type of the sample object is negative. For example, the implicit sample corpus is "You are really something", and although this corpus does not include negative emotion keywords, it can still be determined that the user's emotion type is negative.
[0108] According to the above content, the training samples of the emotion recognition model not only include explicit sample corpora, but also include implicit sample corpora. The emotion recognition model trained in this way can not only recognize explicit negative emotions, but also recognize implicit negative emotions. Compared with the related art that determines the user's emotion based on the keywords in the keyword dictionary, the method provided by the embodiment of the present application relies on powerful deep learning capabilities to train the emotion recognition model, is not restricted by the keyword dictionary library, can recognize both explicit negative emotions and implicit negative emotions, is more accurate in user emotion recognition, and can also increase the recall of negative emotions.
[0109] Step 303: If the emotion type of the first object is negative, the electronic device determines the first level to which the negative emotion of the first object belongs.
[0110] In an embodiment of the present application, the electronic device can determine the first level to which the negative emotion of the first object belongs by itself, as in the following first implementation manner. The electronic device can also determine the first level to which the negative emotion of the first object belongs through the emotion recognition model, as in the following second implementation manner.
[0111] In the first implementation, when the emotion recognition model outputs a negative emotion, it also outputs the corresponding emotion score. The higher the emotion score, the higher the level of negative emotion. The electronic device acquires the emotion score of the first object's negative emotion output by the emotion recognition model. Then, based on a pre-stored correspondence between emotion score ranges and negative emotion levels, it first determines the emotion score range in which the first object's emotion score falls, and then determines the corresponding negative emotion level for that range. Specifically, one emotion score range corresponds to one negative emotion level.
[0112] In this embodiment of the application, the negative emotion level of the first object is determined by an electronic device, which can greatly shorten the training time of the emotion recognition model and improve the training efficiency of the model.
[0113] The second implementation involves the emotion recognition model outputting a negative emotion, and then directly outputting the corresponding level of that negative emotion. Accordingly, the electronic device obtains the first level of the negative emotion of the first object output by the emotion recognition model.
[0114] In this implementation, when training the emotion recognition model, the electronic device can divide the explicit sample corpus and the implicit sample corpus into different levels of negative emotion. That is, the model is trained by using explicit sample corpus and implicit sample corpus with different levels of negative emotion to obtain the emotion recognition model.
[0115] In this embodiment of the application, by outputting the negative emotion level of the first object through the emotion recognition model, the efficiency of determining the negative emotion level can be improved, thereby improving the efficiency of determining the reassurance corpus.
[0116] Step 304: The electronic device determines the second semantic association between each word in the first dialogue corpus and the target soothing corpus in the soothing corpus.
[0117] The soothing corpus is used to store soothing corpora corresponding to multiple levels of negative emotions. The target soothing corpus is the soothing corpus corresponding to the first level, and the target soothing corpus includes multiple soothing corpora.
[0118] If the first dialogue corpus only includes the dialogue corpus output by the first object to the intelligent customer service device, the electronic device can directly determine the second semantic correlation between each word in the first dialogue corpus and the target reassurance corpus.
[0119] If the first dialogue corpus includes the dialogue corpus output by the first object to the intelligent customer service device and the dialogue corpus output by the intelligent customer service device to the first object, the electronic device can first determine the third dialogue corpus output by the first object to the intelligent customer service device from the first dialogue corpus, and then determine the semantic correlation degree between each word in the third dialogue corpus and the target reassurance corpus, and use the semantic correlation degree as the second semantic correlation degree.
[0120] In this embodiment of the application, the example is taken only when the electronic device first determines the third dialogue corpus from the first dialogue corpus, and then determines the semantic relevance between each word in the third dialogue corpus and the target soothing corpus.
[0121] In this implementation, the electronic device first segments the third dialogue corpus into words. For each piece of comforting corpus in the target comforting corpus, the relevance score between each word and the comforting corpus is determined, and the relevance score between each word and the comforting corpus is used as the semantic association degree between each word and the comforting corpus.
[0122] The electronic device can use the BM25 (Best Matching) algorithm to determine the relevance score between each word in the third dialogue corpus and the soothing corpus. Of course, the electronic device can also use other methods to determine this relevance score, and there are no specific limitations on this.
[0123] It should be noted that, prior to this step, the electronic device pre-generates a corpus of reassurance statements. Accordingly, the process of generating the reassurance corpus by the electronic device can be achieved through the following steps (1) to (6), including:
[0124] (1) Electronic devices acquire multiple first-historical dialogue data.
[0125] The first historical dialogue data consists of the dialogue between the human customer service representative and the second subject.
[0126] The historical time range corresponding to these multiple first historical dialogues can be set and changed as needed, without any specific limitations.
[0127] (2) Electronic devices identify multiple second-historical dialogues with negative emotion type from multiple first-historical dialogues.
[0128] Electronic devices can use emotion recognition models to determine the emotion type of the second object in each first historical dialogue corpus, and then use the first historical dialogue corpus in which the emotion type of the second object is negative as the second historical dialogue corpus.
[0129] (3) For each second historical dialogue, the electronic device determines the third historical dialogue from the second historical dialogue.
[0130] The third historical dialogue corpus consists of the corpus output by the human customer service representative to the second target, that is, the corpus of the human customer service representative's replies to the second target.
[0131] (4) Electronic devices identify historical reassurance data containing reassurance keywords from multiple identified third-party historical dialogue data.
[0132] For each third historical dialogue corpus, the electronic device determines whether the third historical dialogue corpus includes reassurance keywords, identifies the reassurance components in the third historical dialogue corpus, and if it includes reassurance keywords, it indicates that the third historical dialogue corpus contains reassurance, and then determines that the third historical dialogue corpus is historical reassurance corpus.
[0133] (5) Electronic devices acquire corpus tags of historical reassurance corpus.
[0134] The corpus labels include positive labels and negative labels. Positive labels are used to mark historical appeasement corpora as having standard language usage, while negative labels are used to mark historical appeasement corpora as having non-standard language usage.
[0135] In this embodiment of the application, the corpus tags of historical appeasement corpus can be determined manually, that is, the availability of historical appeasement corpus can be determined manually, and the electronic device can obtain the corpus tags of the historical appeasement corpus determined manually.
[0136] (6) Electronic devices combine historical appeasement corpora with positive labels into an appeasement corpus.
[0137] For historical appeasement corpora with negative labels, electronic devices can discard them directly. Alternatively, the historical appeasement corpora with negative labels can be manually modified to use standard appeasement language before being added to the appeasement corpus. See [link to relevant documentation]. Figure 4 .
[0138] It should be noted that during the system's cold start phase, the system mainly relies on the amount of soothing data in the soothing corpus. Once there is a rich amount of soothing data in the soothing corpus, the first soothing data can be accurately determined.
[0139] In this embodiment of the application, a soothing corpus is formed by using real-person soothing language data from human customer service representatives. In this way, intelligent customer service devices can use real-person soothing language data from this soothing corpus to soothe users. Compared with soothing language data generated based on fixed templates, real-person soothing language data is more personalized, more flexible and less rigid.
[0140] Step 305: Based on the determined second semantic relevance, the electronic device determines the third semantic relevance between the first dialogue corpus and the target reassurance corpus.
[0141] If the electronic device determines the second semantic correlation between each word in the first dialogue corpus and the target soothing corpus, then in this step, for each piece of soothing corpus in the target soothing corpus, the electronic device performs a weighted summation of the correlation scores between each word in the first dialogue corpus and the soothing corpus to obtain the third semantic correlation between the first dialogue corpus and the soothing corpus.
[0142] If the electronic device determines the second semantic correlation between each word in the third dialogue corpus and the target soothing corpus, then in this step, for each piece of soothing corpus in the target soothing corpus, the electronic device, based on the word weight of each word in the third dialogue corpus, performs a weighted summation of the relevance scores between each word in the third dialogue corpus and the soothing corpus to obtain the semantic correlation between the third dialogue corpus and the soothing corpus, and uses this semantic correlation as the third semantic correlation between the first dialogue corpus and the soothing corpus.
[0143] In this study, electronic devices can determine the word weight of each word using the BM25 algorithm. Of course, electronic devices can also determine the word weight of each word using other methods, without any specific limitations.
[0144] Step 306: The electronic device determines multiple candidate reassurance corpora from the target reassurance corpus based on the determined third semantic relevance.
[0145] The target reassurance corpus includes multiple reassurance phrases. Therefore, the electronic device obtains multiple third semantic relevance scores through steps 304 to 305. In this step, the electronic device can select multiple reassurance phrases with a third semantic relevance score greater than a preset threshold as candidate reassurance phrases from the multiple reassurance phrases included in the target reassurance corpus, or select a preset number of reassurance phrases with the highest third semantic relevance scores from the multiple reassurance phrases included in the target reassurance corpus as candidate reassurance phrases.
[0146] Step 307: The electronic device determines the first semantic correlation between the first dialogue corpus and each candidate reassurance corpus.
[0147] In this step, the electronic device can automatically determine the first semantic correlation between the first dialogue corpus and each candidate reassurance corpus, as in the first implementation below. Alternatively, the electronic device can determine the first semantic correlation between the first dialogue corpus and each candidate reassurance corpus through a pre-trained model, as in the second implementation below.
[0148] In the first implementation, the electronic device determines a first corpus vector corresponding to the first dialogue corpus and a second corpus vector corresponding to each candidate reassurance corpus. For each candidate reassurance corpus, the electronic device determines the distance between the first corpus vector and the corresponding second corpus vector, and based on this distance, determines a first semantic correlation between the first dialogue corpus and the candidate reassurance corpus. The smaller the distance, the greater the first semantic correlation.
[0149] In the second implementation method, for each candidate reassurance corpus, the electronic device simultaneously inputs the first dialogue corpus and the candidate reassurance corpus into the pre-trained model to obtain the first semantic correlation between the first dialogue corpus output by the pre-trained model and the candidate reassurance corpus.
[0150] In this process, the electronic device simultaneously inputs the first dialogue corpus and the candidate reassurance corpus into the pre-trained model. The pre-trained model first determines the first corpus vector and the second corpus vector respectively, then determines the distance between the first corpus vector and the second corpus vector, and based on this distance, determines the first semantic relevance.
[0151] The process by which electronic devices determine the first semantic relevance on their own is similar to the process by which electronic devices determine the first semantic relevance through a pre-trained model. However, compared to the process by which electronic devices determine the first semantic relevance on their own, the process by which electronic devices determine the first semantic relevance through a pre-trained model is faster and more efficient.
[0152] Step 308: The electronic device determines the first reassurance corpus from multiple candidate reassurance corpora based on the determined first semantic relevance.
[0153] The electronic device obtains multiple first semantic relevance scores through step 307, and selects the candidate reassurance corpus with the highest first semantic relevance score from the multiple first semantic relevance scores as the first reassurance corpus.
[0154] Step 309: The electronic device outputs the first reassuring corpus to the first object.
[0155] The electronic device outputs the first reassurance corpus to the terminal of the first object, and correspondingly, the first reassurance corpus is displayed on the terminal of the first object.
[0156] In this embodiment, after the electronic device outputs the first reassurance corpus to the first object, the first object can reply based on the first reassurance corpus. Correspondingly, the electronic device acquires the first reply corpus of the first object's reply based on the first reassurance corpus, and based on the first reply corpus, determines the first object's emotion type again; if the first object's emotion type is still negative, it determines the second level to which the first object's negative emotion belongs; if the second level is lower than the first level, the first reassurance corpus and the first level are added to the corpus set accordingly. The corpus set is used to store historical reassurance corpus that lowers the level of negative emotion and the negative emotion level, with one negative emotion corresponding to one or more historical reassurance corpus pieces.
[0157] In this implementation, the electronic device can re-determine the emotion type of the first object through an emotion recognition model. If it is still a negative emotion, the electronic device determines the second level of the first object's negative emotion. The method by which the electronic device determines the second level of the first object's negative emotion is the same as the method by which the electronic device determines the first level, and will not be repeated here.
[0158] If the second level is higher than the first level, it means that the first reassurance corpus not only has no reassurance effect on the first target, but also has the opposite effect. In this case, the electronic device can delete the first reassurance corpus from the reassurance corpus.
[0159] If the second level is lower than the first level, it means that the first reassuring corpus has a reassuring effect on the first subject, thus reducing the level of negative emotion in the first subject. In this case, the electronic device can add the first level and the first reassuring corpus to the corpus accordingly. For example, if the first level is anger and the second level is resentment, and resentment is lower than anger, the electronic device will add the first level and the first reassuring corpus accordingly to the corpus.
[0160] If the emotion type of the first object is confirmed to be positive again, it further demonstrates that the first reassurance corpus has a reassurance effect on the first object. In this case, the electronic device can also add the first level and the first reassurance corpus to the corpus set.
[0161] Therefore, the historical reassurance data in the corpus is reassurance data that can reduce the level of negative emotions. Therefore, when reassuring users in the future, electronic devices can prioritize selecting reassurance data from the corpus for reassurance, which can increase the possibility of reducing the level of negative emotions and thus improve the dialogue quality between users and intelligent customer service devices.
[0162] Accordingly, the electronic device acquires the second dialogue data during the conversation between the third party and the intelligent customer service device. Based on the second dialogue data, it determines the emotional type of the third party. If the emotional type of the third party is negative, the electronic device determines the third level of the negative emotion of the third party. Based on the third level, it determines the second reassurance data from the data set and outputs the second reassurance data to the third party.
[0163] The way electronic devices determine the emotion type of the third object is the same as the way they determine the emotion type of the first object, and the way they determine the third level is the same as the way they determine the first level, so we will not repeat them here.
[0164] After determining the third level, the electronic device identifies a second reassurance corpus that matches the third level from the corpus set, and then outputs the second reassurance corpus to the third target. The method by which the electronic device determines the second reassurance corpus from the corpus set is the same as the method by which it determines the first reassurance corpus from multiple candidate reassurance corpora, and will not be elaborated further here.
[0165] If the third object's emotional type is still negative in the second response corpus based on the second soothing corpus, and the level of negative emotion increases, it means that the second soothing corpus has no soothing effect on the third object. In this case, the electronic device determines the third soothing corpus with a higher emotional level from the corpus set and outputs the third soothing corpus to the third object.
[0166] This application provides an intelligent dialogue method. When the first target's emotional type is negative, the method first searches a corpus of soothing phrases for multiple candidate soothing phrases that match the first target's emotional type. Then, it determines the first soothing phrase for soothing the first target from among these candidate phrases. Since the soothing corpus stores real-person soothing phrases output by human customer service representatives to the second target, the final determined first soothing phrase is also a real-person soothing phrase. Therefore, this method uses real-person soothing phrases to comfort users. Compared to soothing phrases generated based on fixed templates, real-person soothing phrases are of higher quality and have a better soothing effect, thereby improving the dialogue quality between users and intelligent customer service.
[0167] Figure 5 This is a schematic diagram of the structure of an intelligent dialogue device provided in an embodiment of this application. See also... Figure 5 The device includes:
[0168] The first acquisition module 501 is used to acquire the first dialogue data during the current dialogue between the first object and the intelligent customer service device.
[0169] The first determining module 502 is used to determine the emotion type of the first object based on the first dialogue data; wherein the emotion type includes positive emotions and negative emotions;
[0170] The search module 503 is used to search for multiple candidate reassurance messages in the reassurance corpus that match the emotional type of the first object if the first object's emotional type is negative; wherein, the reassurance corpus is used to store historical reassurance messages output by human customer service to the second object;
[0171] The second determining module 504 is used to determine the first semantic correlation between the first dialogue corpus and each candidate reassurance corpus;
[0172] The third determining module 505 is used to determine the first appeasement corpus from multiple candidate appeasement corpora based on the determined first semantic relevance degree;
[0173] The first output module 506 is used to output the first reassurance corpus to the first object.
[0174] In one possible implementation, negative emotions are divided into multiple levels;
[0175] The lookup module 503 is used to determine the first level of the negative emotion of the first object; determine the second semantic correlation between each word in the first dialogue corpus and the target soothing corpus in the soothing corpus; wherein, the soothing corpus is used to store soothing corpus corresponding to multiple levels of negative emotions; the target soothing corpus is the soothing corpus corresponding to the first level; based on the determined second semantic correlation, determine the third semantic correlation between the first dialogue corpus and the target soothing corpus; based on the determined third semantic correlation, determine multiple candidate soothing corpus from the target soothing corpus.
[0176] In another possible implementation, negative emotions are divided into multiple levels. If the first object's negative emotion level is level one, the device further includes:
[0177] The second acquisition module is used to acquire the first response corpus of the first object's response based on the first reassurance corpus;
[0178] The fourth determination module is used to determine the emotion type of the first object again based on the first response corpus;
[0179] The fifth determination module is used to determine the second level of the negative emotion of the first object if the emotion type of the first object is still negative.
[0180] An add module is used to add the first reassurance corpus and the first level to the corpus set if the second level is lower than the first level; the corpus set is used to store historical reassurance corpus that lowered the level of negative emotion and the level of negative emotion.
[0181] In another possible implementation, the device also includes:
[0182] The third acquisition module is used to acquire the second dialogue data during the dialogue between the third object and the intelligent customer service device.
[0183] The sixth determination module is used to determine the emotion type of the third subject based on the second dialogue data;
[0184] The seventh determination module is used to determine the third level of the negative emotion of the third object if the emotion type of the third object is negative.
[0185] The second output module is used to determine the second reassurance corpus from the corpus set based on the third level, and output the second reassurance corpus to the third object.
[0186] In another possible implementation, the device also includes:
[0187] The fourth acquisition module is used to acquire multiple first historical dialogue data; among which, the first historical dialogue data is the dialogue data between human customer service and the second object;
[0188] The eighth determination module is used to determine multiple second historical dialogues with negative emotion type from multiple first historical dialogues;
[0189] The ninth determination module is used to determine the third historical dialogue data from the second historical dialogue data for each second historical dialogue data; the third historical dialogue data is the data output by the human customer service to the second object.
[0190] The tenth determination module is used to identify historical appeasement corpora containing appeasement keywords from a set of determined third-party historical dialogue corpora.
[0191] The fifth acquisition module is used to acquire the corpus tags of historical appeasement corpus; the corpus tags include positive tags and negative tags; positive tags are used to mark historical appeasement corpus as having standard language, and negative tags are used to mark historical appeasement corpus as having non-standard language.
[0192] The component module is used to assemble historical reassurance corpora with positive labels into a reassurance corpus.
[0193] In another possible implementation, the first determining module 502 is used to input the first dialogue corpus into the emotion recognition model to obtain the emotion type of the first object output by the emotion recognition model; wherein, the emotion recognition model is trained based on explicit sample corpus and implicit sample corpus, the explicit sample corpus is dialogue corpus that includes negative emotion keywords, and the implicit sample corpus is dialogue corpus that does not include negative emotion keywords, but the emotion type of the sample object is negative emotion.
[0194] This application provides an intelligent dialogue device. When the first user's emotional type is negative, the device first searches a corpus of soothing phrases for multiple candidate soothing phrases that match the first user's emotional type. Then, it determines the first soothing phrase from these candidate phrases. Since the soothing corpus stores real-person soothing phrases output by human customer service representatives to a second user, the final determined first soothing phrase is also a real-person soothing phrase. Therefore, this device soothes the user using real-person soothing phrases. Compared to soothing phrases generated based on fixed templates, real-person soothing phrases are of higher quality and have a better soothing effect, thereby improving the dialogue quality between the user and the intelligent customer service.
[0195] It should be noted that the intelligent dialogue device provided in the above embodiments is only illustrated by the division of the above functional modules during intelligent dialogue. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the electronic device can be divided into different functional modules to complete all or part of the functions described above. In addition, the intelligent dialogue device and the intelligent dialogue method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0196] If the electronic device is provided as a terminal, refer to Figure 6 , Figure 6 This illustration shows a structural block diagram of a terminal 600 provided in an exemplary embodiment of this application. The terminal 600 may be a portable mobile terminal, such as a smartphone, tablet computer, MP3 player (Moving Picture Experts Group Audio Layer III), MP4 player (Moving Picture Experts Group Audio Layer IV), laptop computer, or desktop computer. The terminal 600 may also be referred to as a user device, portable terminal, laptop terminal, desktop terminal, or other names.
[0197] Typically, terminal 600 includes a processor 601 and a memory 602.
[0198] Processor 601 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 601 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 601 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 601 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 601 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0199] The memory 602 may include one or more computer-readable storage media, which may be non-transitory. The memory 602 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 602 are used to store at least one piece of program code, which is executed by the processor 601 to implement the operations performed by the terminal in the intelligent dialogue method provided in the method embodiments of this application.
[0200] In some embodiments, the terminal 600 may optionally include a peripheral device interface 603 and at least one peripheral device. The processor 601, memory 602, and peripheral device interface 603 can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface 603 via a bus, signal line, or circuit board. Specifically, the peripheral device includes at least one of the following: a radio frequency circuit 604, a display screen 605, a camera assembly 606, an audio circuit 607, and a power supply 608.
[0201] Peripheral interface 603 can be used to connect at least one I / O (Input / Output) related peripheral device to processor 601 and memory 602. In some embodiments, processor 601, memory 602 and peripheral interface 603 are integrated on the same chip or circuit board; in some other embodiments, any one or two of processor 601, memory 602 and peripheral interface 603 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.
[0202] The radio frequency (RF) circuit 604 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 604 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 604 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals back into electrical signals. Optionally, the RF circuit 604 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The RF circuit 604 can communicate with other terminals through at least one wireless communication protocol. This wireless communication protocol includes, but is not limited to: the World Wide Web, metropolitan area networks, intranets, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 604 may also include circuitry related to NFC (Near Field Communication), which is not limited in this application.
[0203] Display screen 605 is used to display a UI (User Interface). This UI may include graphics, text, icons, videos, and any combination thereof. When display screen 605 is a touch display screen, it also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to processor 601 for processing. In this case, display screen 605 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there may be one display screen 605, disposed on the front panel of terminal 600; in other embodiments, there may be at least two display screens, disposed on different surfaces of terminal 600 or in a folded design; in other embodiments, display screen 605 may be a flexible display screen, disposed on a curved or folded surface of terminal 600. Furthermore, display screen 605 may be configured as a non-rectangular irregular shape, i.e., a non-rectangular screen. Display screen 605 may be made of materials such as LCD (Liquid Crystal Display) or OLED (Organic Light-Emitting Diode).
[0204] The camera assembly 606 is used to acquire images or videos. Optionally, the camera assembly 606 includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is located on the front panel of the terminal, and the rear-facing camera is located on the back of the terminal. In some embodiments, there are at least two rear-facing cameras, which are any one of a main camera, a depth-sensing camera, a wide-angle camera, and a telephoto camera, to achieve background blurring by fusion of the main camera and the depth-sensing camera, panoramic shooting by fusion of the main camera and the wide-angle camera, VR (Virtual Reality) shooting, or other fusion shooting functions. In some embodiments, the camera assembly 606 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cool light flash, which can be used for light compensation at different color temperatures.
[0205] The audio circuit 607 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, converting them into electrical signals that are input to the processor 601 for processing, or to the radio frequency circuit 604 for voice communication. For stereo sound acquisition or noise reduction purposes, multiple microphones may be used, each positioned at a different location on the terminal 600. The microphone may also be an array microphone or an omnidirectional microphone. The speaker is used to convert electrical signals from the processor 601 or the radio frequency circuit 604 into sound waves. The speaker may be a conventional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement. In some embodiments, the audio circuit 607 may also include a headphone jack.
[0206] Power supply 608 is used to power the various components in terminal 600. Power supply 608 can be AC power, DC power, a disposable battery, or a rechargeable battery. When power supply 608 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged via a wired line, and a wireless rechargeable battery is a battery that is charged via a wireless coil. The rechargeable battery can also be used to support fast charging technology.
[0207] In some embodiments, the terminal 600 further includes one or more sensors 609. The one or more sensors 609 include, but are not limited to, an accelerometer 610, a gyroscope 611, a pressure sensor 612, an optical sensor 613, and a proximity sensor 614.
[0208] Accelerometer 610 can detect the magnitude of acceleration along the three coordinate axes of a coordinate system established by terminal 600. For example, accelerometer 610 can be used to detect the components of gravitational acceleration along the three coordinate axes. Processor 601 can control display screen 605 to display the user interface in either a landscape or portrait view based on the gravitational acceleration signal acquired by accelerometer 610. Accelerometer 610 can also be used for games or for acquiring user motion data.
[0209] The gyroscope sensor 611 can detect the orientation and rotation angle of the terminal 600. The gyroscope sensor 611 can work in conjunction with the accelerometer sensor 610 to collect the user's 3D movements on the terminal 600. Based on the data collected by the gyroscope sensor 611, the processor 601 can perform the following functions: motion sensing (e.g., changing the UI based on the user's tilt), image stabilization during shooting, game control, and inertial navigation.
[0210] The pressure sensor 612 can be disposed on the side bezel of the terminal 600 and / or on the lower layer of the display screen 605. When the pressure sensor 612 is disposed on the side bezel of the terminal 600, it can detect the user's grip signal on the terminal 600, and the processor 601 can perform left / right hand recognition or quick operation based on the grip signal collected by the pressure sensor 612. When the pressure sensor 612 is disposed on the lower layer of the display screen 605, the processor 601 can control the operable controls on the UI interface based on the user's pressure operation on the display screen 605. The operable controls include at least one of button controls, scroll bar controls, icon controls, and menu controls.
[0211] An optical sensor 613 is used to collect ambient light intensity. In one embodiment, the processor 601 can control the display brightness of the display screen 605 based on the ambient light intensity collected by the optical sensor 613. Specifically, when the ambient light intensity is high, the display brightness of the display screen 605 is increased; when the ambient light intensity is low, the display brightness of the display screen 605 is decreased. In another embodiment, the processor 601 can also dynamically adjust the shooting parameters of the camera assembly 606 based on the ambient light intensity collected by the optical sensor 613.
[0212] The proximity sensor 614, also known as a distance sensor, is typically mounted on the front panel of the terminal 600. The proximity sensor 614 is used to detect the distance between the user and the front of the terminal 600. In one embodiment, when the proximity sensor 614 detects that the distance between the user and the front of the terminal 600 is gradually decreasing, the processor 601 controls the display screen 605 to switch from a screen-on state to a screen-off state; when the proximity sensor 614 detects that the distance between the user and the front of the terminal 600 is gradually increasing, the processor 601 controls the display screen 605 to switch from a screen-off state to a screen-on state.
[0213] Those skilled in the art will understand that Figure 6 The structure shown does not constitute a limitation on terminal 600, and may include more or fewer components than shown, or combine certain components, or use different component arrangements.
[0214] If the electronic device is provided as a server, the structural block diagram of the server can be found here. Figure 7The server 700 can vary considerably depending on its configuration or performance. It may include a central processing unit (CPU) 701 and a memory 702. The memory 702 stores at least one line of program code, which is loaded and executed by the processor 701 to perform the operations performed by the server in the aforementioned intelligent dialogue method. Of course, the server 700 may also have wired or wireless network interfaces, a keyboard, and input / output interfaces for input and output. The server 700 may also include other components for implementing device functions, which will not be elaborated upon here.
[0215] In an exemplary embodiment, a computer-readable storage medium is also provided, which stores at least one piece of program code that is loaded and executed by a processor to implement the intelligent dialogue method in the above embodiments.
[0216] In an exemplary embodiment, a computer program product is also provided, which stores at least one piece of program code that is loaded and executed by a processor to implement the intelligent dialogue method in the above embodiments.
[0217] In some embodiments, the computer program involved in the present application embodiments may be deployed and executed on a computer device, or executed on multiple computer devices located in one location, or executed on multiple computer devices distributed in multiple locations and interconnected through a communication network. Multiple computer devices distributed in multiple locations and interconnected through a communication network may constitute a blockchain system.
[0218] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0219] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. An intelligent dialog method, characterized by, The method comprises: obtaining first dialogue corpus in a current dialogue process between a first object and an intelligent customer service device; determining the emotion type of the first object based on the first dialogue corpus; wherein the emotion type comprises positive emotion and negative emotion; if the emotion type of the first object is negative emotion, searching for a plurality of candidate soothing corpus matching the emotion type of the first object in a soothing corpus library; wherein the soothing corpus library is used to store historical soothing corpus output by an artificial customer service to a second object; determining the first semantic correlation degree between the first dialogue corpus and each candidate soothing corpus; determining the first soothing corpus from the plurality of candidate soothing corpus based on the determined first semantic correlation degree; outputting the first soothing corpus to the first object; the negative emotion is divided into a plurality of grades, and in the case that the negative emotion grade of the first object is a first grade, the method further comprises: obtaining first reply corpus of the first object based on the first soothing corpus; determining the emotion type of the first object again based on the first reply corpus; if the emotion type of the first object is still negative emotion, determining the second grade to which the negative emotion of the first object belongs; if the second grade is lower than the first grade, adding the first soothing corpus and the first grade corresponding to the first grade to a corpus set; wherein the corpus set is used to store historical soothing corpus and the negative emotion grade corresponding to the negative emotion grade which reduces the negative emotion grade; the method further comprises: obtaining second dialogue corpus in a dialogue process between a third object and the intelligent customer service device; determining the emotion type of the third object based on the second dialogue corpus; if the emotion type of the third object is negative emotion, determining the third grade to which the negative emotion of the third object belongs; determining the second soothing corpus from the corpus set based on the third grade, and outputting the second soothing corpus to the third object.
2. The method of claim 1, wherein, the negative emotion is divided into a plurality of grades; the searching for a plurality of candidate soothing corpus matching the emotion type of the first object in a soothing corpus library comprises: determining the first grade to which the negative emotion of the first object belongs; determining the second semantic correlation degree between each word in the first dialogue corpus and the target soothing corpus in the soothing corpus library; wherein the soothing corpus library is used to store soothing corpus corresponding to negative emotion of a plurality of grades; the target soothing corpus is the soothing corpus corresponding to the first grade; determining the third semantic correlation degree between the first dialogue corpus and the target soothing corpus based on the determined second semantic correlation degree; determining the plurality of candidate soothing corpus from the target soothing corpus based on the determined third semantic correlation degree.
3. The method of claim 1, wherein, the generation process of the soothing corpus library comprises: obtaining a plurality of first historical dialogue corpus; wherein the first historical dialogue corpus is the dialogue corpus between the artificial customer service and the second object; determining a plurality of second historical dialogue corpus with negative emotion from the plurality of first historical dialogue corpus; For each second historical dialogue corpus, determine a third historical dialogue corpus from the second historical dialogue corpus; the third historical dialogue corpus is the corpus output by the artificial customer service to the second object; Determine the historical appeasement corpus including the appeasement keywords in the determined multiple third historical dialogue corpora; Obtain the corpus label of the historical appeasement corpus; wherein the corpus label includes positive label and negative label; the positive label is used to mark the historical appeasement corpus as a standard corpus, and the negative label is used to mark the historical appeasement corpus as a non-standard corpus; The historical appeasement corpus with the corpus label as the positive label is used to form the appeasement corpus library.
4. The method of claim 1, wherein, The emotion type of the first object is determined based on the first dialogue corpus, including: inputting the first dialogue corpus into an emotion recognition model to obtain the emotion type of the first object output by the emotion recognition model; Wherein, the emotion recognition model is trained based on explicit sample corpus and implicit sample corpus, the explicit sample corpus is a dialogue corpus including negative emotion keywords, and the implicit sample corpus is a dialogue corpus without negative emotion keywords but the emotion type of the sample object is negative emotion.
5. An intelligent dialog apparatus characterized by comprising: The device includes: The first acquisition module is used to acquire the first dialogue corpus in the current dialogue process of the first object and the intelligent customer service device; The first determination module is used to determine the emotion type of the first object based on the first dialogue corpus; wherein the emotion type includes positive emotion and negative emotion; The search module is used to search for multiple candidate appeasement corpora matching the emotion type of the first object in the appeasement corpus library if the emotion type of the first object is negative emotion; wherein the appeasement corpus library is used to store the historical appeasement corpus output by the artificial customer service to the second object; The second determination module is used to determine the first semantic correlation degree between the first dialogue corpus and each candidate appeasement corpus; The third determination module is used to determine the first appeasement corpus from the multiple candidate appeasement corpora based on the determined first semantic correlation degree; The first output module is used to output the first appeasement corpus to the first object; The negative emotion is divided into multiple levels, and in the case that the negative emotion level of the first object is the first level, further comprising: Obtain the first reply corpus of the first object based on the first appeasement corpus; Determine the emotion type of the first object based on the first reply corpus again; If the emotion type of the first object is still negative emotion, determine the second level to which the negative emotion of the first object belongs; If the second level is lower than the first level, add the first appeasement corpus and the first level corresponding to the first level to the corpus set; wherein the corpus set is used to store the historical appeasement corpus and the negative emotion level corresponding to the reduction of the negative emotion level; Further comprising: Obtain the second dialogue corpus in the dialogue process of the third object and the intelligent customer service device; Determine the emotion type of the third object based on the second dialogue corpus; If the emotion type of the third object is a negative emotion, a third level to which the negative emotion of the third object belongs is determined; Based on the third level, a second soothing corpus is determined from the corpus set, and the second soothing corpus is output to the third object.
6. An electronic device, comprising: The electronic device includes a processor and a memory, and the memory stores at least one program code, which is loaded and executed by the processor to implement the intelligent conversation method of any one of claims 1-4.
7. A computer-readable storage medium, characterized in that, The computer readable storage medium stores at least one program code, which is loaded and executed by the processor to implement the intelligent conversation method of any one of claims 1-4.
8. A computer program product, characterised in that, The computer program product stores at least one program code, which is loaded and executed by the processor to implement the intelligent conversation method of any one of claims 1-4.
Citation Information
Patent Citations
Emotion tendency analysis and evaluation model based on financial emotion dictionary
CN114254091A
Intent analysis for call center response generation
US11076047B1