A method and device for upgrading task-based customer service

By using pre-trained word embedding models, sentiment analysis models and natural language understanding models, user conversations are analyzed and service upgrade main index is calculated, which solves the problem of untimely upgrade of task-based customer service services and improves user service experience.

CN115455984BInactive Publication Date: 2025-06-13BEIJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211110203.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-13
Publication Date
2025-06-13
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, task-based customer service services are not upgraded in time, resulting in a decrease in user service experience.

Method used

Through the pre-trained word embedding model, sentiment analysis model and natural language understanding model, emotional attitudes, dialogue completion degree and user satisfaction in user conversations are quantified, and the main index of service upgrade is calculated to judge the upgrade timing.

Benefits of technology

It improves the accuracy of customer service upgrades, comprehensively considers emotional attitudes, dialogue completion and satisfaction, and ensures the timeliness and accuracy of service upgrade timing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115455984B_ABST
    Figure CN115455984B_ABST
Patent Text Reader

Abstract

The present invention provides a method and device for upgrading task-based customer service. The method analyzes the user's emotion, the completion degree of the conversation between the customer service and the user, and the user's satisfaction from the conversation between the user and the customer service, so as to calculate an emotion value, a task-based conversation completion degree value, and a user satisfaction value, and jointly calculate the main service upgrade index from the three values. When the main service upgrade index reaches the system-set value, the customer service is upgraded. The present invention can comprehensively consider the user's emotion, the conversation completion degree, and the user's satisfaction to determine whether the customer service needs to be upgraded during the conversation process, improving the timeliness and accuracy of customer service upgrade.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of artificial intelligence, and in particular, to a method and device for upgrading task-based customer service. Background Art

[0002] Task-based conversations mainly refer to multi-round conversations generated by robots to meet user needs. The robot determines the user's intention through understanding, clarification, etc., and then meets the user's needs by means of answering, calling APIs, etc. However, for some user needs, when the machine customer service cannot be satisfied, the customer service needs to be upgraded. The traditional methods for upgrading task-based customer service generally fall into three categories: the user actively applies for service upgrade, the customer service upgrades when it cannot answer the customer's questions, and the customer service upgrades when the number of occurrences of situations such as the user repeating the same question and the user asking questions unknown to the machine customer service reaches a set value. However, during the conversation with the user, the machine customer service cannot meet the user's needs according to different conversation scenarios, and at the same time, the machine customer service cannot recognize the user's emotions. Therefore, the traditional methods for upgrading task-based customer service will lead to untimely upgrading of customer service and reduce the user service experience. Summary of the Invention

[0003] In view of this, embodiments of the present invention provide a method and device for upgrading task-based customer service to solve the problem of untimely upgrading of task-based customer service in the prior art.

[0004] One aspect of the present invention provides a method for upgrading task-based customer service, the method including the following steps:

[0005] For the 1st to nth rounds of conversations input by the user, respectively obtain the first text information containing emoticons in each round of conversation, input the first text information into a pre-trained word embedding model to obtain corresponding first word vectors and first emoticon vectors; input the first word vectors and the first emoticon vectors of each round of conversation into a pre-trained sentiment analysis model one by one, respectively output an array of sentiment tendency degree values for the 1st to nth rounds of conversations and calculate primary sentiment parameters, and accumulate the primary sentiment parameters to obtain the sentiment value of the nth round of conversation;

[0006] For the 1st to nth rounds of conversations input by the user, respectively obtain the second text information containing only text, input the second text information into the word embedding model to obtain second word vectors, input the second word vectors of each round of conversation into a pre-trained natural language understanding model one by one, respectively output the user intention of the 1st to nth rounds of conversations and the quantity of slot value information corresponding to sub-goals, calculate the primary task conversation completion degree parameters for the corresponding rounds according to the user intention and the quantity of the slot value information in each round, and accumulate to obtain the task-based conversation completion degree value of the nth round of conversation;

[0007] For the 1st to nth rounds of conversations input by the user, obtain the satisfaction adjustment ratios of multiple user emotion influencing factors to user satisfaction, judge the achievement status of the user emotion influencing factors in each round of conversation, and adjust the initial satisfaction value round by round according to the corresponding satisfaction adjustment ratios to obtain the primary user satisfaction parameters for the 1st to nth rounds of conversations, and accumulate to obtain the user satisfaction value for the nth round of conversation;

[0008] Calculate the emotional value index of the nth round of conversation according to the emotional values of the nth round and the (n - 1)th round of conversations, calculate the task-based conversation completion index of the nth round of conversation according to the task-based conversation completion values of the nth round and the (n - 1)th round of conversations, and calculate the user satisfaction index of the nth round of conversation according to the user satisfaction values of the nth round and the (n - 1)th round of conversations;

[0009] Obtain the service upgrade main index constant and perform weighted summation in combination with the emotional value index, the task-based conversation completion index, and the user satisfaction index of the nth round of conversation to obtain the service upgrade main index;

[0010] Initiate customer service upgrade when the service upgrade main index reaches the set standard.

[0011] In some embodiments, the word embedding model is the BERT-base-Chinese model, and the BERT-base-Chinese model is fine-tuned with text containing emojis.

[0012] In some embodiments, the pre-training steps of the sentiment analysis model include:

[0013] Obtain multiple text samples containing emojis;

[0014] Input each text sample into the BERT-base-Chinese model to obtain the corresponding sample word vector and sample emoji vector, and add emotional annotation to each text sample as a label to form the first training sample set; the emotional annotation includes at least: positive, neutral, and negative;

[0015] Obtain the Self-Explain NLP initial model, and train the Self-Explain NLP initial model with the first training sample set to obtain the sentiment analysis model.

[0016] In some embodiments, input the first word vector and the first emoji vector of each round of conversation into the pre-trained sentiment analysis model one by one, and output the emotional tendency degree value arrays for the 1st to nth rounds of conversations respectively and calculate the primary emotion parameters, including:

[0017] Input the first word vector and the first expression vector of each round of conversation into a pre-trained sentiment analysis model one by one, and output an array of sentiment tendency values [positive_value, neutra_value, negative_value] for the three types of sentiment annotations of positive, neutral, and negative. positive_value represents the probability that the sentiment is positive, neutra_value represents the probability that the sentiment is neutral, and negative_value represents the probability that the sentiment is negative;

[0018] The calculation formula for the primary sentiment parameter is:

[0019] emotional_value = max(positive_value, neutra_value, negative_value) × (1 - max_index);

[0020] Among them, emotional_value represents the primary sentiment parameter, max_index represents the subscript of the maximum sentiment value. The subscript of positive sentiment is 0, the subscript of neutral sentiment is 1, and the subscript of negative sentiment is 2.

[0021] In some embodiments, the pre-training steps of the natural language understanding model include:

[0022] Obtain a second training sample set, which contains multiple samples, and each sample contains text marked with slot value information and intent information labels;

[0023] Obtain an initial BiLSTM-CRF model, and use the second training sample set to train the initial BiLSTM-CRF model to obtain the natural language understanding model.

[0024] In some embodiments, calculate the primary task dialogue completion parameter for the corresponding round according to the obtained user intent, the user's current round of dialogue intent, and the number of the slot value information, including:

[0025] If both the obtained user intent system intent and the user's current round of dialogue intent intent are null values, then

[0026] task_completion = 0;

[0027] If the user's current round of dialogue intent intent is not a null value, then

[0028]

[0029] If the user's conversation intent intent for this round is a null value while the obtained user intent system_intent is not a null value, then

[0030]

[0031] where task_completion represents the primary task conversation completion parameter, sum_slot_num represents the total number of slot values required by the intent, curr_slot_num represents the number of fillable slot values obtained in this round, and fill_slot_num represents the number of slot values already filled by the intent.

[0032] In some embodiments, obtaining a satisfaction adjustment ratio of multiple user emotion influencing factors on user satisfaction, determining the achievement situation of the user emotion influencing factors in each round of conversation, and adjusting the initial satisfaction value round by round according to the corresponding satisfaction adjustment ratio to obtain the primary user satisfaction parameter for the 1st to nth rounds of conversation, including:

[0033] A conversation round coefficient that affects satisfaction for the conversation round, an intent coefficient that affects satisfaction for the customer service's recognition of the user intent, a sub-goal achievement coefficient that affects satisfaction for the number of sub-goals achieved, an invalid conversation coefficient that affects satisfaction for invalid conversations, a repeated question coefficient that affects satisfaction for the number of times the user repeats the same question, and an unknown question coefficient that affects satisfaction for the number of times the customer service encounters unknown questions;

[0034] Obtaining the initial user satisfaction for the nth round of conversation;

[0035] Calculating the satisfaction update value after the satisfaction is affected by the increase in the conversation round. The calculation formula is:

[0036] user_satisfaction = user_satisfaction × (1 - round_factor);

[0037] where user_satisfaction represents the user satisfaction, and round_factor is the conversation round coefficient;

