Multi-channel Sentiment Classification Method and Device Based on Short Texts and Complex Semantic Symbols

By extracting the features of the verb and combining the location and quantity information, using the self-attention mechanism to fusion of features, and inputting it into the BiSRU network, the problem of existing models ignoring the influence of the verb is solved, and the accuracy and consistency of emotional classification are improved.

CN115730067BActive Publication Date: 2025-08-01NORTHEAST FORESTRY UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211430454.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-15
Publication Date
2025-08-01
Estimated Expiration
2042-11-15

AI Technical Summary

Technical Problem

When the existing emotion classification model deals with short texts mixed with vermicelli, it is easy to ignore the influence of vermicellili, resulting in a deviation from the author's emotions.

Method used

A multi-channel emotion classification method based on short text and complex semantic symbols is adopted. By extracting the features of the verb, using fully connected features to obtain the dictionary mapping vector of the verb, combining the position and quantity information feature vectors, using the self-attention mechanism to perform feature fusion, and inputting the bidirectional simple recurrent neural network BiSRU for emotion classification.

Benefits of technology

It effectively reduces the deviation of Yinwen on the emotional classification results of text, improves the accuracy and consistency of emotional classification, enhances the feature representation ability of structural symbols, and reduces the impact of sparse features and irregular semantics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115730067B_ABST
    Figure CN115730067B_ABST
Patent Text Reader

Abstract

Multi-channel Sentiment Classification Method and Device Based on Short Texts and Complex Semantic Symbols, which relate to a sentiment classification method and device. To solve the problem that the current sentiment classification model ignores the influence of emoticons on texts, which easily leads to a deviation between the classification result and the author's sentiment. The present invention extracts emoticons in short texts, divides the emoticons according to the human kinematics model and performs matching extraction of emoticons, trains using a fully connected feature extraction network to obtain an emoticon dictionary mapping vector, and splices it with a position quantity information feature vector to obtain an emoticon feature vector; obtains a text vector corresponding to the text information in the short text, fuses it with the emoticon feature vector to obtain a fused feature, optimizes the fused feature vector using a self-attention mechanism, and then sends it into a sentiment classification model for sentiment separation. The sentiment classification model is a bidirectional simple recurrent neural network BiSRU composed of simple neural units SRU.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of deep learning technology, and specifically relates to a sentiment classification method and device. Background Art

[0002] With the rapid development of social networks, the short text information generated by various social platforms (such as user comments, Weibo super topics, WeChat messages and barrage, etc.) has exploded. It is of practical significance to mine hidden information through short text classification technology.

[0003] In real-world scenarios like short video comments and bullet-screen comments, there's a large amount of short text mixed with text and symbols. Short text messages not only suffer from sparse features and irregular semantics, but may also contain some structural symbolic information. These symbols are concrete expressions composed of certain compositional rules and can reflect and influence the emotional expression of the entire text. Emoticons are particularly representative and are widely used because they're easy to use and don't require a separate emoticon system. Overall, this mixture of symbols and text is characterized by a colloquial nature and a lack of pure content. In feature engineering, removing symbols and retaining text makes it difficult to fully perceive the overall sentiment of the text.

[0004] Structural symbols, such as emoticons, are composed of specific characters arranged and combined to form emoticons. Their core purpose is to externalize emotions and expressions. For text that contains a mixture of emoticons and regular text, if only the text features are extracted, the model will ignore the influence of the emoticons on the text, which can easily lead to a deviation in the classification results from the author's sentiment. For example, "You are awesome" expresses positive emotion on its own, but when emoticons are added, such as "You are awesome (-_-|||)", the overall sentiment of the text is negative. Similarly, textual information can influence the expression of emoticons. For example, "(^v^)" represents a smile, which expresses positive emotion on its own. However, in specific contexts, such as in the sentence "Give up (^v^)", the smile can have a sarcastic connotation, giving the entire text a negative sentiment. Therefore, these symbolic expressions are influenced by context and background, and their overall semantics are complex and changeable. Summary of the Invention

[0005] The present invention aims to solve the problem that current sentiment classification models ignore the influence of emoticons on text, which easily leads to deviations between classification results and the author's emotions.

[0006] The multi-channel sentiment classification method based on short text and complex semantic symbols includes the following steps:

