Method and device for identifying customer emotional fluctuations

By obtaining the statement feature vectors and cumulative emotional values ​​in the customer session, using the emotional fluctuation timing model and the short text emotion model, the problem of customer mood fluctuation evaluation in the online customer service system is solved, real-time tracking and prediction of emotional state is achieved, and service quality is improved.

CN113761146BActive Publication Date: 2025-08-22BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110010501.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-05
Publication Date
2025-08-22
Estimated Expiration
2041-01-05

AI Technical Summary

Technical Problem

The prior art cannot effectively evaluate customer mood fluctuations and changes in online customer service systems, and can only identify the emotions of a single statement and cannot track emotional changes during the entire conversation.

Method used

By obtaining the statement feature vector and accumulated emotional values ​​of the customer in the conversation, the emotional fluctuation timing model is used to predict the customer's emotional state, and combining the short text emotion model and the LSTM neural network for emotion classification and accumulation, generating the emotional fluctuation sequence curve.

Benefits of technology

Real-time evaluation and prediction of emotional fluctuations during customer conversations is realized, helping customer service personnel to provide customized services and improve service quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113761146B_ABST
    Figure CN113761146B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method and device for identifying customer emotional fluctuations. The method comprises: obtaining the i-th sentence input by the first customer in this conversation; obtaining the cumulative emotion value corresponding to the i-th sentence, wherein the cumulative emotion value is the accumulation of the emotion change values ​​corresponding to each sentence in the sentence input by the customer and all previous sentences in the conversation. The emotion change value is used to measure the degree of emotional fluctuation of the customer when inputting a sentence; and based on the cumulative emotion value corresponding to the i-th sentence, evaluating the emotional state of the first customer when inputting the i-th sentence. The present disclosure also provides a method and device for training an emotion fluctuation time series model, wherein the emotion fluctuation time series model is used to predict the emotional state of the customer. The present disclosure also provides an electronic device and a computer-readable storage medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of artificial intelligence technology, and more specifically, to a method and device for identifying customer emotional fluctuations, a training method and device for an emotional fluctuation time series model, an electronic device, and a computer-readable storage medium. Background Art

[0002] With the rapid development of the internet, online customer service systems have become a vital component of websites. Customers use these systems to consult and obtain a wide range of information. Improving customer service attitude and efficiency can help increase customer inquiry conversion rates. If customer service representatives can understand customer mood swings during inquiries and provide customized service, they can effectively improve service quality. For example, if a customer is angry, customer service representatives should prioritize soothing them. If a customer is happy, they can offer appropriate product recommendations.

[0003] Existing technologies such as short text recognition in the field of natural language processing (NLP) can be applied to online customer service. For example, by training and recognizing short texts, the positive and negative emotions expressed in each short text can be identified, and the identified emotional information can be provided to customer service.

[0004] In the process of realizing the concept of the present disclosure, the inventors discovered that there are at least the following problems in the prior art: short text recognition can only present the emotions expressed by the customer when each sentence is input, but cannot evaluate the fluctuations and changes in the customer's emotions throughout the entire conversation. Summary of the Invention

[0005] In light of this, embodiments of the present disclosure provide a method and apparatus for identifying customer emotional fluctuations, capable of assessing fluctuations and changes in customer emotions during a conversation. Furthermore, embodiments of the present disclosure provide a method and apparatus for training an emotion fluctuation time series model for predicting a customer's emotional state during a conversation, as well as an electronic device and a computer-readable storage medium.

[0006] The first aspect of the embodiments of the present disclosure provides a method for identifying customer emotional fluctuations. The method includes: obtaining the i-th sentence input by the first customer in this conversation, where i is an integer greater than or equal to 1; obtaining the cumulative emotion value corresponding to the i-th sentence, where when i=1, the cumulative emotion value corresponding to the i-th sentence is the emotion change value corresponding to the first sentence input by the first customer; and when i is greater than 1, the cumulative emotion value corresponding to the i-th sentence is the accumulation of the emotion change values ​​corresponding to each sentence in the i-th sentence and all previous sentences, and the emotion change value is used to measure the degree of emotional fluctuation of the first customer when inputting a sentence; and based on the cumulative emotion value corresponding to the i-th sentence, evaluating the emotional state of the first customer when inputting the i-th sentence.

[0007] According to an embodiment of the present disclosure, the method further includes: obtaining the M sentences input by the first customer that are closest to the current moment, and obtaining a first input sentence sequence, wherein M is an integer greater than 1; extracting the feature vector corresponding to each sentence in the first input sentence sequence, and obtaining a first feature vector sequence corresponding to the first input sentence sequence; wherein the feature vector corresponding to each sentence in the first input sentence sequence includes the cumulative emotion value corresponding to the sentence; and based on the first feature vector sequence, using the emotion fluctuation time series model to predict the cumulative emotion value corresponding to the sentence to be input next by the first customer, so as to evaluate the next emotional state of the first customer.

[0008] According to an embodiment of the present disclosure, obtaining the cumulative emotion value corresponding to the i-th sentence includes: using a short text emotion model to output N emotion probabilities corresponding to the i-th sentence; wherein the N emotion probabilities are the probabilities that the emotions expressed by any sentence belong to N emotion categories respectively; wherein the short text emotion model is used to classify the emotions expressed by any sentence into the N emotion categories, wherein N is an integer greater than or equal to 2; obtaining the cumulative emotion value corresponding to the i-1th sentence input by the first customer in this session; wherein, when i is equal to 1, the cumulative emotion value corresponding to the i-1th sentence is set to a first initial value; and based on the cumulative emotion value corresponding to the i-1th sentence and the N emotion probabilities corresponding to the i-th sentence, obtaining the cumulative emotion value corresponding to the i-1th sentence.

[0009] According to an embodiment of the present disclosure, the method also includes: setting the cumulative emotion value corresponding to the i-th sentence equal to the cumulative emotion value corresponding to the i-1-th sentence, and accumulating the emotion change value corresponding to the i-th sentence; the emotion change value corresponding to any sentence is the weighted sum of the N emotion probabilities corresponding to the sentence; wherein the positive or negative weight of each emotion probability is determined according to the positive or negative effect of the emotion type corresponding to the emotion probability on promoting the conversation, and the absolute value of the weight of each emotion probability is determined according to the degree of influence of the emotion type corresponding to the emotion probability on promoting the conversation.

[0010] According to an embodiment of the present disclosure, the emotion fluctuation time series model is trained by the following operations: obtaining at least one second conversation sample, wherein the number of sentences input by the second customer in each second conversation sample is greater than M; extracting at least one second input sentence sequence consisting of M sentences continuously input by the second customer from the second conversation sample; extracting the feature vector corresponding to each sentence in the second input sentence sequence to obtain a second feature vector sequence corresponding to the second input sentence sequence, wherein the second feature vector sequence is used as input sample data of the emotion fluctuation time series model; marking the cumulative emotion value corresponding to the sentence input by the second customer after the second input sentence sequence in the second conversation sample to obtain output sample data of the emotion fluctuation time series model; and training the emotion fluctuation time series model with the input sample data and the output sample data.

[0011] According to an embodiment of the present disclosure, the feature vector corresponding to any sentence also includes the N emotion probabilities corresponding to the sentence.

