A Public Opinion Prediction Method and System Based on Cross-Layer Collaborative Temporal Learning Model
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-09
- Publication Date
- 2026-08-14
AI Technical Summary
[0004]现有技术中主要存在以下缺陷:在建模方面大多数仅立足于单一的用户社交网络或孤立的话题内容特征,未能将用户行为与话题演化视为相互影响的协同系统,导致对舆情传播中话题驱动用户、用户反作用话题的双向耦合关系缺乏有效刻画;在动态性刻画方面,传统复杂网络分析多停留在静态结构层面,难以捕捉舆情演化过程中的时序依赖与突发变化,而传播动力学模型虽能描述宏观阶段转移,却因对网络结构和个体行为过度简化,在面对大规模、动态变化的真实社交网络时,预测精度与适应性仍存在一定局限;另外,现有深度学习及图神经网络方法大多基于单层网络结构或仅做简单的多源特征拼接,未能将跨层信息交互与时序演化过程进行深度融合,且传播动力学先验与深度学习之间的结合仍不充分,导致在预测稳定性和传播机理解释方面存在不足
本公开的实施例中,通过将用户行为与话题演化显式建模为随时间演化的用户-话题双层网络,并通过将话题节点表示跨层注入至用户节点表示以刻画用户层网络与话题层网络的协同关系;在此基础上,还采用长短期记忆网络对跨层融合后的用户表示进行时序建模,将跨层信息交互与时序特征学习深度融合,使得跨层协同时序学习模型能够动态捕捉话题演化对用户行为和情感变化的影响,显著提升对舆情非线性演化与突发变化的预测能力;此外,还通过将人群状态作为结构化先验特征引入用户节点时序表示学习过程来约束模型,增强模型对舆情传播内在机制的刻画能力,使舆情预测结果更符合数据分布与传播动力学规律,解决模型预测稳定性不足的问题。
Smart Images

