A network public opinion analysis and prediction method and system based on a space-time graph neural network

By constructing a spatiotemporal graph neural network for network public opinion analysis, the problems of insufficient characterization of the evolution process of public opinion events and inadequate utilization of related propagation relationships in network public opinion analysis have been solved, achieving more accurate identification and prediction of public opinion propagation trends.

CN122064875BActive Publication Date: 2026-07-21HANGZHOU RATTLE TECHNOLOGY CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HANGZHOU RATTLE TECHNOLOGY CO LTD
Filing Date
2026-04-03
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing technologies, when analyzing and predicting online public opinion, struggle to fully depict the evolution of public opinion events at different time stages, and do not make in-depth use of the interconnected propagation relationships among multiple stakeholders, thus affecting the completeness of the analysis results and the stability of the prediction results.

Method used

A network public opinion analysis method based on spatiotemporal graph neural network is constructed. By acquiring network public opinion data and constructing a bilateral spatiotemporal heterogeneous relationship graph, multiple features are extracted and encoded to generate a ternary trend state vector. Cluster analysis and key node identification are performed, and the analysis results are iteratively corrected through double bias feedback.

Benefits of technology

It improves the detail and relevance of the identification of public opinion dissemination patterns, enabling more accurate identification of key dissemination nodes and hot topics, and reducing the deviation between clustering results and the actual dissemination direction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122064875B_ABST
    Figure CN122064875B_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of network public opinion prediction, and particularly relates to a network public opinion analysis and prediction method and system based on a space-time graph neural network. The method obtains network public opinion data, extracts public opinion text, publishing time, and forwarding, replying, and citing relationships, and constructs a double space-time heterogeneous relationship graph containing semantic association edges within the time layer and transmission causality edges between the time layers. Further, text representation features, network location features, transmission statistical features, and cross-layer transmission features are extracted to form node input vectors, and node embedding representation is obtained through a space-time graph neural network. On this basis, a ternary trend state vector composed of transmission activity, transmission attenuation, and path offset is constructed to complete trend classification, transmission direction clustering, key node identification, and hot event labeling, and the edge weight and node coding parameters are iteratively corrected using a double deviation feedback quantity. The scheme can realize structured analysis and trend prediction of the network public opinion transmission process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the technical field of online public opinion prediction, specifically relating to a method and system for online public opinion analysis and prediction based on spatiotemporal graph neural networks. Background Technology

[0002] With the rapid development of internet social media platforms, news media platforms, short video platforms, and various interactive communities, online public opinion has become an important vehicle for reflecting public attitudes, disseminating information about social events, and influencing public opinion trends. Online public opinion data is typically characterized by its wide range of sources, frequent updates, rapid dissemination, and complex relationships. It not only includes information from the text content itself but also reflects its temporal evolution, dissemination chain relationships, and geographical distribution characteristics.

[0003] Currently, existing technologies for analyzing and predicting online public opinion can generally be summarized into the following technical approaches: One approach is based on keyword statistics, sentiment dictionary matching, and popularity threshold discrimination. This method uses statistical analysis of high-frequency words, emotional tendencies, and dissemination volume in public opinion texts to achieve preliminary identification of the public opinion state. Another approach is based on traditional machine learning or deep learning analysis methods, which transform public opinion texts into vector features for classification, clustering, or trend judgment. A third approach combines user relationships, forwarding / commenting relationships, or topic dissemination paths to model the structure of public opinion dissemination, thereby improving the accuracy of the analysis results. While these technical approaches can achieve public opinion identification and trend judgment to a certain extent, they still have certain shortcomings when dealing with large-scale, dynamic, and strongly correlated online public opinion data. For example, they do not adequately depict the evolution of public opinion events at different time stages, do not fully utilize the correlation and dissemination relationships between multiple subjects, and do not deeply reflect the coupling relationship between text semantic features, temporal change features, and spatial dissemination features. Therefore, they can easily affect the completeness of public opinion analysis results and the stability and foresight of prediction results.

[0004] Therefore, it is necessary to propose an analysis and prediction method that is more suitable for complex public opinion scenarios, taking into account the coexistence of temporal evolution, relational propagation and regional distribution in online public opinion data, so as to meet the development needs of intelligent judgment of online public opinion. Summary of the Invention

[0005] To address the above problems, the present invention aims to propose a method for network public opinion analysis and prediction based on spatiotemporal graph neural networks, comprising the following steps: S1. Obtain online public opinion data, extract public opinion text, publication time, forwarding relationship, reply relationship, citation relationship and publishing entity identifier, and divide it into multiple time layers according to the preset time window; S2. Based on the public opinion data nodes in each time layer, construct an initial graph structure. Within the same time layer, establish semantic association edges based on text semantic similarity, topic keyword overlap rate, and interaction frequency of the publishing entity. Between adjacent time layers, establish propagation causal edges based on forwarding relationship, reply relationship, citation relationship, and time sequence, thereby forming a bilateral spatiotemporal heterogeneous relationship graph that simultaneously contains semantic association edges within time layers and propagation causal edges between time layers. S3. Extract text representation features, network location features, propagation statistics features, and cross-layer propagation features for each public opinion data node, and encode the features in a unified manner to form a node input vector; input the node input vector and the bilateral spatiotemporal heterogeneous relationship graph into the spatiotemporal graph neural network, perform same-layer aggregation calculation on semantic association edges within the time layer, and perform cross-layer propagation calculation on causal propagation edges between time layers to obtain the embedded representation of each node; S4. Based on the embedded representation of each node, calculate the propagation activity, propagation attenuation and path offset of each node, and construct the ternary trend state vector of the corresponding node; determine the propagation trend category of the node as rising, stable or falling according to the ternary trend state vector, and cluster the nodes under the same trend category to obtain the corresponding propagation direction cluster and propagation path distribution. S5. Identify key propagation nodes and hot event nodes based on the node connection density, cross-layer propagation depth and path concentration in each propagation direction cluster, and output the node labeling results; calculate the cluster consistency deviation of similar nodes and the reverse deviation of propagation paths based on historical propagation samples and current prediction results, and combine the two into a double deviation feedback quantity. S6. The double-bias feedback quantity is fed back to the spatiotemporal graph neural network to iteratively correct the semantic association edge weights within the time layer, the causal edge weights between time layers, and the node encoding parameters, so as to output the network public opinion analysis and prediction results.