[0012] According to an embodiment of the present disclosure, the method further includes: obtaining the cumulative emotion value corresponding to each statement input by the first customer in the current session up to the present, and arranging the statements input by the first customer in chronological order to obtain an emotion value sequence; based on the emotion value sequence, obtaining an emotion fluctuation sequence curve of the first customer in the current session up to the present; and displaying the emotion fluctuation sequence curve.

[0013] A second aspect of the disclosed embodiments provides a method for training an emotion fluctuation time series model, wherein the emotion fluctuation time series model is used to predict a customer's emotional state during a conversation. The training method includes: obtaining at least one second conversation sample, wherein the number of sentences input by the second customer in each second conversation sample is greater than M, where M is an integer greater than 1; extracting at least one second input sentence sequence consisting of M sentences continuously input by the second customer from the second conversation sample; extracting a feature vector corresponding to each sentence in the second input sentence sequence to obtain a second feature vector sequence corresponding to the second input sentence sequence, wherein the second feature vector sequence is used as input sample data of the emotion fluctuation time series model; wherein the feature vector corresponding to any sentence includes a cumulative emotion value corresponding to the sentence; the cumulative emotion value corresponding to any sentence is the accumulation of emotion change values ​​corresponding to the sentence input by the customer and all previous sentences in the conversation, used to evaluate the customer's emotional state when inputting the sentence; the emotion change value is used to measure the degree of emotional fluctuation of the customer when inputting a sentence; obtaining the cumulative emotion value corresponding to the sentence input by the second customer after the second input sentence sequence in the second conversation sample to obtain output sample data of the emotion fluctuation time series model; and training the emotion fluctuation time series model using the input sample data and the output sample data.

[0014] According to an embodiment of the present disclosure, the extracting of the feature vector corresponding to each sentence in the second input sentence sequence further includes: obtaining the cumulative emotion value corresponding to each sentence, including: for the r-th sentence in the second input sentence sequence, using the short text emotion model to output N emotion probabilities corresponding to the r-th sentence; wherein the N emotion probabilities are the probabilities that the emotion expressed by any sentence belongs to N emotion categories respectively; wherein the short text emotion model is used to classify the emotion expressed by any sentence into the N emotion categories, wherein N is an integer greater than or equal to 2; obtaining the cumulative emotion value corresponding to the r-1-th sentence in the second input sentence sequence, wherein when r=1, the cumulative emotion value corresponding to the r-1-th sentence is set to a second initial value; and obtaining the cumulative emotion value corresponding to the r-1-th sentence based on the cumulative emotion value corresponding to the r-1-th sentence and the N emotion probabilities corresponding to the r-th sentence. wherein r is an integer greater than or equal to 1.

[0015] According to an embodiment of the present disclosure, the feature vector corresponding to any sentence also includes the N emotion probabilities corresponding to the sentence.

[0016] The third aspect of the embodiments of the present disclosure provides a device for identifying customer emotional fluctuations. The device includes a first acquisition module, a second acquisition module, and an evaluation module. The first acquisition module is used to obtain the i-th sentence input by the first customer in this conversation, wherein i is an integer greater than or equal to 1. The second acquisition module is used to obtain the cumulative emotion value corresponding to the i-th sentence, wherein, when i=1, the cumulative emotion value corresponding to the i-th sentence is the emotion change value corresponding to the first sentence input by the first customer; and, when i is greater than 1, the cumulative emotion value corresponding to the i-th sentence is the accumulation of the emotion change values ​​corresponding to each sentence in the i-th sentence and all previous sentences, and the emotion change value is used to measure the degree of emotional fluctuation of the first customer when inputting a sentence. The evaluation module is used to evaluate the emotional state of the first customer when inputting the i-th sentence based on the cumulative emotion value corresponding to the i-th sentence.

[0017] According to an embodiment of the present disclosure, the device also includes an extraction module and a prediction module. The first acquisition module is also used to obtain the M sentences input by the first customer that are closest to the current moment, and obtain a first input sentence sequence, where M is an integer greater than 1. The extraction module is used to extract the feature vector corresponding to each sentence in the first input sentence sequence, and obtain a first feature vector sequence corresponding to the first input sentence sequence; wherein the feature vector corresponding to any sentence includes the cumulative emotion value corresponding to the sentence. The prediction module is used to predict the cumulative emotion value corresponding to the sentence to be input next by the first customer based on the first feature vector sequence and using the emotion fluctuation time series model to evaluate the next emotional state of the first customer.

[0018] According to an embodiment of the present disclosure, the device further includes a fluctuation curve acquisition module and a display module. The second acquisition module is further configured to acquire the cumulative emotion value corresponding to each sentence input by the first customer in the current session up to the current point, and to arrange the sentences input by the first customer in chronological order to obtain an emotion value sequence. The fluctuation curve acquisition module is configured to acquire an emotion fluctuation sequence curve of the first customer in the current session up to the current point based on the emotion value sequence. The display module is configured to display the emotion fluctuation sequence curve.

[0019] A fourth aspect of the embodiments of the present disclosure provides a training device for an emotion fluctuation time series model. The emotion fluctuation time series model is used to predict a customer's emotional state during a conversation. The training device includes a third acquisition module, a first extraction module, a second extraction module, a fourth acquisition module, and a training module. The third acquisition module is used to acquire at least one second conversation sample, wherein the number of sentences input by the second customer in each second conversation sample is greater than M. The first extraction module is used to extract at least one second input sentence sequence consisting of M sentences input consecutively by the second customer from the second conversation sample. The second extraction module is used to extract the feature vector corresponding to each sentence in the second input sentence sequence to obtain a second feature vector sequence corresponding to the second input sentence sequence, wherein the second feature vector sequence serves as input sample data for the emotion fluctuation time series model. The feature vector corresponding to any sentence includes a cumulative emotion value corresponding to the sentence. The cumulative emotion value corresponding to any sentence is the accumulation of emotion change values ​​corresponding to the sentence and all previous sentences input by the customer in the conversation, used to assess the customer's emotional state at the time the sentence was input. The emotion change value is used to measure the degree of emotional fluctuation of the customer when inputting a sentence. The fourth acquisition module is configured to acquire the cumulative sentiment value corresponding to the statement input by the second customer after the second input statement sequence in the second conversation sample, thereby obtaining output sample data of the sentiment fluctuation time series model. The training module is configured to train the sentiment fluctuation time series model using the input sample data and the output sample data.

[0020] In a fifth aspect of the embodiments of the present disclosure, an electronic device is provided. The electronic device includes one or more processors and a storage device. The storage device is configured to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors execute the method described in the first or second aspect above.

[0021] In a sixth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, on which executable instructions are stored. When the instructions are executed by a processor, the processor implements the method described in the first or second aspect above.

[0022] A seventh aspect of the embodiments of the present disclosure provides a computer program, which includes computer-executable instructions, and the instructions are used to implement the method described in the first aspect or the second aspect above when executed.

[0023] One or more of the above-mentioned embodiments have the following advantages or beneficial effects: the cumulative emotion value corresponding to each statement is the accumulation of the emotion change values ​​corresponding to the statement and each previous statement input by the customer during a conversation, so that the cumulative emotion value corresponding to each statement can be used to evaluate the customer's emotion changes from the beginning of the conversation to the present. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The above and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:

[0025] Figure 1 Schematically illustrates an application scenario of the method and device for identifying customer emotional fluctuations according to an embodiment of the present disclosure;

[0026] Figure 2 Schematically shows a flow chart of a method for identifying customer emotional fluctuations according to an embodiment of the present disclosure;

[0027] Figure 3 A flowchart of obtaining a cumulative emotion value corresponding to a sentence in a method for identifying customer emotion fluctuations according to an embodiment of the present disclosure is schematically shown;

[0028] Figure 4 Schematically shows a flow chart of a method for identifying customer emotional fluctuations according to another embodiment of the present disclosure;

[0029] Figure 5 A schematic diagram schematically illustrates an emotion fluctuation sequence curve according to an embodiment of the present disclosure;

[0030] Figure 6 Schematically shows a flow chart of a method for identifying customer emotional fluctuations according to yet another embodiment of the present disclosure;

[0031] Figure 7 A flowchart schematically illustrates a method for training an emotion fluctuation time series model according to an embodiment of the present disclosure;

[0032] Figure 8 A block diagram of an apparatus for identifying customer emotional fluctuations according to an embodiment of the present disclosure is schematically shown;

[0033] Figure 9 A block diagram schematically illustrates a training device for a sensory fluctuation time series model according to an embodiment of the present disclosure; and

[0034] Figure 10 The block diagram schematically shows a computer system suitable for implementing the methods according to various embodiments of the present disclosure. DETAILED DESCRIPTION

[0035] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present disclosure. In the detailed description below, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0036] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise," "include," etc. used herein indicate the presence of the features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0037] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.

[0038] When expressions such as “at least one of A, B, and C, etc.” are used, they should generally be interpreted in accordance with the meaning commonly understood by those skilled in the art (e.g., “a system having at least one of A, B, and C” should include but is not limited to systems having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, and C, etc.). When expressions such as “at least one of A, B, or C, etc.” are used, they should generally be interpreted in accordance with the meaning commonly understood by those skilled in the art (e.g., “a system having at least one of A, B, or C” should include but is not limited to systems having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, and C, etc.).

[0039] Embodiments of the present disclosure provide a method and apparatus for identifying customer emotional fluctuations. The method comprises: obtaining the i-th sentence entered by a first customer in a current conversation, where i is an integer greater than or equal to 1; obtaining a cumulative emotion value corresponding to the i-th sentence, where the cumulative emotion value is the accumulation of emotion change values ​​corresponding to each sentence entered by the customer and all preceding sentences in the conversation; and, based on the cumulative emotion value corresponding to the i-th sentence, evaluating the emotional state of the first customer at the time of entering the i-th sentence.

[0040] According to some embodiments of the present disclosure, a short text emotion model can be used to obtain the emotion change value corresponding to each sentence. For example, the short text emotion model can be used to output the probability that the emotion expressed by each sentence input by the customer can be classified into each of N emotion categories, thereby obtaining N emotion probabilities, and then weighting the N emotion probabilities to measure the emotion change value corresponding to each sentence. In this way, the cumulative emotion value corresponding to the i-th sentence is the accumulation of the emotion change value corresponding to each of the i sentences input by the first customer. Therefore, based on the cumulative emotion value corresponding to the i-th sentence, the emotion change of the first customer can be evaluated.

[0041] Figure 1 The following schematically illustrates an application scenario 100 of the method and apparatus for identifying customer emotional fluctuations according to an embodiment of the present disclosure. Figure 1 The examples shown are merely examples of application scenarios in which the embodiments of the present disclosure can be applied, to help those skilled in the art understand the technical content of the present disclosure, but do not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.

[0042] like Figure 1 As shown, the application scenario 100 according to this embodiment may include a terminal device 101, networks 102 and 104, a server 103, and a customer service terminal 105. Network 102 is used to provide a communication link between the terminal device 101 and the server 103, and network 104 is used to provide a communication link between the customer service terminal 105 and the server 103. Networks 102 and 104 may include various connection types, such as wired or wireless communication links or fiber optic cables. Networks 102 and 104 may be the same network, different networks, or partially overlapping networks, which is not limited in this disclosure.

[0043] Customers can use terminal devices 101 to interact with server 103 via network 102 to obtain customer service. Customer service personnel can use customer service terminals 105 to interact with server 103 via network 104 to provide customer service.

[0044] Server 103 can execute the method of the disclosed embodiment to obtain the cumulative emotion value of the customer when entering sentences using terminal device 101, and based on this cumulative emotion value, evaluate the customer's emotional state when entering each sentence during the conversation. In one embodiment, the customer's emotional state and its changes throughout the conversation can be displayed to customer service personnel via customer service terminal 105, thereby helping customer service personnel understand the customer's emotional fluctuations and provide customized services, effectively improving service quality.

[0045] It should be understood that Figure 1The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.

[0046] Figure 2 The flowchart of the method for identifying customer emotional fluctuations according to an embodiment of the present disclosure is schematically shown.

[0047] like Figure 2 As shown, the method may include operations S210 to S230.

[0048] In operation S210, the i-th sentence entered by the first customer in the current session is obtained, where i is an integer greater than or equal to 1. In one embodiment, the i-th sentence may be the sentence currently entered by the first customer, thereby enabling the present embodiment to identify the first customer's current emotional fluctuations. In another embodiment, the i-th sentence may be any sentence entered by the first customer in the current session. For example, for data analysis or background statistical processing, one or more sentences may be extracted and individually analyzed for emotional state identification.

[0049] In operation S220, a cumulative emotion value corresponding to the i-th sentence is obtained. When i = 1, the cumulative emotion value corresponding to the i-th sentence is the emotion change value corresponding to the first sentence input by the first customer; and when i is greater than 1, the cumulative emotion value corresponding to the i-th sentence is the accumulation of emotion change values ​​corresponding to the i-th sentence and all previous sentences. The emotion change value is used to measure the degree of emotional fluctuation of the first customer when inputting a sentence.

[0050] In operation S230 , the emotional state of the first customer when inputting the i-th sentence is evaluated based on the accumulated emotion value corresponding to the i-th sentence.

[0051] According to an embodiment of the present disclosure, the cumulative emotion value corresponding to each sentence is the accumulation of emotion change values ​​corresponding to the sentence and each previous sentence input by the customer during a conversation, so that the cumulative emotion value corresponding to each sentence can be used to evaluate the customer's emotion changes from the beginning of the conversation to the present.

[0052] Figure 3 The flowchart of operation S220 of obtaining the accumulated emotion value corresponding to the sentence in the method for identifying customer emotion fluctuation according to an embodiment of the present disclosure is schematically shown.

[0053] like Figure 3 As shown, according to an embodiment of the present disclosure, obtaining the cumulative sentiment value corresponding to the i-th sentence in operation S220 may include operations S301 to S303.

[0054] In operation S301, a short text sentiment model is used to output N sentiment probabilities corresponding to the i-th sentence. The N sentiment probabilities are the probabilities that the sentiment expressed in any sentence belongs to N sentiment categories. The short text sentiment model is used to classify the sentiment expressed in any sentence into the N sentiment categories, where N is an integer greater than or equal to 2. By summarizing these N sentiment probabilities, the degree of emotional fluctuation of the customer when entering a sentence can be obtained.