Figure CN122573455A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of public opinion evolution prediction technology, and in particular to a public opinion prediction method and system based on a cross-layer collaborative time series learning model. Background Technology
[0002] With the rapid development of social media platforms, social networks have become an important space for the dissemination of public events, the expression of social emotions, and the formation of group opinions. Compared with the traditional media environment, social media public opinion exhibits more complex characteristics in terms of dissemination subjects, dissemination paths, and evolutionary pace: on the one hand, user behavior is highly heterogeneous, with significant differences among individuals in their willingness to disseminate information, emotional expression, and influence; on the other hand, the semantics of topic content are complex, accompanied by obvious emotional polarization and shifts in group behavior. These factors collectively lead to significant nonlinearity, suddenness, and periodicity in the evolution of public opinion, making the accurate depiction and forward-looking prediction of public opinion trends a considerable challenge.
[0003] Furthermore, from the perspective of dissemination structure, online public opinion does not solely rely on simple social relationships between users for its spread. Instead, it is simultaneously influenced by multiple factors, including the semantic evolution of the topic, user behavior, and group emotional feedback. Social behavior among users generates the basic path for the spread of public opinion, while the topics themselves possess independent lifecycle characteristics. Different topics attract significantly different user groups and exhibit varying emotional inclinations at different stages. During the dissemination of public opinion, user behavior and topic evolution mutually influence and feedback each other, forming a complex co-evolutionary relationship.
[0004] Existing technologies suffer from the following main shortcomings: In terms of modeling, most methods focus only on single user social networks or isolated topic content features, failing to consider user behavior and topic evolution as a mutually influential and collaborative system. This results in a lack of effective characterization of the two-way coupling relationship between topics driving users and users reacting to topics in public opinion dissemination. In terms of dynamic characterization, traditional complex network analysis often remains at the static structural level, making it difficult to capture the temporal dependence and sudden changes in the process of public opinion evolution. While propagation dynamics models can describe macro-level transitions, their oversimplification of network structure and individual behavior limits their prediction accuracy and adaptability when facing large-scale, dynamically changing real social networks. Furthermore, most existing deep learning and graph neural network methods are based on single-layer network structures or simply perform multi-source feature splicing, failing to deeply integrate cross-layer information interaction with temporal evolution processes. The combination of propagation dynamics priors and deep learning is still insufficient, leading to deficiencies in prediction stability and explanation of propagation mechanisms.
[0005] Therefore, it is necessary to provide a new technical solution to improve one or more of the problems existing in the above solutions.
[0006] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0007] The purpose of this disclosure is to provide a public opinion prediction method and system based on a cross-layer collaborative time series learning model, which can significantly improve the prediction ability of nonlinear evolution and sudden changes in public opinion, while also ensuring strong prediction stability.
[0008] According to a first aspect of the present disclosure, a public opinion prediction method based on a cross-layer collaborative temporal learning model is provided, comprising: Construct a user-topic two-layer network that evolves over time. The two-layer network includes a user layer network, a topic layer network, and cross-layer association edges that describe the relationship between the user layer network and the topic layer network. Based on the cross-layer association edge, the topic node representation of the topic layer network is injected across layers into the user node representation of the user layer network to obtain the cross-layer fusion representation of the user node, which includes sentiment features and crowd state encoding. The cross-layer fusion representation of the user node is input into the long short-term memory network for temporal modeling to obtain the temporal state of the user node. Based on the temporal state, a multi-scale prediction output layer is constructed to obtain a cross-layer collaborative temporal learning model. Test samples of user-layer data and topic-layer data are input into the trained cross-layer collaborative time-series learning model to output public opinion prediction results.
[0009] In an exemplary embodiment of this disclosure, the step of injecting the topic node representation of the topic layer network across layers into the user node representation of the user layer network includes: Based on user node representations and topic node representations, construct cross-layer injection weights that change over time: (1) in, Indicates cross-layer weight injection. Represents the cross-level correlation function. , This represents the user node representation. To represent topic nodes, Represents the user layer feature mapping matrix. Represents the topic layer feature mapping matrix; Based on the cross-layer injection weights, the topic node representations of the topic layer network are injected across layers into the user node representations of the user layer network.
[0010] In an exemplary embodiment of this disclosure, the cross-layer fusion of the user node is represented as follows: (2) in, This represents the cross-layer fusion representation of user nodes. This indicates a feature concatenation operation or a weighted fusion operation. Indicates to users A collection of related topic nodes. , This represents the user-topic cross-level adjacency matrix.
[0011] In an exemplary embodiment of this disclosure, the timing state of the user node is represented as follows: (3) in, This indicates the timing status of user nodes. This represents the hidden state of a user node at time step t. This represents the state of memory units in the Long Short-Term Memory (LSTM) network at time step t. This represents the cross-layer fused representation of a user node at time step t. , This represents the user node representation. Indicates user Encoding of the crowd state at time step t ; This represents the hidden state of the user node at time step t-1. This represents the state of the memory units in the Long Short-Term Memory network at time step t-1.
[0012] In an exemplary embodiment of this disclosure, the population status encoding is a SEIDR-based population status encoding, including susceptible individuals, exposed individuals, infected individuals, dissuaders, and recovered individuals.
[0013] In an exemplary embodiment of this disclosure, the construction of a time-evolving user-topic two-layer network includes: Acquire user layer data and topic layer data for multiple consecutive time steps, and use a sliding time window to segment the user layer data and topic layer data to obtain a two-layer network snapshot corresponding to each time step; Construct the user-topic layer network, topic layer network, and cross-layer association edges for the current time window based on the two-layer network snapshot at each time step, so as to obtain the user-topic two-layer network that evolves over time.
[0014] In an exemplary embodiment of this disclosure, before constructing the user layer network, topic layer network, and cross-layer association edges for the current time window based on the two-layer network snapshot at each time step, the process includes: Define the representations of the user layer network, topic layer network, and cross-layer association edges at the current time step: (4) in, The representation of the user-layer network at time step t. Represents a set of user nodes. ; Represents the set of interaction edges between users. ; Represents the feature matrix of user nodes. , Indicates emotional characteristics, Indicates the crowd status code. Represents the feature vector of the basic structure; The representation of the topic layer network at time step t. Represents a set of topic nodes. , Indicates the relationship between topics. , Represents the feature matrix of topic nodes; The set of cross-layer associated edges at time step t is represented.
[0015] In an exemplary embodiment of this disclosure, before inputting the test samples of user-layer data and topic-layer data into the trained cross-layer collaborative temporal learning model, the following steps are included: The training samples of the user layer data and topic layer data are input into the cross-layer collaborative temporal learning model; The mean squared error loss function is used to calculate the population layer proportion prediction loss, the cross-entropy loss function is used to calculate the user-level classification loss, and the multi-task joint loss is calculated based on the population layer proportion prediction loss and the user-level classification loss. The cross-layer collaborative temporal learning model is trained by minimizing the multi-task joint loss to obtain the trained cross-layer collaborative temporal learning model.
[0016] In an exemplary embodiment of this disclosure, the public opinion prediction results include group-level sentiment ratio prediction results, group-level population state ratio prediction results, and user-level state classification prediction results.
[0017] According to a second aspect of the present disclosure, a public opinion prediction system based on a cross-layer collaborative time-series learning model is provided, applied to the public opinion prediction method based on a cross-layer collaborative time-series learning model as described in any of the preceding claims, comprising: The first construction module is used to construct a user-topic two-layer network that evolves over time. The two-layer network includes a user layer network, a topic layer network, and cross-layer association edges that describe the relationship between the user layer network and the topic layer network. The cross-layer injection module is used to inject the topic node representation of the topic layer network into the user node representation of the user layer network according to the cross-layer association edge, so as to obtain the cross-layer fusion representation of the user node, which includes sentiment features and crowd state encoding. The second construction module is used to input the cross-layer fusion representation of the user node into the long short-term memory network for temporal modeling, obtain the temporal state of the user node, and construct a multi-scale prediction output layer based on the temporal state to obtain a cross-layer collaborative temporal learning model. The prediction module is used to input test samples of user layer data and topic layer data into the trained cross-layer collaborative time series learning model to output public opinion prediction results.
[0018] The technical solution provided in this disclosure may include the following beneficial effects: In the embodiments of this disclosure, user behavior and topic evolution are explicitly modeled as a time-evolving user-topic two-layer network. The collaborative relationship between the user-layer network and the topic-layer network is characterized by injecting topic node representations across layers into user node representations. Furthermore, a Long Short-Term Memory (LSTM) network is used to perform temporal modeling on the fused user representations, deeply integrating cross-layer information interaction with temporal feature learning. This enables the cross-layer collaborative temporal learning model to dynamically capture the impact of topic evolution on user behavior and emotional changes, significantly improving the predictive ability for nonlinear evolution and sudden changes in public opinion. In addition, the model is constrained by introducing crowd states as structured prior features into the user node temporal representation learning process, enhancing the model's ability to characterize the intrinsic mechanisms of public opinion dissemination. This makes the public opinion prediction results more consistent with data distribution and dissemination dynamics, addressing the problem of insufficient model prediction stability.
[0019] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0020] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0021] Figure 1 A flowchart illustrating the steps of the public opinion prediction method based on a cross-layer collaborative time-series learning model in an exemplary embodiment of this disclosure is shown. Figure 2 A schematic diagram illustrating the framework of a cross-layer collaborative temporal learning model in an exemplary embodiment of this disclosure is shown. Figure 3 This illustrates a population state transition diagram in a cross-layer collaborative temporal learning model according to an exemplary embodiment of this disclosure; Figure 4 This diagram illustrates a performance comparison of different models on multiple evaluation metrics in an exemplary embodiment of this disclosure. Figure 5 This diagram illustrates the dynamic evolution trend of various SEIDR groups throughout the entire public opinion cycle in an exemplary embodiment of this disclosure. Figure 6 This diagram illustrates the dynamic evolution trend of the sentiment ratio throughout the entire public opinion cycle in an exemplary embodiment of this disclosure. Figure 7 This illustration shows a heatmap showing the coupling relationship between SEIDR populations and emotion types at different stages of the communication process in an exemplary embodiment of this disclosure. Figure 8 This diagram illustrates the co-evolutionary trend of topic popularity and sentiment polarization in a two-layer network in an exemplary embodiment of this disclosure. Figure 9 A schematic diagram comparing the training loss convergence curves of three cross-layer injection strategies in an exemplary embodiment of this disclosure is shown. Figure 10 This diagram illustrates a comparison of multiple evaluation metrics of three cross-layer injection strategies in sentiment prediction and SEIDR state prediction tasks in exemplary embodiments of this disclosure. Figure 11 This diagram illustrates a comparison between the actual and predicted values of the sentiment ratio in an exemplary embodiment of this disclosure. Figure 12 This diagram illustrates a comparison between the actual and predicted values of the SEIDR state ratio in an exemplary embodiment of this disclosure. Figure 13 This illustrates a bubble diagram showing the performance-stability of different cross-layer injection strategies under dual-task conditions in exemplary embodiments of this disclosure. Figure 14 This diagram illustrates a public opinion prediction system based on a cross-layer collaborative time-series learning model, as shown in an exemplary embodiment of this disclosure. Detailed Implementation
[0022] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, they are provided so that this disclosure will be more comprehensive and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0023] Furthermore, the accompanying drawings are merely illustrative of this disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0024] This example implementation first provides a public opinion prediction method based on a cross-layer collaborative temporal series learning model, referencing... Figure 1 As shown, the method may include steps S101 to S104.
[0025] Step S101: Construct a user-topic two-layer network that evolves over time. The two-layer network includes a user layer network, a topic layer network, and cross-layer association edges that describe the relationship between the user layer network and the topic layer network.
[0026] Step S102: Based on the cross-layer association edge, inject the topic node representation of the topic layer network into the user node representation of the user layer network to obtain the cross-layer fusion representation of the user node, which includes sentiment features and crowd state encoding.
[0027] Step S103: Input the cross-layer fusion representation of the user node into the long short-term memory network for temporal modeling to obtain the temporal state of the user node, and construct a multi-scale prediction output layer based on the temporal state to obtain a cross-layer collaborative temporal learning model.
[0028] Step S104: Input the test samples of user layer data and topic layer data into the trained cross-layer collaborative time series learning model to output the public opinion prediction results.
[0029] In the embodiments of this disclosure, user behavior and topic evolution are explicitly modeled as a time-evolving user-topic two-layer network. The collaborative relationship between the user-layer network and the topic-layer network is characterized by injecting topic node representations across layers into user node representations. Furthermore, a Long Short-Term Memory (LSTM) network is used to perform temporal modeling on the fused user representations, deeply integrating cross-layer information interaction with temporal feature learning. This enables the cross-layer collaborative temporal learning model to dynamically capture the impact of topic evolution on user behavior and emotional changes, significantly improving the predictive ability for nonlinear evolution and sudden changes in public opinion. In addition, the model is constrained by introducing crowd states as structured prior features into the user node temporal representation learning process, enhancing the model's ability to characterize the intrinsic mechanisms of public opinion dissemination. This makes the public opinion prediction results more consistent with data distribution and dissemination dynamics, addressing the problem of insufficient model prediction stability.
[0030] The steps of the method described above in this example implementation will now be explained in more detail.
[0031] In one embodiment, step S101 constructs a user-topic two-layer network that evolves over time, including: defining the representations of the user layer network, topic layer network, and cross-layer association edges at the current time step as follows: (4) in, The representation of the user-layer network at time step t. Represents a set of user nodes. ; This represents the set of interaction edges between users, used to characterize the relationships between forwarding, commenting, and liking behaviors. ; Represents the feature matrix of user nodes. ; It represents sentiment characteristics and is used to describe the user's emotional tendency at the current time step; This represents the user's status code, used to indicate the user's behavioral role in the process of public opinion dissemination; The basic structural feature vector consists of node degree, neighborhood interaction frequency and its statistics within a time window. It is used to provide necessary network topology priors and does not involve additional propagation hypothesis modeling.
[0032] in, The representation of the topic layer network at time step t. Represents a set of topic nodes. , It indicates the relationship between topics, such as semantic similarity or temporal co-occurrence. , This represents the topic node feature matrix. The topic node features include the semantic representation of the topic, its popularity intensity, and its statistical characteristics over time. It is used to characterize the structural features and evolutionary trends of public opinion content.
[0033] in, The set of cross-layer associated edges at time step t is represented when the user... Participate in the topic at time step t When discussions or content are published, establish cross-layer connections between the two. .
[0034] It's important to understand that cross-layer connections represent cross-layer relationships, characterizing the direct coupling between user behavior and topic evolution. This is a crucial structural foundation for achieving collaborative modeling of two-layer networks. Through cross-layer connections, dynamic information from the topic layer can be transmitted to the user layer representation learning process, while aggregated feedback from user behavior can also influence the topic layer representation in turn.
[0035] For example, in step S101, based on the user layer network, topic layer network, and cross-layer association edges defined above, the user-topic two-layer network can be represented as follows: ,in, Indicates a time step.
[0036] It's important to understand that, considering the significant temporal dynamism of social media sentiment dissemination, the aforementioned user-topic two-layer network is extended into a dynamic network structure that evolves over time. That is, for each time step... Both methods can obtain a two-layer network snapshot, thus forming a time-ordered network sequence. Within the dynamic modeling framework, the user layer network, topic layer network, and cross-layer relationships represented by cross-layer edges are all allowed to change over time, and their evolution can be formally represented as follows: ,in, This indicates an unknown mechanism for the evolution of public opinion. Indicates external observation characteristics.
[0037] In one embodiment, based on the user layer network, topic layer network, and cross-layer association edge representations defined above, the construction of the user-topic two-layer network that evolves over time in step S101 may include the following steps S101M and S101N.
[0038] Step S101M: Acquire user layer data and topic layer data for multiple consecutive time steps, and segment the user layer data and topic layer data using a sliding time window to obtain a two-layer network snapshot corresponding to each time step. For example, time step The corresponding two-layer network snapshot can be represented as .
[0039] Step S101N: Construct the user layer network, topic layer network, and cross-layer association edges for the current time window based on the two-layer network snapshot at each time step, so as to obtain the user-topic two-layer network that evolves over time.
[0040] For example, if the time window length is L, then the two-layer network snapshot of the current time window consists of two-layer network snapshots of L consecutive time steps, which can be represented as follows: Each two-layer network snapshot It includes a user layer network, a topic layer network, and cross-layer connections. Within each time window, both user nodes and topic nodes are input with multi-dimensional feature vectors.
[0041] The above approach, through joint temporal modeling of the user-topic two-layer network and node features, learns the implicit mapping relationship, thereby providing a unified data representation and theoretical foundation for the construction of subsequent cross-layer collaborative temporal learning models.
[0042] In the user-topic two-layer network that evolves over time, the user layer and the topic layer respectively characterize the behavioral subject structure and content evolution structure of public opinion dissemination. To effectively characterize the collaborative mechanism of topic-driven user behavior and user feedback reshaping topic popularity during the evolution of public opinion, a cross-layer collaborative mechanism is further introduced. By explicitly modeling the information interaction between user nodes and topic nodes, the dynamic evolution information of the topic layer can be injected into the user layer representation learning process in real time, thereby enhancing the model's ability to perceive sudden changes and structural shifts in public opinion.
[0043] In one embodiment, before injecting the topic node representation of the topic layer network across layers to the user node representation of the user layer network in step S102, a formal expression for cross-layer injection is first defined, as follows: At time step t, the user node's layer representation is as follows: Topic Nodes The representation of is Define the user-topic cross-layer adjacency matrix as follows: ,in, Indicates user Participate in the topic at time step t .
[0044] It is important to understand that the cross-layer collaboration mechanism modulates the user layer representation using the topic layer representation, thereby forming a user node representation that integrates cross-layer information.
[0045] In one embodiment, step S102, which involves injecting the topic node representation of the topic layer network across layers into the user node representation of the user layer network, includes steps S102M and S102N.
[0046] Step S102M: Based on the user node representation Representation of topic nodes Construct cross-layer injection weights that vary over time: (1) in, Indicates at time step At that time, user node With topic nodes The strength of cross-layer correlation between them Represents the cross-level correlation function. , This represents the user node representation. To represent topic nodes, and These represent the attention mapping matrices for the user layer and the topic layer, respectively, used to map the node representations of different layers to a unified relevance measurement space.
[0047] Step S102N: Based on the cross-layer injection weight, inject the topic node representation of the topic layer network into the user node representation of the user layer network.
[0048] Furthermore, the cross-layer fusion of user nodes in step S102N is represented as follows: (2) in, This represents the cross-layer fusion representation of user nodes. This indicates a feature concatenation operation or a weighted fusion operation. Indicates to users A collection of related topic nodes. , This represents a user-topic cross-level adjacency matrix. This represents the feature mapping matrix in the cross-layer message passing process, used to map the topic layer node representations to a feature space consistent with the user layer.
[0049] It should be noted that the cross-layer fused representation of the user node obtained after intra-layer aggregation and cross-layer injection in step S102... It includes the user's current emotional characteristics, SEIDR crowd state encoding, and implicit representations formed based on historical interaction behavior, network structure aggregation, and topic evolution information.
[0050] It should be explained that, as can be seen from formula (2) of step S102N above, the essential difference between different cross-layer injection methods lies in the construction of cross-layer weights. The cross-layer injection weights in step S102M of this application are cross-layer injection weights that change over time. That is, in the construction of cross-layer weights, this application adopts a dynamic matrix injection method, which can characterize the time dependence of cross-layer relationships in the process of public opinion evolution. Through this dynamic weight construction, the cross-layer collaborative temporal learning model can adaptively adjust the intensity of users' attention to different topics at different time steps, thereby more accurately capturing the driving effect of topic popularity changes on user behavior and emotional evolution.
[0051] Of course, in other embodiments, cross-layer weights based on mean injection can also be selected. Mean injection assumes that users have equal-weighted dependencies on the topics they participate in, ignoring the differences between topics. Its cross-layer weights can be defined as follows: This cross-layer weighting provides a simple average of all relevant topics, offering the most basic cross-layer information fusion. However, it cannot characterize the differences in topic popularity or user preferences.
[0052] Of course, in other embodiments, cross-layer weights based on static matrix injection can also be selected. The static injection method introduces a learnable but time-invariant cross-layer weight matrix. Its cross-layer weights can be defined as follows: This cross-layer weighting allows the model to learn the long-term preference relationship between users and topics during training, but the drawback is that it cannot characterize the dynamic characteristics of topic attention changing over time during the evolution of public opinion.
[0053] Building upon the construction of the time-evolving user-topic two-layer network and the cross-layer collaborative modeling, we further construct a cross-layer collaborative temporal learning model for predicting the evolution of social public opinion. This model takes the node representation sequence formed by the user-topic two-layer network within a continuous time window as input. By introducing a long short-term memory network, it models the dynamic evolution of users and topics, thereby depicting the temporal dependencies and stage-specific changes between different network layers during the dissemination of public opinion.
[0054] It should be noted that the process of public opinion dissemination has a significant time dependency; user behavior patterns, changes in topic popularity, and cross-layer collaborative relationships all evolve over time. To effectively capture the dynamic characteristics of the two-layer network in the time dimension, the following section introduces a Long Short-Term Memory (LSTM) network to perform temporal modeling of node representations based on the cross-layer collaborative representation.
[0055] In one embodiment, the timing state of the user node in step S103 is represented as follows: (3) in, This indicates the timing status of user nodes. This represents the hidden state of a user node at time step t. This represents the state of memory units in the Long Short-Term Memory (LSTM) network at time step t. This represents the cross-layer fused representation of a user node at time step t. , This represents the user node representation. Indicates user Encoding of the crowd state at time step t ; This represents the hidden state of the user node at time step t-1. This represents the state of the memory units in the Long Short-Term Memory network at time step t-1.
[0056] The above-mentioned approach of introducing a long short-term memory network to perform temporal modeling of node representations enables the model to maintain its short-term behavioral response capability while effectively mitigating the gradient vanishing problem in long-term temporal modeling, thereby improving its ability to characterize the continuous evolution and phased shifts of public opinion.
[0057] For example, in step S103, a multi-scale prediction output layer is constructed based on the temporal state to obtain a cross-layer collaborative temporal learning model. The multi-scale prediction output layer can be understood as multiple prediction heads with different granularities. For example, multiple independent fully connected layers are constructed to complete the macro-proportion prediction at the group level (the prediction vector corresponding to the sentiment proportion prediction at the group level and the prediction vector corresponding to the population state proportion prediction at the group level) and the state classification task at the individual level (the prediction probability distribution corresponding to the user-level state classification prediction).
[0058] It should be noted that the representation of topic nodes can be updated through independent temporal models to capture the evolution of topic popularity and semantic structure over time. The joint modeling of the user layer and the topic layer in the temporal dimension provides a dynamic representation foundation for subsequent cross-layer collaboration and multi-task prediction.
[0059] It needs to be explained that the framework of the cross-layer collaborative temporal learning model constructed in step S103 is as follows: Figure 2 As shown, the cross-layer collaborative temporal learning model consists of two interconnected subsystems: a user-layer network and a topic-layer network. The user-layer network characterizes the interaction relationships between users and their behavioral state evolution, while the topic-layer network describes the organizational structure and popularity characteristics of public opinion content. The two-layer network is coupled through cross-layer user-topic association edges, thus unifying the modeling of user behavior and topic evolution. Based on the input user-layer and topic-layer data, a two-layer network model is performed to obtain a user-topic two-layer network that evolves over time. Furthermore, based on this user-topic two-layer network, cross-layer interactive learning is conducted through an explicit cross-layer collaborative mechanism and temporal modeling to achieve multi-scale predictive output of the public opinion evolution process.
[0060] At the feature level of the cross-layer collaborative temporal learning model, user node inputs not only include sentiment features but also incorporate SEIDR (Susceptible-Exposed-Infectious-Discourager-Recovered) population state codes to characterize users' behavioral roles at different stages of public opinion dissemination. Topic nodes comprehensively consider semantic representation, popularity intensity, and their temporal evolution characteristics. Based on these two-layer network node features, the cross-layer collaborative temporal learning model introduces a cross-layer attention injection module to dynamically inject topic-layer information into the user layer and update the topic-layer representation through user behavior aggregation. This explicitly models the collaborative evolution mechanism of topics driving users and users reacting to topics.
[0061] At the temporal dimension of the cross-layer collaborative temporal learning model, the model jointly models two-layer network snapshots within continuous time windows to learn the inherent laws governing the evolution of the public opinion system over time. Ultimately, within a unified framework, the model simultaneously supports group-level sentiment ratio prediction and SEIDR population state ratio prediction, as well as user-level state or category prediction, achieving multi-task modeling and comprehensive characterization of the social public opinion evolution process.
[0062] It should also be explained that the traditional SEIR (Susceptible-Exposed-Infectious-Recovered) model is different. The SEIDR population status in this application, based on the traditional SEIR model, also considers the heterogeneity of susceptible individuals and dissuasion mechanisms. The SEIDR population status in this application corresponds to six population statuses, specifically including: susceptible individuals (S) who have not been exposed to public opinion information, exposed individuals (E) who have been exposed to information but have not spread it, infected individuals (I) who actively spread public opinion, dissuaders (D) who have an inhibitory effect on the spread of public opinion, and recovered individuals (R) who have stopped spreading or lost interest. Among them, susceptible individuals (S) include highly susceptible individuals (S1) and moderately susceptible individuals (S2).
[0063] This application aims to enhance the structural interpretability of cross-layer collaborative temporal learning models for the public opinion dissemination process by introducing SEIDR population status as a structured prior feature into the temporal representation learning process of user nodes. For example, the population status encoding in step S102 is based on SEIDR population status encoding, including susceptible individuals, exposed individuals, infected individuals, dissuaders, and recovered individuals.
[0064] The specific state transition diagram for the SEIDR population state coding is as follows: Figure 3 As shown, let the user The SEIDR population state is encoded at time step t as follows: In the cross-layer collaborative temporal learning model, the SEIDR population state features and the user's cross-layer fusion representation are concatenated at the feature level and used together as input to long short-term memory. And participate in the time-series state update process of user nodes.
[0065] By jointly modeling the temporal representations of users and topic nodes, the cross-layer collaborative temporal learning model can learn the phased characteristics and sudden change patterns of public opinion evolution within a unified framework. The temporal state of user nodes serves as a shared representation, providing a unified temporal feature foundation for subsequent multi-task prediction modules, enabling the model to simultaneously support multi-scale prediction tasks at both the group and individual levels.
[0066] In one embodiment, the public opinion prediction results in step S104 include group-level sentiment ratio prediction results, group-level population state ratio prediction results, and user-level state classification prediction results.
[0067] In one embodiment, before inputting the test samples of user-layer data and topic-layer data into the trained cross-layer collaborative temporal learning model in step S104, the cross-layer collaborative temporal learning model is trained. For the multi-task prediction objectives of step S104, namely, group-level sentiment ratio prediction, group-level population state ratio prediction, and user-level state classification prediction, this application adopts a multi-task joint learning strategy, using a weighted loss function to train the model end-to-end.
[0068] For example, before inputting the test samples of user layer data and topic layer data into the trained cross-layer collaborative temporal learning model, the training steps for the cross-layer collaborative temporal learning model are as follows: The training samples of the user layer data and topic layer data are input into the cross-layer collaborative temporal learning model; The mean squared error loss function is used to calculate the population layer proportion prediction loss, the cross-entropy loss function is used to calculate the user-level classification loss, and the multi-task joint loss is calculated based on the population layer proportion prediction loss and the user-level classification loss. The cross-layer collaborative temporal learning model is trained by minimizing the multi-task joint loss to obtain the trained cross-layer collaborative temporal learning model.
[0069] In one embodiment, the mean squared error loss function is used to calculate the group layer proportion prediction loss. During the training process, it needs to be performed based on the group layer emotion proportion prediction and the group layer crowd state proportion prediction.
[0070] For example, suppose at time step t, there are a total of [number] public opinion monitoring systems. Emotional states, their true proportion vectors are represented as follows: During model training, the cross-layer collaborative temporal learning model, based on the temporal representation of the user layer, predicts the group sentiment ratio at a future time step t+1 and outputs a prediction vector corresponding to the predicted group sentiment ratio. ,in, This represents the mapping function between population layer aggregation and regression.
[0071] For example, suppose at time step t, there are a total of [number] public opinion monitoring systems. The true proportion vector of a SEIDR-like population state is represented as follows: During model training, the cross-layer collaborative temporal learning model predicts the population SEIDR state proportions at a future time step t+1, and outputs a prediction vector corresponding to the predicted population state proportions at the population layer. ,in, This indicates the corresponding prediction head.
[0072] Based on the above-mentioned true proportion vector of emotional states and the prediction vector corresponding to the predicted proportion of emotional states at the group level, as well as the true proportion vector of SEIDR population states and the prediction vector corresponding to the predicted proportion of population states at the group level, the mean squared error loss function can be used to calculate the proportion prediction loss at the group level during model training: (5) in, This indicates the predicted loss based on the proportion of the group stratum. This represents the prediction vector corresponding to the predicted sentiment proportion at the group level. A true proportional vector representing emotional state. This represents the prediction vector corresponding to the prediction of the population state proportion at the group level. The true proportion vector representing the state of the SEIDR population.
[0073] In one embodiment, the cross-entropy loss function is used to calculate the user-level classification loss, and during the training process, classification predictions must be performed based on the user-level state.
[0074] For example, suppose the user At time step The true status label is During model training, the cross-layer collaborative temporal learning model outputs the predicted probability distribution corresponding to the user-level state classification prediction based on the user's temporal representation. ,in, This represents the user-level classification mapping function.
[0075] Based on the predicted probability distributions corresponding to the user's actual state labels at each time step and the user-level state classification predictions, the cross-entropy loss function can be used to calculate the user-level classification loss during model training. (6) in, This represents the user-level classification loss. Indicates user At time step The true status label, Indicates the time step of the model output The predicted probability distribution for user-level state classification prediction.
[0076] In one embodiment, a multi-task joint loss is calculated based on the group layer proportion prediction loss and the user-level classification loss. The multi-task joint loss is: (7) in, Indicates joint loss across multiple tasks. This indicates the predicted loss based on the proportion of the group stratum. This represents the weighting coefficient corresponding to the prediction loss of the group stratum proportion. This represents the user-level classification loss. This represents the weight coefficients corresponding to the user-level classification loss.
[0077] It is important to understand that during the training of the cross-layer collaborative temporal learning model, the training samples for the model are also generated using a sliding time window method for the acquired user layer data and topic layer data. Please refer to step S101M above, which will not be elaborated on here.
[0078] It's also important to understand that the training process for cross-layer collaborative temporal learning models includes two-layer network encoding, cross-layer information injection, temporal modeling, prediction and loss calculation, and parameter updates. The following steps can be used as a reference: Perform two-layer network encoding: At each time step, perform graph representation learning on the user layer network and the topic layer network respectively to obtain the initial embedding representations of user nodes and topic nodes.
[0079] Perform cross-layer information injection: Based on the user-topic cross-layer relationship, inject topic layer information into the user layer representation, and simultaneously introduce user behavior information to update the topic layer representation.
[0080] Execution of temporal modeling: The updated node representations across layers are input into the temporal learning module along the time dimension to capture the time-dependent characteristics of user behavior and topic evolution during the dissemination of public opinion.
[0081] Perform prediction and loss calculation: Based on the specific prediction task, output the group-level proportion prediction result (the prediction vector corresponding to the group-level sentiment proportion prediction and the prediction vector corresponding to the group-level population state proportion prediction) or the user-level state classification prediction result (the prediction probability distribution corresponding to the user-level state classification prediction), and calculate the corresponding loss to obtain the multi-task joint loss.
[0082] Parameter update: The backpropagation algorithm is used to update the model parameters until the model converges on the validation samples or meets the early stopping condition.
[0083] In the model implementation process, this application controls the parameter size, time window length, and training stability. Regarding parameter size control, the dimension of the cross-layer injection matrix is kept consistent with the node embedding dimension to avoid training instability caused by parameter expansion. Regarding time window length control, experiments were conducted to verify the selection of an appropriate time window length, achieving a balance between capturing long-term dependencies and controlling computational complexity. Regarding model training stability, repeated experiments under different random initialization conditions showed minimal performance fluctuations, indicating that the proposed model has good training stability. The above design ensures the trainability of the cross-layer collaborative temporal learning model in a user-topic two-layer network and the reliability of the experimental results.
[0084] It should be noted that before providing a more detailed explanation of step S104, let's first clarify the problem definition of the model for the public opinion prediction task in this application. Let the time interval be... At each time step This application acquires multi-source data related to a specific public opinion event through social media platforms, including user interaction behavior, topic content, and its evolution. The predictive objective of this application is to learn the inherent laws governing the evolution of the public opinion system over time, based on characterizing user behavior features, topic evolution features, and their cross-layer collaborative relationships, and to predict the state of public opinion at future moments.
[0085] Given a historical time window length of In the time interval Based on the observed user-topic two-layer network and node feature sequences, this application aims to learn a mapping function. This enables it to predict the future steps of the public opinion system. The evolutionary state, namely: ,in, Represents the user layer network. Represents a topic-layer network. Indicates cross-level relationships. Indicates the next time step The prediction objective is +1. This prediction objective can be reflected in the overall state ratio change at the group level, such as the prediction of the group-level sentiment ratio or the prediction of the group-level population state ratio, or it can be reflected in the prediction of the user state or behavior category at the individual level, such as the prediction of the user-level state classification, thus forming a unified multi-scale public opinion evolution prediction problem.
[0086] In this embodiment of the application, to further verify the effectiveness of the cross-layer collaborative temporal learning model and the public opinion prediction method based on the cross-layer collaborative temporal learning model proposed in this application, the following simulation experiments were conducted: This experiment uses web crawling technology to acquire public opinion data from real social media platforms. The data covers user behavior and text content information over a specific time span for particular public opinion events, providing a relatively comprehensive reflection of user participation, topic evolution, and the synergistic relationship between the two during the dissemination of public opinion. The constructed dataset is structured around temporal evolution, including user-layer networks, topic-layer networks, and their cross-layer relationships, providing a data foundation for subsequent two-layer dynamic modeling and temporal learning.
[0087] The user-layer data is designed to characterize individual users participating in public opinion dissemination and their interactions. The user-layer dataset contains interaction records between users based on forwarding, commenting, or replying behaviors, and a user-layer network is constructed accordingly. Nodes represent users participating in public opinion discussions, and edges represent the interaction relationships between users. In constructing user node features, this experiment comprehensively considers multi-dimensional user attribute information. On one hand, sentiment state features are extracted from the text content posted by users to characterize their emotional tendencies within different time windows. On the other hand, basic behavioral statistical features such as user activity and posting frequency are introduced, combined with users' historical behavior patterns, to enhance the ability of user representations to characterize behavioral differences. Furthermore, the SEIDR (Search Engine Response) demographic attribute is introduced as one of the structured features of user nodes to characterize differences in user behavioral tendencies during the dissemination of public opinion. Note that the SEIDR state is obtained through a rule-based mapping of user behavior and sentiment features, and is used only as a high-level semantic feature, not in explicit dynamics solutions.
[0088] The topic layer data is designed to characterize the structural features of potential topics within public opinion events and their evolution over time. By performing topic identification and topic clustering on public opinion text content, a set of topic nodes is constructed. Based on the semantic similarity or co-occurrence relationships between topics, a topic layer network structure is established, thus forming a topological representation of the topic layer. Topic node features mainly include the semantic representation of the topic and its popularity changes within different time windows, reflecting the dynamic evolution of topic attention. The topic layer network supplements the semantic information that the user layer network cannot directly characterize at the content and issue levels, forming a two-layer structural foundation for the public opinion system together with the user layer network.
[0089] Building upon the user-layer and topic-layer data setup, this experiment further constructs cross-layer relationships between users and topics. When a user participates in a discussion or publishes content on a specific topic within a certain time window, a cross-layer connection is established between the corresponding user node and topic node, thus forming a set of cross-layer edges in a two-layer complex network to characterize the direct coupling relationship between user behavior and topic evolution.
[0090] To adapt to the input requirements of the cross-layer collaborative temporal learning model, this experiment uses a sliding time window approach to segment the user layer data and topic layer data, organizing the continuous time series into a series of temporally ordered two-layer network snapshots. Each time window corresponds to a user layer network, a topic layer network, and their cross-layer association structure, thus forming the temporal sample sequence required for model training and testing. Table 1 below shows the descriptive statistics of the public opinion dataset.
[0091] Table 1. Descriptive Statistical Indicators of Public Opinion Datasets As shown in Table 1, the dataset exhibits typical characteristics of social media sentiment dissemination in terms of user scale, interaction density, and topic structure. User-level network data indicates a certain degree of interactive association among users and the existence of obvious local social clusters. At the topic level, after topic modeling and filtering, 52 core topic nodes were retained to characterize the main issue structure in the sentiment event. Regarding the cross-layer structure, the number of user-topic association edges is approximately 17,000, corresponding to a cross-layer sparsity of only 0.30%. This phenomenon reflects the highly non-uniform nature of user participation in topics in real-world sentiment scenarios: the vast majority of users only pay attention to or participate in a very small number of topics, rather than establishing associations with all topics. The highly sparse cross-layer structure increases the difficulty of cross-layer information modeling on the one hand, and provides a realistic motivation for introducing explicit cross-layer collaboration mechanisms on the other, prompting the model to effectively capture the dynamic coupling relationship between user behavior and topic evolution under sparse association conditions.
[0092] The experimental setup and evaluation metrics for this simulation experiment are as follows: This simulation experiment design incorporates both internal mechanism comparison and external baseline evaluation to comprehensively verify the effectiveness of the proposed model. Specifically, it analyzes the impact of different modeling strategies through ablation experiments and cross-layer mechanism comparisons, while also verifying the performance advantages of the proposed method through comparative experiments with representative baseline methods. This simulation experiment design provides sufficient and systematic support for subsequent experimental results analysis.
[0093] Regarding the baseline method and mechanism comparison settings, in order to evaluate the performance of the cross-layer collaborative temporal learning model constructed in this application, this simulation experiment conducts internal mechanism comparison and external baseline comparison experiments under a unified experimental framework.
[0094] First, to analyze the impact of different cross-layer collaborative strategies, three model variants were constructed based on the proposed two-layer network and temporal learning framework: mean injection, static matrix injection, and dynamic matrix injection (i.e., the cross-layer injection weights adopted in this application). By comparing the different variants, the role of the cross-layer information injection mechanism in public opinion evolution modeling was explored.
[0095] Secondly, to verify the superiority of the proposed method over existing methods, three representative baseline models are introduced, covering graph structure modeling methods and temporal modeling methods. Among them, GraphAttention Network (GAT) and GraphSample and Aggregate (GraphSAGE) are selected as graph model baselines, while LSTM models that do not explicitly model graph structures are used as temporal baselines.
[0096] Since the cross-layer collaborative temporal learning model is based on a two-layer network structure, and the baseline method itself does not have the ability to directly process this structure, a unified data adaptation strategy is adopted in this simulation experiment to ensure the fairness of the comparison. For the graph model baselines (GAT and GraphSAGE), the user layer network, the topic layer network, and their cross-layer relationships are integrated into a unified heterogeneous graph, which contains both user nodes and topic nodes and retains all types of edge relationships. For the LSTM baseline, aggregated temporal features are constructed at each time step, including sentiment ratio, SEIDR state distribution, and topic popularity, without explicitly introducing graph structure information.
[0097] Furthermore, to ensure fairness in the experiment, all models used the same input data, feature settings, time window division, and prediction targets. Key hyperparameters (such as embedding dimension, learning rate, batch size, and number of training epochs) were kept consistent across different models, and the same optimization strategy and early stopping mechanism were used for training. These uniform settings ensured that performance differences primarily stemmed from variations in modeling capabilities, rather than differences in data processing or parameter configuration.
[0098] Regarding the setting of evaluation indicators, this simulation experiment selects a variety of commonly used evaluation indicators to quantitatively evaluate the model performance for different types of public opinion prediction tasks, as follows: (1) Evaluation indicators for regression prediction tasks In the regression tasks of predicting the proportion of sentiment at the group level and predicting the proportion of state in the SEIDR population, the following evaluation metrics were used: Let the true scaling vector be at time step t. The prediction results of the cross-layer collaborative temporal learning model are: , where K represents the number of emotion categories or the number of SEIDR states.
[0099] Mean Absolute Error (MAE) measures the average deviation between predicted and actual values. It is robust and provides a clear picture of the average error level in proportional forecasting. The formula for calculating MAE is as follows: (8) Where t represents the time step, T represents the total number of time steps, and K represents the number of sentiment categories or SEIDR states. This represents the category index (the kth category).
[0100] Mean Squared Error (MSE) is used to evaluate the stability of a model under extreme conditions. By penalizing the prediction error with a square, it focuses on larger prediction biases. The formula for calculating the mean squared error is as follows: (9) Where t represents the time step, T represents the total number of time steps, and K represents the number of sentiment categories or SEIDR states. This represents the category index (the kth category).
[0101] The coefficient of determination (R²) measures a model's ability to explain the variance of real data. A R² closer to 1 indicates that the cross-layer collaborative time-series learning model is better able to capture the overall trend of public opinion evolution. The formula for calculating the R² is as follows: (10) Where t represents the time step, T represents the total number of time steps, and K represents the number of sentiment categories or SEIDR states. This represents the category index (the kth category). , .
[0102] The above multi-indicator joint evaluation can comprehensively reflect the accuracy and interpretability of the cross-layer collaborative temporal learning model in the proportion prediction task.
[0103] (2) Evaluation indicators for classification prediction tasks The following evaluation metrics were used in the user-level sentiment state prediction and SEIDR state classification tasks: Accuracy measures the proportion of correct predictions made by the model overall, reflecting its overall classification performance. The formula for calculating accuracy is as follows: (11) in, Let N be the indicator function, and N represent the total number of user samples participating in the prediction.
[0104] Macro-F1 Score (Macro-averaged F1 Score) is used in public opinion scenarios with imbalanced class distribution to perform an equal-weighted average of Precision and Recall for each class, so as to reflect the model's ability to identify minority users.
[0105] Suppose there are C categories in total. First, calculate for the c-th category: (12) in, This represents the F1 score for the c-th category. This represents the precision of the c-th category. , This represents the number of samples (true cases) where the c-th category is correctly predicted as positive. This represents the number of samples from other categories that were incorrectly predicted as class c (false positives). This represents the recall rate of the c-th category. , This represents the number of samples in category c that were incorrectly predicted as other categories (false negatives). The macro average is defined as: .
[0106] ROC-AUC (Receiver Operating Characteristic-Area Under Curve) represents the area under the curve between the True Positive Rate (TPR) and the False Positive Rate (FPR) at different discrimination thresholds, and is used to measure the model's overall ability to distinguish between different categories of samples.
[0107] The above evaluation metrics are used to comprehensively assess the performance of the cross-layer collaborative temporal learning model in user-level prediction tasks from multiple perspectives, including overall accuracy, category fairness, and discriminative ability.
[0108] The results of this simulation experiment are analyzed as follows: To comprehensively evaluate the performance of the cross-layer collaborative temporal learning model constructed in this application, this simulation experiment selected three representative baseline methods for comparison, including GAT, GraphSAGE, and LSTM, covering two typical paradigms: graph structure modeling methods and temporal modeling methods. The performance comparison between the cross-layer collaborative temporal learning model of this application and the baseline models is as follows: Table 2 and Figure 4 The results show quantitative comparisons between group-level regression tasks and user-level classification tasks.
[0109] Table 2 Performance of different models From Table 2 above and Figure 4 As can be seen from the data, the cross-layer collaborative temporal learning model constructed in this application consistently outperforms all baseline methods on multiple evaluation metrics.
[0110] Specifically, compared to LSTM models that only characterize temporal dependencies without explicitly modeling the network structure, the cross-layer collaborative temporal learning model in this application significantly reduces prediction errors and significantly improves classification performance. This indicates the necessity of introducing structural information in the process of public opinion evolution modeling. Compared to graph-based models such as GraphSAGE and GAT, the cross-layer collaborative temporal learning model in this application still exhibits a significant performance advantage. Although GAT outperforms GraphSAGE to some extent by introducing an attention mechanism, both are limited to single-layer graph representations and struggle to explicitly characterize the dynamic interaction between the user layer and the topic layer. In contrast, the cross-layer collaborative temporal learning model in this application effectively captures the collaborative evolution of user behavior and topic evolution by constructing a two-layer network structure and introducing a cross-layer collaborative mechanism, thereby achieving superior prediction performance. Overall, the experimental results show that both the two-layer modeling framework and the dynamic cross-layer information injection mechanism play important roles in improving model performance.
[0111] The prediction results of the cross-layer collaborative temporal learning model in this application on the state and sentiment ratio of the SEIDR population are as follows: To demonstrate the overall performance of the cross-layer collaborative temporal learning model in the SEIDR population state ratio prediction task, a line graph showing the changes in the population state ratios of various groups throughout the entire public opinion propagation cycle was plotted to depict the evolution of the population state predicted by the model over time, covering the complete life cycle of public opinion from incubation, outbreak to decline.
[0112] Figure 5This paper illustrates the dynamic evolution trend of various SEIDR groups throughout the entire public opinion cycle, specifically the changes in the proportion of the six SEIDR groups from the incubation period to the end of the public opinion cycle, and marks the time boundaries and main characteristics of different dissemination stages. From the overall evolution trend, the prediction results of the cross-layer collaborative temporal learning model in this application are consistent with the observed public opinion dissemination evolution trend: during the incubation period, highly susceptible individuals (S1) and generally susceptible individuals (S2) are the main susceptible groups, accounting for more than 90% in total, while the proportions of infected individuals (I), dissuaders (D), and recovered individuals (R) are relatively low, all below 2%, reflecting that the public opinion has not yet shown significant spread; during the outbreak period, the proportions of highly susceptible individuals (S1) and generally susceptible individuals (S2) decrease significantly, while the proportion of exposed individuals (E) rises to a stage peak. The proportion of infected individuals (I) increased rapidly, while the number of dissuaders (D) and those who refuted the warnings rose simultaneously, showing an overall phased shift characteristic consistent with the SEIDR criteria. During the decline phase, the proportion of infected individuals (I) gradually decreased, the proportion of recovered individuals (R) increased, and the number of dissuaders (D) remained stable, reflecting the simultaneous existence of rebuttal behavior and recovery status during the fading of public opinion. During the final phase, the proportions of highly susceptible individuals (S1) and moderately susceptible individuals (S2) rebounded, the proportion of recovered individuals (R) reached its highest value, the proportion of infected individuals (I) further decreased, and the overall public opinion situation tended to stabilize.
[0113] The above analysis shows that the prediction curve exhibits good continuity and smoothness across different propagation stages, stably depicting the temporal changes in the proportion of crowd states. This result demonstrates that, with the introduction of SEIDR dynamics priors, the cross-layer collaborative temporal learning model proposed in this application can reasonably model the phased evolution of crowd states, providing a foundation for subsequent emotion evolution analysis and interpretation of the cross-layer collaborative mechanism results.
[0114] Building upon the SEIDR population state proportion prediction, this simulation experiment further visualizes and analyzes the evolution of public opinion sentiment proportion throughout the complete dissemination cycle, showcasing the overall performance of the BiTCM model in the sentiment proportion time-series prediction task. Considering the potential co-evolutionary relationship between sentiment changes and population dissemination states, the evolution trend of sentiment proportion is compared and analyzed with the aforementioned population state results.
[0115] Figure 6This paper illustrates the dynamic evolution trend of sentiment proportions throughout the entire public opinion cycle, specifically the changes in the proportions of different sentiment types throughout the entire public opinion dissemination cycle. From an overall trend perspective, the sentiment proportions predicted by the cross-layer collaborative temporal learning model in this application exhibit clear stage-specific characteristics at different dissemination stages: In the incubation period, neutral sentiment dominates, with extreme sentiments (strong opposition and strong support) accounting for only 3%-5% combined, indicating that significant sentiment differentiation has not yet occurred in public opinion; in the outbreak period, the proportion of neutral sentiment decreases significantly, strong opposition sentiment rises from 3% to approximately 10%, and the proportions of weak opposition and weak support sentiments both increase, with extreme sentiments accounting for 14%-15% combined, indicating a shift in the sentiment structure from concentration to differentiation; in the decline period, the proportion of neutral sentiment rebounds to 52%-55%, the proportion of extreme sentiment decreases to 9%-10%, and weak opposition and weak support sentiments remain within a stable range, indicating a gradual easing of the overall sentiment distribution; in the final stage, the proportion of neutral sentiment is relatively stable, the proportion of extreme sentiment further decreases, and the sentiment structure of public opinion gradually returns to a stable state.
[0116] Based on the above analysis, it can be seen that the cross-layer collaborative temporal learning model of this application can smoothly depict the trend characteristics of the proportion of different emotion types changing over time. Especially in the stages of emotion differentiation during the outbreak and emotion decline in the later stage, the prediction curve maintains good continuity and stage consistency. Combined with the aforementioned group-level regression index results, it can be concluded that the cross-layer collaborative temporal learning model of this application can not only depict the static proportion distribution in the emotion proportion prediction task, but also reflect the dynamic changes of emotion structure in the transmission process, providing a foundation for subsequent analysis of the coupling relationship between emotion and population state.
[0117] This simulation experiment further visualizes and analyzes the coupling relationship between the aforementioned emotions and the state of the crowd from a correlation perspective, in order to help understand the synergistic change characteristics between group behavior and emotional structure captured by the model during the prediction process.
[0118] Figure 7 The heatmap shows the coupling relationship between SEIDR population and sentiment type at different stages of communication. Through the phased correlation heatmap, the distribution of Pearson correlation coefficients between six population states and five sentiment types at different stages of public opinion communication is shown.
[0119] During the incubation period, highly susceptible individuals (S1) and moderately susceptible individuals (S2) showed a strong positive correlation with neutral sentiment, while the correlation with extreme sentiment was low. This indicates that before the public opinion spread, most users were still in a wait-and-see state, and the sentiment structure was relatively concentrated. During the outbreak period, the correlation coefficient between infected individuals (I) and strong opposition and strong support sentiment increased significantly, and the correlation between exposed individuals (E) and extreme sentiment also reached a moderately high level. Meanwhile, moderately susceptible individuals (S2) maintained a certain positive correlation with neutral sentiment, reflecting the simultaneous occurrence of highly active users and sentiment differentiation during this stage. During the decline period, dissuaders (D) showed a strong positive correlation with strong opposition sentiment, while the correlation between recovered individuals (R) and neutral sentiment increased, corresponding to the overall characteristic of the public opinion entering a rational decline phase. During the final stage, the correlation between the status of various groups and sentiment types generally returned to the level of the incubation period, and the sentiment structure tended to stabilize.
[0120] The above analysis reveals a clear stage-specific variation in the relationship between SEIDR population state and sentiment type, consistent with the evolutionary trends of population and sentiment proportions. This visualization provides a supporting explanation for the rationale behind incorporating SEIDR dynamics and sentiment characteristics into the model, and also demonstrates that the cross-layer collaborative temporal learning model in this application can capture the collaborative change patterns of group state and sentiment structure at different stages of public opinion dissemination during the prediction process.
[0121] This simulation experiment further analyzes the ability of the cross-layer collaborative temporal learning model of this application to characterize the co-evolutionary features of the topic layer and the user sentiment layer under the two-layer network structure, and draws a line graph of the co-evolution of topic popularity and sentiment polarization, and performs a visual analysis of the temporal consistency of inter-layer interaction from the perspective of prediction results.
[0122] Figure 8 This study illustrates the co-evolutionary trend of topic popularity and sentiment polarization in a two-layer network, specifically the popularity changes of three types of topics: core event topics, secondary public opinion topics, and related topics, as well as the predicted results of sentiment polarization levels within corresponding time windows. From an overall evolutionary perspective, the popularity changes and sentiment polarization levels of topics at different levels exhibit relatively consistent fluctuation characteristics over time. Specifically, when the popularity of core event topics reaches its peak, the sentiment polarization level also reaches its maximum value concurrently, with both peaking at highly similar times. The popularity peak of secondary public opinion topics lags behind that of core topics, and the corresponding sentiment polarization level shows a secondary peak. The popularity of related topics remains at a relatively low level overall, and the fluctuation range of sentiment polarization is also relatively limited.
[0123] A significant positive correlation exists between the degree of sentiment polarization and changes in topic popularity. During the rise in popularity of core topics, sentiment polarization increases substantially; during the decline in popularity of core topics, sentiment polarization decreases synchronously; and during the rise in popularity of secondary topics, sentiment polarization rebounds to some extent. This phenomenon indicates that the cross-layer collaborative temporal learning model in this application can simultaneously characterize the co-evolutionary relationship between changes in topic attention and fluctuations in group sentiment structure in the prediction results.
[0124] This simulation experiment further analyzes the impact of cross-layer information injection methods on the training process and prediction performance in the cross-layer collaborative temporal learning model of this application. Under the premise of maintaining the consistency between the overall model structure and input features, a comparative experiment was conducted on three cross-layer injection strategies: mean injection, static matrix injection, and dynamic matrix injection of this application.
[0125] The training stability analysis of the three cross-layer injection strategies can analyze their impact on the stability of the model training process. Figure 9 The training loss convergence curves for three cross-layer injection strategies are shown. Overall, all three cross-layer injection strategies exhibit good convergence during training, indicating that the cross-layer collaborative temporal learning model constructed in this application has good training stability. The results demonstrate that, under the same model structure, introducing dynamic cross-layer weights helps the model more fully utilize the interaction information between the user layer and the topic layer, thereby improving the stability and convergence quality of the training process.
[0126] This simulation experiment further evaluates the impact of different cross-layer injection strategies on prediction performance. Figure 10 This paper compares the performance of three cross-layer injection strategies across multiple evaluation metrics in sentiment prediction and SEIDR state prediction tasks. In the sentiment classification task, the dynamic matrix injection method proposed in this application achieves the best performance in Accuracy, Macro-Precision, Macro-Recall, Macro-F1, and ROC-AUC evaluation metrics. In the SEIDR state classification task, the advantages of the dynamic matrix injection method are further amplified, with particularly outstanding recognition results in a few categories such as dissuaders (D) and exposed persons (E). Figure 11 The radar map area comparison results show that the dynamic matrix injection proposed in this application outperforms the other two injection strategies in both tasks, demonstrating a more balanced classification performance.
[0127] Based on the above analysis, it can be seen that the dynamic cross-layer injection strategy, by adaptively adjusting the information transmission weights between the user layer and the topic layer, enables the model to maintain overall stability while more effectively characterizing the fine-grained differences in the states and emotional categories of different groups, which is especially helpful in improving the ability to identify minority samples.
[0128] This simulation experiment further analyzes the overall performance of the cross-layer collaborative temporal learning model in the task of predicting public opinion evolution from a group level. By comparing and analyzing the prediction results under different cross-layer injection mechanisms, the model's prediction accuracy, stability, and trend interpretation ability in depicting macro public opinion trends are evaluated, providing experimental support for subsequent user-level prediction and mechanism discussion.
[0129] Regarding the time-series prediction results of the sentiment polarity ratio, Figure 11 and Figure 12 The figure shows a comparison between the true and predicted values of sentiment proportion and SEIDR state proportion, specifically demonstrating the performance of different cross-layer injection mechanisms in the sentiment polarity proportion prediction task within a 10-day prediction window. As can be seen from the figure, the cross-layer collaborative temporal learning model using the dynamic matrix injection mechanism achieves the best performance across all metrics. In contrast, the mean injection and static matrix injection mechanisms show relatively large prediction biases in niche sentiment categories such as strong opposition and strong support, making it difficult to accurately capture fine-grained changes in sentiment polarization.
[0130] Based on the above analysis, it can be seen that relying solely on fixed or average cross-layer feature fusion methods is insufficient to adapt to the nonlinear fluctuations in public opinion sentiment caused by changes in topic popularity. In contrast, the dynamic cross-layer injection mechanism can adaptively adjust the weights of inter-layer information according to the temporal changes in the user-topic relationship, thereby improving the overall accuracy and stability of sentiment ratio prediction.
[0131] Figure 12 This paper presents the results of different cross-layer injection mechanisms in predicting the proportion of six SEIDR population states. The SEIDR state proportions characterize the lifecycle of public opinion dissemination and are an important indicator of a model's ability to understand the macro-level dissemination situation. In predicting SEIDR population state proportions, dynamic matrix injection shows the best prediction accuracy for core dissemination groups such as infected individuals (I) and dissuaders (D). Notably, in predicting the total susceptible population consisting of highly susceptible individuals (S1) and moderately susceptible individuals (S2), the deviation between the predicted proportion of dynamic matrix injection and the true value (69.7%) is only 0.05%, significantly better than the mean injection and static matrix injection mechanisms. This indicates that the model using dynamic matrix injection can more accurately characterize the overall evolution trend of population states. Figure 13 The differential distribution of error bars further demonstrates that the dynamic cross-layer injection mechanism, under the influence of SEIDR dynamic prior and cross-layer feature fusion, can effectively reduce the prediction uncertainty of core population and niche state categories.
[0132] This simulation experiment further analyzed the stability of the model output, which is also a key consideration in public opinion application scenarios. Figure 13Performance-stability bubble plots of different cross-layer injection strategies under dual-task conditions are shown, and the three cross-layer injection mechanisms are evaluated from a joint perspective.
[0133] The results show that the dynamic matrix injection mechanism is in the high-performance and high-stability region in both the emotion proportion prediction and the SEIDR population state proportion prediction tasks. Its bubble position is the highest and its volume is the smallest, indicating that while achieving better prediction accuracy, the model output has the smallest fluctuation.
[0134] Combination Figures 11 to 13 It can be seen that, under a unified model framework, the introduction of a dynamic cross-layer injection mechanism helps the model achieve lower prediction error, higher trend explanatory power and stronger prediction stability in the task of predicting the evolution of public opinion at the group level, providing a reliable experimental basis for subsequent user-level prediction and mechanism analysis at the micro level.
[0135] This application addresses the problem of predicting the evolution of social media sentiment. It constructs a dynamic two-layer network structure consisting of a user layer and a topic layer, and designs an explicit cross-layer collaboration mechanism to achieve dynamic interaction modeling between user behavior, topic evolution, and emotional information. By introducing SEIDR (Search Engine for Individuals) population state characteristics as prior information for the propagation stage, the model's ability to characterize the internal mechanisms of sentiment dissemination is enhanced, and its interpretability is improved.
[0136] Based on the aforementioned simulation experiments, extensive experimental results on real social media datasets demonstrate that the cross-layer collaborative temporal learning model constructed in this application outperforms representative baseline methods in multiple tasks, including sentiment ratio prediction, SEIDR population state ratio prediction, and user-level state classification. Especially during the rapid evolution phase of public opinion, facing more complex structures and temporal dynamics, the cross-layer collaborative temporal learning model constructed in this application exhibits significant advantages in prediction accuracy, stability, and robustness. Combined with the experimental results, it can be concluded that jointly modeling the two-layer network structure, the dynamic cross-layer collaborative mechanism, and the prior information of propagation dynamics can provide a more comprehensive and effective analysis for characterizing the evolution of social public opinion.
[0137] This example implementation also provides a public opinion prediction system based on a cross-layer collaborative time-series learning model, applicable to the public opinion prediction method based on a cross-layer collaborative time-series learning model in any of the above embodiments. (Reference) Figure 14 As shown, the cloud desktop task scheduling system may include a first building module 110, a cross-layer injection module 120, a second building module 130, and a prediction module 140.
[0138] The first construction module 110 is used to construct a user-topic two-layer network that evolves over time. The two-layer network includes a user layer network, a topic layer network, and cross-layer association edges that describe the relationship between the user layer network and the topic layer network.
[0139] The cross-layer injection module 120 is used to inject the topic node representation of the topic layer network into the user node representation of the user layer network according to the cross-layer association edge, so as to obtain the cross-layer fusion representation of the user node, which includes sentiment features and crowd state encoding.
[0140] The second construction module 130 is used to input the cross-layer fusion representation of the user node into the long short-term memory network for temporal modeling, obtain the temporal state of the user node, and construct a multi-scale prediction output layer based on the temporal state to obtain a cross-layer collaborative temporal learning model.
[0141] The prediction module 140 is used to input test samples of user layer data and topic layer data into the trained cross-layer collaborative time series learning model to output public opinion prediction results.
[0142] In the embodiments of this disclosure, the first construction module 110 explicitly models user behavior and topic evolution as a time-evolving user-topic two-layer network, and the cross-layer injection module 120 injects topic node representations into user node representations to characterize the collaborative relationship between the user layer network and the topic layer network. Furthermore, the second construction module 130 inputs the cross-layer fusion representation of user nodes into a long short-term memory network for temporal modeling, deeply integrating cross-layer information interaction and temporal feature learning. This allows the cross-layer collaborative temporal learning model to dynamically capture the impact of topic evolution on user behavior and emotional changes, significantly improving the predictive ability for nonlinear evolution and sudden changes in public opinion. The prediction module 140 performs public opinion prediction and outputs the prediction results. In addition, during model construction, the state of the population is introduced as a structured prior feature into the user node temporal representation learning process to constrain the model, enhancing the model's ability to characterize the internal mechanisms of public opinion dissemination. This makes the public opinion prediction results more consistent with data distribution and dissemination dynamics, solving the problem of insufficient model prediction stability.
[0143] Regarding the system in the above embodiments, the specific manner in which each unit performs operations has been described in detail in the embodiments related to the method, and will not be elaborated here.
[0144] It should be noted that although several units of the system for executing actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided and embodied by multiple units. Some or all of the units can be selected to achieve the purpose of this disclosure according to actual needs. Those skilled in the art can understand and implement this without any inventive effort.
[0145] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the appended claims.
Claims
1. A public opinion prediction method based on a cross-layer collaborative temporal series learning model, characterized in that, include: Construct a user-topic two-layer network that evolves over time. The two-layer network includes a user layer network, a topic layer network, and cross-layer association edges that describe the relationship between the user layer network and the topic layer network. Based on the cross-layer association edge, the topic node representation of the topic layer network is injected across layers into the user node representation of the user layer network to obtain the cross-layer fusion representation of the user node, which includes sentiment features and crowd state encoding. The cross-layer fusion representation of the user node is input into the long short-term memory network for temporal modeling to obtain the temporal state of the user node. Based on the temporal state, a multi-scale prediction output layer is constructed to obtain a cross-layer collaborative temporal learning model. Test samples of user-layer data and topic-layer data are input into the trained cross-layer collaborative time-series learning model to output public opinion prediction results.
2. The public opinion prediction method based on a cross-layer collaborative time-series learning model according to claim 1, characterized in that, The step of injecting the topic node representation of the topic layer network across layers into the user node representation of the user layer network includes: Based on user node representations and topic node representations, construct cross-layer injection weights that change over time: (1) in, Indicates cross-layer weight injection. Represents the cross-level correlation function. , This represents the user node representation. To represent topic nodes, Represents the user layer feature mapping matrix. Represents the topic layer feature mapping matrix; Based on the cross-layer injection weights, the topic node representations of the topic layer network are injected across layers into the user node representations of the user layer network.
3. The public opinion prediction method based on a cross-layer collaborative time-series learning model according to claim 2, characterized in that, The cross-layer fusion of the user nodes is represented as follows: (2) in, This represents the cross-layer fusion representation of user nodes. This indicates a feature concatenation operation or a weighted fusion operation. Indicates to users A collection of related topic nodes. , This represents the user-topic cross-level adjacency matrix.
4. The public opinion prediction method based on a cross-layer collaborative time-series learning model according to claim 1, characterized in that, The timing state of the user node is represented as follows: (3) in, This indicates the timing state of the user node. This represents the hidden state of a user node at time step t. This represents the state of memory units in the Long Short-Term Memory (LSTM) network at time step t. This represents the cross-layer fused representation of a user node at time step t. , This represents the user node representation. Indicates user Encoding of the crowd state at time step t ; This represents the hidden state of the user node at time step t-1. This represents the state of the memory units in the Long Short-Term Memory network at time step t-1.
5. The public opinion prediction method based on a cross-layer collaborative time-series learning model according to claim 1, characterized in that, The population status coding is based on SEIDR population status coding, including susceptible individuals, exposed individuals, infected individuals, dissuaders, and recovered individuals.
6. The public opinion prediction method based on a cross-layer collaborative time-series learning model according to claim 1, characterized in that, The construction of a time-evolving user-topic two-layer network includes: Acquire user layer data and topic layer data for multiple consecutive time steps, and use a sliding time window to segment the user layer data and topic layer data to obtain a two-layer network snapshot corresponding to each time step; Construct the user-topic layer network, topic layer network, and cross-layer association edges for the current time window based on the two-layer network snapshot at each time step, so as to obtain the user-topic two-layer network that evolves over time.
7. The public opinion prediction method based on a cross-layer collaborative temporal series learning model according to claim 6, characterized in that, Before constructing the user layer network, topic layer network, and cross-layer association edges for the current time window based on the two-layer network snapshot at each time step, the process includes: Define the representations of the user layer network, topic layer network, and cross-layer association edges at the current time step: (4) in, The representation of the user-layer network at time step t. Represents a set of user nodes. ; Represents the set of interaction edges between users. ; Represents the feature matrix of user nodes. , Indicates emotional characteristics, This represents the crowd status code. Represents the feature vector of the basic structure; The representation of the topic layer network at time step t. Represents a set of topic nodes. , Indicates the relationship between topics. , Represents the feature matrix of topic nodes; The set of cross-layer associated edges at time step t is represented.
8. The public opinion prediction method based on a cross-layer collaborative time-series learning model according to claim 1, characterized in that, Before inputting the test samples of user layer data and topic layer data into the trained cross-layer collaborative temporal learning model, the following steps are included: The training samples of the user layer data and topic layer data are input into the cross-layer collaborative temporal learning model; The mean squared error loss function is used to calculate the population layer proportion prediction loss, the cross-entropy loss function is used to calculate the user-level classification loss, and the multi-task joint loss is calculated based on the population layer proportion prediction loss and the user-level classification loss. The cross-layer collaborative temporal learning model is trained by minimizing the multi-task joint loss to obtain the trained cross-layer collaborative temporal learning model.
9. The public opinion prediction method based on a cross-layer collaborative time-series learning model according to claim 1, characterized in that, The public opinion prediction results include the predicted results of the group-level sentiment ratio, the predicted results of the group-level population state ratio, and the predicted results of the user-level state classification.
10. A public opinion prediction system based on a cross-layer collaborative temporal learning model, characterized in that, The system applied to the public opinion prediction method based on a cross-layer collaborative temporal series learning model as described in any one of claims 1-9, the system comprising: The first construction module is used to construct a user-topic two-layer network that evolves over time. The two-layer network includes a user layer network, a topic layer network, and cross-layer association edges that describe the relationship between the user layer network and the topic layer network. The cross-layer injection module is used to inject the topic node representation of the topic layer network into the user node representation of the user layer network according to the cross-layer association edge, so as to obtain the cross-layer fusion representation of the user node, which includes sentiment features and crowd state encoding. The second construction module is used to input the cross-layer fusion representation of the user node into the long short-term memory network for temporal modeling, obtain the temporal state of the user node, and construct a multi-scale prediction output layer based on the temporal state to obtain a cross-layer collaborative temporal learning model. The prediction module is used to input test samples of user layer data and topic layer data into the trained cross-layer collaborative time series learning model to output public opinion prediction results.