A Multi-Interaction Microblog Sentiment Analysis Method Based on User Representative Relationships
By building a Weibo relationship matrix and graph attention network based on user representative relationships, the problem of introducing irrelevant Weibo in Weibo sentiment analysis is solved, and the emotional recognition rate is improved, which is suitable for multi-interaction Weibo sentiment analysis.
Patent Information
- Application Number
- CN202211603017.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-13
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2042-12-13
Smart Images

Figure CN116244430B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of natural language processing, and relates to a multi-interaction microblog sentiment analysis method based on user representative relationships. Background Art
[0002] In recent years, the rise of social platforms such as Meta, Twitter, and Sina Weibo has made them the main places for people to post microblogs. People carry out various interactive activities on social platforms, generating a large number of microblogs and user interaction data. These data often carry rich emotional information, and the utilization of this emotional information will bring us great value. For example, providing supportive information for stockholders, providing decision-making basis for the government, or providing help for people's product selection, etc.
[0003] Microblog sentiment analysis aims to complete the judgment of the sentiment type of the microblogs posted by users by extracting some useful features of the microblogs. After traditional methods extract features from microblog texts, they input them into a classification model to complete the classification of microblog sentiment. However, due to the short length of microblog texts posted by users on social platforms, the random use of special symbols and Internet terms, etc., microblogs themselves have a lot of noise, which exacerbates the problem of vocabulary sparsity. Therefore, the performance of traditional methods is limited by microblogs themselves. Therefore, researchers have begun to describe the social interaction behaviors of users on social platforms (such as following, liking, mentioning, etc.) as social relationships between users, and provide effective extended information for microblog texts through social relationships to improve the sentiment recognition rate of semantically ambiguous microblogs. Currently, the method is mainly to encode the social relationships of users into the microblog sentiment classification model. It mainly has two steps. The first step is the establishment of the microblog relationship matrix, and the second step is the selection of the microblog sentiment classification model.
[0004] The microblog relationship matrix has evolved from initially considering the emotional consistency of users and the theory of emotional contagion to currently incorporating user similarity and microblog text similarity. The microblog sentiment classification model has evolved from the least squares method at the beginning to the current deep learning models. Since multiple relationship users are currently used to construct the microblog relationship matrix, a large number of irrelevant and destructive microblogs will be introduced, resulting in the probability of emotional consistency not being effectively improved. In addition, the emotional interaction between microblogs can be described as a graph model, while traditional multi-layer perceptrons, convolutional neural networks, recurrent neural networks, etc. cannot handle graph data well. The existing technology for dealing with microblog sentiment analysis combined with social relationships is not sufficient. Summary of the Invention
[0005] In view of this, the purpose of the present invention is to provide a multi-interaction microblog sentiment analysis method based on user representative relationships.
[0006] To achieve the above purpose, the present invention provides the following technical solutions:
[0007] A multi-interaction microblog sentiment analysis method based on user representative relationships, the method comprising the following steps:
[0008] Step 1: Preprocess the Weibo text and user social behavior data, that is, represent them in a tensor format that can be processed by computers.
[0009] Furthermore, the specific process of step 1 includes:
[0010] First, we preprocess the Weibo text. By removing special symbols, segmenting, removing stop words, and training and loading Word2Vec vectors, we convert the Weibo text into a Weibo sentence tensor format that can be processed by computers. Finally, all the Weibo text is represented as:
[0011]
[0012] Among them, the number of microblogs is k, the length of microblogs is l, and the dimension of word vector is d s .
[0013] Finally, we preprocess the user social behavior data. We define the social behavior between users as a graph G = (V, E, W), where V represents user nodes, E represents edges between users, and W represents the weight of the relationship between users. We use LINE to embed the user relationship network into a low-dimensional feature vector. This embedding process is achieved by minimizing O.
[0014]
[0015] Among them, w i,j represents the weight of the social relationship between users i and j, (i, j) means there is an edge between users i and j, represents the low-dimensional embedding vector of user i, Indicates when is regarded as a context vector. Finally, all users are represented as:
[0016]
[0017] Among them, the number of users is m and the user embedding dimension is d p .
[0018] Step 2: Build a neural network model to extract high-order features of Weibo.
[0019] Furthermore, the specific process of step 2 includes:
[0020] First, for a microblog s∈S, the inter-word relationship features of the microblog are obtained through a convolutional neural network (CNN). The output y of the convolutional layer is:
[0021] y={y1 , y 2 ,..., y L}
[0022]
[0023] where y i represents the output of the i-th convolutional kernel, W l and b l represent the weight matrix and bias of the l-th convolutional kernel respectively, represents the convolution operation; represents the output of the l-th convolutional kernel in a window containing h words. Then, the important part p in the text is found through the max-pooling layer and all features are concatenated in the last dimension.
[0024] p = max(y)
[0025] Then, the text context features are extracted through the bidirectional long short-term memory network (Bi-LSTM) and the bidirectional gated recurrent unit (Bi-GRU).
[0026] h l = BiLSTM(P)
[0027] h g = BiGRU(h l )
[0028] where h l and h g are the outputs of Bi-LSTM and Bi-GRU respectively.
[0029] Then, since the contributions of all features to sentiment are different. Therefore, the attention mechanism is used to assign different weights to the features. The output of the attention mechanism layer is:
[0030]
[0031] O i = Attention(W i Q h g , W i K h g , W i V h g )
[0032]
[0033] where, O i is the output of the i-th multi-head attention mechanism, W lis the weight matrix of the linear layer, where Q, K, and V represent the query vector, key vector, and value vector respectively, and W i Q , W i K , W i V correspond to the weights of Q, K, and V respectively, and d k is the dimension of K.
[0034] Secondly, the sentiment classifier flattens all features through a Flatten layer and obtains the distribution probability of each sentiment category through a fully connected layer, a feature normalization layer (BatchNormalization), and a softmax layer in sequence:
[0035]
[0036] where W a and b a represent the weight matrix and bias vector of the fully connected layer.
[0037] Finally, after model training, the output of the Flatten layer is finally extracted as the high-order feature of each Weibo text.
[0038] Z = {z1, z2,..., z i ,... z k}
[0039] Step 3: Construct a Weibo relationship matrix to make the sentiment between related Weibos as consistent as possible.
[0040] Furthermore, the specific process of Step 3 includes:
[0041] First, construct a Weibo relationship matrix according to the sentiment consistency and the theory of emotional contagion sociology:
[0042] A = UU + UFU
[0043]
[0044] where UU and UFU represent the sentiment consistency matrix and the emotional contagion matrix respectively, and U = {u i,j} k×m indicates that user j has posted Weibo i.
[0045] Finally, consider the similarity between Weibos into the Weibo relationship matrix A:
[0046] A = f(UU + UFU)
[0047] <u
[0048] where cosw (s i ,s j ) and cos t (s i ,s j ) respectively represent the Word2Vec cosine similarity and the Tf-idf (Term frequency–inverse document frequency) cosine similarity between Weibo s i and Weibo s j .
[0049] Step 4: Construct a GAT network to classify the sentiment of Weibo.
[0050] Furthermore, the specific process of the said Step 4 includes:
[0051] First, represent the Weibo relationship matrix constructed in Step 3 as the adjacency matrix between Weibos, use the high-order features of Weibos extracted in Step 2 as the node features of Weibos, and use the Graph Attention Network (GAT) to simulate the sentiment interaction between related Weibos and generate new Weibo node representations
[0052]
[0053]
[0054] where W are the parameters to be trained, represents the neighbor nodes of the i-th Weibo node in the Weibo relationship matrix A, and W k is the training matrix of the k-th attention mechanism.
[0055] Then, complete the sentiment classification of Weibo through a fully connected layer, and the predicted label of the t-th Weibo is:
[0056]
[0057] where, W p and b p represent the weights and biases of the fully connected layer.
[0058] Finally, after obtaining the probability distribution of each sentiment label through the softmax function, use the cross-entropy function as the loss function, and train the model through backpropagation. The loss function used is:
[0059]
[0060] where, C represents the training set, y i (t) and respectively represent the true label and the probability distribution of the predicted label of the Weibo.
[0061] The beneficial effects of the present invention are as follows:
[0062] a. Aiming at the deficiency that a lot of invalid microblogs are introduced when constructing a microblog relationship matrix in the existing microblog sentiment analysis method combining social relationships due to considering multiple similar users, a method of using representative user relationships to establish a microblog relationship matrix is proposed, which can avoid the introduction of invalid microblogs to a certain extent.
[0063] b. Aiming at the fact that traditional neural networks cannot handle graph data well, the Graph Attention Network (GAT) is introduced into microblog sentiment analysis to simulate the emotional feature interaction process between microblogs, provide richer emotional features for target microblogs, and improve the emotional recognition rate of semantically ambiguous microblogs.
[0064] c. A neural network model is proposed to extract features from microblogs. The extracted features consider word - to - word, context, and attention weight weighting, which is a high - order representation of the microblog representation form.
[0065] d. The method proposed in this paper has strong applicability. Specifically: in terms of feature extraction, it can be applied to the feature extraction of any existing long - text sentiment analysis model; in terms of the selection of graph models, it is also applicable to graph convolutional networks.
[0066] Other advantages, objectives, and features of the present invention will be described to some extent in the subsequent specification, and to some extent, will be obvious to those skilled in the art based on the study of the following text, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the following specification. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] In order to make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be described in detail with reference to the accompanying drawings, where:
[0068] Figure 1 is a flowchart of a multi - interaction microblog sentiment analysis method based on user representative relationships of the present invention;
[0069] Figure 2 is the structural diagram of the neural network proposed for microblog feature extraction. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0070] The following specific examples illustrate the implementation manners of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific implementation manners. Various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the drawings provided in the following embodiments only schematically illustrate the basic concept of the present invention. Without conflict, the following embodiments and the features in the embodiments can be combined with each other.
[0071] Among them, the drawings are only for illustrative purposes, showing only schematic diagrams rather than physical diagrams, and should not be construed as limiting the present invention; in order to better illustrate the embodiments of the present invention, some components in the drawings will be omitted, enlarged or reduced, which do not represent the dimensions of the actual products; for those skilled in the art, it is understandable that some well-known structures and their descriptions in the drawings may be omitted.
[0072] In the drawings of the embodiments of the present invention, the same or similar reference numerals correspond to the same or similar components; in the description of the present invention, it should be understood that if there are terms such as "upper", "lower", "left", "right", "front", "rear", etc. indicating the orientation or positional relationship, they are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, the terms describing the positional relationship in the drawings are only for illustrative purposes and should not be construed as limiting the present invention. For those of ordinary skill in the art, the specific meanings of the above terms can be understood according to specific circumstances.
[0073] The present invention proposes a multi-interaction microblog sentiment analysis method based on user representative relationships. Next, the implementation steps of the present invention will be described. The implementation scenario is that for a data set containing microblog texts and corresponding sentiment and social information, the method mentioned above is used to train a network model for sentiment analysis, so that the model can complete the sentiment classification of microblog texts. The specific implementation steps are as follows:
[0074] Step 1: Preprocess the microblog texts and the social behavior data of users, that is, use vectors to represent the microblog texts and the social behaviors of users.
[0075] First, it is the preprocessing of Weibo text data. For example, for the Weibo text "The weather is really nice today. I saw a chubby orange cat. So happy! @Fighter #BigOrangeIsDecided", after removing special symbols, the Weibo text becomes "The weather is really nice today. I saw a chubby orange cat. So happy!". After using the jieba word segmentation tool, the Weibo text remains "The weather is really nice today. I saw a chubby orange cat. So happy!". After removing stop words, the Weibo text becomes "The weather is really nice today saw a chubby orange cat so happy!". Using Word2Vec, all Weibo texts are represented in vector format, and all Weibo texts are represented as follows:
[0076]
[0077] Finally, it is the preprocessing of user social behavior data. Use the follow relationships between users to establish a user relationship network G=(V, E, W). Adopt LINE to embed the user relationship network into low-dimensional feature vectors and obtain the vector representation of each Weibo. Specifically, optimize the following function to obtain the vector representation of each Weibo node:
[0078]
[0079] Step 2: Construct a Weibo high-order feature extraction network to obtain the feature representation of Weibo text, and construct a Weibo relationship network based on representative user relationships based on the user node vectors in Step 1.
[0080] Weibo high-order feature extraction network. First, use CNN to obtain word relationship features. For a Weibo s∈S, obtain the word relationship features of the Weibo through parallel CNN. The output p of the convolutional layer is:
[0081] y={y 1 ,y 2 ,...,y L}
[0082]
[0083] p = max(y)
[0084] Next, use Bi-LSTM and Bi-GRU to obtain the context features of the Weibo text:
[0085] h l = BiLSTM(P)
[0086] h g = BiGRU(h l )
[0087] Then, use the attention mechanism to weight important features:
[0088]
[0089] O i = Attention(W i Q h g ,W i K h g ,W i V h g )
[0090]
[0091] Finally, after training with Weibo texts and their corresponding emotions, the features of the Flatten layer are the high-order features of Weibo texts. The high-order features of each Weibo text can be obtained:
[0092]
[0093] Construction of the Weibo relationship network. First, construct the Weibo relationship matrix according to the theory of emotional consistency and emotional contagion sociology:
[0094] A = UU + UFU
[0095]
[0096] Next, consider the similarity between Weibos in the Weibo relationship matrix A:
[0097] A = f(UU + UFU)
[0098]
[0099] Finally, the obtained Weibo relationship matrix A is the Weibo relationship network. The rows and columns in the matrix represent a user respectively, and the corresponding numbers in the rows and columns are the relationship weights between users.
[0100] Step 3: Construct a GAT network to classify the emotions of Weibos.
[0101] First, based on Step 2, use the Weibo relationship matrix as the adjacency matrix between Weibos and the high-order features of Weibos as the node features of Weibos to construct a Graph Attention Network (GAT) to simulate the emotional interaction between related Weibos and generate new Weibo node representations
[0102]
[0103]
[0104] Next, obtain the emotional representation of Weibos through the fully connected layer. Here It is the one-hot encoding of Weibo sentiment. For example, when there are 3 classifications, all sentiments are respectively represented as: [[1,0,0],[0,1,0],[0,0,1]]. The predicted label of the Weibo is:
[0105]
[0106] Finally, by comparing the predicted and true sentiment labels according to the one-hot encoding to obtain the error of model training and then adjust the model. After obtaining the probability distribution of each sentiment label through the softmax function, the cross-entropy function is used as the loss function, and the model is trained through backpropagation. The loss function used is:
[0107]
[0108] After the above steps are completed, a model that can be used for Weibo sentiment classification will finally be obtained. After saving the model, it can be used. Given a Weibo text, input it into the model to obtain the sentiment tendency of the model.
[0109] As Figure 1 shown, the present invention proposes a multi-interaction Weibo sentiment analysis method based on user representative relationships. The following will describe the mentioned solution in detail:
[0110] )]](1) Preprocess the Weibo text and the user's social behavior data.
[0111] (1.1) Preprocessing of Weibo text data. First, in order to improve the accuracy of word segmentation, remove special symbols such as urls, mentions @, and topics # in the Weibo text through Python regular expressions; then use the jieba word segmentation tool to complete the word segmentation of the data and remove some stop words unrelated to sentiment from the word segmentation results; finally, use Word2Vec to train all words into corresponding vector formats and combine them into corresponding Weibo sentence tensors. Finally, all Weibos are represented as:
[0112]
[0113] Among them, the number of Weibos is k, the length of the Weibo is l, and the dimension of the word vector is d s .
[0114] (1.2) Preprocessing of user social behavior data. Define the social behavior between users as a graph G=(V, E, W), where V is the user node, E is the edge between users, and W is the relationship weight between users. Use LINE (Large-scale information network embedding) to embed the user relationship network into a low-dimensional feature vector. The embedding process is realized by minimizing O:
[0115]
[0116] Among them, w i,j represents the social relationship weight between users i and j, and (i, j) indicates that there is an edge between users i and j. represents the low-dimensional embedding vector of user i. represents when is regarded as the vector of the context. Finally, all users are represented as:
[0117]
[0118] Among them, the number of users is m, and the user embedding dimension is d p .
[0119] (2) Construct a neural network for extracting high-order features of microblogs, see Figure 2 .
[0120] (2.1) For a microblog s ∈ S, first obtain the inter-word relationship features of the microblog through a convolutional neural network (CNN). The output y of the convolutional layer is:
[0121] y = {y 1 , y 2 ,..., y L}
[0122]
[0123] Among them, y i represents the output of the i-th convolutional kernel, and W l and b l represent the weight matrix and bias of the l-th convolutional kernel respectively. represents the convolutional operation; represents the output of the l-th convolutional kernel in a window containing h words. Then, find the important part p in the text through the max pooling layer and concatenate all the features in the last dimension.
[0124] p = max(y)
[0125] (2.2) Then extract the text context features through a bidirectional long short-term memory network (Bi-LSTM) and a bidirectional gated recurrent unit (Bi-GRU).
[0126] h l = BiLSTM(P)
[0127] h g = BiGRU(h l )
[0128] Among them, h l and hg They are the outputs of Bi-LSTM and Bi-GRU respectively.
[0129] (2.3) Since the contributions of all features to sentiment are different, the attention mechanism is used to assign different weights to the features. The output of the attention mechanism layer is:
[0130]
[0131] O i = Attention(W i Q h g , W i K h g , W i V h g )
[0132]
[0133] where O i is the output of the i-th multi-head attention mechanism, W l is the weight matrix of the linear layer, Q, K, and V represent the query vector, key vector, and value vector respectively, and W i Q , W i K , W i V correspond to the weights of Q, K, and V respectively, and d k is the dimension of K.
[0134] (2.4) The sentiment classifier flattens all features through a Flatten layer and then passes through a fully connected layer, a feature normalization layer (BatchNormalization), and a softmax function to obtain the distribution probability of each sentiment category:
[0135]
[0136] where W a and b a represent the weight matrix and bias vector of the fully connected layer.
[0137] (2.5) Extract the output of the Flatten layer as the high-order feature of each microblog text:
[0138]
[0139] (3) Construct a microblog relationship matrix.
[0140] (3.1)Construct the Weibo relationship matrix according to the theories of emotional consistency and emotional contagion sociology:
[0141] A = UU + UFU
[0142]
[0143] where UU and UFU represent the emotional consistency matrix and the emotional contagion matrix respectively, and U = {u i,j} k×m indicates that user j has posted Weibo i.
[0144] (3.2)Take the similarity between Weibos into account in the Weibo relationship matrix A:
[0145] A = f(UU + UFU)
[0146]
[0147] where cos w (s i , s j ) and cos t (s i , s j ) represent the Word2Vec cosine similarity and the Tf-idf (Term frequency–inverse document frequency) cosine similarity between Weibo s i and Weibo s j respectively.
[0148] (4)Construct a GAT network to classify the sentiment of Weibos.
[0149] (4.1)Represent the Weibo relationship matrix constructed in step (3) as the adjacency matrix between Weibos, take the high-order features of Weibos extracted in step (2) as the node features of Weibos, and use the Graph Attention Network (GAT) to simulate the emotional interaction between related Weibos and generate new Weibo node representations
[0150]
[0151]
[0152] where W are the parameters to be trained, represents the neighbor nodes of the i-th Weibo node in the Weibo relationship matrix A, and W k is the training matrix of the k-th attention mechanism.
[0153] (4.2)Finally, complete the sentiment classification of Weibos through a fully connected layer, and the predicted label of the t-th Weibo is:
[0154]
[0155] Among them, W p and b p represent the weights and biases of the fully connected layer.
[0156] (4.3) After obtaining the probability distribution of each sentiment label through the softmax function, the cross-entropy function is used as the loss function, and the model is trained through backpropagation. The loss function used is:
[0157]
[0158] Among them, C represents the training set, y i (t) and respectively represent the true label of the microblog and the probability distribution of the predicted label.
[0159] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the present technical solution, and they should all be covered within the scope of the claims of the present invention.
Claims
1. A multi-interaction microblog sentiment analysis method based on user representative relationships, characterized in that: The method includes the following steps: Step 1: Preprocess the Weibo text and user social behavior data and convert them into a tensor format that can be processed by a computer. The specific process includes: First, preprocess the Weibo text. By removing special symbols, tokenizing, removing stop words, training and loading Word2Vec vectors for the Weibo, convert the Weibo into a Weibo sentence tensor format that can be processed by a computer. Finally, all Weibos are represented as: Among them, the number of microblogs is k, the length of the microblogs is l, and the dimension of the word vectors is d s ; Finally, preprocess the user social behavior data. Define the social behavior between users as a graph G=(V, E, W), where V is the user node, E is the edge between users, and W is the relationship weight between users. Use LINE to embed the user relationship network into a low-dimensional feature vector. The embedding process is achieved by minimizing O; where, w i,j represents the social relationship weight between users i and j, and (i, j) indicates that there is an edge between users i and j, represents the low-dimensional embedding vector of user i, represents when is regarded as the vector of the context; finally, all users are represented as: Among them, the number of users is m, and the user embedding dimension is d p ; Step 2: Construct a neural network model to extract high-order features of Weibo. The specific process includes: First, for a Weibo s∈S, first obtain the inter-word relationship features of the Weibo through a convolutional neural network CNN. The output y of the convolutional layer is: y = {y 1 , y 2 ,..., y L} where y i represents the output of the i-th convolutional kernel, W l and b l represent the weight matrix and bias of the l-th convolutional kernel respectively, represents the convolution operation; represents the output value of the l-th convolutional kernel in the window starting at position n, which contains h words; then, the max pooling layer is used to find the important part p in the text and concatenate all features in the last dimension; p = max(y) Next, extract the text context features through a bidirectional long short-term memory network Bi-LSTM and a bidirectional gated recurrent unit Bi-GRU; h l = BiLSTM(p) h g = BiGRU(h l ) where h l and h g are the outputs of Bi-LSTM and Bi-GRU respectively; Then, since the contribution degrees of all features to sentiment are different; the attention mechanism is used to assign different weights to the features; the output of the attention mechanism layer is as follows: O i = Attention(W i Q h g ,W i K h g ,W i V h g ) Among them, O i is the output of the i-th multi-head attention mechanism, W l is the weight matrix of the linear layer, Q, K, and V represent the query vector, key vector, and value vector respectively, and W i Q 、W i K 、W i V correspond to the weights of Q, K, and V respectively, and d k is the dimension of K; Secondly, the sentiment classifier flattens all features through a Flatten layer and obtains the distribution probability of each sentiment category through a fully connected layer, a feature normalization layer BatchNormalization, and a softmax layer in sequence: Among them, W a and b a represent the weight matrix and bias vector of the fully connected layer; Finally, after model training, finally extract the output of the Flatten layer as the high-order feature of each Weibo text; Z = {z1, z2,..., z i ,...z k} Step 3: Construct a Weibo relationship matrix to make the sentiments between related Weibos consistent; Step 4: Input the high-order features of the Weibo constructed in Step 2 and the Weibo relationship matrix constructed in Step 3 into a graph attention network for sentiment interaction and sentiment classification of the Weibo. The specific process includes: First, construct a Weibo relationship matrix according to the sentiment consistency and the theory of emotional contagion sociology: A = UU + UFU Among them, UU and UFU represent the emotional consistency matrix and the emotional contagion matrix respectively, and U = {u i,j} k×m indicates that user j has posted Weibo i; Finally, take the similarity between Weibos into account in the Weibo relationship matrix A: A = f(UU + UFU) where cos w (s i , s j ) and cos t (s i , s j ) represent the Word2Vec cosine similarity and the Tf-idf cosine similarity between microblog s i and microblog s j respectively.
2. The multi-interaction microblog sentiment analysis method based on user representative relationship according to claim 1, characterized in that: The specific process of Step 4 includes: First, represent the Weibo relationship matrix constructed in step 3 as an adjacency matrix between Weibos. Use the high-order Weibo features extracted in step 2 as node features of Weibos. Then, utilize the Graph Attention Network (GAT) to simulate the emotional interaction between related Weibos and generate new Weibo node representations. Among them W are the parameters to be trained, represents the neighbor nodes of the i-th microblog node in the microblog relationship matrix A, and W k is the training matrix of the k-th attention mechanism; Next, complete the sentiment classification of the Weibo through a fully connected layer to obtain the predicted label of the t-th Weibo as: Among them, W p and b p represent the weights and biases of the fully connected layer; Finally, after obtaining the probability distribution of each sentiment label through the softmax function, use the cross-entropy function as the loss function and train the model through backpropagation. The loss function used is: Among them, C represents the training set, and y i (t) and represent the probability distributions of the true label and the predicted label of the microblog, respectively.