[0055] In one embodiment, emotions may be classified into five emotion categories (N=5) as shown in Table 1 below.

[0056] In one embodiment, the short text sentiment model can be trained and constructed using an LSTM neural network model. Specifically, during the training and construction process, a large number of sentences input by customers in historical conversations in the online customer service system can be first obtained to form a historical conversation corpus, and the historical conversation corpus can be cleaned, such as removing emoticons, pure numbers or characters, shorter or longer texts, etc. The historical conversation corpus is then manually annotated, for example, the sentiment category of each conversation sentence in the historical conversation corpus is listed according to the sentiment category table in Table 1. The word2vec algorithm can then be used to convert the Chinese short texts in the historical conversation corpus into word vectors. Then, the word vector of a short text is used as the input of the LSTM neural network model, and the output is the probability value corresponding to the five categories to which the short text belongs.

[0057] Table 1:

[0058]

[0059] In operation S302, the accumulated sentiment value corresponding to the (i-1)th sentence input by the first customer in this conversation is obtained. When i=1, the accumulated sentiment value corresponding to the (i-1)th sentence may be set to a first initial value (eg, 0).

[0060] In operation S303 , the accumulated emotion value corresponding to the i-th sentence is obtained based on the accumulated emotion value corresponding to the (i-1)th sentence and the N emotion probabilities corresponding to the i-th sentence.

[0061] In one embodiment, a conversation in an online customer service system consists of several short texts, which accumulate over time and with the number of customer inputs. To assess the customer's emotional fluctuations during the conversation, a short text sentiment model can be used to predict each customer statement, generating N emotion probabilities. Each sentence is then weighted against these N emotion probabilities to obtain a corresponding emotion change value. At the current conversation point, the emotion change values ​​corresponding to the current customer statement and all previous statements are accumulated to obtain the cumulative emotion value for the current customer statement.

[0062] Specifically, during the calculation, a calculation model for the cumulative emotion value can be pre-set. In one embodiment, the cumulative emotion value corresponding to a sentence is equal to the cumulative emotion value corresponding to the previous sentence of the sentence plus the emotion change value corresponding to the sentence. Among them, for the first sentence, the cumulative emotion value corresponding to the previous sentence of the sentence is set to the first initial value. And, the emotion change value is the weighted sum of N emotion probabilities corresponding to a sentence. Among them, the positive or negative weight of each emotion probability is determined according to the positive or negative effect of the emotion type corresponding to the emotion probability on the advancement of the conversation, and the absolute value of the weight of each emotion probability is determined according to the degree of influence of the emotion type corresponding to the emotion probability on the advancement of the conversation.

[0063] For example, the short text sentiment model is used to predict and output the five sentiment probability values ​​corresponding to each sentence input by the first customer in this conversation. Assuming that the cumulative sentiment value corresponding to the first customer before entering any sentence at the beginning of the conversation is the first initial value, for example, P0 = 0, for the i-th sentence in the conversation, the cumulative sentiment value P corresponding to the i-th sentence is calculated according to the following formula (1): i :

[0064] P i =P i-1 +P other *other ratio +P happy *happy ratio -P anxiety *anxiety ratio -P anger *anger ratio -P lost *lost_ratio (1)

[0065] Among them, P other 、P happy 、P anxiety 、P anger , and P lost To use the short text sentiment model to predict the probability of each of the five sentiment categories (i.e., five sentiment probabilities) entered by the first customer in this conversation, enter the i-th sentence in Table 1; other ratio 、happy ratio 、anxiety ratio 、anger ratio , and lost_ratio are the weights of each category in the weighted emotional fluctuation. In formula (1), happiness and indifference are considered positive emotions, and their weighted values ​​should be accumulated, while anxiety, anger, and disappointment are considered negative emotions, and their weighted values ​​should be accumulated.

[0066] By using formula (1), all sentences input by the first customer in this conversation up to the present can be traversed to obtain the accumulated sentiment values ​​corresponding to all sentences.

[0067] In one embodiment, the absolute value of the weight of each emotion probability is determined based on the degree of influence of the emotion type corresponding to each emotion probability on the advancement of the conversation. ratio =0.1, happy ratio =1, anxiety ratio =0.5, anger ratio =1, and lost ratio =0.5.

[0068] Figure 4 The flowchart of the method for identifying customer emotion fluctuations according to another embodiment of the present disclosure is schematically shown.

[0069] like Figure 4 As shown, according to an embodiment of the present disclosure, the method for identifying customer emotional fluctuations may further include operations S410 to S430.

[0070] In operation S410 , the accumulated emotion value corresponding to each sentence input by the first customer in the current conversation is obtained, and the sentences input by the first customer are arranged in a sequential order to obtain an emotion value sequence.

[0071] In operation S420 , based on the emotion value sequence, an emotion fluctuation sequence curve of the first customer in this session up to the current time is obtained.

[0072] In operation S430 , an emotion fluctuation sequence curve is displayed.

[0073] Figure 5 The figure schematically shows a mood fluctuation sequence curve according to an embodiment of the present disclosure.

[0074] Combine Figure 4 and Figure 5 , based on the emotion value sequence, an emotion fluctuation curve can be drawn. Draw a scatter point for each emotional accumulation value, connect all the scatter points and perform smoothing, then a emotion fluctuation sequence curve can be generated, such as Figure 5 The emotion fluctuation sequence curve can be displayed on the display interface of the customer service terminal 105 to remind the customer service staff of the customer's emotion fluctuation during the conversation.

[0075] Figure 6 The flowchart of the method for identifying customer emotion fluctuations according to yet another embodiment of the present disclosure is schematically shown.

[0076] like Figure 6As shown, according to an embodiment of the present disclosure, the method for identifying customer emotional fluctuations may further include operations S610 to S630.

[0077] In operation S610 , M sentences input by the first customer closest to the current moment are obtained to obtain a first input sentence sequence, where M is an integer greater than 1.

[0078] In operation S620, a feature vector corresponding to each sentence in the first input sentence sequence is extracted to obtain a first feature vector sequence corresponding to the first input sentence sequence; wherein the feature vector corresponding to a sentence includes a cumulative sentiment value corresponding to the sentence.

[0079] In another embodiment, the feature vector corresponding to each sentence extracted in operation S620 may further include N emotion probabilities corresponding to the sentence.

[0080] In operation S630 , based on the first feature vector sequence, a cumulative emotion value corresponding to a sentence to be input next by the first customer is predicted using an emotion fluctuation time series model to evaluate the next emotional state of the first customer.

[0081] For example, the first feature vector sequence constitutes the input data of the emotional fluctuation time series model. According to one embodiment of the present disclosure, for example, the i-th sentence is the current input sentence of the first customer, and the first feature vector sequence can be exemplified as the following formula (2):

[0082]

[0083] The meanings of the parameters are the same as those in formula (1).

[0084] Then the input data shown in formula (2) is input into the emotion fluctuation time series model, and the emotion fluctuation time series model outputs the cumulative emotion value P of the first customer's next sentence (i.e., the i+1th sentence) i+1 .

