An Emotional Embedded Learning Method and System Based on Emotional Knowledge

By fusion and embedded learning of multiple emotional dictionaries, combined with local and global adjustments of word vector update methods, the problem of inaccurate emotional category recognition in emotion analysis is solved, and the effective fusion of emotional semantics and contextual semantics is achieved, and the accuracy of emotion analysis is improved.

CN114021578BActive Publication Date: 2025-06-03RENMIN UNIVERSITY OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111291530.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-02
Publication Date
2025-06-03
Estimated Expiration
2041-11-02

AI Technical Summary

Technical Problem

The prior art is difficult to accurately identify and judge emotional categories in emotion analysis, and it is impossible to effectively integrate emotional semantics and contextual semantics, resulting in inaccurate emotion recognition.

Method used

By aligning and fusion of emotional words in multiple emotional dictionaries, multi-dimensional emotional space and intensity values ​​are generated, and combined with local adjustment and global adjustment word vector update methods, embedded learning is performed to obtain improved word vectors containing contextual semantics and emotional semantics.

Benefits of technology

It realizes the accurate identification and judgment of emotional categories in emotion analysis, integrates emotional semantics and contextual semantics, and improves the accuracy of emotional polarity classification and multi-category emotional classification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114021578B_ABST
    Figure CN114021578B_ABST
Patent Text Reader

Abstract

The present invention relates to an emotion-embedded learning method and system based on emotion knowledge, which is characterized in that it includes: aligning and integrating emotion words in a number of emotion lexicons to obtain an emotion space expressed by multi-dimensional vectors of each emotion word and the intensity value of each emotion word in the emotion space; performing embedded learning according to the emotion space expressed by the multi-dimensional vectors of each emotion word and the intensity value of each emotion word in the emotion space to obtain an improved word vector of each emotion word including context semantics and emotion semantics. The present invention adjusts the distribution positions of each other in the word semantic space according to the distance between words in the emotion space to achieve the purpose of integrating emotion semantics, and can be widely applied in the field of embedded learning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an emotion-embedded learning method and system based on emotion knowledge, belonging to the field of embedded learning. Background Art

[0002] Generally, for general sentiment analysis or opinion mining tasks, subjective information is extracted and identified from text or multimedia through natural language processing, text analysis, or computational linguistics. Sentiment analysis tasks are different from traditional text classification tasks. First, their categories are mostly positive, negative, and neutral, with the first two or all three categories, and the number of labeled categories is not very large. Second, the analysis problems reflecting subjective opinions are also different from traditional fact analysis problems in terms of characteristics such as users, topics, and cross-domains. The main reasons for such differences are: (1) People describe emotions or express opinions in various ways, and simply from the perspective of text features, it is not sufficient to clearly describe people's emotions; (2) The judgment of emotions does not simply map to polarity classification, and the components of emotions are actually often very complex; (3) Clause reversal or topic change in the text will also be factors affecting the final sentiment category. Sentiment analysis can be divided into three categories according to the level of analysis task granularity: text level, sentence level, and aspect level. Text-level sentiment analysis mainly focuses on the sentiment polarity contained in the whole text. Generally, it assumes a person's opinion description of an entity. The main challenge is that not all sentences in the whole text are necessarily related to sentiment, and sentences related to sentiment need to be found to assist in the analysis, which can be considered a task similar to abstract generation; Sentence-level sentiment analysis can be considered a sub-task of the previous level, that is, the individual analysis of the sentences selected from the text. Since most text paragraphs are relatively large and too rough for sentiment analysis, more detailed division needs to be carried out for each sentence. Generally, it is also assumed that each sentence has only one polarity. Early work mainly focused on the identification of subjective sentences. At this time, the task can be divided into two steps: subjective sentence identification and polarity judgment. Its advantage mainly lies in the classification of subjective or objective; The above analysis levels often cannot point out which aspects people like or dislike. Therefore, a more fine-grained aspect-level analysis appears. This level is similar to named entity recognition and requires means such as syntactic analysis to extract the target of subjective opinions to complete sentiment analysis at a more fine-grained level.

