An event analysis method based on graph network
By using a graph network-based approach combined with deep learning and heterogeneous graph networks, the problem of low accuracy in detecting emergencies in social media is solved, comprehensive analysis of social media text and image data is achieved, and detection accuracy and efficiency are improved.
Patent Information
- Application Number
- CN202311113902.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-31
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2043-08-31
AI Technical Summary
The accuracy of emergency event detection in social media in existing technologies is low, mainly because the semantic information is not fully analyzed.
A graph network-based method is adopted to train sentiment analysis models and event classification models, combine deep convolutional neural networks and multi-head attention mechanisms, use heterogeneous graph networks for representation learning, calculate meta-path similarity and heterogeneous graph network information aggregation, and optimize parameters to improve detection accuracy.
It achieves comprehensive analysis of social media text and image data, improves the accuracy and efficiency of emergency detection, and can automatically detect and analyze event-related information.
Smart Images

Figure SMS_1 
Figure SMS_2 
Figure SMS_6
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of natural language processing, and specifically relates to an event analysis method based on a graph network. Background Art
[0002] As an emerging communication medium, social media, with its fast information dissemination, rich content, wide reach, and timely nature, has become the primary means of rapidly disseminating information about events among the general public. In recent years, social media has experienced rapid growth, with its vast user base and vast amounts of information becoming synonymous with the platform. Due to its higher degree of liberalization compared to traditional media, information about emergencies can easily spread widely on social media and be maliciously disseminated and tampered with for ulterior motives, posing significant risks to cybersecurity and long-term social stability. Therefore, it is crucial to quickly and accurately detect information related to emergencies from massive amounts of social media information, analyze public sentiment based on detected emergencies, and implement timely measures to maintain cybersecurity.
[0003] The convenience and widespread dissemination of information on social media have made these platforms a powerful indicator of social hot topics and trends. Social media has not only reshaped how people communicate but, to a certain extent, has even influenced real-world events. An emergency is a sudden, over-the-counter event that exhibits specific patterns of transmission. In the internet age, such news can rapidly and widely spread through social media. The widespread spread and development of an emergency can cause serious social harm if emergency measures are not implemented. Mining social media posts, such as fine-grained social event classification, will benefit many practical applications, including information organization, predictive analysis, and disaster risk analysis.
[0004] Compared to information reported in traditional media, information on social media is more diverse and heterogeneous. Social media not only contains the text and images found in traditional media, but also includes various emoticons and short videos that are not found in traditional media. Detecting emergencies on social media requires fully tapping into the diverse information available, integrating text, video, and image information to infer emergencies.
[0005] Due to its ubiquity, inclusiveness, and ease of use, social media has an extremely broad user base and a highly complex user base. This widespread and popular audience leads to a haphazard nature in the messages posted on social media. Information related to emergencies is embedded in the vast amount of social media data, requiring researchers to extract relevant data from this vast data. This, combined with the semantic sparsity and heterogeneous feature space of social media big data, presents significant challenges to emergency detection. Summary of the Invention
[0006] The technical problem to be solved by the present invention is to propose an event analysis method based on a graph network to solve the problem of low event analysis accuracy caused by the lack of comprehensive analysis of semantic information in the text in the existing technology.
[0007] The technical solution adopted by the present invention to solve the above technical problems is:
[0008] An event analysis method based on a graph network includes the following steps:
[0009] A. Training sentiment analysis model and event classification model:
[0010] A1. Obtain text data from social media and preprocess it to obtain text samples. The text data includes the text data itself and the data of the text publisher. The preprocessing includes data cleaning and word segmentation, and named entity recognition.
[0011] A2. Obtain image data from social media, use a deep convolutional neural network to extract image features from the image data, and then use a multi-head attention mechanism decoder to convert the image features into text samples.
[0012] A3. The text samples obtained in steps A1 and A2 are organized into a heterogeneous information network; the meta-path similarity of each node in the heterogeneous information network is calculated using the meta-path analysis method to obtain the meta-path similarity matrix of the entire heterogeneous information network; the heterogeneous information network is represented and learned using the heterogeneous graph network information aggregation method to obtain the heterogeneous graph network corresponding to the heterogeneous information network.
[0013] A4. Use a sentiment analysis model based on a multi-head attention mechanism network to obtain the label and sentiment polarity corresponding to each text sample.
[0014] A5. Using the gradient descent method and the labels and sentiment polarities corresponding to each text sample, supervised optimization of the meta-path weights of the meta-path analysis method, the parameters of the heterogeneous graph network information aggregation method, and the parameters of the multi-head attention mechanism network is performed to obtain a trained sentiment analysis model and an event classification model based on the meta-path similarity matrix and the heterogeneous graph network.
[0015] B. Prediction process:
[0016] B1. Obtain a text sample to be predicted based on the text data to be predicted and the image data to be tested;
[0017] B2. Extract features of the text sample to be predicted using the trained sentiment analysis model to obtain the semantic features and sentiment polarity of the text sample to be predicted;
[0018] B3. Classify and analyze the semantic features and sentiment polarity obtained in step B2 through an event classification model to obtain events contained in the text data to be predicted and the image data to be predicted.
[0019] As a further optimization, in step A3, the meta-path similarity matrix is calculated as follows:
[0020] The heterogeneous information network is layered according to time and the time-driven meta-path similarity T-KIES between each node is calculated:
[0021]
[0022]
[0023] Where M represents the number of nodes in the heterogeneous information network, m = 1, 2, ..., M, t i , t j Represent the nodes at time i and j respectively, represents the path instance between node m and itself at time i, represents the path instance between node m and itself at time j, represents the path instance between node m at time i and itself at time j, T ij Represents the vector distance of different time layers, w t 、ω m Represents the weight matrix corresponding to the calculated vector distance, ω m Denotes the weight matrix corresponding to the calculation of meta-path similarity, D i 、H i They represent the danger level and heat level of node m at time i, respectively. j 、H j They represent the danger level and heat level of node m at time j respectively, and α and β are the preset fixed weight ratios.
[0024] By analyzing the number of meta-paths between two nodes and the number of time slices between the two nodes, the meta-path similarity corresponding to the two nodes is obtained, and finally the meta-path similarity matrix of the entire heterogeneous information network is obtained.
[0025] As a further optimization, in step A3, the heterogeneous graph network information aggregation method is used to perform representation learning on the heterogeneous information network, and the heterogeneous graph network corresponding to the heterogeneous information network is obtained as follows:
[0026] The first step is to use BiLSTM for sampling:
[0027]
[0028] Where f1(v) represents the sample of node v; extracting heterogeneous content C from node v∈V v , which is encoded into a fixed-size embedding vector x through a neural network i .
[0029] Next, aggregate node neighbor information, performing aggregation on nodes of the same type and multiple types respectively.
[0030] For aggregation of nodes of the same type:
[0031]
[0032] Among them, v′ represents the same type of node v, f1(v′) represents the sampling sample of node v′, N t (v) represents the set of nodes of the same type as node v, is the neighbor embedding of node v by other types of nodes t.
[0033] For inter-type aggregation:
[0034]
[0035] in, represents the aggregation matrix of different types of nodes, d represents the output embedding dimension, α v,v , α v,t Represent the weights of nodes of the same type and nodes of different types, O V Represents the set with node t.
[0036] The beneficial effects of the present invention are:
[0037] (1) Based on the solution of the present invention, events and related event information contained in the input text data and pictures are automatically detected, which can assist users in analysis.
[0038] (2) During the training process, the semantic information hidden in the text is fully and deeply mined. Through graph networks and text vectors, the potential event information in the text is analyzed from multiple angles, which is more accurate than traditional methods.
[0039] (3) The heterogeneous graph network used has more advantages than the traditional graph network. The heterogeneous graph network has designed modules specifically for different types of nodes. The differences in information are taken into account from sampling to information aggregation, so it has more advantages. DETAILED DESCRIPTION
[0040] This invention aims to propose a graph network-based event analysis method to address the existing issues of low efficiency and low accuracy due to incomplete semantic information extraction and information loss. The method includes a training process and a prediction process. During the training process, sample data is first obtained and preprocessed to obtain structured text samples. Next, the text samples are organized through a heterogeneous information network and meta-path similarity is calculated for the text samples. Finally, the obtained data is added to a heterogeneous graph network to learn the representation of text nodes. This data is then aggregated and subjected to gradient descent to train the relevant parameters of the heterogeneous graph network and the relevant weights of the meta-paths. During the prediction process, the data to be predicted is first preprocessed and then input into a sentiment analysis model to obtain the semantic features and sentiment polarity corresponding to the text data. Finally, the event analysis model is used to classify the input text data and perform sentiment polarity analysis.
[0041] The event analysis method based on a graph network of this embodiment includes the following steps:
[0042] A. Training sentiment analysis model and event classification model:
[0043] A1. Obtain text data from social media and preprocess it to obtain text samples. The text data includes the text data itself and the data of the text publisher. The preprocessing includes data cleaning and word segmentation, and named entity recognition to convert unstructured text data into structured text data.
[0044] Social media can use social media developer accounts such as Twitter and Weibo to collect data for analysis. Data preprocessing mainly involves the following tasks:
[0045] Remove tweets that are too short and do not contain any tags. Tweets that are too short are generally insufficient to express an event and contribute little to emergency detection. Therefore, this paper removes tweets that are too short from the original dataset.
[0046] Extracting links, URLs, and other information: Tweets may contain links or URLs that serve as citations or evidence. This content can supplement the semantic information of the text and is therefore processed separately.
[0047] Removing special symbols: With the diversification of social media, many users’ tweets contain many meaningless symbols, such as “¥” and “\$”. These symbols are meaningless for event detection, so they are removed along with stop words.
[0048] Named entity recognition. For example, we need to identify people's names, some of which contain meaningful words, such as "green," "scout," and "Nest." We also need to identify place names, some of which are phrases consisting of two or three words, such as "New York," "the Great Wall," and "Gold Coast." We also need to identify the names of major events, as many natural disasters have anthropomorphic names, such as "Damrey Typhoon," "Koinu Typhoon," and "Ewiniar Typhoon." Although the named entity recognition tool provided by Stanford includes some common recognition items, we need to supplement these items. Therefore, we can build a dedicated term library to extract these named entities.
[0049] A2. Obtain image data from social media, use a deep convolutional neural network to extract image features from the image data, and then use a multi-head attention mechanism decoder to convert the image features into text samples.
[0050] A3. The text samples obtained in steps A1 and A2 are organized into a heterogeneous information network; the meta-path similarity of each node in the heterogeneous information network is calculated using the meta-path analysis method to obtain the meta-path similarity matrix of the entire heterogeneous information network; the heterogeneous information network is represented and learned using the heterogeneous graph network information aggregation method to obtain the heterogeneous graph network corresponding to the heterogeneous information network.
[0051] A4. Use a sentiment analysis model based on a multi-head attention mechanism network to obtain the label and sentiment polarity corresponding to each text sample.
[0052] A5. Using the gradient descent method and the labels and sentiment polarities corresponding to each text sample, supervised optimization of the meta-path weights of the meta-path analysis method, the parameters of the heterogeneous graph network information aggregation method, and the parameters of the multi-head attention mechanism network is performed to obtain a trained sentiment analysis model and an event classification model based on the meta-path similarity matrix and the heterogeneous graph network.
[0053] B. Prediction process:
[0054] B1. Obtain a text sample to be predicted based on the text data to be predicted and the image data to be tested;
[0055] B2. Extract features of the text sample to be predicted using the trained sentiment analysis model to obtain the semantic features and sentiment polarity of the text sample to be predicted;
[0056] B3. Classify and analyze the semantic features and sentiment polarity obtained in step B2 through an event classification model to obtain events contained in the text data to be predicted and the image data to be predicted.
[0057] As a further optimization, in step A3, the meta-path similarity matrix is calculated as follows:
[0058] The heterogeneous information network is layered according to time and the time-driven meta-path similarity T-KIES between each node is calculated:
[0059]
[0060]
[0061] Where M represents the number of nodes in the heterogeneous information network, m = 1, 2, ..., M, t i , t j Represent the nodes at time i and j respectively, represents the path instance between node m and itself at time i, represents the path instance between node m and itself at time j, represents the path instance between node m at time i and itself at time j, T ij Represents the vector distance of different time layers, w t 、ω m Represents the weight matrix corresponding to the calculated vector distance, ω m Denotes the weight matrix corresponding to the calculation of meta-path similarity, D i 、H i They represent the danger level and heat level of node m at time i, respectively. j 、H j They represent the danger level and heat level of node m at time j respectively, and α and β are the preset fixed weight ratios.
[0062] By analyzing the number of meta-paths between two nodes and the number of time slices between the two nodes, the meta-path similarity corresponding to the two nodes is obtained, and finally the meta-path similarity matrix of the entire heterogeneous information network is obtained.
[0063] As a further optimization, in step A3, the heterogeneous graph network information aggregation method is used to perform representation learning on the heterogeneous information network, and the heterogeneous graph network corresponding to the heterogeneous information network is obtained as follows:
[0064] The first step is to use BiLSTM for sampling:
[0065]
[0066] Where f1(v) represents the sample of node v; extracting heterogeneous content C from node v∈V v , which is encoded into a fixed-size embedding vector x through a neural network i .
[0067] Next, aggregate node neighbor information, performing aggregation on nodes of the same type and multiple types respectively.
[0068] For aggregation of nodes of the same type:
[0069]
[0070] Among them, v′ represents the same type of node v, f1(v′) represents the sampling sample of node v′, N t (v) represents the set of nodes of the same type as node v, is the neighbor embedding of node v by other types of nodes t.
[0071] For inter-type aggregation:
[0072]
[0073] in, represents the aggregation matrix of different types of nodes, d represents the output embedding dimension, α v,v , α v,t Represent the weights of nodes of the same type and nodes of different types, O V Represents the set with node t.
Claims
1. An event analysis method based on graph network, characterized in that: The following steps are involved: A. Training sentiment analysis model and event classification model: A1. Obtain text data from social media and preprocess it to obtain text samples. The text data includes the text data itself and the data of the text publisher. The preprocessing includes data cleaning and word segmentation, and named entity recognition. A2. Obtain image data from social media, extract image features from the image data using a deep convolutional neural network, and then convert the image features into text samples using a multi-head attention mechanism decoder; A3. Organize the text samples obtained in steps A1 and A2 into a heterogeneous information network; use the meta-path analysis method to calculate the meta-path similarity of each node in the heterogeneous information network to obtain the meta-path similarity matrix of the entire heterogeneous information network; use the heterogeneous graph network information aggregation method to perform representation learning on the heterogeneous information network to obtain the heterogeneous graph network corresponding to the heterogeneous information network; A4. Use a sentiment analysis model based on a multi-head attention network to obtain the label and sentiment polarity corresponding to each text sample; A5. Using the gradient descent method and the labels and sentiment polarities corresponding to each text sample, supervised optimization of the meta-path weights of the meta-path analysis method, the parameters of the heterogeneous graph network information aggregation method, and the parameters of the multi-head attention mechanism network is performed to obtain a trained sentiment analysis model and an event classification model based on the meta-path similarity matrix and the heterogeneous graph network. B. Prediction process: B1. Processing the text data to be predicted and the image data to be tested to obtain a text sample to be predicted; B2. Extract features of the text sample to be predicted using the trained sentiment analysis model to obtain the semantic features and sentiment polarity of the text sample to be predicted; B3. Classify and analyze the semantic features and sentiment polarity obtained in step B2 using an event classification model to obtain events contained in the text data to be predicted and the image data to be predicted; In step A3, the heterogeneous graph network information aggregation method is used to perform representation learning on the heterogeneous information network, and the method of obtaining the heterogeneous graph network corresponding to the heterogeneous information network is as follows: The first step is to use BiLSTM for sampling: Where f1(v) represents the sample of node v; extracting heterogeneous content C from node v∈V v , which is encoded into a fixed-size embedding vector x through a neural network i ; Next, aggregate node neighbor information, performing aggregation for nodes of the same type and for nodes of multiple types; For aggregation of nodes of the same type: Among them, v′ represents the same type of node v, f1(v′) represents the sampling sample of node v′, N t (v) represents the set of nodes of the same type as node v, is the neighbor embedding of node v by other types of nodes t; For inter-type aggregation: in, represents the aggregation matrix of different types of nodes, d represents the output embedding dimension, α v,v , α v,t Represent the weights of nodes of the same type and nodes of different types, O V Represents the set with node t.
2. The event analysis method based on a graph network according to claim 1, characterized in that: In step A3, the meta-path similarity matrix is calculated as follows: The heterogeneous information network is layered according to time and the time-driven meta-path similarity T-KIES between each node is calculated: Where M represents the number of nodes in the heterogeneous information network, m = 1, 2, ..., M, t i , t j Represent the nodes at time i and j respectively, represents the path instance between node m and itself at time i, represents the path instance between node m and itself at time j, represents the path instance between node m at time i and itself at time j, T ij Represents the vector distance of different time layers, w t 、ω m Represents the weight matrix corresponding to the calculated vector distance, ω m Denotes the weight matrix corresponding to the calculation of meta-path similarity, D i 、H i They represent the danger level and heat level of node m at time i, respectively. j 、H j They represent the danger level and heat level of node m at time j, respectively. α and β are the preset fixed weight ratios. By analyzing the number of meta-paths between two nodes and the number of time slices between the two nodes, the meta-path similarity corresponding to the two nodes is obtained, and finally the meta-path similarity matrix of the entire heterogeneous information network is obtained.