[0006] As a preferred technical solution, in step S2, when establishing semantic association edges within the time layer, the text semantic similarity, topic keyword overlap rate, and publisher interaction frequency between nodes are calculated respectively. Semantic association edges within the time layer are established when the text semantic similarity, topic keyword overlap rate, and publisher interaction frequency all meet the corresponding threshold conditions. The edge weight of the semantic association edges within the time layer is obtained by weighting the text semantic similarity, topic keyword overlap rate, and publisher interaction frequency.

[0007] As a preferred technical solution, when establishing the inter-time layer propagation causal edge in step S2, a directed edge is established according to the direction from the previous time layer node to the next time layer node, and the propagation causal strength is calculated based on whether there is a forwarding relationship, reply relationship, or reference relationship between the nodes, as well as the corresponding time interval and propagation chain position. The propagation causal strength is used as the edge weight of the inter-time layer propagation causal edge.

[0008] As a preferred technical solution, in step S3, the text representation features include keyword vectors and topic vectors; the network location features include node in-degree, node out-degree, and intermediate value; the propagation statistics features include propagation frequency and propagation increment within the time window; and the cross-layer propagation features include the number of cross-layer transfers, the longest propagation span between layers, and the number of propagation path branches.

[0009] As a preferred technical solution, in step S4, the propagation activity is calculated based on the response intensity of the node's neighborhood and the cross-layer diffusion intensity within the current time layer, the propagation attenuation is calculated based on the decrease in the node's response between consecutive time layers and the attenuation degree at the end of the propagation chain, and the path offset is calculated based on the deviation between the node's actual propagation path and the path of the cluster center in the main propagation direction. The propagation activity, propagation attenuation, and path offset are then combined into a ternary trend state vector in a fixed order.

[0010] As a preferred technical solution, in step S4, when clustering nodes under the same trend category, the three-element trend state vector of the node, the cross-layer propagation depth and the main propagation direction are used as the basis for joint clustering, and the direction of the cluster center obtained after clustering is used as the main propagation path direction of the corresponding propagation direction cluster.

[0011] As a preferred technical solution, in step S5, the clustering consistency deviation of nodes of the same type is calculated based on the dispersion of the state distance from each node in the cluster to the cluster center in the same propagation direction, and the propagation path reverse deviation is calculated based on the reverse ratio between the predicted propagation direction and the historical true propagation direction.

[0012] As a preferred technical solution, in step S6, the semantic association edge weights within the time layer are corrected according to the clustering consistency deviation of the same type of nodes, the propagation causal edge weights between time layers are corrected according to the propagation path reverse deviation, and the node encoding parameters are corrected based on the clustering consistency deviation of the same type of nodes and the propagation path reverse deviation.

[0013] This invention also provides a network public opinion analysis and prediction system based on spatiotemporal graph neural networks, used to implement the method, including: The module includes a data acquisition module, a heterogeneous relationship graph construction module, a feature encoding module, a spatiotemporal graph modeling module, a trend state generation module, a cluster analysis module, a key node annotation module, and a dual-bias feedback module. The data acquisition module is used to acquire online public opinion data and extract public opinion text, publication time, forwarding relationship, reply relationship, citation relationship and publishing entity identifier; The heterogeneous relation graph construction module is used to construct a bilateral spatiotemporal heterogeneous relation graph that simultaneously contains semantic association edges within the time layer and causal propagation edges between time layers. The feature encoding module is used to extract and encode text representation features, network location features, propagation statistics features, and cross-layer propagation features; The spatiotemporal graph modeling module is used to input node input vectors and bilateral spatiotemporal heterogeneous relationship graphs into the spatiotemporal graph neural network, perform same-layer aggregation calculation on semantic association edges within the time layer, and perform cross-layer propagation calculation on causal edges propagating between time layers. The trend state generation module is used to generate a three-element trend state vector of node propagation activity, propagation decay, and path offset. The clustering analysis module is used to determine the propagation trend category of a node based on the ternary trend state vector, and to cluster nodes under the same trend category to output the propagation direction cluster and propagation path distribution. The key node annotation module is used to identify key propagation nodes and hot event nodes; The dual-bias feedback module is used to iteratively correct the weights of semantic association edges within the time layer, the weights of causal edges propagating between time layers, and the node encoding parameters based on the clustering consistency bias of nodes of the same type and the reverse bias of the propagation path.