[0003] Sentiment analysis can be classified into unsupervised and supervised categories according to the methods used in the analysis. The former generally requires the use of a sentiment dictionary (SentiNet) to score sentiment words in order to obtain sentiment information in the text. The latter uses feature engineering to extract features contained in the text to help train a classifier. The former needs to perform prior emotion marking or calculation on sentiment words to determine their values on the emotion dimension. Different sentiment dictionaries have different scoring criteria, so they need to be selected and used according to requirements when in use. The most important thing for the latter is the selection of features. Generally used text features include word frequency, N-gram features, sequence kernels, part of speech, syntax trees, adjective / adverb positions, and topic word features, etc. Machine learning models constructed on these features mainly include SVM, Naive Bayes, ensemble learning, and neural networks, etc. With the progress of deep learning in the field of natural language processing, word embedding learning practice has made it possible for embedded learning of sentiment. From the research results of emotion psychology, the generation of human emotions is inseparable from the influence of many aspects such as one's own cognitive structure and psychological construction process. Therefore, it is inevitable to introduce the theory of emotion psychology into sentiment analysis. According to the research findings of the emotion evolution theory in emotion psychology, the composition of emotions is much more complex than simple emotional polarity. This theory holds that emotions are functional and motivational, and there are several fixed basic emotions, each of which has its own unique physiological and neural mechanisms and external manifestations. Other complex emotions are developed on the basis of basic emotions. This view of natural emotion classification has always dominated the scientific research of emotions. Researcher Izard proposed 10 basic emotions, namely happiness, sadness, anger, fear, disgust, surprise, interest, shyness, guilt, and contempt. Researcher Ekman proposed another basic emotion classification, namely happiness, sadness, anger, fear, surprise, and disgust. Researcher Plutchic proposed a more complex three-dimensional emotion structure model, which is divided into intensity, similarity, and bipolarity. In this way, the relationship between different emotions defined will be clearer. Introducing the above emotion classification knowledge into the calculation process of sentiment analysis is one of the effective ways to improve the effect of sentiment analysis.

[0004] At present, in the existing emotional learning or recognition methods, there are usually two orientations: one is to directly use an emotion dictionary to identify emotional words and directly calculate the emotion category and its intensity of the text based on the emotional semantic knowledge contained in the dictionary; the other is to use an embedded learning process to transform the text into a vector. However, most of these methods cannot utilize the semantic knowledge related to emotions and only use the co-occurrence word frequency statistics of the context semantics as the basic feature of the embedded learning. This will result in words with opposite emotional semantics having relatively similar vector representations due to co-occurrence. Under the premise of the above two orientations, the recognition and judgment of emotions are often inaccurate, and the emotion categories that can be recognized are also restricted, and it is impossible to integrate emotional semantics and context semantics. Summary of the Invention

[0005] In view of the above problems, the purpose of the present invention is to provide an emotion knowledge-based emotional embedded learning method and system, which can accurately recognize and judge emotion categories and integrate emotional semantics and context semantics.

[0006] To achieve the above purpose, the present invention adopts the following technical solutions: On the one hand, it provides an emotion knowledge-based emotional embedded learning method, including:

[0007] Align and fuse the emotional words in several emotion dictionaries to obtain the emotional space expressed by the multi-dimensional vectors of each emotional word and the intensity value of each emotional word in the emotional space;

[0008] According to the emotional space expressed by the multi-dimensional vectors of each emotional word and the intensity value of each emotional word in the emotional space, perform embedded learning to obtain an improved word vector for each emotional word including context semantics and emotional semantics.

[0009] Further, the step of aligning and fusing the emotional words in several emotion dictionaries to obtain the emotional space expressed by the multi-dimensional vectors of each emotional word and the intensity value of each emotional word in the emotional space includes:

[0010] Based on the Hownet emotion dictionary, map the words in several emotion dictionaries to multiple corresponding dimensions of the Plutchik color wheel respectively, to obtain the emotional space expressed by the multi-dimensional vectors of each emotional word and the intensity value of each emotional word in the emotional space.