[0085] The disclosed embodiments can predict the first customer's upcoming emotional fluctuations based on the first customer's most recent M sentences. Specifically, based on the feature vectors corresponding to the first customer's M consecutive sentences in the current session, the cumulative emotional value of the first customer's next sentence can be predicted, thereby achieving the purpose of foreseeing the first customer's emotional trends in advance. This is essentially predicting the sequence of emotional fluctuations that changes over time, which can be achieved through machine learning, for example, by training an emotional fluctuation time series model. This emotional fluctuation time series model can be implemented, for example, using an LSTM neural network.

[0086] According to one embodiment of the present disclosure, predicting future mood swings is called point-by-point prediction. Figure 5In the emotion fluctuation sequence graph shown, the emotion fluctuation time series model first predicts the cumulative emotion value corresponding to a single point, plotting its position in the graph. Then, the sliding window is moved, and the sequence data consisting of the feature vectors corresponding to M points is used to predict the cumulative emotion value of the next point. Based on the emotion fluctuation time series model, the input features of the emotion fluctuation time series model are constructed based on the first 10 sentences of the conversation. The cumulative emotion value of the 11th sentence is output, and the cumulative emotion corresponding to sentences 2 to 11 is used to predict the cumulative emotion corresponding to sentence 12. This process is repeated repeatedly to create a complete emotion fluctuation curve, which contains historical customer emotions throughout the entire conversation and future customer emotion trends.

[0087] Figure 7 The flowchart of the training method of the emotion fluctuation time series model according to the embodiment of the present disclosure is schematically shown.

[0088] like Figure 7 As shown, the training method of the emotion fluctuation time series model may include operations S710 to S750. The emotion fluctuation time series model is used to predict the emotional state of the customer during the conversation.

[0089] In operation S710 , at least one second conversation sample is obtained, wherein the number of sentences input by the second customer in each second conversation sample is greater than M, where M is an integer greater than 1.

[0090] In operation S720 , at least one second input sentence sequence consisting of M sentences continuously input by the second customer is extracted from the second conversation sample.

[0091] In operation S730, the feature vector corresponding to each sentence in the second input sentence sequence is extracted to obtain a second feature vector sequence corresponding to the second input sentence sequence. The second feature vector sequence serves as input sample data for the emotional fluctuation time series model. The feature vector corresponding to any sentence includes a cumulative emotion value corresponding to the sentence. The cumulative emotion value corresponding to any sentence is the accumulation of emotion change values ​​corresponding to the sentence and all previous sentences entered by the customer during the conversation, and is used to assess the customer's emotional state at the time the sentence was entered.

[0092] In one embodiment, extracting the feature vector corresponding to each sentence in the second input sentence sequence includes obtaining the cumulative sentiment value corresponding to each sentence. Figure 3 The described method uses a short text sentiment model to obtain the cumulative sentiment value corresponding to a sentence.

[0093] For example, for the rth sentence in the second input sentence sequence (where r is an integer greater than or equal to 1), the short text sentiment model is first used to output N emotion probabilities corresponding to the rth sentence. The N emotion probabilities are the probabilities that the emotion expressed by a sentence is classified into N emotion categories; the short text sentiment model is a model that classifies the emotion expressed by a sentence into N emotion categories, where N is an integer greater than or equal to 2.

[0094] Then, the cumulative emotion value corresponding to the r-1th sentence in the second input sentence sequence is obtained. Among them, when r=1, the cumulative emotion value corresponding to the r-1th sentence is set to the second initial value. The second initial value can be zero or any value, or it can also be the cumulative emotion value corresponding to the input sentence (if any) of the second customer before the second input sentence sequence. Since the essence of the emotion fluctuation time series model is to predict the emotion fluctuation sequence that changes over time, the change or relative meaning of the emotion cumulative value is more valuable, and the absolute value has little effect on measuring the size of emotion fluctuations. Moreover, in the actual customer service system, each customer must be in a certain emotional state at the beginning of communicating with customer service, and this emotional state cannot be known in advance. Therefore, the size of the second initial value will not greatly affect the fluctuation trend of the emotion fluctuation sequence predicted by the emotion fluctuation time series model.

[0095] Finally, based on the cumulative sentiment value corresponding to the r-1th sentence and the N emotion probabilities corresponding to the rth sentence, the cumulative sentiment value corresponding to the rth sentence is obtained.

[0096] In one embodiment, the feature vector corresponding to each sentence includes not only the accumulated sentiment value corresponding to each sentence, but also N emotion probabilities corresponding to each sentence.

[0097] In operation S740, the accumulated sentiment value corresponding to the sentence input by the second customer after the second input sentence sequence in the second conversation sample is obtained to obtain output sample data of the sentiment fluctuation time series model; and

[0098] In operation S750 , the sentiment fluctuation time series model is trained using the input sample data and the output sample data.

[0099] In one embodiment, M=10, and input sample data can be obtained based on any 10 consecutive sentences input by a customer in a conversation. For example, the 10 consecutive sentences can be used as a sample to construct training features. Here, features are extracted for each sentence to obtain a feature vector corresponding to the sentence. In one embodiment, the feature vector extracted from the sentence can include the following 6 parameters: (1) the cumulative emotion value corresponding to the sentence; (2) the probability value of the customer's emotion belonging to the "anxiety / anxiety" category when the customer inputs the sentence; (3) the probability value of the customer's emotion belonging to the "happy / grateful" category when the customer inputs the sentence; (4) the probability value of the customer's emotion belonging to the "angry / angry" category when the customer inputs the sentence; (5) the probability value of the customer's emotion belonging to the "disappointment / loss" category when the customer inputs the sentence; (6) the probability value of the customer's emotion belonging to the "indifferent" category when the customer inputs the sentence. Parameters (2) to (6) can be predicted by the short text emotion model. Thus, a two-dimensional matrix of [10, 6] can be constructed for each sample. If S samples are collected, the input sample data can form a three-dimensional matrix of [S, 10, 6].

[0100] Figure 8 The block diagram of the apparatus 800 for identifying customer emotion fluctuations according to an embodiment of the present disclosure is schematically shown.

[0101] like Figure 8 As shown, the device 800 for identifying customer emotional fluctuations may include a first acquisition module 810, a second acquisition module 820, and an evaluation module 830. The device 800 may be used to implement reference Figures 2 to 6 The described method for identifying customer mood swings.

[0102] The first acquisition module 810 is used to acquire the i-th sentence input by the first customer in this conversation, where i is an integer greater than or equal to 1.

[0103] The second acquisition module 820 is used to obtain the cumulative emotion value corresponding to the i-th sentence, wherein, when i=1, the cumulative emotion value corresponding to the i-th sentence is the emotion change value corresponding to the first sentence input by the first customer; and when i is greater than 1, the cumulative emotion value corresponding to the i-th sentence is the accumulation of the emotion change values ​​corresponding to each sentence in the i-th sentence and all previous sentences, and the emotion change value is used to measure the degree of emotion fluctuation of the first customer when inputting a sentence.

[0104] The evaluation module 830 is configured to evaluate the emotional state of the first customer when inputting the i-th sentence based on the accumulated emotion value corresponding to the i-th sentence.

[0105] According to an embodiment of the present disclosure, the apparatus 800 further includes an extraction module and a prediction module.

