A method and device for analyzing user weak emotions

By performing word segmentation and feature word processing on the corpus of the tax intelligent question and answer system, and using the support vector machine model, the problem that traditional technology cannot analyze user emotions is solved, and effective analysis of tax text features and accurate judgment of user emotions are achieved.

CN111221950BActive Publication Date: 2024-09-20AISINO CORPORATION
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201911390641.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-12-30
Publication Date
2024-09-20
Estimated Expiration
2039-12-30

AI Technical Summary

Technical Problem

Traditional sentiment analysis technology cannot effectively analyze user sentiment in the tax intelligent customer service question and answer system, and subjective and objective text classification technology cannot train and classify tax text features well.

Method used

By obtaining the corpus of the tax intelligent question and answer system, we perform word segmentation, denoising and stop word processing, establish the corresponding relationship between feature words and user emotion categories, use the support vector machine model to build an analysis model of users' weak emotions, and conduct training and testing. Get the user's emotions.

Benefits of technology

It improves the ability to analyze and classify tax text features, enhances the ability to judge users' weak emotions, and adapts to the intelligent customer service question and answer system in the tax professional field.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111221950B
    Figure CN111221950B
Patent Text Reader

Abstract

The present invention discloses a method and device for analyzing user weak emotions, which comprises the following steps: obtaining a corpus of users in a tax intelligent question and answer system, and performing word segmentation on the corpus; performing denoising and stop word protection processing on the word segmentation, obtaining feature words in the word segmentation, and establishing a corresponding relationship between the feature words and user emotion categories; using a support vector machine model to construct an analysis model of user weak emotions; using the feature words to train and test the model; using the analysis model of user weak emotions to analyze the weak emotions of users in the tax intelligent question and answer system, and obtaining the user's emotions, thereby solving the problem that traditional subjective and objective text classification technologies cannot perform good training and classification of tax text features.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence, and specifically to a method for analyzing weak emotions of users, and also to a device for analyzing weak emotions of users. Background Art

[0002] Traditional sentiment analysis technology is mainly used in microblog communities, user comment systems or monitoring systems. The customer service Q&A system is different from review systems such as movie reviews and monitoring systems such as public opinion monitoring. There are a large number of words or sentimental words in the comments and public opinion that represent the subjective emotions of users, while neutral sentences in tax customer service far outnumber sentimental sentences, and sentimental words and sentimental words rarely appear. Therefore, traditional sentiment analysis technology cannot perform sentiment analysis on users in the tax intelligent customer service Q&A system. At the same time, the purpose of the tax customer service Q&A system is to solve daily tax-related affairs and user system failures. Therefore, users will not ask the customer service system when there are no affairs. Therefore, neutral emotions and weak negative emotions in the customer service system far outnumber positive emotions, and traditional subjective and objective text classification technology cannot train and divide tax text features well. Summary of the invention

[0003] The present application provides a method and device for analyzing user weak emotions, which are used to solve the problem that traditional subjective and objective text classification technologies are also unable to perform good training and classification of tax text features.

[0004] This application provides a method for analyzing user weak emotions, including:

[0005] Obtaining a corpus of users in the tax intelligent question-answering system and performing word segmentation on the corpus;

[0006] De-noising and stop-word protection are performed on the segmented words to obtain feature words in the segmented words, and a corresponding relationship between the feature words and user emotion categories is established;

[0007] Using a support vector machine model to construct an analysis model of user weak emotions; using the feature words to train and test the model;

[0008] The user's weak emotion analysis model is used to analyze the user's weak emotion in the tax intelligent question and answer system to obtain the user's emotion.

[0009] Preferably, performing word segmentation on the corpus includes:

[0010] Use JieBa tool to divide a sentence or phrase in the corpus into several words according to semantic characteristics.

[0011] Preferably, the word segmentation is subjected to denoising and stop word preservation processing to obtain feature words in the word segmentation, including:

[0012] Remove tax-specific words from the word segmentation, retain stop words, and then obtain the characteristic words in the word segmentation.

[0013] Preferably, after the step of obtaining the feature words in the word segmentation, the method further includes:

[0014] The word embedding vector training is performed on the feature words, and the training steps include:

[0015] Calculate the conditional probability of the feature word under multiple words before and after it, and perform logistic regression on each node;

[0016] After taking the logarithmic function, perform maximum optimization and use gradient ascent to update the training;

[0017] The word vector of the feature word after training is {[x1,x2,…x n ]1,[x1,x2,…x n ]2,…[x1,x2,…,x n ] m}.

[0018] Preferably, using the feature words to train and test the model includes:

[0019] Divide the word vectors into training and test sets;

[0020] Inputting the training set into the analysis model of the user's weak emotion;

[0021] Under the constraints

[0022]

[0023] The objective function is used to solve

[0024]

[0025] Maximizing α op , where K(X P ,X j ), p,j=1,2,…P is the pj-th element of the P×P stacked matrix K. The test set is used to test the analysis model of the user's weak emotion to obtain the discrimination accuracy.

[0026] Preferably, after the step of using the test set to test the user's weak emotion analysis model to obtain the discrimination accuracy, the method further includes:

[0027] Modify the inner product kernel function K(X P ,X), train and test the model multiple times until the discrimination accuracy of the model reaches a preset standard.

[0028] Preferably, the user's weak emotion analysis model is used to analyze the user's weak emotion in the tax intelligent question-answering system to obtain the user's emotion, including:

[0029] Preprocess the corpus of users in the tax intelligent question-answering system to obtain feature words;

[0030] The analysis model of the user's weak emotion is used to output the emotion category corresponding to the feature word to obtain the user's emotion.

[0031] Preferably, it also includes:

[0032] For the feature words to be classified, use the pre-built classification discriminant function

[0033]

[0034] The classification of the feature words is determined according to the result of f(x), and the classification of the feature words is the correspondence between the feature words and the user emotion categories.

[0035] The present application also provides a device for analyzing user weak emotions, including:

[0036] A word segmentation unit, which obtains a corpus of users in the tax intelligent question-answering system and performs word segmentation on the corpus;

[0037] A corresponding relationship establishing unit performs denoising and stop word protection on the segmented words, obtains feature words in the segmented words, and establishes a corresponding relationship between the feature words and the user emotion category;

[0038] A model training and testing unit, using a support vector machine model to build a user weak emotion analysis model; using the feature words to train and test the model;

[0039] The emotion analysis unit uses the analysis model of the user's weak emotion to analyze the user's weak emotion in the tax intelligent question and answer system to obtain the user's emotion.

[0040] Preferably, the word segmentation unit includes:

[0041] The feature word acquisition subunit removes tax-specific words from the segmented words, retains stop words, and then obtains the feature words in the segmented words

[0042] The present application provides a method and device for analyzing user weak emotions, which obtains a corpus of users in a tax intelligent question and answer system and performs word segmentation on the corpus; performs denoising and stop word protection on the word segmentation to obtain feature words in the word segmentation, and establishes a corresponding relationship between the feature words and user emotion categories; uses a support vector machine model to construct an analysis model of user weak emotions; uses the feature words to train and test the model; uses the analysis model of user weak emotions to analyze the weak emotions of users in the tax intelligent question and answer system and obtain the user's emotions, thereby solving the problem that traditional subjective and objective text classification technologies are also unable to perform good training and division of tax text features. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 This is a flowchart of a method for analyzing weak emotions of a user provided by this application;

[0044] Figure 2 This is an architecture diagram of a user weak emotion analysis system involved in this application;

[0045] Figure 3 It is a structural diagram of a support vector machine neural network involved in this application;

[0046] Figure 4 This is a schematic diagram of a device for analyzing weak emotions of a user provided by the present application. DETAILED DESCRIPTION