[0014] As a preferred technical solution, the heterogeneous relationship graph construction module includes a time layer generation unit, a semantic association edge generation unit, and a propagation causal edge generation unit; The time layer generation unit is used to divide multiple time layers according to a preset time window; The semantic association edge generation unit is used to establish semantic association edges within the time layer based on text semantic similarity, topic keyword overlap rate and interaction frequency of the publishing entity. The propagation causal edge generation unit is used to establish inter-time propagation causal edges based on forwarding relationships, reply relationships, referencing relationships, and time sequence.

[0015] The present invention also provides an electronic device, including a processor, a memory, and a communication bus, characterized in that the memory stores a computer program, which, when executed by the processor, causes the electronic device to perform the method described thereon.

[0016] The beneficial effects of this invention are as follows: Compared to technical approaches that analyze solely based on textual content or static propagation relationships, this invention incorporates semantic association edges within the same time layer and causal propagation edges between adjacent time layers into a bilateral spatiotemporal heterogeneous relationship graph. This allows the correlation and evolution of public opinion content to be simultaneously represented within the same structure. This improvement further distinguishes between "similar content but different propagation paths" and "related propagation but semantically divergent" differences in online public opinion, enhancing the detail and relevance of public opinion propagation context identification.

[0017] This invention extracts text representation features, network location features, propagation statistics features, and cross-layer propagation features, and combines them with a spatiotemporal graph neural network to form a node embedding representation. It further constructs a ternary trend state vector composed of propagation activity, propagation attenuation, and path deviation, enabling node states to be jointly characterized from three dimensions: propagation intensity, attenuation changes, and path deviation, rather than relying solely on a single indicator of popularity or growth. Therefore, the trend classification, propagation direction clustering, and path distribution analysis of public opinion nodes possess stronger hierarchy and discriminative power.

[0018] This invention employs a dual-bias feedback mechanism, consisting of clustering consistency bias and propagation path reversal bias, to iteratively correct the semantic association edge weights within the time layer, the causal edge weights between time layers, and the node encoding parameters. This ensures that the analysis and prediction results are not a one-time output but are continuously corrected by combining historical propagation samples with current prediction performance. This improvement helps reduce the deviation between clustering results and the actual propagation direction, making the annotation results of key propagation nodes and hotspot event nodes more closely reflect the actual propagation evolution process. Attached Figure Description

[0019] Figure 1 This is a schematic diagram of the method flow of the present invention; Figure 2 This is a schematic diagram of the system structure of the present invention. Detailed Implementation

[0020] To enhance understanding of the present invention, the present invention will be further described in detail below with reference to embodiments. These embodiments are only used to explain the present invention and do not constitute a limitation on the scope of protection of the present invention.

[0021] Example 1 This embodiment combines the analysis of public opinion dissemination on multiple online platforms for public events, and explains the process of public opinion data collection, relationship graph construction, feature encoding, trend determination, cluster analysis, key node identification, and feedback correction.

[0022] The processing steps in this embodiment can be executed by a server, analysis terminal, or electronic device with data processing capabilities, or they can be deployed in a public opinion monitoring platform for continuous operation. For example... Figure 1 As shown, the method provided in this embodiment includes the following steps: S1. Obtain online public opinion data and divide it into time layers.

[0023] In this embodiment, a set of keywords for public opinion monitoring is first established around the event to be analyzed. This keyword set may include the event name, alternative names of the event, names of relevant organizations, names of relevant individuals, and extended terms that are continuously associated with the event. Subsequently, online public opinion data related to the keyword set is collected from news comment sections, social media platforms, forums, and short-form content platforms.

[0024] The online public opinion data includes at least the public opinion text, publication time, publisher identifier, forwarding relationship, reply relationship, and citation relationship. To ensure the consistency of the subsequent graph structure construction, the collected raw data is cleaned before entering the processing flow, removing duplicate content, blank text, obviously meaningless symbol strings, and data items whose publication time or publisher identifier cannot be determined.

[0025] For the text content, further processing such as sentence segmentation, word segmentation, stop word filtering, and keyword standardization can be performed. For the publishing entity identifier, it can be uniformly mapped to an anonymous entity number to maintain structural stability when calculating the frequency of entity interactions and entity association characteristics in subsequent calculations. After cleaning, all public opinion data will be divided into multiple time layers according to preset time windows.

[0026] For example, by using one hour as a time window, multiple consecutive time layers can be formed during the continuous spread of public opinion events. Each time layer corresponds to a public opinion data node generated or captured within a fixed time interval. In this way, the originally continuously changing process of public opinion dissemination can be transformed into a hierarchical time-series propagation structure, providing a foundation for constructing subsequent relationships within and between time layers.

[0027] S2. Construct a bilateral spatiotemporal heterogeneous relationship diagram.

[0028] In this embodiment, an initial graph structure is constructed based on the public opinion data nodes within each time layer. For any two public opinion data nodes within the same time layer, their textual semantic similarity, topic keyword overlap rate, and frequency of interaction by the publishing entity are calculated respectively.

[0029] Among them, text semantic similarity is used to characterize the degree of similarity between two public opinion texts in terms of content, topic keyword overlap rate is used to characterize the degree of overlap between the two at the event topic level, and the frequency of interaction between publishing entities is used to reflect the strength of the association between corresponding entities in their historical publishing, replying, forwarding or quoting behaviors.

