Viewpoint evolution simulation method and system

By separating positive and negative viewpoints using the dual dynamic graph ordinary differential equation (BDG-ODE), a dual dynamic graph ordinary differential equation is established, which solves the problem that existing models cannot distinguish the evolution of positive and negative viewpoints, and improves the prediction accuracy of viewpoint evolution and the adaptability of the model in social networks.

CN121745153APending Publication Date: 2026-03-27北京大学武汉人工智能研究院
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-22
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing Graph-ODE models cannot distinguish the different evolutionary mechanisms of positive and negative viewpoints, making it difficult to effectively model the positive-to-negative conversion behavior of user viewpoints, and their prediction accuracy is low.

Method used

We employ Dual Dynamics Graph Ordinary Differential Equations (BDG-ODE) to construct a social network graph, use a linear diffusion operator to separate positive and negative viewpoints, establish a dual dynamics graph ordinary differential equation to independently model the evolution of positive and negative viewpoints, and generate predicted viewpoint sequences through a viewpoint synthesis decoder. We then combine a composite loss function to optimize the model parameters.

Benefits of technology

It significantly improves the prediction accuracy of opinion evolution in social networks, and can more accurately capture the interaction patterns of positive and negative opinions and the relationships between users, thereby improving the model's prediction performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121745153A_ABST
    Figure CN121745153A_ABST
Patent Text Reader

Abstract

The invention discloses a viewpoint evolution simulation method and system, and belongs to the field of social network analysis and machine learning, and the method comprises the steps: constructing a social network graph, and calculating a linear diffusion operator phi through an adjacency matrix A and a node similarity matrix D; inputting a user viewpoint matrix X (0: T-1), separating positive and negative viewpoints through a double-viewpoint encoder, and generating a hidden space state; establishing a dual-dynamics graph ordinary differential equation based on the phi sum, independently modeling evolution of positive and negative viewpoints through a positive and negative viewpoint dynamic equation, and capturing an interaction mode of the positive and negative viewpoints; modeling evolution of the positive viewpoint and the negative viewpoint respectively, and capturing the incidence relation between the users through phi to obtain a dual-dynamics graph ordinary differential equation; mapping the hidden state back to a viewpoint space through a viewpoint synthesis decoder, and generating a predicted viewpoint sequence X (T: T + deltaT); and optimizing model parameters by adopting a composite loss function. According to the method, viewpoint evolution is accurately predicted through the dual-dynamics graph ordinary differential equation, and the model stability is optimized through composite loss.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of social network analysis and machine learning, in particular to a method and system for simulating opinion evolution. BACKGROUND

[0002] In recent years, the combination of neural dynamics equations, i.e., neural ordinary differential equations (NODEs) and graph neural networks (GNNs) has formed a graph-ODE method, and the related research has made significant progress, proving the effectiveness of this strategy in capturing long-term dynamics. These models can learn based on partial observation data obtained by irregular sampling on complex networks. However, these methods usually assume that all data follow the same implicit ordinary differential equation, which is extremely rare in real social media. In social networks, positive and negative opinions coexist and affect the evolution process in different ways. This tension between positive and negative opinions is crucial to the dynamics of evolution. Existing Graph-ODE models cannot capture both dynamics simultaneously, which limits their ability to model key mechanisms of opinion evolution dynamics in social networks.

[0003] In summary, the existing related technical solutions have the following limitations: (1) the existing Graph-ODE model assumes that all data follow the same implicit ordinary differential equation, which cannot distinguish between different evolution mechanisms of positive and negative opinions; (2) traditional models lack the ability to capture both dynamics simultaneously; (3) it is difficult to effectively model the positive and negative conversion behavior of users; (4) the existing method has low prediction accuracy and is difficult to meet the needs of practical applications. SUMMARY

[0004] The present application provides a method and system for simulating opinion evolution based on a dual-dynamics graph neural ordinary differential equation, which can solve the technical problem of the limitations of traditional data-driven models (such as RNNs) in modeling continuous opinion evolution.

[0005] In a first aspect, the present application provides a method for simulating opinion evolution, which comprises: constructing a social network graph G(V, E), where the nodes V represent users and the edges E represent the relationship between users, and calculating a linear diffusion operator Φ through an adjacency matrix A and a node similarity matrix D; inputting a user opinion matrix X(0:T-1), separating positive and negative opinions through a dual-opinion encoder, and generating a hidden space state ; based on Φ and establishing a dual-dynamics graph ordinary differential equation, modeling the evolution of positive and negative opinions independently through positive and negative opinion dynamic equations and capturing their interaction patterns; the dual-dynamics graph ordinary differential equation comprises the positive and negative opinion dynamic equations, respectively modeling the evolution of positive and negative opinions and capturing the correlation between users through a linear diffusion operator Φ to obtain the dual-dynamics graph ordinary differential equation; and negative opinions ; mapping the hidden state back to the opinion space through an opinion synthesis decoder to generate a predicted opinion sequence X(T:T+ΔT); optimizing the model parameters using a composite loss function, the composite loss function comprising a weighted mean squared error term, an initial state error term, a smoothness regularization term, a gradient regularization term, and a positive and negative opinion repulsion constraint term.

[0006] In combination with the first aspect, in an implementation, the user opinion matrix X(0:T-1) contains the initial time stamp in the training set, used to calculate the positive opinion proportion p, with a probability p of being assigned a value of 1 and a probability of 1-p of being assigned a value of -1, wherein a random initialization vector is generated according to the positive opinion proportion p in .