[0007] Extract the Emoticons from short texts, divide the Emoticons according to the human kinematics model and perform matching extraction of the Emoticons. Perform a unique ID coding mapping for each character in the Emoticon, and map the Emoticon to a vector of a fixed length; then use the fully connected features to obtain the vector representation of the Emoticon dictionary mapping. In the fully connected feature extraction network, first pass through an MLP network. The MLP network contains at least two fully connected layers. Denote the last two fully connected layers as the first fully connected layer and the second fully connected layer respectively; a Softmax layer is set after the second fully connected layer; according to the effect of the predicted label distribution, select the weight parameter W1 of the first fully connected layer as the feature vector to be scaled, and then use the emotion scaling coefficient of the current Emoticon to adjust W1 to obtain the Emoticon dictionary mapping vector V;

[0008] Use the position quantity information feature vector T composed of the index position of the first character of the Emoticon in the short text, the index position of the last character of the Emoticon in the short text, and the number of occurrences of the Emoticon in the short text to splice with the Emoticon dictionary mapping vector V to obtain the Emoticon feature vector;

[0009] Obtain the text vector corresponding to the text information in the short text, and fuse it with the Emoticon feature vector to obtain the fusion feature;

[0010] Use the self-attention mechanism to optimize the fusion feature vector, and then send it into the emotion classification model for emotion separation;

[0011] The described emotion classification model is a bidirectional simple recurrent neural network BiSRU composed of simple neural units SRU.

[0012] Further, after the first fully connected layer, it needs to pass through an activation function and then be sent into the second fully connected layer.

[0013] Further, the activation function passed through after the first fully connected layer is Relu.

[0014] Further, the emotion scaling coefficient of the current Emoticon is as follows:

[0015]

[0016] Among them, p represents the number of times the Emoticon appears in the samples with a positive emotion label, and n represents the number of times the Emoticon appears in the samples with a negative emotion label.

[0017] Further, the described Emoticon dictionary mapping vector V = W1 × α.

[0018] Further, the position quantity information feature vector T = [S, E, C];

[0019] Among them, S represents the index position of the first character of the cute emoticon in the short text, E represents the index position of the last character of the cute emoticon in the short text, and C represents the number of occurrences of the cute emoticon in the short text.

[0020] Furthermore, the text vector corresponding to the text information in the short text is obtained based on the BERT model.

[0021] Furthermore, the process of optimizing the fused feature vector using the self-attention mechanism includes the following steps:

[0022] First, use the self-attention mechanism to obtain a vector z representing the relationship between the i-th word and other words in the same text i , and then concatenate z i with the fused feature vector to obtain the text fusion feature integrating the self-attention mechanism.

[0023] A computer storage medium stores at least one instruction, and the at least one instruction is loaded and executed by a processor to implement the multi-channel sentiment classification method based on short text and complex semantic symbols.

[0024] A multi-channel sentiment classification device based on short text and complex semantic symbols, the device includes a processor and a memory, and the storage medium stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the multi-channel sentiment classification method based on short text and complex semantic symbols.

[0025] Beneficial effects:

[0026] The present invention proposes a method of separating symbolic text features and multi-channel processing, separately constructs a symbolic vector dictionary for structural symbolic information in the form of MLP and statistical scaling, uses the BERT pre-trained model to process ordinary text, and then uses the self-attention mechanism to perform feature fusion on the features output from different channels, enhances the feature representation ability of structural symbols and reduces the influence caused by feature sparsity and semantic non-standardization of short texts. The fused feature vector is input into a sentiment classification network constructed based on the bidirectional simple recurrent network BiSRU to output the text sentiment classification result. The present invention considers the influence of cute emoticons on the text and comprehensively considers the author's sentiment for classification, which can effectively solve the problem that the classification result deviates from the author's sentiment. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 is a schematic diagram of the overall network structure of the present invention.

[0028] Figure 2 is a schematic diagram of the network structure for extracting short text.

[0029] Figure 3It is a schematic diagram of the network structure for text sentiment classification.

[0030] Figure 4 It is a structural diagram of the Simple Recurrent Unit (SRU).

[0031] Figure 5 It is a graph showing the comparison results of training speeds when replacing the recurrent unit network of the classification model with different networks for comparison.