[0038] When there is a user intent in the 1st to nth rounds of conversation and the customer service recognizes the user intent in the nth round, calculating the satisfaction update value after the satisfaction is affected by the appearance of repeated questions. The calculation formula is:

[0039] user_satisfaction = user_satisfaction × (1 - repetition_factor);

[0040] Among them, user_satisfaction represents the user satisfaction, and repetition_factor represents the repeated question coefficient;

[0041] When there is no user intention in the conversations of the 1st to nth rounds and the customer service fails to identify the user intention in the nth round, calculate the updated satisfaction value after the number of unknown questions of the customer service affects the satisfaction and end the satisfaction adjustment process. The calculation formula is:

[0042] user_satisfaction = user_satisfaction × (1 - unknown_factor);

[0043] Among them, user_satisfaction represents the user satisfaction, and unknown_factor represents the unknown question coefficient;

[0044] When there is no user intention in the conversations of the 1st to nth rounds but the customer service identifies the user intention in the nth round, calculate the updated satisfaction value after the user intention recognition rate affects the satisfaction. The calculation formula is:

[0045] user_satisfaction = user_satisfaction × (1 + intent_factor × intent_acc);

[0046] Among them, user_satisfaction represents the user satisfaction, intent_factor represents the intention coefficient, and intent_acc represents the intention recognition accuracy rate;

[0047] When the customer service identifies a sub-goal in the nth round, calculate the updated satisfaction value after the number of sub-goal achievements affects the satisfaction. The calculation formula is:

[0048] user_satisfaction = user_satisfaction(1 + subgoal_factor × m);

[0049] Among them, user_satisfaction represents the user satisfaction, subgoal_factor represents the sub-goal achievement coefficient, and m represents the number of sub-goal achievements;

[0050] When the customer service fails to identify a sub-goal in the nth round, calculate the updated satisfaction value after the invalid conversation affects the satisfaction. The calculation formula is:

[0051] user_satisfaction = user_satisfaction × (1 - invalid_factor);

[0052] where user_satisfaction represents the user satisfaction degree, and invalid_factor represents the invalid dialogue coefficient;

[0053] In some embodiments, obtaining the initial user satisfaction degree of the nth round of dialogue includes:

[0054] If the nth round of dialogue is the first dialogue between the customer service and the user, set the initial user satisfaction degree to 50; if the nth round of dialogue is not the first dialogue between the customer service and the user, set the satisfaction degree of the user at the end of the (n - 1)th round of dialogue as the initial satisfaction degree of this round of dialogue.

[0055] In some embodiments, calculating the emotional value index of the nth round of dialogue according to the emotional values of the nth and (n - 1)th rounds of dialogue, calculating the task-based dialogue completion index of the nth round of dialogue according to the task-based dialogue completion values of the nth and (n - 1)th rounds of dialogue, and calculating the user satisfaction index of the nth round of dialogue according to the user satisfaction values of the nth and (n - 1)th rounds of dialogue, includes:

[0056] Calculating the emotional value index of the nth round of dialogue according to the emotional values of the nth and (n - 1)th rounds of dialogue, and the calculation formula is:

[0057]

[0058] where emotional_index represents the emotional value index, emotional_value n represents the emotional value of the nth round, and emotional_value n-1 represents the emotional value of the (n - 1)th round;

[0059] Calculating the task-based dialogue completion index of the nth round of dialogue according to the task-based dialogue completion values of the nth and (n - 1)th rounds of dialogue, and the calculation formula is:

[0060]

[0061] where task_completion_index represents the task-based dialogue completion index, task_completion n represents the task-based dialogue completion value of the nth round, and task_completion n-1 represents the task-based dialogue completion value of the (n - 1)th round, and n represents the dialogue round number;

[0062] Calculating the user satisfaction index of the nth round of dialogue according to the user satisfaction values of the nth and (n - 1)th rounds of dialogue, and the calculation formula is:

[0063]

[0064] Among them, completion_index represents the user satisfaction index, and satisfaction n represents the user satisfaction value in the nth round, and satisfaction n-1 represents the user satisfaction value in the (n - 1)th round, and n represents the dialogue round number;

[0065] In some embodiments, obtaining the main service upgrade index constant and performing weighted summation by combining the emotional value index, the task-based dialogue completion index, and the user satisfaction index in the nth round of dialogue includes:

[0066] Obtaining the main service upgrade index constant, the emotional value index, the task-based dialogue completion index, and the user satisfaction index in the nth round of dialogue, and obtaining the emotional value index coefficient, the task-based dialogue completion index coefficient, and the user satisfaction index coefficient;

[0067] The calculation formula of the main service upgrade index is:

[0068] main_service_value = main_service_constant + emotional_factor × emotiaonal_index + task_completion_factor × task_completion_index + satisfaction_factor × usatisfaction_index;

[0069] Among them, main_service_constant represents the main service upgrade index constant, emotional_factor represents the emotional value index coefficient, emotiaonal_index represents the emotional value index, task_completion_factor represents the task-based dialogue completion index coefficient, task_completion_index represents the task-based dialogue completion index, satisfaction_factor represents the user satisfaction index coefficient, and satisfaction_index represents the user satisfaction index.

[0070] Another aspect of the present invention provides a task-based customer service service upgrade device, and the device includes:

[0071] An emotional value calculation module for performing the following steps: for the 1st to nth rounds of conversations input by the user, respectively obtain the first text information containing emoji in each round of conversation, input the first text information into a pre-trained word embedding model to obtain corresponding first word vectors and first emoji vectors; input the first word vectors and the first emoji vectors of each round of conversation into a pre-trained sentiment analysis model one by one, respectively output an array of sentiment tendency degree values for the 1st to nth rounds of conversations and calculate primary emotion parameters, and accumulate the primary emotion parameters to obtain the emotional value of the nth round of conversation;

[0072] A task-based conversation module, which includes a task-based conversation completion degree calculation module and a user satisfaction calculation module, where:

[0073] The task-based conversation completion degree calculation module is used to perform the following steps: for the 1st to nth rounds of conversations input by the user, respectively obtain the second text information containing only text, input the second text information into the word embedding model to obtain second word vectors, input the second word vectors of each round of conversation into a pre-trained natural language understanding model one by one, respectively output the overall intention of the user for the 1st to nth rounds of conversations and the number of slot value information corresponding to sub-goals, calculate the primary task-based conversation completion degree parameters for the corresponding rounds according to the overall intention of the user and the number of slot value information in each round, and accumulate to obtain the task-based conversation completion degree value of the nth round of conversation;

[0074] The user satisfaction calculation module is used to perform the following steps: calculate the emotional value index of the nth round of conversation according to the emotional values of the nth round and the n-1th round of conversations, calculate the task-based conversation completion degree index of the nth round of conversation according to the task-based conversation completion degree values of the nth round and the n-1th round of conversations, and calculate the user satisfaction index of the nth round of conversation according to the user satisfaction values of the nth round and the n-1th round of conversations;

[0075] A service upgrade index calculation module for performing the following steps: obtain a service upgrade main index constant and perform weighted summation in combination with the emotional value index, the task-based conversation completion degree index, and the user satisfaction index of the nth round of conversation to obtain a service upgrade main index;

[0076] A service upgrade execution module for initiating customer service upgrade when the service upgrade main index reaches a set standard.

[0077] On the other hand, the present invention also provides a computer-readable storage medium, on which a computer program is stored, characterized in that when the program is executed by a processor, the steps of the above method are implemented.

[0078] The beneficial effects of the present invention are at least:

[0079] The task-based customer service upgrade method and device described in the present invention quantify the user's emotional attitude, the completion degree of the user's conversation with the customer service, and the user's satisfaction with the customer service in the conversation into three indicators: emotional value, task-based conversation completion degree value, and user satisfaction value based on a pre-trained word embedding model, a sentiment analysis model, a natural language understanding model, and a satisfaction update step, and jointly calculate the service upgrade main index according to the three indicators. The service upgrade timing is judged according to the service upgrade main index, and the accuracy of customer service upgrade is improved by integrating the three aspects of emotional attitude, conversation completion degree, and satisfaction.

[0080] Furthermore, the analysis of emoji in the user input text is added in the process of calculating the emotional value. By simultaneously performing semantic extraction on the text and emoji, the accuracy of sentiment analysis is improved.

[0081] Furthermore, the primary emotion parameter, the primary user satisfaction parameter, and the primary conversation completion parameter in each round of conversation between the user and the customer service are calculated, and the emotional value, the user satisfaction value, and the conversation completion value are calculated in the form of cumulative addition round by round, deeply perceiving the user state, and judging whether the current conversation needs to upgrade the customer service round by round, improving the accuracy of customer service upgrade.

[0082] The additional advantages, objectives, and features of the present invention will be partially described below, and will become partially apparent to those of ordinary skill in the art after studying the following text, or can be learned from the practice of the present invention. The objectives and other advantages of the present invention can be achieved and obtained by the structures specifically pointed out in the specification and the drawings.

