CN112463967A - Emotion early warning method, system, equipment and storage medium - Google Patents

Emotion early warning method, system, equipment and storage medium Download PDF

Info

Publication number
CN112463967A
CN112463967A CN202011430774.XA CN202011430774A CN112463967A CN 112463967 A CN112463967 A CN 112463967A CN 202011430774 A CN202011430774 A CN 202011430774A CN 112463967 A CN112463967 A CN 112463967A
Authority
CN
China
Prior art keywords
emotion
conversation
message text
recognition result
emotion recognition
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011430774.XA
Other languages
Chinese (zh)
Inventor
邓艳江
罗超
胡泓
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ctrip Computer Technology Shanghai Co Ltd
Original Assignee
Ctrip Computer Technology Shanghai Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ctrip Computer Technology Shanghai Co Ltd filed Critical Ctrip Computer Technology Shanghai Co Ltd
Priority to CN202011430774.XA priority Critical patent/CN112463967A/en
Publication of CN112463967A publication Critical patent/CN112463967A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • G06F16/355Class or cluster creation or modification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/284Lexical analysis, e.g. tokenisation or collocates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis

Abstract

The invention discloses an emotion early warning method, an emotion early warning system, emotion early warning equipment and a storage medium, wherein the emotion early warning method comprises the following steps: acquiring a message text corresponding to the current conversation; processing a message text corresponding to the current conversation to obtain a corresponding word vector; inputting the word vectors into a emotion recognition model for classification to obtain an emotion recognition result corresponding to the current conversation, wherein the emotion recognition model is used for recognizing emotion corresponding to the message text; and generating emotion early warning information according to the emotion recognition result corresponding to the current conversation and the emotion recognition result of the historical conversation corresponding to the current conversation. Compared with the traditional method of keyword matching, the method has the advantages of high identification accuracy and strong real-time property, and can perform corresponding processing in time according to the prediction result so as to improve the service quality of the conversation.

Description