[0032] Figure 6 It is a graph for comparing different experimental trends. Specific implementation manners Specific implementation manner one:

[0034] This implementation manner is a multi-channel sentiment classification method based on short texts and complex semantic symbols. To enable the sentiment classification model of the present invention to distinguish structural symbols from ordinary texts and achieve sentiment classification of fused symbolic texts, the present invention first constructs a structural symbol sentiment dictionary, then performs feature separation processing and fusion on the texts in the dataset according to this dictionary, and then transmits the fused feature information into the BiSRU network to achieve text sentiment classification. The specific structure is as Figure 1 shown.

[0035] In the processing stage of text features, the basic idea is to train a sentiment dictionary based on the training set data, first perform character matching on the text data, then split the ordinary texts and structural symbol texts, transmit the split data to different channels for processing respectively, perform feature fusion and clustering guidance simultaneously, and use the self-attention mechanism to improve the effect of feature extraction on the fused features.

[0036] The multi-channel sentiment classification method based on short texts and complex semantic symbols described in this implementation manner includes the following steps:

[0037] S1. Extract the emoticon information features in the short text:

[0038] Taking emoticons as clues, the grammar of emoticons themselves has little connection with words. If emoticon vectors are trained based on context-based word embeddings, the results will have certain limitations. Therefore, the present invention uses a multi-layer training method to train emoticon vectors and construct an emoticon vector dictionary in the way of symbol mapping and retraining for scaling.

[0039] According to the human kinematics model, the emoticons are divided into nine parts and the matching extraction of emoticons is performed: {S1}{B1}{S2}{EL}{M}{ER}{S3}{B2}{S4};

[0040] This process and the content of the nine parts are prior art, such as "Multi-dimensional Sentiment Classification of Microblogs by Fusing Emoticons and Short Texts". The present invention will not elaborate further.

[0041] Perform a unique ID encoding mapping for each character in the kaomoji, thereby mapping the kaomoji to a vector with a fixed length of 9.

[0042] After mapping based on the symbol dictionary, the obtained symbol dictionary vector of the kaomoji is input into the neural network for training. To enable the kaomoji feature vector to perceive the connection between the feature itself and the sample, reduce ambiguity and semantic errors, the emotional factor of the current kaomoji is calculated to scale the vector, as Figure 2 shown.

[0043] After mapping the kaomoji to a 9-bit identification vector, use a fully connected feature extraction network to obtain the kaomoji dictionary mapping vector representation. In the fully connected feature extraction network, first pass through an MLP network. The MLP network contains two fully connected networks, denoted as the first layer and the second layer respectively; the calculation process of the fully connected feature extraction network is as follows:

[0044] A1 = Relu(W1D n + b1) (1)

[0045] d = Softmax(W2A1 + b2) (2)

[0046]

[0047] V = W1 × α (4)

[0048] Among them, A1 and A2 are the outputs of the first and second layers of the network, W1 and W2 are the weight parameters of the first and second layers of the network, b1 and b2 are the biases of the first and second layers of the network, and d is the distribution of the predicted labels.

[0049] According to the effect of the predicted label distribution, select W1 as the feature vector to be scaled; p represents the number of times the kaomoji appears in samples with a positive emotional label, n represents the number of times the kaomoji appears in samples with a negative emotional label; α represents the emotional scaling coefficient of the current kaomoji, and thus the kaomoji dictionary mapping vector V representing the kaomoji itself is obtained.

[0050] For the calculation of the emotional factor, for kaomoji that appear more frequently in positive samples, their emotional scaling factors will be mapped between 1 and 1.5. After the vector is multiplied by this scalar, the overall value of the vector will be amplified through the broadcast mechanism. Conversely, the emotional scaling factors of negative kaomoji will be mapped between 0.5 and 1, which has the effect of shrinking the vector value. In this way, the kaomoji vector is enhanced, and its ability to perceive the features of the entire text is improved.