[0030] When all three indicators meet the preset threshold conditions, a semantic association edge within the time layer is established between the two nodes. The edge weight of the semantic association edge within the time layer is determined based on a comprehensive assessment of text semantic similarity, topic keyword overlap rate, and the frequency of interaction by the publishing entity. This processing method not only preserves the similarity in text content within the same time layer but also incorporates the consistency of the event theme and the context of the subject's interaction, avoiding invalid associations based solely on textual similarity.

[0031] For nodes between adjacent time layers, propagation causal edges are established based on forwarding relationships, reply relationships, referencing relationships, and temporal order. Specifically, directed edges are established in the direction from the node in the previous time layer to the node in the next time layer. The propagation causal strength is calculated based on whether there is forwarding, replying, or referencing behavior between the two nodes, the time interval between these behaviors, and their positions in the propagation chain. This propagation causal strength is used as the edge weight of the propagation causal edge between time layers.

[0032] If a node in a later time layer directly forwards a message from a node in a previous time layer, and the time interval between the two is short, the corresponding edge weight can be set to a higher value. If only indirect referencing or weakly related response behavior exists, the edge weight is relatively low. After the above processing, a bilateral spatiotemporal heterogeneous relation graph is formed, which simultaneously contains semantic association edges within the time layer and causal propagation edges between time layers. This graph structure preserves both the content association network of public opinion within the same time slice and the causal propagation link of public opinion continuously spreading along the time axis, thus enabling a more complete representation of the event evolution process.

[0033] S3. Extract node features and form node input vectors, and generate node embedding representations based on spatiotemporal graph neural networks.

[0034] In this embodiment, multiple features are extracted from each public opinion data node in the bilateral spatiotemporal heterogeneous relationship graph.

[0035] The first category is text representation features, which include keyword vectors and topic vectors. Keyword vectors reflect the distribution characteristics of high-frequency words, core words, and event-related words in the text, while topic vectors reflect the text's affiliation with several public opinion topics.

[0036] The second category is network location features, which include node in-degree, node out-degree, and intermediate value. The node in-degree is used to indicate the degree to which the node is pointed to by other nodes, the node out-degree is used to indicate the degree to which the node propagates outward or influences other nodes, and the intermediate value is used to indicate the frequency with which the node is located in the middle of the propagation path.

[0037] The third category is propagation statistical features, which include propagation frequency and propagation increment within a time window. Propagation frequency is used to reflect the total amount of propagation activity formed around the node in the current time layer, and propagation increment is used to reflect the changes in propagation compared to the previous time layer.

[0038] The fourth category is cross-layer propagation characteristics, which include the number of cross-layer transfers, the longest propagation span between layers, and the number of propagation path branches, thereby reflecting the diffusion and extension capabilities of nodes across multiple time layers and the path bifurcation situation.

[0039] After extracting the aforementioned features, a unified encoding process is performed on each feature, enabling features from different sources and with different dimensions to be integrated into the same feature space, ultimately forming the node input vectors corresponding to each node. To ensure consistency in subsequent spatiotemporal graph neural network processing, this embodiment can also normalize, compress intervals, and impute missing values ​​for the features before encoding. The uniformly encoded node input vectors not only contain textual information but also carry structural information, propagation information, and inter-layer evolution information, providing comprehensive data support for the subsequent generation of embedded representations.

[0040] In this embodiment, the obtained node input vector and the bilateral spatiotemporal heterogeneous relation graph obtained in step S2 are jointly input into the spatiotemporal graph neural network. The spatiotemporal graph neural network adopts a differentiated processing strategy for different types of edges: for semantically related edges within the time layer, same-layer aggregation calculation is performed, that is, in the same time layer, information aggregation is performed on the neighboring nodes that have established semantic relationships with the current node, so that the current node can absorb the contextual information of nodes with similar content, similar themes and strong subject associations.

[0041] For causal edges propagating between time layers, cross-layer propagation computation is performed, that is, the node state is propagated between adjacent time layers along the direction of the propagation causal edge, so that the current node can inherit the propagation influence of the previous time layer and extend to the next time layer.

[0042] By employing this joint processing approach that simultaneously addresses semantic associations within the same layer and cross-layer propagation relationships, spatiotemporal graph neural networks can synchronously model the local semantic environment and temporal propagation trajectory of nodes. After several rounds of aggregation and propagation computation, each node obtains a corresponding embedded representation. Compared to the original node input vector, this embedded representation more comprehensively reflects the node's position and role in the current public opinion propagation network, as well as its propagation connections with other nodes.

[0043] For example, even if a node's text content is short, if it is located at the convergence point of multiple propagation paths and has significant cross-layer propagation extension, its embedding representation can reflect strong structural influence features. Conversely, if a node has similar content but weak propagation, its embedding representation will show more local semantic neighborhood features. Through the above processing, a more concise and effective node description can be provided for subsequent trend state determination and propagation direction analysis.

[0044] S4. Construct a ternary trend state vector and perform trend classification and propagation direction clustering.

[0045] In this embodiment, based on the embedded representation of each node, the propagation activity, propagation attenuation, and path offset of each node are further calculated, and a ternary trend state vector for the corresponding node is constructed accordingly. The propagation activity is calculated based on the response strength of the node's neighborhood and the cross-layer diffusion strength within the current time layer, reflecting the current level of propagation activity of the node.