[0011] Further, the step of performing embedded learning according to the emotional space expressed by the multi-dimensional vectors of each emotional word and the intensity value of each emotional word in the emotional space to obtain an improved word vector for each emotional word including context semantics and emotional semantics adopts a word vector update method based on local adjustment or a word vector training method based on global adjustment.

[0012] Furthermore, the specific process of the word vector update method based on local adjustment is as follows:

[0013] Using a word embedding learning model, based on the intensity value of each sentiment word in the sentiment space, adjust the distance between the target sentiment word and its K nearest sentiment words, and obtain the adjusted word vector;

[0014] According to the adjusted word vector, move the target sentiment word to obtain the improved word vector of the target sentiment word.

[0015] Furthermore, when moving the target sentiment word, the vector v of the target sentiment word changes the distance between it and its k nearest neighbor sentiment words with each adjustment of step s, and the objective function of this change is:

[0016]

[0017] In the formula, F(V) is the distance metric between the target sentiment word and its neighboring sentiment words; i is the serial number of the current target sentiment word; n is the number of target sentiment words; j is the serial number of the neighboring sentiment words of the target sentiment word; k is the number of neighboring sentiment words; w ij is the influence weight of the neighboring sentiment word on the target sentiment word; is the value of the word vector of the target sentiment word at the s+1 step; is the value of the word vector of the neighboring sentiment word at the s step; p 1 、p 2 are both proportional values;

[0018] The adjustment amplitude of the vector v of the target sentiment word in each step is:

[0019]

[0020] Furthermore, the word embedding learning model uses the Word2Vec model or the GloVe model.

[0021] Furthermore, the specific process of the word vector training method based on global adjustment is as follows:

[0022] Using the skip window method, calculate the emotional similarity between the target sentiment word and its context sentiment words from the emotion dictionary, and then determine the positive and negative effects between the target sentiment word and its context sentiment words;

[0023] When selecting positive and negative examples, in addition to the words co-occurring in the same window, sample the sentiment words included according to their sentiment distances. The cost function J(w t , w c ) is:

[0024] J(w t ,w c ) = l(v t ·v c ) + J pos (w t ) + J neg (w t )

[0025] Wherein, w t is the target sentiment word; wc is the contextual sentiment word of the target sentiment word; l is the log-likelihood function; v t is the word vector of the target sentiment word; v c is the word vector of the contextual sentiment word; J pos (wt) is the positive emotion cost in the neighborhood of the target sentiment word; J neg (wt) is the negative emotion cost in the neighborhood of the target sentiment word;

[0026] The globalized target formula is:

[0027]

[0028] Wherein, J is the word vector cost on the corpus; N is the number of target sentiment words in the corpus; w t+k is the neighboring sentiment word of the current target sentiment word under the window size k.

[0029] On the other hand, a sentiment embedding learning system based on emotion knowledge is provided, including:

[0030] A word sentiment space determination module, configured to align and fuse sentiment words in a plurality of sentiment lexicons to obtain a sentiment space expressed by multi-dimensional vectors of each sentiment word and the intensity value of each sentiment word in the sentiment space;

[0031] An embedding learning module, configured to perform embedding learning according to the sentiment space expressed by the multi-dimensional vectors of each sentiment word and the intensity value of each sentiment word in the sentiment space, and obtain an improved word vector including context semantics and emotion semantics for each sentiment word.

[0032] On the other hand, a processor is provided, including computer program instructions, wherein the computer program instructions, when executed by the processor, are used to implement the steps corresponding to the above-mentioned sentiment embedding learning method based on emotion knowledge.

[0033] On the other hand, a computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the steps corresponding to the above-mentioned emotion knowledge-based emotional embedded learning method are implemented.

[0034] Due to the above technical solutions adopted by the present invention, it has the following advantages:

[0035] 1. The present invention aligns and fuses multiple emotion lexicons, and obtains the intensity values of emotion words in eight emotion dimensions according to the Plutchik color wheel. The generated lexicon can measure the similarity of emotion words at the emotion level.

[0036] 2. In the process of embedded learning of emotion words, the present invention adds the learning of emotion semantics in addition to the learning of the conceptual semantics of emotion words, that is, introduces the dimension at the emotion level in the learning of word vectors to improve the deficiency of pure conceptual semantics in the emotion analysis task.