[0051] The position and quantity of emoticons appearing in the text may also affect the representation of text sentiment. In some cases, when expressing reverse emotions such as unhappiness, the emoticon is placed in the first half, and vice versa, it is placed at the end of the text; the repeated appearance of emoticons in a text indicates emphasis and can make the originally expressed emotion more intense. The feature representation of the position and quantity of emoticons uses the method of index recording and counting, and combines the two into a vector to form a set of feature representations. Since there are cases in short texts where there are multiple emoticons and the emoticons are different, for this situation, the present invention adopts the method of selecting the main emoticon in the text, extracts the information of the main emoticon according to the chronological order of the text, and uses it as the main emoticon of the short text to represent the emoticon information of the entire text. The position and quantity information of emoticons is represented by a vector with a length of 3. The vector records the starting index and the number of occurrences of the emoticon, and then this vector is concatenated with the emoticon dictionary mapping vector to obtain the emoticon feature vector in the complete text. The calculation process is as follows:

[0052] T = [S, E, C] (5)

[0053]

[0054] Among them, S represents the index position of the first character of the emoticon in the short text, E represents the index position of the last character of the emoticon in the short text, C represents the number of occurrences of the emoticon in the short text, and these information together form the position and quantity information feature vector T of the emoticon. V represents the emoticon dictionary mapping vector, and V t represents the emoticon information feature representation of this text segment, that is, the emoticon feature vector; ⊕ represents the concatenation operation of vectors.

[0055] S2. Extract the text information in the short text and fuse it with the emoticon feature vector to obtain the fusion feature:

[0056] In terms of the feature extraction of literal text, the present invention uses the bidirectional representation encoder BERT pre-trained model to train the feature vector of the text. BERT is an open-source pre-trained model proposed by Google in 2018. It is a multi-layer bidirectional encoder and is also the Encoder part in the Transformer structure. BERT performs excellently in text feature extraction, so the present invention uses BERT as the basic encoder for the model's literal text vector. The present invention fine-tunes BERT, and the first [CLS] hidden state output is not directly mapped and output. After fusing the emoticon feature vector, it is input into the decoder for mapping and output. The concatenation algorithm formula of the emoticon and text fusion feature vector is as follows:

[0057]

[0058] Among them, M iDenote the fused feature vector generated from the i-th text segment as V i Denote the kawaii face feature vector of the i-th text segment as W i Denote the text vector representation of the i-th text segment trained by the BERT pre-trained model.

[0059] After concatenating the vectors, it is necessary to optimize the fused feature vector. Since the concatenated feature vector combines the feature vectors processed by different channels, in order to explore the correlation between different position information within the feature vector to improve the fusion effect of the feature vector, the present invention introduces the self-attention algorithm into the fused feature vector of the combination of kawaii faces and text.

[0060] The self-attention mechanism is a special case of the attention mechanism. Essentially, it performs a weighted average operation on the input parameters. Its calculation process is as follows:

[0061]

[0062]

[0063]

[0064] Among them, q i Denote the Query vector of the i-th word in the text; k j Denote the Key vector of the j-th word in the same text; d k Is the scaling factor, whose value is the dimension of k j ; s i,j Is the result after scaling the dot product of q i and k j ; Is the result after mapping s i,j through the Softmax function; v j Is the Value vector of the j-th word in the same text. Finally, and v j Are dot product operations and summed to obtain a vector z i expressing the relationship between the i-th word and the words in other positions of the same text, and then z i and the fused feature vector M i Are concatenated to obtain the text fusion feature integrating the self-attention mechanism.

[0065] S3. Use the sentiment classification model to perform sentiment separation:

[0066] The sentiment classification model inputs the obtained text fusion features into a network for training to obtain appropriate weights so that it can classify and output the results. The Recurrent Neural Network (RNN) structure has good processing effects on sequential data. In the field of deep learning, RNN is often used to process sequential data such as text and speech. However, RNN has problems of gradient disappearance and gradient explosion. Industry scholars usually adjust and improve RNN units, such as common LSTM and GRU, etc.

[0067] The present invention adopts the Simple Recurrent Unit (SRU) proposed by Tao Le, etc. The advantage of SRU compared with LSTM and GRU networks is that, on the premise of ensuring a certain accuracy rate, it realizes parallel computing and improves the training efficiency. The sentiment classification model inputs features into a recurrent neural network and then passes them into a fully connected network for training to train appropriate weights that can classify and output the results. The present invention constructs a classifier based on the Bidirectional Simple Recurrent Neural Network (BiSRU), which is mainly composed of simple neural units SRU. The features are processed by the bidirectional simple recurrent neural network and the fully connected network, and the output results of the model are passed into the Softmax function for mapping to obtain the classification results. The text sentiment classification network structure is as Figure 3 shown.