[0007] In combination with the first aspect, in an implementation, the opinion state initialization is achieved through the following steps: the positive opinion proportion p is calculated according to the initial time stamp in the training set, and a random initialization vector is generated, wherein a value of 1 is assigned with a probability p and a value of -1 is assigned with a probability of 1-p; positive and negative opinions are separated to obtain positive opinions and negative opinions ; wherein , ; and are mapped to initial hidden states and through a Sigmoid function; wherein , , the matrix , and the bias term is a learnable bias term; the opinion estimate value of the first time stamp is obtained by calculating , as the initial state of the model; the Sigmoid function ensures The output range of the linear layer is [-1, 1], which is consistent with the actual distribution of user opinions, as the initial state of the dynamic equation, the predicted value for generating the subsequent timestamp; , , , , , , and are set as learnable parameters, and the initial state is dynamically adjusted by optimizing the loss function.

[0008] In combination with the first aspect, in an implementation, the calculation formula of the linear diffusion operator Φ is ; wherein A is an adjacency matrix, and D is a similarity matrix; The dual-view encoder is implemented by the following steps: obtaining the positive view part and the negative view part ; wherein , ; mapping , , , and to hidden space states , Y2(t) by a linear layer and ; wherein and are the positive part and the negative part of the hidden state respectively, and the symbol | represents concatenating two two-dimensional tensors along the second dimension; concatenating and to generate .

[0009] In combination with the first aspect, in an implementation, the dynamic equation of the dual-dynamics graph ordinary differential equation is:

[0010] wherein and are the hidden states of the positive view part and the negative view part of the system at time t respectively, the weight and the bias are learnable parameters, is the hidden state of the system at time , which is obtained by integrating the solution of the dynamic equation, is the transpose of the adjacency matrix A, used to model the reverse association relationship.

[0011] In conjunction with the first aspect, in one implementation, the viewpoint synthesis decoder is implemented through the following steps: Output of dynamic equations and Generate by applying the Sigmoid function respectively and ;in, , ; according to and Calculate the predicted view sequence ;in, .

[0012] In conjunction with the first aspect, in one implementation, the composite loss function takes the following specific form: ; in, , , , , , , , ,as well as These are custom coefficients. This is the user activity coefficient at time t, used to dynamically adjust the loss weight.

[0013] In conjunction with the first aspect, in one embodiment, the method further includes: The training set is obtained by constructing a dataset from real social network data and generative data. The real social network data is generated by crawling public topic discussions and labeling user opinion tendencies. The generative data is generated by simulating the evolution of user opinions based on a statistical physics model. Controllable training data is generated by parameterizing user interaction rules and initial opinion distribution.

[0014] Secondly, embodiments of this application provide a viewpoint evolution simulation system, the viewpoint evolution simulation system comprising: The data preprocessing module is used to construct a social network graph G(V,E), where nodes V represent users and edges E represent the relationships between users. The linear diffusion operator Φ is calculated using the adjacency matrix A and the node similarity matrix D. The first processing module is used to take the user view matrix X(0:T-1) as input, separate the positive and negative views through a dual-view encoder, and generate the latent space state. ; The second processing module is used for processing based on Φ and A dual-dynamic graph ordinary differential equation is established to independently model the evolution of positive and negative viewpoints and capture their interaction patterns through dynamic equations for both viewpoints. The dual-dynamic graph ordinary differential equation includes dynamic equations for both positive and negative viewpoints, respectively modeling the positive viewpoint. and negative opinions The evolution of the graph is obtained by capturing the relationship between users through Φ and obtaining the ordinary differential equation of the dual dynamic graph; The third processing module is used to process the hidden state through the view synthesis decoder. Map back to the opinion space to generate the predicted opinion sequence X(T:T+ΔT); The fourth processing module is used to optimize the model parameters using a composite loss function, which includes a weighted mean square error term, an initial state error term, a smoothness regularization term, a gradient regularization term, and a positive and negative viewpoint mutual exclusion constraint term.

[0015] In conjunction with the second aspect, in one implementation, the data preprocessing module obtains a training set by constructing a dataset based on real social network data and generative data; the real social network data is generated by crawling public topic discussion content and labeling user opinion tendencies, and the generative data is generated by simulating the evolution process of user opinions based on a statistical physics model, and controllable training data is generated by parameterizing user interaction rules and initial opinion distribution.

[0016] The beneficial effects of the technical solutions provided in this application include: By independently modeling the dynamics of positive and negative viewpoints using dual-dynamic graph ordinary differential equations, and combining this with a composite loss function to constrain the smoothness and mutual exclusivity of hidden states, the prediction performance is significantly improved. Attached Figure Description

[0017] Figure 1 This is a flowchart illustrating an embodiment of the viewpoint evolution simulation method of this application; Figure 2 This is a schematic diagram of the model architecture of BDG-ODE in one embodiment of this application; Figure 3 This is a schematic diagram of the functional modules of an embodiment of the viewpoint evolution simulation system of this application. Detailed Implementation

[0018] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.

[0019] First, some of the technical terms used in this application will be explained to help those skilled in the art understand this application.

[0020] Neural dynamic equations, also known as neural ordinary differential equations (NODEs), primarily use neural networks to fit the derivatives of the hidden states. NODEs combine differential equation solvers with neural networks, and can be understood as a continuous form of a residual neural network (ResNet). There are several variants of NODEs, such as Neural Controlled Differential Equations (NCDEs) and Graph Ordinary Differential Equations (Graph-ODEs).

[0021] Specifically, NCDE is designed to handle multivariate time series with irregular sampling and partial observations. By introducing control signals, it adjusts the trajectory based on subsequent observations and is therefore considered a continuous correspondence of recurrent neural networks (RNNs). Graph-ODE, implemented by combining graph neural networks (GNNs) and NODEs, focuses on learning the dynamics of processes in complex networks such as ecosystems and transportation networks. When simulating the dynamics of viewpoints on social networks, the inventors focused on three variants of Graph-ODE: the basic Graph-ODE, Graph-ODE with encoding and decoding capabilities, and Graph Control Differential Equations (Graph-NCDE).

