A Method and System for Predicting Public Opinion Evolution by Fusion of Multi-Dimensional User Profiles and Adaptive Graphs

By fusing multi-dimensional user profiles with adaptive graphs, this method solves the problem of multi-dimensional user attribute and dynamic time-series modeling in predicting the evolution of online public opinion, achieving high-precision public opinion prediction and visualization, and supporting public opinion situation awareness and early risk assessment.

CN120832645BActive Publication Date: 2025-12-02豫章师范学院
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511340922.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-19
Publication Date
2025-12-02
Estimated Expiration
2045-09-19

AI Technical Summary

Technical Problem

Existing technologies struggle to integrate multi-dimensional user attributes and dynamic time-series modeling in predicting the evolution of online public opinion. This results in limited expressive power and a difficulty in balancing efficiency and accuracy in long-term time-series modeling, making it impossible to effectively characterize the user-public opinion interaction system and affecting the accuracy and efficiency of public opinion prediction.

Method used

By employing a multi-dimensional user profile and adaptive graph fusion approach, and combining language style modeling, personality trait modeling, topic feature modeling, and social structure modeling with Transformer encoder and neighbor co-occurrence encoding, a dynamic adaptive graph learning model is constructed to achieve a unified representation of user features and high-precision prediction of public opinion evolution.

Benefits of technology

It achieves accurate representation of individual user characteristics and behavioral patterns, improves the prediction accuracy and interpretability in the process of public opinion dissemination, reveals the evolution trend of key dissemination nodes and public opinion links, and supports public opinion situation awareness and early risk assessment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120832645B_ABST
    Figure CN120832645B_ABST
Patent Text Reader

Abstract

This invention proposes a method and system for predicting public opinion evolution by fusing multi-dimensional user profiles with adaptive graphs. It characterizes users' multi-dimensional individual features by uniformly modeling their language style, personality traits, social structure, and topic preferences. Then, using multi-dimensional user vectors and multi-relational social propagation paths as input, and combining neighbor co-occurrence encoding and block segmentation techniques, it obtains time-aware node representations through Transformer and attention mechanisms, achieving dynamic adaptive learning and modeling of public opinion elements. Finally, based on the aforementioned time-aware representations, it completes dynamic link prediction and dynamic node classification, and outputs visualized results. This invention effectively overcomes the limitations of traditional static modeling through multi-dimensional feature fusion, dynamic graph structure learning, and time-series prediction, improving the accuracy and interpretability of public opinion evolution prediction. It has strong technological innovation and application value and can be used for public opinion monitoring, event prediction, and public opinion evolution and risk warning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of network public opinion evolution technology, and in particular to a method and system for predicting public opinion evolution by fusing multi-dimensional user profiles and adaptive graphs. Background Technology

[0002] Online public opinion refers to the clash of viewpoints, aggregation of attitudes, behaviors, and emotional expressions of individual netizens or groups regarding social events in cyberspace. With the rapid development of social media technology, platforms such as Weibo have become important channels for public information exchange and opinion expression. The generation, fermentation, dissemination, and outbreak of online public opinion exhibit diverse and dynamic characteristics. On the one hand, public opinion events are often accompanied by the rapid spread of different themes, emotions, and attitudes, exacerbating social uncertainty. On the other hand, the diverse and complex public opinion field on social platforms such as Weibo poses greater challenges to public governance and public opinion control. The evolution of online public opinion may trigger social risks, relate to the ideological orientation of cyberspace, and affect social stability and national security. Therefore, how to build an efficient public opinion monitoring and early warning mechanism to promptly grasp the full picture of public opinion evolution has become an important issue in information governance and public opinion prevention and control.

[0003] While current academic research on public opinion focuses on topics such as theme mining, sentiment classification, and user behavior analysis, and the results have been initially applied to basic public opinion perception scenarios, there are still two major technical bottlenecks for predicting complex and dynamic public opinion evolution: First, the expressive power is limited. Existing methods mostly rely on single-dimensional features such as text semantics or basic user behavior to construct model inputs, failing to integrate multi-dimensional attribute relationships such as user static attributes, dynamic behavioral preferences, and deep attitude characteristics. They also cannot take into account the semantic complexity and dissemination relevance of public opinion content, making it difficult to comprehensively depict the "user-public opinion" interaction system and provide sufficient information support for prediction. Second, it is difficult to balance efficiency and accuracy in long-term time-series modeling. Mainstream methods either ignore the dynamic evolution of user relationships based on static graphs or use simple time-series splicing and shallow time-series models without distinguishing the differences between multiple user interaction behaviors such as "forwarding" and "commenting." In long-term time-series scenarios, the accuracy is prone to decline due to the loss of dynamic information and the blurring of interaction differences. Forcibly increasing the modeling granularity will cause a surge in computational complexity and low efficiency. In summary, the shortcomings of existing technologies in multi-dimensional feature fusion and dynamic time series modeling make them difficult to adapt to the complex needs of public opinion evolution prediction, and innovative modeling methods are urgently needed to break through the bottleneck. Summary of the Invention

[0004] In view of the above situation, the main objective of this invention is to propose a method and system for predicting public opinion evolution by fusing multi-dimensional user profiles and adaptive graphs, so as to solve the above-mentioned technical problems.

[0005] This invention proposes a method for predicting public opinion evolution by fusing multi-dimensional user profiles with adaptive graphs. The method includes the following steps:

[0006] Step 1: Obtain user information, user post content, and diverse social relationships; use user post content to perform language style modeling, personality trait modeling, and topic feature modeling to obtain language style feature vectors, personality feature vectors, and topic embedding vectors, respectively.

[0007] Social structure modeling is performed using user information, user post content, and diverse user social relationships to obtain social structure embedding vectors;

[0008] 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 profile embedding.

[0009] Step 3: Using users as nodes in the graph, diverse social relationships at different points in time as edges, and embedding multi-dimensional user profiles into the nodes of the corresponding users, a continuous time dynamic graph is obtained.

[0010] Step 4: Using 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, the continuous-time dynamic graph is encoded along the time axis using neighbor co-occurrence coding to obtain the encoded sequence;

[0011] Step 5: Divide the encoded sequence into blocks and use a Transformer encoder to capture the temporal dependencies between blocks and the potential correlations between nodes to obtain the temporal-aware representations of the source and target nodes at the current time.

[0012] Step 6: Utilize the time-aware representations of the source and target nodes at the current time to perform dynamic link prediction and dynamic node classification, respectively, to obtain the future trend of public opinion link evolution and the probability distribution of changes in observation points.

[0013] This invention also proposes a public opinion evolution prediction system based on the fusion of multi-dimensional user profiles and adaptive graphs. The system applies the aforementioned method for predicting public opinion evolution based on the fusion of multi-dimensional user profiles and adaptive graphs. The system includes:

[0014] The multi-dimensional user profile building module is used for:

[0015] Acquire user information, user post content, and diverse user social relationships; utilize user post content to perform language style modeling, personality trait modeling, and topic feature modeling to obtain language style feature vectors, personality feature vectors, and topic embedding vectors, respectively;

[0016] Social structure modeling is performed using user information, user post content, and diverse user social relationships to obtain social structure embedding vectors;

[0017] By fusing language style feature vectors, personality feature vectors, topic embedding vectors, and social structure embedding vectors, a multi-dimensional user profile embedding is obtained.

[0018] The dynamic graph adaptive learning module is used for:

[0019] Using users as nodes in the graph, diverse social relationships at different points in time as edges, and embedding multi-dimensional user profiles into the nodes of the corresponding users, a continuous time dynamic graph is obtained.

[0020] Using 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, the continuous-time dynamic graph is encoded along the time axis using neighbor co-occurrence coding to obtain the encoded sequence;

[0021] The encoded sequence is divided into blocks, and a Transformer encoder is used to capture the temporal dependencies between blocks and the potential correlations between nodes, so as to obtain the temporal-aware representation of the source node and the target node at the current time.

[0022] The public opinion evolution prediction module is used for:

[0023] By utilizing the time-aware representations of the source and target nodes at the current time, dynamic link prediction and dynamic node classification are performed respectively, resulting in the future trend of public opinion link evolution and the probability distribution of changes in observation points.

[0024] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0025] 1. Unified Multidimensional User Profile: This innovative approach unifies the modeling of user static attributes, textual semantic features, personality traits, and multi-relationship social structure features. Supervised contrastive learning is used to obtain language style embeddings, and topic modeling techniques using Transformer and c-TF-IDF are employed to accurately extract user semantics and topic distribution. Simultaneously, a heterogeneous graph encompassing multiple relationships such as following, forwarding, and commenting is constructed, and graph representation learning and attention mechanisms are used to generate social structure feature representations. Compared to the singularity of existing methods, this approach comprehensively and accurately captures the subject-specific differences in public opinion dissemination, precisely representing individual user characteristics and behavioral patterns.