[0037] 3. The present invention uses the improved word vectors obtained as the input of the emotion analysis task, which can not only cope with the emotion polarity classification task, but also complete the multi-classification task in eight emotion dimensions.

[0038] 4. The present invention can improve traditional word vector learning from both local and global perspectives, and add the semantics of emotion dimensions to its original semantic space to improve its performance in the emotion analysis task. The difference between the two is that the local method can introduce emotion semantics to any trained word vectors, while the global method trains the word semantics and emotion semantics together at one time. Both adjust their distribution positions in the word semantic space according to the distance between words in the emotion space to achieve the purpose of fusing emotion semantics, and can be widely applied to the field of embedded learning. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] By reading the following detailed description of the preferred embodiments, various other advantages and benefits will become clear to those of ordinary skill in the art. The drawings are only for the purpose of showing the preferred embodiments and are not considered to be a limitation of the present invention. Throughout the drawings, the same reference numerals are used to represent the same components. In the drawings:

[0040] Figure 1 is a schematic diagram of the basic framework of the emotion embedded learning method provided by an embodiment of the present invention;

[0041] Figure 2 is a schematic diagram of the principle of word vector update based on local adjustment provided by an embodiment of the present invention;

[0042] Figure 3It is a schematic diagram of word vector update based on local adjustment provided by an embodiment of the present invention;

[0043] Figure 4 It is a schematic diagram of the change of the emotional space neighbors of the example target emotional words after word vector learning based on global adjustment provided by an embodiment of the present invention. Detailed implementation manners

[0044] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided so that the present invention can be more thoroughly understood and the scope of the present invention can be completely conveyed to those skilled in the art.

[0045] It should be understood that the terms used herein are only for the purpose of describing specific exemplary embodiments and are not intended to be limiting. Unless otherwise clearly specified in the context, the singular forms "a", "an" and "the" as used herein may also include the plural forms. The terms "comprising", "including", "containing" and "having" are inclusive and thus specify the presence of the stated features, steps, operations, elements and / or components, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, and / or combinations thereof. The method steps, processes, and operations described herein are not to be construed as necessarily requiring them to be performed in the particular order described or illustrated, unless the order of performance is explicitly stated. It should also be understood that additional or alternative steps may be used.

[0046] The emotion knowledge-based emotion-embedded learning method and system provided by the embodiments of the present invention include the integration and fusion of emotion lexicons to generate a unified, multi-dimensional emotion lexicon, the combination of embedded learning and emotion classification models to become a feasible solution for sentiment analysis in the deep learning framework, and the improved word vector representation to improve the sentiment analysis effect. Specifically, emotion knowledge is introduced when performing embedded learning on emotion words so that while learning word vectors, emotion information can also be learned, thereby fusing the semantic space and the emotion space and providing more accurate, emotion-semantic-containing input for the calculations related to sentiment analysis.

[0047] Term explanations:

[0048] 1. Word2Vec is a model that learns semantic knowledge in an unsupervised manner from a large amount of text corpora;

[0049] 2. GloVe is a word embedding tool;

[0050] 3. Skip-Gram is a model in the Word2Vec model.

[0051] Example 1

[0052] As Figure 1 shown, this embodiment provides an emotion-embedded learning method based on emotion knowledge, including the following steps:

[0053] 1) Based on the Hownet emotion dictionary (HowNet emotion dictionary), align and fuse the emotion words in existing emotion dictionaries such as those of Dalian University of Technology and Tsinghua University, that is, map the words in several emotion dictionaries to the 8 corresponding dimensions of the Plutchik color wheel respectively, to obtain the emotion space expressed by the 8-dimensional vector of each emotion word and the intensity value of each emotion word in the emotion space. Among them, the intensity value of the emotion word in the emotion space can be filled according to the values in each emotion dictionary, and generally can be divided into 4 levels.

[0054] 2) According to the emotion space expressed by the 8-dimensional vector of each emotion word and the intensity value of each emotion word in the emotion space, perform embedded learning to obtain an improved word vector for each emotion word that includes both context semantics and emotion semantics. At this time, the word vector not only includes context semantics, but also includes emotion semantics, which significantly improves both the emotion category judgment task and the emotion analysis effect.