[0106] The first acquisition module 810 is further configured to obtain the M sentences input by the first customer closest to the current moment, thereby obtaining a first input sentence sequence, where M is an integer greater than 1. The extraction module is configured to extract the feature vector corresponding to each sentence in the first input sentence sequence, thereby obtaining a first feature vector sequence corresponding to the first input sentence sequence. The feature vector corresponding to any sentence includes the cumulative sentiment value corresponding to the sentence. The prediction module is configured to use the sentiment fluctuation time series model to predict the cumulative sentiment value corresponding to the next sentence input by the first customer based on the first feature vector sequence, thereby assessing the first customer's subsequent emotional state.

[0107] According to an embodiment of the present disclosure, the apparatus 800 further includes a fluctuation curve obtaining module and a display module.

[0108] The second acquisition module 820 is further configured to obtain the cumulative emotion value corresponding to each sentence input by the first customer in the current session, and to arrange the sentences input by the first customer in chronological order to obtain an emotion value sequence. The fluctuation curve acquisition module is configured to obtain an emotion fluctuation sequence curve of the first customer in the current session based on the emotion value sequence. The display module is configured to display the emotion fluctuation sequence curve.

[0109] Figure 9 A block diagram of a training device 900 for a sensory fluctuation time series model according to an embodiment of the present disclosure is schematically shown.

[0110] like Figure 9 As shown, the training device 900 for the emotion fluctuation time series model may include a third acquisition module 910, a first extraction module 920, a second extraction module 930, a fourth acquisition module 940, and a training module 950. The emotion fluctuation time series model is used to predict the customer's emotional state during the conversation. The training device 900 can be used to implement reference Figure 7 The training method described.

[0111] The third acquisition module 910 is configured to acquire at least one second conversation sample, wherein the number of sentences input by the second customer in each second conversation sample is greater than M.

[0112] The first extraction module 920 is configured to extract at least one second input sentence sequence consisting of M sentences continuously input by the second customer from the second conversation sample.

[0113] The second extraction module 930 is used to extract the feature vector corresponding to each sentence in the second input sentence sequence to obtain a second feature vector sequence corresponding to the second input sentence sequence, wherein the feature vector includes a cumulative emotion value, and the cumulative emotion value is the accumulation of the emotion change value corresponding to each sentence in the sentence input by a customer in the conversation and all previous sentences.

[0114] The fourth acquisition module 940 is used to obtain the accumulated emotion value corresponding to the sentence input by the second customer after the second input sentence sequence in the second conversation sample, and obtain the output sample data of the emotion fluctuation time series model.

[0115] The training module 950 is used to train the emotion fluctuation time series model using the input sample data and the output sample data.

[0116] According to the modules, submodules, units, and subunits of the embodiments of the present invention, any multiple or at least part of the functions of any multiple thereof can be implemented in one module. According to the modules, submodules, units, and subunits of the embodiments of the present invention, any one or more thereof can be split into multiple modules for implementation. According to the modules, submodules, units, and subunits of the embodiments of the present invention, any one or more thereof can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware of any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation modes of software, hardware, and firmware or in an appropriate combination of any of them. Alternatively, according to the modules, submodules, units, and subunits of the embodiments of the present invention, one or more thereof can be at least partially implemented as a computer program module, which can perform the corresponding function when the computer program module is run.

[0117] For example, any number of the first acquisition module 810, the second acquisition module 820, the evaluation module 830, the third acquisition module 910, the first extraction module 920, the second extraction module 930, the fourth acquisition module 940, the training module 950, the extraction module, the prediction module, the fluctuation curve acquisition module, and the presentation module may be combined into a single module, or any one of these modules may be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of other modules and implemented in a single module. According to an embodiment of the present disclosure, at least one of the first acquisition module 810, the second acquisition module 820, the evaluation module 830, the third acquisition module 910, the first extraction module 920, the second extraction module 930, the fourth acquisition module 940, the training module 950, the extraction module, the prediction module, the fluctuation curve acquisition module, and the display module can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or can be implemented in any one of the three implementation methods of software, hardware and firmware, or in an appropriate combination of any of them. Alternatively, at least one of the first acquisition module 810, the second acquisition module 820, the evaluation module 830, the third acquisition module 910, the first extraction module 920, the second extraction module 930, the fourth acquisition module 940, the training module 950, the extraction module, the prediction module, the fluctuation curve acquisition module, and the presentation module can be at least partially implemented as a computer program module, which can perform the corresponding function when it is run.

[0118] Figure 10 The block diagram schematically shows a computer system 1000 suitable for implementing the methods according to various embodiments of the present disclosure. Figure 10 The computer system 1000 shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.

[0119] like Figure 10As shown, the computer system 1000 according to an embodiment of the present disclosure includes a processor 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage part 1008 into a random access memory (RAM) 1003. The processor 1001 may include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (such as an application-specific integrated circuit (ASIC)), etc. The processor 1001 may also include an onboard memory for caching purposes. The processor 1001 may include a single processing unit or multiple processing units for executing different actions of the method flow according to an embodiment of the present disclosure.

[0120] Various programs and data required for the operation of the computer system 1000 are stored in the RAM 1003. The processor 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. The processor 1001 executes the various operations of the method flow according to the embodiment of the present disclosure by executing the programs in the ROM 1002 and / or the RAM 1003. It should be noted that the programs may also be stored in one or more memories other than the ROM 1002 and the RAM 1003. The processor 1001 may also execute the various operations of the method flow according to the embodiment of the present disclosure by executing the programs stored in the one or more memories.

[0121] According to an embodiment of the present disclosure, the computer system 1000 may further include an input / output (I / O) interface 1005, which is also connected to the bus 1004. The computer system 1000 may also include one or more of the following components connected to the I / O interface 1005: an input section 1006 including a keyboard, a mouse, etc.; an output section 1007 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and speakers; a storage section 1008 including a hard disk; and a communication section 1009 including a network interface card such as a LAN card or a modem. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the I / O interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed in the drive 1010 as needed, so that computer programs read therefrom can be installed into the storage section 1008 as needed.

[0122] According to an embodiment of the present disclosure, the method flow according to an embodiment of the present disclosure can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1009, and / or installed from the removable medium 1011. When the computer program is executed by the processor 1001, the above-mentioned functions defined in the system of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the system, equipment, device, module, unit, etc. described above can be implemented by a computer program module.

[0123] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments, or may exist independently and not be incorporated into the device / apparatus / system. The computer-readable storage medium carries one or more programs, and when executed, implements the method according to the embodiments of the present disclosure.

[0124] According to an embodiment of the present disclosure, a computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM 1002 and / or RAM 1003 described above and / or one or more memories other than ROM 1002 and RAM 1003.

[0125] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0126] Those skilled in the art will appreciate that various combinations and / or combinations of features described in the various embodiments and / or claims of this disclosure may be made, even if such combinations or combinations are not explicitly described in this disclosure. In particular, various combinations and / or combinations of features described in the various embodiments and / or claims of this disclosure may be made, without departing from the spirit and teachings of this disclosure. All such combinations and / or combinations fall within the scope of this disclosure.

[0127] The embodiments of the present disclosure are described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although each embodiment has been described separately above, this does not mean that the measures in each embodiment cannot be used in combination to advantage. The scope of the present disclosure is defined by the appended claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make various substitutions and modifications, which should all fall within the scope of the present disclosure.

Claims