[0022] The basic graph ordinary differential equation (Graph-ODE) can be described by the following expression:

[0023] The system consists of It consists of interconnected nodes, each node having dimensional features, Indicates the system in time The state at that time. Represents the network structure, while express The initial state at time. Ordinary differential equation function. It describes the mechanism by which the system state changes over time.

[0024] Social network modeling: The inventor will be... A social network composed of individual users is modeled as a directed graph. , where nodes represent users and edges represent relationships between users (e.g., following, friend relationships). When a user... Follow users At that time, there exists in the diagram from arrive The edges. This graph is composed of an adjacency matrix. Indicated. The inventor used... Indicates time All A user's opinion vector, defined As the initial distribution of user opinions. Indicates time Users on social networks The viewpoint A value of -1 indicates a negative view, and 1 indicates a positive view.

[0025] Opinion Evolution Problem: By modeling the mechanism that drives opinion evolution and predicting future user opinions, for example, given a social network graph G(V,E) and a user opinion matrix X(0:T-1), predict the user opinion Xˆ(T:T+ΔT) within any future time window (T,T+ΔT).

[0026] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0027] In a first aspect, embodiments of this application provide a method for simulating viewpoint evolution.

[0028] In one embodiment, reference is made to Figure 1 , Figure 1 This is a flowchart illustrating an embodiment of the viewpoint evolution simulation method of this application. Figure 1 As shown, the above-mentioned viewpoint evolution simulation methods include: Step S1: Construct a social network graph G(V,E), where node V represents a user and edge E represents the relationship between users. Calculate the linear diffusion operator Φ using the adjacency matrix A and the node similarity matrix D.

[0029] Step S2: Input the user opinion matrix X(0:T-1), separate positive and negative opinions using a dual-opinion encoder, and generate latent space states. The latent space states are... .

[0030] Step S3: Establish dual-dynamic graph ordinary differential equations based on the linear diffusion operator and the latent space state. The evolution of positive and negative viewpoints is independently modeled and their interaction patterns are captured through dynamic equations for both viewpoints. The aforementioned dual-dynamic graph ordinary differential equations include dynamic equations for both positive and negative viewpoints, respectively modeling the positive viewpoint. and negative opinions The evolution of the graph is obtained by capturing the correlation between users through Φ, and the ordinary differential equation of the dual dynamic graph is obtained.

[0031] Step S4: Map the hidden states back to the view space using the view synthesis decoder to generate the predicted view sequence X(T:T+ΔT).

[0032] Step S5: Optimize model parameters using a composite loss function. The composite loss function includes a weighted mean square error term, an initial state error term, a smoothness regularization term, a gradient regularization term, and a positive and negative viewpoint mutual exclusion constraint term.

[0033] In this embodiment, a Bi-Dynamic Graph ODE (BDG-ODE) model is proposed. This model aims to integrate the independent and intertwined dynamic mechanisms of positive and negative viewpoints, and combine them with the characteristics of social networks, thereby more accurately capturing and modeling the evolution of user viewpoints in social networks.

[0034] like Figure 2 As shown, the model comprises three key components: a dual-viewpoint encoder, a dual-dynamic graph ordinary differential equation module, and a viewpoint synthesis decoder. The core idea of ​​the model is to divide the evolution of viewpoint dynamics in social networks into two independent processes: positive viewpoint dynamics and negative viewpoint dynamics, enabling the model to learn both processes simultaneously. This dual-path framework allows the inventors to effectively model the two dynamics and their interaction patterns, thereby effectively simulating viewpoint evolution.

[0035] Specifically, this proposal suggests a framework for continuously learning temporal dynamics and naturally incorporating the complex structural information of social networks into the modeling process. This framework overcomes the limitations of traditional data-driven models (such as RNNs) in modeling continuous viewpoint evolution and can effectively capture the characteristics of social networks.

[0036] Furthermore, this scheme constructs a novel bidirectional viewpoint modeling method, which employs two distinct but intertwined graph neural networks to enhance the model's sensitivity to subtle viewpoint evolution. The bidirectional viewpoint modeling method addresses the problem that the NODE method cannot simultaneously learn two dynamic processes.

[0037] In summary, by using dual dynamic graph ordinary differential equations to model the independent evolution of positive and negative viewpoints and dynamically capture their interaction patterns, the problem of traditional single dynamic models being unable to learn the dynamics of positive and negative viewpoints simultaneously is solved, significantly improving the prediction accuracy of viewpoint changes in complex social networks.

[0038] Furthermore, in one embodiment, the aforementioned user opinion matrix X(0:T-1) includes the initial timestamps from the training set. Used to calculate the proportion of positive opinions, p. Assign the value 1 to probability p, and assign the value -1 to probability 1-p, where, according to The proportion of positive viewpoints p generates a random initialization vector. .

[0039] In this embodiment, based on The proportion of positive viewpoints p generates a random initialization vector. This avoids direct use of raw data and noise interference, and improves the model's adaptability to the initial state.

[0040] Furthermore, in one embodiment, viewpoint state initialization is achieved through the following steps: Based on the initial timestamps in the training set Calculate the proportion of positive opinions, p, and generate a random initialization vector. ,in Assign the value 1 to probability p, and assign the value -1 to probability 1-p.

[0041] right By separating positive and negative perspectives, a positive viewpoint is obtained. and negative opinions .in, , .

[0042] By using the Sigmoid function and Mapped to the initial hidden state and .in, , ,matrix Bias term This is a learnable bias term.