[0055] In the above step 2), according to the emotion space expressed by the 8-dimensional vector of each emotion word and the intensity value of each emotion word, perform embedded learning to obtain an improved word vector for each emotion word that includes both context semantics and emotion semantics. A word vector update method based on local adjustment can be used. The specific process is as follows:

[0056] ① The semantics of emotion words do not include emotion semantics during initial training. That is to say, the embedded learning process of word vectors still uses traditional word embedding learning models, which can be traditional word embedding learning models such as Word2Vec or GloVe. Therefore, use traditional word embedding learning models such as the Word2Vec model or GloVe model. Based on the intensity value of each emotion word in the emotion space, adjust the distance between the target emotion word and the K emotion words closest to it in the emotion space (K can be adjusted according to actual training data as a parameter), to obtain the adjusted semantic distance ranking, that is, the adjusted word vector.

[0057] For example: As Figure 2As shown in the figure, the emotional words closest to the target emotional word "safety" during the initial training include "safety", "danger", "safe life", "stable", "critical", "well-being", "prosperity", "turbulence", "harmony", etc., and are sorted by semantic distance according to the co-occurrence of the context; the intensity value of each emotional word in the emotional space has been determined, and the re-sorting results are shown in the figure according to the distance between each emotional word and the target emotional word in the emotional space. Figure 2 The right column shows.

[0058] ② According to the adjusted word vector, move the target sentiment word to obtain the improved word vector of the target sentiment word, for example: Figure 3 The figure shows a schematic diagram of moving the target sentiment word "safety". The target sentiment word will move to sentiment words with similar sentiments, that is, to sentiment words with higher rankings in the semantic distance sorting, and move away from sentiment words with opposite or dissimilar sentiments, that is, away from sentiment words with lower rankings in the semantic distance sorting. The distance between the vector v of the target sentiment word and its k nearest neighbor sentiment words will change through the adjustment of each step s, and the objective function of this change is:

[0059]

[0060] Where F(V) is the distance measure between the target sentiment word and its neighbor sentiment words; i is the sequence number of the current target sentiment word; n is the number of target sentiment words; j is the sequence number of the neighbor sentiment words of the target sentiment word; k is the number of neighbor sentiment words; w ij is the influence weight of the neighboring sentiment words on the target sentiment word, which is generally taken as the inverse of its influence ranking; is the value of the target sentiment word vector at the s+1th step; is the value of the word vector of the neighboring sentiment words at the sth step.

[0061] In order to make the target emotional word not only reflect the distance of the emotional space in terms of emotional semantics, but also maintain its own semantic space information, the vector v of the target emotional word cannot move too far, otherwise it will change its own semantic information. Therefore, the above formula (1) needs to be divided into two parts, one is to measure the degree of change of the vector v of the target emotional word from its original position when it moves, and the other is to measure the degree of change of the distance between the vector v of the target emotional word and its neighbors. The improved objective function is:

[0062]

[0063] Where p1 is a proportional value, which is responsible for controlling the first part, that is, calculating the influence of the word vector change between the previous and next steps of the target sentiment word; p2 is another proportional value, responsible for controlling the second part, that is, calculating the influence of the change in word vectors between the steps before and after the neighboring sentiment words. p 1 and p 2 The proportional relationship can be determined through repeated tests. In actual tests, it can be observed that it is more appropriate to control the proportion between 0.03 and 0.1.

[0064] The amplitude of the adjustment of the vector v of the target sentiment word to the word vector in each step of learning the word vector is:

[0065]

[0066] In the above step 2), according to the sentiment space expressed by the 8-dimensional vector of each sentiment word and the intensity value of each sentiment word, embedded learning is performed. To obtain the improved word vector of each sentiment word including context semantics and emotional semantics, a word vector training method based on global adjustment can be used.

