Early guidance topic detection method based on sentiment accumulation and dynamic graph representation
By establishing a user relationship weight matrix and sentiment accumulation model in social networks, and combining it with the TGAT network, the problems of data sparsity and user sentiment accumulation in early topic detection were solved, achieving high efficiency and accuracy in topic detection.
Patent Information
- Application Number
- CN202411474779.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-22
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2044-10-22
AI Technical Summary
In social networks, early-stage guided topic detection faces challenges such as data sparsity, accumulation of user sentiment, and inaccurate representation of user nodes, which affect the accurate capture and detection efficiency of topic features.
By acquiring topic data and establishing a user relationship weight matrix, combined with a sentiment accumulation model and dynamic graph representation, the TGAT network is used for user vector updates and topic detection.
It significantly improves the efficiency and accuracy of topic detection, solves the problems of early data sparsity and user sentiment accumulation, provides an effective representation of user nodes, and supports accurate topic analysis.
Smart Images

Figure CN119357745B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the field of social network analysis, and specifically relates to an early guidance type topic detection method based on sentiment accumulation and dynamic graph representation. BACKGROUND
[0002] In today's information explosion era, social networks have become the main platform for information dissemination, and the rapid spread of topics can influence public opinion and social dynamics in a short time. Analysis of topic data not only helps us understand the mechanism of information dissemination, but also can effectively monitor and guide public opinion. However, due to the openness and dynamics of social networks, topic data presents a high degree of complexity and dynamic change, which poses higher requirements for data collection, processing and analysis.
[0003] In recent years, many scholars have made significant achievements in the field of social network research. In early research, scholars analyzed user text features and topic propagation features in the propagation process of guidance type topics to detect them. Effectively identifying and containing malicious guidance type topics in the early stage is of great significance to the purification of the network environment, social stability and national security. However, topics usually face the problem of data sparsity in the initial stage, while users' behavior is influenced by their previous participation in the topic, and the effective representation of users is also a big problem. Therefore, conducting research on data compensation, sentiment accumulation and dynamic representation of guidance type topics can more effectively achieve the detection of such topics.
[0004] With the continuous growth of social media data and the progress of deep learning technology, nonlinear models such as neural networks and deep learning have become the preferred method for processing complex network data. Recently, Wei et al. (Wei S, Wu B, Xiang A, et al. DGTR: Dynamic graph transformer for rumor detection [J]. Frontiers in Research Metrics and Analytics, 2023, 7: 1055348.) developed a dynamic graph model based on Transformer, specifically for rumor detection. This study confirmed the practicality of using time attributes and propagation structures for topic detection by effectively capturing long-term dependencies in structure and time series. Inspired by this research and the sentiment accumulation effect, this study designs an early identification method for guidance type topics that combines sentiment accumulation and dynamic graph technology. This method quantitatively analyzes the influence of sentiment accumulation and uses TGAT network to track changes in user features in the development process of topics in real time, to improve the detection efficiency of guidance type topics.
[0005] Based on the above, the technical problems of the prior art are:
[0006] Problem 1: The sparsity of the early data of the guided topic outbreak. Due to less user participation and sparse comment quantity, the early topic data is insufficient, which affects the accurate capture of the topic features by the model;
[0007] Problem 2: The emotion accumulation problem of users in the guided topic. The sentiment tendency of the topic participating user is the core of solving the guided topic detection problem, and the user's emotion on the previous topic will affect the current topic before the target topic outbreak. We propose an emotion accumulation model to quantify this influence;
[0008] Problem 3: Effective embedding of user nodes in guided topics. Due to the continuous accumulation, increase and change of user quantity, user relationship and user comments in the topic evolution process, it is inaccurate to perform node embedding of users at a certain moment.
[0009] In summary, during the early period of topic outbreak, the number of users in the network is small, and it is very important to detect and suppress malicious guided topics. How to effectively compensate for early topic data and detect guided topics has become a problem to be solved. SUMMARY
[0010] In view of the problems of the prior art in the background art, the present application provides an early guided topic detection method based on emotion accumulation and dynamic graph representation, which specifically comprises the following steps:
[0011] Obtain the topic data generated before and after the topic outbreak, including the basic information of the user publishing comments in the topic, the comment information and the friend relationship;
[0012] According to the theme distribution similarity of the current topic comments and the interaction relationship between users, a relationship weight matrix between users is established;
[0013] Obtain the emotion accumulation representation of the user, convert the basic information of the user into a vector representation, and splice the emotion accumulation representation of the user with the vector representation together as the final vector representation of the user;
[0014] Input the final vector representation of each user under the topic and the relationship weight matrix between users into the time coding based graph attention network, and judge whether the current topic belongs to the guided topic.
[0015] The present application has at least the following advantages:
[0016] 1、The present application finds other topics similar in semantics with the target topic by extracting the theme distribution of the topic and according to the theme similarity of the topic, and the information of these similar topics is used for data compensation, which significantly improves the efficiency and accuracy of topic detection.
[0017] 2. In view of the impact of the user's emotional accumulation in other previous topics on this topic, the present invention proposes an emotional accumulation influence model to construct user emotional influence and integrate it into subsequent user characteristics. This innovative method solves the problem of user emotional accumulation.
[0018] 3. During the process of topic propagation, entities such as users, messages, and networks are constantly changing, which poses a challenge to the effective representation of user node vectors in topics. In order to effectively address this challenge, the present invention proposes a TGAT dynamic graph representation method, which fully considers the impact of changes in topic content on user embedding, greatly enriches user feature expression, and provides strong support for topic detection and analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 This is a flow chart of the early-stage guided topic detection method based on emotion accumulation and dynamic graph representation of the present invention;
[0020] Figure 2 A schematic diagram of data compensation according to an embodiment of the present invention;
[0021] Figure 3 This is a schematic diagram of a cumulative emotional influence model according to an embodiment of the present invention;
[0022] Figure 4 A schematic diagram for constructing the user explicit and implicit relationship matrix in the present invention;
[0023] Figure 5 Schematic diagram of the TGAT dynamic graph representation learning method in the present invention. DETAILED DESCRIPTION
[0024] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0025] The present invention proposes an early guidance topic detection method based on emotion accumulation and dynamic graph representation, which specifically includes the following steps:
[0026] Obtain topic data generated before and after the topic outbreak, including basic information, comment information, and friend relationships of users who commented in the topic;
[0027] Establish a relationship weight matrix between users based on the similarity of the topic distribution of users' historical comments and the emotional influence of users;
[0028] Convert the user's basic information into a vector representation;
[0029] The vector representation of each user under the topic and the relationship weight matrix between users are input into a time coding-based graph attention network to determine whether the current topic belongs to a leading topic.
[0030] As Figure 1 The embodiment proposes a specific implementation process of an early leading topic detection method based on emotion accumulation and dynamic graph representation, including the following steps:
[0031] S1: Use the API interface provided by the public data set website or social network to comprehensively collect topic data, which includes user comments, detailed user information data, and interaction relationships between users;
[0032] S2: After collecting the topic data, perform fine attribute extraction work, which covers multiple dimensions such as topic propagation network, topic element popularity, and user credibility. Based on these attributes, an original topic propagation network is constructed, providing an intuitive network structure reference for subsequent data compensation and node representation;
[0033] S3: Use the data compensation method based on the LDA topic model to compensate the original topic by deriving a topic, solve the early data sparsity problem of the topic, and then obtain the compensated topic space;
[0034] S4: For the problem of user emotion accumulation on other topics before the current topic breaks out, establish an emotion accumulation influence model to capture the propagation and accumulation effect of user emotion in multiple topics, and thus quantify its influence in the current topic;
[0035] S5: Use the TGAT dynamic graph representation learning algorithm to continuously update the node embedding vector of the user through dynamic graph representation, simulate the influence between users in the topic evolution process, and accurately represent the user node vector;
[0036] S6: Further aggregate the user vector in the graph through the attention mechanism to obtain the graph representation vector of the topic, and use the Softmax function after the fully connected layer to convert the output into probability values of two categories. The category corresponding to the maximum probability value of the two categories is taken as the prediction result.
[0037] As Figure 2 shown, based on the topic distribution of the extracted topic, and according to the topic theme similarity, find other topics similar in semantics to the current topic. The information of these similar topics can be used for data compensation. The specific process is to first standardize the text data, convert the document into a word frequency vector or a word item-document matrix, then train the LDA model to obtain the topic distribution of each document. Finally, find similar topics by comparing the topic distribution similarity.
[0038] Let each topic Ti Contains user comments i ={d i1 ,d i2 ,…,d iM}, these documents are transformed into the topic distribution θ of each topic through the LDA model i , in order to find the s Topic distribution similarity can be calculated by calculating the topic distribution similarity between topics. In this embodiment, the cosine similarity between topic distributions is used as the topic distribution similarity. For topic T s and topic T r , whose topic distributions are θ s and θ r , then the cosine similarity calculation formula is:
[0039]
[0040] where θ s ·θ r is the dot product of two topic distribution vectors, ||θ s ||||θ r || are the product of the norms of the two topic distribution vectors. The value of cosine similarity ranges from 0 to 1. The closer the value is to 1, the more similar the topics of the two topics are.
[0041] Therefore, some hot topics will generate a large number of strongly related derivative topics in the early stage, so it is necessary to select topic elements with higher credibility to compensate for the original domain of the topic. First, the user's historical credibility Cre (u i ) and topic popularity Pop(t):
[0042] Cre(u i )=grade(u i )+α×fansNum(u i )
[0043]
[0044] Among them, Cre(u i ) represents user u i The historical reputation of grade(u i ) indicates the official account level of the user, fansNum(u i ) represents the number of followers of the user. Where t and n represent the current time and the time when the topic is published, respectively. disNum(t) represents the number of comments and forwardings of the topic at time t, and disNum(t-1) represents the number of comments and forwardings of the topic at time t-1. At the same time, the half-life function is introduced. Simulate the process of a topic's popularity rapidly decreasing after reaching its peak.
[0045] The formula of the final element credibility is:
[0046] Cre(e i )=Cre(u i )+β×Pop lev (e i )
[0047] Wherein, the topic element e i is published by the user u i ; Pop lev (e i ) represents the heat level of the topic element e i , which is converted from the topic element heat Pop(t) at the current time; the user publishes the topic, which is often related to his own position, so the user feature of high credibility has a higher impact on the study than the topic element of high heat, and the influence of the topic element heat on the credibility of the topic element is weakened by the attenuation factor β∈[0, 1].
[0048] In the embodiment, the topics whose credibility is greater than the set threshold value are screened, and the topics whose pre-similarity with the current topic is greater than the set threshold value are obtained from the topics, and the user comment information in these topics is used as the implicit relationship:
[0049]
[0050] Wherein, Cor(u i,j ) represents the comment relevance of the user comment set e i and e j , wherein Vec(e i ) and Vec(e j ) represent the vector form converted by the user comment set e i and e j using the representation learning doc2vec algorithm. Rel cov (u i,j ) represents the implicit relationship between the users u i and u j , and β represents the boundary of the text related relationship.
[0051] Since the current topic data is compensated and the topic elements with high credibility are screened, the topic explicit and implicit adjacency matrix is established, wherein the explicit relationship refers to the direct and observable interaction relationship between users, and the quantitative formula is as follows:
[0052] Rel dom (u i,j )=Int com (e i,j )+Int fri (u i,j)
[0053] where Rel dom (u i,j ,u i ) denotes the explicit relationship between users u j and u com , Int i,j (e i ,e j ) denotes the comment relationship weight between user comment sets e fri and e i,j , Int i (u j ,u weight ) denotes the friend relationship weight between users u i and u j , and the above weights represent whether the two elements have a relationship, denoted by 0 or 1.
[0054] The explicit relationship and the implicit relationship are then combined to construct the user relationship network of the early topic domain, and the relationship weight of the nodes in the element relationship network is quantified based on the explicit relationship weight and the implicit relationship weight. The quantification formula is as follows:
[0055]
[0056] where Rel weight (u i ,u j ) denotes the weight between users u i and u j ; Rel cov (u i ,u j ) denotes the implicit relationship between users u i and u j obtained according to the topic model; Rel dom (u i ,u j ) denotes the explicit relationship between users u i and u j obtained according to the sentiment influence, and is an influence factor and
[0057] As Figure 5 proposed a time-encoding-based graph attention network (TGAT) to obtain a graph embedding vector, and detected topics through a fully connected layer. First, the topic needs to be sliced to obtain the topic network set at each time denotes the relationship network of the topic at t i ;
[0058] In order to integrate the time information, the attention coefficient depends not only on the features of the nodes, but also on the time difference information between the nodes, and the attention coefficient is expressed as:
[0059] e ij =LeakyReLU(a T [Wh i ||Wh j ||W t Δt ij ])
[0060] wherein e ij represents the attention coefficient between the final vector representation of the user u i and the final vector representation of the user u j ; LeakyReLU(·) represents the LeakyReLU function; a is a parameter vector for calculating the attention coefficient; W is a conversion matrix, and the role of the conversion matrix in the present application is to map the feature vector to be processed into the same vector space, facilitating calculation; h i is the final vector representation of the user u i , h j is the final vector representation of the user u j ; || represents a splicing operation; W t is a conversion matrix of a time difference vector, which is used to convert the time difference encoding into the same dimension as the vector representation of the user; Δt ij is a time difference vector, and its value is the absolute value of the time difference between the interactions of the users, for example, when the time of the user A publishing a dynamic is a, and the time of the user B giving a like, comment or forwarding the dynamic of the user A is b, then the time difference is |a-b| for the user A and the user B.
[0061] In the present embodiment, the final vector representation of the user is spliced together with the accumulated emotional representation of the user after the basic information of the user is vectorized, and the basic information of the user can be the basic information filled in by the user when applying for an account, including gender, age and other information, and the process of obtaining the accumulated emotional representation of the user includes the following steps:
[0062] Using a sentiment analysis tool to perform sentiment classification on the speeches or comments of the user in different topics, the sentiment classification including positive sentiment, negative sentiment and neutral sentiment;
[0063] Obtaining the sentiment polarity score of each comment of the user in the topic T k , calculating the sentiment score of the entire topic by aggregating the polarity scores of all comments, averaging the polarity scores of all comments to obtain the overall sentiment tendency of the topic, and the sentiment score of the user u i in the topic T k is represented as:
[0064]
[0065] wherein S(T k ,u i) represents the sentiment score of user u in topic T i The sentiment score in topic T k ; Polarity(w) represents the sentiment polarity value of word w in the text, which can be obtained from a dictionary or a pre-trained model, usually ranging from [-1, 1], where the polarity value of positive words is positive (such as "good", "amazing" has positive sentiment polarity), the polarity value of negative words is negative (such as "bad", "terrible" has negative sentiment polarity), and the sentiment polarity of neutral words is 0; Modifier(w) represents the influence factor of modifier words, including negative words and emphasis words, which modifies the polarity of sentiment words, negative words (such as "not", "never") will reduce or reverse the score of sentiment words, and emphasis words (such as "very", "extremely") will amplify the score of sentiment words; |T k | represents the length of the comment of topic T k , that is, the number of sentiment words involved in the calculation, ensuring that the polarity score is within the range of [-1, 1];
[0066] By calculating the sentiment score of the user in the previous topic and considering the time decay of sentiment, the sentiment accumulation value E acc (u i ,T c ) of the user in the current topic is calculated, which is represented as:
[0067]
[0068] Where E acc (u i ,T c ) represents the sentiment accumulation value of user u i in the current topic T c ; S(T k ,u i ) represents the sentiment score of user u i in the previous topic T k ; t c , t k represent the time of the current topic and the previous topic respectively, λ represents the time decay factor, which controls the decrease of sentiment influence over time, and the present invention controls the influence of the previous topic sentiment on the current topic, the more distant the sentiment, the smaller the influence, and n represents the number of topics previously participated by the user;
[0069] After obtaining the historical sentiment accumulation value E acc (u i ,T c ) of the user, the sentiment score S(T c ,u i ), calculate the user's emotional influence on the current topic I(u i ,T c ), the formula is as follows:
[0070] I(u i ,T c )=α·S(T c ,u i )+β·E acc (u i ,T c )
[0071] Among them, I(u i ,T c ) represents user u i On the current topic T c Emotional influence of S(T c ,u i ) represents the user’s sentiment score in the current topic; E acc (u i ,T c ) represents the user's historical emotional accumulation value; α and β are weight coefficients that control the relative contribution of current emotion and historical emotional accumulation to emotional influence;
[0072] Finally, during the information dissemination process, users receive information about a topic from multiple sources, and this information may carry different emotional tendencies (positive, negative, neutral). As a result, users' emotions towards the topic may fluctuate. In particular, when the information transmitted by different sources is inconsistent, users' emotional cognition becomes more uncertain. Due to the bias in the information received by users during the topic dissemination process, users' emotions fluctuate. Entropy can capture the impact of this fluctuation, thereby adjusting the user's final emotional cumulative influence. The final emotional cumulative influence formula is:
[0073]
[0074] I final (u i ,T c )=I(u i ,T c )·(1-H(u i ,T c ))
[0075] Among them, H(u i ,T c ) represents user u i In the current topic T c Emotional uncertainty in p j represents the probability of each emotional state of the user in the previous topic; I(u i ,Tc ) represents the original sentiment influence of the current topic T i on the user u c . final (u i ,T c ) represents the final sentiment influence after modification. The e ij calculated above is subjected to Softmax operation for normalization to obtain the final attention coefficient a ij :
[0076]
[0077] wherein N represents the neighbor set of the user u i , which includes other users having direct or indirect friendship relationship with the user u i .
[0078] The process of updating the vector representation of the user according to the attention weight includes:
[0079]
[0080] wherein h′ i represents the updated vector representation of the user u j ; σ(·) represents a nonlinear activation function, and ReLU activation function is selected in the embodiment; a ij represents the attention weight between the vector representation of the user u i and the vector representation of the user u j . represents the neighbor set of the user u i , and W is a conversion matrix.
[0081] Finally, the weight is calculated by using the reputation value of the user, and the vector representation of each updated user is weighted by using the weight, and the cumulative value of the weighted users is taken as the representation of the topic, i.e.
[0082]
[0083] wherein is the representation of the topic, a i is the weight calculated according to the reputation value of the user, and d is the number of users.
[0084] Finally, the detection result of whether the topic belongs to the leading type of topic is obtained by using the Softmax function, i.e. the probability that the topic belongs to the leading type of topic and the non-leading type of topic is obtained by using the Softmax function, and the larger value is taken as the detection result.
[0085] While embodiments of the application have been shown and described, it is to be understood that the embodiments described are merely exemplary of the principles and application of the present application. Numerous modifications and adaptions can be effected without departing from the spirit and scope of the present application, which is not limited to the exact construction and arrangement described. It is intended, therefore, to cover all modifications and adaptions that fall within the scope of the claims and their equivalents.
Claims
1. An early-onset guided topic detection method based on sentiment accumulation and dynamic graph representation, characterized in that, Specifically comprising the following steps: Obtaining topic data generated before and after the topic burst, including the basic information of the user publishing comments in the topic, comment information and friend relationship, converting the basic information of the user into a vector representation; According to the topic distribution similarity of the current topic comments and the comment information and the friend relationship of the comment publishing users, a relationship weight matrix among the users is established, wherein the weight between the user u i and the user u j is represented as: wherein Rel weight (u i ,u j ) denotes the weight between user u i and user u j ; Rel cov (u i ,u j ) denotes the latent relationship between user u i and user u j obtained according to the topic model; Rel dom (u i ,u j ) denotes the explicit relationship between user u i and user u j obtained according to the sentiment influence, is an influence factor and Inputting the vector representation of the user basic information under the topic, the user's emotional accumulation representation and the relationship weight matrix between users into the time coding based graph attention network to judge whether the topic belongs to the leading topic, the process of obtaining the user's emotional accumulation representation includes: I final (u i ,T c ) = I(u i ,T c ) · (1 - H(u i ,T c )) Among them, I final (u i ,T c ) represents user u i In the current topic T c The final emotional impact in I(u i ,T c ) represents user u i In the current topic T c The raw emotional impact of H(u i ,T c ) represents user u i In the current topic T c Emotional fluctuations in The process of prediction based on the time coding based graph attention network includes: 101, slicing the topic to obtain the topic network under each time slice, let t=1, and initialize the topic network using the currently obtained user node; 102, calculate the attention coefficient between two users according to the vector representation of the user basic information at time t, and calculate the attention weight according to the attention coefficient; 103, update the vector representation of the user according to the attention weight to obtain the vector representation of the user at time t+1, if t is not greater than the set time slice number, let t=t+1 and return to step 102; 104, weight the vector representation updated in the last time slice according to the reputation value of the user, and take the cumulative value of the vector representation of each user after weighting as the vector representation of the topic; 105, update in turn according to the order of time slice, weight all the vector representations of the users updated in the last time based on the attention mechanism, and take the cumulative vector representation after weighting as the vector representation of the topic; Obtain the probability of the vector representation of the topic belonging to the leading topic and the non-leading topic by using the softmax function, and take the larger value as the final prediction result of the topic.
2. The early onboarding topic detection method based on sentiment accumulation and dynamic graph representation according to claim 1, characterized in that, A process of obtaining an implicit relation Rel i between a user u j and a user u cov (u i ,u j ) according to a topic model comprises: wherein Cor(e i , e j ) denotes the cosine similarity between the set of comments e i of user u i and the set of comments e j of user u j , and β is a set threshold value.
3. The early onboarding topic detection method based on sentiment accumulation and dynamic graph representation according to claim 1 or 2, characterized in that, When establishing the relationship weight matrix between users, the users are screened, that is, users whose cosine similarity of historical comment topic distribution published by two users in the topic is greater than a set threshold are selected.
4. The early onboarding topic detection method based on sentiment accumulation and dynamic graph representation according to claim 1, characterized in that, User u obtained based on emotional influence i and user u j Rel dom (u i ,u j ) process Including: Rel dom (u i ,u j ) = Int com (e i ,e j ) + Int fri (u i ,u j ) wherein Int com (e i ,e j ) denotes the comment relationship weight between the comment set e i of user u i and the comment set e j of user u j , Int com (e i ,e j ) = 1 if there is a comment interaction between the two users, otherwise Int com (e i ,e j ) = 0; Int fri (u i ,u j ) denotes the friend relationship weight between user u i and user u j , Int fri (u i ,u j ) = 1 if there is a direct good relationship between the two users, otherwise Int fri (u i ,u j ) = 0.
5. The early onboarding topic detection method based on sentiment accumulation and dynamic graph representation according to claim 1, characterized in that, The process of calculating the attention coefficient between two users according to the vector representation of the user Including: e ij = LeakyReLU(a T [Wh i || Wh j || W t Δt ij ]) wherein e ij represents the attention coefficient between the vector representation of user u i and the vector representation of user u j ; LeakyReLU(·) represents a LeakyReLU function; a is a parameter vector for calculating the attention coefficient; W is a transformation matrix, h i is the vector representation of user u i , h j is the vector representation of user u j ; || represents a concatenation operation; W t is a transformation matrix of a time difference vector, used to convert the time difference encoding into the same dimension as the vector representation of the user, Δt ij is a time difference vector, whose value is the absolute value of the time difference between user u i and user u j .
6. The early onboarding topic detection method based on sentiment accumulation and dynamic graph representation according to claim 1, characterized in that, The process of updating the vector representation of the user according to the attention weight includes: where h' = h + h i represents the updated vector representation of user u j ; σ(·) represents a nonlinear activation function; a ij represents the attention weight between the vector representation of user u i and the vector representation of user u j ; represents the neighbor set number of user u i , and W is a conversion matrix.
Citation Information
Patent Citations
Derivative topic propagation prediction method based on multi-topic emotion measurement
CN115907165A
Dynamic rumor detection method based on space-time propagation graph
CN117633635A