[0043] Through calculation The first timestamp of the opinion estimate is obtained and used as the initial state of the model. The Sigmoid function ensures The output range is [-1, 1], which is consistent with the actual distribution of user opinions. As the initial state of the dynamic equation, it is used to generate predicted values ​​for subsequent timestamps.

[0044] Will , , , , ,as well as All parameters are set as learnable parameters, and the initial state is dynamically adjusted by optimizing the loss function.

[0045] In this embodiment, the initial hidden state is dynamically optimized by learnable parameters to improve the model's adaptability to different initial distributions.

[0046] In one specific embodiment, to avoid direct use To address potential biases introduced by the initial values, this scheme employs a random initialization method. Specifically, to utilize the training set... Prior knowledge is generated using the following formula. : , in, yes The percentage of users holding a positive view. The model is then initialized as follows: , , , in, and As initial values ​​for the model, the Sigmoid function is used to ensure that their values ​​are within a certain range. Within the range. Matrix Bias term They are all used as learnable parameters in model initialization. This represents the view estimate for the first timestamp in the dataset. Finally, and Set as a learnable parameter so that a better initial value can be learned by optimizing the loss function.

[0047] The formula for calculating the linear diffusion operator Φ above is as follows: Where A is the adjacency matrix and D is the similarity matrix.

[0048] Furthermore, in one embodiment, the calculation formula for the above-mentioned linear diffusion operator Φ is as follows: Where A is the adjacency matrix and D is the similarity matrix.

[0049] The above dual-view encoder is implemented through the following steps: Obtaining positive viewpoints and negative viewpoints .in, , .