[0067] Furthermore, the word vector training method based on global adjustment adds emotional semantic information in the original word vector training process, so that all sentiment words fuse the emotional semantics of the sentiment words while training the word semantics. In this way, the method of training the context semantics and emotional semantics of words at the same time in one go strengthens the adjustment process of the word semantic vector in the local adjustment method. In fact, it takes into account the emotional semantic distance between the target sentiment word and all other non-target sentiment words, rather than only considering the influence of the first k co-occurring neighboring sentiment words. Based on the Word2Vec word embedding learning model, the present invention reconstructs a word vector learning process that fuses semantics and sentiment by improving the positive and negative example sampling mechanism and modifying the objective function. The specific process is as follows:

[0068] Using the Skip-Gram method, calculate the emotional similarity between the target sentiment word and its context sentiment words from the emotion dictionary, and then determine the positive and negative effects between the target sentiment word and its context sentiment words. When selecting positive and negative examples, in addition to the sentiment words co-occurring in the same window, sample the sentiment words included according to their emotional distance. The present invention uses the following formula (4) to define the cost function J(w t , w c ):

[0069] J(w t , w c ) = l(v t ·v c ) + J pos (w t ) + J neg(w t ) (4)

[0070] where w t is the target sentiment word; w c is the context sentiment word of the target sentiment word; l is the log-likelihood function; v t is the word vector of the target sentiment word; v c is the word vector of the context sentiment word; J pos (w t ) is the positive emotion cost in the neighbors of the target sentiment word; J neg (w t ) is the negative emotion cost in the neighbors of the target sentiment word.

[0071] The global objective formula is:

[0072]

[0073] where J is the word vector cost on the corpus; N is the number of target sentiment words in the corpus; w t+k is the neighboring sentiment word of the current target sentiment word under the window size k.

[0074] The above formula (5) sums up the losses between each pair of sentiment words, thereby completing the global loss calculation, and further helping the final generation of word vectors. As Figure 4 shown, it shows the changes in the neighbors between sentiment words before and after adopting the global adjustment word vector training method of the present invention. It can be clearly seen that words with similar emotional semantics will get closer, and vice versa.

[0075] The emotion knowledge-based sentiment embedding learning method of the present invention has an improvement effect on various context semantic training-based word vectors.

[0076] For example: On a corpus set composed of movie reviews, vector representations of all sentiment words involved currently are obtained using different word vector generation tools such as Word2Vec and GloVec; the Emo2Vec tool is used to fine-tune the vector of emotion words among them, and the final word vector set obtained at this time is used as the input basis for the classifier; the text in the training data is converted into a text vector according to this word vector set and sent as input to a deep learning classifier (generally, it can be a long short-term memory network classifier or a convolutional network classifier) to complete the training process. The classification categories can be sentiment polarity (such as negative, positive or neutral), or can be multiple emotion categories (such as anger, joy, sadness, happiness, etc.); finally, the test text is converted into a text vector and input into the deep learning classifier, and the deep learning classifier outputs the sentiment polarity or emotion category of the corresponding text at this time. Experiments show that, compared with the case of not using the method of the present invention and the case of using the method of the present invention, the average accuracy of sentiment polarity recognition can be increased by 12%, and the average accuracy of emotion category recognition can be increased by 10%. The improvement of this sentiment recognition accuracy is more obvious on the Sina Weibo dataset, mainly because the corpus data is larger and richer, making the learning of word vectors more accurate.

[0077] Embodiment 2

[0078] This embodiment provides an emotion knowledge-based sentiment embedding learning system, including:

[0079] A word sentiment space determination module, configured to align and fuse sentiment words in a plurality of sentiment dictionaries to obtain a sentiment space expressed by an 8-dimensional vector of each sentiment word and the intensity value of each sentiment word in the sentiment space.

[0080] An embedding learning module, configured to perform embedding learning according to the sentiment space expressed by the 8-dimensional vector of each sentiment word and the intensity value of each sentiment word in the sentiment space to obtain an improved word vector of each sentiment word including context semantics and emotion semantics.

[0081] Embodiment 3

[0082] This embodiment provides a processing device corresponding to the emotion knowledge-based sentiment embedding learning method provided in Embodiment 1. The processing device can be a processing device for a client, such as a mobile phone, a notebook computer, a tablet computer, a desktop computer, etc., to execute the method of Embodiment 1.