[0047] Many specific details are described in the following description to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present application, so the present application is not limited by the specific implementation disclosed below.

[0048] Figure 1 This is a flow chart of a method for analyzing weak emotions of users provided by this application. Figure 1 , the method provided in this application is described in detail.

[0049] Step S101, obtaining the user's corpus in the tax intelligent question-answering system, and performing word segmentation on the corpus.

[0050] A large amount of tax question and answer corpus has been accumulated in the historical tax-related system. These corpus are sorted out and used as the corpus of users in the tax intelligent question and answer system. The user emotions in the tax question and answer data are generally unbalanced, which basically conforms to the 80-20 rule. It can be seen that 80% of the user questions are objective and do not contain user emotions, and only 20% of the user questions are slightly emotional. We need to perform sentiment analysis on these 20% of user emotions to obtain user emotions. First, the user tax question and answer corpus is segmented. The segmentation strategy uses the JieBa tool to divide a sentence or phrase in the corpus into several words according to semantic characteristics. In the process of segmentation, different weights can be assigned to different words based on different positions according to the part of speech and word sequence. First, efficient word graph scanning can be achieved based on the Trie tree structure to generate a directed acyclic graph (DAG) consisting of all possible word formation situations of Chinese characters in the sentence. Secondly, dynamic programming is used to find the maximum probability path and find the maximum segmentation combination based on word frequency. Finally, for unregistered words, the HMM model based on the word formation ability of Chinese characters is adopted, and the Viterbi algorithm is used.

[0051] Step S102, performing denoising and stop word protection processing on the segmented words, obtaining feature words in the segmented words, and establishing a corresponding relationship between the feature words and the user emotion category.

[0052] De-noising and stop word retention processing includes removing tax-specific words in the segmentation, retaining stop words, and then obtaining feature words in the segmentation. The selected feature words mainly include the following: emotional adjectives, subjective personal pronouns, emotional punctuation, interjections, and subjective verbs.

[0053] In the tax Q&A of intelligent customer service, questions basically do not contain emotional adjectives, so the extraction of emotional adjectives does not conform to the actual situation. In the tax Q&A corpus, emotional punctuation often appears in error reports, so it is necessary to further remove emotional punctuation after removing professional words. Traditional text feature selection requires the removal of stop words, but in the tax intelligent customer service system, traditional stop words contain a lot of user subjective information, so the corpus stop word features are retained. Tax Q&A contains many subject-predicate phrases such as "hello" and "thank you", which reflect the subjectivity of users and should be treated the same as subjective verbs.

[0054] Establish the correspondence between feature words and user emotion categories, and the method includes subjective and objective emotion classification and emotion word annotation. Among them, subjective and objective emotion classification makes subjective and objective judgments on user emotions according to the classification of questions. The emotions of users when asking different types of questions are not the same. In the tax question and answer intelligent customer service system, user questions are divided into multiple categories such as legal and industrial and commercial consultation, daily financial and taxation questions, basic operations, common questions, and regulations and notices. The degree of anxiety of users when asking different types of questions is different. Based on this, the subjective and objective of users are divided through question classification to assist in judging user emotions. Feature word emotion annotation: The purpose and use of the customer service system is to solve daily affairs problems. The neutral emotions and weak negative emotions of users in the customer service question and answer system are far more than positive emotions. Therefore, some of the contextual conjunctions and modal particles that need to be used in comment systems such as film reviews can ignore the contextual relationship and be annotated as negative emotions. Such as pronouns, transitions, progressions, parallelism, degree adverbs, etc.

[0055] Next, embedding vector training is performed on the feature words. This step can also be performed before establishing the corresponding relationship between the feature words and the user emotion categories. The execution order does not affect the final result of the method. The training steps include: calculating the conditional probability of the feature words under multiple words before and after, performing logistic regression on each node; taking the logarithmic function and performing maximum optimization, and updating the training with gradient ascent; the word vector of the feature word after training is {[x1, x2, …x n ]1,[x1,x2,…x n ]2,…[x1,x2,…,x n ] m}.