[0046] If a node forms close connections with multiple high-intensity semantic neighbors in the current time layer and triggers continuous diffusion in the next time layer, its propagation activity is relatively high. Propagation decay is calculated based on the decrease in a node's response between consecutive time layers and the degree of decay at the end of the propagation chain, reflecting whether the propagation chain corresponding to that node has entered the decay phase. If a node propagates strongly in the previous time layer but experiences reduced response and branch contraction in subsequent time layers, its propagation decay is high.

[0047] Path offset is calculated based on the degree of deviation between the actual propagation path of a node and the main propagation direction cluster center path. It is used to reflect whether the propagation branch where the node is located deviates from the main propagation direction of public opinion. If a node participates in propagation, but its diffusion path gradually deviates from the main discussion chain and turns into a peripheral topic branch, then its path offset is high.

[0048] After calculating the three dimensions, the propagation activity, propagation attenuation, and path deviation are combined into a ternary trend state vector in a fixed order. This approach avoids simply reducing node trends to a single popularity index, instead describing the node state simultaneously from three aspects: propagation intensity, propagation persistence, and path deviation, providing a more refined basis for subsequent classification and clustering.

[0049] In this embodiment, the ternary trend state vector of each node determines whether the node is in an upward, stable, or downward propagation trend category. If a node has high propagation activity, low propagation attenuation, and small path deviation, it can be classified as an upward trend. If a node's propagation activity and attenuation are both at intermediate levels, and the path deviation is not significant, it can be classified as a stable trend. If a node's propagation activity continuously decreases, its propagation attenuation increases, or its path deviation gradually increases, it can be classified as a downward trend. After completing the trend classification, cluster analysis is further performed on nodes within the same trend category.

[0050] During clustering, the ternary trend state vector of a node, the cross-layer propagation depth, and the main propagation direction are used as the joint clustering criteria. This considers both the node's own trend state and its propagation extension length and direction across time layers. After clustering, multiple propagation direction clusters are obtained, each corresponding to a relatively stable propagation extension direction and the set of propagation nodes it covers.

[0051] Simultaneously, the direction of the cluster center obtained from clustering is taken as the main propagation path direction of the corresponding propagation direction cluster, and the distribution of propagation paths within each cluster is further statistically analyzed. Through this processing, this embodiment can not only answer the question of "which nodes are heating up and which nodes are decaying", but also further answer the question of "in which directions do these nodes spread and whether they form independent propagation branches", thus making the public opinion analysis results more applicable to hotspot tracking and propagation structure judgment.

[0052] S5. Identify key propagation nodes and hot event nodes and construct a double-bias feedback quantity.

[0053] In this embodiment, key propagation nodes and hotspot event nodes are identified based on the node connection density, cross-layer propagation depth, and path concentration in each propagation direction cluster.

[0054] Node connection density refers to the tightness of connections between a node and its neighboring nodes, reflecting the node's core position in the local propagation network. Cross-layer propagation depth reflects the number of layers through which the content corresponding to the node propagates continuously. Path concentration characterizes whether the propagation paths formed around the node are concentrated in a few core paths. If a node simultaneously possesses high node connection density, large cross-layer propagation depth, and high path concentration in a certain propagation direction cluster, then the node can be identified as a key propagation node.

[0055] For identifying hot topic event nodes, further filtering can be conducted based on the identification results of key dissemination nodes, combined with the thematic focus of the text content they carry and the intensity of cross-platform responses. For example, if a node is not only located at the core of a dissemination direction cluster, but also if the replies, citations, and forwards surrounding that node maintain a high intensity across multiple consecutive time layers, it can be further labeled as a hot topic event node. The final output node labeling results may include node number, trend category, dissemination direction cluster, whether it is a key dissemination node, and whether it is a hot topic event node. Through this step, the analysis results can directly serve public opinion monitoring personnel to quickly identify core dissemination sources, key turning points, and hot topic content.

[0056] In this embodiment, the clustering consistency deviation and propagation path reverse deviation of similar nodes are calculated based on historical propagation samples and current prediction results, and the two are combined to form a double deviation feedback quantity.

[0057] The clustering consistency deviation of nodes of the same type is calculated based on the dispersion of the state distance from each node to the cluster center within a cluster along the same propagation direction. If the nodes within a cluster along a certain propagation direction show significant differences in their ternary trend state vectors, it indicates weak consistency within the cluster, and the resulting propagation direction clusters may exhibit unstable aggregation. In this case, the clustering consistency deviation of nodes of the same type will be large. The propagation path reverse deviation is calculated based on the reverse ratio between the predicted propagation direction and the historical true propagation direction.

[0058] If some nodes are predicted to propagate in a certain direction in the current prediction, but their actual propagation in historical samples is mainly in the opposite direction, then the propagation path deviation is large.

[0059] By simultaneously setting these two biases, this embodiment can evaluate clustering quality from the perspective of intra-cluster consistency, and also evaluate the prediction results from the perspective of whether the path direction deviates from the historical true propagation pattern. Compared with the scheme that only uses a single prediction error for correction, this dual-bias feedback can more specifically point out the source of the problem, whether it is an unreasonable edge weight setting, mixed intra-cluster states, or a reversal in the propagation direction judgment, thus providing a clearer basis for subsequent corrections.

[0060] S6. Perform feedback corrections and output the results of online public opinion analysis and prediction.

[0061] In this embodiment, the obtained double-biased feedback quantity is fed back to the spatiotemporal graph neural network to iteratively correct the semantic association edge weights within the time layer, the causal edge weights between time layers, and the node encoding parameters.