[0083] The processing device includes a processor, a memory, a communication interface, and a bus. The processor, the memory, and the communication interface are connected through the bus to complete communication with each other. The memory stores a computer program that can run on the processor. When the processor runs the computer program, it executes the emotion knowledge-based emotional embedded learning method provided in Embodiment 1 of the present invention.

[0084] In some implementations, the memory may be a high-speed random access memory (RAM), and may also include non-volatile memory, such as at least one disk memory.

[0085] In other implementations, the processor may be a general-purpose processor of various types such as a central processing unit (CPU) or a digital signal processor (DSP), which is not limited herein.

[0086] Embodiment 4

[0087] The emotion knowledge-based emotional embedded learning method of Embodiment 1 of the present invention can be specifically implemented as a computer program product. The computer program product may include a computer-readable storage medium, on which computer-readable program instructions for executing the voice recognition method described in Embodiment 1 of the present invention are uploaded.

[0088] The computer-readable storage medium may be a tangible device that holds and stores instructions used by an instruction execution device. The computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any combination of the above.

[0089] The above embodiments are only used to illustrate the present invention. The structures, connection methods, manufacturing processes, etc. of each component can be changed. Any equivalent transformation and improvement based on the technical solution of the present invention should not be excluded from the protection scope of the present invention.

Claims

1. An emotion-embedded learning method based on emotion knowledge, characterized in that, it includes: Aligning and fusing the emotion words in several emotion lexicons to obtain the emotion space expressed by the multi-dimensional vectors of each emotion word and the intensity value of each emotion word in the emotion space; Performing embedded learning according to the emotion space expressed by the multi-dimensional vectors of each emotion word and the intensity value of each emotion word in the emotion space to obtain an improved word vector including context semantics and emotion semantics for each emotion word; The aligning and fusing the emotion words in several emotion lexicons to obtain the emotion space expressed by the multi-dimensional vectors of each emotion word and the intensity value of each emotion word in the emotion space includes: Based on the Hownet emotion lexicon, mapping the words in several emotion dictionaries to multiple corresponding dimensions of the Plutchik color wheel respectively, to obtain the emotion space expressed by the multi-dimensional vectors of each emotion word and the intensity value of each emotion word in the emotion space; The performing embedded learning according to the emotion space expressed by the multi-dimensional vectors of each emotion word and the intensity value of each emotion word in the emotion space to obtain an improved word vector including context semantics and emotion semantics for each emotion word can adopt a word vector update method based on local adjustment or a word vector training method based on global adjustment; The specific process of the word vector update method based on local adjustment is: Adopting a word embedding learning model, based on the intensity value of each emotion word in the emotion space, adjusting the distance between the target emotion word and its K nearest emotion words, to obtain an adjusted word vector; According to the adjusted word vector, moving the target emotion word to obtain an improved word vector of the target emotion word; The specific process of the word vector training method based on global adjustment is: Adopting a skip window method, calculating the emotion similarity between the target emotion word and its context emotion words from the emotion lexicon, and then determining the positive and negative effects between the target emotion word and its context emotion words; When selecting positive and negative examples, in addition to the words co-occurring in the same window, sample the sentiment words included according to their sentiment distance. The cost function J(w t , w c ) is as follows: J(w t , w c ) = l(v t ·v c ) + J pos (w t ) + J neg (w t ) where w t is the target sentiment word; w c is the context sentiment word of the target sentiment word; l is the log-likelihood function; v t is the word vector of the target sentiment word; v c is the word vector of the context sentiment word; J pos (w t ) is the positive emotion cost among the neighbors of the target sentiment word; J neg (w t ) is the negative emotion cost among the neighbors of the target sentiment word; The global objective formula is: where J is the cost of word vectors on the corpus; N is the number of target sentiment words in the corpus; w t+k is the neighboring sentiment word of the current target sentiment word under the window size k.