[0026] 2. Dynamic Adaptive Graph Learning Mechanism: This invention breaks through the limitations of traditional static graphs and proposes a dynamic graph modeling method based on attention mechanisms and Transformers. The system uses multi-dimensional user embeddings and multi-relationship propagation paths as input, introduces Neighbor Co-occurrence Encoding (NCoE) to strengthen the correlation between source and target nodes, and efficiently models long-term temporal dependencies through a patching mechanism, achieving dynamic adaptive learning of node relationships and network structure during public opinion propagation. This mechanism can not only distinguish the different impacts of various interaction relationships such as forwarding, commenting, and liking, but also effectively capture the temporal patterns of public opinion evolution, improving prediction accuracy and interpretability, and successfully solving the problem of balancing efficiency and accuracy in long-term temporal modeling.

[0027] 3. Technological Innovation and Application Value: Through multi-dimensional feature fusion and dynamic graph structure learning, this invention achieves high-precision prediction and visualization of public opinion evolution, revealing key dissemination nodes, the evolution trend of public opinion links, and potential risk points. This system can be widely applied to social media public opinion monitoring, emergency warning, and public opinion guidance, effectively supporting practical needs such as public opinion situation awareness and early risk assessment, thus providing a scientific basis for decision-making.

[0028] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by means of embodiments of the invention. Attached Figure Description

[0029] Figure 1 This is a flowchart of the public opinion evolution prediction method based on the fusion of multi-dimensional user profiles and adaptive graphs proposed in this invention;

[0030] Figure 2 This is a diagram illustrating the multi-dimensional user profile feature extraction process proposed in this invention.

[0031] Figure 3 This is the dynamic adaptive learning modeling diagram proposed in this invention;

[0032] Figure 4 This is a schematic diagram of the structure of the public opinion evolution prediction system that integrates multi-dimensional user profiles and adaptive graphs proposed in this invention. Detailed Implementation

[0033] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0034] These and other aspects of the embodiments of the present invention will become clear from the following description and accompanying drawings. In these descriptions and drawings, some specific embodiments of the present invention are specifically disclosed to illustrate some ways of implementing the principles of the embodiments of the present invention; however, it should be understood that the scope of the embodiments of the present invention is not limited thereto.

[0035] Please see Figures 1 to 3 This embodiment provides a method for predicting public opinion evolution by fusing multi-dimensional user profiles with adaptive graphs. The method includes the following steps:

[0036] Step 1: Obtain user information, user post content, and diverse social relationships; use user post content to perform language style modeling, personality trait modeling, and topic feature modeling to obtain language style feature vectors, personality feature vectors, and topic embedding vectors, respectively.

[0037] Social structure modeling is performed using user information, user post content, and diverse user social relationships to obtain social structure embedding vectors;

[0038] This is because supervised contrastive learning methods are used to construct embedding spaces that can distinguish the writing styles of different users. In the process of language style modeling, we define: given a user... u i Collection of texts published on social media platforms , Indicates user The goal is to extract the language style representation vector of the nth text published on a social media platform using a language style modeling method. .

[0039] The specific details regarding language style modeling in step 1 are as follows:

[0040] 1. Text encoding and embedding.

[0041] Given user u i The first post on social media platforms g Article text ,in For the first token, a pre-trained RoBERTa-large encoder is used as the base encoder to convert it into an initial token-level embedding. Then, mean pooling is used to obtain a text-level semantic embedding. This step leverages the semantic understanding capabilities of the pre-trained language model to learn the semantic representation of the text. e ij .

[0042] ;

[0043] in, Indicates user Text-level semantic embedding of the g-th text Indicates user The gth text posted on the social media platform, This represents the pre-trained RoBERTa-large encoder. This represents the g-th token;

[0044] 2. Embedded projection and supervised comparative learning.

[0045] Contrastive learning aims to learn the representation of input data. For user identification, the loss is low if the representations of the same user's text are similar, and high if the representations of different users' texts are similar.

[0046] Supervised Contrastive Loss (SupCon loss) extends contrastive learning to supervised scenarios. By utilizing label information, it treats samples of the same class as positive examples and samples of different classes as negative examples, thus clustering similar samples in the embedding space and separating dissimilar samples. In this invention, SupCon is implemented around the goal of "minimizing the text embedding distance of the same user and maximizing the text embedding distance of different users," treating samples from the same user as positive examples and samples from different users as negative examples. The specific process is as follows:

[0047] (1) Batch construction:

[0048] Group the training data by user, with each batch containing [data]. Each of the following users is randomly selected. A text (i.e., a "view") is generated, forming a size of [size missing]. A user is selected only once within a single batch, meaning each user can contribute to that batch at most. Each text will be unique and will not appear repeatedly in the same batch under the identity of multiple independent users, in order to avoid interference from false negative examples.

[0049] (2) Projection and normalization:

[0050] To enhance the discriminative power of style features, a linear projection layer without an activation function is introduced. (Text embedding) e ij After passing through a projection layer (a linear mapping without an activation function), it is transformed into a low-dimensional embedding. , can be represented as: ;

[0051] in, and These represent the weights and bias parameters of the projection layer, respectively. This represents a low-dimensional embedding, projected and then L2 normalized. ,in, This represents the normalized low-dimensional embedding. This represents the L2 norm, which is crucial for training stability and performance. This refers to the low-dimensional embedding used to calculate the supervised contrastive loss (SupCon loss).

[0052] (3) Monitored and compared losses:

[0053] Set temperature parameters >0, for each text sample in the batch The formula for supervised comparison loss is as follows:

[0054] ;

[0055] in, This represents the supervised contrastive loss function. This represents the set of indices for all text in the batch. Representation and text Other samples belonging to the same user (positive examples set), which do not contain text. itself; Indicates the number of positive examples; Indicates that the batch contains text, excluding text. The set of all samples outside itself (including positive and negative examples); This represents a temperature parameter used to adjust the steepness of the similarity distribution; Indicates sample embeddings belonging to the same user , The similarity of sample embeddings is measured by the dot product operation; This indicates that all samples are embedded. , The similarity of sample embeddings is measured by the dot product operation; This indicates the transpose operation.

[0056] (4) Optimization objective:

[0057] Using the loss function described above, the model will:

[0058] Increase the similarity of embedded documents from the same user (make the numerator larger);

[0059] Reduce the similarity of document embeddings from different users (so that negative examples in the denominator contribute less);

[0060] Ultimately, the embeddings of the same user are clustered in the vector space, while the embeddings of different users are dispersed, thereby learning distinctive writing style features.

[0061] During training, the encoder parameters are optimized through supervised contrastive loss, and the encoder (RoBERTa) model gradually learns the user's writing style features (such as word choice habits, sentence structure, etc.), weakening the influence of topic on embedding. The gradient of the SupCon loss not only updates the parameters of the projection layer, but also continues to update the parameters of the encoder (RoBERTa) itself along the backward path of the projection layer.

[0062] 3. Output of user-level language style vectors.