[0062] Specifically, the weights of semantic association edges within the time layer are corrected according to the consistency deviation of clustering of nodes of the same type, so that the internal states of clusters in the same propagation direction are more concentrated and the semantic associations are more stable; the weights of causal edges between time layers are corrected according to the reverse deviation of propagation path, so that the cross-layer propagation direction is more consistent with the historical real propagation direction; at the same time, the node encoding parameters are synchronously corrected according to the above two deviations, so that the contribution relationship of text representation features, network location features, propagation statistics features and cross-layer propagation features in unified encoding is more adapted to the actual propagation structure of the current public opinion event.

[0063] After one or more rounds of iterative correction, the network public opinion analysis and prediction results are output. The network public opinion analysis and prediction results may include: the embedded representation of each node, the ternary trend state vector, the propagation trend category, the propagation direction cluster division results, the propagation path distribution, the key propagation node annotation results, and the hot event node annotation results.

[0064] In practical applications, public opinion monitoring personnel can determine whether the current event is in a stage of continuous escalation, whether multiple separate directions of dissemination have formed, which nodes are the core nodes that trigger the spread, and which nodes may become new public opinion focal points based on the output results, and take further analysis, early warning or response measures accordingly.

[0065] In a specific application example, for a sudden social event, the system continuously collects publicly discussed content from various platforms in the first few hours after the event and divides it into time layers by hour. As data continues to enter, some nodes exhibit high semantic clustering within the same time layer, while forming obvious referencing and forwarding chains between adjacent time layers. After processing by the method in this embodiment, a group of propagation direction clusters in an upward trend category can be identified. One cluster spreads around the event facts themselves, another cluster spreads around the evaluation of the response measures, and yet another cluster gradually deviates from the main topic and enters the emotional amplification path. Furthermore, through the key node annotation results, it can be found that some nodes, although published later, are identified as key propagation nodes because they are located at the convergence point of multiple propagation branches and have a large cross-layer propagation depth; while some initially published information nodes, although published earliest, are not misjudged as hot event nodes because their subsequent spread is limited. After double-bias feedback correction, the system can further reduce the dispersion within direction clusters and the misjudgment of propagation directions, making the results closer to the actual evolution process.

[0066] In summary, this embodiment constructs a bilateral spatiotemporal heterogeneous relation graph that simultaneously includes semantic association edges within the time layer and causal propagation edges between time layers. Combined with unified encoding of multi-dimensional node features, joint modeling of spatiotemporal graph neural networks, generation of ternary trend state vectors, clustering of propagation directions, and double-bias feedback correction, it forms an analytical and predictive process for the propagation of online public opinion. This process, within a unified framework, takes into account content association, propagation links, trend states, and directional distribution, providing a concrete and implementable technical path for the structured analysis and continuous prediction of online public opinion.

[0067] Example 2 This embodiment provides a network public opinion analysis and prediction system based on spatiotemporal graph neural networks. The system can be deployed in a public opinion analysis server, a cloud processing platform, or other electronic devices with data processing capabilities, and is used to analyze, identify, and predict the process of public opinion dissemination on network platforms.

[0068] like Figure 2 As shown, the system includes: a data acquisition module, a heterogeneous relationship graph construction module, a feature encoding module, a spatiotemporal graph modeling module, a trend state generation module, a cluster analysis module, a key node annotation module, and a dual-bias feedback module. These modules are connected in sequence and work together to complete the analysis and prediction of online public opinion.

[0069] The data acquisition module is used to acquire online public opinion data and extract public opinion text, publication time, forwarding relationship, reply relationship, citation relationship and publishing entity identifier.

[0070] In practice, keywords or event identifiers can be pre-defined around the event to be analyzed. Relevant data can be collected from news comment sections, social media platforms, forums, and short-form content dissemination platforms. The raw data should be cleaned and organized, removing duplicate records, blank records, and data items lacking publication time or dissemination relationships. The retained data should be uniformly converted into a public opinion node record format. Each public opinion node record should include at least the text content, publication time, subject identifier, and dissemination relationship information as the basic input for subsequent processing.

[0071] The heterogeneous relationship graph construction module is connected to the data acquisition module and is used to construct a bilateral spatiotemporal heterogeneous relationship graph that simultaneously contains semantic association edges within the time layer and causal propagation edges between time layers.

[0072] The heterogeneous relationship graph construction module includes a time layer generation unit, a semantic association edge generation unit, and a propagation causal edge generation unit. The time layer generation unit is used to divide multiple time layers according to a preset time window and map public opinion nodes to the corresponding time layers.

[0073] The semantic association edge generation unit is used to establish semantic association edges within the same time layer based on the textual semantic similarity between nodes, the overlap rate of topic keywords, and the frequency of interaction of the publishing subject, and to determine the corresponding edge weights. The propagation causality edge generation unit is used to establish propagation causality edges between adjacent time layers based on forwarding relationships, reply relationships, citation relationships, and chronological order, and to write the propagation causality strength into the edge weight field. Through the above processing, semantic connections within the same layer and propagation connections across layers can be represented simultaneously in the unified graph structure.

[0074] The feature encoding module is connected to the heterogeneous relationship graph construction module and is used to extract and encode text representation features, network location features, propagation statistics features, and cross-layer propagation features.