1. A method for identifying customer emotional fluctuations, applied to an online customer service system, wherein: The method comprises: Get the i statements entered by the first customer in this session, where i is an integer greater than or equal to 1; Get the cumulative sentiment value corresponding to the i-th sentence; evaluating the emotional state of the first customer when inputting the i-th sentence based on the accumulated emotion value corresponding to the i-th sentence; The step of obtaining the cumulative sentiment value corresponding to the i-th sentence includes: Outputting N emotion probabilities corresponding to each sentence using a short text emotion model; wherein the N emotion probabilities are probabilities that the emotion expressed by any sentence belongs to N emotion categories respectively; wherein the short text emotion model is used to classify the emotion expressed by any sentence into the N emotion categories, wherein N is an integer greater than or equal to 2; When i=1, the cumulative emotion value corresponding to the i-th sentence is the emotion change value corresponding to the first sentence input by the first customer; and when i is greater than 1, the cumulative emotion value corresponding to the i-th sentence is the accumulation of emotion change values ​​corresponding to each sentence in the i-th sentence and all sentences before it, and the emotion change value is used to measure the degree of emotion fluctuation of the first customer when inputting a sentence; The emotion change value corresponding to any sentence is equal to the weighted sum of the N emotion probabilities corresponding to the sentence, wherein the positive or negative weight of each emotion probability in the N emotion probabilities is determined according to the positive or negative effect of the emotion category corresponding to the emotion probability on promoting the conversation, and the absolute value of the weight of each emotion probability is determined according to the degree of influence of the emotion category corresponding to the emotion probability on promoting the conversation; Among them, the N emotion categories include emotion categories that have a positive effect on promoting conversations and emotion categories that have a negative effect on promoting conversations; The emotion categories that have a positive effect on promoting the conversation include at least one of the following: an emotion category representing a dull mood or an emotion category representing a happy mood; wherein the absolute value of the weight of the emotion probability representing the dull mood category is smaller than the absolute value of the weight of the emotion probability representing the happy mood category; Among them, the emotion categories that have a negative effect on promoting the conversation include at least one of the following: an emotion category representing anxiety, an emotion category representing anger, or an emotion category representing loss; wherein the absolute value of the weight of the emotion probability of the emotion category representing anger is greater than either the absolute value of the weight of the emotion probability of the emotion category representing anxiety or the absolute value of the weight of the emotion probability of the emotion category representing loss.

2. The method according to claim 1, wherein Obtaining the M sentences input by the first customer that are closest to the current moment to obtain a first input sentence sequence, where M is an integer greater than 1; Extracting a feature vector corresponding to each sentence in the first input sentence sequence to obtain a first feature vector sequence corresponding to the first input sentence sequence; wherein the feature vector corresponding to each sentence in the first input sentence sequence includes the accumulated sentiment value corresponding to the sentence; and Based on the first feature vector sequence, using an emotional fluctuation time series model, predicting the cumulative emotional value corresponding to a next sentence to be input by the first customer, so as to evaluate the next emotional state of the first customer; The emotional fluctuation time series model is trained by the following operations: Obtaining at least one second conversation sample, wherein the number of sentences input by the second customer in each second conversation sample is greater than M; extracting at least one second input sentence sequence consisting of M sentences continuously input by the second customer from the second conversation sample; Extracting a feature vector corresponding to each sentence in the second input sentence sequence to obtain a second feature vector sequence corresponding to the second input sentence sequence, wherein the second feature vector sequence is used as input sample data of the emotion fluctuation time series model; marking the accumulated sentiment value corresponding to the sentence input by the second customer after the second input sentence sequence in the second conversation sample to obtain output sample data of the sentiment fluctuation time series model; and The emotion fluctuation time series model is trained using the input sample data and the output sample data.

3. The method according to claim 2, wherein: When i is greater than 1, obtaining the cumulative sentiment value corresponding to the i-th sentence includes: Obtaining the cumulative sentiment value corresponding to the (i-1)th sentence input by the first customer in this session; and Based on the cumulative emotion value corresponding to the (i-1)th sentence and the N emotion probabilities corresponding to the (i)th sentence, the cumulative emotion value corresponding to the (i)th sentence is obtained.

4. The method according to claim 3, wherein: The method further comprises: When i is greater than 1, the accumulated emotion value corresponding to the i-th sentence is set equal to the accumulated emotion value corresponding to the i-1-th sentence, and the emotion change value corresponding to the i-th sentence is accumulated.

5. The method according to claim 3, wherein The feature vector corresponding to any sentence also includes the N emotion probabilities corresponding to the sentence.

6. The method according to claim 1, wherein Also includes: Obtaining the accumulated emotion value corresponding to each sentence input by the first customer in the current session, and arranging the sentences input by the first customer in order to obtain an emotion value sequence; Based on the emotion value sequence, obtaining an emotion fluctuation sequence curve of the first customer in the current session; as well as The emotion fluctuation sequence curve is displayed.

7. A training method for an emotion fluctuation time series model, applied to an online customer service system, wherein the emotion fluctuation time series model is used to predict the customer's emotional state during a conversation, wherein: The training method comprises: Obtaining at least one second conversation sample, wherein the number of sentences input by the second customer in each second conversation sample is greater than M, where M is an integer greater than 1; extracting at least one second input sentence sequence consisting of M sentences continuously input by the second customer from the second conversation sample; Extracting a feature vector corresponding to each sentence in the second input sentence sequence to obtain a second feature vector sequence corresponding to the second input sentence sequence, wherein the second feature vector sequence is used as input sample data of the emotion fluctuation time series model; wherein the feature vector corresponding to any sentence includes a cumulative emotion value corresponding to the sentence; Obtaining the accumulated sentiment value corresponding to the sentence input by the second customer after the second input sentence sequence in the second conversation sample, and obtaining output sample data of the sentiment fluctuation time series model; and Using the input sample data and the output sample data, training the emotion fluctuation time series model; The step of extracting the feature vector corresponding to each sentence in the second input sentence sequence further includes obtaining the cumulative sentiment value corresponding to each sentence, specifically including: Outputting N emotion probabilities corresponding to each sentence using a short text emotion model; wherein the N emotion probabilities are probabilities that the emotion expressed by any sentence belongs to N emotion categories respectively; wherein the short text emotion model is used to classify the emotion expressed by any sentence into the N emotion categories, where N is an integer greater than or equal to 2; The cumulative emotion value corresponding to any sentence is the accumulation of emotion change values ​​corresponding to the sentence and all previous sentences entered by the customer in the conversation, which is used to evaluate the customer's emotional state when entering the sentence; the emotion change value is used to measure the degree of emotional fluctuation of the customer when entering a sentence; The emotion change value corresponding to any sentence is equal to the weighted sum of the N emotion probabilities corresponding to the sentence, wherein the positive or negative weight of each emotion probability in the N emotion probabilities is determined according to the positive or negative effect of the emotion category corresponding to the emotion probability on promoting the conversation, and the absolute value of the weight of each emotion probability is determined according to the degree of influence of the emotion category corresponding to the emotion probability on promoting the conversation; Among them, the N emotion categories include emotion categories that have a positive effect on promoting conversations and emotion categories that have a negative effect on promoting conversations; The emotion categories that have a positive effect on promoting the conversation include at least one of the following: an emotion category representing a dull mood or an emotion category representing a happy mood; wherein the absolute value of the weight of the emotion probability representing the dull mood category is smaller than the absolute value of the weight of the emotion probability representing the happy mood category; Among them, the emotion categories that have a negative effect on promoting the conversation include at least one of the following: an emotion category representing anxiety, an emotion category representing anger, or an emotion category representing loss; wherein the absolute value of the weight of the emotion probability of the emotion category representing anger is greater than either the absolute value of the weight of the emotion probability of the emotion category representing anxiety or the absolute value of the weight of the emotion probability of the emotion category representing loss.