[0050] Through linear layer , , ,as well as Will Y2(t) is mapped to the latent space state. and .in, and Hidden state The positive and negative aspects of . ,symbol[ | [] indicates that two two-dimensional tensors are joined together along the second dimension.

[0051] splicing and generate .

[0052] In this embodiment, BDG-ODE redefines Graph Convolution Neural Networks (GCNs) to account for the mutual influence between users with positive and negative viewpoints. The ReLU function is used to ensure non-linearity and enhance the model's expressive power. It is an adjacency matrix of user attention relationships. This is the corresponding node similarity matrix. Considering the symmetry of the viewpoint evolution process, the inventors set... This dual-path approach is a significant feature that distinguishes BDG-ODE from traditional graph ordinary differential equation models, enabling it to handle the complexity of social networks.

[0053] The linear diffusion operator Φ accurately captures user relationships, and the hidden states are spliced ​​along the second dimension by a dual-view encoder. and This enhances the efficiency of multidimensional feature extraction.

[0054] Furthermore, in one embodiment, the dynamic equation of the above-mentioned dual-dynamic graph ordinary differential equation is:

[0055] in, and Let represent the hidden states of the positive and negative viewpoints of the system at time t, and their weights. and bias For learnable parameters, For the system in The hidden state at time t is obtained by solving the integral dynamic equation. This is the transpose of the adjacency matrix A, used to model reverse association relationships.

[0056] In this embodiment, considering that the evolution of viewpoints in social networks is a continuous-time process, the concept of graph ordinary differential equations (Graph-ODEs) is used to model it. Furthermore, the evolutionary dynamics of different viewpoints in social networks vary, yet they influence each other. Therefore, a dual-dynamic graph ordinary differential equation (BDG-ODE) is proposed to capture the inherent dynamics of various viewpoints and their interactions, thus providing a more comprehensive framework for understanding and predicting the evolution of viewpoints in social networks.

[0057] Modeling is performed using dynamic equations. and The evolution, Introducing reverse correlations enhances the model's ability to fit complex interaction patterns.

[0058] Furthermore, in one embodiment, the above-mentioned viewpoint synthesis decoder is implemented through the following steps: Output of dynamic equations and Generate by applying the Sigmoid function respectively and .in, , .

[0059] according to and Calculate the predicted view sequence .in, .

[0060] In this embodiment, to independently process the state criteria of positive and negative viewpoints and reintegrate them to form viewpoint prediction values, the inventors proposed a viewpoint synthesis decoder. The decoder transforms the representations in the latent space back into the viewpoint space, thereby enabling a more detailed analysis of how each type of viewpoint affects the overall viewpoint state.

[0061] Where the matrix The learnable parameters used for decoding, and the corresponding bias terms are: and Furthermore, the latent space representations of positive and negative opinions are mapped back to the original opinion space through a sigmoid activation function, thereby ensuring that the reconstructed opinion values ​​remain within the original space. Within the range.

[0062] By mapping the hidden state back to the [-1,1] interval using the Sigmoid function, the distribution of real user opinions is aligned, reducing the deviation between the prediction results and the actual values.

[0063] Furthermore, in one embodiment, the specific form of the above-mentioned composite loss function is as follows: .

[0064] in, , , , , , , , ,as well as These are custom coefficients. This is the user activity coefficient at time t, used to dynamically adjust the loss weight.

[0065] In this embodiment, the proposed method aims to predict the evolution of viewpoints. This method selects a weighted mean square error function. As a loss function. Indicates the first The model calculates the total number of users who changed their opinions each day (from negative to positive or from positive to negative), and includes a bias term to account for days when no users changed their opinions. By weighting the mean squared error, the model can better focus on time points where user opinions fluctuate significantly.

[0066] Based on this, the initial values ​​learned by the computational model are... and the true value of user opinions (exist mean square error (at time) To ensure the accuracy of the initial values ​​used for evolution.

[0067] Furthermore, to make the prediction results smoother, this scheme adds two regularization terms to the model. and ,in, It is the second difference of the predicted value. It is the predicted value relative to The squared gradient.

[0068] For a given user, the weight representing a positive viewpoint and the weight representing negative viewpoints Both should not be non-zero. Therefore, the inventors added a constraint loss function. .

[0069] Overall, during the training process, the inventors optimized the sum of the following weighted losses to obtain... ,in, , , and It is an adjustable hyperparameter used to balance the weights of the five loss terms.

[0070] By jointly optimizing mean squared error, smoothness, gradient constraints, and mutual exclusion terms using a composite loss function, prediction accuracy and model stability are balanced, and overfitting and non-zero value conflicts are avoided.

[0071] Furthermore, in one embodiment, the above method further includes: The training set is derived by combining real-world social network data and generative data. The real-world social network data is generated by crawling public topic discussions and labeling user opinion tendencies. The generative data simulates the evolution of user opinions based on a statistical physics model, and controllable training data is generated by parameterizing user interaction rules and initial opinion distribution.

[0072] In this embodiment, the inventors used six datasets in the specific application: three were real data from the internet, and the other three were artificially generated datasets, each with unique characteristics. These diverse datasets enabled the inventors to comprehensively test the model in different scenarios.

[0073] Real-world datasets: Three real-world datasets were collected from Twitter, named Nuclear, GenDiscrim, and Politics. Tweets related to these three specific topics were searched using manually selected keywords. Using Twitter's public API, these tweets covered the time range from January 1, 2022 to December 31, 2022. Each dataset includes the tweet's date, time, user, and text content. The tweets were then labeled using a large model. Tweets were categorized as "positive," "irrelevant," or "negative" based on content. Furthermore, the model provided the rationale for assigning the corresponding labels. The three datasets contain follower graphs for 9346 (Nuclear), 7117 (GenDiscrim), and 9485 (Politic), respectively. In the real-world datasets, most users did not post relevant tweets or remained silent; therefore, only data from users with explicit opinions were used for evaluation to calculate losses and metrics. However, in the inventors' model, the evolution of opinions is simulated through a complete user follower graph, as all users contribute to the opinion evolution process.

[0074] Dataset Generation: The inventors used three manually generated datasets, named f1, f2, and f3 respectively, based on the different strengths of the forces exerted by the viewpoints. These datasets were generated based on a state-of-the-art statistical physics model. In f1, the forces exerted by both positive and negative viewpoints were set to be very strong. In f2, the difference in forces between the two viewpoints was set to a large value. In f3, the forces exerted by the positive and negative viewpoints underwent abrupt changes during the evolution. The inventors' simulations involved user attention graphs, where f1 and f2 contained... One user, while f3 contains One user. All simulations are running. Each time step. To ensure fair comparison, the inventors converted the simulated continuous viewpoint values ​​into two discrete labels, which were then used as input to the model.

[0075] By combining real social network data with data generated by statistical physical models, the diversity of the training set is expanded, thereby improving the model's generalization ability and anti-interference capabilities in different scenarios.

[0076] In one specific embodiment, the inventors compared the performance of BDG-ODE with eight state-of-the-art (SOTA) methods, as detailed below: Voter: Voter is the basic model of opinion dynamics. In this model, at each time step, an individual randomly selects another individual and adopts that individual's opinion.

[0077] SLANT: SLANT is a more advanced model that uses a point-in-time process approach, focusing on how the opinions of others influence individual opinions over time. It also models interactions and their time-decay properties through self-excitation mechanisms.

[0078] DeGroot: The DeGroot model assumes that individuals update their own opinions based on a weighted average of the opinions of others.

[0079] FNN: This model contains a multi-layer feedforward neural network (FNN) to predict the evolution of individual viewpoints and learn hidden user representations from user attributes through a language model.

[0080] SINN (Sociologically-Informed Neural Network) combines theoretical dynamics with social media data. It utilizes the principles of physical information neural networks to reconstruct these dynamics as ordinary differential equations.

[0081] NDCN: Neural Dynamics on Complex Networks is a graph-based ODE model used to simulate dynamics on graphs. The inventors adapted the encoder and decoder of NDCN to suit viewpoint dynamics tasks and set its initial state to be learnable.

[0082] STGNCDE: STGNCDE uses two neuronormal differential equations (NCDEs) to model time and space respectively, and combines them to predict sequence data.

[0083] FourierGNN: Based on graph neural networks, FourierGNN employs a unique hypervariable graph approach to model the evolution of viewpoint dynamics on graphs.

[0084] The inventors divided the above benchmark models into two groups: the first five models belong to the traditional method domain of viewpoint dynamics, while the last two models belong to graph-based ordinary differential equations (Graph-ODE).

[0085] In this part of the experiment, the inventors aimed to evaluate the model's effectiveness in predicting the evolution of opinion dynamics. To this end, the inventors utilized a user opinion matrix. and social network graphs As the primary data source, the inventors' model aims to learn the dynamic characteristics of user opinions within the training set and predict dynamic changes in user opinions based on a continuous time frame. During data segmentation, the inventors' method primarily uses the first 40% of the dataset for training, the next 10% for validation, and the remaining 50% as a test set to comprehensively evaluate the model's predictive accuracy. Specifically, for the simulated dataset (50 days), this method allocates the first 20 days for training, the next 5 days for validation, and the last 25 days for testing. For the real-world dataset (20 days), the first 8 days are allocated for training, the next 2 days for validation, and the last 10 days for testing. To evaluate model performance, the inventors primarily focus on four key metrics: Accuracy, F1 Score, Mean Squared Error of Difference (MSED), and Correlation Coefficient.

[0086] Accuracy is a metric that directly measures the proportion of correct predictions made by a model across all predictions. Its formula is: , in, Indicates the predicted value. For the true value, This represents the total number of samples. This metric reflects the overall accuracy of the model's predictions.

[0087] The F1 score is a balanced measure of a model's precision and recall, and its formula is as follows: , in: , For a real example, As a false positive example, This is a false negative.

[0088] The formula for the mean squared difference error (MSED) is: , , The smaller the MSED, the higher the accuracy of the model's prediction of data trends.

[0089] The correlation coefficient (Cor) is used to measure actual values. and predicted value The strength and direction of the linear relationship between them are given by the following formula: , The closer the correlation coefficient is to 1, the stronger the positive correlation.

[0090] During training, the inventors employed a composite loss function, considering both the mean squared error (MSE) between predicted and actual values ​​and introducing three regularization terms. Specifically, they used derivative-based regularization to ensure the smoothness and stability of the model's predictions. Furthermore, the model penalizes... and Simultaneously, non-zero values ​​are taken to ensure that the same user has only one of positive or negative opinions at any given time.

[0091] In model optimization, the inventors chose the RMSprop optimizer, a widely used method in deep learning, particularly suitable for handling non-stationary targets and training recurrent neural networks. The learning rate was set to... to The weight decay is set to The inventors manually searched within these ranges to find the optimal learning rate and weight decay parameters, thereby ensuring the best performance of the model.

[0092] The experimental results on real-world datasets are shown in Table 1. The Voter model performed the worst in terms of accuracy and F1 score on both datasets, with a correlation coefficient almost zero due to its randomness. SLANT's predictive ability is limited by fixed social interaction parameters. The DeGroot model has a high MSED because it assumes all users eventually reach consensus, which differs from the dynamics of opinion in real-world social networks. In contrast, FNN performs better because its deep learning-based approach can model the complex dynamics of opinion in real-world social networks. SINN, NDCN, and FourierGNN perform better, with SINN considering theoretical knowledge, NDCN incorporating the graph structure of social networks, and FourierGNN unifying spatiotemporal modeling through hypervariable graphs. NDCN's MSED is lower than SINN and FourierGNN, demonstrating the effectiveness of the Graph-ODE method in capturing long-term dynamics. STGNCDE performed poorly on both datasets. Although designed to capture complex spatiotemporal patterns, it is more suitable for networks with strong regularity (such as traffic flow). In the more irregular dynamics of opinion in social networks, STGNCDE cannot effectively respond to changes. The inventors' model's performance improvement compared to NDCN and STGNCDE demonstrates that Graph-ODE cannot be directly used for dynamic viewpoint modeling. Overall, on the Nuclear, GenDiscrim, and Politics datasets, the inventors' model shows significant improvements over the seven benchmark models, highlighting the importance of the bidirectional encoder-decoder framework. On the Nuclear dataset, accuracy improved by an average of 24.18%, F1 score improved by 26.31%, MSED decreased by 96.23%, and relevance improved by 79.52%. Similar performance improvements were also observed on the GenDiscrim and Politics datasets, further validating the robustness and effectiveness of the inventors' method.

[0093] Table 1 Comparison of average performance of different algorithms on real datasets.

[0094] Experimental results on generated datasets: As shown in Table 2, Voter and SLANT still perform poorly on generated datasets. DeGroot's better performance on the f1 and f2 datasets is due to the high but relatively stable rate of view change in these datasets, which facilitates rapid convergence of the model using the average of neighboring views. However, on the f3 dataset, the performance of DeGroot, SINN, and NDCN declines, indicating that these models are insufficient in dealing with sudden changes in view dynamics. FourierGNN performs steadily but is still inferior to the inventor's model. In contrast, the inventor's model achieves significant performance improvements on all three datasets. Specifically, on the f1 dataset, accuracy is improved by 18.70%, F1 score by 22.13%, relevance by 67.94%, and MSED by 82.94%. Similar performance changes on the f2 and f3 datasets further demonstrate the superiority and applicability of the inventor's model in various aspects.

[0095] Table 2. Average performance comparison of different algorithms on the generated dataset.

[0096] The inventors conducted ablation studies on the loss function and the dual dynamics framework on the Politico and f3 datasets. Table 3 shows that the model's performance degraded on both datasets after removing different components. In particular, for the Politico dataset, the removal of... The impact is greatest because this regularization term helps the model maintain predictive stability after viewpoint shifts. This validates the effectiveness of the dual dynamics framework and its components.

[0097] Table 3. Ablation study results of loss function and BDG-ODE on two datasets.

[0098] Overall, the inventors proposed the Dual Dynamics Graph Ordinary Differential Equation (BDG-ODE) model to simultaneously model the evolution of positive and negative opinions in social networks. Through comprehensive experiments on three real-world datasets and three simulated datasets with unique characteristics, BDG-ODE demonstrates a significant outperformance over existing state-of-the-art techniques in modeling and simulating the dynamics of opinions in social networks. Furthermore, by integrating additional auxiliary information such as broader media content and personal attributes into the BDG-ODE model and synergizing it with larger models for simulations, these improvements are expected to further enhance the model's ability to understand and model complex dynamics in social networks.

[0099] Secondly, embodiments of this application also provide a viewpoint evolution simulation system.

[0100] In one embodiment, reference is made toFigure 3 , Figure 3 This is a schematic diagram of the functional modules of an embodiment of the viewpoint evolution simulation system of this application. Figure 3 As shown, the viewpoint evolution simulation system includes: Data preprocessing module 1 is used to construct a social network graph G(V,E), where node V represents a user and edge E represents the relationship between users. The linear diffusion operator Φ is calculated through the adjacency matrix A and the node similarity matrix D.

[0101] The first processing module 2 is used to input the user view matrix X(0:T-1), separate positive and negative views through a dual-view encoder, and generate latent space states. .

[0102] The second processing module 3 is used for processing based on Φ and A dual-dynamic graph ordinary differential equation is established to independently model the evolution of positive and negative viewpoints and capture their interaction patterns through dynamic equations for both viewpoints. The aforementioned dual-dynamic graph ordinary differential equation includes dynamic equations for both positive and negative viewpoints, respectively modeling the positive viewpoint. and negative opinions The evolution of the graph is obtained by capturing the correlation between users through Φ, and the ordinary differential equation of the dual dynamic graph is obtained.

[0103] The third processing module 4 is used to process the hidden state through the view synthesis decoder. Map back to the opinion space to generate a predicted opinion sequence X(T:T+ΔT).

[0104] The fourth processing module is used to optimize the model parameters using a composite loss function, which includes a weighted mean square error term, an initial state error term, a smoothness regularization term, a gradient regularization term, and a positive and negative viewpoint mutual exclusion constraint term.

[0105] The functions of each module in the above-mentioned viewpoint evolution simulation system correspond to the steps in the above-mentioned viewpoint evolution simulation method embodiment, and their functions and implementation processes will not be described in detail here.

[0106] In one specific embodiment, a user wants to use existing historical user opinion data to predict the evolution trend of user group opinions over a future time period. Existing user opinion data can be processed into a corresponding normalized opinion sequence according to the required time granularity (e.g., hour, day, week). First, a network graph G(V,E) is constructed based on users' social relationships, and user attention relationships are extracted to form an adjacency matrix A. During model training, historical opinion data X(0:T-1) is input into a dual-opinion encoder for positive and negative opinion separation. The opinion evolution mechanism is learned through a dual-dynamic graph ordinary differential equation module, and finally, the prediction result is output by an opinion synthesis decoder. The model is optimized and trained using a composite loss function until convergence. After training, by inputting the current user opinion state, the opinion evolution within any future time window (T, T+ΔT) can be predicted. Specifically, this implementation can predict user opinion evolution sequences with time granularities of 30 minutes, 1 hour, or 1 day.

[0107] In another specific embodiment, a user wants to use existing historical user opinion data to predict the evolution trend of user group opinions over a future time period. Existing user opinion data can be processed into a corresponding normalized opinion sequence according to the required time granularity (e.g., hour, day, week). First, a network graph G(V,E) is constructed based on users' social relationships, and user attention relationships are extracted to form an adjacency matrix A. During model training, historical opinion data X(0:T-1) is input into a dual-opinion encoder for positive and negative opinion separation. The opinion evolution mechanism is learned through a dual-dynamic graph ordinary differential equation module, and finally, the prediction result is output by an opinion synthesis decoder. The model is optimized and trained using a composite loss function until convergence. After training, by inputting the current user opinion state, the opinion evolution within any future time window (T, T+ΔT) can be predicted. Specifically, this implementation can predict user opinion evolution sequences with a time granularity of 30 minutes, 1 hour, or 1 day.

[0108] In another specific embodiment, users need to analyze the evolution of user opinions on social networks after a major event. User posting data before and after the event is collected, and each post is sentiment-labeled using a large language model (positive opinions are labeled 1, negative opinions are labeled -1). A user social relationship network is constructed, and the labeled opinion data and network structure are input into the BDG-ODE model. The model's dual dynamics mechanism can capture the propagation patterns of supporters and opponents' opinions separately and model the mutual influence between the two viewpoints. By setting different prediction time windows, short-term (e.g., within 24 hours) and long-term (e.g., within a week) public opinion evolution trends can be analyzed, providing support for decision-making.

[0109] In another specific embodiment, before launching a new product or marketing campaign, companies need to predict potential changes in consumer opinions. First, they collect historical opinion data and social relationship data from the target user group. Using the anticipated impact of the marketing campaign as the initial perturbation input to the model, BDG-ODE separates positive (supporting purchase) and negative (opposing purchase) opinions using a dual opinion encoder, and models the propagation mechanisms of both opinions using dual dynamic equations. The model can predict the distribution of user opinions at different points in time after the marketing campaign's launch, helping companies optimize their marketing strategies. For example, when predictions indicate that negative opinions may spread on a large scale, companies can prepare countermeasures in advance.

[0110] It should be noted that the sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0111] The terms "comprising" and "having," and any variations thereof, in the specification, claims, and accompanying drawings of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to such process, method, product, or apparatus. The terms "first," "second," and "third," etc., are used to distinguish different objects, etc., and do not indicate a sequence, nor do they limit "first," "second," and "third" to different types.

[0112] In the description of the embodiments of this application, terms such as "exemplary," "for example," or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplary," "for example," or "for instance" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary," "for example," or "for instance" is intended to present the relevant concepts in a concrete manner.

[0113] In the description of the embodiments of this application, unless otherwise stated, " / " means "or". For example, A / B can mean A or B. The "and / or" in the text is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of this application, "multiple" means two or more.

[0114] In some processes described in the embodiments of this application, multiple operations or steps are included in a specific order. However, it should be understood that these operations or steps may not be executed in the order they appear in the embodiments of this application, or they may be executed in parallel. The sequence number of the operation is only used to distinguish different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed sequentially or in parallel, and these operations or steps may be combined.

[0115] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device to execute the methods described in the various embodiments of this application.

[0116] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A method for simulating the evolution of viewpoints, characterized in that, The viewpoint evolution simulation method includes: Construct a social network graph G(V,E), where nodes V represent users and edges E represent relationships between users. Calculate the linear diffusion operator Φ using the adjacency matrix A and the node similarity matrix D. Input user opinion matrix X(0:T-1), separate positive and negative opinions using a dual-opinion encoder, and generate latent space states. ; Based on Φ and A dual-dynamic graph ordinary differential equation is established to independently model the evolution of positive and negative viewpoints and capture their interaction patterns through dynamic equations for both viewpoints. The dual-dynamic graph ordinary differential equation includes dynamic equations for both positive and negative viewpoints, respectively modeling the positive viewpoint. and negative opinions The evolution of the graph is obtained by capturing the correlation between users through the linear diffusion operator Φ, and the ordinary differential equation of the dual dynamic graph is obtained. The hidden state is obtained through the view synthesis decoder. Map back to the opinion space to generate the predicted opinion sequence X(T:T+ΔT); The model parameters are optimized using a composite loss function, which includes a weighted mean square error term, an initial state error term, a smoothness regularization term, a gradient regularization term, and a positive and negative viewpoint mutual exclusion constraint term.

2. The viewpoint evolution simulation method as described in claim 1, characterized in that, The user opinion matrix X(0:T-1) contains the initial timestamps from the training set. Used to calculate the proportion of positive opinions, p. Assign the value 1 to probability p, and assign the value -1 to probability 1-p, where, according to The proportion of positive viewpoints p generates a random initialization vector. .

3. The viewpoint evolution simulation method as described in claim 2, characterized in that, The initialization of the viewpoint state is achieved through the following steps: Based on the initial timestamps in the training set Calculate the proportion of positive opinions, p, and generate a random initialization vector. ,in Assign 1 to probability p, and -1 to probability 1-p; right By separating positive and negative perspectives, a positive viewpoint is obtained. and negative opinions ;in, , ; By using the Sigmoid function and Mapped to the initial hidden state and ;in, , ,matrix Bias term For learnable bias terms; Through calculation The first timestamp of the opinion estimate is obtained and used as the initial state of the model. The Sigmoid function ensures The output range is [-1, 1], which is consistent with the actual distribution of user opinions. As the initial state of the dynamic equation, it is used to generate predicted values ​​for subsequent timestamps; Will , , , , ,as well as All parameters are set as learnable parameters, and the initial state is dynamically adjusted by optimizing the loss function.

4. The viewpoint evolution simulation method as described in claim 1, characterized in that, The formula for calculating the linear diffusion operator Φ is as follows: Where A is the adjacency matrix and D is the similarity matrix; The dual-view encoder is implemented through the following steps: Obtaining positive viewpoints and negative viewpoints ;in, , ; Through linear layer , , ,as well as Will Y2(t) is mapped to the latent space state. and ;in, and Hidden state The positive and negative aspects of . The symbol [⋅∣⋅] represents concatenating two two-dimensional tensors along the second dimension; splicing and generate .

5. The viewpoint evolution simulation method as described in claim 1, characterized in that, The dynamic equation of the ordinary differential equation of the dual dynamics diagram is: in, and Let represent the hidden states of the positive and negative viewpoints of the system at time t, and their weights. and bias For learnable parameters, For the system in The hidden state at time t is obtained by solving the integral dynamic equation. This is the transpose of the adjacency matrix A, used to model reverse association relationships.

6. The viewpoint evolution simulation method as described in claim 1, characterized in that, The viewpoint synthesis decoder is implemented through the following steps: Output of dynamic equations and Generate by applying the Sigmoid function respectively and ;in, , ; according to and Calculate the predicted view sequence ;in, .

7. The viewpoint evolution simulation method as described in claim 1, characterized in that, The specific form of the composite loss function is as follows: ; in, , , , , , , , ,as well as These are custom coefficients. This is the user activity coefficient at time t, used to dynamically adjust the loss weight.

8. The viewpoint evolution simulation method as described in claim 2, characterized in that, The method further includes: The training set is obtained by constructing a dataset from real social network data and generative data. The real social network data is generated by crawling public topic discussions and labeling user opinion tendencies. The generative data is generated by simulating the evolution of user opinions based on a statistical physics model. Controllable training data is generated by parameterizing user interaction rules and initial opinion distribution.

9. A viewpoint evolution simulation system, characterized in that, The viewpoint evolution simulation system includes: The data preprocessing module is used to construct a social network graph G(V,E), where nodes V represent users and edges E represent the relationships between users. The linear diffusion operator Φ is calculated using the adjacency matrix A and the node similarity matrix D. The first processing module is used to take the user view matrix X(0:T-1) as input, separate the positive and negative views through a dual-view encoder, and generate the latent space state. ; The second processing module is used for processing based on Φ and A dual-dynamic graph ordinary differential equation is established to independently model the evolution of positive and negative viewpoints and capture their interaction patterns through dynamic equations for both viewpoints. The dual-dynamic graph ordinary differential equation includes dynamic equations for both positive and negative viewpoints, respectively modeling the positive viewpoint. and negative opinions The evolution of the graph is obtained by capturing the relationship between users through Φ and obtaining the ordinary differential equation of the dual dynamic graph; The third processing module is used to process the hidden state through the view synthesis decoder. Map back to the opinion space to generate the predicted opinion sequence X(T:T+ΔT); The fourth processing module is used to optimize the model parameters using a composite loss function, which includes a weighted mean square error term, an initial state error term, a smoothness regularization term, a gradient regularization term, and a positive and negative viewpoint mutual exclusion constraint term.

10. The viewpoint evolution simulation system as described in claim 9, characterized in that, The data preprocessing module obtains a training set by constructing a dataset from real social network data and generative data. Real social network data is generated by crawling public topic discussions and labeling user opinion tendencies. Generative data is based on statistical physics models to simulate the evolution of user opinions and generates controllable training data by parameterizing user interaction rules and initial opinion distribution.