2. An emotion-embedded learning method based on emotion knowledge as described in claim 1, characterized in that, when moving the target emotion word, the vector v of the target emotion word changes the distance from its k nearest neighbor emotion words through the adjustment of each step s, and the objective function of this change is: In the formula, F(V) is the distance metric between the target emotion word and its neighbor emotion words; i is the serial number of the current target sentiment word; n is the number of target sentiment words; j is the serial number of the neighboring sentiment words of the target sentiment word; k is the number of neighboring sentiment words; w ij is the influence weight of the neighboring sentiment word on the target sentiment word; is the value of the target sentiment word vector at the (s + 1)-th step; is the value of the neighboring sentiment word vector at the s-th step; p 1 and p 2 are both proportional values; The adjustment amplitude of the vector v of the target emotion word in each step is:

3. An emotion-embedded learning method based on emotion knowledge as described in claim 1, characterized in that, the word embedding learning model adopts a Word2Vec model or a GloVe model.

4. An emotion-embedded learning system based on emotion knowledge, characterized in that, it includes: A word emotion space determination module, configured to align and fuse the emotion words in several emotion lexicons to obtain the emotion space expressed by the multi-dimensional vectors of each emotion word and the intensity value of each emotion word in the emotion space; An embedded learning module is used to perform embedded learning based on the emotion space expressed by the multi-dimensional vectors of each emotion word and the intensity value of each emotion word in the emotion space, so as to obtain an improved word vector for each emotion word that includes context semantics and emotion semantics; The alignment and fusion of emotion words in several emotion lexicons to obtain the emotion space expressed by the multi-dimensional vectors of each emotion word and the intensity value of each emotion word in the emotion space includes: Based on the Hownet emotion lexicon, the words in several emotion dictionaries are respectively mapped to multiple corresponding dimensions of the Plutchik color wheel to obtain the emotion space expressed by the multi-dimensional vectors of each emotion word and the intensity value of each emotion word in the emotion space; The embedded learning based on the emotion space expressed by the multi-dimensional vectors of each emotion word and the intensity value of each emotion word in the emotion space to obtain an improved word vector for each emotion word that includes context semantics and emotion semantics can adopt a word vector update method based on local adjustment or a word vector training method based on global adjustment; The specific process of the word vector update method based on local adjustment is: Using a word embedding learning model, based on the intensity value of each emotion word in the emotion space, adjust the distance between the target emotion word and the K emotion words closest to itself to obtain an adjusted word vector; According to the adjusted word vector, move the target emotion word to obtain an improved word vector for the target emotion word; The specific process of the word vector training method based on global adjustment is: Using the skip window method, calculate the emotion similarity between the target emotion word and its context emotion words from the emotion lexicon, and then determine the positive and negative effects between the target emotion word and its context emotion words; When selecting positive and negative examples, in addition to the words co-occurring in the same window, the sentiment words included are sampled according to their sentiment distance. The cost function J(w t ,w c ) between the target sentiment word and its context sentiment words is as follows: J(w t ,w c ) = l(v t ·v c ) + J pos (w t ) + J neg (w t ) where, w t is the target sentiment word; w c is the context sentiment word of the target sentiment word; l is the log-likelihood function; v t is the word vector of the target sentiment word; v c is the word vector of the context sentiment word; J pos (w t ) is the positive emotion cost among the neighbors of the target sentiment word; J neg (w t ) is the negative emotion cost among the neighbors of the target sentiment word; The global objective formula is: where J is the cost of word vectors on the corpus; N is the number of target sentiment words in the corpus; w t+k is the neighboring sentiment word of the current target sentiment word under the window size k.

5. A processor, characterized in that, it includes computer program instructions, wherein when the computer program instructions are executed by the processor, they are used to implement the steps corresponding to the emotion-based embedded learning method according to any one of claims 1-3.

6. A computer-readable storage medium, characterized in that, the computer-readable storage medium stores computer program instructions, wherein when the computer program instructions are executed by the processor, they are used to implement the steps corresponding to the emotion-based embedded learning method according to any one of claims 1-3.

Citation Information

Patent Citations

  • Sentiment analysis method based on Skip-gram model fusing part-of-speech and semantic information

    CN108733653A

  • A method of constructing Chinese affective dictionary based on word vector learning model in micro-blog

    CN109376251A