Emotion early warning method, system, equipment and storage medium
Technical Field
The invention belongs to the technical field of emotion recognition, and particularly relates to an emotion early warning method, system, equipment and storage medium.
Background
During the Instant Messaging (IM) communication between the customer service and the client, the client often has some bad emotions, such as impatience, anger, worries, and the like. When the customer is presented with the above emotion, continuing to be served by the current customer service may cause a more intense dissatisfaction of the customer. Therefore, to better serve the customer, it is necessary to monitor and recognize the emotion of the customer in time and switch to other more appropriate processing modes, such as switching the current machine customer service to the manual customer service or switching the current manual customer service to a higher level customer service.
In the prior art, the identification of extreme emotions is a common technique for regularly matching an IM text message with keywords by predefining extreme emotion keywords, such as common visceral words and common cursory words. And if the IM text message of the client hits the extreme emotion keywords, early warning is carried out, and further subsequent service switching is carried out. However, the method based on the keywords cannot be combined with semantics, and extreme degrees of emotion, such as normal, negative, extreme, and the like, such as "trash can", cannot be accurately distinguished, so that normal expression is caused, negative emotion is misjudged, and the like, which causes a low accuracy of emotion judgment, causes a large amount of wrong service switching, and causes labor waste.
Disclosure of Invention
The invention provides an emotion early warning method, system, equipment and storage medium, aiming at overcoming the defect that the extreme degree of emotion cannot be accurately distinguished by using a keyword matching mode in the prior art, so that the emotion judgment accuracy is low.
The invention solves the technical problems through the following technical scheme:
the invention provides an emotion early warning method, which comprises the following steps:
acquiring a message text corresponding to the current conversation;
processing the message text corresponding to the current conversation to obtain a corresponding word vector;
inputting the word vectors into a emotion recognition model for classification to obtain an emotion recognition result corresponding to the current conversation, wherein the emotion recognition model is used for recognizing emotion corresponding to the message text;
and generating emotion early warning information according to the emotion recognition result corresponding to the current conversation and the emotion recognition result of the historical conversation corresponding to the current conversation.
Preferably, the generating of emotion early warning information according to the emotion recognition result corresponding to the current conversation and the emotion recognition result of the historical conversation corresponding to the current conversation includes:
and judging whether the emotion recognition result corresponding to the current conversation and the emotion recognition result corresponding to the historical conversation exceed a first preset range, and if so, generating the emotion early warning information.
Preferably, the emotion recognition result includes a score, and the determining whether the emotion recognition result corresponding to the current conversation and the emotion recognition result corresponding to the historical conversation exceed a first preset range includes:
and judging whether the accumulation of the score of the emotion recognition result corresponding to the current conversation and the score of the emotion recognition result corresponding to the historical conversation exceeds the first preset range.
Preferably, after generating emotion early warning information according to the emotion recognition result corresponding to the current conversation and the emotion recognition result of the historical conversation corresponding to the current conversation, the method further includes:
storing the emotion recognition result corresponding to the current conversation to a Redis database as the emotion recognition result corresponding to the historical conversation;
and returning to the step of acquiring the message text of the current conversation.
Preferably, the acquiring the message text of the current conversation includes:
judging whether the sentence number of the message text of the current conversation is smaller than a second preset range, if so, acquiring the message text of the historical conversation corresponding to the current conversation, and splicing the message text of the current conversation and the message text of the historical conversation corresponding to the current conversation;
and taking the spliced message text as the message text of the current conversation, and executing the message text corresponding to the current conversation to process to obtain a corresponding word vector.
Preferably, after generating emotion early warning information according to the emotion recognition result corresponding to the current conversation and the emotion recognition result of the historical conversation corresponding to the current conversation, the method further includes:
storing the message text of the current conversation before splicing into a Redis database as the corresponding message text of the historical conversation;
the obtaining of the message text of the historical dialog corresponding to the current dialog includes:
and acquiring the message text of the historical conversation corresponding to the current conversation from a Redis database.
The invention also provides an emotion early warning system which comprises an acquisition module, a vector module, an identification module and an early warning module;
the acquisition module is used for acquiring a message text corresponding to the current conversation;
the vector module is used for processing the message text corresponding to the current conversation to obtain a corresponding word vector;
the recognition module is used for inputting the word vectors into a emotion recognition model for classification so as to obtain an emotion recognition result corresponding to the current conversation, and the emotion recognition model is used for recognizing emotion corresponding to the message text;
the early warning module is used for generating emotion early warning information according to the emotion recognition result corresponding to the current conversation and the emotion recognition result of the historical conversation corresponding to the current conversation.
Preferably, the early warning module is configured to determine whether an emotion recognition result corresponding to the current conversation and an emotion recognition result corresponding to the historical conversation exceed a first preset range, and if yes, generate the emotion early warning information.
Preferably, the emotion recognition result includes a score, and the early warning module is configured to determine whether the sum of the score of the emotion recognition result corresponding to the current conversation and the score of the emotion recognition result corresponding to the historical conversation exceeds the first preset range.
Preferably, the emotion early warning system further comprises a first storage module;
the first storage module is used for storing the emotion recognition result corresponding to the current conversation to a Redis database, serving as the emotion recognition result corresponding to the historical conversation, and calling the acquisition module.
Preferably, the acquiring module comprises a judging unit and a splicing unit;
the judging unit is used for judging whether the sentence number of the message text of the current conversation is smaller than a second preset range, and if so, the splicing unit is called;
the splicing unit is used for acquiring the message text of the historical dialogue corresponding to the current dialogue, splicing the message text of the current dialogue with the message text of the historical dialogue corresponding to the current dialogue, taking the spliced message text as the message text of the current dialogue, and calling the vector module.
Preferably, the emotion early warning system includes a second storage module, where the second storage module is configured to store the message text of the current conversation before splicing to a Redis database, and serve as the corresponding message text of the historical conversation;
the obtaining module is further configured to obtain, from a Redis database, a message text of a historical dialog corresponding to the current dialog.
The invention also provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the computer program to realize the emotion early warning method.
The invention also provides a computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, carries out the steps of the emotion pre-warning method as described above.
The positive progress effects of the invention are as follows:
the method comprises the steps of obtaining a message text corresponding to the current conversation, processing the message text corresponding to the current conversation to obtain a corresponding word vector, inputting the word vector into a emotion recognition model for classification to obtain an emotion recognition result corresponding to the current conversation, and generating emotion early warning information according to the emotion recognition result corresponding to the current conversation and the emotion recognition result of historical conversation corresponding to the current conversation, so that the emotion trend in the conversation content can be predicted and judged by utilizing the emotion recognition model in combination with the content of the current conversation and the content of the historical conversation.
Drawings
Fig. 1 is a flowchart of an emotion warning method in embodiment 1 of the present invention.
Fig. 2 is a flowchart of an emotion warning method in embodiment 2 of the present invention.
Fig. 3 is a flowchart of step 10 in the emotion warning method in embodiment 2 of the present invention.
Fig. 4 is a flowchart of step 14 in the emotion warning method in embodiment 2 of the present invention.
Fig. 5 is a flowchart of step 11 in the emotion warning method in embodiment 2 of the present invention.
Fig. 6 is a schematic block diagram of an emotion warning system in embodiment 3 of the present invention.
Fig. 7 is a schematic block diagram of an emotion warning system in embodiment 4 of the present invention.
Fig. 8 is a schematic block diagram of training module 25 of the emotion warning system in embodiment 4 of the present invention.
Fig. 9 is a schematic block diagram of an obtaining module 21 of the emotion early warning system in embodiment 4 of the present invention.
Fig. 10 is a schematic structural diagram of an electronic device according to embodiment 5 of the present invention.
Detailed Description
The invention is further illustrated by the following examples, which are not intended to limit the scope of the invention.
Example 1
The embodiment provides an emotion early warning method, as shown in fig. 1, the emotion early warning method includes:
and step 11, obtaining a message text corresponding to the current conversation.
And step 12, processing the message text corresponding to the current conversation to obtain a corresponding word vector.
The method specifically comprises the steps of preprocessing the data of the message text, wherein the steps of converting a traditional Chinese character into a simplified Chinese character, converting an upper case into a lower case, removing special punctuation marks and the like are mainly included, and then the message text is divided into words and then mapped into word vectors so that the words have semantic information. This is a common measure in the prior art and will not be described herein.
And step 13, inputting the word vectors into a emotion recognition model for classification to obtain an emotion recognition result corresponding to the current conversation, wherein the emotion recognition model is used for recognizing emotion corresponding to the message text.
And 14, generating emotion early warning information according to the emotion recognition result corresponding to the current conversation and the emotion recognition result of the historical conversation corresponding to the current conversation.
For a complete IM session, the client served by the customer service staff often presents more than one emotion, which will usually be an emotion trajectory: such as gradual transition from normal mood to extreme mood, or sustained negative mood, or gradual transition from extreme mood.
The method comprises the steps of obtaining a message text corresponding to a current conversation in an IM conversation between a customer service and a client, identifying the message text corresponding to the current conversation by using an emotion identification model to obtain an emotion corresponding to the message text corresponding to the current conversation, analyzing an emotion change track of the IM conversation by combining the emotion corresponding to historical conversation content in the IM conversation, and generating emotion early warning information according to the emotion change track, wherein the emotion early warning information is generated, for example, the emotion early warning information is changed from normal gradual change to extreme emotion or is always kept negative emotion, and the emotion early warning information can be correspondingly generated if the negative emotion is upgraded later possible so as to prepare for the next corresponding processing.
In the embodiment, the message text corresponding to the current conversation is obtained, the message text corresponding to the current conversation is processed to obtain the corresponding word vector, the word vector is input into the emotion recognition model for classification to obtain the emotion recognition result corresponding to the current conversation, and emotion early warning information is generated according to the emotion recognition result corresponding to the current conversation and the emotion recognition result of the historical conversation corresponding to the current conversation, so that the emotion trend in the conversation content can be predicted and judged by using the emotion recognition model in combination with the content of the current conversation and the content of the historical conversation.
Example 2
The embodiment provides an emotion early warning method, and compared with embodiment 1, the embodiment is different in that, as shown in fig. 2, the emotion early warning method further includes:
and step 10, training the deep learning model to obtain an emotion recognition model.
As shown in fig. 3, the specific steps of step 10 in this embodiment include:
step 101, collecting sample dialog message text.
And 102, processing the sample dialogue message text to obtain a corresponding sample word vector.
Firstly, data preprocessing is carried out on a sample conversation message text, and the data preprocessing mainly comprises the steps of changing from traditional Chinese to simplified Chinese, changing from upper case to lower case, removing special punctuation marks and dividing words.
And mapping each participle of the sample conversation message text into a sample word vector to enable the word to have semantic information.
And 103, training the deep learning model by taking the sample word vectors as sample data to obtain an emotion recognition model.
As shown in fig. 4, step 14 in this embodiment includes:
step 141, determining whether the emotion recognition result corresponding to the current conversation and the emotion recognition result corresponding to the historical conversation exceed a first preset range, if yes, executing step 142, and if not, executing step 144.
In this embodiment, the emotion recognition result is represented by scores, such as scores of emotion classification (normal communication), negative emotion classification (complaint), extreme emotion classification (curse, rage), and corresponding scores are assumed to be normal for 0 score, negative emotion classification for 1 score, and extreme emotion classification for 2 score.
And judging whether the accumulated value of the score of the emotion recognition result corresponding to the current conversation and the score of the emotion recognition result corresponding to the historical conversation exceeds a first preset range.
Assuming that the first preset range is set to be greater than or equal to 2 points, if the score of the emotion recognition result corresponding to the current conversation is 1 point and the score of the emotion recognition result corresponding to the previous historical conversation is 1 point, the sum is equal to 2 points, and the condition that the sum of the scores is greater than or equal to 2 points is met, namely the sum of the scores exceeds the first preset range.
And 142, generating emotion early warning information.
As in the above example, if the score accumulation exceeds the first preset range, the emotion warning information is generated, so as to take other subsequent processing measures, etc.
Step 143, storing emotion recognition results corresponding to the current conversation to a Redis database; returning to step 11.
Step 144, waiting for the next session as the current session, and returning to step 11.
And taking the upcoming conversation as a reference basis to facilitate instant and quick acquisition, storing the emotion recognition result corresponding to the current conversation to a Redis database to be used as the emotion recognition result corresponding to the historical conversation, and returning to the step 11 to continue to perform early warning on the text content of the subsequent conversation.
In order to more completely show the semantics of the client expression content, in step 11, that is, in the step of acquiring the message text of the current conversation, if the content of the message text of the current conversation is relatively less, the message text of the historical conversation corresponding to the current conversation may be acquired, and the message text of the historical conversation and the message text content of the current conversation are spliced to restore the real expression intention and content of the client. As shown in fig. 5, the specific steps of step 11 are:
and step 111, judging whether the sentence number of the message text of the current conversation is smaller than a second preset range, if so, executing step 112, and if not, executing step 12.
And 112, acquiring the message text of the historical dialogue corresponding to the current dialogue, and splicing the message text of the current dialogue with the message text of the historical dialogue corresponding to the current dialogue.
In order to increase the saving and obtaining speed, the access and the obtaining of the dialog message text in the embodiment are both realized by a Redis database.
Namely, the message text of the historical dialogue corresponding to the current dialogue is obtained from the Redis database.
And 113, taking the spliced message text as the message text of the current conversation, and executing the step 12.
And performing subsequent processing and emotion recognition by taking the spliced content as a message text of the current conversation to obtain a more accurate emotion judgment result.
And step 114, storing the message text of the current conversation before splicing to a Redis database as the message text of the corresponding historical conversation.
On one hand, the embodiment improves the processing speed of emotion recognition results and has high real-time performance by utilizing the Redis database to store and read each dialogue emotion recognition result; on the other hand, by splicing the message text of the current conversation with the message text of the historical conversation corresponding to the current conversation and carrying out emotion recognition on the spliced text content, the accuracy of emotion recognition results is further improved based on more complete semantics, and the Redis database realizes the rapid storage and acquisition of the message text of the historical conversation, thereby further improving the real-time performance of data processing. The emotion early warning method is high in identification accuracy rate and strong in real-time performance, and further can perform corresponding processing in time according to the prediction result, so that the service quality of conversation is improved.
Example 3
The embodiment provides an emotion early warning system, as shown in fig. 6, the emotion early warning system includes an obtaining module 21, a vector module 22, an identification module 23, and an early warning module 24.
The obtaining module 21 is configured to obtain a message text corresponding to a current conversation.
The vector module 22 is configured to process a message text corresponding to a current conversation to obtain a corresponding word vector;
the specific data preprocessing including the message text mainly includes the steps of converting traditional Chinese characters into simplified Chinese characters, converting upper case into lower case, removing special punctuation marks, and the like, which is a common means in the prior art and is not described herein again.
After word segmentation, the message text is mapped into word vectors, so that the words have semantic information.
The recognition module 23 is configured to input the word vector into a emotion recognition model for classification to obtain an emotion recognition result corresponding to the current conversation, where the emotion recognition model is configured to recognize an emotion corresponding to the message text.
The early warning module 24 is configured to generate emotion early warning information according to the emotion recognition result corresponding to the current conversation and the emotion recognition result of the historical conversation corresponding to the current conversation.
For a complete IM session, the client served by the customer service staff often presents more than one emotion, which will usually be an emotion trajectory: such as gradual transition from normal mood to extreme mood, or sustained negative mood, or gradual transition from extreme mood.
The method comprises the steps of obtaining a message text corresponding to a current conversation in an IM conversation between a customer service and a client, identifying the message text corresponding to the current conversation by using an emotion identification model to obtain an emotion corresponding to the message text corresponding to the current conversation, analyzing an emotion change track of the IM conversation by combining the emotion corresponding to historical conversation content in the IM conversation, and generating emotion early warning information according to the emotion change track, wherein the emotion early warning information is generated, for example, the emotion early warning information is changed from normal gradual change to extreme emotion or is always kept negative emotion, and the emotion early warning information can be correspondingly generated if the negative emotion is upgraded later possible so as to prepare for the next corresponding processing.
In the embodiment, the message text corresponding to the current conversation is obtained, the message text corresponding to the current conversation is processed to obtain the corresponding word vector, the word vector is input into the emotion recognition model for classification to obtain the emotion recognition result corresponding to the current conversation, and emotion early warning information is generated according to the emotion recognition result corresponding to the current conversation and the emotion recognition result of the historical conversation corresponding to the current conversation, so that the emotion trend in the conversation content can be predicted and judged by using the emotion recognition model in combination with the content of the current conversation and the content of the historical conversation.
Example 4
Compared with embodiment 3, the embodiment provides an emotion early warning system, and as shown in fig. 7, the emotion early warning system further includes a training module 25, a first storage module 26, and a second storage module 27, where the training module 25 is used to train a deep learning model to obtain an emotion recognition model. More specifically, as shown in fig. 8, the training module includes a collection unit 251, a preprocessing unit 252, and a training unit 253.
The collecting unit 251 is used to collect sample dialog message texts.
The preprocessing unit 252 is configured to process the sample dialog message text to obtain a corresponding sample word vector.
Firstly, data preprocessing is carried out on a sample conversation message text, and the data preprocessing mainly comprises the steps of changing from traditional Chinese to simplified Chinese, changing from upper case to lower case, removing special punctuation marks and dividing words.
And mapping each participle of the sample conversation message text into a sample word vector to enable the word to have semantic information.
The training unit 253 is configured to train the deep learning model by using the sample word vector as sample data to obtain an emotion recognition model.
The early warning module 24 is configured to determine whether an emotion recognition result corresponding to the current conversation and an emotion recognition result corresponding to the historical conversation exceed a first preset range, and if yes, generate emotion early warning information.
In this embodiment, the emotion recognition result is represented by scores, such as scores of emotion classification (normal communication), negative emotion classification (complaint), extreme emotion classification (curse, rage), and corresponding scores are assumed to be normal for 0 score, negative emotion classification for 1 score, and extreme emotion classification for 2 score.
More specifically, the early warning module 24 is configured to determine whether the score of the emotion recognition result corresponding to the current dialog and the score of the emotion recognition result corresponding to the historical dialog are accumulated to exceed a first preset range.
Assuming that the first preset range is set to be greater than or equal to 2 points, if the score of the emotion recognition result corresponding to the current conversation is 1 point and the score of the emotion recognition result corresponding to the previous historical conversation is 1 point, the sum is equal to 2 points, and the condition that the sum of the scores is greater than or equal to 2 points is met, namely the sum of the scores exceeds the first preset range.
And if the score accumulation exceeds a first preset range, generating emotion early warning information so as to take other subsequent treatment measures and the like.
The first saving module 26 is configured to save the emotion recognition result corresponding to the current dialog to a Redis database, and call the obtaining module 21 as the emotion recognition result corresponding to the historical dialog.
The emotion recognition result corresponding to the current conversation can be stored in a Redis database and used as the emotion recognition result corresponding to the historical conversation.
In order to more completely show the semantics of the client expression content, if the content of the message text of the current conversation is less, the content in the front can be obtained and spliced with the message text content of the current conversation to restore the real expression intention and content of the client. More specifically, as shown in fig. 9, the acquiring module 21 includes a judging unit 211 and a splicing unit 212.
The determining unit 211 is configured to determine whether the number of sentences of the message text of the current conversation is smaller than a second preset range, and if so, invoke the splicing unit 212.
In order to increase the saving and obtaining speed, the access and the obtaining of the dialog message text in the embodiment are both realized by a Redis database.
Namely, the message text of the historical dialogue corresponding to the current dialogue is obtained from the Redis database.
The splicing unit 212 is configured to acquire a message text of a history dialog corresponding to a current dialog, splice the message text of the current dialog with the message text of the history dialog corresponding to the current dialog, use the spliced message text as the message text of the current dialog, and invoke the vector module 22.
The second saving module 27 is configured to save the message text of the current dialog before splicing to the Redis database as the message text of the corresponding historical dialog.
In this embodiment, the obtaining module 21 is configured to obtain, from a Redis database, a message text of a history dialog corresponding to a current dialog.
On one hand, the embodiment improves the processing speed of emotion recognition results and has high real-time performance by utilizing the Redis database to store and read each dialogue emotion recognition result; on the other hand, by splicing the message text of the current conversation with the message text of the historical conversation corresponding to the current conversation and carrying out emotion recognition on the spliced text content, the accuracy of emotion recognition results is further improved based on more complete semantics, and the Redis database realizes the rapid storage and acquisition of the message text of the historical conversation, thereby further improving the real-time performance of data processing. The emotion early warning system of the embodiment has high identification accuracy and strong real-time performance, and further can perform corresponding processing in time according to the prediction result, so that the service quality of conversation is improved.
Example 5
Fig. 10 is a schematic structural diagram of an electronic device according to embodiment 5 of the present invention. The electronic device comprises a memory, a processor, and a computer program stored on the memory and executable on the processor, which when executed by the processor implements the method of embodiment 1 or embodiment 2. The electronic device 30 shown in fig. 10 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 10, the electronic device 30 may be embodied in the form of a general purpose computing device, which may be, for example, a server device. The components of the electronic device 30 may include, but are not limited to: the at least one processor 31, the at least one memory 32, and a bus 33 connecting the various system components (including the memory 32 and the processor 31).
The bus 33 includes a data bus, an address bus, and a control bus.
The memory 32 may include volatile memory, such as Random Access Memory (RAM)321 and/or cache memory 322, and may further include Read Only Memory (ROM) 323.
Memory 32 may also include a program/utility 325 having a set (at least one) of program modules 324, such program modules 324 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
The processor 31 executes various functional applications and data processing, such as the emotion warning method provided in embodiment 1 or embodiment 2 of the present invention, by executing the computer program stored in the memory 32.
The electronic device 30 may also communicate with one or more external devices 34 (e.g., keyboard, pointing device, etc.). Such communication may be through input/output (I/O) interfaces 35. Also, model-generating device 30 may also communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet) via network adapter 36. As shown, network adapter 36 communicates with the other modules of model-generating device 30 via bus 33. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the model-generating device 30, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems, etc.
It should be noted that although in the above detailed description several units/modules or sub-units/modules of the electronic device are mentioned, such a division is merely exemplary and not mandatory. Indeed, the features and functionality of two or more of the units/modules described above may be embodied in one unit/module according to embodiments of the invention. Conversely, the features and functions of one unit/module described above may be further divided into embodiments by a plurality of units/modules.
Example 6
The present embodiment provides a computer-readable storage medium on which a computer program is stored, which when executed by a processor, implements the steps of the emotion warning method provided in embodiment 1 or embodiment 2.
More specific examples, among others, that the readable storage medium may employ may include, but are not limited to: a portable disk, a hard disk, random access memory, read only memory, erasable programmable read only memory, optical storage device, magnetic storage device, or any suitable combination of the foregoing.
In a possible implementation, the invention may also be implemented in the form of a program product comprising program code for causing a terminal device to perform the steps of implementing the method of emotional early warning as described in embodiment 1 or embodiment 2, when the program product is run on the terminal device.
Where program code for carrying out the invention is written in any combination of one or more programming languages, the program code may be executed entirely on the user device, partly on the user device, as a stand-alone software package, partly on the user device and partly on a remote device or entirely on the remote device.
While specific embodiments of the invention have been described above, it will be appreciated by those skilled in the art that this is by way of example only, and that the scope of the invention is defined by the appended claims. Various changes and modifications to these embodiments may be made by those skilled in the art without departing from the spirit and scope of the invention, and these changes and modifications are within the scope of the invention.