[0056] Step S103, using the support vector machine model to build a user weak emotion analysis model; using the feature words to train and test the model.

[0057] The support vector machine model is similar to a three-layer feedforward neural network in terms of classification and discrimination function. Figure 3 As shown, the hidden layer nodes correspond to the inner product kernel function of the input sample and a support vector, and the output nodes correspond to the linear combination of the hidden layer outputs. The next step is to use the support vector machine model to build a user weak emotion analysis model, and use the feature words to train and test the model. The specific steps are as follows:

[0058] The word vectors are divided into a training set and a test set, and according to the 80 / 20 rule, 80% of the word vectors are used as the training set and 20% of the word vectors are used as the test set. The training set is input into the analysis model of the user's weak emotion.

[0059] Under the constraints

[0060]

[0061] The objective function is used to solve

[0062]

[0063] Maximizing α op , where K(X P ,X j ), p,j=1,2,…P is the pj-th element of the P×P stacked matrix K. The test set is used to test the analysis model of the user's weak emotion to obtain the discrimination accuracy.

[0064] Modify the inner product kernel function K(X P ,X), train and test the model multiple times until the discrimination accuracy of the model reaches a preset standard.

[0065] Step S104: Use the user's weak emotion analysis model to analyze the user's weak emotion in the tax intelligent question and answer system to obtain the user's emotion.

[0066] The corpus of users in the tax intelligent question-answering system is preprocessed to obtain feature words; the emotion category corresponding to the feature words is output using the analysis model of the user's weak emotions to obtain the user's emotions.

[0067] For the feature words to be classified, use the pre-built classification discriminant function

[0068]

[0069] The classification of the feature words is determined according to the result of f(x), and the classification of the feature words is the correspondence between the feature words and the user emotion categories.

[0070] Based on the same inventive concept, the present application also provides a user weak emotion analysis device 400, such as Figure 4 As shown, including:

[0071] The word segmentation unit 410 obtains the user's corpus in the tax intelligent question-answering system and performs word segmentation on the corpus;

[0072] A corresponding relationship establishing unit 420 performs denoising and stop word protection processing on the segmented words, obtains feature words in the segmented words, and establishes a corresponding relationship between the feature words and the user emotion category;

[0073] The model training and testing unit 430 uses the support vector machine model to build a user weak emotion analysis model; and uses the feature words to train and test the model;

[0074] The emotion analysis unit 440 uses the analysis model of the user's weak emotion to analyze the user's weak emotion in the tax intelligent question and answer system to obtain the user's emotion.

[0075] Preferably, the word segmentation unit includes:

[0076] The feature word acquisition subunit removes tax-specific words from the segmented words, retains stop words, and then obtains the feature words in the segmented words

[0077] The present application provides a method and device for analyzing user weak emotions, which have the following advantages:

[0078] Compared with the existing short text classification model, this patent aims to solve the shortcomings of traditional subjective and objective sentiment classification and sentiment analysis methods that cannot adapt to the intelligent customer service question and answer system in the tax professional field and have poor classification effect. By integrating the text features of tax question and answer related corpus and the grammatical habits and tone habits of users who use the intelligent customer service of the tax system, the subjective emotions of user conversations are carefully judged and divided. Compared with existing methods, this model makes maximum use of non-professional related information, improves the judgment ability of weak emotional issues, makes full use of the sequence information between words, and has a better judgment of user emotions through support vector machines, effectively solving the problem that traditional subjective and objective text classification technology cannot train and divide tax text features well.

[0079] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that the specific implementation modes of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be included in the scope of the claims of the present invention.

Claims