[0083] Those skilled in the art will understand that the objectives and advantages that can be achieved by the present invention are not limited to the above specifically described, and the above and other objectives that the present invention can achieve will be more clearly understood according to the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0084] The drawings described herein are used to provide a further understanding of the present invention, form a part of this application, and do not limit the present invention. The components in the drawings are not drawn to scale, but are only for showing the principles of the present invention. For the convenience of showing and describing some parts of the present invention, the corresponding parts in the drawings may be enlarged, that is, may become larger relative to other components in the exemplary device actually manufactured according to the present invention. In the drawings:

[0085] Figure 1 It is a schematic diagram of the task-based customer service upgrade index calculation method described in an embodiment of the present invention.

[0086] Figure 2 It is a flowchart of user satisfaction calculation described in an embodiment of the present invention.

[0087] Figure 3 Schematic diagram of the task-based customer service service upgrade device according to an embodiment of the present invention.

[0088] Figure 4 Schematic diagram of the BERT-base-Chinese model structure according to an embodiment of the present invention.

[0089] Figure 5 Schematic diagram of the Self-ExplainNLP model structure according to an embodiment of the present invention.

[0090] Figure 6 Schematic diagram of the emotional value calculation method according to an embodiment of the present invention.

[0091] Figure 7 Schematic diagram of the initial BiLSTM-CRF model structure according to an embodiment of the present invention.

[0092] Figure 8 Schematic diagram of the task-based dialogue completion degree value calculation method according to an embodiment of the present invention.

[0093] Figure 9 Schematic diagram of the emotional value calculation module structure according to an embodiment of the present invention.

[0094] Figure 10 Schematic diagram of the emotional analysis model training module structure according to an embodiment of the present invention.

[0095] Figure 11 Schematic diagram of the emotional analysis model recognition module structure according to an embodiment of the present invention.

[0096] Figure 12 Schematic diagram of the task-based dialogue module structure according to an embodiment of the present invention.

[0097] Figure 13 Schematic diagram of the natural language understanding model training module structure according to an embodiment of the present invention.

[0098] Figure 14 Schematic diagram of the natural language understanding model calling module structure according to an embodiment of the present invention.

[0099] Figure 15 Schematic diagram of the dialogue state tracking module structure according to an embodiment of the present invention.

[0100] Figure 16 Schematic diagram of the dialogue policy selection module structure according to an embodiment of the present invention.

[0101] Figure 17 Schematic diagram of the natural language generation module structure according to an embodiment of the present invention.

[0102] Figure 18 Schematic diagram of the task-based dialogue completion degree calculation module according to an embodiment of the present invention.

[0103] Figure 19 Schematic diagram of the user satisfaction calculation module according to an embodiment of the present invention.

[0104] Figure 20 Schematic diagram of the service upgrade index calculation module structure according to an embodiment of the present invention. Detailed implementation manners

[0105] To make the objectives, technical solutions and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below in conjunction with the implementation manners and the drawings. Herein, the illustrative implementation manners of the present invention and their descriptions are used to explain the present invention, but do not limit the present invention.

[0106] Herein, it also needs to be noted that in order to avoid obscuring the present invention due to unnecessary details, only the structures and / or processing steps closely related to the solution of the present invention are shown in the drawings, while other details less related to the present invention are omitted.

[0107] It should be emphasized that the term "including / comprising" when used herein refers to the presence of features, elements, steps or components, but does not exclude the presence or addition of one or more other features, elements, steps or components.

[0108] Herein, it also needs to be noted that if not specifically stated, the term "connection" herein can not only refer to direct connection, but also represent indirect connection with an intermediate.

[0109] Hereinafter, embodiments of the present invention will be described with reference to the drawings. In the drawings, the same reference numerals represent the same or similar components, or the same or similar steps.

[0110] With the rapid development of artificial intelligence and the continuous progress of natural language processing technology, intelligent customer service dialogue systems have gradually become the focus of the natural language processing field. It is essentially a task-based dialogue system, aiming to help users answer questions and improve the answering efficiency. Intelligent customer service has many advantages over artificial customer service. The response speed of intelligent customer service is calculated in milliseconds, which can answer customer service questions in a timely manner and has no limit on the number of service people, solving the problems of low service efficiency and long waiting time of artificial customer service; intelligent customer service only requires servers and maintenance personnel, without a large number of customer service seat personnel, greatly reducing the enterprise cost; intelligent customer service can serve customers at any time, without the limitation that artificial customer service can only serve customers during working hours.

[0111] At the same time, intelligent customer service also has many deficiencies compared to human customer service. Although intelligent customer service can recognize user intentions and solve simple problems, it usually cannot solve complex problems well. Intelligent customer service cannot flexibly provide corresponding solutions according to the differentiated demands of users; intelligent customer service cannot accurately recognize the emotions of users, cannot sensitively perceive user emotions like human customer service, and at the same time intelligent customer service cannot judge user demands based on the current user's tone and reply content, and give users timely comfort and accurate solutions. Therefore, the existing technology does not consider the cumulative impact on user emotions when different dialogue scenarios occur during the upgrade of customer service, and does not deeply perceive the current emotional state of users, resulting in untimely upgrade of customer service.

[0112] To solve this problem, one aspect of the present invention provides a method for upgrading task-based customer service, as Figure 1 shown, the method includes steps S101 to S106:

[0113] S101: For the 1st to nth rounds of conversations input by the user, respectively obtain the first text information containing emoticons in each round of conversation, input the first text information into a pre-trained word embedding model to obtain the corresponding first word vector and first emoticon vector; input the first word vector and first emoticon vector of each round of conversation into the pre-trained sentiment analysis model one by one, respectively output the sentiment tendency degree numerical array of the 1st to nth rounds of conversations and calculate the primary sentiment parameter, and accumulate the primary sentiment parameter to obtain the sentiment value of the nth round of conversation.

[0114] S102: For the 1st to nth rounds of conversations input by the user, respectively obtain the second text information containing only text, input the second text information into the word embedding model to obtain the second word vector, input the second word vector of each round of conversation into the pre-trained natural language understanding model one by one, respectively output the overall user intention of the 1st to nth rounds of conversations and the quantity of slot value information corresponding to the sub-goals, calculate the primary task conversation completion parameter of the corresponding round according to the overall user intention and the quantity of slot value information of each round, and accumulate to obtain the task-based conversation completion value of the nth round of conversation.

[0115] S103: For the 1st to nth rounds of conversations input by the user, obtain the satisfaction adjustment ratio of multiple user emotion influencing factors on user satisfaction, judge the achievement situation of the user emotion influencing factors in each round of conversation, and adjust the initial satisfaction value round by round according to the corresponding satisfaction adjustment ratio to obtain the primary user satisfaction parameter of the 1st to nth rounds of conversations, and accumulate to obtain the user satisfaction value of the nth round of conversation.

[0116] S104: Calculate the emotional value index of the nth round of conversation based on the emotional values of the nth round and the (n - 1)th round of conversation, calculate the task-based conversation completion index of the nth round of conversation based on the task-based conversation completion values of the nth round and the (n - 1)th round of conversation, and calculate the user satisfaction index of the nth round of conversation based on the user satisfaction values of the nth round and the (n - 1)th round of conversation.

[0117] S105: Obtain the service upgrade main index constant and perform weighted summation in combination with the emotional value index, task-based conversation completion index, and user satisfaction index of the nth round of conversation to obtain the service upgrade main index.

[0118] S106: Initiate customer service upgrade when the service upgrade main index reaches the set standard.

[0119] In step S101, obtain the first text information containing emoji in each round of conversation, convert the emoji in the text into corresponding semantic information, and input the text containing semantic information into the word embedding model to obtain the first word vector and the first emoji vector.

[0120] In this embodiment, as Figure 4 shown, the word embedding model is the BERT-base-Chinese model, and the BERT-base-Chinese model is fine-tuned using text containing emoji. BERT-base-Chinese has a structure of L = 12, H = 768, A = 12, where L represents the number of layers of the transformer, H represents the output dimension, and A represents the number of multi-head attention mechanisms.

[0121] Among them, when fine-tuning the parameters of the BERT-base-Chinese model, set the batch size (the number of data samples grabbed in one training) to 16, epochs (a complete dataset passes through the neural network once and returns once) to 4, and the learning rate to 2e -5 . Adjust the marked text according to the BERT-base-Chinese model, and add the "[CLS]" (for downstream classification tasks) label before each comment. Send the processed comment text into the fine-tuned BERT-base-Chinese model for training to obtain the word vector and the emoji vector.

[0122] In this embodiment, the pre-training steps of the sentiment analysis model include S1011 - S1013:

[0123] S1011: Obtain multiple text samples containing emoji.

[0124] S1012: Input each text sample into the BERT-base-Chinese model to obtain the corresponding sample word vectors and sample emotion vectors, and add sentiment annotations to each text sample as labels to form the first training sample set; the sentiment annotations include at least: positive, neutral, and negative.