[0075] Specifically, text representation features include keyword vectors and topic vectors; network location features include node in-degree, node out-degree, and intermediate value; propagation statistics features include propagation frequency and propagation increment within a time window; and cross-layer propagation features include the number of cross-layer transitions, the longest propagation span between layers, and the number of branches in the propagation path. The feature encoding module performs unified encoding processing on the above features to form node input vectors, so that features from different sources and with different dimensions can participate in subsequent modeling within the same framework.

[0076] The spatiotemporal graph modeling module is connected to the heterogeneous relation graph construction module and the feature encoding module, respectively. It is used to input the node input vector and the bilateral spatiotemporal heterogeneous relation graph into the spatiotemporal graph neural network, perform same-layer aggregation calculation on semantic association edges within the time layer, and perform cross-layer propagation calculation on causal edges propagating between time layers to obtain the embedded representation of each node.

[0077] Among them, same-layer aggregation computation is used to gather semantic neighborhood information of the current node within the same time layer, and cross-layer propagation computation is used to propagate the propagation state between adjacent time layers along the propagation causal edge. The resulting embedded representation can characterize both the node's own content and its spatiotemporal position and diffusion effect in the overall propagation network.

[0078] The trend state generation module is connected to the spatiotemporal graph modeling module and is used to generate a three-element trend state vector of node propagation activity, propagation decay, and path offset.

[0079] The propagation activity is generated based on the response strength of the node's neighborhood and the cross-layer diffusion strength within the current time layer; the propagation attenuation is generated based on the decrease in the node's response between consecutive time layers and the attenuation degree at the end of the propagation chain; and the path offset is generated based on the deviation between the node's actual propagation path and the path of the cluster center in the main propagation direction. The trend state generation module combines the propagation activity, propagation attenuation, and path offset in a fixed order into a ternary trend state vector, which serves as the basis for subsequent trend division and cluster analysis.

[0080] The clustering analysis module is connected to the trend state generation module. It is used to determine the propagation trend category of the node based on the ternary trend state vector, and to cluster the nodes under the same trend category to output the propagation direction cluster and propagation path distribution.

[0081] In practice, nodes are first classified into ascending, stable, or descending propagation trend categories based on their ternary trend state vectors. Then, within the same trend category, node clustering is performed using the ternary trend state vector, cross-layer propagation depth, and main propagation direction as joint criteria to obtain multiple propagation direction clusters. The center direction of each cluster is determined as the main propagation path direction of the corresponding propagation direction cluster. Simultaneously, the clustering analysis module outputs the propagation path distribution within each propagation direction cluster.

[0082] The key node annotation module is connected to the cluster analysis module and is used to identify key propagation nodes and hot event nodes.

[0083] In practice, the key node annotation module analyzes the role of nodes in the propagation structure based on the node connection density, cross-layer propagation depth, and path concentration within each propagation direction cluster. If a node has high connection density, large cross-layer propagation depth, and high path concentration within its propagation direction cluster, it is identified as a key propagation node. If this node also maintains a high propagation intensity and generates significant responses across multiple time layers, it is further identified as a hotspot event node. The final node annotation results are output to characterize the importance of nodes in the public opinion propagation network.

[0084] The dual-bias feedback module is connected to the clustering analysis module, the key node annotation module, and the spatiotemporal graph modeling module, respectively. It is used to iteratively correct the semantic association edge weights within the time layer, the causal edge weights between time layers, and the node encoding parameters based on the clustering consistency deviation of nodes of the same type and the reverse deviation of the propagation path.

[0085] The clustering consistency deviation of nodes of the same type is calculated based on the dispersion of the state distance from each node in the same propagation direction to the cluster center, while the propagation path reverse deviation is calculated based on the reverse ratio between the predicted propagation direction and the historical true propagation direction. The dual-deviation feedback module combines the above two deviations into a dual-deviation feedback quantity and feeds it back to the aforementioned processing procedure to correct the semantic association edge weights within the time layer, the propagation causal edge weights between time layers, and the node encoding parameters, thereby continuously optimizing the system output results.

[0086] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for network public opinion analysis and prediction based on spatiotemporal graph neural networks, characterized in that, Includes the following steps: S1. Obtain online public opinion data, extract public opinion text, publication time, forwarding relationship, reply relationship, citation relationship and publishing entity identifier, and divide it into multiple time layers according to the preset time window; S2. Based on the public opinion data nodes in each time layer, construct an initial graph structure. Within the same time layer, establish semantic association edges based on text semantic similarity, topic keyword overlap rate, and interaction frequency of the publishing entity. Between adjacent time layers, establish propagation causal edges based on forwarding relationship, reply relationship, citation relationship, and time sequence, thereby forming a bilateral spatiotemporal heterogeneous relationship graph that simultaneously contains semantic association edges within time layers and propagation causal edges between time layers. S3. Extract text representation features, network location features, propagation statistics features, and cross-layer propagation features for each public opinion data node, and uniformly encode the features to form node input vectors; input the node input vectors and the bilateral spatiotemporal heterogeneous relationship graph into the spatiotemporal graph neural network, perform same-layer aggregation calculation on semantic association edges within the time layer, and perform cross-layer propagation calculation on causal propagation edges between time layers to obtain the embedded representation of each node; the text representation features include keyword vectors and topic vectors, the network location features include node in-degree, node out-degree, and intermediate value, and the propagation statistics features include propagation frequency and propagation increment within the time window; S4. Based on the embedded representation of each node, calculate the propagation activity, propagation decay, and path offset of each node, and arrange the propagation activity, propagation decay, and path offset in a fixed order to construct the ternary trend state vector of the corresponding node. Among them, the propagation activity is calculated based on the response intensity of the node's neighborhood and the cross-layer diffusion intensity within the current time layer; the propagation attenuation is calculated based on the decrease in the node's response between consecutive time layers and the attenuation degree at the end of the propagation chain; and the path offset is calculated based on the degree of deviation between the node's actual propagation path and the cluster center path of the main propagation direction. Based on the ternary trend state vector, the node is determined to be in an upward, stable, or downward propagation trend category, and the nodes under the same trend category are clustered to update the corresponding propagation direction clusters and propagation path distributions. S5. Identify key propagation nodes and hot event nodes based on the node connection density, cross-layer propagation depth and path concentration in each propagation direction cluster, and output the node labeling results; calculate the cluster consistency deviation of similar nodes and the reverse deviation of propagation paths based on historical propagation samples and current prediction results, and combine the two into a double deviation feedback quantity. S6. The double-bias feedback quantity is fed back to the spatiotemporal graph neural network to iteratively correct the semantic association edge weights within the time layer, the causal edge weights between time layers, and the node encoding parameters, so as to output the network public opinion analysis and prediction results.

2. The method for network public opinion analysis and prediction based on spatiotemporal graph neural networks according to claim 1, characterized in that, In step S2, when establishing semantic association edges within the time layer, the text semantic similarity, topic keyword overlap rate, and publisher interaction frequency between nodes are calculated respectively. Semantic association edges within the time layer are established when the text semantic similarity, topic keyword overlap rate, and publisher interaction frequency all meet the corresponding threshold conditions. The edge weight of the semantic association edges within the time layer is obtained by weighting the text semantic similarity, topic keyword overlap rate, and publisher interaction frequency.

3. The method for network public opinion analysis and prediction based on spatiotemporal graph neural networks according to claim 1, characterized in that, In step S2, when establishing the inter-time layer propagation causal edge, a directed edge is established according to the direction from the previous time layer node to the next time layer node, and the propagation causal strength is calculated based on whether there is a forwarding relationship, reply relationship, or reference relationship between the nodes, as well as the corresponding time interval and propagation chain position. The propagation causal strength is used as the edge weight of the inter-time layer propagation causal edge.

4. The method for network public opinion analysis and prediction based on spatiotemporal graph neural networks according to claim 1, characterized in that, In step S4, when clustering nodes under the same trend category, the ternary trend state vector of the node, the cross-layer propagation depth and the main propagation direction are used as the basis for joint clustering, and the cluster center direction obtained after clustering is updated to the main propagation path direction of the corresponding propagation direction cluster.

5. The method for network public opinion analysis and prediction based on spatiotemporal graph neural networks according to claim 1, characterized in that, In step S5, the clustering consistency deviation of nodes of the same type is calculated based on the dispersion of the state distance from each node in the cluster to the cluster center in the same propagation direction, and the propagation path reverse deviation is calculated based on the reverse ratio between the predicted propagation direction and the historical true propagation direction.

6. A network public opinion analysis and prediction system based on spatiotemporal graph neural networks, characterized in that, include: The module includes a data acquisition module, a heterogeneous relationship graph construction module, a feature encoding module, a spatiotemporal graph modeling module, a trend state generation module, a cluster analysis module, a key node annotation module, and a dual-bias feedback module. The data acquisition module is used to acquire online public opinion data and extract public opinion text, publication time, forwarding relationship, reply relationship, citation relationship and publishing entity identifier; The heterogeneous relation graph construction module is used to construct a bilateral spatiotemporal heterogeneous relation graph that simultaneously contains semantic association edges within the time layer and causal propagation edges between time layers. The feature encoding module is used to extract and encode text representation features, network location features, propagation statistics features, and cross-layer propagation features; The spatiotemporal graph modeling module is used to input node input vectors and bilateral spatiotemporal heterogeneous relationship graphs into the spatiotemporal graph neural network, perform same-layer aggregation calculation on semantic association edges within the time layer, and perform cross-layer propagation calculation on causal edges propagating between time layers. The trend state generation module is used to generate a three-element trend state vector of node propagation activity, propagation decay, and path offset. The clustering analysis module is used to determine the propagation trend category of a node based on the ternary trend state vector, and to cluster nodes under the same trend category to output updated propagation direction clusters and propagation path distributions. The key node annotation module is used to identify key propagation nodes and hot event nodes; The dual-bias feedback module is used to iteratively correct the weights of semantic association edges within the time layer, the weights of causal edges propagating between time layers, and the node encoding parameters based on the clustering consistency bias of nodes of the same type and the reverse bias of the propagation path.

7. The network public opinion analysis and prediction system based on spatiotemporal graph neural network according to claim 6, characterized in that, The heterogeneous relation graph construction module includes a time layer generation unit, a semantic association edge generation unit, and a propagation causal edge generation unit; The time layer generation unit is used to divide multiple time layers according to a preset time window.

8. The network public opinion analysis and prediction system based on spatiotemporal graph neural network according to claim 7, characterized in that, The semantic association edge generation unit is used to establish semantic association edges within the time layer based on text semantic similarity, topic keyword overlap rate and interaction frequency of the publishing entity. The propagation causal edge generation unit is used to establish inter-time propagation causal edges based on forwarding relationships, reply relationships, referencing relationships, and time sequence.