Public opinion evolution prediction method and system based on multi-dimensional user portrait and adaptive graph fusion
By fusing multidimensional user profiles with adaptive graphs, and combining Transformer encoders and neighbor co-occurrence encoding, the problem of multidimensional feature fusion and dynamic temporal modeling in online public opinion evolution prediction is solved, achieving high-precision public opinion evolution prediction and visualization.
Patent Information
- Application Number
- CN202511340922.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-19
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2045-09-19
AI Technical Summary
Existing technologies struggle to integrate users' static attributes, dynamic behavioral preferences, and deep-seated attitude characteristics in predicting the evolution of online public opinion. They also fail to balance the semantic complexity of public opinion content with its dissemination relevance, making it difficult to achieve both efficiency and accuracy in long-term time-series modeling, resulting in low prediction accuracy.
We employ a multi-dimensional user profile and adaptive graph fusion approach. By modeling language style, personality traits, topic features, and social structure, and combining Transformer encoder and neighbor co-occurrence encoding, we construct a dynamic adaptive graph learning model to capture the temporal dependencies and potential correlations among users.
It achieves high-precision prediction of public opinion evolution, can reveal the evolution trend of key communication nodes and public opinion links, improves the interpretability and efficiency of prediction, and supports public opinion situation awareness and early risk assessment.
Smart Images