8. The training method according to claim 7, wherein: Extracting a feature vector corresponding to each sentence in the second input sentence sequence further includes: for the rth sentence in the second input sentence sequence, where r is an integer greater than or equal to 1: Outputting N emotion probabilities corresponding to the r-th sentence using a short text emotion model; When r is greater than 1, obtaining the cumulative emotion value corresponding to the r-1th sentence in the second input sentence sequence; and obtaining the cumulative emotion value corresponding to the r-1th sentence based on the cumulative emotion value corresponding to the r-1th sentence and the N emotion probabilities corresponding to the rth sentence; Among them, when r=1, the cumulative emotion value corresponding to the r-th sentence is the weighted sum of N emotion probabilities corresponding to the sentence.

9. The training method according to claim 8, wherein: The feature vector corresponding to any sentence also includes the N emotion probabilities corresponding to the sentence.

10. A device for identifying customer emotional fluctuations, applied to an online customer service system, wherein: The device comprises: A first acquisition module is configured to acquire i sentences input by the first customer in this session, where i is an integer greater than or equal to 1; The second acquisition module is used to obtain the cumulative sentiment value corresponding to the i-th sentence; an evaluation module, configured to evaluate the emotional state of the first customer when inputting the i-th sentence based on the accumulated emotion value corresponding to the i-th sentence; The second acquisition module is specifically configured to: Outputting N emotion probabilities corresponding to each sentence using a short text emotion model; wherein the N emotion probabilities are probabilities that the emotion expressed by any sentence belongs to N emotion categories respectively; wherein the short text emotion model is used to classify the emotion expressed by any sentence into the N emotion categories, wherein N is an integer greater than or equal to 2; When i=1, the cumulative emotion value corresponding to the i-th sentence is the emotion change value corresponding to the first sentence input by the first customer; and when i is greater than 1, the cumulative emotion value corresponding to the i-th sentence is the accumulation of emotion change values ​​corresponding to each sentence in the i-th sentence and all sentences before it, and the emotion change value is used to measure the degree of emotion fluctuation of the first customer when inputting a sentence; The emotion change value corresponding to any sentence is equal to the weighted sum of the N emotion probabilities corresponding to the sentence, wherein the positive or negative weight of each emotion probability in the N emotion probabilities is determined according to the positive or negative effect of the emotion category corresponding to the emotion probability on promoting the conversation, and the absolute value of the weight of each emotion probability is determined according to the degree of influence of the emotion category corresponding to the emotion probability on promoting the conversation; Among them, the N emotion categories include emotion categories that have a positive effect on promoting conversations and emotion categories that have a negative effect on promoting conversations; The emotion categories that have a positive effect on promoting the conversation include at least one of the following: an emotion category representing a dull mood or an emotion category representing a happy mood; wherein the absolute value of the weight of the emotion probability representing the dull mood category is smaller than the absolute value of the weight of the emotion probability representing the happy mood category; Among them, the emotion categories that have a negative effect on promoting the conversation include at least one of the following: an emotion category representing anxiety, an emotion category representing anger, or an emotion category representing loss; wherein the absolute value of the weight of the emotion probability of the emotion category representing anger is greater than either the absolute value of the weight of the emotion probability of the emotion category representing anxiety or the absolute value of the weight of the emotion probability of the emotion category representing loss.

11. A training device for an emotion fluctuation time series model, applied to an online customer service system, wherein the emotion fluctuation time series model is used to predict the customer's emotional state during a conversation, wherein: The training device comprises: a third acquisition module, configured to acquire at least one second conversation sample, wherein the number of sentences input by the second customer in each second conversation sample is greater than M; a first extraction module, configured to extract from the second conversation sample at least one second input sentence sequence consisting of M sentences continuously input by the second customer; a second extraction module, configured to extract a feature vector corresponding to each sentence in the second input sentence sequence, to obtain a second feature vector sequence corresponding to the second input sentence sequence, wherein the second feature vector sequence is used as input sample data for the emotion fluctuation time series model; wherein the feature vector corresponding to any sentence includes a cumulative emotion value corresponding to the sentence; a fourth acquisition module, configured to acquire the accumulated sentiment value corresponding to the sentence input by the second customer after the second input sentence sequence in the second conversation sample, and obtain output sample data of the sentiment fluctuation time series model; and A training module, configured to train the emotion fluctuation time series model using the input sample data and the output sample data; The second extraction module is further configured to obtain the cumulative sentiment value corresponding to each sentence, specifically including: Outputting N emotion probabilities corresponding to each sentence using a short text emotion model; wherein the N emotion probabilities are probabilities that the emotion expressed by any sentence belongs to N emotion categories respectively; wherein the short text emotion model is used to classify the emotion expressed by any sentence into the N emotion categories, where N is an integer greater than or equal to 2; The cumulative emotion value corresponding to any sentence is the accumulation of emotion change values ​​corresponding to the sentence and all previous sentences entered by the customer in the conversation, which is used to evaluate the customer's emotional state when entering the sentence; the emotion change value is used to measure the degree of emotional fluctuation of the customer when entering a sentence; The emotion change value corresponding to any sentence is equal to the weighted sum of the N emotion probabilities corresponding to the sentence, wherein the positive or negative weight of each emotion probability in the N emotion probabilities is determined according to the positive or negative effect of the emotion category corresponding to the emotion probability on promoting the conversation, and the absolute value of the weight of each emotion probability is determined according to the degree of influence of the emotion category corresponding to the emotion probability on promoting the conversation; Among them, the N emotion categories include emotion categories that have a positive effect on promoting conversations and emotion categories that have a negative effect on promoting conversations; The emotion categories that have a positive effect on promoting the conversation include at least one of the following: an emotion category representing a dull mood or an emotion category representing a happy mood; wherein the absolute value of the weight of the emotion probability representing the dull mood category is smaller than the absolute value of the weight of the emotion probability representing the happy mood category; Among them, the emotion categories that have a negative effect on promoting the conversation include at least one of the following: an emotion category representing anxiety, an emotion category representing anger, or an emotion category representing loss; wherein the absolute value of the weight of the emotion probability of the emotion category representing anger is greater than either the absolute value of the weight of the emotion probability of the emotion category representing anxiety or the absolute value of the weight of the emotion probability of the emotion category representing loss.

12. An electronic device comprising: one or more processors; a storage device for storing one or more programs, Wherein, when the one or more programs are executed by the one or more processors, the one or more processors are caused to execute: The method according to any one of claims 1 to 6; or The training method according to any one of claims 7 to 9.

13. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to implement: The method according to any one of claims 1 to 6; or The training method according to any one of claims 7 to 9.

Citation Information

Patent Citations

  • Voice early warning method, device and equipment and storage medium

    CN111739559A