[0125] S1013: Obtain the Self-Explain NLP initial model, and use the first training sample set to train the Self-Explain NLP initial model to obtain a sentiment analysis model.

[0126] In step S1011, preprocess the obtained multiple text samples containing emoji, including converting the emoji in the text into corresponding semantic information and deleting irrelevant information such as links and non-Chinese characters in the text.

[0127] In step S1012, add sentiment annotations to each text sample as labels. The sentiment annotations are the sentiment tendency annotations manually made for the texts in the sample set. The sentiment annotations include three sentiment tendencies: "positive", "neutral", and "negative", and the sample set is divided into a test sample set and a training sample set in a ratio of 3:7.

[0128] In step S1013, use the cross-entropy loss function to perform parameter iteration on the Self-Explain NLP initial model to obtain the optimal sentiment analysis model.

[0129] Further, as Figure 5 shown, the Self-Explain NLP model consists of six layers. The first layer is the input layer, and the input layer consists of the word vector W[x i :] and the emotion vector E[y j :] in the input sequence; the second layer is the middle layer, and the middle layer consists of a multi-head self-attention mechanism, layer normalization, and residual connection. The multi-head self-attention mechanism enables the model to understand the input vector from different perspectives. Layer normalization is used to improve the training speed and accuracy of the model and make the model more robust. Residual connection prevents the vector matrix from degrading; the third layer is the collection layer, which uses a fully connected method to splice the processed word vectors and emotion vectors, making full use of the co-occurrence relationships of word-word, word-emotion, and emotion-emotion. In the model, h(i,j) represents the co-occurrence relationship of word-word and word-emotion, and e(i,j) represents the co-occurrence relationship of emotion-emotion. The acquisition methods of h(i,j) and e(i,j) are the same, and their specific formula is defined as:

[0130] h(i,j) = F(h i ,h j );

[0131]

