Reader sentiment prediction method and system based on text sentiment behavior knowledge
By integrating emotional behavior-derived knowledge and implicit emotional relationships into text sentiment analysis, negative examples are constructed and decision enhancement is applied, solving the problem of difficulty in distinguishing similar emotions and improving the accuracy and comprehension of readers' sentiment prediction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHAI UNIV
- Filing Date
- 2024-03-11
- Publication Date
- 2026-07-31
AI Technical Summary
Existing text sentiment analysis methods struggle to effectively distinguish and predict similar sentiments, and the complex causal relationship between behavior and sentiment leads to misjudgments and biases in sentiment prediction models during social events.
By acquiring knowledge derived from emotional behavior and implicit emotional relationships in the text, negative examples are constructed and their features are enhanced. Combined with emotional transfer relationships, decision enhancement is performed to improve the accuracy of the reader sentiment prediction model.
It enhances the reader sentiment prediction model's ability to distinguish between easily confused sentiments, reduces sentiment prediction bias, and improves the ability to identify core sentiments in social events.
Smart Images

Figure CN118503349B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of text sentiment analysis, and in particular to a method and system for predicting reader sentiment based on text sentiment behavior knowledge. Background Technology
[0002] Collective emotion, as a way of reflecting the complex inner fluctuations of humanity, specifically refers to the subjective feelings and emotional reactions of humans to external or internal events. Cognitive theory of emotion attributes the generation of emotion to the interaction of three factors: environmental stimuli, physiological levels, and cognitive processes. The emotion generation process involves the joint action of the cerebral cortex and subcortical tissues. When stimulus signals are transmitted to the cerebral cortex, they are evaluated, and the resulting neural impulses are transmitted from the lateral emissary nerves to the thalamus's sympathetic nerves, thus converting the cognitive and evaluation signals into the emotion felt by the individual. Emotional expression is influenced by multiple factors; different cognitions and evaluations of the same environmental stimuli will lead to different emotional responses.
[0003] 1) Objective events, as triggering factors for group emotions, influence the tendency to express emotions. Since the impact of objective events on emotions depends on an individual's cognition and evaluation, an individual's personality, experience, cultural background, etc., will affect their emotional response to objective events. Therefore, different individuals may have different emotional responses to the same objective event.
[0004] 2) A symbiotic relationship exists between emotions, and implicit transfer relationships exist within emotions. The emotions contained in the sample often appear in combination rather than in a single instance. The complex and diverse symbiotic emotional expressions are the root cause of errors in the model's sentiment prediction. As objective events evolve and group emotions spread, emotions may transfer from one emotion to another, and the implicit transfer relationships within these emotions are also an important reason affecting the prediction bias of the sentiment prediction model.
[0005] 3) The causal relationship between behavior and emotion is complex. Emotion is the direct and strong motivation for behavior, while behavior is the core element influencing the subsequent development of emotion. After an objective event occurs, the public's perception of the event influences their internal emotional process, which in turn drives group behavior. Simultaneously, behavior, as a new external stimulus, influences the evolution of subsequent emotions. In the evolution of the objective event, emotion and behavior are mutually causal, and the iterative process is complex and ever-changing.
[0006] Scholars have attempted to overcome the limitations of existing research by integrating interpretable knowledge such as sentiment dictionaries and modifying the structure of sentiment analysis models. Text sentiment analysis can be categorized into three types: sentiment dictionary-based text sentiment analysis, machine learning-based text sentiment analysis, and deep learning-based text sentiment analysis. Interpretable knowledge such as sentiment dictionaries and syntactic knowledge helps sentiment prediction models extract salient sentiment features and contextual dependencies from sentiment text, improving the accuracy of sentiment prediction tasks. Sentiment analysis methods based on machine learning and deep learning extract fine-grained semantic features from text and establish a mapping relationship between them and high-dimensional sentiment features. However, the problem of mixed behavior and sentiment-driven approaches still exists in practical applications. Summary of the Invention
[0007] The purpose of this invention is to provide a reader sentiment prediction method and system based on textual emotional behavior knowledge. This invention improves the reader sentiment prediction model's ability to distinguish between similar emotions from two perspectives: feature enhancement and decision enhancement, based on the emotional behavior-derived knowledge and implicit emotional relationships in the text. This improves the accuracy of sentiment prediction.
[0008] To achieve the above objectives, the present invention provides the following solution: In a first aspect, the present invention provides a reader sentiment prediction method based on textual sentiment behavior knowledge, comprising: The text provided by the writer is obtained, hereinafter referred to as the text; the text contains emotional behavior-derived knowledge and implicit emotional relationships; the implicit emotional relationships include emotional confusion relationships and emotional transfer relationships; the emotional behavior-derived knowledge is a structured triple composed of subject, emotion, and behavior; the emotional confusion relationship is the approximate distance between emotions; the emotional transfer relationship is the inertial prediction bias direction when making emotional recognition decisions.
[0009] Based on the counterfactual hypothesis and the aforementioned sentiment confusion relationship, the feature enhancement of some samples in the training set is performed using sentiment behavior-derived knowledge in the text to obtain negative sample samples; the counterfactual hypothesis is a hypothesis that negates and re-represents facts that have already occurred; the negative sample samples are samples constructed by retaining auxiliary text tags and replacing sentiment behavior-derived knowledge.
[0010] The negative samples are added to the original training set to obtain a new training set.
[0011] The emotional behavior-derived knowledge of the text in the dataset is concatenated with the text to obtain a concatenated sample, forming a new dataset, which includes a new training set and a test set.
[0012] The original decision output, i.e. the probability distribution of the reader's emotions, is obtained through a linear layer. Based on the emotion transfer relationship and the original decision output, decision enhancement is performed on the samples in the new dataset to obtain a self-reflective decision output.
[0013] Based on the self-reflective decision output and the original decision output, the final decision output, i.e., the reader's emotion, is determined.
[0014] Optionally, acquire knowledge derived from emotional behaviors in the text, specifically including: Identify candidate subjects—behavioral patterns.
[0015] Identify candidate emotion-behavior patterns.
[0016] Based on the candidate subject-behavior behavior pattern and the candidate emotion-behavior behavior pattern, the triplet is completed and expanded to obtain complete subject-emotion-behavior triplet knowledge.
[0017] Optionally, before performing triple completion and expansion based on the candidate subject-behavior behavior pattern and the candidate emotion-behavior behavior pattern to obtain complete subject-emotion-behavior triple knowledge, the method further includes: Noise and erroneous data in the candidate subject-behavior behavior pattern and candidate emotion-behavior behavior pattern candidate sets are filtered out through manual review and revision.
[0018] Optionally, the expression for the candidate subject-behavior behavior pattern is: ; in, For candidate subjects—behavioral behavior patterns, As the first candidate entity, As the second candidate subject, For the first k One candidate entity, For the first i One candidate entity, For the first candidate action, For the first v One candidate behavior, For the first j One candidate behavior, To calculate the word order of candidate morphemes in the text.
[0019] Optionally, the expression for the candidate emotion-behavior pattern is: ; in, For candidate emotion-behavior patterns, The first candidate emotion, The second candidate emotion, For the first u One candidate emotion, For the first i One candidate emotion, For the first candidate action, For the first v One candidate behavior, For the first j One candidate behavior, For word order window size, To calculate the word order of candidate morphemes in the text.
[0020] Optionally, for a subset of texts in the training set and their original sentiment labels, approximate sentiment labels are obtained based on the sentiment confusion matrix. The text corresponding to the approximate sentiment tag and text The knowledge derived from emotional behavior in the context is as follows: ; The expression for the negative sample is: ; in, For negative samples, For replacement operation, For text, Similar to emotional text Knowledge derived from emotional behavior in The first word in the text. For the first in the text One word, For the first in the text One word, For text The approximate AER knowledge of emotion, For text The true label.
[0021] The negative samples are added to the original training set to obtain a new training set. Optionally, the step of concatenating the sentiment behavior-derived knowledge of the text in the dataset with the text itself to obtain a concatenated sample forms a new dataset, which includes a new training set and a test set, specifically including: Determine whether the emotions in the emotional behavior-derived knowledge of the text are consistent with the reader's emotional labels of the text, wherein the reader's emotional labels include the reader's emotional labels of the text in the training set and the reader's predicted emotions of the text in the test set.
[0022] If they match, then the emotional behavior-derived knowledge from the text will be appended to the end of the text.
[0023] If there is a discrepancy, the emotions in the emotional behavior-derived knowledge in the text will be removed and then appended to the text.
[0024] Optionally, based on the sentiment transfer relationship and the original decision output, decision enhancement is performed on the samples in the new dataset to obtain a self-reflective decision output, specifically including: The sentiment transfer matrix is determined based on the inertial prediction bias of the original dataset samples.
[0025] The forward sentiment reasoning matrix is obtained by transposing the sentiment transfer matrix.
[0026] The transformed forward sentiment inference matrix is obtained by taking the reciprocal of each element in the forward sentiment inference matrix.
[0027] The transformed forward sentiment inference matrix is normalized to obtain the sentiment forward inference weight matrix.
[0028] The original decision output, i.e., the probability distribution of the reader's sentiment, is obtained through a linear layer.
[0029] The reader sentiment probability distribution of the target sample is obtained through a linear layer, and the reader sentiment probability distribution of the target sample is transformed into a probability and used as the original decision output.
[0030] Using the sentiment dimension corresponding to the maximum value in the original decision output, query the row vector in the sentiment forward inference weight matrix to obtain the weight coefficient.
[0031] The original decision output is multiplied by the weight coefficients and then passed through the Softmax function to obtain the self-reflective decision output.
[0032] Optionally, the expression for the reader's final emotional decision output is: ; in, To provide readers with the final emotional decision-making output, This is the first dynamic weight parameter. This is the second dynamic weight parameter. For the original decision output, Output for self-reflective decision-making.
[0033] Secondly, the present invention provides a reader sentiment prediction system based on textual emotional behavior knowledge. When the reader sentiment prediction system based on textual emotional behavior knowledge is run by a computer, it executes a reader sentiment prediction method based on textual emotional behavior knowledge as described in the first aspect.
[0034] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects: This invention discloses a reader sentiment prediction method and system based on textual emotional behavior knowledge. The invention aims to integrate emotional behavior-derived knowledge and sentiment confusion relationships within the text, improving the reader sentiment prediction algorithm's ability to distinguish between easily confused emotions from two perspectives: feature enhancement and decision enhancement. Regarding feature enhancement, two methods are proposed based on emotional behavior-derived knowledge and sentiment confusion relationships within the text: First, based on counterfactual assumptions and sentiment confusion relationships, negative sentiment examples are constructed under different emotional behavior event chains, strengthening the reader sentiment prediction algorithm's focus on and representation of complete event chains. Second, by using feature concatenation to enhance the salient emotional features in social event texts through emotional behavior-derived chains, the reader sentiment prediction model's ability to understand and represent social events is strengthened. Regarding decision enhancement, the self-reflection ability of the reader's sentiment decision-making process is improved using sentiment transfer relationships. This allows the reader sentiment prediction model to predict reader sentiment based on samples under the guidance of knowledge of sentiment misjudgment and evolutionary paths, enhancing the reader sentiment prediction algorithm's ability to distinguish easily confused samples and thus reducing the reader sentiment prediction bias between easily confused emotions. Attached Figure Description
[0035] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0036] Figure 1 This is a flowchart illustrating a reader sentiment prediction method based on textual sentiment behavior knowledge provided in Embodiment 1 of the present invention. Figure 2 This is an overall flowchart of reader sentiment prediction based on text sentiment behavior knowledge provided in Embodiment 1 of the present invention; Figure 3 This is a simplified schematic diagram of the reader sentiment prediction model based on text sentiment behavior knowledge provided in Embodiment 1 of the present invention. Detailed Implementation
[0037] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0038] The emotions contained within text are valuable, helping managers understand public sentiment behind social events. Current mainstream methods focus on determining the subjective emotions within the text, with few methods determining the reader's emotions. Determining the subjective emotions within a text can be categorized into three types: sentiment analysis based on sentiment lexicons, sentiment analysis based on machine learning, and sentiment analysis based on deep learning.
[0039] Sentiment analysis based on sentiment dictionaries utilizes these dictionaries to obtain the sentiment values of sentiment words and determines the overall sentiment tendency of the text through weighted calculations. English sentiment dictionaries are relatively well-developed and mature, with commonly used ones including GeneralInquirer, SentiWordNet, Opinion Lexicon, and MPQA. Classic Chinese sentiment dictionaries include HowNet (a Chinese knowledge-sharing website) and the Chinese Sentiment Lexicon ontology from Dalian University of Technology. To construct a larger-scale sentiment dictionary, Zhao Yanyan et al. built a dictionary containing 100,000 sentiment words using 1.46 billion Weibo posts as a corpus, including 50,000 positive and 50,000 negative words. The GeneralInquirer English sentiment dictionary collected 1,914 positive words and 2,293 negative words, and tagged each word according to polarity, intensity, and part of speech to make it suitable for sentiment analysis tasks of different granularities. Senti WordNet, developed by the Italian Institute for Information Science, contains 117,659 records. Each record consists of six components: POS (part of speech), ID (entry number), Pos Score (positive sentiment score), Neg Score (negative sentiment score), Synset Terms (synonym names), and Gloss (annotation). The size of the sentiment dictionary is a crucial factor affecting its versatility. Google proposed a graph propagation-based algorithm to mine a large-scale sentiment dictionary of over 170,000 words from the web. Mohammad et al. constructed a large-scale sentiment dictionary containing 1.22 million words / phrases based on Twitter data. Text sentiment analysis based on sentiment dictionaries relies on predefined lexicons. While this eliminates the need for training data and shortens the sentiment analysis time, it requires excessive manual annotation, and polysemy makes it difficult to transfer sentiment dictionaries across different domains.
[0040] Machine learning techniques such as Conditional Random Fields (CRF), Support Vector Machines (SVM), and Naive Bayes are widely used in sentence and document-level sentiment recognition tasks. Dependency syntax, as a traditional sentence-level sentiment analysis technique, is often used to describe the dual propagation relationship between sentence features and sentiment opinions. Sajeetha Thavareesan et al. attempted to find the optimal model for Tamil sentiment analysis from a combination of various machine learning models and feature extraction methods, using the bag-of-words model, TF-IDF, and fastText, along with basic text features to create feature vectors. The chosen classifiers included SVM, extreme gradient boosting, random forest, neural networks, K-nearest neighbors, logistic regression, and multinomial Naive Bayes. Mohammad Aman Ullah et al., to verify the effectiveness of sentiment symbols in text for sentiment recognition, built a sentiment symbol dictionary and conducted experiments using classifiers such as Naive Bayes, SVM, decision trees, and random forests. Experimental results showed that the classifiers generally had higher accuracy in sentiment recognition under text aided by sentiment symbols. Xinfei Li et al. combined a domain sentiment lexicon weighting method with a Naive Bayes approach, using heterogeneous value decomposition to reduce the dimensionality of the sparse word vector matrix to eliminate redundant features. They then constructed a Naive Bayes multinomial model to perform sentiment analysis on hotel review texts. Pulung et al. combined Query Expansion Ranking (QER) and Genetic Algorithm-Support Vector Machine (GA-SVM) to improve the performance of sentiment classification.
[0041] With the continuous development of deep learning, text sentiment analysis based on neural network models such as convolutional neural networks, long short-term memory networks, and attention mechanisms has achieved excellent performance. Park et al. collected 144,701 tweets with reader sentiment tags, built a CNN for supervised sentiment classification, and measured the sentiment category of unknown sentiment words based on the cosine similarity between word embeddings. Arabian et al. built 12 CNN models for Hindi film review sentiment classification by changing the depth of convolutional layers, filter size, and number, achieving 95% accuracy. Zhang et al. used a large-scale Chinese sentiment dataset with sentiment annotations from human-computer dialogues, demonstrating through experiments how to obtain the optimal convolutional kernel size and word embedding dimension between time cost and accuracy. Zou et al. compensated for the lack of information in short texts by representing features of emojis, combining word vectors and emoji vectors into a sentence matrix before using a CNN for sentiment recognition. While convolutional neural networks have been proven effective in recognizing subjective emotions in short texts, their difficulty in extracting context-related features leads to poor performance in long text sentiment recognition tasks. T. Swathi et al. analyzed the positive or negative sentiment of stock-related text in Twitter feeds, using LSTM to extract features and uncover clients' positive or negative opinions about stocks, ultimately leading to stock price predictions. However, identifying data with long text-span dependencies poses a challenge for LSTM. Bi-LSTM was used to handle long sentence dependencies. Wei et al. proposed a Bi-LSTM model with Multi-Polarity Orthogonal Attention for latent sentiment analysis. Compared to traditional single-attention models, multi-polar attention can identify differences between words and sentiment directions, especially in texts lacking explicit sentiment words, where it more accurately captures latent sentiment polarity features. Lin et al. applied Bi-LSTM and CRF to aspect-level sentiment classification tasks, extracting dependencies and positional relationships in text through Bi-LSTM and CRF, thereby enabling attribute word mining and sentiment polarity identification. Combining basic neural network models can leverage the strengths of each. For example, combining CNN and LSTM not only utilizes CNN's advantage in extracting local features but also leverages LSTM to extract contextual information from the text. Rajabi et al. combined CNN and BiLSTM in two different ways, aiming to extract fine-grained features from the text through CNN while using BiLSTM to extract sequential features. Malak et al. used a multi-model decision fusion approach to identify sentiment features in Arabic text.Sub-model one is a simple fully connected layer, while sub-model two combines CNN and LSTM, and integrates the output vectors of both sub-models to provide the final sentiment prediction label during the final decision-making process for sentiment recognition. Liao et al. proposed a multi-layered graph neural network model for text sentiment analysis. The bottom layer uses minimum connection windows to focus on local features of words, the middle layer selects larger connection windows to focus on sentence-length dependency features, the high layer connects all words to achieve global feature regions, and finally, feature fusion is achieved through an attention mechanism.
[0042] Pre-trained models based on large-scale pre-training have brought new breakthroughs to sentiment analysis tasks. The Transformer model proposed by Google in 2017 relies entirely on attention mechanisms to characterize the global dependency between input and output, and its parallel computation advantage overcomes the limitations of sequential computation in recurrent neural networks. Subsequently, Google's Bidirectional Encoder Representation from Transformers (BERT) model, based on the Transformer structure, proposed in 2018, achieved significant performance improvements in 11 NLP tasks, and excellent performance can be achieved with only fine-tuning for downstream tasks. The emergence of Transformer has pushed the performance of sentiment analysis tasks to a higher level. Anmol et al. evaluated Twitter users' positive, negative, or neutral sentiment towards the Covid-19 vaccine through fine-tuning of various pre-trained models, using state-of-the-art models such as RoBERTa, XLNet, BERT, CT-BERT, and BERTweet, which were pre-trained based on Covid-19 Twitter texts. Wang et al. proposed a Dual-Branch Feature Coding Network based on RoBERTa (DBN-Ro), which uses a pre-trained RoBERTa model for text representation, followed by dual-channel feature encoding using Bi-LSTM and a Temporal Convolutional Network (TCN) to address the problem of polysemy in different linguistic contexts. You et al. proposed an adaptive pre-training model for aspect-oriented sentiment analysis tasks, incorporating sentiment words and aspect word pairs as mask words into the pre-training stage of the RoBERTa model, and achieving high-precision aspect-oriented sentiment prediction through model fine-tuning. Annisa et al. decomposed the aspect-oriented sentiment analysis task into a single-sentence sentiment classification task and a sentence-pair sentiment classification task based on auxiliary sentences. Experiments showed that the pre-trained model fine-tuned for the single-sentence sentiment classification task achieved better prediction accuracy with feature enhancement from auxiliary sentences. Zhang et al. used an ELECTRA pre-trained model to perform semantic embedding representation of text features, obtaining sentiment semantic information through attention mechanisms and Bi-LSTM to mine text sentiment feature vectors and perform sentiment recognition. Wu et al. designed two different attention mechanisms when assigning attention to contextual features based on different aspect words: one is a soft attention mechanism based on Transformer, and the other is a combinatorial attention mechanism that supports subtractive attention.Sayyida et al. proposed a BERT-based Convolutional Bi-directional Recurrent Neural Network (CBRNN), which comprises three parts: a pre-trained BERT module, a convolutional module, and a Bi-LSTM module. The pre-trained BERT model is used to compensate for the lack of contextual knowledge in the text. The CBRNN model uses dilated convolutions instead of classic convolutions to obtain local and global semantic features of the embedded data, and Bi-LSTM is used for ranking the entire sentence, thus combining the advantages of multiple models to achieve a joint sentiment decision output.
[0043] Research on sentiment analysis for social events has focused on improving sentiment recognition accuracy by modifying model structure or incorporating prior knowledge. However, existing research on knowledge fusion in sentiment analysis lacks solutions to the problem of misjudging similar sentiments.
[0044] This invention addresses the problem of difficulty in distinguishing easily confused emotions due to the high-frequency coexistence of certain emotions in text. It proposes a reader sentiment prediction method and system based on textual emotional behavior knowledge, breaking down the complex causal relationship between emotion and behavior, strengthening the reader sentiment prediction algorithm's focus on the core elements of objective events, and improving the reader sentiment prediction model's ability to identify core emotions in social events. A complete emotional behavior chain in social event texts provides a concise and structured overview of the social event. Behavior, as a core component of social events, plays a crucial role in the reader's emotional understanding and contains more significant and richer emotional features compared to other auxiliary texts. Simultaneously, the emotional confusion relationships discovered in implicit emotional relationship research based on cognitive biases reveal the inertial error in reader sentiment prediction algorithms. Therefore, this invention aims to integrate emotional behavior-derived knowledge and implicit emotional relationships in texts, improving the reader sentiment prediction algorithm's ability to distinguish easily confused emotions from both feature enhancement and decision enhancement perspectives. The main contributions of this invention are as follows: 1) Two feature enhancement methods are proposed based on the derived knowledge of emotional behavior and the relationship of emotional confusion in the text. Based on the counterfactual assumption and the implicit emotional confusion relationship, negative examples are constructed for existing social event samples under different emotional behavior driving chains. This strengthens the reader sentiment prediction algorithm's focus on and representation ability of the complete event chain, thereby improving the algorithm's performance. Highly condensed structured derived knowledge of emotional behavior is concatenated into the text to enhance the textual expression that evokes reader emotions.
[0045] 2) An emotion decision enhancement method is proposed based on implicit emotion transfer relationships. The emotion transfer matrix, which implies the direction of emotion evolution between samples, intervenes in the decision-making process of the reader emotion prediction algorithm, thereby improving the reader emotion prediction intelligent algorithm's macroscopic understanding of the emotion relationships between samples. Based on the emotion transfer matrix decision fusion, the reader emotion prediction model completes the self-reflection process in reader emotion prediction, thereby reducing the emotion prediction bias between easily confused emotions.
[0046] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0047] Example 1: like Figure 1 , Figure 2 and Figure 3 As shown in this embodiment, a reader sentiment prediction method based on text sentiment behavior knowledge includes: S1: Obtain the text provided by the writer, hereinafter referred to as the text; the text contains emotional behavior-derived knowledge and implicit emotional relationships; the implicit emotional relationships include emotional confusion relationships and emotional transfer relationships; the emotional behavior-derived knowledge is a structured triple composed of subject, emotion, and behavior; the emotional confusion relationship is the approximate distance between emotions; the emotional transfer relationship is the inertial prediction bias direction when making emotional recognition decisions.
[0048] S2: Based on the counterfactual hypothesis and the aforementioned sentiment confusion relationship, feature enhancement is performed on a portion of the samples in the training set using sentiment behavior-derived knowledge from the text to obtain negative sample samples; the counterfactual hypothesis is a hypothesis that negates and re-represents facts that have already occurred; the negative sample samples are samples constructed by retaining auxiliary text labels and replacing sentiment behavior-derived knowledge.
[0049] S3: Add the negative sample to the original training set to obtain a new training set.
[0050] S4: Concatenate the sentiment behavior-derived knowledge of the text in the dataset with the text to obtain the concatenated sample, forming a new dataset, which includes a new training set and a test set.
[0051] S5: Obtain the original decision output, i.e. the probability distribution of the reader's emotions, through a linear layer. Based on the emotion transfer relationship and the original decision output, perform decision enhancement on the samples in the new dataset to obtain a self-reflective decision output.
[0052] S6: Determine the final decision output, i.e., the reader's emotion, based on the self-reflective decision output and the original decision output.
[0053] This embodiment addresses the problem of difficulty in distinguishing easily confused emotions due to the high-frequency coexistence of certain emotions in text. It proposes a reader sentiment prediction study based on textual emotional behavior knowledge. It constructs easily confused emotion negative examples based on counterfactual assumptions and the relationship between emotion confusion. It enhances the salience of the sample reader sentiment label features by using emotional behavior-derived knowledge in the text. At the same time, it guides the reader sentiment decision-making self-reflection process of the model based on emotion transfer knowledge, thereby achieving high-precision prediction of easily confused emotions driven by emotional behavior knowledge in text.
[0054] This embodiment studies how to improve the reader sentiment prediction model's ability to distinguish between similar emotions from two perspectives: feature enhancement and decision enhancement. Emotional behavior-derived knowledge is a highly condensed representation of social events, with behavioral factors as core components that serve as crucial clues for stimulating reader emotions with high arousal. Implicit sentiment relationships quantify and evolve multidimensional emotional distance relationships, including sentiment confusion and sentiment transfer relationships. This embodiment proposes a feature enhancement method based on emotional behavior-derived knowledge and sentiment confusion relationships in text. It constructs negative examples using counterfactual assumptions and sentiment confusion relationships, and enhances salient emotional features in social event texts through feature concatenation using emotional behavior-derived chains, strengthening the reader sentiment prediction model's ability to understand and represent social events. From a decision enhancement perspective, sentiment transfer relationships improve the self-reflection ability of the reader's emotional decision-making process, enabling the reader sentiment prediction model to predict reader sentiment based on samples under the guidance of sentiment misjudgment and evolutionary path knowledge, thus enhancing the algorithm's ability to distinguish easily confused sentiment samples.
[0055] As an optional implementation method provided in this embodiment, in step S1, the obtained text is ,in The first in the text One word, The length of the text.
[0056] This embodiment predicts reader sentiment labels from the input text, and the output is the reader sentiment label. .
[0057] Emotional behavior-derived knowledge is a highly condensed expression of social event texts. Specifically, it refers to a structured triad composed of "subject-emotion-behavior". It means that a certain subject performs a certain behavior under the drive of a certain emotion. Among them, behavioral factors, as the core elements that influence the subsequent generation of emotions, are important clues that determine the reader's emotional decision.
[0058] This embodiment mines subject-emotion-behavior metadata through rules and manual review, and expands the subject-emotion-behavior metadata based on a thesaurus and similarity calculation to construct an subject-emotion-reaction (Aspect-Emotion-Reaction) knowledge base. The behavior of the public stimulated by certain specific subjects is relatively stable; for example, when an earthquake occurs, the public will flee dangerous areas. Similarly, the driving force of certain specific emotions on behavior is also relatively stable; for example, when the public is moved, they will cry. This application proposes two behavior mining modes: specific subject and specific behavior, and specific emotion and specific behavior. By setting rules for word order and parts of speech, it extracts Emotion-Reaction (ER) and Aspect-Reaction (AR) behavior patterns from the corpus.
[0059] Use the Jieba word segmentation tool to obtain text. words in With part of speech ,in, For the first in the text One word, For the first The part of speech of each word is determined. Noun morphemes are then grouped into the candidate subject set according to word order based on part-of-speech restrictions. ,in, For the first One candidate subject. A candidate sentiment set is constructed based on adjective and adverbial morphemes. ,in, Indicates the first Candidate emotions. Verb morphemes are considered as a set of candidate behaviors. ,in, Indicates the first One candidate behavior.
[0060] For Aspect-Reaction (AR) behavior pattern extraction, since subject events often appear at the beginning of the text in terms of word order, this embodiment selects a candidate subject set by setting a word order threshold. Center front Based on the word order relationship, candidate AR behavior patterns are mined using Formula 1. : (1); in, For candidate subjects—behavioral behavior patterns, As the first candidate entity, As the second candidate subject, For the firstk One candidate entity, For the first i One candidate entity, For the first candidate action, For the first v One candidate behavior, For the first j One candidate behavior, To calculate the word order of candidate morphemes in the text.
[0061] For Emotion-Reaction (ER) behavior pattern extraction, since the word order of emotion and behavior words in the original sentence is not stable, this application defines a word order window to limit the candidate emotion mining space to the semantic units adjacent to the behavior. The candidate ER behavior pattern extraction method is shown in Formula 2: (2); in, For candidate emotion-behavior patterns, The first candidate emotion, The second candidate emotion, For the first u One candidate emotion, For the first i One candidate emotion, For the first candidate action, For the first v One candidate behavior, For the first j One candidate behavior, For word order window size, To calculate the word order of candidate morphemes in the text.
[0062] By manually reviewing and revising the candidate sets of the two behavioral patterns to filter out noise and errors, this application obtains stable AR and ER behavioral patterns. Furthermore, based on the obtained AR and ER behavioral patterns, triple completion and expansion are performed to obtain complete AER triple knowledge. Specifically, this embodiment completes the Emotion-Reaction (ER) behavioral pattern by mining and filling in the subject elements preceding the emotional and behavioral words in the text, and completes the Aspect-Reaction (AR) behavioral pattern by mining and filling in the emotional words between the subject and behavioral word order. Finally, through manual evaluation, factually accurate and reasonable AER triple relation metadata, i.e., the emotional behavior-derived knowledge in the text, is obtained, as shown in Table 1.
[0063] Table 1. Example table of AER triple relation metadata
[0064] Implicit affective relationships include affective confusion relationships and affective transfer relationships. Affective confusion relationships reveal the approximate distance between affective relationships, while affective transfer relationships refer to the direction of the inertial prediction bias when readers make affective recognition decisions.
[0065] To uncover implicit emotional relationships within social events, this embodiment proposes a multi-reader sentiment prediction model decision synthesis method. The method takes as input the prediction matrices of the text from three cutting-edge reader sentiment classification models: Electra (2020), RoformerV2 (2022), and Lert (2022). , and This method only integrates the final decision opinions of the models, and its output is a cognitive bias matrix of multiple models on the text dataset. Electra (2020), RosemerV2 (2022), and Lert (2022) are all cutting-edge models that have been shown to have excellent reader sentiment recognition performance in some studies. Therefore, this embodiment selects these three models to extract implicit relations, and the number of the three models is also relatively moderate.
[0066] Let the multi-model cognitive bias matrix be , where matrix elements Indicates the true label is The sample was predicted as The number of categories. Given text Its true reader sentiment tags are The multi-reader sentiment prediction model decision synthesis method is divided into two cases: Scenario 1: When two or more reader sentiment classification models are used to evaluate the samples The predicted labels are all This means that more than half of the reader sentiment prediction models have similar reader sentiment perceptions of the sample. At this point, multiple models have similar perceptions of the sample. The overall opinion is that In the matrix middle Increase by 1, where For the true labels of the samples, for .
[0067] Scenario 2: When the three reader sentiment classification models are applied to the samples The different predicted labels indicate a cognitive bias among the multiple models regarding the hidden sentiment in the samples, leading to different sentiment predictions from the readers. In this case, the three models have different interpretations of the samples. Only in the predicted probability The largest dimension will be considered. This is to avoid the influence of low-confidence sentiment dimensions on decision fusion. For example, the Lert model applies a certain amount of confidence to the samples. Reader sentiment prediction output probability distribution ,when The probability with the highest confidence level when the value is 3 is ,Will Redefined That is, except The elements in the dataset are set to 0, while the values of other dimensions are set to 0. Finally, the Lert model applies this to the samples. probability distribution of predicted opinions pass After normalization, we obtain: (3); and Calculation and Similarly, this will not be repeated here. Sample Comprehensive opinions given By calculating the samples using three models Forecast , and The average value is obtained. Add to matrix Real labels in The row vectors represented by these vectors. After applying the multi-reader sentiment prediction model decision synthesis method to all texts in the test set, the joint cognitive bias matrix of the three text classification models is obtained. .
[0068] (4); In this embodiment, relative entropy is used to measure the transfer relationship between different types of emotions. Relative entropy representation uses a method based on... Encoding from encoding The number of extra bits required on average for each sample. Relative entropy is asymmetric, i.e. Relative entropy The practical significance in emotional relationships is expressed as: The probability distribution of this emotion shifts to The intensity of this emotion is calculated using Formula 5. In this embodiment, when the relative entropy... The smaller the value, the more it means emotional orientation The greater the likelihood of a shift in the direction of one's emotions.
[0069] (5); in, and These represent the joint cognitive bias matrix. The Middle row vector and the row vector The probability distribution. Indicates the first The first row vector A probability value, Indicates the first The first row vector A probability value. refer to and cross-entropy, refer to Information entropy. High means the first The various emotional characteristics in the emotional samples are relatively average. Low means the first The emotional distribution in this sample is relatively monotonous, with abundant explicit emotional features and few implicit emotional features.
[0070] The difference between emotion confusion and emotion transference lies in the fact that emotion confusion is a symmetric approximation measure. In this embodiment, to more intuitively observe the similarity between emotions, the Jensen-Shannon divergence, a symmetric similarity measure, is used to calculate the confusion relationship between emotions. Cognitive bias matrix. The Middle and probability distribution of row vectors and Emotional confusion between Calculated using Formula 6: (6); in, and The meaning is similar to the above formula. refer to and The relative entropy, refer to and The relative entropy.
[0071] The calculated intensity of emotional confusion and the intensity of emotional transfer reveal the evolution path of emotions and the prediction bias path of the reader's emotional prediction model. This enhances the understanding of emotional confusion and transfer in social events and provides interpretable theoretical support for the prediction patterns of the reader's emotional prediction model.
[0072] The corpus used in this embodiment for mining emotion-behavior-driven knowledge in text comes from a news text dataset. This dataset mainly consists of descriptions related to social events. These descriptions often contain complete event timelines and are crucial factors influencing readers' emotional responses. Extracting emotion-behavior-derived knowledge from these social event descriptions specifically refers to the subject-emotion-behavior structured triple, which signifies that a subject performed a certain behavior driven by a particular emotion. Counterfactual assumptions involve negating and re-representing facts that have already occurred. The counterfactual assumption proposed in this embodiment is that the emotion-behavior-derived triple contains the complete event chain of the text and is the decisive morpheme that dominates the reader's emotional response. Modifying the emotion-behavior-derived triple in the text can alter the reader's subjective emotion towards the text.
[0073] For issues involving partial approximation of sentiment confusion, the sentiment confusion relationship in implicit sentiment relationships guides the replacement process of sentiment behavior-derived triples in counterfactual assumptions. Negative examples of specific sentiments are constructed by retaining auxiliary text tags and replacing the core sentiment behavior-derived chain, and these are added to the training set for the reader sentiment prediction task. The difference between the negative examples and the original examples lies in the different core sentiment behavior chains and reader sentiment labels, improving the model's understanding of the mapping relationship between the core sentiment behavior event chain and the reader sentiment label.
[0074] The following describes the process of constructing negative examples: First, text is annotated using AER knowledge matching. The placement of words representing the main subject, emotion, and action in the text. Represented as Its true reader sentiment tags are Based on the sentiment confusion knowledge obtained from Formula 6, calculate... Similar emotions .
[0075] Secondly, the query training set uses approximate emotions. Text labeled with reader emotions Based on the acquired emotional behavior-derived knowledge, i.e., AER knowledge query, to Text labeled with reader emotions Obtain text Approximate AER knowledge in emotion .
[0076] (7); in, Refers to text The true label.
[0077] Ultimately, by using text AER triples in Replace with To achieve negative sample Build: (8); in, For negative samples, For replacement operation, For text, Similar texts Knowledge derived from emotional behavior in The first word in the text. For the first in the text One word, For the first in the text One word.
[0078] Negative sample The reader's emotional tag was set as The replacement is based on the aforementioned counterfactual assumption. Subject, emotion, and behavior words from samples with similar sentiments are used to replace the subject, emotion, and behavior words in the original samples, while the remaining words remain unchanged. This constructs negative examples, thereby expanding the training set.
[0079] Based on the counterfactual assumption and the relationship of sentiment confusion, a feature enhancement method for negative sample samples is constructed. By retaining auxiliary morphemes and only replacing the emotional behavior triples derived from the dominant sentiment, the reader sentiment prediction model’s attention to and representation ability of emotional behavior triples is improved, thereby improving the prediction accuracy of the reader sentiment prediction model.
[0080] Emotional behavior-derived knowledge constructs a complete text event chain in a structured form of subject-emotion-behavior chain, containing richer emotional features compared to other auxiliary tags in the text. The Jieba word segmentation tool was used to segment the text. Word tags in Based on AER knowledge matching, the given text is matched and explicitly annotated. The position of the AER triplet in the data: (9); AER triplet knowledge Treated as text A summary overview, pieced together in the text The sentence ends with the construction of a new sample. On the one hand, it enhances the reader sentiment prediction model's focus on the subject, emotion, and behavior texts in the triplet; on the other hand, it strengthens the recognition of important morphemes in social event texts during the feature representation process.
[0081] During the knowledge assembly process, because the sentiment words in the AER triples are sentiment categories derived from the subject, while the text... The reader sentiment labels are generated from the reader's perspective, and the discrepancy between the two sentiment categories is a significant reason for the bias in reader sentiment prediction. Therefore, this embodiment considers the consistency between the sentiment of the triplet and the reader sentiment labels of the text when concatenating features. For the training set, when the sentiment words in the triplet match the reader sentiment labels of the text, the entire triplet is concatenated into the text. Then, when the sentiment words in the triplet do not match the reader's sentiment tags in the text, the sentiment words in the triplet are removed and then concatenated into the text. For the test set, the reader sentiment label of the text is unknown to the model. Therefore, the predicted sentiment of the text is used as the reader sentiment label of the text, and then concatenated with the sentiment words of the triple after consistency judgment.
[0082] (10); in, This indicates a splicing operation. Refers to text The main body, Refers to text emotions The mask, Refers to text The behavior.
[0083] By using a splicing method based on knowledge derived from emotional behavior in the text, the richness of salient emotional features of the sample can be improved from a macro perspective, which can alleviate the problem of reader sentiment prediction bias caused by complex and multidimensional emotional features.
[0084] As an optional implementation method provided in this embodiment, step S5 specifically includes: S51: Determine the sentiment transfer matrix based on the sentiment transfer relationship corresponding to the target sample; the target sample is any sample in the training set.
[0085] S52: Transpose the emotion transfer matrix to obtain the forward emotion reasoning matrix.
[0086] S53: Take the reciprocal of each element in the forward sentiment inference matrix to obtain the transformed forward sentiment inference matrix.
[0087] S54: Normalize the transformed forward sentiment inference matrix to obtain the sentiment forward inference weight matrix.
[0088] S55: Obtain the sentiment probabilities corresponding to the target sample through a linear layer, and transform the reader sentiment tags of the text corresponding to the target sample into probabilities to obtain the original decision output.
[0089] S56: Using the sentiment dimension corresponding to the maximum value in the original decision output, query the row vector in the sentiment forward inference weight matrix to obtain the weight coefficient; S57: Multiply the original decision output by the weight coefficients and pass it through the Softmax function to obtain the self-reflective decision output.
[0090] Specifically, implicit sentiment transfer relationships imply the inertial prediction bias of sentiment prediction algorithms; the sentiment transfer value between two sentiment samples represents the probability of one-way sentiment transfer. Sentiment Transfer Matrix This matrix represents the backward evolution path of emotions and the prediction bias path. Each row of the matrix represents the possibility of the emotion in that row evolving into other emotions. Regarding the self-reflection process of emotional decision-making, the intelligent emotion prediction algorithm needs to reconsider whether the current emotional decision is caused by the actual reader's emotional label bias; this is essentially a forward emotional causal reasoning process. Therefore, in this embodiment, the emotional transfer matrix obtained is transposed to obtain the forward emotional inference matrix. : (11); in, Indicates emotion by Turning The possibilities are similar for other symbols, and will not be elaborated further here. The forward sentiment inference matrix is obtained by transposing the sentiment transfer matrix. Each element in the matrix represents the probability that the sentiment in that row can be obtained from other six-dimensional sentiment offsets. This is due to the forward sentiment inference matrix. The elements in the matrix are obtained by calculating the KL divergence, characterized by a higher probability of transition as the value decreases. Therefore, this embodiment calculates the reciprocal of the original forward sentiment inference matrix. The larger the value of the element in the sequence, the greater the probability of a transition.
[0091] Emotional Reasoning Matrix Elements on the main diagonal have a value of 0, indicating that the emotion is closest to itself. In this embodiment, the value of the furthest emotional relationship in each row is reassigned. This operation serves two purposes: firstly, to calculate the feasibility of the reciprocal operation, and secondly, to represent the emotion itself as the furthest emotional relationship, enabling the reader's emotion prediction model to reflect on other similar emotions. The transformed forward emotion inference matrix is then... Represented as: (12); After row-normalization, the forward sentiment inference matrix is... Transformed into an emotional forward inference weight matrix : (13); Affective Forward Inference Weight Matrix Each element in the table represents the probability weight of the sentiment in that row caused by other sentiment biases, representing the reader sentiment probability distribution of the target sample. Obtained directly from the output of the linear layer: (14); in, This represents the decision value for predicting the sentiment as "love". This represents the decision value for predicting sentiment as fear. Indicates the predicted sentiment as The decision value, Indicates the predicted sentiment as The decision value, Indicates the predicted sentiment as The decision value, Indicates the predicted sentiment as The decision value.
[0092] Due to the probability distribution of reader emotions It contains negative values, and is directly used in the sentiment forward inference weight matrix. Reader sentiment tags corresponding to the text Assigning values to the output would distort the decision results; therefore, the reader sentiment probability distribution of the target sample is first calculated using the Softmax function. This is transformed into decision probabilities, i.e., the original decision output. : (15); Based on the original decision output The sentiment dimension query forward inference weight matrix corresponding to the maximum value in the middle. Obtaining weight coefficients from row vectors in : (16); With weighting coefficients The original decision output is multiplied by the dot product. After passing through the Softmax function, a decision output based on sentiment transfer knowledge is obtained. That is, self-reflective decision-making output: (17); To help the model dynamically adjust the self-reflective decision output acquired from sentiment transfer knowledge. Compared with the original decision output Dependency weights between them, define the first dynamic weight parameter. Second dynamic weight parameter After the Softmax operation, and Multiplying each of the two decision outputs and adding them together yields the reader's final emotional decision output based on the emotional transfer relationship.
[0093] (18); in, To provide readers with the final emotional decision-making output, This is the first dynamic weight parameter. This is the second dynamic weight parameter. For the original decision output, Output for self-reflective decision-making.
[0094] To describe in detail the enhancement process of sentiment prediction methods on samples and the changes in sentiment decisions during the prediction process, this embodiment selects some test set texts and related training set texts for case analysis. The ReformerV2 baseline model and ReformerV2... For example, in the augmented model, each test set text selects two related training set texts that influence its emotional decision-making based on knowledge derived from emotional behavior.
[0095] In conclusion, the case analysis process, based on the changes in emotional decisions on the training set, demonstrates the effectiveness and rationality of the reader sentiment prediction method based on textual emotional behavior knowledge.
[0096] The complete emotional behavior chain in social event texts serves as a concise and structured summary of social events, containing more significant and richer emotional features compared to other auxiliary texts. This invention aims to integrate emotional behavior-derived knowledge and emotional confusion relationships within the text to improve the distinguishability of reader sentiment prediction algorithms among easily confused emotions from two perspectives: feature enhancement and decision enhancement. Regarding feature enhancement, two methods are proposed based on emotional behavior-derived knowledge and emotional confusion relationships within the text: strengthening textual expressions that evoke reader emotions using highly condensed, structured emotional behavior-derived knowledge; and constructing negative examples under different emotional behavior event chains based on counterfactual assumptions and implicit emotional confusion relationships, thereby enhancing the reader sentiment prediction algorithm's focus on and representation ability of complete event chains. From a decision enhancement perspective, decision fusion based on the emotion transfer matrix completes the model's self-reflection process during reader sentiment prediction, thereby reducing the prediction bias between easily confused emotions. Experimental results demonstrate that the enhancement method based on the fusion of emotional behavior knowledge within the text proposed in this invention can improve the performance of reader sentiment prediction tasks. Meanwhile, the experimental phenomenon of improving task accuracy through knowledge fusion in this study indirectly confirms the rationality and effectiveness of the emotional behavior-derived knowledge and implicit emotional relationships in the text mined by the aforementioned work.
[0097] Example 2: This invention provides a reader sentiment prediction system based on textual emotional behavior knowledge. When the reader sentiment prediction system based on textual emotional behavior knowledge is run by a computer, it executes a reader sentiment prediction method based on textual emotional behavior knowledge as described in Example 1.
[0098] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0099] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A reader sentiment prediction method based on text sentiment behavioral knowledge, characterized in that, include: Retrieve the text provided by the writer; The text contains knowledge derived from emotional behavior and implicit emotional relationships; The implicit emotional relationships include emotional confusion relationships and emotional transfer relationships; The knowledge derived from emotional behavior is a structured tripartite consisting of the subject, emotion, and behavior; The emotion confusion relationship is the approximate distance between emotions; the emotion transfer relationship is the direction of inertial prediction bias during emotion recognition decision-making. Based on the counterfactual hypothesis and the aforementioned sentiment confusion relationship, feature enhancement is performed on a portion of the samples in the training set using sentiment behavior-derived knowledge from the text, resulting in negative sample samples. The counterfactual hypothesis is a hypothesis that negates and re-represents facts that have already occurred. The negative sample samples are constructed by retaining auxiliary text tags and replacing sentiment behavior-derived knowledge. The negative examples are added to the original training set to obtain a new training set; The sentiment behavior-derived knowledge of the text in the dataset is concatenated with the text to obtain the concatenated sample, forming a new dataset, which includes a new training set and a test set; The original decision output, i.e. the probability distribution of the reader's emotions, is obtained through a linear layer. Based on the emotion transfer relationship and the original decision output, decision enhancement is performed on the samples in the new dataset to obtain a self-reflective decision output. Based on the self-reflective decision output and the original decision output, the final decision output, i.e., the reader's emotion, is determined; For part of the text and its original sentiment label in the training set, the approximate sentiment label of the original sentiment label is obtained based on the sentiment confusion matrix , the text corresponding to the approximate sentiment label and the sentiment behavior derived knowledge in the text : ; The expression for the negative sample is: ; in, For negative samples, For replacement operation, For text, Similar to emotional text Knowledge derived from emotional behavior in The first word in the text. For the first in the text One word, For the first in the text One word, For text The approximate AER knowledge of emotion, For text The true label; The negative examples are added to the original training set to obtain a new training set; Based on the aforementioned sentiment transfer relationship and the original decision output, decision enhancement is performed on samples in the new dataset to obtain a self-reflective decision output, specifically including: The sentiment transfer matrix is determined based on the inertial prediction bias of the original dataset samples; The forward sentiment reasoning matrix is obtained by transposing the sentiment transfer matrix. The transformed forward sentiment inference matrix is obtained by taking the reciprocal of each element in the forward sentiment inference matrix. The transformed forward sentiment inference matrix is normalized to obtain the sentiment forward inference weight matrix. The original decision output, i.e., the probability distribution of the reader's sentiment, is obtained through a linear layer; The reader sentiment probability distribution of the target sample is obtained through a linear layer, and the reader sentiment probability distribution of the target sample is transformed into a probability and used as the original decision output. Using the sentiment dimension corresponding to the maximum value in the original decision output, query the row vector in the sentiment forward inference weight matrix to obtain the weight coefficient; The original decision output is multiplied by the weight coefficients and then passed through the Softmax function to obtain the self-reflective decision output.
2. The reader sentiment prediction method based on textual sentiment behavior knowledge according to claim 1, characterized in that, Extracting knowledge derived from emotional behavior in text, specifically including: Identify candidate subjects and their behavioral patterns; Identify candidate emotion-behavior patterns; Based on the candidate subject-behavior behavior pattern and the candidate emotion-behavior behavior pattern, the triplet is completed and expanded to obtain complete subject-emotion-behavior triplet knowledge.
3. The reader sentiment prediction method based on textual sentiment behavior knowledge according to claim 2, characterized in that, Before completing and expanding the triples based on the candidate subject-behavior behavior patterns and the candidate emotion-behavior behavior patterns to obtain complete subject-emotion-behavior triple knowledge, the following steps are also included: Noise and erroneous data in the candidate subject-behavior behavior pattern and candidate emotion-behavior behavior pattern candidate sets are filtered out through manual review and revision.
4. The reader sentiment prediction method based on textual sentiment behavior knowledge according to claim 2, characterized in that, The expression for the candidate subject-behavior behavior pattern is: ; in, For candidate subjects—behavioral behavior patterns, As the first candidate entity, As the second candidate subject, For the first k One candidate entity, For the first i One candidate entity, For the first candidate action, For the first v One candidate behavior, For the first j One candidate behavior, To calculate the word order of candidate morphemes in the text.
5. The reader sentiment prediction method based on textual sentiment behavior knowledge according to claim 2, characterized in that, The expression for the candidate emotion-behavior pattern is: ; in, For candidate emotion-behavior patterns, The first candidate emotion, The second candidate emotion, For the first u One candidate emotion, For the first i One candidate emotion, For the first candidate action, For the first v One candidate behavior, For the first j One candidate behavior, For word order window size, To calculate the word order of candidate morphemes in the text.
6. The reader sentiment prediction method based on textual sentiment behavior knowledge according to claim 1, characterized in that, The process involves concatenating the sentiment behavior-derived knowledge from the text in the dataset with the text itself to obtain a concatenated sample, forming a new dataset. This dataset includes a new training set and a test set, specifically including: Determine whether the emotions in the emotional behavior-derived knowledge of the text are consistent with the reader's emotional labels of the text, wherein the reader's emotional labels include the reader's emotional labels of the text in the training set and the reader's predicted emotions of the text in the test set. If they match, then the emotional behavior-derived knowledge in the text will be appended to the end of the text; If there is a discrepancy, the emotions in the emotional behavior-derived knowledge in the text will be removed and then appended to the text.
7. The reader sentiment prediction method based on textual sentiment behavior knowledge according to claim 1, characterized in that, The expression for the reader's final emotional decision output is: ; in, To provide readers with the final emotional decision-making output, This is the first dynamic weight parameter. This is the second dynamic weight parameter. For the original decision output, Output for self-reflective decision-making.
8. A reader sentiment prediction system based on textual emotional behavior knowledge, characterized in that, When the reader sentiment prediction system based on textual emotional behavior knowledge is run by a computer, it executes a reader sentiment prediction method based on textual emotional behavior knowledge as described in any one of claims 1-7.