[0068] Among them, the structure diagram of the simple recurrent unit SRU is as Figure 4 shown.

[0069] The input sequence Xt (t = 1, 2, 3,..., t) first passes through the forget gate. When passing through the forget gate, the hidden state Ct is calculated, and then the hidden layer output ht is continuously calculated. The SRU calculation process is as follows:

[0070]

[0071] f t = tanh(W f X t + b f ) (12)

[0072] r t = tanh(W r X t + b r ) (13)

[0073]

[0074]

[0075] Among them, W, Wf, and Wr are parameter matrices, and bf and br are bias values in the network. Thus, cyclic training is carried out to obtain the output and the hidden layer outputs C t and ht 。

[0076] The bidirectional simple recurrent unit BiSRU is composed of two layers of SRUs stacked together. The two layers of SRUs calculate the sequence features from different directions to achieve the effect of penetrating the context semantics of the sequence text, and then input the hidden layer vectors spliced bidirectionally into the fully connected network for classification training to obtain the classification result. The calculation process is as follows:

[0077]

[0078] L = Softmax(W r H t + b r ) (17)

[0079] Among them, represents the forward output result of the BiSRU network, represents the reverse output result of the BiSRU network. The output results of the two directions of the time part are spliced to obtain the output vector H of the current time part t . L is the label distribution probability of the predicted output, and the maximum value among them is the predicted label of the current sample.

[0080] The experimental part of the present invention is developed based on the Pytorch framework. The development tool is Jupter notebook, the development language is Python, and the program is run using the CPU.

[0081] To verify the comprehensive processing ability of the model in classifying short texts, the experimental dataset is the Bilibili bullet screen dataset containing kaomoji, to verify the emotion classification effect of the model on kaomoji and text. Among them, the training set contains 8,600 positive emotion sentences and 8,300 negative sentences, and the test set has 4,111 pieces of corpus. Sample content examples are shown in Table 1.

[0082] Table 1 Sample example table

[0083]

[0084] In the sample example table 1, the sample with serial number 1 can reflect the effect of the model in classifying the emotion of the text without kaomoji symbols; the sample with serial number 2 can reflect the emotion classification effect of the model when the kaomoji is close to the middle of the text; the samples with serial numbers 3 and 4 reflect the emotion classification effect of the model when the kaomoji is at the front and back of the text.

[0085] Since the imbalance of samples may lead to a decline in the generalization performance of the model,

[0086] Therefore, the present invention will try to ensure the balance of samples with kaomoji in different positions and different emotion labels when training the classifier.

[0087] To verify the effectiveness of the classification model, the present invention uses Precision, Recall, and F1 as the evaluation criteria for the model. The calculation process is shown in Equations 18 - 20.

[0088]

[0089]

[0090]

[0091] Among them, TP represents the number of samples with positive sentiment and predicted as positive sentiment samples, FP represents the samples with negative sentiment and predicted as positive sentiment, and FN represents the number of samples with positive sentiment and predicted as negative sentiment.

[0092] In this test, the method of random sampling is adopted. 70% of the samples in the dataset are used as the training set, and 30% of the samples are used as the test set. The performance of the test set on different models is shown in Table 2. For other test models, the test results are shown in Table 2:

[0093] Table 2 Comparative Experiment Results Table

[0094]

[0095] For Model No. 1, the output result of the BERT pre - trained model is output to the Softmax function to directly obtain the classification result; for Model No. 2, after training the text word embedding vectors through Word2Vec, they are input into the BiLSTM network; for Model No. 3, after training the text vectors by BERT, they are input into the BiGRU network; for Model No. 4, BERT is used to train the text vectors and then input into the BiLSTM network; for Model No. 5, the method of word embedding is used to train the kaomoji vectors and construct the kaomoji vector dictionary; Model No. 6 is the model used in the present invention.

