CN117932058A - Emotion recognition method, device and equipment based on text analysis - Google Patents
Emotion recognition method, device and equipment based on text analysis Download PDFInfo
- Publication number
- CN117932058A CN117932058A CN202311742748.4A CN202311742748A CN117932058A CN 117932058 A CN117932058 A CN 117932058A CN 202311742748 A CN202311742748 A CN 202311742748A CN 117932058 A CN117932058 A CN 117932058A
- Authority
- CN
- China
- Prior art keywords
- text
- user feedback
- knowledge
- candidate
- description knowledge
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/35—Clustering; Classification
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/22—Matching criteria, e.g. proximity measures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/25—Fusion techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/30—Semantic analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Artificial Intelligence (AREA)
- Life Sciences & Earth Sciences (AREA)
- Evolutionary Computation (AREA)
- General Health & Medical Sciences (AREA)
- Computational Linguistics (AREA)
- Health & Medical Sciences (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Biology (AREA)
- Bioinformatics & Computational Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Databases & Information Systems (AREA)
- Machine Translation (AREA)
Abstract
The invention provides a text analysis-based emotion recognition method, a text analysis-based emotion recognition device and text analysis-based emotion recognition equipment, wherein in the implementation process of the method, the highlighting of homogenization features is carried out on auxiliary user feedback text description knowledge corresponding to each auxiliary user feedback text, so that similarity information of different target emotion polarities in different auxiliary user feedback texts is expressed more abundantly and finely, in other words, the feature information expression quality of the similarity information of each sample is increased, and therefore, the highlighting text description knowledge is applied in a subsequent task, whether the target emotion polarities are contained in candidate text paragraphs is evaluated more accurately, and the emotion recognition reliability is improved.
Description
Technical Field
The present disclosure relates to the field of text data processing, and more particularly, to a method, apparatus, and device for emotion recognition based on text analysis.
Background
Text emotion recognition (Text SentimentAnalysis) is an important task in the field of natural language processing, aiming at recognizing and analyzing emotion tendencies expressed in text. Along with the rapid growth of text data such as social media, online comments, product evaluation, opinion feedback and the like, emotion recognition becomes a key technology in the application fields such as information retrieval, public opinion monitoring, user emotion analysis and the like. For example, in the internet operation platform, through carrying out emotion recognition on the feedback text of the user, the operation condition of the target service or the target product can be effectively helped to be known. How to improve the accuracy of text emotion recognition is the key point of current research in the technical field.
Disclosure of Invention
In view of this, embodiments of the present disclosure at least provide a method, an apparatus, and a device for emotion recognition based on text analysis.
According to an aspect of the embodiments of the present disclosure, there is provided a emotion recognition method based on text analysis, applied to an electronic device, the method including:
responding to the emotion recognition command, and acquiring a user feedback text to be recognized and at least one auxiliary user feedback text;
Extracting to obtain to-be-identified user feedback text description knowledge from the to-be-identified user feedback text, and extracting to obtain at least one auxiliary user feedback text description knowledge from at least one auxiliary user feedback text of target emotion polarity respectively; the auxiliary user feedback text is a user feedback text marked with text paragraph distribution information corresponding to the target emotion polarity;
Respectively carrying out highlighting processing of homogenization characteristics on the feedback text description knowledge of each auxiliary user to obtain highlighting text description knowledge corresponding to each feedback text of the auxiliary user; wherein the homogeneity characteristic is used for indicating similarity information of the target emotion polarity in at least one of the auxiliary user feedback texts;
Determining at least one candidate text paragraph in the user feedback text to be identified according to the user feedback text description knowledge to be identified;
And determining a target text paragraph corresponding to the target emotion polarity in at least one candidate text paragraph according to the prominent text description knowledge of each auxiliary user feedback text and the candidate text description knowledge corresponding to each candidate text paragraph.
According to an example of an embodiment of the present disclosure, the performing, for each of the auxiliary user feedback text description knowledge, a highlighting process of a homogenization feature, to obtain highlighting text description knowledge corresponding to each of the auxiliary user feedback text, includes:
Carrying out knowledge feature combination on at least one auxiliary user feedback text description knowledge to obtain combined auxiliary description knowledge;
performing multiple description knowledge extraction on the combined auxiliary description knowledge to obtain multiple extracted knowledge arrays;
The refined knowledge array comprises array construction elements corresponding to each auxiliary user feedback text description knowledge;
And highlighting the homogeneous characteristics in the feedback text description knowledge of each auxiliary user according to a plurality of refined knowledge arrays to obtain the highlighting text description knowledge corresponding to each auxiliary user feedback text.
According to an example of an embodiment of the present disclosure, the determining, according to the highlighted text description knowledge of each of the auxiliary user feedback texts and the candidate text description knowledge corresponding to each of the candidate text paragraphs, a target text paragraph corresponding to the target emotion polarity in not less than one of the candidate text paragraphs includes:
Acquiring a first saliency adjustment variable of candidate text description knowledge corresponding to each candidate text paragraph according to the salient text description knowledge of each auxiliary user feedback text; wherein the first saliency adjustment variable is used for indicating the coincidence degree of user feedback text content included in the candidate text passage and the target emotion polarity;
Weighting and adjusting the candidate text description knowledge based on the first saliency adjustment variable to obtain adjustment text description knowledge of each candidate text paragraph;
And determining the target text paragraph corresponding to the target emotion polarity in at least one candidate text paragraph according to the adjustment text description knowledge of each candidate text paragraph.
According to an example of an embodiment of the present disclosure, the determining, according to the adjustment text description knowledge of each candidate text paragraph, the target text paragraph corresponding to the target emotion polarity in not less than one candidate text paragraph includes:
acquiring the emotion type and the credibility of the user feedback text of each candidate text paragraph according to the adjustment text description knowledge of each candidate text paragraph;
Determining at least one candidate text paragraph reaching a set condition as the target text paragraph corresponding to the target emotion polarity; the setting condition is that the emotion type of the text fed back by the user is consistent with the polarity of the target emotion, and meanwhile the credibility is larger than a credibility threshold.
According to an example of an embodiment of the present disclosure, the obtaining, according to the highlighted text description knowledge of each of the auxiliary user feedback texts, a first saliency adjustment variable of candidate text description knowledge corresponding to each of the candidate text paragraphs includes:
Combining the salient text description knowledge of each auxiliary user feedback text to obtain combined salient description knowledge, and combining the candidate text description knowledge of each candidate text paragraph to obtain combined candidate description knowledge;
extracting the description knowledge for two or more times aiming at the merging and salient description knowledge to obtain a plurality of salient knowledge arrays, and extracting the description knowledge aiming at the merging and candidate description knowledge to obtain candidate knowledge arrays; wherein the candidate knowledge array comprises array construction elements corresponding to candidate text description knowledge of each candidate text paragraph;
Based on executing attention mapping integration on a plurality of the prominent knowledge arrays and the candidate knowledge arrays, obtaining a significance adjusting variable of each number group construction element of the candidate knowledge arrays;
And determining the saliency adjustment variable of each number group of construction elements of the candidate knowledge array as the first saliency adjustment variable of the candidate text description knowledge corresponding to the candidate text paragraph.
According to an example of an embodiment of the present disclosure, the determining, according to the highlighted text description knowledge of each of the auxiliary user feedback texts and the candidate text description knowledge corresponding to each of the candidate text paragraphs, a target text paragraph corresponding to the target emotion polarity in not less than one of the candidate text paragraphs includes:
averaging the prominent text description knowledge of at least one auxiliary user feedback text to obtain average text description knowledge;
determining knowledge similarity scores of the average text description knowledge and candidate text description knowledge corresponding to each candidate text paragraph;
Determining a target text paragraph corresponding to the target emotion polarity in at least one candidate text paragraph according to the knowledge similarity score;
The method further includes, after the highlighting of the homogenization feature is performed on each of the feedback text description knowledge of the auxiliary user to obtain the highlighting text description knowledge corresponding to each of the feedback text of the auxiliary user, determining, according to the highlighting text description knowledge of each of the feedback text of the auxiliary user and the candidate text description knowledge corresponding to each of the candidate text paragraphs, before determining, in at least one of the candidate text paragraphs, a target text paragraph corresponding to the target emotion polarity:
Acquiring a second saliency adjustment variable according to the prominent text description knowledge corresponding to each auxiliary user feedback text and each composition text description knowledge of the text description knowledge to be identified;
Based on the second significance adjustment variable, carrying out weighted adjustment on each composition text description knowledge to obtain adjustment composition text description knowledge;
And determining not less than one candidate text paragraph in the feedback text of the user to be identified according to each adjustment composition text description knowledge.
According to an example of an embodiment of the present disclosure, the extracting, from at least one auxiliary user feedback text of the target emotion polarity, respectively, obtaining at least one auxiliary user feedback text description knowledge includes:
Extracting description knowledge of the marked text paragraphs with the target emotion polarity in at least one feedback text of the auxiliary user to obtain at least one description knowledge of the target paragraphs;
Extracting description knowledge of user feedback text content of at least one auxiliary user feedback text to obtain at least one initial text description knowledge;
and carrying out corresponding knowledge interaction on at least one target paragraph description knowledge and at least one initial text description knowledge to obtain at least one auxiliary user feedback text description knowledge.
According to an example of an embodiment of the present disclosure, the highlighting of the homogenization feature is performed on each of the auxiliary user feedback text description knowledge, and after obtaining the highlighting text description knowledge corresponding to each of the auxiliary user feedback text, the method further includes:
Storing the salient text description knowledge corresponding to each auxiliary user feedback text; the highlighted text description knowledge is further used for determining an updated target text paragraph corresponding to the target emotion polarity in at least one updated candidate text paragraph of the updated user feedback text to be identified;
extracting to-be-identified user feedback text description knowledge from the to-be-identified user feedback text, and determining a target text paragraph corresponding to the target emotion polarity from at least one candidate text paragraph according to the prominent text description knowledge of each auxiliary user feedback text and the candidate text description knowledge corresponding to each candidate text paragraph by using a target emotion recognition algorithm; before extracting the description knowledge of the feedback text of the user to be identified from the feedback text of the user to be identified, the method further comprises a training step of a target emotion recognition algorithm, which comprises the following steps:
Acquiring a first user feedback text learning sample and a second user feedback text learning sample; wherein the number of tagged text in the first user feedback text learning sample is greater than the number of tagged text in the second user feedback text learning sample;
Training an initial emotion recognition algorithm based on the first user feedback text learning sample to obtain a transition emotion recognition algorithm;
extracting candidate user feedback text learning samples from the second user feedback text learning samples; the candidate user feedback text learning samples comprise x mark learning samples, wherein the mark learning samples are user feedback texts for marking text paragraph distribution information of the target emotion polarity;
Training the transition emotion recognition algorithm based on a target user feedback text learning sample formed by the first user feedback text learning sample and the candidate user feedback text learning sample to obtain the target emotion recognition algorithm.
According to another aspect of the embodiments of the present disclosure, there is provided a emotion recognition device based on text analysis, including:
the text data acquisition module is used for responding to the emotion recognition command and acquiring a user feedback text to be recognized and at least one auxiliary user feedback text;
the text feature extraction module is used for extracting to obtain to-be-identified user feedback text description knowledge from the to-be-identified user feedback text, and extracting to obtain at least one auxiliary user feedback text description knowledge from at least one auxiliary user feedback text of target emotion polarity respectively; the auxiliary user feedback text is a user feedback text marked with text paragraph distribution information corresponding to the target emotion polarity;
The homogeneous feature highlighting module is used for respectively highlighting the homogeneous features for the feedback text description knowledge of each auxiliary user to obtain the corresponding highlighting text description knowledge of each auxiliary user feedback text; wherein the homogeneity characteristic is used for indicating similarity information of the target emotion polarity in at least one of the auxiliary user feedback texts;
a text paragraph initialization module, configured to determine at least one candidate text paragraph in the user feedback text to be identified according to the user feedback text description knowledge to be identified;
And the text paragraph determining module is used for determining a target text paragraph corresponding to the target emotion polarity in at least one candidate text paragraph according to the prominent text description knowledge of each auxiliary user feedback text and the candidate text description knowledge corresponding to each candidate text paragraph.
According to still another aspect of the embodiments of the present disclosure, there is provided an electronic device including: a processor; and a memory, wherein the memory has stored therein a computer program which, when executed by the processor, causes the processor to perform the method as described above.
The beneficial effects of the present disclosure are at least:
in the implementation process of the method, the auxiliary user feedback text description knowledge corresponding to each auxiliary user feedback text is subjected to highlighting of homogenization characteristics, so that similarity information of different target emotion polarities in different auxiliary user feedback texts is expressed more abundantly and finely, in other words, the feature information expression quality of the similarity information of each sample is increased, and therefore, whether the target emotion polarities are contained in candidate text paragraphs is evaluated more accurately by applying the highlighting text description knowledge in a subsequent task, and the reliability of emotion recognition is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the aspects of the disclosure.
Drawings
The above and other objects, features and advantages of the presently disclosed embodiments will become more apparent from the more detailed description of the presently disclosed embodiments when taken in conjunction with the accompanying drawings. The accompanying drawings are included to provide a further understanding of embodiments of the disclosure, and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the disclosure, without limitation to the disclosure. In the drawings, like reference numerals generally refer to like parts or steps.
Fig. 1 is a schematic diagram of an application scenario provided in an embodiment of the present disclosure.
Fig. 2 is a schematic implementation flow chart of a emotion recognition method based on text analysis according to an embodiment of the disclosure.
Fig. 3 is a schematic diagram of a composition structure of an emotion recognition device based on text analysis according to an embodiment of the present disclosure.
Fig. 4 is a schematic diagram of a hardware entity of an electronic device according to an embodiment of the disclosure.
Detailed Description
The technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure. It will be apparent that the described embodiments are merely embodiments of a portion, but not all, of the present disclosure. All other embodiments, which can be made by one of ordinary skill in the art without the need for inventive faculty, are intended to be within the scope of the present disclosure, based on the embodiments in this disclosure.
For the purpose of making the objects, technical solutions and advantages of the present disclosure more apparent, the technical solutions of the present disclosure are further elaborated below in conjunction with the drawings and the embodiments, and the described embodiments should not be construed as limiting the present disclosure, and all other embodiments obtained by those skilled in the art without making inventive efforts are within the scope of protection of the present disclosure.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is to be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments and can be combined with one another without conflict. The term "first/second/third" is merely to distinguish similar objects and does not represent a particular ordering of objects, it being understood that the "first/second/third" may be interchanged with a particular order or precedence where allowed, to enable embodiments of the disclosure described herein to be implemented in other than those illustrated or described herein.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs. The terminology used herein is for the purpose of describing the present disclosure only and is not intended to be limiting of the present disclosure.
The emotion recognition method based on text analysis provided by the embodiment of the disclosure can be applied to an application environment as shown in fig. 1. Wherein the client 102 communicates with the electronic device 104 over a network. The data storage system may store data that the electronic device 104 needs to process. The data storage system may be integrated on the electronic device 104 or may be located on a cloud or other network server. The user feedback text data may be stored in a local storage of the client 102, or may be stored in a data storage system or a cloud storage associated with the electronic device 104, and when text emotion recognition is required, the electronic device 104 may obtain the user feedback text data from the local storage of the client 102, or from the data storage system or the cloud storage. The client 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things devices, and portable wearable devices, where the internet of things devices may be smart speakers, smart televisions, smart air conditioners, smart vehicle devices, and the like. The portable wearable device may be a smart watch, smart bracelet, headset, or the like. The electronic device 104 may be implemented as a stand-alone server or as a cluster of servers.
Text emotion recognition is an important application in the field of Natural Language Processing (NLP) that aims to recognize and understand emotion colors contained in text, including positive, negative or neutral emotion. With the tremendous increase in social media, online reviews, and user-generated content, text emotion recognition is becoming a significant technology. The text emotion recognition generally adopts a deep learning algorithm, such as a Bert model, and after training based on a text sample marked in advance, adopts the trained deep learning algorithm to recognize a target text, so as to obtain a corresponding text emotion, and determines the paragraph position of the corresponding text emotion in the text. However, the numbers of samples corresponding to different types of emotions are different, the numbers of marked samples corresponding to certain emotions are smaller, and the reliability of emotion recognition of the algorithm obtained through training is poor. In order to overcome this problem, in the prior art, adaptive learning (ADAPTIVE LEARNING) is used to perform emotion recognition, for example, fewer text samples are used as auxiliary text samples (also called supporting text) to train a text emotion recognition algorithm, in the emotion prediction process, corresponding description knowledge is extracted from an input text to be recognized and the auxiliary text samples respectively, different description knowledge is averaged to obtain clustering points of each emotion category, the clustering points and the input description knowledge of the text to be recognized are fused, text emotion of one category is determined in the text to be recognized, and the paragraph position of the text is determined. However, the auxiliary text samples may contain disturbance information, so that feature expression is inaccurate, for example, the text samples of different emotion types are too similar, or the text samples of one emotion type have large difference in text expression or words, so that when one emotion type but different text samples perform feature expression, the homogeneity expression effect among the text samples is insufficient, so that the homogeneity of the text samples of the same emotion type is desalted, and the recognition accuracy of the emotion type is insufficient.
In the embodiment of the disclosure, the salient processing of the homogenization features is performed on the auxiliary user feedback text description knowledge corresponding to each auxiliary user feedback text, so that the similarity information of different target emotion polarities in different auxiliary user feedback texts is expressed more abundantly and finely, in other words, the feature information expression quality of the similarity information of each sample is increased, so that the salient text description knowledge is applied in a subsequent task, whether the target emotion polarities are contained in the candidate text paragraphs is evaluated more accurately, and the reliability of emotion recognition is improved.
The following describes in detail the execution process of the emotion recognition method based on text analysis provided by the embodiment of the present disclosure, where the emotion recognition method based on text analysis provided by the embodiment of the present disclosure is applied to an electronic device, please refer to fig. 2, specifically including the following steps:
s10: in response to the emotion recognition command, a user feedback text to be recognized and at least one auxiliary user feedback text are acquired.
The emotion recognition instruction can be an instruction which is automatically triggered in real time when the electronic equipment acquires the text to be recognized fed back by the user, or an instruction which is triggered after a plurality of user feedback texts are acquired, and the triggering time is not limited. The user feedback text is text information generated after the user inputs text on the feedback platform, for example, the feedback text such as event suggestion, service complaints, product evaluation and the like is performed on an internet platform which is dominant by the user such as an electronic commerce platform, a financial platform and the like. The user feedback text, i.e. the text to be emotion-identified, is to be identified, with the aim of determining the category of emotion and in which paragraph (i.e. specific position) of the user feedback text the corresponding emotion is present. This allows for quick localization of user appeal to provide better service.
S20: extracting to obtain to-be-identified user feedback text description knowledge from to-be-identified user feedback text, and extracting to obtain at least one auxiliary user feedback text description knowledge from at least one auxiliary user feedback text of target emotion polarity.
The embodiment of the disclosure is used for detecting whether the user feedback text contains a certain emotion polarity or not, and the electronic equipment firstly refines description knowledge of the user feedback text to be identified to obtain the description knowledge of the user feedback text to be identified. The description knowledge of the user feedback text to be identified is text feature description information corresponding to the user feedback text to be identified, and the description knowledge can be a feature map, or the description knowledge can be a feature vector, a feature matrix, a feature tensor and the like. It will be appreciated that the process of knowledge refinement, i.e. extracting text feature knowledge of the corresponding user feedback text, is described. Meanwhile, the electronic equipment acquires at least one auxiliary user feedback text with target emotion polarity, and performs description knowledge refinement on each auxiliary user feedback text, so that at least one auxiliary user feedback text description knowledge which is mapped one-to-one with at least one auxiliary user feedback text is obtained.
In a feasible design, the electronic device may refine the description knowledge of the user feedback text to be identified based on the Bert model, so as to obtain the description knowledge of the user feedback text to be identified. In other possible designs, the electronic device may further perform feature representation on the text to be identified by using a Word bag model, a Word2Vec, an n-gram model, and the like, and determine the extracted features as descriptive knowledge of the text to be identified.
In the embodiment of the disclosure, the auxiliary user feedback text is a user feedback text of text paragraph distribution information corresponding to the marked target emotion polarity, and in the auxiliary user feedback text, text paragraphs corresponding to the target emotion polarity are marked based on text boxes (for example, related text clauses and text words are marked in a box selection mode). The expression habits and words of the target emotion polarities in the feedback text of different auxiliary users can be different. The manner in which the electronic device extracts the description knowledge of the auxiliary user feedback text from the auxiliary user feedback text is the same as the manner in which the description knowledge of the user feedback text to be identified is extracted from the user feedback text to be identified, and will not be described in detail herein.
S30: and respectively carrying out highlighting processing of homogenization characteristics on the feedback text description knowledge of each auxiliary user to obtain highlighting text description knowledge corresponding to each auxiliary user feedback text.
The electronic equipment firstly determines the common homogeneity characteristics among at least one auxiliary user feedback text, highlights (i.e. enhances) the homogeneity characteristics included in each auxiliary user feedback text description knowledge, and enables the similarity information of the target emotion polarity in different auxiliary user feedback texts to have richer and finer characteristic representation, so that the participation degree of the homogeneity characteristics in each auxiliary user feedback text is enhanced, and the auxiliary user feedback text description knowledge which completes the highlighting of the homogeneity characteristics is determined as the highlighting text description knowledge.
That is, the electronic device can make the expression of the homogeneity characteristics between different auxiliary user feedback texts more diverse based on highlighting the homogeneity characteristics in the auxiliary user feedback text description knowledge, so that the obtained highlighting text description knowledge is finer than the original auxiliary user feedback text description knowledge in expressing the similarity information of the target emotion polarity between different auxiliary user feedback texts.
The homogeneity characteristic is used for indicating the similarity information between at least one auxiliary user feedback text of the target emotion polarity, namely the characteristic information shared by different auxiliary user feedback texts, so that the homogeneity characteristic is an important reference basis for evaluating whether the text passage comprises the target emotion polarity or not. For example, the same emotion polarity may include different text lengths, text positions, etc. in different auxiliary user feedback texts, but the emotion polarity is semantically consistent in the different auxiliary user feedback texts, and the text semantics is similarity information between the different auxiliary user feedback texts, and text semantic features are homogeneous features.
In a possible design, the electronic device may employ associating each auxiliary user feedback text description knowledge to a different knowledge space, performing attention allocation on projection knowledge of the respective knowledge space based on the attention, and determining representations of the homogeneous features under different scenarios. In other possible designs, the electronic device may extract the homogenized feature from the feedback text of the auxiliary user, then process (e.g., convolve, pool) the homogenized feature based on different feature processing networks, and splice the processed feature to the end of the feedback text description knowledge of the auxiliary user to obtain the salient text description knowledge.
S40: and determining not less than one candidate text paragraph in the user feedback text to be identified according to the user feedback text description knowledge to be identified.
The electronic device analyzes the descriptive knowledge of the text to be identified and determines which text paragraphs in the text to be identified and user feedback may include the target emotional polarity, and takes the determined text paragraphs as candidate text paragraphs. That is, the electronic device first determines some target segments, i.e. candidate text segments, in the user feedback text to be identified according to the user feedback text description knowledge to be identified, and then the candidate text segments continue to analyze whether the target emotion polarity is included or not in combination with the auxiliary user feedback text description knowledge.
In a possible design, the electronic device may input knowledge of the user feedback text description to be identified into the trained candidate box generation network (Proposal GenerationNetwork) based on the user feedback text description to determine not less than one paragraph of candidate text based on the candidate box generation network. In other possible designs, the electronic device may analyze each component description knowledge of the user feedback text description knowledge to be identified (which may also be referred to as user feedback text sub-description knowledge to be identified), and determine the user feedback text paragraphs corresponding to the component description knowledge having a difference greater than the threshold value from the remaining component description knowledge as candidate text paragraphs.
S50: and determining a target text paragraph corresponding to the target emotion polarity in at least one candidate text paragraph according to the prominent text description knowledge of each auxiliary user feedback text and the candidate text description knowledge corresponding to each candidate text paragraph.
After obtaining the prominent text description knowledge of the feedback text of each auxiliary user, the electronic device analyzes whether each candidate text paragraph has the target emotion polarity or not based on the prominent text description knowledge and the candidate text description knowledge corresponding to each candidate text paragraph, and determines the candidate text paragraph with the target emotion polarity as the target text paragraph. In this way, the electronic device completes the identification of the polarity of the target emotion.
Compared with the prior art, different feedback text samples of the same emotion type have larger difference in characteristics, so that the influence of similarity information of the different feedback text samples is small, the influence on the accuracy of emotion recognition is small, in the embodiment of the disclosure, the electronic equipment performs the highlighting treatment of the homogenized characteristics aiming at the auxiliary user feedback text description knowledge corresponding to each auxiliary user feedback text, so that the similarity information of different target emotion polarities in the different auxiliary user feedback texts is expressed more abundantly and finely, in other words, the feature information expression quality of the similarity information of each sample is increased, and therefore, the salient text description knowledge is applied in the subsequent task to more accurately evaluate whether the target emotion polarities are contained in the candidate text paragraphs, and the reliability of emotion recognition is improved.
In another example of the emotion recognition method based on text analysis provided in the embodiment of the present disclosure, the highlighting of the homogenization feature is performed for each auxiliary user feedback text description knowledge, so as to obtain the highlighting text description knowledge corresponding to each auxiliary user feedback text, that is, S30 specifically includes:
S31: and combining at least one auxiliary user feedback text description knowledge to obtain combined auxiliary description knowledge.
The electronic device may determine a dimension from the dimensions (such as the number of samples, the sequence length, the word vector dimension, etc.) of the auxiliary user feedback text description knowledge, and combine the auxiliary user feedback text description knowledge based on the dimension, for example, in a manner of splicing, to obtain combined auxiliary description knowledge.
S32: and merging the auxiliary description knowledge to conduct multiple description knowledge extraction to obtain multiple extraction knowledge arrays.
The electronic device may perform description knowledge refinement on the merged auxiliary description knowledge based on a plurality of different algorithm architectures, respectively, to obtain a plurality of refined knowledge arrays. The refined knowledge array may be a one-dimensional array, i.e. a feature vector. The architecture of the multiple algorithm architectures may be uniform, with only different parameters. It is to be understood that the refined knowledge array includes array building elements (i.e., elements that make up the refined knowledge array) corresponding to each auxiliary user feedback textual description knowledge, i.e., the array building elements in the refined knowledge array are mapped one-to-one with the auxiliary user feedback textual description knowledge.
S33: and highlighting the homogeneous characteristics in the feedback text description knowledge of each auxiliary user according to the plurality of refined knowledge arrays to obtain the highlighted text description knowledge corresponding to each auxiliary user feedback text.
The electronic device can input a plurality of refined knowledge arrays into the multi-head attention structure, integrate and map the plurality of refined knowledge arrays based on the multi-head attention structure to complete feature interaction in a mapped space, so that the homogenized features are abundantly represented in different spaces, and the highlighted text description knowledge is obtained. The electronic device can index array construction elements corresponding to the homogeneous characteristics in other refined knowledge arrays according to each refined knowledge array, randomly determine one of the array construction elements to be added into each refined knowledge array, restore the fused refined knowledge arrays to obtain independent user feedback text description knowledge, and obtain prominent text description knowledge.
In the emotion recognition method based on text analysis provided in the embodiment of the present disclosure, according to the prominent text description knowledge of each auxiliary user feedback text and the candidate text description knowledge corresponding to each candidate text paragraph, determining a target text paragraph corresponding to a target emotion polarity in at least one candidate text paragraph includes:
S51: and acquiring a first saliency adjustment variable of the candidate text description knowledge corresponding to each candidate text paragraph according to the salient text description knowledge of each auxiliary user feedback text.
The electronic device may determine a cosine correlation (Cosine Similarity) between the salient text description knowledge of the auxiliary user feedback text and the candidate text description knowledge corresponding to each candidate text paragraph, and assign a corresponding first saliency adjustment variable to the candidate text description knowledge according to the cosine correlation, the saliency adjustment variable being an attention weight of the candidate text description knowledge. The electronic device may also determine a distance between the salient text description knowledge and the candidate text description knowledge corresponding to each candidate text paragraph to assign a corresponding first saliency adjustment variable to the candidate text description knowledge. The approximation of the user feedback text content and the target emotional polarity in the candidate text passage is represented, so the first saliency adjustment variable is used to indicate the degree of coincidence, i.e. similarity, of the user feedback text content and the target emotional polarity of the candidate text passage.
And S52, weighting and adjusting the candidate text description knowledge based on the first saliency adjustment variable to obtain the adjustment text description knowledge of each candidate text paragraph.
And S53, determining a target text paragraph corresponding to the target emotion polarity in at least one candidate text paragraph according to the regulating text description knowledge of each candidate text paragraph.
The electronic device performs weighted adjustment on the candidate text description knowledge based on the first saliency adjustment variable so as to embody the commonality of the user feedback text content and the target emotion polarity included in the candidate text paragraph based on the weighting, and the target text paragraph corresponding to the target emotion polarity is conveniently determined next. In the present disclosure, determining, according to the adjusted text description knowledge of each candidate text paragraph, a target text paragraph corresponding to the target emotion polarity in not less than one candidate text paragraph, that is, S53 includes:
s531: and acquiring the emotion type and the credibility of the user feedback text of each candidate text paragraph according to the adjustment text description knowledge of each candidate text paragraph.
And the electronic equipment identifies emotion types of the user feedback text contents included in the candidate text paragraphs according to the adjustment text description knowledge, and determines the emotion types as the emotion types of the user feedback text corresponding to each candidate text paragraph. The electronic device is further configured to output a confidence probability for the user feedback text emotion type based on the adjusted text description knowledge, and to represent a confidence level for the user feedback text emotion type based on the confidence probability. The confidence probability is obtained based on the degree of coincidence between the user feedback text content and the target emotion polarity included in the candidate text passage.
S532: and determining not less than one candidate text paragraph reaching the set condition as a target text paragraph corresponding to the target emotion polarity.
The setting condition is that the emotion type of the text fed back by the user is consistent with the polarity of the target emotion, and meanwhile the credibility is larger than a credibility threshold. That is, the electronic device analyzes whether the emotion type of the user feedback text corresponding to each candidate text paragraph is consistent with the target emotion polarity, and whether the confidence probability corresponding to the emotion type of the user feedback text is greater than a confidence probability threshold, and if the conditions are all met, the electronic device determines the candidate text paragraph as the target text paragraph. The electronic device may determine that the user feedback text emotion type is consistent with the target emotion polarity when the user feedback text emotion type is consistent with the emotion category corresponding to the target emotion polarity, or determine that the user feedback text emotion type is consistent with the target emotion polarity when the user feedback text emotion type includes the category corresponding to the target emotion polarity. The specific numerical value of the credibility probability threshold is set according to actual needs.
In the embodiment of the present disclosure, according to the salient text description knowledge of each auxiliary user feedback text, obtaining a first saliency adjustment variable of candidate text description knowledge corresponding to each candidate text paragraph, that is, S51 includes:
S511: combining the salient text description knowledge of each auxiliary user feedback text to obtain combined salient description knowledge, and combining the candidate text description knowledge of each candidate text paragraph to obtain combined candidate description knowledge.
The electronic equipment adopts the same merging mode to obtain merging prominent description knowledge and merging candidate description knowledge. For example, when the electronic device performs tail-joining (i.e. head-to-tail connection) on the salient text description knowledge of each auxiliary user feedback text to obtain the merged salient description knowledge, the candidate text description knowledge for each candidate text paragraph also obtains the merged candidate description knowledge according to the tail-joining.
S512: and extracting the description knowledge twice or more for merging the salient description knowledge to obtain a plurality of salient knowledge arrays, and extracting the description knowledge for merging the candidate description knowledge to obtain a candidate knowledge array.
The electronic device may perform description knowledge refinement on the merged prominent description knowledge based on several description knowledge refinement neural networks that differ in architecture, parameters, or on the merged prominent description knowledge based on several description knowledge refinement neural networks that are consistent in architecture but differ in parameters. The candidate knowledge array includes array building elements corresponding to candidate text description knowledge for each candidate text passage.
S513: based on performing attention map integration on the number of prominent knowledge arrays and the candidate knowledge arrays, a saliency adjustment variable for each number of constituent elements of the candidate knowledge arrays is obtained.
The process of attention map integration is performed based on a multi-headed attention network, which includes a plurality of attention network structures. The electronic equipment respectively determines a plurality of prominent knowledge arrays and candidate knowledge arrays as execution data of all attention structures, outputs each number of group construction elements of the candidate knowledge arrays for each attention structure and sub-saliency adjustment variables corresponding to the attention structures based on each attention structure, and fuses the sub-saliency adjustment variables corresponding to the attention structures to obtain the saliency adjustment variables corresponding to each number of group construction elements.
S514: and determining the saliency adjustment variable of each group of construction elements of the candidate knowledge array as a first saliency adjustment variable of the candidate text description knowledge corresponding to the candidate text paragraph.
Because the array construction elements in the candidate knowledge array are mapped one-to-one with the candidate text description knowledge, the electronic device can determine the saliency adjustment variable of each array construction element as the first saliency adjustment variable of the corresponding candidate text description knowledge, so that each candidate text description knowledge is conveniently weighted and adjusted to obtain the adjusted text description knowledge.
Compared with the prior art, only a single aggregation point (a classification prototype) is constructed for different feedback text samples of one emotion type, the method and the device respectively serve as the aggregation points according to the prominent text description knowledge of each auxiliary user feedback text, a first saliency adjustment variable is determined for candidate text description knowledge based on the aggregation points, the coincidence degree of contents included in candidate text paragraphs and target emotion polarities is reflected based on the first saliency adjustment variable, aggregation of the candidate text description knowledge and the auxiliary user feedback text description knowledge is completed, the target text paragraphs corresponding to the target emotion polarities are determined, the types of the aggregation points are more abundant, the multielement characteristics of the same emotion types are not lost, and the emotion recognition accuracy is improved.
According to the embodiment of the disclosure, according to the prominent text description knowledge of each auxiliary user feedback text and the candidate text description knowledge corresponding to each candidate text paragraph, determining a target text paragraph corresponding to a target emotion polarity in at least one candidate text paragraph, specifically including:
s54: and carrying out averaging operation on the prominent text description knowledge of at least one auxiliary user feedback text to obtain average text description knowledge.
The electronic equipment gives equal weight to the highlighted text description knowledge of each auxiliary user feedback text, performs weighted adjustment on all the highlighted text description knowledge based on the corresponding weight, and then adds the weighted results to obtain average text description knowledge.
S55: and determining the knowledge similarity scores of the average text description knowledge and the candidate text description knowledge corresponding to each candidate text paragraph.
And the electronic equipment calculates cosine similarity or determined Jacquard distance of the average text description knowledge and the candidate text description knowledge corresponding to each candidate text paragraph, and determines the result as a knowledge similarity score.
S56: determining a target text paragraph corresponding to the target emotion polarity in at least one candidate text paragraph according to the knowledge similarity score
For example, the electronic device determines a candidate text paragraph corresponding to the greatest knowledge similarity score as a target text paragraph corresponding to the target emotion polarity, or determines a candidate text paragraph corresponding to a knowledge similarity score greater than the scoring threshold as a target text paragraph. In the embodiment of the disclosure, the electronic device performs an averaging operation on the highlighted text description knowledge with richer and finer homogenization characteristics to obtain average text description knowledge, namely, the aggregation point is more accurate, so that the reliability of emotion recognition is ensured.
In the text analysis-based emotion recognition method provided in the embodiment of the present disclosure, optionally, after performing, for each auxiliary user feedback text description knowledge, a salient feature of each auxiliary user feedback text description knowledge, and obtaining the salient text description knowledge corresponding to each auxiliary user feedback text, according to the salient text description knowledge of each auxiliary user feedback text and the candidate text description knowledge corresponding to each candidate text paragraph, before determining a target text paragraph corresponding to a target emotion polarity in at least one candidate text paragraph, the method may further include the following steps:
S60: and acquiring a second saliency adjustment variable according to the highlighted text description knowledge corresponding to each auxiliary user feedback text and each composition text description knowledge of the text description knowledge to be identified.
The electronic equipment merges (i.e. splices) the prominent text description knowledge corresponding to each auxiliary user feedback text into merged prominent description knowledge, and extracts a plurality of composition text description knowledge from the user feedback text description knowledge to be identified, wherein the composition text description knowledge is sub-text description knowledge in the user feedback text description knowledge to be identified. And performing attention mapping integration on the combined result of the plurality of composition text description knowledge and the combined salient description knowledge to obtain a second saliency adjustment variable corresponding to each composition text description knowledge. It should be understood that the process of performing attention map integration for the combined result of the plurality of constituent text description knowledge and the combined salient description knowledge to obtain the second saliency adjustment variable, and the manner of performing attention map integration for the plurality of salient knowledge arrays and the candidate knowledge arrays to obtain the first saliency adjustment variable are the same, and are not repeated herein.
S70: and based on the second significance adjustment variable, performing weighted adjustment on each composition text description knowledge to obtain adjustment composition text description knowledge (namely weighted composition text description knowledge).
S80: based on each adjustment composition text description knowledge, at least one candidate text passage is determined in the user feedback text to be identified.
The electronic equipment carries out weighted adjustment on each composition text description knowledge based on the second saliency adjustment variable, so that the saliency of the composition text description knowledge similar to the prominent text description knowledge in the user feedback text description knowledge to be identified is improved, and which text paragraph is similar to the user feedback text paragraph with the target emotion polarity in the user feedback text to be identified is determined. In this way, when at least one candidate text paragraph is determined in the user feedback text to be identified according to the adjustment composition text description knowledge, the user feedback text paragraph which contains similarity with the auxiliary user feedback text is preferably determined as the candidate text paragraph, so that the accuracy of the candidate text paragraph is improved, and the emotion result is more reliable.
In the embodiment of the present disclosure, in at least one auxiliary user feedback text of the target emotion polarity, at least one auxiliary user feedback text description knowledge is extracted respectively, that is, S20 includes:
s21: and extracting description knowledge of the marked text paragraphs with the target emotion polarities in at least one auxiliary user feedback text to obtain at least one target paragraph description knowledge.
S22: and extracting description knowledge of user feedback text content of not less than one auxiliary user feedback text to obtain not less than one initial text description knowledge.
Because the distributed paragraphs corresponding to the marked target emotion polarities in the auxiliary user feedback text, namely, the auxiliary user feedback text simultaneously comprises the marked text paragraphs with the target emotion polarities (namely, the text paragraphs corresponding to the text paragraph distribution information corresponding to the marked target emotion polarities) and the user feedback text contents with the target emotion polarities, the electronic equipment can refine description knowledge in two dimensions of the marked text paragraphs and the user feedback text contents for each auxiliary user feedback text, so that the target paragraph description knowledge and the initial text description knowledge of each auxiliary user feedback text are respectively obtained.
S23: and carrying out corresponding knowledge interaction on the at least one target paragraph description knowledge and the at least one initial text description knowledge to obtain the at least one auxiliary user feedback text description knowledge.
The electronic device performs knowledge interaction on the target paragraph description knowledge and the initial text description knowledge of each auxiliary user feedback text, and the knowledge interaction process completes the corresponding feature fusion process, for example, the target paragraph description knowledge and the initial text description knowledge are combined (e.g. spliced), or the target paragraph description knowledge and the initial text description knowledge are subjected to weighted adjustment, so that the auxiliary user feedback text description knowledge simultaneously comprising text semantic information of target emotion polarity and paragraph distribution information corresponding to the target emotion polarity is obtained, and the auxiliary user feedback text description knowledge is helped to determine the target paragraphs, namely, the candidate text paragraphs, according to the auxiliary user feedback text description knowledge.
In the embodiment of the disclosure, the method further includes the steps of:
S90: and storing the salient text description knowledge corresponding to each auxiliary user feedback text.
In the embodiment of the disclosure, the highlighted text description knowledge is further used for determining an updated target text paragraph corresponding to the target emotion polarity from at least one updated candidate text paragraph of the updated to-be-identified user feedback text. The highlighted text description knowledge can be repeatedly utilized in addition to determining an updated target text paragraph corresponding to the target emotion polarity for the current user feedback text to be identified, and the updated target text paragraph corresponding to the target emotion polarity is determined and obtained in at least one updated candidate text paragraph of the updated user feedback text to be identified loaded in next emotion recognition. Therefore, when emotion recognition is carried out on the updated user feedback text to be recognized, the text description knowledge can be directly obtained without extracting the text description knowledge and highlighting the homogeneous characteristics of the user feedback text, and the emotion recognition process is shortened.
In the embodiment of the disclosure, from the start of extracting the description knowledge of the user feedback text to be identified from the user feedback text to be identified, to the start of extracting the description knowledge of the text to be identified from the text to be identified, and the description knowledge of the text to be identified from the text to be identified, and the step of determining the text to be identified from at least one text to be identified from the text to be identified, which is the target text paragraph corresponding to the polarity of the target emotion, is completed based on the target emotion recognition algorithm, that is, the whole emotion recognition process is completed based on the target emotion recognition algorithm, and the method further comprises the training process of the algorithm before the description knowledge of the text to be identified from the user feedback text to be identified is extracted from the text to be identified from the user feedback to be identified:
s100: and acquiring a first user feedback text learning sample and a second user feedback text learning sample.
The user feedback text learning sample is a training sample of a training algorithm, it being understood that the number of marked text in the first user feedback text learning sample is greater than the number of marked text in the second user feedback text learning sample. That is, a sufficient amount of user feedback text with marks is included in the first user feedback text learning sample, and only a small amount of user feedback text with marks is included in the second user feedback text learning sample. Wherein the marking text is used for marking the target emotion polarity included in the user feedback text.
S200: training an initial emotion recognition algorithm based on the first user feedback text learning sample to obtain a transitional emotion recognition algorithm.
The initial emotion recognition algorithm may be a Bert algorithm that completes initialization, wherein parameters need to be trained to converge, or the initial emotion recognition algorithm is a Bert algorithm that performs pre-train (pre-train) based on a label-free text sample, and only needs to be fine-tuned in the following steps. The transitional emotion recognition algorithm is an intermediate algorithm in the training process.
S300: and extracting candidate user feedback text learning samples from the second user feedback text learning samples.
The electronic equipment extracts x marked learning samples of the target emotion polarity from the second user feedback text learning samples, and forms candidate user feedback text learning samples based on the x marked learning samples. That is, the candidate user feedback text learning samples include x labeled learning samples, where the labeled learning samples are user feedback text labeled with text paragraph distribution information of the target emotion polarity.
S400: training the transition emotion recognition algorithm based on a target user feedback text learning sample consisting of the first user feedback text learning sample and the candidate user feedback text learning sample to obtain a target emotion recognition algorithm.
The electronic equipment combines the first user feedback text learning sample and the candidate user feedback text learning sample to obtain a new user feedback text learning sample, namely a target user feedback text learning sample, predicts the target user feedback text learning sample based on a transition emotion recognition algorithm, and returns the predicted result and the cost of the marked text in the target user feedback text learning sample so as to optimize algorithm parameters of the transition emotion recognition algorithm and realize one round of iterative adjustment. Training for multiple times according to the thought, stopping when the algorithm converges, and thus obtaining the target emotion recognition algorithm.
For the algorithm architecture of the target emotion recognition algorithm, the algorithm architecture specifically may include two backbone structures (such as AlexNet), a fusion structure and a candidate frame generation structure, where the two backbone structures respectively refine description knowledge of the user feedback text to be recognized and the auxiliary user feedback text, the candidate frame generation structure is used to determine candidate text paragraphs, the fusion structure is used to determine salient text description knowledge, and the target text paragraphs are determined according to the salient text description knowledge and the candidate text description knowledge. Or the target emotion recognition algorithm comprises y backbone structures, two fusion structures and a candidate frame generation structure, wherein the y backbone structures are used for extracting description knowledge of the feedback text of the user to be recognized and the feedback text of the x auxiliary users at the same time, one fusion structure is used for determining salient text description knowledge, the salient text description knowledge and the feedback text description knowledge of the user to be recognized are aggregated and loaded to the candidate frame generation structure to obtain a candidate text paragraph, and the other fusion structure is used for aggregating the candidate text description knowledge and the salient text description knowledge to obtain a final target text paragraph, wherein y=x+1.
Based on the same inventive concept, the embodiment of the present disclosure further provides a text analysis-based emotion recognition device for implementing the above-mentioned text analysis-based emotion recognition method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in one or more embodiments of the emotion recognition device based on text analysis provided below may be referred to the limitation of the emotion recognition method based on text analysis hereinabove, and will not be repeated here.
In one embodiment, as shown in fig. 3, there is provided a text analysis-based emotion recognition device 300, comprising:
a text data obtaining module 310, configured to obtain a user feedback text to be recognized and at least one auxiliary user feedback text in response to the emotion recognition command;
The text feature extraction module 320 is configured to extract to obtain a description knowledge of the user feedback text to be identified from the user feedback text to be identified, and extract to obtain at least one description knowledge of the auxiliary user feedback text from at least one auxiliary user feedback text with a target emotion polarity, respectively; the auxiliary user feedback text is a user feedback text marked with text paragraph distribution information corresponding to the target emotion polarity;
The homogeneous feature highlighting module 330 is configured to respectively highlight the homogeneous features for each of the feedback text description knowledge of the auxiliary user, so as to obtain highlighting text description knowledge corresponding to each of the feedback text of the auxiliary user; wherein the homogeneity characteristic is used for indicating similarity information of the target emotion polarity in at least one of the auxiliary user feedback texts;
A text paragraph initialization module 340, configured to determine at least one candidate text paragraph in the user feedback text to be identified according to the user feedback text description knowledge to be identified;
a text paragraph determining module 350, configured to determine a target text paragraph corresponding to the target emotion polarity from at least one candidate text paragraph according to the salient text description knowledge of each auxiliary user feedback text and the candidate text description knowledge corresponding to each candidate text paragraph.
The above-described emotion recognition device based on text analysis may be implemented in whole or in part by software, hardware, and a combination thereof. The above modules may be embedded in hardware or independent of a processor in the electronic device, or may be stored in software in a memory in the electronic device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, an electronic device is provided, which may be a server, and the internal structure of which may be as shown in fig. 4. The electronic device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the electronic device is configured to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the electronic device is used to exchange information between the processor and the external device. The communication interface of the electronic device is used for communicating with an external terminal through network connection. The computer program, when executed by a processor, implements a text analysis based emotion recognition method.
Those skilled in the art will appreciate that the structure shown in fig. 4 is merely a block diagram of a portion of the structure associated with the disclosed aspects and is not limiting of the electronic device to which the disclosed aspects apply, and that a particular electronic device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In an embodiment, there is also provided an electronic device including a memory and a processor, the memory storing a computer program, the processor implementing the steps of the method embodiments described above when executing the computer program.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, carries out the steps of the method embodiments described above.
In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
It should be noted that, the object information (including, but not limited to, device information, corresponding personal information, etc. of the object) and the data (including, but not limited to, data for analysis, stored data, presented data, etc.) related to the present disclosure are information and data authorized by the object or sufficiently authorized by each party, and the collection, use, and processing of the related data are required to comply with the related laws and regulations and standards of the related countries and regions.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided by the present disclosure may include at least one of non-volatile and volatile memory, among others. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magneto-resistive random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric RandomAccess Memory, FRAM), phase change Memory (PHASE CHANGE Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (RandomAccess Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in various forms such as static random access memory (Static RandomAccess Memory, SRAM) or dynamic random access memory (Dynamic RandomAccess Memory, DRAM), etc. The databases referred to in the various embodiments provided by the present disclosure may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors involved in the embodiments provided by the present disclosure may be general-purpose processors, central processing units, graphics processors, digital signal processors, programmable logic, quantum computing-based data processing logic, etc., without limitation thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples have expressed only a few embodiments of the present disclosure, which are described in more detail and detail, but are not to be construed as limiting the scope of the present disclosure. It should be noted that variations and modifications can be made by those skilled in the art without departing from the spirit of the disclosure, which are within the scope of the disclosure. Accordingly, the scope of the present disclosure should be determined from the following claims.
Claims (10)
1. A text analysis-based emotion recognition method, applied to an electronic device, comprising:
responding to the emotion recognition command, and acquiring a user feedback text to be recognized and at least one auxiliary user feedback text;
Extracting to obtain to-be-identified user feedback text description knowledge from the to-be-identified user feedback text, and extracting to obtain at least one auxiliary user feedback text description knowledge from at least one auxiliary user feedback text of target emotion polarity respectively; the auxiliary user feedback text is a user feedback text marked with text paragraph distribution information corresponding to the target emotion polarity;
Respectively carrying out highlighting processing of homogenization characteristics on the feedback text description knowledge of each auxiliary user to obtain highlighting text description knowledge corresponding to each feedback text of the auxiliary user; wherein the homogeneity characteristic is used for indicating similarity information of the target emotion polarity in at least one of the auxiliary user feedback texts;
Determining at least one candidate text paragraph in the user feedback text to be identified according to the user feedback text description knowledge to be identified;
And determining a target text paragraph corresponding to the target emotion polarity in at least one candidate text paragraph according to the prominent text description knowledge of each auxiliary user feedback text and the candidate text description knowledge corresponding to each candidate text paragraph.
2. The method according to claim 1, wherein the performing, for each of the auxiliary user feedback text description knowledge, the highlighting of the homogenization feature, respectively, to obtain the highlighted text description knowledge corresponding to each of the auxiliary user feedback text, includes:
Carrying out knowledge feature combination on at least one auxiliary user feedback text description knowledge to obtain combined auxiliary description knowledge;
performing multiple description knowledge extraction on the combined auxiliary description knowledge to obtain multiple extracted knowledge arrays;
The refined knowledge array comprises array construction elements corresponding to each auxiliary user feedback text description knowledge;
And highlighting the homogeneous characteristics in the feedback text description knowledge of each auxiliary user according to a plurality of refined knowledge arrays to obtain the highlighting text description knowledge corresponding to each auxiliary user feedback text.
3. The method according to claim 1 or 2, wherein said determining a target text passage corresponding to said target emotion polarity among at least one of said candidate text passages based on said prominent text description knowledge of each of said auxiliary user feedback texts and candidate text description knowledge corresponding to each of said candidate text passages comprises:
Acquiring a first saliency adjustment variable of candidate text description knowledge corresponding to each candidate text paragraph according to the salient text description knowledge of each auxiliary user feedback text; wherein the first saliency adjustment variable is used for indicating the coincidence degree of user feedback text content included in the candidate text passage and the target emotion polarity;
Weighting and adjusting the candidate text description knowledge based on the first saliency adjustment variable to obtain adjustment text description knowledge of each candidate text paragraph;
And determining the target text paragraph corresponding to the target emotion polarity in at least one candidate text paragraph according to the adjustment text description knowledge of each candidate text paragraph.
4. A method according to claim 3, wherein said determining said target text passage corresponding to said target emotion polarity in no less than one of said candidate text passages based on said adjusted text description knowledge of each of said candidate text passages comprises:
acquiring the emotion type and the credibility of the user feedback text of each candidate text paragraph according to the adjustment text description knowledge of each candidate text paragraph;
Determining at least one candidate text paragraph reaching a set condition as the target text paragraph corresponding to the target emotion polarity; the setting condition is that the emotion type of the text fed back by the user is consistent with the polarity of the target emotion, and meanwhile the credibility is larger than a credibility threshold.
5. A method according to claim 3, wherein said obtaining a first saliency adjustment variable for candidate text description knowledge for each of said candidate text paragraphs based on said salient text description knowledge for each of said auxiliary user feedback text comprises:
Combining the salient text description knowledge of each auxiliary user feedback text to obtain combined salient description knowledge, and combining the candidate text description knowledge of each candidate text paragraph to obtain combined candidate description knowledge;
extracting the description knowledge for two or more times aiming at the merging and salient description knowledge to obtain a plurality of salient knowledge arrays, and extracting the description knowledge aiming at the merging and candidate description knowledge to obtain candidate knowledge arrays; wherein the candidate knowledge array comprises array construction elements corresponding to candidate text description knowledge of each candidate text paragraph;
Based on executing attention mapping integration on a plurality of the prominent knowledge arrays and the candidate knowledge arrays, obtaining a significance adjusting variable of each number group construction element of the candidate knowledge arrays;
And determining the saliency adjustment variable of each number group of construction elements of the candidate knowledge array as the first saliency adjustment variable of the candidate text description knowledge corresponding to the candidate text paragraph.
6. The method of claim 1, wherein said determining a target text passage corresponding to said target emotion polarity in at least one of said candidate text passages based on said prominent text description knowledge of each of said auxiliary user feedback texts and candidate text description knowledge corresponding to each of said candidate text passages, comprises:
averaging the prominent text description knowledge of at least one auxiliary user feedback text to obtain average text description knowledge;
determining knowledge similarity scores of the average text description knowledge and candidate text description knowledge corresponding to each candidate text paragraph;
Determining a target text paragraph corresponding to the target emotion polarity in at least one candidate text paragraph according to the knowledge similarity score;
The method further includes, after the highlighting of the homogenization feature is performed on each of the feedback text description knowledge of the auxiliary user to obtain the highlighting text description knowledge corresponding to each of the feedback text of the auxiliary user, determining, according to the highlighting text description knowledge of each of the feedback text of the auxiliary user and the candidate text description knowledge corresponding to each of the candidate text paragraphs, before determining, in at least one of the candidate text paragraphs, a target text paragraph corresponding to the target emotion polarity:
Acquiring a second saliency adjustment variable according to the prominent text description knowledge corresponding to each auxiliary user feedback text and each composition text description knowledge of the text description knowledge to be identified;
Based on the second significance adjustment variable, carrying out weighted adjustment on each composition text description knowledge to obtain adjustment composition text description knowledge;
And determining not less than one candidate text paragraph in the feedback text of the user to be identified according to each adjustment composition text description knowledge.
7. The method according to claim 1, wherein extracting the at least one auxiliary user feedback text description knowledge from the at least one auxiliary user feedback text of the target emotion polarity includes:
Extracting description knowledge of the marked text paragraphs with the target emotion polarity in at least one feedback text of the auxiliary user to obtain at least one description knowledge of the target paragraphs;
Extracting description knowledge of user feedback text content of at least one auxiliary user feedback text to obtain at least one initial text description knowledge;
and carrying out corresponding knowledge interaction on at least one target paragraph description knowledge and at least one initial text description knowledge to obtain at least one auxiliary user feedback text description knowledge.
8. The method according to claim 1, wherein the highlighting of the homogenization feature is performed for each of the auxiliary user feedback text description knowledge, and after obtaining the highlighting text description knowledge corresponding to each of the auxiliary user feedback text, the method further comprises:
Storing the salient text description knowledge corresponding to each auxiliary user feedback text; the highlighted text description knowledge is further used for determining an updated target text paragraph corresponding to the target emotion polarity in at least one updated candidate text paragraph of the updated user feedback text to be identified;
extracting to-be-identified user feedback text description knowledge from the to-be-identified user feedback text, and determining a target text paragraph corresponding to the target emotion polarity from at least one candidate text paragraph according to the prominent text description knowledge of each auxiliary user feedback text and the candidate text description knowledge corresponding to each candidate text paragraph by using a target emotion recognition algorithm; before extracting the description knowledge of the feedback text of the user to be identified from the feedback text of the user to be identified, the method further comprises a training step of a target emotion recognition algorithm, which comprises the following steps:
Acquiring a first user feedback text learning sample and a second user feedback text learning sample; wherein the number of tagged text in the first user feedback text learning sample is greater than the number of tagged text in the second user feedback text learning sample;
Training an initial emotion recognition algorithm based on the first user feedback text learning sample to obtain a transition emotion recognition algorithm;
extracting candidate user feedback text learning samples from the second user feedback text learning samples; the candidate user feedback text learning samples comprise x mark learning samples, wherein the mark learning samples are user feedback texts for marking text paragraph distribution information of the target emotion polarity;
Training the transition emotion recognition algorithm based on a target user feedback text learning sample formed by the first user feedback text learning sample and the candidate user feedback text learning sample to obtain the target emotion recognition algorithm.
9. A text analysis-based emotion recognition device, comprising:
the text data acquisition module is used for responding to the emotion recognition command and acquiring a user feedback text to be recognized and at least one auxiliary user feedback text;
the text feature extraction module is used for extracting to obtain to-be-identified user feedback text description knowledge from the to-be-identified user feedback text, and extracting to obtain at least one auxiliary user feedback text description knowledge from at least one auxiliary user feedback text of target emotion polarity respectively; the auxiliary user feedback text is a user feedback text marked with text paragraph distribution information corresponding to the target emotion polarity;
The homogeneous feature highlighting module is used for respectively highlighting the homogeneous features for the feedback text description knowledge of each auxiliary user to obtain the corresponding highlighting text description knowledge of each auxiliary user feedback text; wherein the homogeneity characteristic is used for indicating similarity information of the target emotion polarity in at least one of the auxiliary user feedback texts;
a text paragraph initialization module, configured to determine at least one candidate text paragraph in the user feedback text to be identified according to the user feedback text description knowledge to be identified;
And the text paragraph determining module is used for determining a target text paragraph corresponding to the target emotion polarity in at least one candidate text paragraph according to the prominent text description knowledge of each auxiliary user feedback text and the candidate text description knowledge corresponding to each candidate text paragraph.
10. An electronic device, comprising:
A processor;
And a memory, wherein the memory has stored therein a computer program which, when executed by the processor, causes the processor to perform the method of any of claims 1-8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311742748.4A CN117932058A (en) | 2023-12-18 | 2023-12-18 | Emotion recognition method, device and equipment based on text analysis |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311742748.4A CN117932058A (en) | 2023-12-18 | 2023-12-18 | Emotion recognition method, device and equipment based on text analysis |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117932058A true CN117932058A (en) | 2024-04-26 |
Family
ID=90768931
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311742748.4A Pending CN117932058A (en) | 2023-12-18 | 2023-12-18 | Emotion recognition method, device and equipment based on text analysis |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117932058A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118312620A (en) * | 2024-06-07 | 2024-07-09 | 北京中关村科金技术有限公司 | Intelligent digital person-oriented page interaction information mining method and system |
-
2023
- 2023-12-18 CN CN202311742748.4A patent/CN117932058A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118312620A (en) * | 2024-06-07 | 2024-07-09 | 北京中关村科金技术有限公司 | Intelligent digital person-oriented page interaction information mining method and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109858010B (en) | Method and device for recognizing new words in field, computer equipment and storage medium | |
CN111666401B (en) | Document recommendation method, device, computer equipment and medium based on graph structure | |
CN112819023B (en) | Sample set acquisition method, device, computer equipment and storage medium | |
CN111831826B (en) | Training method, classification method and device of cross-domain text classification model | |
KR20200007969A (en) | Information processing methods, terminals, and computer storage media | |
CN110362798B (en) | Method, apparatus, computer device and storage medium for judging information retrieval analysis | |
CN112749737A (en) | Image classification method and device, electronic equipment and storage medium | |
CN114647713A (en) | Knowledge graph question-answering method, device and storage medium based on virtual confrontation | |
CN112101042A (en) | Text emotion recognition method and device, terminal device and storage medium | |
CN111783903A (en) | Text processing method, text model processing method and device and computer equipment | |
CN112100377A (en) | Text classification method and device, computer equipment and storage medium | |
CN117931858B (en) | Data query method, device, computer equipment and storage medium | |
CN110377618B (en) | Method, device, computer equipment and storage medium for analyzing decision result | |
KR20120047622A (en) | System and method for managing digital contents | |
CN113553326A (en) | Spreadsheet data processing method, device, computer equipment and storage medium | |
CN117932058A (en) | Emotion recognition method, device and equipment based on text analysis | |
CN114254622B (en) | Intention recognition method and device | |
CN117649567B (en) | Data labeling method, device, computer equipment and storage medium | |
CN118210874A (en) | Data processing method, device, computer equipment and storage medium | |
CN111091198A (en) | Data processing method and device | |
CN117033435A (en) | Service complaint processing method, device, computer equipment and storage medium | |
CN114239602B (en) | Session method, apparatus and computer program product | |
CN117217858A (en) | Article recommendation method, device, equipment and storage medium based on artificial intelligence | |
CN117435685A (en) | Document retrieval method, document retrieval device, computer equipment, storage medium and product | |
CN113505889B (en) | Processing method and device of mapping knowledge base, computer equipment and storage medium |
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 |