Figure CN120832645A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of network public opinion evolution, and in particular relates to a multi-dimensional user portrait and adaptive graph fusion public opinion evolution prediction method and system. BACKGROUND
[0002] Network public opinion refers to the collision of views, the collection of attitudes, the behavior and emotional performance of netizens or groups in the network space in response to social events. With the rapid development of social media technology, platforms such as microblogs have become an important channel for public information exchange and opinion expression. The generation, fermentation, spread and outbreak of network public opinion show diversification and dynamism. On the one hand, public opinion events are often accompanied by the rapid spread of different themes, emotions and attitudes, which exacerbates social uncertainty factors. On the other hand, the multi-dimensional and complex public opinion field in social platforms such as microblogs makes public governance and public opinion control face greater challenges. The evolution of network public opinion may trigger social risks, relate to the ideological orientation of network space, and affect social stability and national security. Therefore, how to build an efficient public opinion monitoring and early warning mechanism and timely grasp the overall picture of public opinion evolution has become an important issue in information governance and public opinion prevention and control.
[0003] Although the current academic research on public opinion has focused on theme mining, sentiment classification, user behavior analysis and other fields and has achieved preliminary application in basic public opinion perception scenarios, there are still two key technical bottlenecks in the face of complex and dynamic public opinion evolution prediction tasks: first, the expression ability is limited, and existing methods mostly rely on single-dimensional features such as text semantics or user basic behavior to construct model inputs, which cannot integrate multi-dimensional attributes such as user static attributes, dynamic behavior preferences and deep attitude features, cannot take into account the complexity of public opinion content semantics and the relevance of transmission, and cannot stereoscopically depict the "user-public opinion" interactive system, thus failing to provide sufficient information support for prediction; second, the efficiency and accuracy of long-time sequence modeling are difficult to balance, and mainstream methods either ignore the dynamic evolution of user relationships based on static graphs or use simple time sequence splicing, shallow time sequence models and do not distinguish the differences between user "forwarding" and "commenting" behaviors, which may lead to a decline in accuracy due to dynamic information loss and interaction differences in long-time sequence scenarios, and forcibly increasing the modeling granularity may also increase the computational complexity and reduce the efficiency. In summary, the deficiencies of existing technologies in multi-dimensional feature fusion and dynamic time sequence modeling make it difficult to adapt to the complex needs of public opinion evolution prediction, and innovative modeling methods are needed to break through the bottleneck. SUMMARY
[0004] In view of the above situation, the main purpose of the present application is to provide a multi-dimensional user portrait and adaptive graph fusion public opinion evolution prediction method and system to solve the above technical problems.
[0005] The application provides a public opinion evolution prediction method based on multi-dimensional user portrait and adaptive graph fusion, and the method comprises the following steps: Step 1, obtaining user information, user post content and user diversified social relationship; language style modeling, personality trait modeling and topic feature modeling are respectively performed on the user post content to obtain a language style feature vector, a personality feature vector and a topic embedding vector; The user information, the user post content and the user diversified social relationship are used for social structure modeling to obtain a social structure embedding vector; Step 2, fusing the language style feature vector, the personality feature vector, the topic embedding vector and the social structure embedding vector to obtain a multi-dimensional user portrait embedding; Step 3, taking a user as a node and diversified social relationship at different time points as an edge, and embedding the multi-dimensional user portrait embedding into the node of the corresponding user to obtain a continuous time dynamic graph; Step 4, taking a current node user in the continuous time dynamic graph as a source node, taking a node user connected to the current node user as a neighbor, and using neighbor co-occurrence coding to encode the continuous time dynamic graph along a time axis to obtain an encoding sequence; Step 5, blocking the encoding sequence, and using a Transformer encoder to capture the time dependence between the blocks and the potential correlation between the nodes to obtain a time-aware representation of the source node and the target node at the current time; Step 6, using the time-aware representation of the source node and the target node at the current time to perform dynamic link prediction and dynamic node classification respectively to obtain a link evolution trend of future public opinion and an observation point change probability distribution.
[0006] The application further provides a public opinion evolution prediction system based on multi-dimensional user portrait and adaptive graph fusion, wherein the system applies the public opinion evolution prediction method based on multi-dimensional user portrait and adaptive graph fusion, and the system comprises: A multi-dimensional user portrait construction module is used for: obtaining user information, user post content and user diversified social relationship; language style modeling, personality trait modeling and topic feature modeling are respectively performed on the user post content to obtain a language style feature vector, a personality feature vector and a topic embedding vector; The user information, the user post content and the user diversified social relationship are used for social structure modeling to obtain a social structure embedding vector; The language style feature vector, the personality feature vector, the topic embedding vector and the social structure embedding vector are fused to obtain a multi-dimensional user portrait embedding; A dynamic graph adaptive learning module is used for: Take the user as the node of the graph, the diversified social relationship at different time points as the edge, and embed the multi-dimensional user portrait into the node of the corresponding user to obtain a continuous time dynamic graph; Take the current node user in the continuous time dynamic graph as a source node, take the node user connected with the current node user as a neighbor, encode the continuous time dynamic graph along the time axis by using neighbor co-occurrence encoding to obtain an encoding sequence; Block the encoding sequence, and use a Transformer encoder to capture the time dependence between the blocks and the potential correlation between the nodes to obtain a time-aware representation of the source node and the target node at the current time; The public opinion evolution prediction module is used for: Using the time-aware representation of the source node and the target node at the current time, dynamic link prediction and dynamic node classification are performed respectively to obtain the link evolution trend of the future public opinion and the observation point change probability distribution.
[0007] Compared with the prior art, the beneficial effects of the present application are as follows: 1. Unified multi-dimensional user portrait: The user static attributes, text semantic features, personality psychological features and multi-relation social structure features are uniformly modeled. Language style embedding is obtained by using supervised contrast learning, and user semantics and theme distribution are accurately extracted by using the theme modeling technology of Transformer and c-TF-IDF. At the same time, a heterogeneous graph covering multiple relationships such as attention, forwarding, comment, etc. is constructed, and social structure feature representation is generated by using graph representation learning and attention mechanism. Compared with the single nature of the prior art, the present scheme can comprehensively and accurately capture the subject difference features in public opinion propagation, and accurately represent the individual features and behavior patterns of the user.
[0008] 2. Dynamic adaptive graph learning mechanism: The present application breaks through the limitation of traditional static graph and proposes a dynamic graph modeling method based on attention mechanism and Transformer. The system takes multi-dimensional user embedding and multi-relation propagation path as input, introduces neighbor co-occurrence encoding (NCoE) to strengthen the correlation between the source node and the target node, efficiently models long-term time sequence dependence through patching mechanism, and realizes dynamic adaptive learning of node relationship and network structure in the process of public opinion propagation. This mechanism not only can distinguish the difference influence of multiple interactive relationships such as forwarding, commenting, liking, etc., but also can effectively capture the time sequence rule of public opinion evolution, improve the prediction accuracy and interpretability, and successfully solve the problem that efficiency and accuracy are difficult to be considered in long time sequence modeling.
[0009] 3. Technical innovation and application value: Through multi-dimensional feature fusion and dynamic graph structure learning, the application realizes high-precision prediction and visual presentation of public opinion evolution, and can reveal key propagation nodes, public opinion link evolution trend and potential risk points. The system can be widely applied to social media public opinion monitoring, emergency warning and public opinion guidance, and can effectively support public opinion situation awareness, risk early judgment and other actual needs, to provide scientific decision basis.
[0010] Additional aspects and advantages of the application will be set forth in part in the description which follows, and in part will become apparent to those skilled in the art upon examination of the following description and drawings. BRIEF DESCRIPTION OF DRAWINGS
[0011] Figure 1 A flow chart of the multi-dimensional user portrait and adaptive graph fusion public opinion evolution prediction method proposed by the application; Figure 2 A multi-dimensional user portrait feature extraction process chart proposed by the application; Figure 3 A dynamic adaptive learning modeling chart proposed by the application; Figure 4 A structure diagram of the multi-dimensional user portrait and adaptive graph fusion public opinion evolution prediction system proposed by the application. DETAILED DESCRIPTION
[0012] The embodiments of the application are described in detail below, examples of which are shown in the drawings, wherein the same or similar reference signs represent the same or similar elements or elements with the same or similar functions throughout. The embodiments described below by referring to the drawings are exemplary and are only used to explain the application, and cannot be understood as a limitation of the application.
[0013] These and other aspects of embodiments of the application will become apparent in light of the following description and drawings. In these descriptions and drawings, some specific implementations of embodiments of the application are specifically disclosed to represent some ways of implementing the principles of embodiments of the application, but it should be understood that the scope of embodiments of the application is not limited thereto.
[0014] Please refer to Figures 1 to 3 The embodiment provides a multi-dimensional user portrait and adaptive graph fusion public opinion evolution prediction method, which comprises the following steps: Step 1, obtaining user information, user post content and user diversified social relationship; using the user post content to respectively perform language style modeling, personality trait modeling and theme feature modeling, to respectively obtain language style feature vector, personality feature vector and theme embedding vector; Using the user information, the user post content and the user diversified social relationship to perform social structure modeling, to obtain a social structure embedding vector; Because the Supervised Contrastive Learning method is used to build an embedding space that can distinguish different users' writing styles. In the process of language style modeling, it is defined as follows: given a user u i A collection of texts posted on social media platforms , Represents a user The goal of the nth text published on the social media platform is to extract its language style representation vector through the writing language style modeling method. .
[0015] The details of language style modeling in step 1 are as follows: 1. Text encoding and embedding.
[0016] Given user u i Posted on social media platforms g Article ,in For the first token (word), we first use the pre-trained RoBERTa-large as the base encoder to convert it into the initial token-level embedding, and then use mean pooling to obtain the text-level semantic embedding. This step uses the semantic understanding ability of the pre-trained language model to learn the semantic representation of the text. e ij .
[0017] ; in, Represents a user The text-level semantic embedding of the g-th text, Represents a user The text in Article g posted on social media platforms, represents the pre-trained RoBERTa-large encoder, Indicates the gth token; 2. Embedding Projection and Supervised Contrastive Learning.
[0018] Contrastive learning aims to learn the representation of input data. For user identification, if the representations of texts from the same user are similar, the loss is low, and if the representations of texts from different users are similar, the loss is high.
[0019] Supervised Contrastive Loss (SupCon loss) extends the contrastive learning to the supervised scenario, by using the label information, the same class samples are regarded as positive examples, and different classes are regarded as negative examples, so that the same class samples are clustered in the embedding space, and the different classes are separated. The implementation of SupCon in the present application is carried out around the goal of "minimizing the distance of the same user text embedding, and maximizing the distance of the different user text embedding", and the samples of the same user are regarded as positive examples, and the samples of different users are regarded as negative examples. The specific process is as follows: (1) Batch construction: The training data is grouped according to the user, each batch contains k different users, and l texts (i.e. "views") are randomly selected for each user, forming a batch with a size of . A user is only selected once in a single batch, that is, each user contributes at most l texts to the batch, and does not appear in the same batch as multiple independent users to avoid false negative interference.
[0020] (2) Projection and normalization: In order to enhance the discriminability of the style feature, a linear projection layer without activation function is introduced. The text embedding e ij After the projection layer (linear mapping without activation function), it is converted into a low-dimensional embedding , which can be expressed as: where and represent the weight and bias parameters of the projection layer respectively, represents the low-dimensional embedding, and the projection is L2 normalized , wherein represents the normalized low-dimensional embedding, represents the L2 norm, which is very important for training stability and performance. is the low-dimensional embedding used to calculate the supervised contrastive loss (SupCon loss).
[0021] (3) Supervised contrastive loss: Let the temperature parameter > 0, for each text sample in the batch, the supervised contrastive loss formula is as follows: ; wherein represents the supervised contrastive loss function, represents the index set of all texts in the batch; represents the index set of all texts in the batch; other samples belonging to the same user (positive set), without text itself; denotes the number of positives; denotes the set of all samples in the batch (including positives and negatives) except the text itself; denotes the temperature parameter, used to adjust the steepness of the similarity distribution; denotes the sample embedding belonging to the same user , measures the similarity of sample embeddings by dot product operation; denotes the embedding of all samples belonging to the same user , measures the similarity of sample embeddings by dot product operation; denotes the transpose operation.
[0022] (4) Optimization objective: Through the above loss function, the model will: increase the similarity of the same user document embedding (make the numerator term larger); reduce the similarity of different user document embeddings (make the contribution of negatives in the denominator term smaller); Finally, the embeddings of the same user are clustered in the vector space, and the embeddings of different users are dispersed, so that the distinctive writing style features are learned.
[0023] During training, the encoder parameters are optimized by supervised contrastive loss, and the encoder (RoBERTa) model gradually learns the writing style features of the user (such as word usage habits, sentence structure, etc.), and weakens the influence of the theme on the embedding. The gradient of the SupCon loss will not only update the parameters of the projection layer, but also continue to update the parameters of the encoder (RoBERTa) itself along the reverse path of the projection layer.
[0024] 3. Output of user-level language style vector.
[0025] After supervised contrastive training, the projection layer is discarded, and only the optimized RoBERTa-large encoder pooling layer output is kept as the text-level representation (because the projection is mainly used to learn the optimization space of the contrastive task, and is discarded after training to obtain a more semantic vector, but the output of the encoder has already been discriminative for contrastive learning). The text-level semantic embedding can be used to represent the core text-level representation of the user's writing style, which presents the distribution characteristics of "same user clustering, different user dispersion" in the embedding space. To further obtain a unified style vector representation for each user, the Additive Attention (additive attention) mechanism is introduced, which pays attention to the user All text embeddings are adaptively weighted aggregated to learn the relative contribution of different texts to their style representation. The formula is as follows.
[0026] ; wherein, represents the contribution weight of the text to the user's writing style, and satisfies ; represents the user's The text-level semantic embedding of the gth text after supervised contrastive learning; represents the text-level semantic embedding after supervised contrastive learning that is different from ; represents the attention context vector, which is used to evaluate the importance of each text; and respectively represent the learnable weight and bias of the attention layer.
[0027] Finally, the text-level semantic embedding after supervised contrastive learning is weighted and summed using the contribution weight of the text to the user's writing style to obtain the language style representation of the current user. The corresponding process has the following relationship: ; wherein, represents the language style feature vector of the user , represents the number of texts published by the user on the social media platform.
[0028] The part about personality trait modeling in step 1 is as follows: 1. Define psycholinguistic features.
[0029] To better assist the personality recognition model in learning psychological semantic information, three types of language psychological features are introduced: (1) Mairesse features include three sub-feature sets: LIWC features: count the frequency of words related to emotions, behaviors, and grammar; MRC features: from the MRC psycholinguistic database, including psychological scores such as word imaginability and abstractness; Rhythm and discourse type features: measure the rhythm and expression form information of the language.
[0030] (2) SenticNet features: By aggregating the polarity values of emotional words in the text, we get the quantitative values of introspection, temper, attitude, sensitivity, and polarity. At the same time, the top 5 main emotional labels are extracted and vectorized during training.
[0031] (3) NRC sentiment features: Based on NRC sentiment lexicon, the frequency of relevant words in 11 emotional categories such as anger, expectation, disgust, fear, joy, etc. is calculated to supplement the sentiment features of SenticNet.
[0032] 2. Feature extraction process and representation learning.
[0033] Given user A set of texts published on social media platforms Each text goes through two channels: (1) Psycholinguistic feature extractor: generate n A feature vector According to psycholinguistic features u i Overall psycholinguistic features The average vector value is as follows: ; ; Where, represents the psycholinguistic feature extraction function, which refers to the process of converting the original text into a psycholinguistic feature vector, represents the psycholinguistic feature extraction of The user n published a total of Texts, represents the psycholinguistic features of the gth text published by the user , represents the overall psycholinguistic features of the user (2) Use RoBERTa-large as the basis encoder to convert the input text (social media post) into the initial token-level embedding, and then get the text-level embedding through average pooling. This step uses the semantic understanding ability of the pre-trained language model to learn the semantic representation of the text .
[0034] 3. Attention mechanism for feature fusion.
[0035] The overall psycholinguistic features of the user Generate query and key through linear projection, and generate value through linear projection Text-level semantic embedding , The corresponding process is as follows: ; Where, Query, key and value respectively Query, key and value correspond to the trainable parameter matrix The dot product attention computation is performed on the query and key to obtain the attention weight, and the corresponding process has the following relationship: ; wherein, represents the attention weight, represents the dimension of the key.
[0036] 4. Fusion of semantic representation and psychological characteristics.
[0037] Through attention weighting fusion V ij to obtain the user u i Fusion of semantic and psychological personality representation H i , and strengthen the text weight related to personality.
[0038] ; wherein, represents the personality representation; Then the obtained personality representation is reduced in dimension, and is mapped into a lower-dimensional vector using a linear layer. Next, the vector is spliced with the overall psycholinguistic feature vector of the current user to form a high-level feature vector .
[0039] ; wherein, represents the personality feature vector of the user , represents the splicing operation, represents the linear layer.
[0040] The part about topic feature modeling in step 1 is as follows: The topic feature modeling method combines Transformer semantic encoding, dimension reduction clustering, and c-TF-IDF representation, and is especially suitable for processing short texts (such as social media posts), which can output a keyword weight vector for each topic and further generate a user-level topic representation.
[0041] 1. Text clustering.
[0042] Dimension reduction: use UMAP to map the text-level semantic embedding from high-dimensional to low-dimensional space, maintaining local and global structural properties: ; wherein, represents the vector after dimension reduction, represents the UMAP operation; Clustering: HDBSCAN is used to cluster the reduced dimension vectors, which can handle clusters of different densities and treat noise as outliers -1, and automatically determine the number of clusters K , which improves the quality of topic representation. The topic number to which the reduced dimension vector is clustered is obtained k , The number of clusters representing clustering, each cluster corresponds to a topic; 2. In-class keyword extraction (c-TF-IDF).
[0043] Construct its TF-IDF representation, but do not use standard TF-IDF, but introduce "class TF-IDF" (class-based TF-TDF), according to the correspondence between the reduced dimension vector and the topic number, all texts in each topic k Merged into a "class document" D k , The formula is as follows: ; Among them, The c-TF-IDF score of the word, The frequency of the word w in the documents of the topic k , The frequency of the word w in the documents of the topic , The total number of words contained in the topic k , The total number of words contained in the topic , K The number of clusters representing clustering, that is, the number of topics.
[0044] 3. Topic vector and user topic distribution.
[0045] (1) Topic vector: The topic vector is a high-dimensional sparse vector, each dimension of which represents the cTF-IDF weight of a word in the word table, and the formula is as follows: ; Among them, The size of the word table in the entire corpus, each component is the c-TF-IDF score of "a certain word w i " in the topic k , The topic vector.
[0046] (2) User topic probability distribution: For user ui All the texts of ; Where, represents the topic k The relative proportion of users , represents the number of topics In the text of the user k , represents the number of topics In the text of the user , represents the number of topics.
[0047] 4. User-level topic vector generation.
[0048] Since is a high-dimensional sparse vector, it is not convenient to use it directly in the later stage of the depth model. This method proposes a user-level topic vector aggregation strategy: the topic vector of the current topic is reduced in dimension using Truncated SVD, and then the vector is aggregated to obtain the topic embedding vector. The corresponding process has the following relationship: ; Where, represents the topic embedding vector of the user , represents the dense vector after Truncated SVD dimension reduction of the topic vector .
[0049] The part about social structure modeling in step 1 is as follows: 1. Task definition.
[0050] Construct the social network structure and extract the structural embedding representation of the user under multiple relationships (attention, forwarding, commenting, etc.) , which is used to depict the user's position, role and propagation ability in the social network, etc. characteristics, wherein, represents the dimension of the user's social structure representation.
[0051] The social structure of the user is represented by the heterogeneous information network of diversified relationships, heterogeneous influence and multi-relationship information. The core process includes graph construction, relationship graph conversion and semantic attention aggregation.
[0052] 2. Construction of heterogeneous information network (HIN).
[0053] The user static attribute features are extracted from the user information, the user is taken as a node of a graph, and diversified social relationships (such as “attention”, “attention”, and “forward”) are taken as edges. The text semantic representation of the user and the user static attribute features are spliced and embedded into the corresponding node of the user to obtain a heterogeneous information network, so as to capture the heterogeneity of the relationship. The user feature vector (text + user static attribute feature) is converted into an initial feature vector in the graph neural network (GNNs) through a full connection layer, and the specific formula is as follows.
[0054] ; wherein, represents the text semantic representation of the user , represents the number of posts of the user, represents the user static attribute feature, represents the user initial feature spliced with the user static attribute and the text semantic, represents a leaky-relu activation function, represents a learnable parameter matrix for mapping the vector obtained by splicing the text semantic feature and the static attribute feature of the user to the initial feature space of the graph neural network, represents a learnable bias vector for translating the linear transformation result, represents the initial feature vector of the user after transformation, which is taken as the input of the graph neural network. The user static attribute feature includes: the number of fans, the number of attention, the account age, the post frequency, the number of likes and the like. Among them, the numerical type is normalized, the binary type is encoded by 0 / 1, and the multi-class type is encoded by one-hot, and finally spliced into a continuous vector .
[0055] Let be the network input, the number of layers is from l =1 to L, , the input of each layer is , and the output of the layer is .
[0056] 3. Relationship graph Transformers.
[0057] Combine the Transformer attention mechanism to model the influence heterogeneity: (1) The initial feature vector of the corresponding node of the user of the previous layer is linearly transformed for several times to generate a query vector corresponding to the number of attention heads, and another user The initial feature vector of the corresponding node is transformed linearly several times to generate the key vector and the value vector of the corresponding number of attention heads; wherein, for the query vector, the key vector and the value vector of the i-th attention head of the user r and the node i , the formula is as follows: d l r d l r d l r d l r d l r d l r d l r d l r d l r d l Indicates the l -1st level users The feature vector of the corresponding node.
[0058] (2) Calculate the influence weight between nodes: The attention weights between different nodes are calculated by scaling the dot-product attention to model the heterogeneity of influence.
[0059] ; in, Indicates the l Layers and relationships r , No. d Under the attention head, the user The corresponding node to the user The "attention weight" of the corresponding node directly represents the user The corresponding node to the user The influence strength of the corresponding node; represents the hidden layer size of each attention head, Represents a user The corresponding nodes in the relationship r The next set of neighbors.
[0060] (3) Aggregate neighbor information at the head level and merge multiple heads: For each attention head, aggregate the node neighborhood to obtain the relationship r The node representation is optimized through the gating mechanism to ensure learning stability. The formula is as follows: ; in, Indicates the l Layers and relationships r Next User The hidden representation of the corresponding node, Represents the total number of attention heads.
[0061] (4) Gating mechanism: A gating mechanism is applied to the obtained results to ensure smooth representation learning. First, according to the relationship r Users in the current layer The hidden representation of the corresponding node and the previous layer of users The initial features of the corresponding nodes and the calculation of the gating coefficients are related to the following process: ; in, represents the sigmoid activation function, represents the gating coefficient, Indicates in lLayers and relationships r The learnable weight matrix for calculating the gating coefficients is as follows, Indicates in l Layers and relationships r The gating mechanism is then applied to the learned representation by and input , to selectively retain some of the previous layer nodes according to the gating coefficient i Initial features and partial relationships r Nodes in the current layer i The hidden representation of the nodes in the current layer is obtained by fusion. i About relationships r The learning representation of , the corresponding process has the following relationship: ; in, represents the Hadamard product operation, Indicates the l Users in the layer The corresponding nodes are about the relationship r Learning representation.
[0062] 4. Semantic Attention Networks.
[0063] (1) Calculate the semantic score of each relationship (global perspective): After analyzing the heterogeneous information network (HIN) and separating different relationships, a semantic attention network is used to aggregate node representations across relationships while preserving the relationship heterogeneity inherent in the social network. First, a global perspective is used to observe all nodes in the HIN, globally aggregating node representations under different relationships. This approach preserves relationship heterogeneity while assigning dynamic weights to different relationships. By evaluating the importance of each relationship from a global node perspective, the importance of each relationship, or semantic score, is obtained: ; in, Indicates the d The relationship between attention heads r The semantic score of V represents the node set in the heterogeneous information network HIN, yes l Tier d The semantic attention vector of the attention head, and are the learnable weight matrix and bias vector of the semantic attention network.
[0064] (2) Relationship weight obtained by softmax normalization: The importance of each relationship is normalized using softmax, and the formula is: ; wherein, represents the weight of the relationship r , and represents the semantic score of another relationship of the i-th attention head. d
[0065] (3) Cross-relation weighted fusion: Then, the learning representation of the node r about the relationship i is cross-relation weighted fused with the weight of the relationship r to obtain the node representation under different relationships, and the corresponding process has the following relationship: ; wherein, represents the node representation after cross-relation aggregation in the j-th layer, l and represents the learning representation of the node l about the relationship i in the j-th layer. r
[0066] (4) Feature transformation layer (FFN+residual+LayerNorm): After obtaining the cross-relation aggregated , a feed-forward network (FFN) is used for nonlinear transformation, and residual connection and layer normalization (LayerNorm) are added.
[0067] ; wherein, represents the node representation after cross-relation aggregation in the j-th layer, l represents the layer normalization operation, and represents the feed-forward network for nonlinear transformation of the node representation; the node representation after cross-relation aggregation in the next layer is taken as the input of the next layer of graph neural network, and after iteration, the node representation after cross-relation aggregation in the L-th layer is obtained as the user u i Final social structure embedding .
[0068] Step 2: Fuse the language style feature vector, personality feature vector, topic embedding vector, and social structure embedding vector to obtain a multi-dimensional user portrait embedding. As a preferred embodiment of the present invention, the language style feature vector, personality feature vector, topic embedding vector and social structure embedding vector are spliced to obtain a fused feature vector. The corresponding process has the following relationship: ; in, represents the fused feature vector, Represents the social structure embedding vector; The fused feature vectors are projected and dimensionally reduced in sequence to obtain multi-dimensional user profile embedding. The corresponding process has the following relationship: ; in, Indicates the user after splicing Multi-dimensional user portrait embedding.
[0069] Step 3: Using users as nodes and diverse social relationships at different time points as edges, embed the multi-dimensional user portraits into the corresponding user nodes to obtain a continuous time dynamic graph; In social media environments, public opinion elements (such as opinions, stances, and emotions) exhibit dynamic propagation and evolution within networks, characterized by diffusion, decay, and amplification. Traditional static graph methods are unable to depict the relationships between nodes over time, nor can they model the differential impact of multiple relationships (such as reposts, comments, and likes) during the propagation process. Given a multidimensional profile embedding representation of each user and the propagation paths of multiple relationships within the social graph, we construct a model of the temporal relationships and interaction characteristics of nodes in dynamic graph networks, providing an effective time-aware node representation for downstream tasks.
[0070] In this phase, we propose a Dynamic Adaptive Graph Learning (DAGL) model. Taking multidimensional user profile embeddings and multi-relational social communication paths as input, we build dynamic communication modeling capabilities based on the attention mechanism and Transformer. We also introduce Neighbor Co-occurrence Encoding (NCoE) to strengthen source-destination node correlations, while using patching to efficiently capture long-term temporal dependencies. This phase effectively models the evolution of public opinion elements in downstream dynamic link prediction and dynamic node classification.
[0071] The task is defined as: Let the continuous time dynamic graph be G Expressed as: .in, a set of representative nodes (users), t is time, representative of time t a set of edges, R is a set of relationship types (such as forwarding, commenting, liking, etc.), X represent the node multi-dimensional image features obtained in the previous stage.
[0072] Given the interactions t , u , r , v , t before a given time , where r are the source node and the target node, t is the relationship type, and DAGL aims to learn the time-aware representation of the two nodes , which is used for subsequent dynamic link prediction and dynamic node classification.
[0073] Step 4, taking the current node user in the continuous time dynamic graph as the source node, and the node users connected to the current node user as neighbors, using neighbor co-occurrence encoding to encode the continuous time dynamic graph along the time axis, obtaining an encoding sequence; DAGL only uses first-order history and converts the problem into sequence modeling, which will greatly simplify the dependence and facilitate subsequent Transformer encoding.
[0074] ; where, and represent the obtained first-order interaction history sequence of the source node u and the target node v , respectively, and the of the source node is the first-order neighbor domain of the node u , represent the neighbor nodes contacted by the source node u and the target node v in the historical interaction, represents the relationship type interacted with the source node u , represents the relationship type interacted with the target node v , t u , t v represent the time when the interaction corresponding to the source node and the target node occurs.
[0075] Next, each neighbor needs to be encoded in and The frequency of occurrence in the code is encoded to utilize u and v The correlation between u and v Generate 4 coding sequences ( N : Neighborhood feature encoding, E : Link feature coding, T : Time code, C : Neighborhood co-occurrence encoding). Then, each encoded sequence is divided into multiple blocks and all blocks are input into a Transformer to capture long-term temporal dependencies. Finally, the outputs of the Transformer are averaged to obtain the temporal t hour u and v Time-aware representation .
[0076] 3. Methods and steps.
[0077] (1) Basic coding (neighborhood, edge, time): Extract the edges of each node from the continuous-time dynamic graph and arrange them in chronological order to obtain the first-order interaction history sequence between each node and its neighbors; Selecting a source node and a target node from a continuous-time dynamic graph, and extracting a first-order interaction history sequence of the source node and a first-order interaction history sequence of the target node; For each sequence ( ) Extract the neighbor feature matrix and link feature matrix (including relationship type embedding) , represents the dimension of the neighbor feature vector, represents the dimension of the link feature vector, represents the first-order interaction history sequence of node*, Represents a node, , represents the source node, Represents the target node. The time encoding uses the trainable frequency sine and cosine basis pair time interval Δ t = t - t ′ is embedded and a decay factor is introduced to simulate heat decay, with a dimension of d T : ; in, Represents a trainable frequency parameter used to capture periodic patterns in time (such as daily / weekly / monthly level interactions). represents the learnable attenuation coefficient, ; Indicates the time interval, The time interval encoding matrix representing the source or target node is designed to capture periodic time patterns. Indicates the size of the time interval encoding matrix.
[0078] (2) Neighbor Co-Occurrence Coding (NCoE): The core assumption is: if the source node u and target node v There are more common neighbors in the historical sequence of , and the probability of their future interactions is higher. and Each neighbor in the is counted for the number of times it appears in the first-order interaction history sequence of the source node and the first-order interaction history sequence of the target node, forming a two-dimensional feature, that is, the co-occurrence encoding matrix of the source node and the target node: ; in, Represents the source node u In time t The co-occurrence encoding matrix of Indicates the target node v In time t The co-occurrence coding matrix of Indicates the order of interaction time, used to stack the two-dimensional vectors of each neighbor vertically into a matrix; Indicates the number of statistical operations, Represents the source node and target node at time t The first-order interaction history sequence before t Emphasize the "time-aware" property, that is, the sequence contains a deadline t Historical interaction information; Map the co-occurrence coding matrices of the source node and the target node to the vector space and add them together to obtain the neighbor co-occurrence coding. The corresponding process has the following relationship: ; in, and represents the number of occurrences of the same neighbor in the first-order interaction history sequence of the source node or the target node, Represents a mapping operation consisting of two layers of perceptrons plus a ReLU activation function. represents the neighbor co-occurrence encoding matrix of node*, represents the co-occurrence encoding dimension.
[0079] Step 5, the encoding sequence is divided into blocks, and a Transformer encoder is used to capture the temporal dependence between blocks and the potential correlation between nodes, obtaining the time-aware representation of the source node and the target node at the current time; Directly self-attention on the whole interaction sequence will lead to quadratic growth of cost with length. To maintain local temporal proximity while reducing complexity, DAGL divides each encoding into non-overlapping blocks of size P in adjacent time order (zero padding if insufficient), such as dividing the node matrix into blocks, and the block embedding representation is .
[0080] where represents four different feature types, , N represents neighbor features, E link features, T time interval features, C neighbor co-occurrence features; when is variable, adjust P to keep at a constant level to reduce computational cost.
[0081] (4) Dimension alignment and sequence splicing: Align each "block-coded" to a unified dimension d through a linear layer.
[0082] ; where represents the encoding result of one type of feature of the node after dimension alignment, represents the number of patches after block coding of the source node or target node encoding sequence, represents the dimension after alignment, represents the encoding matrix of one type of feature (neighbor, link, time interval, neighbor co-occurrence) of the source node or target node after block coding, represents a trainable linear transformation matrix, represents a bias vector trainable by the linear layer. Splice the four types of aligned encodings to obtain the block-level complete encoding features of the source node or target node at time t , and the corresponding process has the following relationship: ; where represents the block-level complete encoding of the node, represents the node* Neighbor feature encoding, Representation node * Link feature coding, Representation node * The time interval encoding, Representation node * Neighbor co-occurrence encoding.
[0083] (5) Transformer encoder: Next, a Transformer encoder is used to capture the temporal dependencies between these blocks and the potential correlations between nodes, and the block-level complete encoding features of the source and target nodes are concatenated as input to obtain a block-level representation matrix. L The algorithm consists of a stack of layers, each including: Multi-Head Self-Attention (MSA), Feed-Forward Network (FFN), Residual Connection (ResidualConnection), and Layer Normalization (LN). It uses a Pre-LN architecture: Layer Normalization (LN) is applied before entering the MSA and FFN, and then added to the input via a residual connection. The FFN uses a two-layer perceptron structure and uses the GELU (Gaussian Error Linear Unit) activation function in the middle layer, replacing the traditional ReLU, for better performance.
[0084] (6) Time-aware node representation: Now, from the block level H t Back to node-level representation In time t Node Time-aware representation It is through H t The block representation of the relevant nodes in the averaging is obtained, and the corresponding process has the following relationship: ; in, Indicates that the node* is at time t The time-aware representation of Indicates taking Middle b The complete vector of blocks, Represents the set of block indexes associated with a node*, Indicates time t The block-level representation matrix of .
[0085] Step 6, Dynamic link prediction and dynamic node classification are performed using the time-aware representations of the source and target nodes at the current time, and the link evolution trend and observation point probability distribution of future public opinion are predicted.
[0086] The third stage includes two target tasks: dynamic link prediction (predicting future node link evolution) and dynamic node classification (predicting observation point probability distribution over time) 1. Dynamic link prediction (Dynamic Link Prediction).
[0087] Dynamic link prediction aims to determine whether an interaction (link) will form between the source node t and the target node u in the future. Dynamic link prediction includes two settings: v Transductive: The goal is to predict future interactions between nodes that have been seen during training. Inductive: The goal is to predict future interactions between nodes that have not appeared during training.
[0088]
[0089] (1) Node representation acquisition: Through the DAGL model, neighbor co-occurrence encoding (NCoE) and block technology are used to learn time-aware representations from the first-order historical interaction sequence of nodes:
[0090] (2) Connection representation and prediction: The time-aware representations of the source and target nodes at the current time are concatenated and input into the first multi-layer perceptron (MLP), which is responsible for the nonlinear mapping of "features → probabilities" and finally outputs the probability of the existence of a link between the two nodes. The corresponding process has the following relationship: ; where and are the learnable weight matrix and bias of the first multi-layer perceptron, respectively, is the normalized exponential function, and u are the time-aware representations of the source or target nodes, respectively, v is the predicted output and the link existence probability of the and nodes; for the true label, a loss function representing dynamic link prediction, measuring the overall difference between the model prediction and the true label.
[0091] 2 Dynamic Node Classification.
[0092] Dynamic Node Classification aims to predict the attribute / state of a node at a specific time (e.g. emotion category, stance label, etc.).
[0093] (1) Node representation acquisition: Similarly, time-aware representation is obtained through DAGL model: .
[0094] (2) Classification prediction: The time-aware representation of the source node at the previous time is input into the second Multi-Layer Perceptron, and the classification probability distribution is output. The corresponding process is as follows: ; wherein, respectively represent the learnable weight matrix and bias of the second Multi-Layer Perceptron, represents the classification probability distribution of the predicted output source node (i.e. the probability of the classification category of the source node changing over time); (3) Cross-entropy loss is used as the loss function: ; wherein, represents the number of categories, represents the true label vector of the source node, represents the probability value of the s-th category in the classification probability distribution of the predicted output source node.
[0095] Please refer to Figure 4 The embodiment also provides a public opinion evolution prediction system based on multi-dimensional user portrait and adaptive graph fusion, wherein the system applies the public opinion evolution prediction method based on multi-dimensional user portrait and adaptive graph fusion as described above, and the system comprises: a multi-dimensional user portrait construction module, configured to: obtain user information, user post content and user diversified social relationship; perform language style modeling, personality trait modeling and topic feature modeling on the user post content respectively to obtain a language style feature vector, a personality feature vector and a topic embedding vector; perform social structure modeling on the user information, the user post content and the user diversified social relationship to obtain a social structure embedding vector; Fusing the language style feature vector, the personality feature vector, the topic embedding vector and the social structure embedding vector, a multi-dimensional user portrait embedding is obtained; The dynamic graph adaptive learning module is used for: Taking the user as a node of a graph, the diversified social relationship at different time points as an edge, and embedding the multi-dimensional user portrait embedding into the node of the corresponding user, a continuous time dynamic graph is obtained. Taking the current node user in the continuous time dynamic graph as a source node, and the node users connected to the current node user as neighbors, the neighbor co-occurrence coding is used to encode the continuous time dynamic graph along the time axis to obtain an encoding sequence. The encoding sequence is blocked, and a Transformer encoder is used to capture the time dependence between the blocks and the potential correlation between the nodes to obtain a time-aware representation of the source node and the target node at the current time. The public opinion evolution prediction module is used for: Using the time-aware representation of the source node and the target node at the current time for dynamic link prediction and dynamic node classification, respectively, the link evolution trend of the future public opinion and the observation point change probability distribution are obtained.
[0096] In order to make the purpose, technical scheme and advantages of the present application clearer, the closest prior art scheme of the present application ("a information popularity prediction method based on graph neural network", publication number: CN112580878A, hereinafter referred to as "the prior art") will be clearly and completely described below, and experimental comparison will be made.
[0097] The prior art takes "information cascade graph" as the carrier, and represents the propagation state of the social network at different times as a set of isomorphic graphs; the node of each time graph is a user, and the node state indicates whether it has been forwarded. Subsequently, the method extracts and fuses multi-source features in four stages for predicting the propagation path and popularity (edge number): 1. Information cascade graph extraction: on a unified user relationship graph, construct a propagation state matrix according to time, recording whether the user participates in the propagation at the current and previous time.
[0098] 2. User-level graph structure features (GCN): input the cascade graph at each time into the graph convolution network in turn, extract the state features of the node under the graph structure, and alleviate the over-smoothing effect (3-5 layers are recommended).
[0099] 3. Time series features (LSTM): model the structure feature sequence of each user across time with LSTM to form a user representation in the time dimension.
[0100] 4. Graph generation and prediction: Using text topic features (LDA+ngram2vec), user attribute features (such as ID, number of fans, number of posts, mutual relationships, etc.) and the above time series / structure representation, construct any user pair ( u , v ) is used to predict whether there is a propagation edge through multi-layer perceptron and Softmax binary classification, thereby obtaining the predicted cascade adjacency matrix; finally, the number of edges or related metrics are used as the popularity measurement, and the propagation path diagram is output.
[0101] This existing technology explicitly generates a "future communication map" by fusing three types of information: GCN (structure) + LSTM (time) + text / user attributes, taking into account both path-level interpretability and hotspot intensity. The technical goal is highly similar to the "graph structure + time series + multi-source feature unification" of the present invention.
[0102] Key modules and implementation details: 1. Cascade state modeling.
[0103] On the unified user relationship graph G=(V, E), by time t Record the node status (0 / 1) to form a multi-time feature matrix as the input of the subsequent graph / series network.
[0104] Graph Structured Coding (GCN) feeds the graph at each moment into the GCN to obtain the representation of the node after structural transformation, and then stacks and transposes the node representations across moments so that they can be subsequently aggregated into time series by user.
[0105] Temporal encoding (LSTM) inputs the structural vector sequence of a single user at multiple moments into LSTM and outputs a user-level time series vector.
[0106] Text and User Features: The text side uses LDA topics and ngram2vec to obtain topic vectors; the user side uses attributes such as ID, number of followers, number of posts, and mutual connections.
[0107] 2. Graph generation and prediction.
[0108] For any user pair ( u , v ) splicing (time series vector, user attributes, mutual connection indication, topic vector, moment comment volume, etc.) as MLP input to determine whether there is a propagation edge; summarize to obtain the predicted adjacency matrix and propagation path, and output the popularity.
[0109] Experimental data and comparison with existing technologies: To verify the effectiveness and stability of the application in the "dynamic graph-multidimensional image-adaptive mapping" integrated framework for dynamic link prediction tasks, the application carries out a controlled experiment on the Wikipedia dataset. The evaluation follows a uniform and reproducible protocol: 70% / 15% / 15% split of training / validation / test sets in chronological order, and respectively in the direct Seen (seen node) and inductive New (new node) two settings; the link discrimination adopts a multilayer perception machine with two end node representations, and the indicators are AP (average precision) and ROC (receiver operating characteristic curve AUC (area under the curve); the negative sampling adopts the random strategy which is widely used in the industry and standardized in DyGLib; all results are the mean ± standard deviation of 5 different random seed runs, and the uniform training pipeline, early stopping and benchmark method of hyperparameter grid search are used to ensure comparability and reproducibility.
[0110] Under the above consistent protocol, the embodiment of the application captures the correlation and long-time dependence of the source / target node by neighbor co-occurrence encoding and patching technology, which completely matches the technical orientation of the application for "structure-time-semantic" coupling modeling. The experimental results are as shown in Table 1.
[0111] Table 1 Experimental results.
[0112] From the perspective of statistical fluctuations, the standard deviations of the above four settings are all within 3-4x10 -4 orders of magnitude, showing that the training process is stable and the variance is minimal, meeting the requirements of patent comparison experiments for repeatability and reliability.
[0113] Compared with the prior art (the closest prior art, publication number: CN112580878A), the prior art adopts "GCN (structure) + LSTM (time)" and fuses theme / user attributes, and outputs the path and popularity based on the predicted concatenated adjacency matrix, which is similar to the technical target of the application in the aspects of "structure-time-semantic" fusion and interpretable propagation. However, the published text does not disclose the directly comparable AP / AUC values on the Wikipedia dynamic link prediction benchmark.
[0114] To ensure the objectivity and comparability of the comparison, the application introduces the strong baseline recognized in the field and takes the same data set and the same negative sampling of the direct induction setting as the unified reference system: on Wikipedia (transductive, rnd), the classic strong baseline CAWN and TGN generally set AP to 98.76%±0.03% and 98.45%±0.06%, respectively. In contrast, the embodiments of the application have a test set direct induction AP of 99.02%±0.02% under the same protocol and implementation caliber, which is 0.26 and 0.57 percentage points higher than CAWN and TGN, respectively, reflecting the substantial performance advantage under the unified evaluation system.
[0115] Under the unified standard of data splitting, index caliber and training pipeline, the embodiments of the application achieve near-saturated AP / AUC and extremely low variance in the Wikipedia dynamic link prediction task, and have stable and statistically significant advantages over the directly comparable strong baseline.
[0116] Compared with the most similar prior art (CN112580878A), the application forms differentiated technical effects in the aspects of "long-time dependence capture node", "explicit modeling of relevance" and "consistency of evaluation protocol": On the one hand, through neighbor co-occurrence and block mechanism, the model supported by the application can utilize longer history without reducing computational complexity, which directly maps to higher AP / AUC of dynamic link prediction. On the other hand, the unified evaluation protocol of DyGLib ensures reproducibility and comparability across methods.
[0117] Accordingly, it can be concluded that the application achieves significant progress in both performance and engineering usability compared to the most similar scheme.
[0118] The above-described embodiments only express several embodiments of the application, and the description is more specific and detailed, but it should not be understood as limiting the scope of the patent of the application. It should be noted that for ordinary skilled in the art, without departing from the concept of the application, a number of modifications and improvements can be made, which are within the scope of protection of the application. Therefore, the protection scope of the patent of the application should be subject to the appended claims.
Claims
1. A method for public opinion evolution prediction based on multi-dimensional user portrait and adaptive graph fusion, characterized in that, The method comprises the following steps: Step 1, obtaining user information, user post content and user diversified social relationship; using the user post content to perform language style modeling, personality trait modeling and topic feature modeling respectively to obtain a language style feature vector, a personality feature vector and a topic embedding vector; Performing social structure modeling on the user information, the user post content and the user diversified social relationship to obtain a social structure embedding vector; Step 2, fusing the language style feature vector, the personality feature vector, the topic embedding vector and the social structure embedding vector to obtain a multi-dimensional user portrait embedding; Step 3, taking a user as a node of a graph, diversified social relationship at different time points as edges, and embedding the multi-dimensional user portrait embedding into the node of the corresponding user to obtain a continuous time dynamic graph; Step 4, taking a current node user in the continuous time dynamic graph as a source node, and a node user connected to the current node user as a neighbor, and using neighbor co-occurrence coding to encode the continuous time dynamic graph along a time axis to obtain an encoding sequence; Step 5, blocking the encoding sequence, and using a Transformer encoder to capture the time dependence between the blocks and the potential correlation between the nodes to obtain a time-aware representation of the source node and a target node at the current time; Step 6, using the time-aware representation of the source node and the target node at the current time to perform dynamic link prediction and dynamic node classification respectively to obtain a link evolution trend of future public opinion and an observation point change probability distribution.
2. The public opinion evolution prediction method of multi-dimensional user portrait and adaptive graph fusion according to claim 1, characterized in that, In the step 1, the method for obtaining the language style feature vector by using the user post content to perform language style modeling comprises the following steps: The selection rule is set to be that a user is selected only once in a single batch, and does not appear repeatedly in the same batch as multiple independent users; Obtain training data, according to the selection rule, group the training data by users, each batch contains k different users, randomly select l texts for each user to form a batch with a size of . The training number is input into a pre-trained RoBERTa-large encoder to obtain initial token-level embeddings of different users; all initial token-level embeddings are subjected to average pooling operation to obtain text-level semantic embeddings of different users, and the corresponding process has the following relationship: ; wherein, representing a user text-level semantic embeddings of the gth text, representing a user the gth text posted on a social media platform, representing a pre-trained RoBERTa-large encoder, representing the gth token; The text-level semantic embeddings of different users are converted into low-dimensional embeddings through a projection layer; The low-dimensional embeddings are subjected to L2 normalization to obtain normalized low-dimensional embeddings, and the corresponding process has the following relationship: ; wherein, denotes the normalized low-dimensional embedding, denotes the low-dimensional embedding, denotes the L2 norm; Taking the normalized low-dimensional embeddings as samples, using label information, taking samples of the same category as positive examples and samples of different categories as negative examples, constructing a supervised contrast loss function through the low-dimensional embeddings, and the corresponding process has the following relationship: ; wherein, represents a supervision contrast loss function, represents an index set of all texts in a batch; represents other samples belonging to the same user as the text , and does not include the text itself; represents the number of positive examples; represents a set of all samples in a batch except the text itself; represents a temperature parameter for adjusting the steepness of the similarity distribution; represents sample embeddings belonging to the same user as the text , The similarity of the sample embeddings is measured by the dot product operation. represents all sample embeddings belonging to the same user as the text , The similarity of the sample embeddings is measured by the dot product operation. represents a transpose operation; The pre-trained RoBERTa-large encoder is optimized by minimizing the supervised contrast loss function, and after the optimization is completed, an optimized RoBERTa-large encoder is obtained; presenting a user The gth text input posted on a social media platform is input into an optimized RoBERTa-large encoder to obtain a text-level semantic embedding after supervised contrastive learning. All text-level semantic embeddings of the current user after the supervised contrast learning are subjected to adaptive weighted aggregation to learn the relative contribution of different texts to the style representation of the user to obtain a contribution weight of the text to the writing style of the user, and the corresponding process has the following relationship: ; wherein, denotes the contribution weight of the text to the user writing style, and satisfies ; denotes the user the text-level semantic embedding of the g-th text after supervised contrastive learning; denotes the text-level semantic embedding after supervised contrastive learning, which is different from ; denotes the attention context vector, which is used to evaluate the importance of each text; and denote the learnable weight and bias of the attention layer, respectively; The text-level semantic embedding after supervised contrast learning is weighted and summed by using the contribution weight of the text to the user writing style to obtain the language style representation of the current user, and the corresponding process has the following relationship: ; wherein, represents a language style feature vector of the user , represents a number of texts posted by the user on a social media platform.
3. The public opinion evolution prediction method of multi-dimensional user portrait and adaptive graph fusion according to claim 2, characterized in that, In the step 1, the method for obtaining the personality feature vector by modeling the personality traits by using the post content of the user comprises the following steps: presenting the user The gth text input posted on the social media platform is input to the psychological language feature extractor to obtain a plurality of psychological language features, and the corresponding process has the following relationship: ; wherein, represents a psycholinguistic feature extraction function, represents a psycholinguistic feature extraction function, represents a psycholinguistic feature extraction function, n represents a psycholinguistic feature extraction function, represents a psycholinguistic feature extraction function, represents a psycholinguistic feature extraction function, computing an average vector value of the several psycholinguistic feature vectors, obtaining a user overall psycholinguistic feature, the corresponding process has the following relationship: ; wherein, represents the overall psycholinguistic features of the user , represents the psycholinguistic features of the gth text published by the user ; The user The psycholinguistic features of are linearly projected to generate queries and keys, and the text-level semantic embedding is linearly projected to generate values. The corresponding process has the following relationship: ; wherein, query, key and value, respectively; query, key and value, respectively; The dot product attention calculation is performed on the query and the key to obtain the attention weight, and the corresponding process has the following relationship: ; wherein, denotes an attention weight, denotes a dimension of the key; The value is weighted and summed by using the attention weight to obtain the personality representation, and the corresponding process has the following relationship: ; wherein, represents a personality representation; The personality representation is reduced in dimension by using a linear layer, and is spliced with the overall psychological language features of the user to obtain a personality feature vector. A corresponding process exists in the following relationship: ; wherein, represents a personality feature vector of a user, represents a concatenation operation, represents a linear layer. 4. The public opinion evolution prediction method of multi-dimensional user portrait and adaptive graph fusion according to claim 3, characterized in that, In the step 1, the method for obtaining the topic embedding vector by modeling the topic features by using the post content of the user comprises the following steps: The text-level semantic embedding is mapped from a high-dimensional space to a low-dimensional space by using UMAP to obtain the reduced vector; The reduced vector is clustered by using HDBSCAN to obtain the topic number corresponding to the reduced vector; According to the correspondence between the reduced vector and the topic number, all the texts in each topic are merged into a class document, and the TF-IDF weight of each word in the class document is calculated by using TF-IDF to realize the extraction of the in-class key words, and the c-TF-IDF score of each word is obtained, and the corresponding process has the following relationship: ; in, represents the c-TF-IDF score of the word, Expressive words w On the topic k The frequency of occurrence in the document, Expressive words w On the topic The frequency of occurrence in the document, Indicates the subject k The total number of words contained, Indicates the subject The total number of words contained; K Indicates the number of clusters, where each cluster corresponds to a topic; Statistical users The topic distribution of all texts of the user is normalized to obtain the relative proportion of the topic in the user, and the corresponding process has the following relationship: ; wherein, representing the topic k in the user 's relative proportion, representing the number of the topic in the user k 's text, representing the number of the topic in the user 's text, representing the number of the topic; The c-TF-IDF scores of all the words of the current topic constitute a topic vector of the current topic The topic vector of the current topic is reduced in dimension by using Truncated SVD, and then vector aggregation is performed to obtain a topic embedding vector, and the corresponding process has the following relationship: ; wherein, representing a user topic embedding vector, representing a topic vector dense vector after Truncated SVD dimensionality reduction.
5. The public opinion evolution prediction method of multi-dimensional user portrait and adaptive graph fusion according to claim 4, characterized in that, In the step 1, the method for obtaining the social structure embedding vector by modeling the social structure by using the user information, the post content of the user and the diversified social relationship of the user comprises the following steps: The average vector value of the text-level semantic embedding is calculated to obtain the text semantic representation of the user; The user static attribute features are extracted from the user information, the user is taken as a node, the diversified social relationship is taken as an edge, and the text semantic representation of the user and the user static attribute features are spliced and embedded into the node of the corresponding user to obtain a heterogeneous information network; The text semantic representation of the user and the user static attribute features in the heterogeneous information network are converted into the initial feature vector in the graph neural network by using the full connection layer, and the corresponding process has the following relationship: ; wherein, represents the text semantic representation of a user , represents the number of posts of a user, represents the static attribute features of a user, represents the initial features of a user by concatenating the static attribute and the text semantic of the user, represents a leaky-relu activation function; represents a learnable parameter matrix for mapping the vector of the text semantic features and the static attribute features of a user to an initial feature space of a graph neural network; represents a learnable bias vector for shifting the linear transformation result; represents the initial feature vector of a user after transformation, which is used as the input of the graph neural network; The user of the last layer is taken as an example The initial feature vector of the corresponding node is subjected to linear transformation for several times to generate a query vector corresponding to the number of attention heads, and another user of the last layer is taken as an example The initial feature vector of the corresponding node is subjected to linear transformation for several times to generate a key vector and a value vector corresponding to the number of attention heads; wherein the calculation processes of the query vector, the key vector and the value vector of the first d attention head exist the following relationship: ; in, Indicates in l Layers and relationships r , No. d Under the attention head, the user The query vector of the corresponding node; Indicates in l Layers and relationships r , No. d Under the attention head, the user The key vector of the corresponding node; Indicates in l Layers and relationships r , No. d Under the attention head, the user The value vector of the corresponding node; Indicates the use to generate l Layers and relationships r , No. d The learnable linear transformation matrix of the attention head query vector, Indicates the use to generate l Layers and relationships r , No. d The learnable linear transformation matrix of the attention head key vectors, Indicates the use to generate l Layers and relationships r , No. d The learnable linear transformation matrix of the attention head value vector, Indicates the generation of l Layers and relationships r , No. d The bias when the attention head queries the vector, Indicates the generation of l Layers and relationships r , No. d The bias when the attention head key vector is Indicates the generation of l Layers and relationships r , No. d The bias when the attention head value vector is Representing the graph neural network l -1st level users The corresponding node's feature vector, Indicates the l -1st level users The corresponding node's feature vector; The attention weights between different nodes are calculated by scaling dot-product attention, the heterogeneity of influence is modeled, and the attention weights between nodes i and j are obtained The corresponding process has the following relationship: ; wherein, denotes the l layer, the r relationship d under the corresponding node pair "attention weight" of the corresponding node pair corresponding node pair; denotes the hidden layer size of each attention head, denotes the neighbor set of the corresponding node pair under the r relationship For each attention head aggregation node neighborhood, to obtain the relationship r of the node representation, the corresponding process exists the following relationship: ; wherein, represents the l layer, relationship r lower user hidden representation of the corresponding node, represents the total number of attention heads; According to the relationship r The user in the current layer The hidden representation of the corresponding node and the user in the previous layer The initial feature of the corresponding node, the gating coefficient is calculated, and the corresponding process has the following relationship: ; wherein, denotes a sigmoid activation function, denotes a gating coefficient, denotes a learnable weight matrix for computing the gating coefficient at the l layer, relationship r denotes a learnable bias vector for computing the gating coefficient at the layer, relationship l denotes a learnable bias vector for computing the gating coefficient at the r layer, relationship According to the gating coefficient, some nodes in the previous layer are selectively retained i Initial features and partial relationships r Nodes in the current layer i The hidden representation of the nodes in the current layer is obtained by fusion. i About relationships r The learning representation of , the corresponding process has the following relationship: ; wherein, denotes a Hadamard product operation, denotes the l user's learning representation in the corresponding node with respect to the relationship r 's learning representation; The nodes in the current layer are updated as follows i Regarding the relationship r The learning representation adopts a semantic attention network to aggregate node representations across relationships, obtaining semantic scores for each relationship. The corresponding process has the following relationship: ; wherein, represents the semantic score of the relationship of the d th attention head, r V represents a set of nodes in a heterogeneous information network (HIN), is a semantic attention vector of the l th attention head in the d th layer, and is a learnable weight matrix and a bias vector of the semantic attention network; The semantic scores of each relationship are normalized to obtain the weight of each relationship, and the corresponding process has the following relationship: ; wherein, a weight of the relationship, r denotes a semantic score of another relationship of the d th attention head. Utilize the weight of the relationship r of the current layer i The learning representation of the relationship r is cross-relationally weighted and fused, and the node representation under different relationships is obtained. The corresponding process has the following relationship: ; wherein, represents the l layer after the represents the l layer after the i about the relationship r learning representation; The first l The node representation after cross-relation aggregation is sent to the feedforward network for nonlinear transformation, and then residual connection and layer normalization are performed in sequence to obtain the node representation after cross-relation aggregation of the next layer. The corresponding process has the following relationship: ; wherein, represents the i-th layer of the neural network, l represents the aggregated node representation of the i-th layer, represents a layer normalization operation; represents a feed-forward network for performing a non-linear transformation on the node representation; The node representation after the cross-relationship aggregation of the next layer is taken as the input of the next layer of the graph neural network for iteration, and after the iteration is completed, the social structure embedding vector is obtained.
6. The public opinion evolution prediction method of multi-dimensional user portrait and adaptive graph fusion according to claim 5, characterized in that, In the step 2, the method for obtaining the multi-dimensional user portrait embedding by fusing the language style feature vector, the personality feature vector, the topic embedding vector and the social structure embedding vector comprises the following steps: The language style feature vector, the personality feature vector, the topic embedding vector and the social structure embedding vector are spliced to obtain the fused feature vector, and the corresponding process has the following relationship: ; wherein, represents the fused feature vector, represents the social structure embedding vector; The fused feature vector is projected and dimensionally reduced in sequence to obtain the multi-dimensional user portrait embedding, and the corresponding process has the following relationship: ; wherein, representing stitched users Multi-dimensional user profile embeddings.
7. The public opinion evolution prediction method of multi-dimensional user portrait and adaptive graph fusion according to claim 6, characterized in that, In the step 4, the current node user in the continuous time dynamic graph is taken as a source node, the node user connected to the current node user is taken as a neighbor, and the neighbor co-occurrence encoding is used to encode the continuous time dynamic graph along the time axis to obtain an encoding sequence. An edge of each node is extracted from the continuous time dynamic graph and arranged in time sequence to obtain a first-order interaction history sequence of each node and a neighbor; A source node and a target node are selected from the continuous time dynamic graph, and a first-order interaction history sequence of the source node and a first-order interaction history sequence of the target node are extracted; A neighbor feature encoding matrix and a link feature encoding matrix are extracted from the first-order interaction history sequence of the source node and the first-order interaction history sequence of the target node; The time intervals in the first-order interaction history sequence of the source node and the first-order interaction history sequence of the target node are encoded to obtain a time interval encoding matrix, and the corresponding process has the following relationship: ; wherein, denotes a trainable frequency parameter, denotes a learnable decay coefficient, , denotes a time interval encoding matrix of a source node or a target node, denotes a time interval, denotes a size of a time interval encoding matrix; The number of occurrences of the same neighbor in the first-order interaction history sequence of the source node and the first-order interaction history sequence of the target node is counted to obtain a co-occurrence encoding matrix of the source node and the target node, and the corresponding process has the following relationship: ; wherein, denotes a source node u at time t a co-occurrence encoding matrix, denotes a target node v at time t a co-occurrence encoding matrix; denotes a longitudinal stacking of the two-dimensional vector of each neighbor into a matrix in the order of interaction time; denotes a statistical count operation, denotes the neighbor nodes u contacted by the source node v and the target node respectively in the history interactions, t denotes the first-order interaction history sequence of the source node and the target node respectively before time The co-occurrence encoding matrix of the source node and the target node is mapped to a vector space and added to obtain a neighbor co-occurrence encoding, and the corresponding process has the following relationship: ; wherein, with denotes the number of occurrences of the same neighbor in the first-order interaction history sequence of the source node or the target node, respectively, denotes a mapping operation consisting of a two-layer perceptron plus a ReLU activation function, denotes the co-occurrence encoding matrix of the neighbors of node *, denotes the first-order interaction history sequence of node *, denotes the co-occurrence encoding dimension, denotes a node, , denotes the source node, denotes the target node.
8. The public opinion evolution prediction method of multi-dimensional user portrait and adaptive graph fusion according to claim 7, characterized in that, In the step 5, the encoding sequence is divided into blocks, and a Transformer encoder is used to capture the time dependence between the blocks and the potential correlation between the nodes to obtain a time-aware representation of the source node and the target node at the current time, and the method specifically includes the following steps: The time interval encoding matrix, the neighbor co-occurrence encoding matrix, the neighbor feature encoding matrix, and the link feature encoding matrix are divided into a plurality of non-overlapping blocks of size P in chronological order. All non-overlapping blocks are dimensionally aligned through a linear layer to obtain an aligned encoding result, and the corresponding process has the following relationship: ; wherein, represents the encoding result of one type of features of the node after dimension alignment, represents four different types of features, ; wherein, N represents neighbor features, E represents link features, T represents time interval features, C represents neighbor co-occurrence features; represents the number of patches after blocking of the encoding sequence of the source node or the target node, represents the aligned dimension, represents the encoding matrix of one type of features of the source node or the target node after blocking, represents a linearly trainable linear transformation matrix of the linear layer, represents a linearly trainable bias vector of the linear layer; The aligned four types of encoding are spliced to obtain the complete encoding features of the source node or the target node at the time t block level, and the corresponding process has the following relationship: ; in, represents the complete block-level encoding of a node*. Representation node * Neighbor feature encoding, Representation node * Link feature coding, Representation node * The time interval encoding, Representation node * Neighbor co-occurrence coding; The block-level complete encoding features of the source node and the target node are spliced and input into the Transformer encoder to capture the time dependence between the blocks and the potential correlation between the nodes to obtain a block-level representation matrix; The node-related block-level representation in the block-level representation matrix at the current time is taken and averaged to obtain a time-aware representation of the node at the current time, and the corresponding process has the following relationship: ; in, Indicates that the node* is at time t The time-aware representation of Indicates taking Middle b The complete vector of blocks, Represents the set of block indexes associated with a node*, Indicates time t The block-level representation matrix of .
9. The public opinion evolution prediction method of multi-dimensional user portrait and adaptive graph fusion according to claim 8, characterized in that, In the step 6, the time-aware representation of the source node and the target node at the current time is used for dynamic link prediction and dynamic node classification, respectively, to obtain a link evolution trend of future public opinion and an observation point change probability distribution, and the method specifically includes the following steps: The time-aware representation of the source node and the target node at the current time is spliced and input into a first multilayer perceptron, and the probability of the existence of the link between the two nodes is finally output, and the corresponding process has the following relationship: ; wherein, respectively represent a learnable weight matrix and a bias of the first multi-layer perceptron, represents a normalized exponential function, respectively represent a time-aware representation of a source node or a target node, represents a predicted output of the first multi-layer perceptron, u and v a link existence probability of a node; The time-aware representation of the source node at the current time is input into a second multilayer perceptron, and a classification probability distribution is output, and the corresponding process has the following relationship: ; wherein, respectively represent a learnable weight matrix and a bias of the second multi-layer perceptron, represents a predicted output source node changing over time classification class probability, represents a probability value of the s-th class in the classification probability distribution of the predicted output source node.
10. An opinion evolution prediction system of multi-dimensional user portrait and adaptive graph fusion, characterized in that, The system applies the multi-dimensional user portrait and adaptive graph fusion public opinion evolution prediction method of any one of claims 1 to 9, and the system comprises: A multi-dimensional user portrait construction module is configured to: Obtaining user information, user post content, and user diversified social relations; using the user post content to perform language style modeling, personality trait modeling, and topic feature modeling, respectively, to obtain a language style feature vector, a personality feature vector, and a topic embedding vector; Performing social structure modeling using the user information, the user post content, and the user diversified social relations to obtain a social structure embedding vector; Fusing the language style feature vector, the personality feature vector, the topic embedding vector, and the social structure embedding vector to obtain a multi-dimensional user portrait embedding; A dynamic graph adaptive learning module, configured to: Take a user as a node of a graph, diversified social relations at different time points as edges, and embed the multi-dimensional user portrait embedding into the node of the corresponding user to obtain a continuous-time dynamic graph; Take a current node user in the continuous-time dynamic graph as a source node, and a node user connected to the current node user as a neighbor, encode the continuous-time dynamic graph along a time axis using neighbor co-occurrence encoding to obtain an encoding sequence; Block the encoding sequence, and use a Transformer encoder to capture time dependency between the blocks and potential relevance between the nodes to obtain a time-aware representation of the source node and a target node at a current time; An opinion evolution prediction module, configured to: Perform dynamic link prediction and dynamic node classification using the time-aware representation of the source node and the target node at the current time to obtain a link evolution trend of a future opinion and an observation point change probability distribution, respectively.
Citation Information
Patent Citations
Information popularity prediction method based on graph neural network
CN112580878A
Network public opinion text classification method based on social network and public opinion theme
CN118377907A
Multi-dimensional feature fusion network spoofing detection method based on attention mechanism
CN118965248A
Generative AI emotion propagation prediction and guidance large model construction method and system
CN119047512A
Exhibition first push item optimization method combining user portrait and user positioning
CN120067459A
Cited By
Automatic story generation method and system based on user portrait
CN121188222A
Network public opinion analysis and prediction method and system based on space-time diagram neural network
CN122064875A