[0096] As can be seen from Table 2, the model of the present invention has better results in the dataset containing kaomoji. Compared with the models of No. 1, No. 2, No. 3, and No. 4, the precision is increased by 8.6%, 10.1%, 7.4%, 1.7%, and 0.3% respectively; the recall is increased by 11.5%, 9.6%, 0.2%, 1.7%, and 1.8% respectively; the F1 value is increased by 10.6%, 10.4%, 3.8%, 1.7%, and 1.1% respectively.

[0097] SRU itself can achieve parallelized operations, and there is a certain improvement in the training speed compared with LSTM and GRU. By replacing the recurrent unit network of the classification model with different networks for comparison, the comparison results of the training speed are as follows Figure 5 as shown.

[0098] After replacing the unit network of the model, it can be seen that in this experimental environment and the current dataset, when using SRU for training, the time consumed per round is overall less than that of LSTM and GRU.

[0099] Ablation experiments and analysis:

[0100] To verify the effectiveness of different modules of the model adopted in the present invention and the influence degree of different modules on the classification effect of the model, three groups of ablation experiments were designed under the same dataset, and the experimental grouping is as follows:

[0101] The first group of experiments: In the original model, without splitting the emoticon vector, the text information is directly input into the decoder for classification after feature training, and the classification result indicators are compared with the original model indicators.

[0102] The second group of experiments: The emoticon vector is not trained using the MLP layer, and only the emoticon vector after mapping the character dictionary participates in feature fusion.

[0103] The third group of experiments: The position and frequency information of the emoticon are not added to the emoticon feature vector, and only the corresponding emoticon feature vector in the trained emoticon dictionary and the text vector are used for fusion. The experimental results are shown in Table 3 below.

[0104] Table 3 Comparison table of ablation experiments

[0105] Experiment Description F1 The first group of experiments Without using the fusion vector of kaomoji 86.9% The second group of experiments Fusing kaomoji symbols only using dictionary mapping 87.1% The third group of experiments Removing the features of the position and appearance times of kaomoji 89.8% The model of the present invention The model used in the present invention 91.2%

[0106] It can be seen from the experimental results that: Compared with the original model, the first group of experiments may be interfered by symbols, resulting in a decline in the classification effect. The second group of experiments directly uses the form of symbol dictionary mapping, and the F1 value has a certain increase compared with the first group of experiments. The third group of experiments uses network training and trains the emoticon vector in the form of emotion scaling, and the classification effect also has a certain improvement. This experiment shows the effectiveness of different parts of the model. The comparison chart of different experimental trends is as follows Figure 6 as shown.

[0107] It can be seen from the experimental results that: The second group of experiments directly uses the form of symbol dictionary mapping, which has a small increase compared with the first group of experiments. The third group of experiments uses network training and trains the emoticon vector in the form of emotion scaling, but does not add position information, and the improvement amplitude of the classification effect compared with the second group of experiments is relatively large, indicating that training emoticons using a network is more effective than directly using symbol dictionary mapping. When the emoticon position information is added for feature extraction in the third group, it becomes the model of the present invention. Compared with the model of the present invention, the effect is not much different, and the improvement amplitude is small. Specific implementation method two:

[0109] This embodiment is a computer storage medium, in which at least one instruction is stored, and the at least one instruction is loaded and executed by a processor to implement the multi-channel sentiment classification method based on short text and complex semantic symbols.

[0110] It should be understood that any method corresponding to the present invention can be provided as a computer program product, software or computerized method, which may include a non-transitory machine-readable medium having instructions stored thereon, and the instructions can be used to program a computer system or other electronic devices. The storage medium may include, but is not limited to, magnetic storage media, optical storage media; magneto-optical storage media include: read-only memory ROM, random access memory RAM, erasable programmable memory (e.g., EPROM and EEPROM), and flash memory layers; or other types of media suitable for storing electronic instructions. Specific Embodiment Three:

[0112] This embodiment is a multi-channel sentiment classification device based on short text and complex semantic symbols. The device includes a processor and a memory. The device can be either a computer or a specially developed recognition device for sentiment classification. It should be understood that any device including a processor and a memory described in the present invention may further include other units and modules for display, interaction, processing, control, etc. through signals or instructions, as well as other functions.

[0113] At least one instruction is stored in the memory, and the at least one instruction is loaded and executed by the processor to implement the multi-channel sentiment classification method based on short text and complex semantic symbols.