[0132] W = [W 1 , W 2 , W 3 , W 4 ;

[0133] where \(i\in[1,N]\), \(j\in[i,N]\), \(W i \in R D×D .

[0134] The fourth layer is the connection layer, which concatenates the co-occurrence vectors \(h(i,j)\) and \(e(i,j)\) generated by the collection layer to generate feature vectors; the fifth layer is the interpretation layer, which is used to obtain the weighted average \(H\) of the feature vectors.

[0135] Its specific formula definition is:

[0136]

[0137] \(\alpha(i,j)=\text{softmax}(o(i,j))\);

[0138]

[0139] The sixth layer is the output layer, which normalizes the weighted \(H\) using softmax to obtain a one-dimensional array of length 3, i.e., the sentiment tendency degree value array for the three types of sentiment annotations of positive, neutral, and negative. The index where the maximum value in the array is located is the result predicted by the model.

[0140] In this embodiment, the first word vector and the first expression vector of each round of conversation are input into the pre-trained sentiment analysis model one by one, and the sentiment tendency degree value arrays of the 1st to \(n\)th rounds of conversation are output respectively and the primary sentiment parameters are calculated, including:

[0141] The first word vector and the first expression vector of each round of conversation are input into the pre-trained sentiment analysis model one by one, and a sentiment tendency degree value array \([positive\_value, neutra\_value, negative\_value]\) for the three types of sentiment annotations of positive, neutral, and negative is output. \(positive\_value\) represents the probability that the sentiment is positive, \(neutra\_value\) represents the probability that the sentiment is neutral, and \(negative\_value\) represents the probability that the sentiment is negative;

[0142] The calculation formula of the primary sentiment parameter is:

[0143] \(emotional\_value = \max(positive\_value, neutra\_value, negative\_value)\times(1 - \max\_index)\);

[0144] Among them, emotional_value represents the primary emotion parameter, max_index represents the subscript of the maximum emotion value, the subscript of positive emotion is 0, the subscript of neutral emotion is 1, and the subscript of negative emotion is 2.

[0145] In some other embodiments, as Figure 6 shown, the emotion value calculation method mainly includes:

[0146] Collect text information containing emoji symbols, perform data processing and emotion annotation on it to generate a training data set and a test data set; in this embodiment, collect Weibo comment data, delete the text that does not contain Emoji symbols, and clear irrelevant information such as links and non-Chinese characters in the text, convert the Emoji symbols in the text into corresponding semantic representations to obtain a text data set containing Emoji symbols, convert the Emoji symbols into corresponding semantic information, and then separately extract the Emoji semantic text to increase the weight of Emoji symbols in the model next.

[0147] Use the language pre-training model BERT to perform language pre-training on the text to enhance the semantic representation of word vectors and obtain word vectors and emoji vectors;

[0148] Train the Emoji Self-ExplainNLP model with word vectors and emoji vectors to obtain the optimal Emoji Self-Explain model;

[0149] Input the user text into the optimal Emoji Self-ExplainNLP model and calculate the emotion value according to the emotion analysis result.

[0150] In step S102, the word embedding model is the BERT-base-Chinese model, and the BERT-base-Chinese model performs parameter fine-tuning using text containing only words. Then, input the second text information containing only words into the BERT-base-Chinese model to obtain the second word vector, and input the second word vector of each round of conversation into the pre-trained natural language understanding model one by one, and output the user intention of the 1st to nth rounds of conversation and the number of slot value information corresponding to the user intention respectively.

[0151] Among them, the pre-training of the natural language understanding model includes steps S1021 to S1022:

[0152] S1021: Obtain a second training sample set, the second training sample set contains multiple samples, and each sample contains text marked with slot value information and intention information labels.

[0153] S1022: Obtain the initial BiLSTM-CRF model, and train the initial BiLSTM-CRF model using the second training sample set to obtain the natural language understanding model.

[0154] In step S1021, the slot value information is the progress of the customer service in completing the user's intention.

[0155] In step S1022, use the binary cross-entropy loss function to perform parameter iteration on the initial BiLSTM-CRF model to obtain the optimal natural language understanding model.

[0156] In this embodiment, as Figure 7 shown, the initial BiLSTM-CRF model consists of three layers: The first layer is the character representation layer, which is responsible for mapping the characters and words in the Chinese sentence into low-dimensional vectors as the input of the BiLSTM layer; the second layer is the BiLSTM layer, which is a bidirectional long short-term memory network. It can simulate the dependencies between words according to the context of the words or characters and obtain the hidden representation of each word; the last layer is the CRF output layer, which takes the representation order of the hidden layer as the input, outputs the predicted label of each character, and learns the corresponding constraint rules.

[0157] In this embodiment, calculate the primary task dialogue completion parameter for the corresponding round according to the obtained user intention, the user's current round dialogue intention, and the number of the slot value information, including:

[0158] If both the obtained user intention system intent and the user's current round dialogue intention intent are null values, then

[0159] task_completion = 0;

[0160] If the user's current round dialogue intention intent is not a null value, then

[0161]

[0162] If the user's current round dialogue intention intent is a null value while the obtained user intention system_intent is not a null value, then

[0163]

[0164] where task_completion represents the primary task dialogue completion parameter, sum_slot_num represents the total number of slot values required for the intention, curr_slot_num represents the number of fillable slot values obtained in this round, and fill_slot_num represents the number of slot values that have been filled for the intention.

[0165] In some other embodiments, as Figure 8 shown, the method for calculating the task-based dialogue completion degree mainly includes:

[0166] According to the task requirements, construct a corresponding data set, and use the language pre-training model BERT to perform language pre-training on the text to obtain word vectors.

[0167] Train a natural language understanding model with the word vectors to obtain the optimal natural language understanding model.

[0168] Input the user text into the model to obtain intent information and slot value information, and calculate the task-based dialogue completion degree according to the intent information, slot value information, and the current dialogue state.

[0169] In step S103, the user emotion influencing factors include: the number of dialogue turns, the recognition degree of the customer service to the user's intent, the number of sub-goals achieved, the number of invalid dialogues, the number of times the user repeats the same question, and the occurrence of questions unknown to the customer service.

[0170] In this embodiment, as Figure 2 shown, obtain the satisfaction adjustment ratio of multiple user emotion influencing factors to user satisfaction, judge the achievement situation of the user emotion influencing factors in each round of dialogue, and adjust the initial satisfaction value round by round according to the corresponding satisfaction adjustment ratio to obtain the primary user satisfaction parameters for the 1st to nth round of dialogue, including:

[0171] The dialogue turn coefficient that the dialogue turn affects satisfaction, the intent coefficient that obtaining the customer service's recognition degree of the user's intent affects satisfaction, the sub-goal achievement coefficient that the number of sub-goals achieved affects satisfaction, the invalid dialogue coefficient that the invalid dialogue affects satisfaction, the repeated question coefficient that the number of times the user repeats the same question affects satisfaction, and the unknown question coefficient that the number of times the customer service unknown question appears affects satisfaction.

[0172] Obtain the initial user satisfaction of the nth round of dialogue.

[0173] Calculate the satisfaction update value after the satisfaction is affected by the increase in the number of dialogue turns. The calculation formula is:

[0174] user_satisfaction = user_satisfaction × (1 - round_factor);

[0175] where user_satisfaction represents the user satisfaction, and round_factor is the dialogue turn coefficient.

[0176] Furthermore, the user satisfaction decreases slightly as the number of dialogue turns increases, but the increase in the number of dialogue turns will not reduce the user satisfaction to the threshold for triggering the service upgrade mechanism.

[0177] When there is a user intention in the conversation from the 1st to the nth round and the customer service recognizes this user intention in the nth round, calculate the updated satisfaction value after the impact of repeated questions on satisfaction. The calculation formula is:

[0178] user_satisfaction = user_satisfaction × (1 - repetition_factor);

[0179] Among them, user_satisfaction represents the user satisfaction, and repetition_factor represents the repeated question coefficient.

[0180] Furthermore, the user's repeated question indicates that the answer given by the customer service does not meet the user's needs. This phenomenon will greatly reduce the user satisfaction. The judgment basis for the user's repeated question is to judge whether the intentions of the user recognized in the current round of conversation and the previous round of conversation are the same. If the intentions are the same, it is a repeated question; if the intentions are different, it is not a repeated question.

[0181] When there is no user intention in the conversation from the 1st to the nth round and the customer service does not recognize the user intention in the nth round, calculate the updated satisfaction value after the impact of the number of unknown questions on satisfaction and end the satisfaction adjustment process. The calculation formula is:

[0182] user_satisfaction = user_satisfaction × (1 - unknown_factor);

[0183] Among them, user_satisfaction represents the user satisfaction, and unknown_factor represents the unknown question coefficient.

[0184] Furthermore, the unknown question is the question that the customer service cannot answer. This situation will reduce the user satisfaction to the lowest value, enabling the service upgrade index to reach the set threshold, thereby triggering the customer service service upgrade.

[0185] When there is no user intention in the conversation from the 1st to the nth round but the customer service recognizes the user intention in the nth round, calculate the updated satisfaction value after the impact of the user intention recognition degree on satisfaction. The calculation formula is:

[0186] user_satisfaction = user_satisfaction × (1 + intent_factor × intent_acc);

[0187] Among them, user_satisfaction represents user satisfaction, intent_factor represents the intent coefficient, and intent_acc represents the intent recognition accuracy rate.

[0188] Furthermore, the intent recognition degree is divided into two intervals, namely the credible interval and the normal interval. The credible interval increases user satisfaction, while the normal interval has no impact on user satisfaction. In the dialogue state, obtain the recognized intent and its accuracy rate. If the accuracy rate (intent_acc) is greater than 0.8 (i.e., in the credible interval), then the user satisfaction increases; otherwise, it has no impact on the user emotion value.

[0189] When the customer service identifies a sub-goal in the nth round, calculate the updated value of user satisfaction after the number of sub-goals achieved affects satisfaction. The calculation formula is:

[0190] user_satisfaction = user_satisfaction(1 + subgoal_factor × m);

[0191] Among them, user_satisfaction represents user satisfaction, subgoal_factor represents the sub-goal achievement coefficient, and m represents the number of sub-goals achieved.

[0192] Furthermore, the user's intent often contains multiple sub-goals, which are reflected in the form of slots. After identifying the entities in the user's dialogue information in this round through the natural language understanding model, judge whether the entity type can be filled into the slot. If it can, it means that a sub-goal has been completed and the user satisfaction value increases.

[0193] When the customer service fails to identify a sub-goal in the nth round, calculate the updated value of user satisfaction after the ineffective dialogue affects satisfaction. The calculation formula is:

[0194] user_satisfaction = user_satisfaction × (1 - invalid_factor);

[0195] Among them, user_satisfaction represents user satisfaction, and invalid_factor represents the ineffective dialogue coefficient.

[0196] Furthermore, if there is intent information but no slot value information in this round, it means that this round of dialogue is ineffective and the user satisfaction decreases.

[0197] In some embodiments, obtaining the initial user satisfaction of the nth round of dialogue includes:

[0198] If the nth round of conversation is the first conversation between the customer service and the user, set the initial satisfaction of the user to 50; if the nth round of conversation is not the first conversation between the customer service and the user, set the satisfaction of the user at the end of the (n - 1)th round of conversation as the initial satisfaction of this round of conversation.

[0199] In step S104, calculate the emotional value index of the nth round of conversation according to the emotional values of the nth and (n - 1)th rounds of conversation, calculate the task-based conversation completion index of the nth round of conversation according to the task-based conversation completion values of the nth and (n - 1)th rounds of conversation, and calculate the user satisfaction index of the nth round of conversation according to the user satisfaction values of the nth and (n - 1)th rounds of conversation, including:

[0200] Calculate the emotional value index of the nth round of conversation according to the emotional values of the nth and (n - 1)th rounds of conversation. The calculation formula is:

[0201]

[0202] Among them, emotional_index represents the emotional value index, emotional_value n represents the emotional value of the nth round, and emotional_value n-1 represents the emotional value of the (n - 1)th round.

[0203] Calculate the task-based conversation completion index of the nth round of conversation according to the task-based conversation completion values of the nth and (n - 1)th rounds of conversation. The calculation formula is:

[0204]

[0205] Among them, task_completion_index represents the task-based conversation completion index, task_completion n represents the task-based conversation completion value of the nth round, and task_completion n-1 represents the task-based conversation completion value of the (n - 1)th round, and n represents the conversation round number.

[0206] Calculate the user satisfaction index of the nth round of conversation according to the user satisfaction values of the nth and (n - 1)th rounds of conversation. The calculation formula is:

[0207]

[0208] Among them, satisfaction_index represents the user satisfaction index, satisfaction n represents the user satisfaction value of the nth round, and satisfaction n-1 represents the user satisfaction value of the (n - 1)th round, and n represents the conversation round number.

[0209] In some embodiments, the response content of the customer service is improved according to the calculated emotional value index. When the emotional value index is high, it indicates that the user's mood is positive, so positive emotional words are embedded in the customer service response; when the emotional value index is low, it indicates that the user's mood is negative, so apology-related emotional words are embedded in the customer service response. According to the calculated task-based dialogue completion index, the management regularly checks the reasons for the scenario where the task-based dialogue completion index value is zero continuously appears in the dialogue history, and appropriately adjusts the dialogue strategy of the customer service, thereby accelerating the completion speed of the task-based dialogue. According to the calculated user satisfaction index, the satisfaction degree of the user with the customer service is judged. When the user satisfaction index is low, it may be that there are deviations in the dialogue strategy or the natural language understanding model. The management needs to regularly check the scenarios with low user satisfaction index according to the dialogue history records, analyze the reasons for the low user satisfaction, and make targeted modifications and adjustments, so as to improve the user satisfaction in the subsequent dialogue process.

[0210] In step S105, a multiple linear regression model is used to analyze the user score, emotional value, task-based dialogue completion value, and user satisfaction value, and the parameters with the smallest sum of squared residuals are obtained. The parameters include: the main service upgrade index constant, the emotional value index coefficient, the task-based dialogue completion index coefficient, and the user satisfaction index coefficient.

[0211] In some embodiments, obtaining the main service upgrade index constant and performing weighted summation with the emotional value index, task-based dialogue completion index, and user satisfaction index of the nth round of dialogue to obtain the main service upgrade index includes:

[0212] Obtaining the main service upgrade index constant, the emotional value index, task-based dialogue completion index, and user satisfaction index of the nth round of dialogue, and obtaining the emotional value index coefficient, task-based dialogue completion index coefficient, and user satisfaction index coefficient.

[0213] The calculation formula of the main service upgrade index is:

[0214] main_service_value = main_service_constant + emotional_factor × emotiaonal_index + task_completion_factor × task_completion_index + satisfaction_factor × usatisfaction_index;

[0215] Among them, main_service_constant represents the main index constant for service upgrade, emotional_factor represents the emotional value index coefficient, emotiaonal_index represents the emotional value index, task_completion_factor represents the task-based dialogue completion index coefficient, task_completion_index represents the task-based dialogue completion index, satisfaction_factor represents the user satisfaction index coefficient, and satisfaction_index represents the user satisfaction index.

[0216] In step S106, it is judged whether to perform customer service upgrade according to the calculated main index of service upgrade. The higher the main index of service upgrade, the more dissatisfied the user is with the customer service. When the calculated main index of service upgrade reaches the threshold set by the system, the customer service upgrade is performed.

[0217] On the other hand, the present invention provides a task-based customer service upgrade device, as Figure 3 shown. The device includes:

[0218] An emotional value calculation module, which is used to perform the following steps: for the 1st to nth rounds of conversations input by the user, respectively obtain the first text information containing emoticons in each round of conversation, and input the first text information into a pre-trained word embedding model to obtain corresponding first word vectors and first emoticon vectors; input the first word vectors and first emoticon vectors of each round of conversation into a pre-trained emotional analysis model one by one, respectively output the emotional tendency degree value arrays of the 1st to nth rounds of conversations and calculate the primary emotional parameters, and accumulate the primary emotional parameters to obtain the emotional value of the nth round of conversation.

[0219] In some embodiments, as Figure 9 shown, the emotional value calculation module is mainly composed of an emotional analysis model training module and an emotional analysis model recognition module. Emotional analysis refers to mining people's opinions, emotional tendencies, attitudes, etc. towards products, services, organizations, individuals, events, etc. Among them, as Figure 10As shown in the figure, the sentiment analysis model training module includes: a word embedding model pre-training unit, a sentiment analysis model training unit, and a sentiment analysis model saving unit. The BERT model used by the word embedding model pre-training unit is the open-source BERT-base-Chinese model downloaded from the network. This unit is mainly responsible for inputting the natural language understanding dataset into the BERT model to obtain enhanced feature vectors, and sending the increased feature vectors to the sentiment analysis model training unit. The sentiment analysis model training unit is responsible for training the Self-ExplainNLP model using the feature vectors, evaluating the training results, and obtaining the best-performing sentiment analysis model. The sentiment analysis model saving unit is responsible for storing the trained sentiment analysis model in the form of a file.

[0220] As Figure 11 shown, the sentiment analysis model recognition module consists of: an input data processing unit, a sentiment analysis model loading unit, a sentiment analysis model running unit, a sentiment value calculation unit, and a sentiment value transmission unit. The input data processing unit is responsible for converting the user input content into feature vectors. The sentiment analysis model loading unit is responsible for loading the trained sentiment analysis model. The sentiment analysis model running unit is responsible for receiving the feature vectors and outputting the sentiment analysis results obtained from running the sentiment analysis model. The sentiment value calculation unit is responsible for calculating the sentiment value according to the sentiment analysis results using the sentiment value calculation method. The sentiment value transmission unit is responsible for transmitting the sentiment value to the service upgrade index calculation module.

[0221] The task-based dialogue module, which includes a task-based dialogue completion calculation module and a user satisfaction calculation module.

[0222] In some embodiments, as Figure 12 shown, the task-based dialogue module mainly consists of: a natural language understanding model training block, a natural language understanding model calling module, a dialogue state tracking module, a dialogue strategy selection module, and a natural language generation module.

[0223] Among them, the natural language understanding model training module: is responsible for the training and evaluation of the word embedding model and the natural language understanding model BiLSTM-CRF. As Figure 13As shown in the figure, this module mainly consists of a word embedding model pre-training unit, a natural language understanding training unit, and a natural language understanding model BiLSTM-CRF saving unit. The BERT model used by the word embedding pre-training unit is the open-source BERT-base-Chinese model downloaded from the network. This unit is mainly responsible for inputting the natural language understanding dataset into the word embedding model to obtain enhanced feature vectors, and sending the increased feature vectors to the natural language understanding model training unit. Natural language understanding model training unit: Use the feature vectors output by the word embedding model to train the BiLSTM-CRF model, evaluate the training results, and obtain the best natural language understanding model. The natural language understanding model saving unit stores the trained natural language understanding model in the form of a file.

[0224] Natural language understanding model calling module: Input the user input text into the natural language understanding model to obtain the user's intention information and slot value information. Further, the natural language understanding model calling module includes two basic tasks: intention recognition and slot filling. Through intention recognition, the overall intention of the natural language text is understood, and through semantic annotation and word sequence mapping, the slot information is filled. As Figure 14 shown in the figure, this module mainly consists of an input data processing unit, a natural language understanding model loading unit, a natural language understanding model running unit, and an intention information and slot value information conveying unit. The input data processing unit is responsible for converting the user input content into feature vectors using the word embedding model. The natural language understanding model loading unit loads the trained natural language understanding model from the local. The natural language understanding model running unit receives the feature vectors output by the word embedding model and inputs them into the natural language understanding model to obtain the intention information (including the user intention and the accuracy of intention recognition) and slot value information. A task-based customer service often requires a lot of information to complete a dialogue task, and these information are called slot information. When the slot value information obtained by the natural language understanding model analyzing the user input meets the current intention requirement, the sub-goal is achieved. When all the slot value information required by the intention is filled, it means that this task has been completed.

[0225] Dialogue state tracking module: Identify the intention information, intention accuracy, and slot value information in the user input content, and transmit the above information to the dialogue tracking unit. The dialogue state is a data structure that simplifies the dialogue history up to a specific moment position into information for the system to select the next moment action. Therefore, dialogue state tracking is to infer the current user state and user goal based on all dialogue history information. As Figure 15As shown, this module mainly consists of: a dialogue state loading unit, a dialogue state processing unit, and a dialogue state conveying unit. The dialogue state loading unit loads the previous dialogue state into the device. If this is the first round of dialogue, it initializes the dialogue state and loads it into the device. The dialogue state processing unit stores the slot value information and intention information input by the natural language understanding model call module into the dialogue state. The dialogue state conveying unit conveys the processed dialogue state to the dialogue policy selection module. Among them, the dialogue state mainly includes: dialogue history, previous intention, slot value information, intention information (user intention and accuracy rate), system action, system reply, etc.

[0226] Dialogue policy selection module: Based on the current dialogue state, it selects the actions that the system needs to take, that is, it is responsible for determining the next action according to the current dialogue state and records the action in the dialogue state. As Figure 15 shown, this module mainly consists of: a dialogue state loading unit, a dialogue policy selection unit, and a dialogue state conveying unit. The dialogue state loading unit loads the dialogue state passed in by the dialogue state tracking module into the current module. The dialogue policy selection unit is responsible for selecting the next action to be executed by the device according to the current dialogue state and the manually set rules, and stores the action in the dialogue state.

[0227] Dialogue state conveying unit: Conveys the processed dialogue state to the natural language generation module.

[0228] Natural language generation module: Selects a suitable reply template from the template library according to the system action in the current dialogue state for reply, and at the same time converts non-verbal format data into words that humans can understand. That is, when a user interacts with a machine, the user inputs a specific task, which is described in natural language (usually in text form). The user's input enters the natural language understanding module and first needs to be classified, including classifying into a specific field and identifying the user's true intention, then obtaining a labeled sequence through semantic slot filling, and transmitting the labeled data to the dialogue management module. In the dialogue management module, the dialogue state tracking infers the user's current intention and dialogue state, and the dialogue policy then determines the next direction of the system. Finally, through the natural language generation module, the machine reply is converted into a natural language form that humans can understand, and the generated reply is fed back to the user. Thus, one round of interaction between the user and the machine is completed. As Figure 17As shown in the figure, this module mainly consists of: a dialogue state loading unit, a dialogue template loading unit, a dialogue template selection unit, a natural language generation unit, and a dialogue state transmission unit. The dialogue state loading unit loads the dialogue state passed in by the dialogue policy selection module into the current module. The dialogue template loading unit loads the dialogue templates in the template library into the module. The dialogue template selection unit selects a suitable dialogue template from the dialogue templates according to the system action in the dialogue state. The natural language generation unit generates a response content according to the current dialogue state and the selected dialogue template, and stores the response content (i.e., the system response) into the dialogue state. The dialogue state transmission unit transmits the processed dialogue state to the service upgrade index calculation module.

[0229] The task-based dialogue completion degree calculation module is used to perform the following steps: for the 1st to nth rounds of dialogues input by the user, respectively obtain the second text information containing only text, input the second text information into the word embedding model to obtain the second word vector, input the second word vector of each round of dialogue into the pre-trained natural language understanding model one by one, and respectively output the overall intention of the user in the 1st to nth rounds of dialogues and the quantity of slot value information corresponding to the sub-goals, calculate the primary task-based dialogue completion degree parameter for the corresponding round according to the overall intention of the user and the quantity of slot value information in each round, and accumulate to obtain the task-based dialogue completion degree value of the nth round of dialogue;

[0230] Furthermore, the task-based dialogue completion degree calculation module obtains the required intention information and slot value information from the dialogue state passed in by the task-based dialogue module, and calculates the task-based dialogue completion degree in combination with the task-based dialogue completion degree calculation method.

[0231] As Figure 18 shown in the figure, the task-based dialogue completion degree module mainly consists of: a dialogue state processing unit, a task-based dialogue completion degree calculation unit, and a task-based dialogue completion degree output unit. Among them, the dialogue state processing unit loads the dialogue state passed in by the task-based dialogue module into the current module, and obtains the intention information and slot value information from it. The task-based dialogue completion degree calculation unit calculates the task-based dialogue completion degree using the task-based dialogue completion degree calculation method according to the intention information and slot value information obtained by the dialogue state processing unit. The task-based dialogue completion degree transmission unit transmits the calculated task-based dialogue completion degree to the service upgrade index calculation module.

[0232] The user satisfaction calculation module is used to perform the following steps: calculate the emotional numerical index of the nth round of dialogue according to the emotional numerical values of the nth round and the n - 1th round of dialogues, calculate the task-based dialogue completion degree index of the nth round of dialogue according to the task-based dialogue completion degree numerical values of the nth round and the n - 1th round of dialogues, and calculate the user satisfaction index of the nth round of dialogue according to the user satisfaction numerical values of the nth round and the n - 1th round of dialogues;

[0233] Furthermore, asFigure 19 As shown in the figure, the user satisfaction calculation module mainly consists of: a dialogue state processing unit, a parameter and proportional coefficient loading unit, a user satisfaction calculation unit, and a user satisfaction output unit. The dialogue state processing unit loads the dialogue state passed in by the task-based dialogue module into the current module, and obtains information such as user intent, slot values, and dialogue turns from it. The parameter and proportional coefficient loading unit loads various parameters and proportional coefficients required for calculating user satisfaction set by the user from the database. The user satisfaction calculation unit calculates the user satisfaction using the user satisfaction calculation method based on parameters such as the intent, slot values, and dialogue turns obtained by the dialogue state processing unit. The user satisfaction delivery unit delivers the calculated user satisfaction to the service upgrade index calculation module.

[0234] The service upgrade index calculation module is used to perform the following steps: obtain the service upgrade main index constant and perform weighted summation in combination with the emotional value index, task-based dialogue completion index, and user satisfaction index of the nth round of dialogue to obtain the service upgrade main index;

[0235] In some embodiments, as Figure 20 shown in the figure, the service upgrade index calculation module mainly consists of: a data loading unit, a parameter loading unit, a service upgrade index calculation unit, and a service upgrade index delivery unit. The data loading unit loads the information passed in by the emotional value calculation module, task-based dialogue completion module, and user satisfaction calculation module into the module. The parameter and proportional coefficient loading unit loads various parameters and proportional coefficients required for calculating the service upgrade index set by the user from the database. The service upgrade index calculation unit calculates the service upgrade index using the service upgrade index calculation method based on parameters such as emotional value, task-based dialogue completion, and user satisfaction. The service upgrade index output module outputs the service upgrade index as a condition for whether to perform service upgrade.

[0236] The service upgrade execution module is used to initiate customer service upgrade when the service upgrade main index reaches the set standard.

[0237] In this embodiment, the service upgrade execution module receives the service upgrade main index obtained by the service upgrade index calculation module, and initiates customer service upgrade when the service upgrade main index reaches the system set standard.

[0238] On the other hand, the present invention also provides a computer-readable storage medium, on which a computer program is stored, characterized in that when the program is executed by a processor, the steps of the above method are implemented. The computer-readable storage medium may be a tangible storage medium, such as a random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, register, floppy disk, hard disk, removable storage disk, CD-ROM, or any other form of storage medium known in the art.

[0239] In summary, for the method and device for upgrading task-based customer service described in the present invention, based on a pre-trained word embedding model, a sentiment analysis model, a natural language understanding model, and a satisfaction update step, the emotional attitude of the user in the conversation, the completion degree of the conversation between the user and the customer service, and the satisfaction of the user with the customer service are quantified into three indicators: emotional value, task-based conversation completion degree value, and user satisfaction value. The main service upgrade index is calculated jointly according to the three indicators. The service upgrade timing is judged according to the main service upgrade index, comprehensively considering the three aspects of emotional attitude, conversation completion degree, and satisfaction, thus improving the accuracy of customer service upgrade.

[0240] Furthermore, the analysis of emoticons in the user input text is added in the process of calculating the emotional value. By performing semantic extraction on both the text and emoticons simultaneously, the accuracy of sentiment analysis is improved.

[0241] Furthermore, the primary emotional parameter, primary user satisfaction parameter, and primary conversation completion parameter in each round of conversation between the user and the customer service are calculated. The emotional value, user satisfaction value, and conversation completion value are calculated in the form of cumulative addition round by round, deeply perceiving the user state, and judging whether the current conversation needs to upgrade the customer service round by round, thus improving the accuracy of customer service upgrade.

[0242] Those of ordinary skill in the art should understand that the various exemplary components, systems, and methods described in combination with the embodiments disclosed herein can be implemented in hardware, software, or a combination of both. Specifically, whether to implement in hardware or software depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (ASIC), appropriate firmware, a plug-in, a functional card, etc. When implemented in software, the elements of the present invention are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium or transmitted through a data signal carried in a carrier wave on a transmission medium or a communication link.

[0243] It should be clear that the present invention is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order between steps after understanding the spirit of the present invention.

[0244] In the present invention, features described and / or illustrated for one embodiment may be used in the same way or in a similar way in one or more other embodiments, and / or combined with the features of other embodiments or replace the features of other embodiments.

[0245] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, various modifications and variations can be made to the embodiments of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. A method for upgrading task-based customer service, characterized in that, the method comprises the following steps: For the 1st to nth rounds of conversations input by the user, respectively obtain the first text information containing emoji in each round of conversation, input the first text information into a pre-trained word embedding model to obtain corresponding first word vectors and first emoji vectors; input the first word vectors and the first emoji vectors of each round of conversation into the pre-trained sentiment analysis model one by one, respectively output the sentiment tendency degree numerical arrays of the 1st to nth rounds of conversations and calculate the primary sentiment parameters, and accumulate the primary sentiment parameters to obtain the sentiment value of the nth round of conversation; For the 1st to nth rounds of conversations input by the user, respectively obtain the second text information containing only text, input the second text information into the word embedding model to obtain second word vectors, input the second word vectors of each round of conversation into the pre-trained natural language understanding model one by one, respectively output the user intentions of the 1st to nth rounds of conversations and the number of slot value information corresponding to sub-goals, calculate the primary task conversation completion degree parameters of the corresponding rounds according to the user intentions and the number of slot value information of each round, and accumulate to obtain the task-based conversation completion degree value of the nth round of conversation; For the 1st to nth rounds of conversations input by the user, obtain the satisfaction adjustment ratio of multiple user emotion influencing factors to user satisfaction, judge the achievement situation of the user emotion influencing factors in each round of conversation, and adjust the initial satisfaction value round by round according to the corresponding satisfaction adjustment ratio to obtain the primary user satisfaction parameters of the 1st to nth rounds of conversations, and accumulate to obtain the user satisfaction value of the nth round of conversation; Calculate the emotion value index of the nth round of conversation according to the emotion values of the nth round and the n - 1th round of conversations, calculate the task-based conversation completion degree index of the nth round of conversation according to the task-based conversation completion degree values of the nth round and the n - 1th round of conversations, calculate the user satisfaction index of the nth round of conversation according to the user satisfaction values of the nth round and the n - 1th round of conversations; Obtain the service upgrade main index constant and perform weighted summation in combination with the emotion value index, the task-based conversation completion degree index and the user satisfaction index of the nth round of conversation to obtain the service upgrade main index; When the service upgrade main index reaches the set standard, initiate the upgrade of customer service.

2. The task-based customer service upgrade method according to claim 1, characterized in that, the word embedding model is the BERT-base-Chinese model, and the BERT-base-Chinese model is fine-tuned with text containing emoji.

3. The task-based customer service upgrade method according to claim 2, characterized in that, the pre-training steps of the sentiment analysis model include: Obtain multiple text samples containing emoji; Input each text sample into the BERT-base-Chinese model to obtain corresponding sample word vectors and sample emoji vectors, add sentiment annotations to each text sample as labels, and form a first training sample set; the sentiment annotations at least include: positive, neutral and negative; Obtain the Self-Explain NLP initial model, and use the first training sample set to train the Self-Explain NLP initial model to obtain a sentiment analysis model.

4. The task-based customer service service upgrade method according to claim 3, characterized in that, Input the first word vector and the first expression vector of each round of conversation into the pre-trained sentiment analysis model one by one, and output the sentiment tendency degree value arrays of the 1st to nth round of conversations respectively and calculate the primary sentiment parameter, including: Input the first word vector and the first expression vector of each round of conversation into the pre-trained sentiment analysis model one by one, and output the sentiment tendency degree value array [positive_value, neutra_value, negative_value] for the three types of sentiment annotations of positive, neutral and negative. positive_value represents the probability that the sentiment is positive, neutra_value represents the probability that the sentiment is neutral, and negative_value represents the probability that the sentiment is negative; The calculation formula of the primary sentiment parameter is: emotional_value = max(positive_value, neutra_value, negative_value) × (1 - max_index); wherein, emotional_value represents the primary sentiment parameter, max_index represents the subscript of the maximum sentiment value, the subscript of the positive sentiment is 0, the subscript of the neutral sentiment is 1, and the subscript of the negative sentiment is 2.

5. The task-based customer service service upgrade method according to claim 2, characterized in that, The pre-training steps of the natural language understanding model include: Obtain a second training sample set, the second training sample set contains multiple samples, and each sample contains text marked with slot value information and intent information labels; Obtain the BiLSTM-CRF initial model, and use the second training sample set to train the BiLSTM-CRF initial model to obtain the natural language understanding model.

6. The task-based customer service service upgrade method according to claim 1, characterized in that, Calculate the primary task conversation completion parameter of the corresponding round according to the obtained user intent, the user's current round of conversation intent and the number of the slot value information, including: If both the obtained user intent system_intent and the user's current round of conversation intent intent are null values, then task_completion = 0; If the user's current round of conversation intent intent is not a null value, then If the user's current round of conversation intent intent is a null value and the obtained user intent system_intent is not a null value, then Among them, task_completion represents the primary task conversation completion parameter, sum_slot_num represents the total number of slot values required by the intention, curr_slot_num represents the number of fillable slot values obtained in this round, and fill_slot_num represents the number of slot values that have been filled for the intention.

7. The method for upgrading task-based customer service according to claim 1, characterized in that obtaining the satisfaction adjustment ratio of multiple user emotion influencing factors to user satisfaction, judging the achievement situation of the user emotion influencing factors in each round of conversation, and adjusting the initial satisfaction value round by round according to the corresponding satisfaction adjustment ratio to obtain the primary user satisfaction parameter for the 1st to nth round of conversations, including: the conversation round coefficient that affects satisfaction in the conversation round, the intention coefficient that affects satisfaction by the customer service's recognition degree of the user's intention, the sub-goal achievement coefficient that affects satisfaction by the number of sub-goals achieved, the invalid conversation coefficient that affects satisfaction by the invalid conversation, the repeated question coefficient that affects satisfaction by the number of times the user repeats the same question, and the unknown question coefficient that affects satisfaction by the number of times the customer service's unknown questions appear; obtaining the initial user satisfaction of the nth round of conversation; calculating the satisfaction update value after being affected by the increase in the conversation round, and the calculation formula is: user_satisfaction = user_satisfaction × (1 - round_factor); where user_satisfaction represents the user satisfaction, and round_factor is the conversation round coefficient; when there is a user intention in the 1st to nth round of conversations and the customer service recognizes the user intention in the nth round, calculating the satisfaction update value after being affected by the appearance of repeated questions, and the calculation formula is: user_satisfaction = user_satisfaction × (1 - repetition_factor); where user_satisfaction represents the user satisfaction, and repetition_factor represents the repeated question coefficient; when there is no user intention in the 1st to nth round of conversations and the customer service does not recognize the user intention in the nth round, calculating the satisfaction update value after being affected by the number of times the customer service's unknown questions appear and ending the satisfaction adjustment process, and the calculation formula is: user_satisfaction = user_satisfaction × (1 - unknown_factor); where user_satisfaction represents the user satisfaction, and unknown_factor represents the unknown question coefficient; when there is no user intention in the 1st to nth round of conversations but the customer service recognizes the user intention in the nth round, calculating the satisfaction update value after being affected by the customer service's recognition degree of the user intention, and the calculation formula is: user_satisfaction = user_satisfaction × (1 + intent_factor × intent_acc); Wherein, user_satisfaction represents the user satisfaction, intent_factor represents the intent coefficient, and intent_acc represents the intent recognition accuracy rate; When the customer service identifies a sub-goal in the nth round, calculate the updated satisfaction value after the number of sub-goal achievements affects the satisfaction. The calculation formula is: user_satisfaction = user_satisfaction(1 + subgoal_factor × m); Wherein, user_satisfaction represents the user satisfaction, subgoal_factor represents the sub-goal achievement coefficient, and m represents the number of sub-goal achievements; When the customer service does not identify a sub-goal in the nth round, calculate the updated satisfaction value after the invalid conversation affects the satisfaction. The calculation formula is: user_satisfaction = user_satisfaction × (1 - invalid_factor); Wherein, user_satisfaction represents the user satisfaction, and invalid_factor represents the invalid conversation coefficient.

8. The method for upgrading task-based customer service according to claim 1, characterized in that obtaining the initial user satisfaction of the nth round of conversation includes: If the nth round of conversation is the first conversation between the customer service and the user, set the initial user satisfaction to 50; if the nth round of conversation is not the first conversation between the customer service and the user, set the satisfaction of the user at the end of the (n - 1)th round of conversation as the initial satisfaction of this round of conversation.

9. The method for upgrading task-based customer service according to claim 1, characterized in that Calculating the emotional value index of the nth round of conversation according to the emotional values of the nth round and the (n - 1)th round of conversation, calculating the task-based conversation completion index of the nth round of conversation according to the task-based conversation completion values of the nth round and the (n - 1)th round of conversation, and calculating the user satisfaction index of the nth round of conversation according to the user satisfaction values of the nth round and the (n - 1)th round of conversation, including: Calculating the emotional value index of the nth round of conversation according to the emotional values of the nth round and the (n - 1)th round of conversation. The calculation formula is: Among them, emotional_index represents the emotional value index, and emotional_value n represents the emotional value of the nth round, and emotional_value n-1 represents the emotional value of the (n - 1)th round; Calculating the task-based conversation completion index of the nth round of conversation according to the task-based conversation completion values of the nth round and the (n - 1)th round of conversation. The calculation formula is: Among them, task_completion_index represents the task-based dialogue completion index, and task_completion n represents the task-based dialogue completion value of the nth round, and task_completion n-1 represents the task-based dialogue completion value of the (n - 1)th round, where n represents the dialogue round number; Calculating the user satisfaction index of the nth round of conversation according to the user satisfaction values of the nth round and the (n - 1)th round of conversation. The calculation formula is: Among them, satisfaction_index represents the user satisfaction index, and satisfaction n represents the user satisfaction value in the nth round, and satisfaction n-1 represents the user satisfaction value in the (n - 1)th round, where n represents the conversation round.

10. The method for upgrading task-based customer service according to claim 9, characterized in that obtaining the main service upgrade index constant and performing weighted summation in combination with the emotional value index, the task-based conversation completion index, and the user satisfaction index of the nth round of conversation to obtain the main service upgrade index, including: Obtain the service upgrade main index constant, the emotional value index of the nth round of dialogue, the task-based dialogue completion index, and the user satisfaction index, and obtain the emotional value index coefficient, the task-based dialogue completion index coefficient, and the user satisfaction index coefficient; The calculation formula of the service upgrade main index is: main_service_value = main_service_constant + emotiaonal_factor × emotiaonal_index + task_completion_factor × task_completion_index + satisfaction_factor × satisfaction_index; Among them, main_service_constant represents the service upgrade main index constant, emotional_factor represents the emotional value index coefficient, emotiaonal_index represents the emotional value index, task_completion_factor represents the task-based dialogue completion index coefficient, task_completion_index represents the task-based dialogue completion index, satisfaction_factor represents the user satisfaction index coefficient, and satisfaction_index represents the user satisfaction index.

11. A task-based customer service service upgrade device, Characterized in that, It includes: An emotional value calculation module, which is used to perform the following steps: for the 1st to nth rounds of dialogue input by the user, respectively obtain the first text information containing emoticons in each round of dialogue, and input the first text information into the pre-trained word embedding model to obtain the corresponding first word vector and the first emoticon vector; Input the first word vector and the first emoticon vector of each round of dialogue into the pre-trained emotional analysis model one by one, respectively output the emotional tendency value array of the 1st to nth rounds of dialogue and calculate the primary emotional parameter, and accumulate the primary emotional parameter to obtain the emotional value of the nth round of dialogue; A task-based dialogue module, the task-based dialogue module includes a task-based dialogue completion calculation module and a user satisfaction calculation module, where: The task-based dialogue completion calculation module is used to perform the following steps: for the 1st to nth rounds of dialogue input by the user, respectively obtain the second text information containing only text, input the second text information into the word embedding model to obtain the second word vector, input the second word vector of each round of dialogue into the pre-trained natural language understanding model one by one, respectively output the overall user intention of the 1st to nth rounds of dialogue and the number of slot value information corresponding to the sub-goal, and calculate the corresponding round according to the overall user intention and the number of slot value information in each round The primary task dialogue completion parameter, and accumulate to obtain the task-based dialogue completion value of the nth round of dialogue; The user satisfaction calculation module is used to perform the following steps: calculate the emotional value index of the nth round of conversation according to the emotional values of the nth round and the (n - 1)th round of conversation, calculate the task-based conversation completion index of the nth round of conversation according to the task-based conversation completion values of the nth round and the (n - 1)th round of conversation, and calculate the user satisfaction index of the nth round of conversation according to the user satisfaction values of the nth round and the (n - 1)th round of conversation; The service upgrade index calculation module is used to perform the following steps: obtain the service upgrade main index constant and perform weighted summation in combination with the emotional value index, the task-based conversation completion index, and the user satisfaction index of the nth round of conversation to obtain the service upgrade main index; The service upgrade execution module is used to initiate customer service upgrade when the service upgrade main index reaches the set standard.

12. A computer-readable storage medium, on which a computer program is stored, characterized in that, when the program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 10.