Claims (14)

1. An emotion early warning method, characterized in that the emotion early warning method comprises:
acquiring a message text corresponding to the current conversation;
processing the message text corresponding to the current conversation to obtain a corresponding word vector;
inputting the word vectors into a emotion recognition model for classification to obtain an emotion recognition result corresponding to the current conversation, wherein the emotion recognition model is used for recognizing emotion corresponding to the message text;
and generating emotion early warning information according to the emotion recognition result corresponding to the current conversation and the emotion recognition result of the historical conversation corresponding to the current conversation.
2. The emotion warning method of claim 1, wherein generating emotion warning information based on the emotion recognition result corresponding to the current conversation and the emotion recognition result of the historical conversation corresponding to the current conversation comprises:
and judging whether the emotion recognition result corresponding to the current conversation and the emotion recognition result corresponding to the historical conversation exceed a first preset range, and if so, generating the emotion early warning information.
3. The emotion warning method of claim 2, wherein the emotion recognition result includes a score, and the determining whether the emotion recognition result corresponding to the current conversation and the emotion recognition result corresponding to the historical conversation are outside a first preset range includes:
and judging whether the accumulation of the score of the emotion recognition result corresponding to the current conversation and the score of the emotion recognition result corresponding to the historical conversation exceeds the first preset range.
4. The emotion warning method of claim 1, wherein after generating emotion warning information based on the emotion recognition result corresponding to the current conversation and the emotion recognition result of the historical conversation corresponding to the current conversation, further comprising:
storing the emotion recognition result corresponding to the current conversation to a Redis database as the emotion recognition result corresponding to the historical conversation;
and returning to the step of acquiring the message text of the current conversation.
5. The emotion warning method of claim 1, wherein the obtaining of the message text of the current conversation comprises:
judging whether the sentence number of the message text of the current conversation is smaller than a second preset range, if so, acquiring the message text of the historical conversation corresponding to the current conversation, and splicing the message text of the current conversation and the message text of the historical conversation corresponding to the current conversation;
and taking the spliced message text as the message text of the current conversation, and executing the message text corresponding to the current conversation to process to obtain a corresponding word vector.
6. The emotion warning method of claim 5, wherein after generating emotion warning information based on the emotion recognition result corresponding to the current conversation and the emotion recognition result of the historical conversation corresponding to the current conversation, further comprising:
storing the message text of the current conversation before splicing into a Redis database as the corresponding message text of the historical conversation;
the obtaining of the message text of the historical dialog corresponding to the current dialog includes:
and acquiring the message text of the historical conversation corresponding to the current conversation from a Redis database.
7. The emotion early warning system is characterized by comprising an acquisition module, a vector module, an identification module and an early warning module;
the acquisition module is used for acquiring a message text corresponding to the current conversation;
the vector module is used for processing the message text corresponding to the current conversation to obtain a corresponding word vector;
the recognition module is used for inputting the word vectors into a emotion recognition model for classification so as to obtain an emotion recognition result corresponding to the current conversation, and the emotion recognition model is used for recognizing emotion corresponding to the message text;
the early warning module is used for generating emotion early warning information according to the emotion recognition result corresponding to the current conversation and the emotion recognition result of the historical conversation corresponding to the current conversation.
8. The emotion early warning system of claim 7, wherein the early warning module is configured to determine whether the emotion recognition result corresponding to the current conversation and the emotion recognition result corresponding to the historical conversation exceed a first preset range, and if so, generate the emotion early warning information.
9. The emotion warning system of claim 8, wherein the emotion recognition result includes a score, and the warning module is configured to determine whether the score of the emotion recognition result corresponding to the current conversation and the score of the emotion recognition result corresponding to the historical conversation are added together to exceed the first predetermined range.
10. The emotional early warning system of claim 7, further comprising a first preservation module;
the first storage module is used for storing the emotion recognition result corresponding to the current conversation to a Redis database, serving as the emotion recognition result corresponding to the historical conversation, and calling the acquisition module.
11. The emotion warning system of claim 7, wherein the acquisition module comprises a determination unit and a concatenation unit;
the judging unit is used for judging whether the sentence number of the message text of the current conversation is smaller than a second preset range, and if so, the splicing unit is called;
the splicing unit is used for acquiring the message text of the historical dialogue corresponding to the current dialogue, splicing the message text of the current dialogue with the message text of the historical dialogue corresponding to the current dialogue, taking the spliced message text as the message text of the current dialogue, and calling the vector module.
12. The emotion warning system of claim 11, wherein the emotion warning system includes a second saving module, the second saving module being configured to save the message text of the current conversation before concatenation to a Redis database as the corresponding message text of the historical conversation;
the obtaining module is further configured to obtain, from a Redis database, a message text of a historical dialog corresponding to the current dialog.
13. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any of claims 1-6 when executing the computer program.
14. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the mood warning method as recited in any one of claims 1-6.
CN202011430774.XA 2020-12-07 2020-12-07 Emotion early warning method, system, equipment and storage medium Pending CN112463967A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011430774.XA CN112463967A (en) 2020-12-07 2020-12-07 Emotion early warning method, system, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011430774.XA CN112463967A (en) 2020-12-07 2020-12-07 Emotion early warning method, system, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112463967A true CN112463967A (en) 2021-03-09