[0114] The above calculation examples of the present invention are only for explaining in detail the calculation model and calculation process of the present invention, rather than limiting the embodiments of the present invention. For those of ordinary skill in the art, other different forms of changes or modifications can be made based on the above description. It is impossible to list all the embodiments here. Any obvious changes or modifications derived from the technical solutions of the present invention are still within the protection scope of the present invention.

Claims

1. A multi-channel sentiment classification method based on short texts and complex semantic symbols, characterized in that It includes the following steps: Extract the kaomoji in the short text, divide the kaomoji according to the human kinematics model and perform matching extraction of the kaomoji, perform unique ID coding mapping on each character in the kaomoji, and map the kaomoji into a vector of fixed length; then use the fully connected features to obtain the vector representation of the kaomoji dictionary mapping. In the fully connected feature extraction network, first pass through an MLP network. The MLP network contains at least two fully connected layers, and the last two fully connected layers are respectively denoted as the first fully connected layer and the second fully connected layer; a Softmax layer is set after the second fully connected layer; according to the effect of the predicted label distribution, select the weight parameter W1 of the first fully connected layer as the feature vector to be scaled, and then use the emotion scaling coefficient of the current kaomoji to adjust W1 to obtain the kaomoji dictionary mapping vector V; Concatenate the position quantity information feature vector T composed of the index position of the first character of the kaomoji in the short text, the index position of the last character of the kaomoji in the short text, and the number of occurrences of the kaomoji in the short text with the kaomoji dictionary mapping vector V to obtain the kaomoji feature vector; Obtain the text vector corresponding to the text information in the short text, and fuse it with the kaomoji feature vector to obtain the fusion feature; Use the self-attention mechanism to optimize the fusion feature vector, and then send it into the emotion classification model for emotion separation; The emotion classification model is a bidirectional simple recurrent neural network BiSRU composed of simple neural units SRU.

2. The multi-channel sentiment classification method based on short texts and complex semantic symbols according to claim 1, wherein After the first fully connected layer, it needs to pass through an activation function and then be sent into the second fully connected layer.

3. The multi-channel sentiment classification method based on short texts and complex semantic symbols according to claim 2, wherein The activation function passed through after the first fully connected layer is Relu.

4. The multi-channel sentiment classification method based on short texts and complex semantic symbols according to claim 1, 2 or 3, characterized in that The emotion scaling coefficient of the current kaomoji is as follows: Where p represents the number of times the kaomoji appears in the samples with a positive emotion label, and n represents the number of times the kaomoji appears in the samples with a negative emotion label.

5. The multi-channel sentiment classification method based on short texts and complex semantic symbols according to claim 4, characterized in that The kaomoji dictionary mapping vector V = W1 × α.

6. The multi-channel sentiment classification method based on short text and complex semantic symbols according to claim 5, wherein The position quantity information feature vector T = [S, E, C]; Where S represents the index position of the first character of the kaomoji in the short text, E represents the index position of the last character of the kaomoji in the short text, and C represents the number of occurrences of the kaomoji in the short text.

7. The multi-channel sentiment classification method based on short texts and complex semantic symbols according to claim 6, characterized in that The text vector corresponding to the text information in the short text is obtained based on the BERT model.

8. The multi-channel sentiment classification method based on short texts and complex semantic symbols according to claim 7, wherein The process of using the self-attention mechanism to optimize the fusion feature vector includes the following steps: First, use the self-attention mechanism to obtain a vector z that represents the relationship between the i-th word and the words at other positions in the same text. i , and then concatenate z i with the fused feature vector to obtain the text fusion feature that integrates the self-attention mechanism.

9. A computer storage medium, characterized in that, At least one instruction is stored in the storage medium, and the at least one instruction is loaded and executed by the processor to implement the multi-channel emotion classification method based on short text and complex semantic symbols as described in any one of claims 1 to 8.

10. A multi-channel sentiment classification device based on short texts and complex semantic symbols, characterized in that, The device includes a processor and a memory. At least one instruction is stored in the storage medium, and the at least one instruction is loaded and executed by the processor to implement the multi-channel emotion classification method based on short text and complex semantic symbols as described in any one of claims 1 to 8.