[0063] After supervised contrastive training, the projection layer is discarded, and only the pooling layer output of the optimized RoBERTa-large encoder is retained. As a text-level representation (because projection is mainly used to learn the optimization space for the contrast task, it is discarded after training to obtain a more semantic vector, but the encoder's output...) Discriminative learning has already been implemented. (Text-level semantic embedding) The core text-level representation, which can be used to characterize users' writing styles, exhibits a distribution characteristic of "clustering of the same user and dispersion of different users" in the embedding space. To further obtain a unified style vector representation for each user, this invention introduces an Additive Attention mechanism to address the issue of user-specific writing styles. All text embeddings are adaptively weighted and aggregated to learn the relative contribution of different texts to its style representation. The formula is as follows.

[0064] ;

[0065] in, This indicates the weight of the text's contribution to the user's writing style, and satisfies... ; Indicates user Text-level semantic embedding of the g-th text after supervised contrastive learning; Indicates and Different text-level semantic embeddings after supervised contrastive learning; This represents the attention context vector, used to evaluate the importance of each piece of text; and These represent the learnable weights and biases of the attention layer, respectively.

[0066] Finally, the text-level semantic embeddings after supervised contrastive learning are weighted and summed using the contribution weights of the text to the user's writing style to obtain the current user's language style representation. The corresponding process has the following relationship:

[0067] ;

[0068] in, Indicates user Language style feature vectors, Indicates user The number of texts published on social media platforms.

[0069] The specific details regarding personality trait modeling in step 1 are as follows:

[0070] 1. Define psycholinguistic features.

[0071] To better assist the personality recognition model in learning psycho-semantic information, three types of linguistic psychological features are introduced:

[0072] (1) The Maiesse feature contains three subsets:

[0073] LIWC features: statistical frequency of words related to emotion, behavior, and grammar; MRC features: from the MRC psycholinguistics database, including psychological scores for lexical imaginability and abstraction; prosody and discourse type features: measures information on language rhythm and expression.

[0074] (2) SenticNet features:

[0075] By summarizing the polarity values ​​of sentiment words in the text, quantitative values ​​for introspection, temper, attitude, sensitivity, and polarity are obtained. Simultaneously, the five most frequently occurring major sentiment tags are extracted and vectorized during training.

[0076] (3) NRC emotional characteristics:

[0077] Based on the NRC sentiment dictionary, the frequency of related words in the text is calculated, covering 11 emotion categories such as anger, expectation, disgust, fear, and joy, to supplement the sentiment features of SenticNet.

[0078] 2. Feature extraction process and representation learning.

[0079] Given user Collection of texts published on social media platforms Each text message passes through two pathways:

[0080] (1) Psycholinguistic Feature Extractor: Generated based on psycholinguistic features n eigenvectors ,user u i Overall psycholinguistic features The formula for the average vector value is as follows:

[0081] ;

[0082] ;

[0083] in, This refers to the psycholinguistic feature extraction function, which involves transforming raw text into psycholinguistic feature vectors. Indicates to the user The published total n Each text segment is subjected to psycholinguistic feature extraction. Indicates user The psycholinguistic features of the published text number g, Indicates user Overall psycholinguistic characteristics;

[0084] (2) Using RoBERTa-large as the base encoder, the input text (social media posts) is converted into initial token-level embeddings, and then average pooling is used to obtain text-level embeddings. This step utilizes the semantic understanding capability of the pre-trained language model to learn the semantic representation of the text. .

[0085] 3. Attention mechanisms are used for feature fusion.

[0086] users The overall psycholinguistic features are used to generate queries and keys through linear projection, embedding text-level semantics. The process of generating values ​​through linear projection follows the following relationship:

[0087] ;

[0088] in, These represent queries, keys, and values, respectively. These represent the query, the trainable parameter matrices corresponding to the keys and values, respectively.

[0089] The dot product attention calculation is performed on the query and key to obtain the attention weights. The corresponding process has the following relationship:

[0090] ;

[0091] in, Indicates attention weights, Indicates the dimension of the key.

[0092] 4. Integrating semantic representation with psychological features.

[0093] Attention-weighted fusion V ij Get users u i Personality representation that integrates semantics and psychology H i And strengthen the text weight related to personality.

[0094] ;

[0095] in, Indicates personality;

[0096] The resulting personality representation is then dimensionality-reduced by mapping it to a lower-dimensional vector using a linear layer. Next, this vector is mapped to the current user... Holistic psycholinguistic feature vector When concatenated, they form a high-level feature vector. .

[0097] ;

[0098] in, Indicates user The personality trait vector, This indicates a splicing operation. This indicates a linear layer.

[0099] The specific details regarding topic feature modeling in step 1 are as follows:

[0100] The topic feature modeling method combines Transformer semantic encoding, dimensionality reduction clustering, and class-TF-IDF (c-TF-IDF) representation, making it particularly suitable for processing short texts (such as social media posts). It can output keyword weight vectors for each topic and further generate user-level topic representations.

[0101] 1. Text clustering.

[0102] Dimensionality reduction: Using UMAP to map text-level semantic embeddings from high-dimensional to low-dimensional space while preserving local and global structural characteristics.

[0103] ;

[0104] in, Represents the vector after dimensionality reduction. Indicates a UMAP operation;

[0105] Clustering: HDBSCAN is used to cluster the dimensionality-reduced vectors. HDBSCAN can handle clusters of different densities and treats noise as outliers (-1), automatically determining the number of clusters. K This improves the quality of topic representation. Clustering yields a dimensionality-reduced vector, which is then assigned to a specific topic number. k , This indicates the number of clusters in the cluster, with each cluster corresponding to a topic;

[0106] 2. Intra-class keyword extraction (c-TF-IDF).

[0107] It constructs its TF-IDF representation, but instead of using standard TF-IDF, it introduces "class-based TF-TDF". Based on the correspondence between the dimensionality-reduced vectors and topic numbers, it assigns a specific TF-IDF representation to each topic. k All text within is merged into a single "document-like" file. D k The formula is as follows:

[0108] ;

[0109] in, The c-TF-IDF score of the word. Indicator w On the topic k The frequency of appearance in the document, Indicator w On the topic The frequency of appearance in the document, Indicates the topic k Total number of words contained Indicates the topic Total number of words contained K This represents the number of clusters, or the number of topics.

[0110] 3. Topic vectors and user topic distribution.

[0111] (1) Topic Vector:

[0112] Topic Vectors It is a high-dimensional sparse vector, where each dimension represents the cTF-IDF weight of a word in the vocabulary, as shown in the following formula:

[0113] ;

[0114] in, This represents the vocabulary size of the entire corpus, with each component representing "a certain word". w i "On the topic k c-TF-IDF score in This represents the topic vector.

[0115] (2) User topic probability distribution:

[0116] For users u i For all texts, their topic distribution is statistically analyzed and normalized using the following formula:

[0117] ;

[0118] in, Indicates the topick In users The relative proportion Indicates user The text belongs to the topic k Quantity, Indicates user The text belongs to the topic Quantity, Indicates the number of topics.

[0119] 4. User-level topic vector generation.

[0120] because Since these are high-dimensional sparse vectors, they are not convenient to use directly in deep models. This method proposes a user-level topic vector aggregation strategy: the topic vectors of the current topic are reduced in dimensionality using Truncated SVD, and then vector aggregation is performed to obtain topic embedding vectors. The corresponding process has the following relationship:

[0121] ;

[0122] in, Indicates user Topic embedding vector, Represents topic vectors Dense vectors after dimensionality reduction using TruncatedSVD.

[0123] The specific details regarding social structure modeling in step 1 are as follows:

[0124] 1. Task definition.

[0125] Construct a social network structure and extract structural embedding representations of users under various relationships (following, forwarding, commenting, etc.) from it. It is used to characterize a user's location, role, and dissemination capabilities on a social network, among which, This represents the dimension of the user's social structure.

[0126] The social structure of users is characterized by heterogeneous information networks with diverse relationships, heterogeneous influence, and multi-relationship information. The core processes include graph construction, relationship graph transformation, and semantic attention aggregation.

[0127] 2. Construction of Heterogeneous Information Network (HIN).

[0128] This process extracts static attribute features from user information, using users as nodes in a graph and diverse social relationships (such as "following," "being followed," and "forwarding") as edges. The textual semantic representation of the user and the static attribute features are concatenated and embedded into the corresponding user nodes, resulting in a heterogeneous information network to capture the heterogeneity of relationships. The user feature vector (text + static attribute features) is then converted into an initial feature vector in a graph neural network (GNNs) via a fully connected layer, as shown in the following formula.

[0129] ;

[0130] in, Indicates user Textual semantic representation, This indicates the number of posts a user has. Represents user static attribute characteristics. This represents the initial user features that combine both static user attributes and textual semantics. This represents the leaky-relu activation function. This represents a learnable parameter matrix used to concatenate the user's textual semantic features with static attribute features into a vector. Mapped to the initial feature space of the graph neural network; This represents a learnable bias vector used to translate the result of a linear transformation. Indicates the user after transformation The initial feature vector is used as the input to the graph neural network. User static attribute features This includes information such as number of followers, number of followers, account age, posting frequency, and number of likes. Numerical data is normalized, binary data uses 0 / 1 encoding, and multi-class data uses one-hot encoding. Finally, all data are concatenated into a continuous vector. .

[0131] make For network input, the number of layers starts from l =1 to L, The input for each layer is The output of the layer is .

[0132] 3. Relationship diagrams (Transformers).

[0133] Modeling influence heterogeneity using the Transformer attention mechanism:

[0134] (1) The user at the upper level The initial feature vector of the corresponding node undergoes several linear transformations to generate a query vector corresponding to the number of attention heads, which then connects to another user in the previous layer. The initial feature vectors of the corresponding nodes undergo several linear transformations to generate key and value vectors corresponding to the number of attention heads; among them, for the relationship... r and nodes i The d The query vector, key vector, and value vector for each attention head are defined by the following formulas:

[0135] ;

[0136] in, Indicates the first l Layers, Relationships r , No. d Under individual attention, users The query vector for the corresponding node; Indicates the first l Layers, Relationships r , No. d Under individual attention, users The key vector of the corresponding node; Indicates the first l Layers, Relationships r , No. d Under individual attention, users The value vector of the corresponding node; Indicates the use of generating the first l Layers, Relationships r , No. d Learnable linear transformation matrix of each attention head query vector Indicates the use of generating the first l Layers, Relationships r , No. d Learnable linear transformation matrix of attention head key vectors Indicates the use of generating the first l Layers, Relationships r , No. d Learnable linear transformation matrix of attention head vectors Indicates the generation of the first l Layers, Relationships r , No. d Bias when querying an attention head vector. Indicates the generation of the first l Layers, Relationships r , No. d Bias when focusing on the head key vector Indicates the generation of the first l Layers, Relationships r , No. d Bias when dealing with attention head vectors The graph neural network represents the first... l -1 floor users The feature vector of the corresponding node, Indicates the first l -1 floor users The feature vector of the corresponding node.

[0137] (2) Calculate the influence weights between nodes:

[0138] By scaling the dot product attention, the attention weights between different nodes are calculated, and the heterogeneity of the influence is modeled.

[0139] ;

[0140] in, Indicates the first l Layers, Relationships r , No. d Under individual attention, users The corresponding node for the user The "attention weight" of the corresponding node directly represents the user's attention. The corresponding node for the user The influence strength of the corresponding node; This represents the hidden layer size for each attention head. Indicates user The corresponding node in the relationship r The set of neighbors below.

[0141] (3) Head-level aggregation of neighbor information and merging of multiple heads:

[0142] For each attention head, aggregate the neighbor domains of the node to obtain the relationships. r The node representation is optimized using a gating mechanism to ensure learning stability. The formula is as follows:

[0143] ;

[0144] in, Indicates the first l Layers, Relationships r Next user The hidden representation of the corresponding node, This indicates the total number of attention heads.

[0145] (4) Gating mechanism:

[0146] A gating mechanism is applied to the obtained results to ensure smooth representation learning. First, based on the relation... r Users in the current layer The hidden representation of the corresponding node and the user in the previous layer The initial features of the corresponding nodes are used to calculate the gating coefficients. The corresponding process has the following relationship:

[0147] ;

[0148] in, This represents the sigmoid activation function. Indicates the gating coefficient. Indicates the first l Layers, Relationships r The learnable weight matrix for calculating the gating coefficients is used. Indicates the first l Layers, Relationships r The learnable bias vector of the gating coefficients is calculated. Then, the gating mechanism is applied to the learned representation in the following manner. and input Based on the gating coefficient, selectively retain some nodes from the previous layer. i Initial features and some relationships r Nodes in the current layer i The hidden representations are then merged to obtain the nodes in the current layer. i Regarding relationships r The learning representation corresponds to the following process:

[0149] ;

[0150] in, This represents the Hadamard product operation. Indicates the first l Users in the layer The corresponding nodes are related to the relationship r Learning representation.

[0151] 4. Semantic Attention Networks.

[0152] (1) Calculate the semantic score for each relation (global perspective):

[0153] 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 heterogeneity of relationships inherent in the social network. First, all nodes in the HIN are observed from a global perspective, and node representations under different relationships are globally aggregated, assigning dynamic weights to different relationships while preserving their heterogeneity. The importance of each relationship is then evaluated from a global node perspective, thereby obtaining the importance, or semantic score, of each relationship.

[0154] ;

[0155] in, Indicates the firstd The relationship between attention heads r semantic score, V This represents the set of nodes in a heterogeneous information network (HIN). yes l Layer d The semantic attention vector of each attention head. and These are the learnable weight matrix and bias vector of the semantic attention network.

[0156] (2) The relation weights are obtained by softmax normalization:

[0157] The importance of each relation is normalized using softmax, with the following formula:

[0158] ;

[0159] in, Representing relations r The weight, Indicates the first d The semantic score of another relation of an attention head.

[0160] (3) Cross-relationship weighted fusion:

[0161] Then, using relationships r The weights of nodes in the current layer i Regarding relationships r The learned representations are weighted and fused across relations to obtain node representations under different relations. The corresponding process has the following relational formula:

[0162] ;

[0163] in, Indicates the first l The node representation after cross-layer relationship aggregation Indicates the first l Layer nodes i Regarding relationships r Learning representation.

[0164] (4) Feature transformation layer (FFN + residual + LayerNorm):

[0165] Drawing on the standard practice of Transformer Encoder, in obtaining cross-relational aggregation... Then, it is fed into a feed-forward network (FFN) for nonlinear transformation, and then residual connections and layer normalization are added.

[0166] ;

[0167] in, Indicates the first l +1 level cross-relation aggregation node representation Presentation layer normalization operation, This represents a feedforward network used to perform nonlinear transformations on node representations. The node representations aggregated across relationships in the next layer are used as input to the next layer of the graph neural network. After iteration, the node representations aggregated across relationships in the Lth layer are obtained. As a user u i Ultimate Social Structure Embedding .

[0168] 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 profile embedding.

[0169] In a preferred embodiment of the present invention, the language style feature vector, personality feature vector, topic embedding vector, and social structure embedding vector are concatenated to obtain a fused feature vector. The corresponding process has the following relationship:

[0170] ;

[0171] in, This represents the fused feature vector. Represents the social structure embedding vector;

[0172] The fused feature vectors are then projected and subjected to dimensionality reduction operations to obtain a multi-dimensional user profile embedding. The corresponding process follows the following relationship:

[0173] ;

[0174] in, Indicates the user after splicing Multi-dimensional user profile embedding.

[0175] Step 3: Using users as nodes in the graph, diverse social relationships at different points in time as edges, and embedding multi-dimensional user profiles into the nodes of the corresponding users, a continuous time dynamic graph is obtained.

[0176] In the social media environment, public opinion elements (such as opinions, stances, and emotions) exhibit dynamic propagation and evolution characteristics, exhibiting diffusion, attenuation, and amplification. Traditional static graph methods cannot characterize the relationships between nodes that evolve over time, nor can they model the differential impact of multiple relationships (forwards, comments, likes, etc.) during the propagation process. Given a multi-dimensional profile embedding representation for each user and a multi-relationship propagation path in the social graph, this paper constructs a model of the temporal relationships and interaction characteristics of nodes in a dynamic graph network, providing an effective time-aware node representation for downstream tasks.

[0177] This invention proposes a Dynamic Adaptive Graph Learning (DAGL) model in this stage. Taking multi-dimensional user profile embeddings and multi-relational social propagation paths as input, it establishes dynamic propagation modeling capabilities based on attention mechanisms and Transformers, and introduces Neighbor Co-occurrence Encoding (NCoE) to strengthen the correlation between source and target nodes. Simultaneously, it efficiently captures long-term temporal dependencies through patching techniques. This stage can effectively model the evolution of public opinion elements in downstream dynamic link prediction and dynamic node classification.

[0178] The task is defined as: [Issue a continuous-time dynamic graph] G Represented as: .in, Represents a set of nodes (users). t It is time. Representing time t The set of edges, R For a set of relationship types (such as forwarding, commenting, liking, etc.). X This represents the multidimensional image features of the nodes obtained in the previous stage.

[0179] Given time t Previous interactions ( u , r , v , t ),in These are the source node and the target node, respectively. r For relational types, DAGL aims to learn time. t Two-node time-aware representation It is used for subsequent dynamic link prediction and dynamic node classification.

[0180] Step 4: Using 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, the continuous-time dynamic graph is encoded along the time axis using neighbor co-occurrence coding to obtain the encoded sequence;

[0181] DAGL uses only first-order history and transforms the problem into sequence modeling. This choice greatly simplifies dependencies and facilitates subsequent Transformer coding.

[0182] ;

[0183] in, and These represent the obtained source nodes respectively. u and target node v The first-order interaction history sequence, the source node's For nodes u The first-order neighbor domain, Representing the source node respectively u and target node v Neighbor nodes encountered during historical interactions express With source node u Interaction relationship types, express With the target node v Interaction relationship types, t u , t v This represents the time when the interaction between the corresponding source node and target node occurred.

[0184] Next, we need to check each neighbor's... and Encode the frequency of occurrence in order to utilize u and v The correlation between them is ultimately u and v Generate 4 types of coding sequences ( N Neighbor feature encoding E Link feature encoding, T Time encoding, C (Neighbor co-occurrence encoding). Then, each encoded sequence is divided into multiple blocks, and all blocks are fed into a Transformer to capture long-term temporal dependencies. Finally, the output of the Transformer is averaged to derive the temporal... t hour u and v Time perception representation .

[0185] 3. Methods and steps.

[0186] (1) Basic encoding (neighbors, edges, time):

[0187] The edges of each node are extracted from the continuous-time dynamic graph and arranged in chronological order to obtain the first-order interaction history sequence between each node and its neighbors;

[0188] Select the source node and the target node from the continuous-time dynamic graph, and extract the first-order interaction history sequence of the source node and the first-order interaction history sequence of the target node;

[0189] For each sequence ( Extracting the neighbor feature matrix Link feature matrix (including relation type embedding) , The dimension of the neighbor feature vectors. The dimension of the link feature vector. This represents the first-order interaction history sequence of node *. Represents a node. , Indicates the source node, This represents the target node. Time encoding uses a sine / cosine basis of trainable frequencies paired with a time interval Δ. t = t - t Embedded and a decay factor is introduced to simulate heat decay, with the dimension being... d T :

[0190] ;

[0191] in, This represents a trainable frequency parameter used to capture periodic patterns over time (such as daily / weekly / monthly interaction patterns). This represents the learnable attenuation coefficient. ; Indicates time interval, This represents the time interval encoding matrix of the source or target node, with the aim of capturing periodic time patterns. This indicates the size of the time interval encoding matrix.

[0192] (2) Neighbor Co-occurrence Encoding (NCoE):

[0193] The core assumption is: if the source node u and target node v The more common neighbors a pair has in its historical sequence, the higher the probability of future interactions. Therefore, for... and For each neighbor, the frequency of its occurrence in the first-order interaction history sequence of the source node and the first-order interaction history sequence of the target node is counted, forming a two-dimensional feature, namely the co-occurrence encoding matrix of the source node and the target node:

[0194] ;

[0195] in, Indicates the source node u In time t The co-occurrence encoding matrix, Represents the target node v In time t The co-occurrence encoding matrix; This indicates that the two-dimensional vectors of each neighbor are stacked vertically into a matrix according to the interaction time order; This indicates an operation to count the number of times. These represent the time intervals of the source node and the target node, respectively. t The preceding first-order interactive history sequence, superscript t Emphasizing the "time-aware" attribute, that is, the sequence includes a deadline. t Historical interaction information;

[0196] Mapping the co-occurrence encoding matrices of the source and target nodes to the vector space and adding them together yields the neighbor co-occurrence encoding. The corresponding process follows the following relationship:

[0197] ;

[0198] in, and This represents the number of times the same neighbor appears in the first-order interaction history sequence of the source node or the target node, respectively. This represents a mapping operation consisting of two layers of perceptrons and a ReLU activation function. This represents the neighbor co-occurrence encoding matrix of node *. This indicates the co-occurrence encoding dimension.

[0199] Step 5: Divide the encoded sequence into blocks and use a Transformer encoder to capture the temporal dependencies between blocks and the potential correlations between nodes to obtain the temporal-aware representations of the source and target nodes at the current time.

[0200] Directly performing self-attention on the entire interaction sequence leads to a cost that increases quadratically with length. To maintain local temporal proximity while reducing complexity, DAGL divides each encoding into groups of size [size missing] based on adjacent temporal sequences. P Non-overlapping blocks (zero-padding if insufficient), such as the matrix of nodes. Divide into blocks, Will be divided into Blocks, and block embedding is represented as .

[0201] in, This represents four different feature types. , N Indicate neighbor characteristics, E Indicates link characteristics, T Indicates time interval characteristics, C Indicates the co-occurrence feature of neighbors; when Dynamic adjustment when the length changes P Keep Maintain a constant level to reduce computational costs.

[0202] (4) Dimensional alignment and sequence splicing:

[0203] Each "block-coded" element is aligned to a uniform dimension via a linear layer. d .

[0204] ;

[0205] in, This represents the encoded result of one type of feature of a node after dimension alignment. This indicates the number of patches after the source or target node's encoded sequence is divided into blocks. Indicates the aligned dimensions. This represents the encoding matrix after block division of one type of feature (neighbors, links, time interval, neighbor co-occurrence) of the source or target node. Represents a trainable linear transformation matrix. This represents the trainable bias vector of the linear layer;

[0206] The four aligned codes are concatenated to obtain the source or target node in time. t The complete block-level coding features correspond to the following process:

[0207] ;

[0208] in, This represents the complete block-level encoding of node *. Represents a node * Neighbor feature encoding, Represents a node * Link feature encoding, Represents a node * Time interval encoding, Represents a node * The neighbor co-occurrence encoding.

[0209] (5) Transformer encoder:

[0210] Next, a Transformer encoder is used to capture the temporal dependencies between these blocks and the potential correlations between nodes. The complete block-level encoded features of the source and target nodes are concatenated as input to obtain the block-level representation matrix. This encoder is composed of... L The system consists of stacked layers, each layer including: Multi-Head SelfAttention (MSA), Feed-Forward Network (FFN), Residual Connection, and Layer Normalization (LN). It employs a Pre-LN structure: layer normalization (LN) is applied before entering the MSA and FFN layers, and then the input is added to the residual connection. Furthermore, the FFN uses a two-layer perceptron structure, and the GELU (Gaussian Error Linear Unit) activation function is used in the middle layer instead of the traditional ReLU, resulting in better performance.

[0211] (6) Time-aware node representation:

[0212] Now, from the block level H t Return to node-level representation In time t Location, node Time perception representation Through in H t The average of the block representations of its related nodes is obtained, and the corresponding process has the following relationship:

[0213] ;

[0214] in, Indicates the node * in time t Time perception representation, Indicates taking The Middle b The complete vector of each block, Represents the set of block indices associated with node *. Indicates time t The block-level representation matrix.

[0215] Step 6: Utilize the time-aware representations of the source and target nodes at the current time to perform dynamic link prediction and dynamic node classification, as well as the future trend of public opinion link evolution and the probability distribution of changes in observation points.

[0216] The third phase includes two objectives: dynamic link prediction (predicting the future evolution of node links) and dynamic node classification (predicting the probability of changes in observation points over time).

[0217] 1. Dynamic Link Prediction.

[0218] Dynamic link prediction aims to determine future time. t Source node u With the target node v Whether an interaction (link) will form between them. Dynamic link prediction includes two settings:

[0219] Transductive setting: The goal is to predict future interactions between nodes that have already been seen during training.

[0220] Inductive setting: The goal is to predict future interactions between nodes that have not appeared during training.

[0221] (1) Node representation acquisition:

[0222] Using the DAGL model, and leveraging Neighbor Co-occurrence Encoding (NCoE) and block segmentation techniques, a time-aware representation is learned from the first-order historical interaction sequence of nodes:

[0223] (2) Connection representation and prediction:

[0224] The temporal representations of the source and target nodes at the current time are concatenated and input into the first multi-layer perceptron, which is responsible for the non-linear mapping from "features to probabilities" and finally outputs the probability of the existence of a link between the two nodes. The corresponding process has the following relationship:

[0225] ;

[0226] in, Let represent the learnable weight matrix and bias of the first multilayer perceptron, respectively. Represents the normalized exponential function, These represent the time-aware representations of the source node and the target node, respectively. Indicates the predicted output u and v The probability that a link exists at a node;

[0227] (3) The loss function adopts the binary cross-entropy (BCE) loss:

[0228] ;

[0229] in, For real labels, This represents the loss function for dynamic link prediction, which measures the overall difference between the model's prediction and the true label.

[0230] 2. Dynamic Node Classification.

[0231] Dynamic node classification aims to predict the attributes / state of a node at a specific time (such as sentiment category, stance label, etc.).

[0232] (1) Node representation acquisition:

[0233] Similarly, a time-aware representation is obtained using the DAGL model: .

[0234] (2) Classification prediction:

[0235] The temporal-aware representation of the source node in the previous time step is input into the second multi-layer perceptron, and the output classification probability distribution is determined by the following relationship:

[0236] ;

[0237] in, Let represent the learnable weight matrix and bias of the second multilayer perceptron, respectively. This represents the classification probability distribution of the predicted output source node (i.e., the probability of the predicted source node's classification category changing over time).

[0238] (3) The loss function used is cross-entropy loss:

[0239] ;

[0240] in, Indicates the number of categories. This represents the true label vector of the source node. This represents the probability value of the s-th class in the classification probability distribution of the predicted output source node.

[0241] Please refer to Figure 4 This embodiment also provides a public opinion evolution prediction system based on the fusion of multi-dimensional user profiles and adaptive graphs. The system applies the public opinion evolution prediction method based on the fusion of multi-dimensional user profiles and adaptive graphs as described above. The system includes:

[0242] The multi-dimensional user profile building module is used for:

[0243] Acquire user information, user post content, and diverse user social relationships; utilize user post content to perform language style modeling, personality trait modeling, and topic feature modeling to obtain language style feature vectors, personality feature vectors, and topic embedding vectors, respectively;

[0244] Social structure modeling is performed using user information, user post content, and diverse user social relationships to obtain social structure embedding vectors;

[0245] By fusing language style feature vectors, personality feature vectors, topic embedding vectors, and social structure embedding vectors, a multi-dimensional user profile embedding is obtained.

[0246] The dynamic graph adaptive learning module is used for:

[0247] Using users as nodes in the graph, diverse social relationships at different points in time as edges, and embedding multi-dimensional user profiles into the nodes of the corresponding users, a continuous time dynamic graph is obtained.

[0248] Using 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, the continuous-time dynamic graph is encoded along the time axis using neighbor co-occurrence coding to obtain the encoded sequence;

[0249] The encoded sequence is divided into blocks, and a Transformer encoder is used to capture the temporal dependencies between blocks and the potential correlations between nodes, so as to obtain the temporal-aware representation of the source node and the target node at the current time.

[0250] The public opinion evolution prediction module is used for:

[0251] By utilizing the time-aware representations of the source and target nodes at the current time, dynamic link prediction and dynamic node classification are performed respectively, resulting in the future trend of public opinion link evolution and the probability distribution of changes in observation points.

[0252] To make the objectives, technical solutions, and advantages of this invention clearer, the closest prior art solution ("A method for predicting the popularity of information based on graph neural networks", publication number: CN112580878A, hereinafter referred to as "the prior art") will be clearly and completely described below, and experimental comparisons will be conducted.

[0253] This existing technology uses an "information cascade graph" as a carrier to represent the propagation state of a social network at different times as a set of isomorphic graphs; the nodes in each time graph represent users, and the node status indicates whether it has been forwarded. Subsequently, the method extracts and fuses multi-source features in four stages to predict propagation paths and popularity (number of edges):

[0254] 1. Information cascade graph extraction: On a unified user relationship graph, construct a propagation state matrix according to time, and record whether the user participated in the propagation at the current and previous times.

[0255] 2. User-level graph structure features (GCN): The cascaded graphs at each time step are sequentially input into the graph convolutional network to extract the state features of the nodes under the graph structure and mitigate the effects of oversmoothing (3-5 layers are recommended).

[0256] 3. Time Series Features (LSTM): LSTM modeling is performed on the structural feature sequence of each user across time periods to form a time-dimensional representation of the user.

[0257] 4. Graph Generation and Prediction: Utilizing text topic features (LDA+ngram2vec), user attribute features (such as ID, number of followers, number of posts, mutual follow relationships, etc.), and the aforementioned temporal / structural representation, construct arbitrary user pairs ( u , v The feature vectors of the model are processed by a multilayer perceptron and a Softmax binary classification to predict whether there are propagation edges, thus obtaining the predicted cascaded adjacency matrix; finally, the number of edges or a correlation metric is used as the popularity measure, and the propagation path graph is output.

[0258] The existing technology uses the fusion of three types of information—GCN (structure), LSTM (time), and text / user attributes—to explicitly generate a "future propagation graph," balancing path-level interpretability and hotspot intensity. Its technical goals are highly similar to the "graph structure + temporal sequence + multi-source feature unification" of this invention.

[0259] Key modules and implementation details:

[0260] 1. Cascaded state modeling.

[0261] On a unified user relationship graph G=(V, E), by time t Record the node state (0 / 1) to form a multi-time feature matrix, which serves as the input for subsequent graph / temporal network.

[0262] Graph Structure Coding (GCN) feeds the graph at each time step into the GCN to obtain the representation of the nodes after structural transformation. Then, the node representations across time steps are stacked and transposed so that they can be aggregated into a time series according to the user.

[0263] The Time-Based Transformer (LSTM) takes a sequence of structure vectors of a single user at multiple time points as input to the LSTM and outputs a user-level time-series vector.

[0264] 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 follow relationships.

[0265] 2. Graph generation and prediction.

[0266] For any user pair ( u , vThe algorithm concatenates (time-series vectors, user attributes, mutual follow indicators, topic vectors, number of comments at any given time, etc.) as input to the MLP, determines whether there are propagation edges, summarizes them to obtain the predicted adjacency matrix and propagation path, and outputs the popularity.

[0267] Experimental data and comparison with existing technologies:

[0268] To verify the effectiveness and stability of this invention for dynamic link prediction within the integrated framework of "dynamic graph-multidimensional profiling-adaptive mapping," a comparative experiment was conducted on the Wikipedia dataset. The evaluation followed a unified and reproducible protocol: the training / validation / test sets were split chronologically into 70% / 15% segments, and the evaluation was conducted under both inductive Seen (seen nodes) and inductive New (new nodes) settings. Link discrimination employed a multilayer perceptron representing the nodes at both ends, with AP (average accuracy) and ROC (area under the curve) metrics. Negative sampling used an industry-standard randomized strategy implemented in DyGLib. All results were the mean ± standard deviation of five runs with different random seeds, and benchmark practices using a unified training pipeline, early stopping, and hyperparameter grid search were employed to ensure comparability and reproducibility.

[0269] Under the aforementioned consensus protocol, this embodiment of the invention uses neighbor co-occurrence coding and patching techniques to capture the correlation and long-term dependency of source / target nodes, perfectly matching the technical orientation of this invention in modeling the coupling of "structure-time-semantics". Experimental results are shown in Table 1 below:

[0270]

[0271] Table 1. Experimental results.

[0272] From a statistical fluctuation perspective, the standard deviations of all four settings are within 3–4 × 10⁻⁶. -4 Within a certain range, the training process shows stable convergence and minimal variance, meeting the requirements for repeatability and reliability in patent comparison experiments.

[0273] Compared with the existing technology (the closest approximation scheme, publication number: CN112580878A), the existing technology adopts "GCN (structure) + LSTM (time)" and integrates topic / user attributes, and outputs paths and popularity based on the predicted concatenated adjacency matrix. The technical goals are similar to the requirements of this invention in terms of "structure-time-semantics" fusion and interpretable propagation. However, its published text does not disclose AP / AUC values ​​that can be directly compared on the Wikipedia dynamic link prediction benchmark.

[0274] To ensure the objectivity and comparability of the comparison, this invention introduces a recognized strong baseline in the field and uses a transductive setting with the same dataset and the same RND negative sampling as a unified reference system: On Wikipedia (transductive, RND), the classic strong baselines CAWN and TGN are generally set with APs of 98.76% ± 0.03% and 98.45% ± 0.06%, respectively. In contrast, the embodiment of this invention, under the same protocol and implementation, achieves a measured transductive AP of 99.02% ± 0.02% on the test set, which is an improvement of 0.26 and 0.57 percentage points compared to CAWN and TGN, respectively, demonstrating a substantial performance advantage under a unified evaluation system.

[0275] Under unified standard data segmentation, indicator caliber, and training pipeline, the embodiments of the present invention achieve near-saturation AP / AUC and extremely low variance in the Wikipedia dynamic link prediction task, and have stable and statistically significant advantages on a directly comparable strong baseline.

[0276] Compared with the closest existing technology (CN112580878A), this invention achieves differentiated technical effects in three aspects: "long-term dependency capture nodes", "explicit correlation modeling", and "evaluation protocol consistency".

[0277] On the one hand, through neighbor co-occurrence and block-based mechanisms, the model supported by this invention can utilize a longer history without reducing computational complexity, which directly translates to a higher AP / AUC for dynamic link prediction.

[0278] On the other hand, adopting DyGLib's unified evaluation protocol ensures reproducibility and comparability across methods.

[0279] Therefore, it can be concluded that the present invention achieves significant progress in both performance and engineering usability compared to the closest approximation.

[0280] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.

Claims

1. A method for predicting public opinion evolution by fusing multi-dimensional user profiles and adaptive graphs, characterized in that, The method includes the following steps: Step 1: Obtain user information, user post content, and diverse social relationships; use user post content to perform language style modeling, personality trait modeling, and topic feature modeling to obtain language style feature vectors, personality feature vectors, and topic embedding vectors, respectively. Social structure modeling is performed using user information, user post content, and diverse user social relationships to obtain social structure embedding vectors; 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 profile embedding. Step 3: Using users as nodes in the graph, diverse social relationships at different points in time as edges, and embedding multi-dimensional user profiles into the nodes of the corresponding users, a continuous time dynamic graph is obtained. Step 4: Using 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, the continuous-time dynamic graph is encoded along the time axis using neighbor co-occurrence coding to obtain the encoded sequence; Step 5: Divide the encoded sequence into blocks and use a Transformer encoder to capture the temporal dependencies between blocks and the potential correlations between nodes to obtain the temporal-aware representations of the source and target nodes at the current time. Step 6: Utilize the time-aware representations of the source and target nodes at the current time to perform dynamic link prediction and dynamic node classification, respectively, to obtain the future public opinion link evolution trend and the probability distribution of observation point changes.

2. The public opinion evolution prediction method based on the fusion of multi-dimensional user profiles and adaptive graphs according to claim 1, characterized in that, In step 1, the method for modeling language style and obtaining language style feature vectors using user-posted content specifically includes the following steps: The selection rule is set so that a user is selected only once in a single batch and will not appear repeatedly in the same batch as multiple independent users; Obtain the training data, and group the training data by user according to the selection rules. Each batch contains... Each of the following users is randomly selected. 1 text, forming a size of batches; The training data is input into the pre-trained RoBERTa-large encoder to obtain the initial token-level embeddings for different users; average pooling is then performed on all the initial token-level embeddings to obtain the text-level semantic embeddings for different users. The corresponding process has the following relationship: ; in, Indicates user Text-level semantic embedding of the g-th text Indicates user The gth text posted on the social media platform, This represents the pre-trained RoBERTa-large encoder. This represents the g-th token; The text-level semantic embeddings of different users are converted into low-dimensional embeddings through a projection layer; The low-dimensional embeddings are L2 normalized to obtain normalized low-dimensional embeddings. The corresponding process has the following relationship: ; in, This represents the normalized low-dimensional embedding. Represents low-dimensional embedding, Represents the L2 norm; Using the normalized low-dimensional embeddings as samples, and leveraging label information, samples of the same class are treated as positive examples, and samples of different classes as negative examples. A supervised contrastive loss function is constructed through the low-dimensional embeddings, and the corresponding process has the following relationship: ; in, This represents the supervised contrastive loss function. This represents the set of indices for all text in the batch. Representation and text Other samples belonging to the same user do not contain text. itself; Indicates the number of positive examples; Indicates that the batch contains text, excluding text. The set of all samples outside of itself; This represents a temperature parameter used to adjust the steepness of the similarity distribution; Indicates sample embeddings belonging to the same user , The similarity of sample embeddings is measured by the dot product operation; This indicates that all samples are embedded. , The similarity of sample embeddings is measured by the dot product operation; Indicates the transpose operation; The pre-trained RoBERTa-large encoder is optimized by minimizing the supervised contrastive loss function, and the optimized RoBERTa-large encoder is obtained after optimization. users The g-th text published on a social media platform is input into the optimized RoBERTa-large encoder to obtain a text-level semantic embedding after supervised contrastive learning. An adaptive weighted aggregation is performed on all text-level semantic embeddings of the current user after supervised contrastive learning to learn the relative contribution of different texts to its style representation, thereby obtaining the contribution weight of texts to the user's writing style. The corresponding process has the following relationship: ; in, This indicates the weight of the text's contribution to the user's writing style, and satisfies... ; Indicates user Text-level semantic embedding of the g-th text after supervised contrastive learning; Indicates and Different text-level semantic embeddings after supervised contrastive learning; This represents the attention context vector, used to evaluate the importance of each piece of text; and These represent the learnable weights and biases of the attention layer, respectively. By using the contribution weights of text to the user's writing style, a weighted sum is applied to the text-level semantic embeddings after supervised contrastive learning to obtain the current user's language style representation. The corresponding process has the following relationship: ; in, Indicates user Language style feature vectors, Indicates user The number of texts published on social media platforms.

3. The public opinion evolution prediction method based on the fusion of multi-dimensional user profiles and adaptive graphs according to claim 2, characterized in that, In step 1, the method of modeling personality traits using user posts to obtain personality feature vectors specifically includes the following steps: users The g-th text posted on a social media platform is input into a psycholinguistic feature extractor to obtain several psycholinguistic features. The corresponding process has the following relationship: ; in, This represents the psycholinguistic feature extraction function. Indicates to the user The published total n Each text segment is subjected to psycholinguistic feature extraction. Indicates user The nth text posted on a social media platform; Calculate the average vector value of several psycholinguistic feature vectors to obtain the user's... The overall psycholinguistic characteristics and corresponding processes are related as follows: ; in, Indicates user Overall psycholinguistic characteristics Indicates user The psycholinguistic features of the published g-th text; users The psycholinguistic features are used to generate queries and keys through linear projection, and the text-level semantic embeddings are used to generate values ​​through linear projection. The corresponding process has the following relationship: ; in, These represent query, key, and value, respectively. These represent the query, key, and value corresponding trainable parameter matrices, respectively. The dot product attention calculation is performed on the query and key to obtain the attention weights. The corresponding process has the following relationship: ; in, Indicates attention weights. The dimension representing the key; By using attention weights to perform a weighted summation of the values, a personality representation is obtained. The corresponding process follows the following relationship: ; in, Indicates personality; Linear layers are used to reduce the dimensionality of the personality representation, and then compared with the user's... The overall psycholinguistic features are concatenated to obtain a personality feature vector, and the corresponding process has the following relationship: ; in, Indicates user The personality trait vector, This indicates a splicing operation. This indicates a linear layer.

4. The public opinion evolution prediction method based on the fusion of multi-dimensional user profiles and adaptive graphs according to claim 3, characterized in that, In step 1, the method of modeling topic features using user-posted content to obtain topic embedding vectors specifically includes the following steps: Text-level semantic embedding is mapped from a high-dimensional space to a low-dimensional space using UMAP to obtain a dimension-reduced vector. HDBSCAN is used to cluster the dimension-reduced vectors to obtain the topic numbers corresponding to the dimension-reduced vectors. Based on the correspondence between the dimensionality-reduced vectors and topic numbers, all texts within each topic are merged into class documents. TF-IDF is used to calculate the TF-IDF weight of each word within the class document to achieve keyword extraction within the class, obtaining the c-TF-IDF score of each word. The corresponding process has the following relationship: ; in, The c-TF-IDF score of the word. Indicator w On the topic k The frequency of appearance in the document, Indicator w On the topic The frequency of appearance in the document, Indicates the topic k Total number of words contained Indicates the topic Total number of words contained; K This represents the number of clusters in the clustering, where each cluster corresponds to a topic; Statistics of users The topic distribution of all texts is normalized to obtain the relative proportion of each topic for that user. The corresponding process has the following relationship: ; in, Indicates the topic k In users The relative proportion Indicates user The text belongs to the topic k Quantity, Indicates user The text belongs to the topic Quantity, Indicates the number of topics; The c-TF-IDF scores of all words in the current topic constitute the topic vector for the current topic. The topic vector of the current topic is reduced in dimensionality using Truncated SVD, and then vector aggregation is performed to obtain the topic embedding vector. The corresponding process has the following relationship: ; in, Indicates user Topic embedding vector, Representing topic vectors Dense vectors after dimensionality reduction using Truncated SVD.

5. The public opinion evolution prediction method based on the fusion of multi-dimensional user profiles and adaptive graphs according to claim 4, characterized in that, In step 1, the method for modeling the social structure using user information, user post content, and diverse user social relationships to obtain the social structure embedding vector specifically includes the following steps: Calculate the average vector value of the text-level semantic embedding to obtain the user's text semantic representation; Extract static attribute features of users from user information, use users as nodes in a graph and diverse social relationships as edges, and then concatenate and embed the textual semantic representation of users and static attribute features of users into the nodes of the corresponding users to obtain a heterogeneous information network. The textual semantic representation and static attribute features of users in heterogeneous information networks are transformed into initial feature vectors in graph neural networks using fully connected layers. The corresponding process has the following relationship: ; in, Indicates user Textual semantic representation, This indicates the number of posts a user has. Represents user static attribute characteristics, This represents the initial user features that combine static user attributes and textual semantics. This represents the leaky-relu activation function; This represents a learnable parameter matrix used to concatenate the user's textual semantic features with static attribute features into a vector. Mapped to the initial feature space of the graph neural network; This represents a learnable bias vector used to translate the result of a linear transformation. Indicates the user after transformation The initial feature vectors are used as input to the graph neural network; Users at the next level The initial feature vector of the corresponding node undergoes several linear transformations to generate a query vector corresponding to the number of attention heads, which then connects to another user in the previous layer. The initial feature vector of the corresponding node undergoes several linear transformations to generate key and value vectors corresponding to the number of attention heads; where the first... d The calculation process of the query vector, key vector, and value vector of an attention head follows the following relationship: ; in, Indicates the first l Layers, Relationships r , No. d Under individual attention, users The query vector for the corresponding node; Indicates the first l Layers, Relationships r , No. d Under individual attention, users The key vector of the corresponding node; Indicates the first l Layers, Relationships r , No. d Under individual attention, users The value vector of the corresponding node; Indicates the use of generating the first l Layers, Relationships r , No. d Learnable linear transformation matrix of each attention head query vector Indicates the use of generating the first l Layers, Relationships r , No. d Learnable linear transformation matrix of attention head key vectors Indicates the use of generating the first l Layers, Relationships r , No. d Learnable linear transformation matrix of attention head vectors Indicates the generation of the first l Layers, Relationships r , No. d Bias when querying an attention head vector. Indicates the generation of the first l Layers, Relationships r , No. d Bias when focusing on the head key vector Indicates the generation of the first l Layers, Relationships r , No. d Bias when dealing with attention head vectors The graph neural network represents the first... l -1 floor users The feature vector of the corresponding node, Indicates the first l -1 floor users The feature vector of the corresponding node; By scaling the dot product attention, the attention weights between different nodes are calculated, and the heterogeneity of the influence is modeled to obtain the node... i and j The attention weights between them are related by the following formula: ; in, Indicates the first l Layers, Relationships r , No. d Under individual attention, users The corresponding node for the user The "attention weight" of the corresponding node directly represents the user's attention weight. The corresponding node for the user The influence strength of the corresponding node; This represents the hidden layer size for each attention head. Indicates user The corresponding node in the relationship r The set of neighbors below; For each attention head, aggregate the neighbor domains of the node to obtain the relationships. r The nodes represent the process, and the corresponding relationship is as follows: ; in, Indicates the first l Layers, Relationships r Next user The hidden representation of the corresponding node, Indicates the total number of attention heads; According to the relationship r Users in the current layer The hidden representation of the corresponding node and the user in the previous layer The initial features of the corresponding nodes are used to calculate the gating coefficients. The corresponding process has the following relationship: ; in, This represents the sigmoid activation function. Indicates the gating coefficient. Indicates the first l Layers, Relationships r The learnable weight matrix for calculating the gating coefficients is used. Indicates the first l Layers, Relationships r The learnable bias vector for calculating the gating coefficients is used. Based on the gating coefficient, selectively retain some nodes from the previous layer. i Initial features and some relationships r Nodes in the current layer i The hidden representations are then merged to obtain the nodes in the current layer. i Regarding relationships r The learning representation corresponds to the following process: ; in, This represents the Hadamard product operation. Indicates the first l Users in the layer The corresponding nodes are related to the relationship r Learning representation; Nodes in the current layer i Regarding relationships r The learning representation uses a semantic attention network to aggregate node representations across relations, obtaining a semantic score for each relation. The corresponding process has the following relational expression: ; in, Indicates the first d The relationship between attention heads r semantic score, V This represents the set of nodes in a heterogeneous information network (HIN). yes l Layer d The semantic attention vector of each attention head. and These are the learnable weight matrix and bias vector of the semantic attention network; The semantic score of each relation is normalized to obtain the weight of each relation. The corresponding process has the following relational formula: ; in, Representing relations r The weight, Indicates the first d The semantic score of another relation of an attention head; Using relationships r The weights of nodes in the current layer i Regarding relationships r The learned representations are weighted and fused across relations to obtain node representations under different relations. The corresponding process has the following relational formula: ; in, Indicates the first l The node representation after cross-layer relationship aggregation Indicates the first l Layer nodes i Regarding relationships r Learning representation; The first l The node representations after cross-layer relationship aggregation are fed into a feedforward network for nonlinear transformation, followed by residual connections and layer normalization to obtain the node representations after cross-layer relationship aggregation in the next layer. The corresponding process has the following relationship: ; in, Indicates the first l +1 level cross-relation aggregation node representation Presentation layer normalization operation; This represents a feedforward network used to perform nonlinear transformations on node representations. The node representations after cross-relationship aggregation in the next layer are used as inputs to the next layer of the graph neural network for iteration. After the iteration is completed, the social structure embedding vector is obtained.

6. The public opinion evolution prediction method based on the fusion of multi-dimensional user profiles and adaptive graphs according to claim 5, characterized in that, In step 2, the method of fusing language style feature vectors, personality feature vectors, topic embedding vectors, and social structure embedding vectors to obtain a multi-dimensional user profile embedding specifically includes the following steps: The language style feature vector, personality feature vector, topic embedding vector, and social structure embedding vector are concatenated to obtain the fused feature vector. The corresponding process has the following relationship: ; in, This represents the fused feature vector. Represents the social structure embedding vector; The fused feature vectors are then projected and subjected to dimensionality reduction operations to obtain a multi-dimensional user profile embedding. The corresponding process follows the following relationship: ; in, Indicates the user after splicing Multi-dimensional user profile embedding.

7. The public opinion evolution prediction method based on the fusion of multi-dimensional user profiles and adaptive graphs according to claim 6, characterized in that, In step 4, the method of encoding the continuous-time dynamic graph by taking the current node user as the source node and the node users connected to the current node user as neighbors, and using neighbor co-occurrence coding to encode the continuous-time dynamic graph along the time axis to obtain the encoded sequence specifically includes the following steps: The edges of each node are extracted from the continuous-time dynamic graph and arranged in chronological order to obtain the first-order interaction history sequence between each node and its neighbors. Select the source node and the target node from the continuous-time dynamic graph, and extract the first-order interaction history sequence of the source node and the first-order interaction history sequence of the target node; Extract the neighbor feature encoding matrix and link feature encoding matrix from the first-order interaction history sequence of the source node and the first-order interaction history sequence of the target node; Encode the time intervals in the first-order interaction history sequences of the source node and the target node to obtain the time interval encoding matrix. The corresponding process has the following relationship: ; in, Represents the trainable frequency parameters. This represents the learnable attenuation coefficient. , The encoding matrix representing the time interval of the source or target node. Indicates time interval, This indicates the size of the time interval encoding matrix; By counting the occurrences of the same neighbor in the first-order interaction history sequences of the source node and the target node, the co-occurrence encoding matrices of the source and target nodes are obtained. The corresponding process has the following relationship: ; in, Indicates the source node u In time t The co-occurrence encoding matrix, Represents the target node v In time t The co-occurrence encoding matrix; This indicates that the two-dimensional vectors of each neighbor are stacked vertically into a matrix according to the interaction time order; This indicates an operation to count the number of times. Representing the source node respectively u and target node v Neighbor nodes encountered during historical interactions These represent the time intervals of the source node and the target node, respectively. t The preceding first-order interactive history sequence; Mapping the co-occurrence encoding matrices of the source and target nodes to the vector space and adding them together yields the neighbor co-occurrence encoding. The corresponding process follows the following relationship: ; in, and This represents the number of times the same neighbor appears in the first-order interaction history sequence of the source node or the target node, respectively. This represents a mapping operation consisting of two layers of perceptrons and a ReLU activation function. This represents the neighbor co-occurrence encoding matrix of node *. This represents the first-order interaction history sequence of node *. Indicates the co-occurrence encoding dimension. Represents a node. , Indicates the source node, Indicates the target node.

8. The public opinion evolution prediction method based on the fusion of multi-dimensional user profiles and adaptive graphs according to claim 7, characterized in that, In step 5, the encoded sequence is divided into blocks, and a Transformer encoder is used to capture the temporal dependencies between blocks and the potential correlations between nodes. The method for obtaining the temporal-aware representations of the source and target nodes at the current time specifically includes the following steps: The time interval coding matrix, neighbor co-occurrence coding matrix, neighbor feature coding matrix, and link feature coding matrix are divided into several groups of size according to adjacent time order. P Non-overlapping blocks; All non-overlapping blocks are dimensionally aligned using a linear layer to obtain the aligned encoding result. The corresponding process has the following relationship: ; in, This represents the encoded result of one type of feature of node * after dimension alignment. This represents four different feature types. ;in, N Indicate neighbor characteristics, E Indicates link characteristics, T Indicates time interval characteristics, C Indicates the co-occurrence characteristic of neighbors; This indicates the number of patches after the source or target node's encoded sequence is divided into blocks. Indicates the aligned dimensions. This represents the encoding matrix after dividing one type of feature from the source or target node into blocks. This represents the linear transformation matrix that allows the linear layer to be trained. This represents the trainable bias vector of the linear layer; The four aligned codes are concatenated to obtain the source or target node in time. t The complete block-level coding features correspond to the following process: ; in, This represents the complete block-level encoding of node *. Represents a node * Neighbor feature encoding, Represents a node * Link feature encoding, Represents a node * Time interval encoding, Represents a node * The neighbor co-occurrence code; The complete block-level encoded features of the source node and the target node are concatenated and fed into the Transformer encoder to capture the temporal dependencies between blocks and the potential correlations between nodes, thus obtaining the block-level representation matrix. The time-aware representation of a node at the current time is obtained by averaging the block-level representations related to the nodes in the block-level representation matrix at the current time. The corresponding process has the following relationship: ; in, Indicates the node * in time t Time perception representation, Indicates taking The Middle b The complete vector of each block, Represents the set of block indices associated with node *. Indicates time t The block-level representation matrix.

9. The public opinion evolution prediction method based on the fusion of multi-dimensional user profiles and adaptive graphs according to claim 8, characterized in that, In step 6, the method of using the time-aware representations of the source and target nodes at the current time to perform dynamic link prediction and dynamic node classification, and obtaining the future public opinion link evolution trend and the probability distribution of observation point changes, specifically includes the following steps: The time-aware representations of the source node and the target node at the current time are concatenated and input into the first multilayer perceptron, and finally the probability of the existence of the link between the two nodes is output. The corresponding process has the following relationship: ; in, Let represent the learnable weight matrix and bias of the first multilayer perceptron, respectively. Represents the normalized exponential function, These represent the time-aware representations of the source node and the target node, respectively. Indicates the predicted output u and v The probability that a link exists at a node; The temporal-aware representation of the source node in the previous time step is input into the second layer perceptron, and the output classification probability distribution is obtained. The corresponding process has the following relationship: ; in, Let represent the learnable weight matrix and bias of the second multilayer perceptron, respectively. This represents the predicted classification probability of the source node over time.

10. A public opinion evolution prediction system that fuses multi-dimensional user profiles with adaptive graphs, characterized in that, The system applies the public opinion evolution prediction method based on the fusion of multi-dimensional user profiles and adaptive graphs as described in any one of claims 1 to 9, and the system includes: The multi-dimensional user profile building module is used for: Acquire user information, user post content, and diverse user social relationships; utilize user post content to perform language style modeling, personality trait modeling, and topic feature modeling to obtain language style feature vectors, personality feature vectors, and topic embedding vectors, respectively; Social structure modeling is performed using user information, user post content, and diverse user social relationships to obtain social structure embedding vectors; By fusing language style feature vectors, personality feature vectors, topic embedding vectors, and social structure embedding vectors, a multi-dimensional user profile embedding is obtained. The dynamic graph adaptive learning module is used for: Using users as nodes in the graph, diverse social relationships at different points in time as edges, and embedding multi-dimensional user profiles into the nodes of the corresponding users, a continuous time dynamic graph is obtained. Using 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, the continuous-time dynamic graph is encoded along the time axis using neighbor co-occurrence coding to obtain the encoded sequence; The encoded sequence is divided into blocks, and a Transformer encoder is used to capture the temporal dependencies between blocks and the potential correlations between nodes, so as to obtain the temporal-aware representation of the source node and the target node at the current time. The public opinion evolution prediction module is used for: By utilizing the time-aware representations of the source and target nodes at the current time, dynamic link prediction and dynamic node classification are performed respectively, resulting in the future trend of public opinion link evolution and the probability distribution of changes in observation points.

Citation Information

Patent Citations

  • Information popularity prediction method based on graph neural network

    CN112580878A

  • 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