Family

ID=74800433

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011430774.XA Pending CN112463967A (en) 2020-12-07 2020-12-07 Emotion early warning method, system, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112463967A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113011928A (en) * 2021-04-02 2021-06-22 深圳市中深伟业科技有限公司 Customer service early warning analysis system based on deep learning
CN113515636A (en) * 2021-09-13 2021-10-19 阿里健康科技(中国)有限公司 Text data processing method and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180308487A1 (en) * 2017-04-21 2018-10-25 Go-Vivace Inc. Dialogue System Incorporating Unique Speech to Text Conversion Method for Meaningful Dialogue Response
CN111144097A (en) * 2019-12-25 2020-05-12 华中科技大学鄂州工业技术研究院 Modeling method and device for emotion tendency classification model of dialog text
CN111966800A (en) * 2020-07-27 2020-11-20 腾讯科技(深圳)有限公司 Emotional dialogue generation method and device and emotional dialogue model training method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180308487A1 (en) * 2017-04-21 2018-10-25 Go-Vivace Inc. Dialogue System Incorporating Unique Speech to Text Conversion Method for Meaningful Dialogue Response
CN111144097A (en) * 2019-12-25 2020-05-12 华中科技大学鄂州工业技术研究院 Modeling method and device for emotion tendency classification model of dialog text
CN111966800A (en) * 2020-07-27 2020-11-20 腾讯科技(深圳)有限公司 Emotional dialogue generation method and device and emotional dialogue model training method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113011928A (en) * 2021-04-02 2021-06-22 深圳市中深伟业科技有限公司 Customer service early warning analysis system based on deep learning
CN113515636A (en) * 2021-09-13 2021-10-19 阿里健康科技(中国)有限公司 Text data processing method and electronic equipment