1. A method for analyzing user weak emotions, characterized in that: include: Obtaining a corpus of users in the tax intelligent question-answering system and performing word segmentation on the corpus; De-noising and stop word protection are performed on the segmented words to obtain feature words in the segmented words, and a corresponding relationship between the feature words and the user emotion categories is established, including: for the feature words to be classified, a pre-built classification discriminant function is used Determine the classification of feature words based on the result of f(X), and the classification of feature words is the correspondence between feature words and user emotion categories; Using a support vector machine model to build a user weak emotion analysis model; using the feature words to train and test the model, including: Divide the word vectors into training and test sets; Inputting the training set into the analysis model of the user's weak emotion; Under the constraints or α p ≥0 The objective function is used to solve Maximizing α op , where K(X P ,X j ), p,j=1,2,…P are the pth and jth elements of the P×P stacked matrix K, Using the test set to test the user's weak emotion analysis model to obtain a discrimination accuracy rate; Modify the inner product kernel function K(X P ,X), training and testing the model for multiple times until the discrimination accuracy of the model reaches a preset standard; The user's weak emotion analysis model is used to analyze the user's weak emotion in the tax intelligent question and answer system to obtain the user's emotion.

2. The method according to claim 1, characterized in that Performing word segmentation on the corpus includes: Use JieBa tool to divide a sentence or phrase in the corpus into several words according to semantic characteristics.

3. The method according to claim 1, characterized in that De-noising and stop word protection are performed on the segmented words to obtain feature words in the segmented words, including: Remove tax-specific words from the word segmentation, retain stop words, and then obtain the characteristic words in the word segmentation.

4. The method according to claim 1, characterized in that: After the step of obtaining the feature words in the word segmentation, the following steps are also included: The word embedding vector training is performed on the feature words, and the training steps include: Calculate the conditional probability of the feature word under multiple words before and after it, and perform logistic regression on each node; After taking the logarithmic function, perform maximum optimization and use gradient ascent to update the training; The word vector of the feature word after training is {[x1,x2,…x n ]1,[x1,x2,…x n ]2,…[x1,x2,…,x n ] m }.

5. The method according to claim 1, characterized in that The user's weak emotion analysis model is used to analyze the user's weak emotion in the tax intelligent question-answering system to obtain the user's emotions, including: Preprocess the corpus of users in the tax intelligent question-answering system to obtain feature words; The analysis model of the user's weak emotion is used to output the emotion category corresponding to the feature word to obtain the user's emotion.

6. A device for analyzing user weak emotions, characterized in that: include: A word segmentation unit, which obtains a corpus of users in the tax intelligent question-answering system and performs word segmentation on the corpus; The corresponding relationship establishment unit performs denoising and stop word protection on the segmented words, obtains the feature words in the segmented words, and establishes the corresponding relationship between the feature words and the user emotion categories, including: for the feature words to be classified, using a pre-built classification discriminant function Determine the classification of feature words based on the result of f(X), and the classification of feature words is the correspondence between feature words and user emotion categories; The model training and testing unit uses the support vector machine model to build a user weak emotion analysis model; uses the feature words to train and test the model, including: Divide the word vectors into training and test sets; Inputting the training set into the analysis model of the user's weak emotion; Under the constraints 0≤α p ≤C, or α p ≥0 The objective function is used to solve Maximizing α op , where K(X P ,X j ), p,j=1,2,…P are the pth and jth elements of the P×P stacked matrix K, Using the test set to test the user's weak emotion analysis model to obtain a discrimination accuracy rate; Modify the inner product kernel function K(X P ,X), training and testing the model for multiple times until the discrimination accuracy of the model reaches a preset standard; The emotion analysis unit uses the analysis model of the user's weak emotion to analyze the user's weak emotion in the tax intelligent question and answer system to obtain the user's emotion.

7. The device according to claim 6, characterized in that The word segmentation units include: The feature word acquisition sub-unit removes tax-specific words in the segmented words, retains stop words, and then acquires the feature words in the segmented words.