A social public opinion event detection method based on hyperbolic graph clustering
Patent Information
- Application Number
- CN202410467871.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-18
- Publication Date
- 2026-10-13
- Estimated Expiration
- 2044-04-18
AI Technical Summary
[0003]然而,由于社交媒体平台的海量数据和高度动态的特性,有效地检测和跟踪舆情事件变得非常困难
[0088]本发明能够提高社会舆情事件检测的准确性和效率:通过使用双曲分区树构建和叶节点嵌入等创新方法,可以提高社会舆情事件的准确性和效率。通过有效地处理和分析大规模的数据信息,该技术能够快速准确地检测出具有重要意义的社会舆情事件,为决策者和研究人员提供有价值的信息。
Smart Images

Figure CN118377900B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of data processing technology, and in particular relates to a social public opinion event detection method based on hyperbolic graph clustering. Background Technology
[0002] With the widespread adoption and rapid development of social media, people are increasingly inclined to share their views, emotions, and opinions on online platforms. This has made social media a significant source of public opinion events.
[0003] However, due to the massive amounts of data and highly dynamic nature of social media platforms, effectively detecting and tracking public opinion events has become extremely difficult.
[0004] Existing social media event detection technologies suffer from problems such as inaccurate semantic understanding, difficulties in sentiment analysis, challenges in assessing the credibility of information sources, and difficulties in event identification. Traditional text clustering methods often perform poorly when faced with the complexity of social media data. Summary of the Invention
[0005] To address the aforementioned issues, this invention proposes a social public opinion event detection method based on hyperbolic graph clustering, which accurately identifies and clusters related social public opinion events.
[0006] To achieve the above objectives, the technical solution adopted by this invention is: a social public opinion event detection method based on hyperbolic graph clustering, comprising the following steps:
[0007] S10, Data Collection: Detecting network data and collecting public opinion data;
[0008] S20, perform data preprocessing on the collected data;
[0009] S30, Extract entity relationships from the preprocessed collected data;
[0010] S40, Graph Construction: Constructing a graph structure includes nodes and edges. In the entity relation extraction task, entities are represented as nodes, and relations are used as edges connecting these nodes.
[0011] S50, Node embedding learning is performed on the graph structure. Node embedding learning includes leaf node embedding learning and parent node embedding learning. For these two types of node embedding learning, Lorentz convolutional layers and a relaxation method are used respectively to map node features to leaf node embeddings and parent node embeddings in hyperbolic space.
[0012] S60, Hyperbolic partitioning tree construction: Under the principle of minimizing structural information, construct the optimal partitioning tree of the graph for clustering;
[0013] S70, Event Detection: Based on cluster analysis, this method identifies and detects events with unique themes and relevance by analyzing the clustering results.
[0014] Furthermore, the data collection phase aims to gather task-related data samples by monitoring and analyzing posts, comments, tags, and topics through social media platforms, online forums, blogs, and news media to obtain a large amount of public opinion data.
[0015] Furthermore, the collected data undergoes data preprocessing, including:
[0016] Text cleaning: removing noise and irrelevant information from data;
[0017] Word segmentation: dividing text data into a sequence of individual words or phrases to form a vocabulary;
[0018] Stop word filtering: Removes common words that have no real meaning;
[0019] Case conversion: Converts text to either lowercase or uppercase.
[0020] Stem extraction or word form restoration: restoring words to their original stem form;
[0021] Remove duplicate data: If duplicate public opinion data exists in the dataset, detect and delete them;
[0022] Data conversion: Converting text data into a numerical representation.
[0023] Furthermore, the entity relationship extraction includes the following steps:
[0024] S31, Graph Encoder Processing: Preprocessed public opinion data is input into the graph encoder to construct a text graph G. T ={V T E T},V T E is a node that is syntactically dependent. T Edges are syntactically dependent; using the nodes of the text graph, graph X is obtained through the BERT text encoder. T Enter the attribute transformer; use the attribute transformer to perform attribute attention processing and summation and normalization, and then input it into the enhanced edge graph alignment module. The attribute attention mechanism is used by incorporating the edge type into the key and value of the transformer's self-attention mechanism as the attribute transformer, updating the node state across the graph and incorporating relation edges.
[0025] S32, Enhanced edge graph alignment module processing: Align nodes and edges in the text graph, align nodes and edges across the graph, and transfer the matched semantic information from the object to the entity;
[0026] S33, processed through a multi-channel layer: after enhancing the edge graph alignment, it is processed by part-of-speech tagging, syntactic distance and word co-occurrence matrix respectively to obtain three feature matrices. A weighted graph convolutional network module is used to model each matrix to obtain the representation of each channel. Then these representations are combined and sent to the multilayer perceptron layer to obtain the final word representation.
[0027] Furthermore, the enhanced edge-graph alignment module processing includes the following steps:
[0028] The optimal transport method is used to match nodes and edges across the graph. Two distance metrics are used for cross-graph matching: Wasserstein distance is used for node matching, and Gromov-Wasserstein distance is used for edge matching. Gromov-Wasserstein distance is used to measure the similarity score of edges across the graph by calculating the distance between node pairs.
[0029] By using an image-to-text attention mechanism, the matched semantic information is transferred from the visual object to the text modality, and an improved text representation is obtained.
[0030] Furthermore, the graph construction process includes the following steps:
[0031] S41, Node representation: Entity recognition and named entity recognition tasks can be used to identify entities in text, representing these entities as nodes V in a graph; Edge representation: Based on the relationships between entities, construct edges E connecting these nodes;
[0032] Construct a graph structure G = (V, E) using the above representation;
[0033] S42, After constructing the graph structure, introduce the structural information, perform a partitioning operation on the graph structure to obtain a graph G with partition height H, and obtain the node feature representation structure;
[0034] S43, given a graph G = (V, E) with a weight function w and a partitioning tree of G with height H.
[0035] G about The structural information of each non-root node α is defined as follows:
[0036]
[0037] In a partitioning tree with root node λ In this tree, each tree node α is associated with a subset of V, denoted as modulo V. α Its direct predecessor is α - ; scalar g α It is model Vα The total weight of the edges in a graph with one endpoint;
[0038] The H-dimensional structural information of G is:
[0039]
[0040] Traverse all possible partitions of G of height H, and define the H-dimensional structural entropy of G as:
[0041]
[0042]
[0043] in It is the optimal tree of G, which encodes self-organization and minimizes the uncertainty of the graph;
[0044] S44, Learning the optimal partitioning tree in the Lorentz model of hyperbolic space. The node features and structural information are combined through a graph convolutional network. In hyperbolic space, the leaf nodes of the tree are first embedded, then the parent nodes are recursively learned, and finally self-supervised clustering is performed.
[0045] Furthermore, the leaf node embedding learning includes the following steps:
[0046] S511 introduces a Lorentz convolutional layer to learn leaf node embeddings in hyperbolic space. Where x i and These are node features and leaf node embeddings, respectively.
[0047] S512 employs attention aggregation, performs dimensional transformation through the Lorentz linear operator, derives attention weights from the self-attention mechanism, and weights the arithmetic mean of multi-valued vectors.
[0048] Furthermore, the parent node embedding learning includes the following steps:
[0049] S521, For any G, given a partition tree And add a node β to obtain relaxation. The structural information remains unchanged if one of the following conditions is met.
[0050] 1. β is a leaf node, and its modulus T β It is an empty set;
[0051] 2. Insert β between node α and its child nodes such that the modulus T β and T α equal;
[0052] Based on the above description, redundant nodes in the partitioning tree do not affect the value of structural entropy, and are ultimately represented as empty leaf nodes through optimization objectives; S522, Hierarchical allocation: For a partitioning tree of height H... Assume the number of tree nodes at level h is N. h The hierarchical parent allocation matrix C from level h to level (h-1) is defined. h ;
[0053] For graph G and its partitioning tree Relative to G at height H The formula for H-dimensional structural information is:
[0054]
[0055] in, It is the volume of G; for the k-th node in height h, and These are the graph node sets T k and T k- Volume;
[0056] Therefore, the H-dimensional structural information of G is:
[0057]
[0058] S523 designs the Lorentz allocator based on the characteristic that neighboring nodes in the graph tend to have similar assignments. It uses a multilayer perceptron (MLP) to learn the assignment from the embedding and uses LAtt to parameterize the similarity.
[0059] S524 infers the node embedding z at level h-1. h-1 ; the geometric centroid relative to the squared Lorentz distance, where the weights are softly assigned by C h Give
[0060]
[0061] Cij = 1 indicates that the i-th node is the parent node of the j-th node at level (h-1), and N is the total number of nodes;
[0062] S525 derives the closed-form solution for parent node embedding as follows:
[0063] Z h-1 =LAgg(C h Z h );
[0064] In hyperbolic space, for any set of points The arithmetic mean is And it is a closed-form solution that minimizes the geometric centroid defined in the process;
[0065] According to the Lorentz allocator formula, the graph structure A between the (h-1)th level parent nodes is required. h-1 To derive the assignment; the adjacency matrix of the (h-1)th level graph is:
[0066] A h-1 =(C h ) T A h C h
[0067] Therefore, after obtaining the node embeddings, a partition tree is recursively constructed from bottom to top in the hyperbolic space.
[0068] Furthermore, based on the principle of minimizing structural information, the optimal partitioning tree of the graph is constructed for clustering, including the following steps:
[0069] S61, the one-dimensional structural entropy decomposition of graph G is:
[0070]
[0071] in, It is entropy;
[0072] Given a graph G = (V, E) with w, the normalized H-structure entropy of graph G is defined as
[0073] Graph propagation is a definite goal of graph clustering, obtaining a one-dimensional structural entropy for any G. As a constant, using minimization Once the minimization graph propagation is complete, group the nodes into clusters;
[0074] S62, for graph G, the partitioning tree is represented as... The mapping from the learnable embedding Z to the assignment is accomplished through a neural network; the differentiable structure information is given as follows: The assignment is derived from a neural network with parameter Θ;
[0075] Given G, the differentiable structural information is minimized as follows:
[0076]
[0077] Learn node embedding Z * and parameter Θ * To derive the hierarchical parent node allocation of G;
[0078] Then, the optimal partitioning tree of G is constructed through allocation. This makes densely connected nodes There is a higher probability that they will be assigned to the same parent node, thus minimizing conductivity and exhibiting a cluster structure.
[0079] Furthermore, in step S70, event detection includes:
[0080] (1) Event topic extraction: First, the text data needs to be clustered to organize text content with similar topics into cluster groups; based on the cluster groups, the topic model is applied to extract the topic information of each group.
[0081] (2) Calculation of event relevance: In the calculation of event relevance, two aspects of relevance need to be considered: semantic relevance and temporal relevance between texts;
[0082] First, semantic relevance calculation aims to measure the semantic similarity or relevance between texts;
[0083] Secondly, time correlation calculation is used to determine the temporal relationship between texts, that is, the order in which the texts were published.
[0084] By combining semantic relevance and temporal relevance, the final event relevance is obtained;
[0085] (3) Event identification: Based on the results of event correlation calculation, highly correlated topics are aggregated to form event clusters; the similarity of event clusters is calculated.
[0086] (4) Event detection: For each event cluster, further analyze its contained cluster groups and related texts to obtain more information about the event; use text mining and time series analysis techniques to extract important features and dynamic changes of the event.
[0087] The beneficial effects of adopting this technical solution are:
[0088] This invention improves the accuracy and efficiency of detecting public opinion events: by using innovative methods such as hyperbolic partitioning tree construction and leaf node embedding, the accuracy and efficiency of detecting public opinion events can be enhanced. Through the effective processing and analysis of large-scale data, this technology can quickly and accurately detect significant public opinion events, providing valuable information for policymakers and researchers.
[0089] This invention automates the processing of complex public opinion data: public opinion data typically contains a large amount of textual information and is highly complex and diverse; this invention, through steps such as data preprocessing, entity relationship extraction, and graph construction, can analyze and mine the data from multiple dimensions. This technology can help users quickly obtain and understand key information about public opinion events, thereby better addressing the challenges of public opinion.
[0090] This invention enables efficient event detection and tracking: Rapid detection and tracking of public opinion events are crucial for timely response and problem-solving. This invention efficiently detects and tracks events by employing innovative methods such as parent node learning and hyperbolic partitioning tree construction to effectively cluster and classify public opinion data. By constructing a hierarchical structure and relationships between events, this technology helps users quickly understand the evolution of events and key participants, thereby providing more accurate decision support and strategic planning. Attached Figure Description
[0091] Figure 1 This is a schematic diagram of a social public opinion event detection method based on hyperbolic graph clustering according to the present invention;
[0092] Figure 2 This is a framework diagram for entity relationship extraction in an embodiment of the present invention;
[0093] Figure 3 This is a training optimal hyperbolic graph clustering framework diagram in an embodiment of the present invention. Detailed Implementation
[0094] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described below with reference to the accompanying drawings.
[0095] In this embodiment, see Figure 1 As shown, this invention proposes a social public opinion event detection method based on hyperbolic graph clustering, including the following steps:
[0096] S10, Data Collection: Detecting network data and collecting public opinion data;
[0097] S20, perform data preprocessing on the collected data;
[0098] S30, Extract entity relationships from the preprocessed collected data;
[0099] S40, Graph Construction: Constructing a graph structure includes nodes and edges. In the entity relation extraction task, entities are represented as nodes, and relations are used as edges connecting these nodes.
[0100] S50, Node embedding learning is performed on the graph structure. Node embedding learning includes leaf node embedding learning and parent node embedding learning. For these two types of node embedding learning, Lorentz convolutional layers and a relaxation method are used respectively to map node features to leaf node embeddings and parent node embeddings in hyperbolic space.
[0101] S60, Hyperbolic partitioning tree construction: Under the principle of minimizing structural information, construct the optimal partitioning tree of the graph for clustering;
[0102] S70, Event Detection: Based on cluster analysis, this method identifies and detects events with unique themes and relevance by analyzing the clustering results.
[0103] As an optimization of the above embodiments, the data acquisition phase aims to collect task-related data samples and monitor and analyze posts, comments, tags, and topics through social media platforms, online forums, blogs, and news media to obtain a large amount of public opinion data.
[0104] Since the collected public opinion data may be in natural language, it can contain ambiguity, redundancy, and inaccurate descriptions, leading to problems in pre-training. Therefore, the collected information can be refined. This refined information can then be used as input for data structuring and further processing.
[0105] Data preprocessing of the collected data includes:
[0106] Text cleaning: removing noise and irrelevant information from data; such as HTML tags, special characters, URL links, etc. Text cleaning can be performed using regular expressions or text processing libraries.
[0107] Word segmentation: This involves dividing text data into a sequence of individual words or phrases to form a vocabulary. Word segmentation can be performed using Chinese or English word segmentation tools.
[0108] Stop word filtering: Removes common words without actual meaning, such as prepositions, conjunctions, and particles. For example, you can use a stop word list for filtering, or you can customize stop words according to specific needs.
[0109] Case conversion: Converts text to lowercase or uppercase to eliminate the differences caused by case.
[0110] Stemming or lemmatization: restoring words to their original stemmed form; for example, restoring "running" to "run". This can be achieved using a stemmer (such as Porter Stemmer) or a lemmatizer (such as WordNetLemmatizer).
[0111] Remove duplicate data: If duplicate public opinion data exists in the dataset, detect and delete it to avoid redundant calculations and analysis.
[0112] Data transformation: Converting text data into a numerical representation to facilitate processing by machine learning algorithms. Common text representation methods include the bag-of-words model, TF-IDF vectorization, and word embeddings (such as Word2Vec and GloVe).
[0113] As an optimization of the above embodiments, such as Figure 2 As shown, the entity relationship extraction includes the following steps:
[0114] S31, Graph Encoder Processing: Preprocessed public opinion data is input into the graph encoder to construct a text graph G. T ={V T E T},V T E is a node that is syntactically dependent. T Edges are syntactically dependent; using the nodes of the text graph, graph X is obtained through the BERT text encoder. T Enter the attribute transformer; use the attribute transformer to perform attribute attention processing and summation and normalization, and then input it into the enhanced edge graph alignment module. The attribute attention mechanism is used by incorporating the edge type into the key and value of the transformer's self-attention mechanism as the attribute transformer, updating the node state across the graph and incorporating relation edges.
[0115] S32, Enhanced edge graph alignment module processing: Align nodes and edges in the text graph, align nodes and edges across the graph, and transfer the matched semantic information from the object to the entity;
[0116] S33, processed through a multi-channel layer: after enhancing the edge graph alignment, it is processed by part-of-speech tagging, syntactic distance and word co-occurrence matrix respectively to obtain three feature matrices. A weighted graph convolutional network (W-GCN) module is used to model each matrix to obtain the representation of each channel. Then these representations are combined and sent to the multilayer perceptron (MLP) layer to obtain the final word representation.
[0117] (a) Part-of-speech tags can provide lexical information for word pairs. For example, most entities are classified as nouns or personal names; (b) Encoding the syntactic distance between word pairs can improve the model's ability to capture long-distance syntactic information; (c) Word co-occurrence matrices can provide corpus-level information between word pairs.
[0118] The enhanced edge-image alignment module includes the following steps:
[0119] The optimal transport method is used to match nodes and edges across the graph. Two distance metrics are used for cross-graph matching: Wasserstein distance is used for node matching, and Gromov-Wasserstein distance is used for edge matching. Gromov-Wasserstein distance is used to measure the similarity score of edges across the graph by calculating the distance between node pairs.
[0120] By using an image-to-text attention mechanism, the matched semantic information is transferred from the visual object to the text modality, and an improved text representation is obtained.
[0121] Entity relation extraction refers to identifying and extracting entities and the relationships between them from social sentiment data. This step can be achieved through technologies such as natural language processing. In entity relation extraction, the first step is to identify entities in the text data. These entities can be people, organizations, events, etc. The process of identifying entities may involve Named Entity Recognition (NER) technology, which can label words in the text as corresponding entities based on predefined entity categories. For example, when processing news reports, NER technology can identify the people, organizations, and events mentioned in the report and label them as entities. Besides identifying entities, entity relation extraction also needs to capture the relationships between entities. These relationships can be diverse, such as associations between people, connections between organizations and events, etc. To extract relationships between entities, relation extraction techniques can be used. This technique can infer the type of relationship between entities based on semantic and contextual information in the text and then label it. For example, in a news report, the relationships between people can be inferred by analyzing the grammatical structure of verbs, prepositional phrases, etc., such as "X is Y's friend" or "X is Y's CEO." The goal of entity relation extraction is to extract accurate and comprehensive entities and their relations so that the subsequent graph construction process can build a graph structure with rich semantics based on this information.
[0122] As an optimization of the above embodiments, the graph construction process includes the following steps:
[0123] S41, Node representation: Entity recognition and named entity recognition tasks can be used to identify entities in text, representing these entities as nodes V in a graph; Edge representation: Based on the relationships between entities, construct edges E connecting these nodes;
[0124] Construct a graph structure G = (V, E) using the above representation;
[0125] S42, After constructing the graph structure, introduce the structural information, perform a partitioning operation on the graph structure to obtain a graph G with partition height H, and obtain the node feature representation structure;
[0126] S43, given a graph G = (V, E0) with a weight function w and a partition tree of G with height H.
[0127] G about The structural information of each non-root node α is defined as follows:
[0128]
[0129] In a partitioning tree with root node λ In this tree, each tree node α is associated with a subset of V, denoted as modulo V.α Its direct predecessor is α - ; scalar g α It is model V α The total weight of the edges in a graph with one endpoint;
[0130] The H-dimensional structural information of G is:
[0131]
[0132] Traverse all possible partitions of G of height H, and define the H-dimensional structural entropy of G as:
[0133]
[0134]
[0135] in It is the optimal tree of G, which encodes self-organization and minimizes the uncertainty of the graph;
[0136] S44, Learning the optimal partitioning tree in the Lorentz model of hyperbolic space. The node features and structural information are combined through a graph convolutional network. In hyperbolic space, the leaf nodes of the tree are first embedded, then the parent nodes are recursively learned, and finally self-supervised clustering is performed.
[0137] Graph construction, based on entity and relation extraction, uses the extracted entities and relations to build a graph structure representing public opinion data. In this graph structure, nodes represent entities, and edges represent relationships between entities. By mapping entities and relations to nodes and edges in the graph, we can form a multimodal graph representation where different types of entities and relations can be expressed. The graph construction process can employ technologies such as graph databases or graph computing frameworks. First, the graph schema needs to be defined, i.e., the types of nodes and edges, and the types of relationships between them. Then, based on the entity and relation data extracted in the entity and relation extraction stage, it is transformed into graph nodes and edges, and the relationships between them are established. For example, mapping person entities to graph nodes and mapping relationships between people to graph edges forms a person network. Similarly, organizational networks and event networks can be constructed. Through graph construction, public opinion data can be represented in a more intuitive and structured way. Such a graph structure can help users better understand and analyze public opinion events, revealing the connections and evolutionary processes between events. Users can explore the relationships between different entities through the nodes and edges of the graph, discover potential patterns and trends, and thus gain in-depth insights into public opinion.
[0138] As an optimization of the above embodiments, such as Figure 3 As shown, in the hyperbolic graph clustering method:
[0139] The leaf node embedding learning includes the following steps:
[0140] S511 introduces a Lorentz convolutional layer to learn leaf node embeddings in hyperbolic space. Where x i and These are node features and leaf node embeddings, respectively.
[0141] S512 employs attention aggregation, performs dimensional transformation through the Lorentz linear operator, derives attention weights from the self-attention mechanism, and weights the arithmetic mean of multi-valued vectors.
[0142] The parent node embedding learning includes the following steps:
[0143] In a partitioning tree, the node number at each internal level is unknown. To address this issue, a simple and effective method is used: set a sufficiently large number of nodes N at level h. h Large N h This may introduce redundant nodes and result in a loose partition tree.
[0144] S521, For any G, given a partition tree And add a node β to obtain relaxation. The structural information remains unchanged if one of the following conditions is met.
[0145] 1. β is a leaf node, and its modulus T β It is an empty set;
[0146] 2. Insert β between node α and its child nodes such that the modulus T β and T α equal;
[0147] As described above, redundant nodes in the partitioning tree do not affect the value of structural entropy and are ultimately represented as empty leaf nodes through optimization objectives. Theoretically, if there are insufficient nodes at an internal level, the self-organization of the graph can still be described by multiple levels in the partitioning tree. Since the structural information in the previous formula is node-based, it cannot be optimized using gradient-based methods. To compensate for this gap, a new formula with horizontally distributed structural information is introduced, which is equivalent to the classic formula mentioned above.
[0148] S522, Hierarchical Allocation: For a partition tree of height H Assume the number of tree nodes at level h is N. h The hierarchical parent allocation matrix C from level h to level (h-1) is defined. h ;
[0149] For graph G and its partitioning tree Relative to G at height H The formula for H-dimensional structural information is:
[0150]
[0151] in, It is the volume of G; for the k-th node in height h, and These are the graph node sets T k and T k- Volume;
[0152] Therefore, the H-dimensional structural information of G is:
[0153]
[0154] S523 designs the Lorentz allocator based on the characteristic that neighboring nodes in the graph tend to have similar assignments. It uses a multilayer perceptron (MLP) to learn the assignment from the embedding and uses LAtt to parameterize the similarity.
[0155] Therefore, the Lorentz allocator is formulated as follows:
[0156] C h =σ((LAtt(Q,K)⊙A h MLP(Z) h ))
[0157] Among them, A h It is the graph structure of the h-th level of the tree. σ represents row normalization using the Softmax function.
[0158] S524 infers the node embedding z at level h-1. h-1 ; the geometric centroid relative to the squared Lorentz distance, where the weights are softly assigned by C h Give
[0159]
[0160] Cij = 1 indicates that the i-th node is the parent node of the j-th node at level (h-1), and N is the total number of nodes;
[0161] S525 derives the closed-form solution for parent node embedding as follows:
[0162] Z h-1 =LAgg(C h Z h );
[0163] In hyperbolic space, for any set of points The arithmetic mean is And it is a closed-form solution that minimizes the geometric centroid defined in the process;
[0164] According to the Lorentz allocator formula, the graph structure A between the (h-1)th level parent nodes is required. h-1 To derive the assignment; the adjacency matrix of the (h-1)th level graph is:
[0165] A h-1 =(C h ) T A h C h
[0166] Therefore, after obtaining the node embeddings, a partition tree is recursively constructed from bottom to top in the hyperbolic space.
[0167] Based on the principle of minimizing structural information, we construct the optimal partitioning tree of the graph for clustering. The specific process framework is as follows: Figure 3 As shown, the steps include:
[0168] S61, the one-dimensional structural entropy decomposition of graph G is:
[0169]
[0170] in, It is entropy;
[0171] Given a graph G = (V, E) with w, the normalized H-structure entropy of graph G is defined as
[0172] Graph propagation is a definite goal of graph clustering, obtaining a one-dimensional structural entropy for any G. As a constant, using minimization After minimizing the graph propagation is complete, group the nodes into clusters. Furthermore, No knowledge of the number of clusters in graph G is required. In short, the formula of this invention can serve as the target for graph clustering without a predefined number of clusters.
[0173] S62, for graph G, the partitioning tree is represented as... The mapping from the learnable embedding Z to the assignment is accomplished through a neural network; the differentiable structure information is given as follows: The assignment is derived from a neural network with parameter Θ;
[0174] Given G, the differentiable structural information is minimized as follows:
[0175]
[0176] Learn node embedding Z * and parameter Θ *To derive the hierarchical parent node allocation of G;
[0177] Then, the optimal partitioning tree of G is constructed through allocation. This makes densely connected nodes There is a higher probability that they will be assigned to the same parent node, thus minimizing conductivity and exhibiting a cluster structure.
[0178] We combine the advantages of structural entropy and hyperbolic space to reveal clustering structures without a predefined clustering number K. A clustering result can be obtained using the above method, identifying groups with similar themes and high correlation, preparing for subsequent event recognition and detection.
[0179] To achieve efficient detection and tracking of public opinion events, this patent proposes key methods for event detection and tracking. The event detection stage utilizes parent node learning technology to cluster and classify nodes in the graph, grouping similar nodes into the same event. By constructing a hierarchical structure of events, the hierarchical relationships and evolutionary trajectories between events can be understood. The event tracking stage employs a hyperbolic partitioning tree construction method to embed events into a hyperbolic space, thereby enabling distance measurement and similarity comparison between events. This event detection and tracking method helps users quickly understand the development of public opinion events and key participants, providing accurate support for decision-making and strategic planning.
[0180] By utilizing hyperbolic partitioning tree construction and leaf node embedding techniques, potential events can be efficiently discovered in large-scale social sentiment data. First, through data preprocessing and entity relation extraction, the raw data is transformed into a representation suitable for constructing a hyperbolic graph. Then, the hyperbolic partitioning tree construction method organizes the data into a multi-level clustering structure, enabling hierarchical exploration and mining of events. Finally, the leaf node embedding method embeds events into the hyperbolic space, allowing the similarity between events to be measured and compared under hyperbolic metrics. This hyperbolic graph clustering method can improve the accuracy and efficiency of social sentiment event detection, providing more valuable information for policymakers and researchers.
[0181] As an optimization of the above embodiment, in step S70, event detection includes:
[0182] (1) Event Topic Extraction: First, the text data needs to be clustered to organize text content with similar topics into cluster groups. Clustering is an unsupervised learning method that groups similar text data into one category, thus forming a cluster group. Through clustering, texts with similar topics can be organized and grouped, providing a foundation for subsequent topic extraction. Based on the cluster groups, a topic model is applied to extract the topic information of each group. In the topic model, each document can be regarded as a mixture of multiple topics, and each topic can be regarded as a probability distribution composed of a set of keywords. The topic model infers the topic distribution of each document and the keyword distribution of each topic by learning the correlation between documents and topics, as well as the correlation between topics and keywords.
[0183] Specifically, we need to extract topics from the text content within each cluster. We can use topic-based analytical methods (LDA) to identify the topic distribution within each cluster. These models can identify the topic distribution within each cluster, that is, the degree of association between each document and its topic. Specifically, for each document, its degree of association with the topic can be calculated using the following formula:
[0184]
[0185] Here, P(z|d) represents the relevance between document d and topic z, and P(z,t|d) represents the probability that document d belongs to both topic z and term t. By calculating P(z|d), the relevance between each document and each topic can be obtained.
[0186] By applying topic modeling, the topic distribution of each cluster can be extracted, representing the correlation between each document and its topic. These topic distributions can be seen as representations of event topics, indicating the core themes and keywords of the event. By analyzing topic distributions, events with unique topics and relevance can be identified.
[0187] (2) Calculation of event relevance: In the calculation of event relevance, two aspects of relevance need to be considered: semantic relevance and temporal relevance between texts;
[0188] First, semantic relevance calculation aims to measure the semantic similarity or relevance between texts; this can be achieved by calculating word similarity, sentence similarity, or document similarity between texts. Commonly used methods include word vector-based similarity calculation (such as Word2Vec, GloVe), sentence vector-based similarity calculation (such as Siamese networks), or document topic distribution-based similarity calculation.
[0189] Secondly, temporal correlation calculation is used to determine the temporal relationship between texts, that is, the order in which the texts were published; temporal correlation calculation can be implemented based on the timestamps or publication times of the texts. A common method is to calculate the temporal differences between texts, such as calculating the time interval or time distance between two texts. Additionally, time windows or sliding windows can be used to define the temporal correlation between texts.
[0190] By combining semantic relevance and temporal relevance, the final event relevance is obtained.
[0191] This can be achieved by weighted fusion of the scores for the two types of relevance, where the weights can be adjusted according to the specific application scenario. For example, in some application scenarios, semantic relevance may be more important, so it can be given a higher weight; while in other scenarios, temporal relevance may be more critical, so it can be given a higher weight.
[0192] In calculating event relevance, it's necessary to determine the relevance between each event topic and other topics. To measure the similarity between topics, a similarity metric between probability distributions can be used; specifically, the Jensen-Shannon divergence. This metric helps us capture the similarities and differences between topics. Specifically, the relevance between event topics can be calculated using the following formula:
[0193] Sim(z1,z2)=JS(P(z1|D),P(z2|D))
[0194] Where Sim(z1,z2) represents the similarity between topics z1 and z2, and P(z1|D) and P(z2|D) represent the probability distributions of topics z1 and z2 in dataset D, respectively.
[0195] (3) Event Identification: Based on the results of event correlation calculation, highly correlated topics are aggregated to form event clusters; the similarity of event clusters is calculated; the similarity between event clusters is determined, thereby helping us identify events with similar topic features and relevance; an event cluster is a set of topics with similar topic features and relevance, representing different aspects and related content of the same event. By aggregating related topics, events with unique topics and relevance can be identified. To calculate the similarity of event clusters, the following formula can be used:
[0196] Sim(c1,c2)=max(Sim(z1,z2)for z1 in c1,
[0197] z2 in c2)
[0198] Where Sim(c1,c2) represents the similarity between event clusters c1 and c2, and Sim(z1,z2) represents the similarity between topics z1 and z2.
[0199] (4) Event detection: For each event cluster, further analyze its contained cluster groups and related texts to obtain more information about the event; use text mining and time series analysis techniques to extract important features and dynamic changes of the event.
[0200] In time series analysis, it is necessary to establish time series models of event-related data. By detecting outliers in the time series data, atypical patterns or sudden events related to the event can be identified. The development trend of an event can be analyzed by identifying keywords, entities, and sentiment trends. Time series analysis methods can also be used to study the evolution process and scope of impact of an event. By comprehensively analyzing multiple aspects of an event, a more comprehensive understanding of its nature and impact can be achieved.
[0201] 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 this invention is defined by the appended claims and their equivalents.
Claims
1. A social public opinion event detection method based on hyperbolic graph clustering, characterized in that, Including the following steps: S10, Data Collection: Detecting network data and collecting public opinion data; S20, perform data preprocessing on the collected data; S30, extract entity relationships from the preprocessed collected data; S40, Graph Construction: Constructing a graph structure includes nodes and edges. In the entity relation extraction task, entities are represented as nodes, and relations are used as edges connecting these nodes. The graph construction process includes the following steps: S41, Node representation: Entity recognition and named entity recognition tasks can be used to identify entities in text, representing these entities as nodes V in a graph; Edge representation: Based on the relationships between entities, construct edges E connecting these nodes; Construct a graph structure G=(V,E) using the above representation; S42, After constructing the graph structure, introduce the structural information, perform a partitioning operation on the graph structure to obtain a graph G with partition height H, and obtain the node feature representation structure; S43, given a graph G=(V,E) with a weight function w and a partitioning tree of G with height H. ; G about The structural information of each non-root node α is defined as follows: ; In a partitioning tree with root node λ In this tree, each tree node α is associated with a subset of V, denoted as modulo V. α Its direct predecessor is α - ; scalar It is model V α The total weight of the edges in a graph with one endpoint; The H-dimensional structural information of G is: ; Traverse all possible partitions of G of height H, and define the H-dimensional structural entropy of G as: ; ; in It is the optimal tree of G, which encodes self-organization and minimizes the uncertainty of the graph; S44, Learning the optimal partitioning tree in the Lorentz model of hyperbolic space. Furthermore, node features and structural information are combined through a graph convolutional network; in hyperbolic space, the leaf nodes of the tree are first embedded, then the parent nodes are recursively learned, and finally self-supervised clustering is performed. S50, perform node embedding learning on the graph structure. Node embedding learning includes leaf node embedding learning and parent node embedding learning. The embedding learning for these two types of nodes is achieved through Lorentz convolutional layers and a relaxation method, respectively, mapping node features to leaf node embeddings and parent node embeddings in hyperbolic space; The leaf node embedding learning includes the following steps: S511 introduces a Lorentz convolutional layer to learn leaf node embeddings in hyperbolic space. ,in and These are node features and leaf node embeddings, respectively. S512 employs attention aggregation and performs dimensional transformation through the Lorentz linear operator; attention weights are derived from the self-attention mechanism. Weighted aggregation of the arithmetic mean of multivalued vectors; The parent node embedding learning includes the following steps: S521, For any G, given a partition tree And add a node β to obtain relaxation. The structural information remains unchanged if one of the following conditions is met. : (1) β is a leaf node, and its modulus T β It is an empty set; (2) Insert β between node α and its child nodes such that the modulus T β and T α equal; Based on the above description, redundant nodes in the partitioning tree do not affect the value of structural entropy, and are ultimately represented as empty leaf nodes through optimization objectives; S522, hierarchical allocation: for a partitioning tree of height H... Assume the number of tree nodes at level h is N. h The parent allocation matrix C from level h to level (h−1) is defined. h ; For graph G and its partitioning tree G at height H relative to The formula for H-dimensional structural information is: ; in, It is the volume of G; for the k-th node in height h, and These are the graph node sets T k and T k - Volume; Therefore, the H-dimensional structural information of G is: ; S523 designs the Lorentz allocator based on the characteristic that neighboring nodes in the graph tend to have similar assignments. It uses a multilayer perceptron (MLP) to learn the assignment from the embedding and uses LAtt to parameterize the similarity. S524 infers the node embedding z at level h−1. h-1 ; the geometric centroid relative to the squared Lorentz distance, where the weights are softly assigned by C h Give; ; c ij =1 indicates that the i-th node is the parent node of the j-th node at level (h-1), and N is the total number of nodes; S525 derives the closed-form solution for parent node embedding as follows; ; In hyperbolic space, for any set of points , The arithmetic mean of is , and is a closed-form solution that minimizes the geometric centroid defined in ; According to the Lorentz allocator formula, the graph structure A between the h-1 level parent nodes is required. h-1 To derive the assignment; the adjacency matrix of the (h-1)th level graph is: ; Therefore, after obtaining the node embeddings, a partition tree is recursively constructed from bottom to top in the hyperbolic space; S60, Hyperbolic partitioning tree construction: Under the principle of minimizing structural information, construct the optimal partitioning tree of the graph for clustering; S70, Event Detection, is based on cluster analysis. By identifying and detecting events from the clustering results, events with unique themes and relevance are extracted.
2. The social public opinion event detection method based on hyperbolic graph clustering according to claim 1, characterized in that, The data collection phase aims to gather task-related data samples by monitoring and analyzing posts, comments, tags, and topics through social media platforms, online forums, blogs, and news media to obtain a large amount of public opinion data.
3. The social public opinion event detection method based on hyperbolic graph clustering according to claim 1, characterized in that, Data preprocessing of the collected data includes: Text cleaning: removing noise and irrelevant information from data; Word segmentation: dividing text data into a sequence of individual words or phrases to form a vocabulary; Stop word filtering: Removes common words that have no real meaning; Case conversion: Converts text to either lowercase or uppercase. Stem extraction or word form restoration: restoring words to their original stem form; Remove duplicate data: If duplicate public opinion data exists in the dataset, detect and delete them; Data conversion: Converting text data into a numerical representation.
4. The social public opinion event detection method based on hyperbolic graph clustering according to claim 1, characterized in that, The entity relationship extraction includes the following steps: S31, Graph Encoder Processing: Preprocessed public opinion data is input into the graph encoder to construct a text graph G. T ={V T E T },V T E is a node that is syntactically dependent. T Edges are syntactically dependent; using the nodes of the text graph, graph X is obtained through the BERT text encoder. T Enter the attribute transformer; use the attribute transformer to perform attribute attention processing and summation and normalization, and then input it into the enhanced edge graph alignment module. The attribute attention mechanism is used to integrate the edge type into the key and value of the transformer's self-attention mechanism as the attribute transformer, and update the node state across the graph and have integrated relation edges. S32, Enhanced edge graph alignment module processing: Align nodes and edges in the text graph, align nodes and edges across the graph, and transfer the matched semantic information from the object to the entity; S33 is processed through a multi-channel layer: after enhancing the edge graph alignment, it is processed by part-of-speech tagging, syntactic distance and word co-occurrence matrix respectively to obtain three feature matrices. A weighted graph convolutional network module is used to model each matrix to obtain the representation of each channel. Then these representations are combined and sent to the multilayer perceptron layer to obtain the final word representation.
5. The social public opinion event detection method based on hyperbolic graph clustering according to claim 4, characterized in that, The enhanced edge-image alignment module processing includes the following steps: The optimal transport method is used to match nodes and edges across the graph. Two distance metrics are used for cross-graph matching: Wasserstein distance is used for node matching, and Gromov-Wasserstein distance is used for edge matching. Gromov-Wasserstein distance is used to measure the similarity score of edges across the graph by calculating the distance between node pairs. By using an image-to-text attention mechanism, the matched semantic information is transferred from the visual object to the text modality, and an improved text representation is obtained.
6. The social public opinion event detection method based on hyperbolic graph clustering according to claim 1, characterized in that, Based on the principle of minimizing structural information, we construct the optimal partitioning tree of the graph for clustering, including the following steps: S61, the one-dimensional structural entropy decomposition of graph G is: ; in, It is entropy; Graph propagation is a definite goal of graph clustering, obtaining a one-dimensional structural entropy for any G. As a constant, using minimization Complete the minimum graph propagation and group the nodes into clusters; S62, for graph G, the partitioning tree is represented as... The mapping from the learnable embedding Z to the assignment is accomplished through a neural network; the differentiable structural information is given as follows. The assignment is done by having parameters Derived from a neural network; Given G, the differentiable structural information is minimized as follows: ; Learn node embedding Z * and parameters To derive the hierarchical parent node allocation of G; Then, the optimal partitioning tree of G is constructed through allocation. This allows densely connected nodes to... There is a higher probability that they will be assigned to the same parent node, thus minimizing conductivity and exhibiting a cluster structure.
7. The social public opinion event detection method based on hyperbolic graph clustering according to claim 1, characterized in that, In step S70, event detection includes: (1) Event topic extraction: First, the text data needs to be clustered to organize text content with similar topics into cluster groups; based on the cluster groups, the topic model is applied to extract the topic information of each group; (2) Calculation of event relevance: In the calculation of event relevance, two aspects of relevance need to be considered: semantic relevance and temporal relevance between texts; First, semantic relevance calculation aims to measure the semantic similarity or relevance between texts; Secondly, time correlation calculation is used to determine the temporal relationship between texts, that is, the order in which the texts were published. By combining semantic relevance and temporal relevance, the final event relevance is obtained; (3) Event identification: Based on the results of event correlation calculation, topics with high correlation are aggregated to form event clusters; the similarity of event clusters is calculated. Event detection: For each event cluster, further analysis is performed on its constituent clusters and related texts to obtain more information about the event; text mining and time series analysis techniques are used to extract important features and dynamic changes of the event.
Citation Information
Patent Citations
Multi-view hyperbolic-hyperbolic graph representation learning method
CN115906946A
Social text data unsupervised clustering method based on event graph model
CN116304006A
Social media rumor detection method based on hyperbolic embedded graph neural network
CN117437077A
Text topic clustering method, computing device and storage medium
CN117891937A