Similar Documents

Publication Publication Date Title
CN110096570B (en) Intention identification method and device applied to intelligent customer service robot
CN110162627B (en) Data increment method and device, computer equipment and storage medium
CN110033760B (en) Modeling method, device and equipment for speech recognition
CN108710704B (en) Method and device for determining conversation state, electronic equipment and storage medium
CN111460250B (en) Image data cleaning method, image data cleaning device, image data cleaning medium, and electronic apparatus
CN114416943B (en) Training method and device for dialogue model, electronic equipment and storage medium
CN111125317A (en) Model training, classification, system, device and medium for conversational text classification
CN110717021B (en) Input text acquisition and related device in artificial intelligence interview
CN110223134B (en) Product recommendation method based on voice recognition and related equipment
CN112463967A (en) Emotion early warning method, system, equipment and storage medium
CN111753524A (en) Text sentence break position identification method and system, electronic device and storage medium
CN111145903A (en) Method and device for acquiring vertigo inquiry text, electronic equipment and inquiry system
CN111416728A (en) Method, system, device and medium for predicting session end and online customer service
CN111738018A (en) Intention understanding method, device, equipment and storage medium
CN111460810A (en) Crowd-sourced task spot check method and device, computer equipment and storage medium
CN111209367A (en) Information searching method, information searching device, electronic equipment and storage medium
CN114297359A (en) Dialog intention recognition method and device, electronic equipment and readable storage medium
CN112541070B (en) Mining method and device for slot updating corpus, electronic equipment and storage medium
CN112434953A (en) Customer service personnel assessment method and device based on computer data processing
CN111737424A (en) Question matching method, device, equipment and storage medium
CN116303951A (en) Dialogue processing method, device, electronic equipment and storage medium
CN113535925A (en) Voice broadcasting method, device, equipment and storage medium
CN114528851A (en) Reply statement determination method and device, electronic equipment and storage medium
CN114218393A (en) Data classification method, device, equipment and storage medium
CN114153948A (en) Question-answer knowledge base construction method, intelligent interaction method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination