A Chinese-Vietnamese cross-linguistic event detection method based on graph neural networks
By constructing a Chinese-Vietnamese cross-lingual event detection dataset, and utilizing multilingual pre-trained language models and graph neural network technology, the event detection performance of Chinese-Vietnamese texts was improved, the problem of poor mapping and alignment effects of multilingual pre-trained models was solved, and better clustering performance was achieved.
Patent Information
- Application Number
- CN202410138059.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-01
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2044-02-01
AI Technical Summary
In cross-language event detection between Chinese and Vietnamese, multilingual pre-trained language models do not perform well in mapping and aligning Chinese and Vietnamese texts describing the same event, resulting in poor clustering performance.
By constructing an experimental dataset, text representations are obtained using multilingual pre-trained language models and temporal embedding algorithms. A cross-lingual knowledge graph and heterogeneous graph of Chinese and Vietnamese are constructed. Graph attention networks are used to capture the event knowledge associations between texts. Text representations are optimized through contrastive learning. Finally, the k-means algorithm is used for clustering.
The method significantly improved the alignment and clustering of events in Chinese and Vietnamese texts, increasing the NMI, AMI, and ARI scores by 16.18–33.49, 15.43–33.49, and 19.73–36.49 percentage points respectively compared to the baseline model, demonstrating the effectiveness of the method.
Smart Images

Figure CN118069839B_ABST
Abstract
Description
Technical Field
[0001] This invention discloses a Chinese-Vietnamese cross-language event detection method based on graph neural networks, which relates to the field of natural language processing technology. Background Technology
[0002] In natural language processing tasks, event detection is an important task, aiming to cluster texts describing the same event into the same cluster. Cross-lingual event detection between Chinese and Vietnamese is a subtask of event detection, referring to clustering Chinese and Vietnamese texts describing the same event into the same event cluster.
[0003] In cross-language event detection scenarios between Chinese and Vietnamese, multilingual pre-trained language models often fail to effectively map and align Chinese and Vietnamese texts describing the same events, resulting in poor clustering performance. Therefore, the core objective of this invention is to leverage event knowledge and textual relationships within Chinese and Vietnamese texts to improve event alignment and clustering. Summary of the Invention
[0004] The problem this invention aims to solve is to provide a method for cross-language event detection between Chinese and Vietnamese languages based on graph neural networks, thereby improving clustering results.
[0005] The technical solution of this invention is: a method for detecting cross-language events between Chinese and Vietnamese based on graph neural networks, comprising the following steps:
[0006] Step 1: Experimental Dataset Construction: Construct the Chinese-Vietnamese cross-language event detection dataset required for the experiment;
[0007] Step 2: Represent the Chinese-Vietnamese text using a multilingual pre-trained language model. At the same time, obtain the temporal embedding through a temporal embedding algorithm and concatenate it with the obtained Chinese-Vietnamese text representation to form the initial text representation.
[0008] Step 3: Construct a heterogeneous graph using the co-occurrence relationships between keywords and entities in the Chinese and Vietnamese texts. Use a cross-linguistic knowledge graph to align and connect Chinese and Vietnamese nodes describing the same entity, building corresponding edges. Transform the heterogeneous graph into a homogeneous graph with text as nodes.
[0009] Step 4: Using a graph attention network, text nodes are aggregated by weighting the event knowledge between them to capture the correlation between event knowledge in Han and Yue texts and reconstruct the initial representation of Han and Yue texts.
[0010] Step 5: In a training batch, based on the event type label, determine positive and negative examples for each Han-Vietnamese text sample; train the reconstructed Han-Vietnamese text representation through contrastive learning, and optimize the graph attention network to make Han-Vietnamese texts describing the same event more cohesive;
[0011] Step 6: Use the k-means clustering algorithm to cluster Chinese and Vietnamese texts based on the distance between text representations to achieve event detection.
[0012] As a preferred embodiment of the present invention, Step 1 includes:
[0013] Step 1.1: Use several events from the Wikimedia Commons website as reference events to construct event keywords;
[0014] Step 1.2: Based on the event keywords constructed in Step 1.1, crawl several social media texts from Han and Yue on the Twitter platform, and annotate these texts according to the reference events;
[0015] Step 1.3: Use Jieba and Spacy tools to segment the Chinese and Vietnamese texts and extract personal names, place names, organization names, etc. from the texts to form the final Chinese-Vietnamese cross-language event detection dataset.
[0016] As a preferred embodiment of the present invention, Step 2 includes:
[0017] Step 2.1: A multilingual pre-trained language model can represent Chinese and Vietnamese texts into the same semantic space; define the dataset size as D, and encode text of length m using the multilingual pre-trained language model DistiUSE to obtain the text semantic representation T. w =[W1,...,W m The time representation T is calculated using a time embedding algorithm. t =[T s ,T d Among them, T s Representing text at the millisecond level, T d This represents the day-level representation of the text. The semantic representation of the text, T... w and time characterization T t T is obtained by splicing f This serves as the initial representation of the text. A multilingual pre-trained language model enables the representation of Chinese and Vietnamese texts into the same semantic space.
[0018] Step 2.2, where static time It is a fixed time, and the millisecond-level representation T of the text in Step 2.1 is used. s The calculation method is as follows:
[0019]
[0020] Step 2.3, where t d For the publication time of the text, Step 2.1 represents the text in days. d The calculation method is as follows:
[0021]
[0022] As a preferred embodiment of the present invention, the specific implementation of Step 3 includes:
[0023] Step 3.1: Using entities in the Chinese text as search criteria, retrieve relevant Vietnamese entities from the Chinese-Vietnamese cross-linguistic knowledge graph to obtain a candidate set of Vietnamese entities. The formula is shown below:
[0024] Set vi =search(KG(E) z h))
[0025] Where E zh For Chinese entities, KG is a cross-linguistic knowledge graph between Chinese and Vietnamese. Let be the entity in the candidate set, m be the total number of entities in the set, and i ∈ [1, m]. Match Vietnamese entities in the candidate set with Vietnamese entities extracted from the text; if a match is found, an edge is established between the Vietnamese entity and the retrieved Chinese entity. Use common entities between Chinese and Vietnamese texts in the graph and shared keywords between monolingual texts to establish weighted relationships between Chinese and Vietnamese texts, preserving event knowledge and associations in the heterogeneous graph.
[0026] Step 3.2: Mapping the heterogeneous graph to a homogeneous graph facilitates text node clustering. We utilize common entities between Chinese and Vietnamese texts and shared keywords between monolingual texts in the heterogeneous graph to establish weight relationships between them, preserving event knowledge and associations in the heterogeneous graph. We then calculate the weight A between the i-th and j-th nodes in the homogeneous graph. i,j , o represents different types of information, e represents entities, and k represents keywords. The weight coefficient matrix W of the i-th node in the heterogeneous graph. oi :
[0027]
[0028] As a preferred embodiment of the present invention, the specific steps of Step 4 are as follows:
[0029] Step 4.1: Use a graph attention neural network to update and enhance the text representation of graph nodes, extracting deep semantic information and capturing event knowledge between Chinese and Vietnamese texts, thus providing richer information for graph clustering. To utilize the information between neighboring nodes of a text node, it is necessary to calculate the attention score α between nodes. i,j This is used to aggregate event knowledge between nodes, where 'a' is a feedforward neural network, 'W' are learnable parameters, and 'n' is a parameter that can be used to aggregate event knowledge between nodes. i and n j Representing the i-th and j-th nodes, v iGiven a set of neighboring nodes and LeakyReLU as the activation function, the formula for calculating the attention score is as follows:
[0030]
[0031] Step 4.2: Building upon Step 4.1, the model is made to allocate attention mechanisms more appropriately and to make graph neural network learning more stable. For each node, a multi-head attention mechanism is used, which aggregates related nodes by utilizing their respective attention weights, and the node representations generated by each attention head are concatenated to obtain the final node representation p. i K represents the number of multi-head attention, and || represents the splicing operation.
[0032]
[0033] As a preferred embodiment of the present invention, the specific steps of Step 5 are as follows:
[0034] Step 5.1: Use ternary contrastive loss to make the Chinese and Vietnamese text representations describing different events as similar as possible. When using ternary contrastive learning loss, positive and negative samples need to be selected. The selection of positive and negative samples is as follows: within a training batch, find one positive sample and one negative sample for each training sample based on the event label. The positive sample comes from samples of the same event in the same batch, while the negative sample comes from samples of other event classes.
[0035] Step 5.2: Based on the method in Step 5.1, positive and negative sample pairs were established in the training batch. Where p i This represents the representation of the i-th anchor point sample. This represents the positive sample corresponding to the anchor point sample. For negative samples, i is a sample in the training batch. D represents the cosine distance, M is a hyperparameter that controls the boundary between positive and negative samples, and finally, the ternary contrast loss is calculated.
[0036]
[0037] As a preferred embodiment of the present invention, the specific steps of Step 6 are as follows:
[0038] Based on the above steps, the Chinese and Vietnamese text representations were obtained. Finally, the K-means algorithm was used to cluster the Chinese and Vietnamese texts to obtain different event clusters for event detection.
[0039] Beneficial effects of this invention:
[0040] This invention represents Han-Vietnamese texts into the same semantic space using a multilingual pre-trained language model. It constructs a heterogeneous graph to establish connections between Han-Vietnamese texts by building alignment relationships for Han-Vietnamese event knowledge and co-occurrence relationships between entities using a Han-Vietnamese cross-lingual knowledge graph. This heterogeneous graph is then transformed into a text isomorphic graph. A graph attention network is used to model and capture the connections between event knowledge nodes in Han-Vietnamese texts. Contrastive learning is used to make representations of the same events more similar based on event consistency. Finally, the k-means algorithm is used for text clustering.
[0041] The proposed graph neural network-based method for cross-language event detection between Chinese and Vietnamese is superior to traditional baseline models, verifying the effectiveness of the proposed method for cross-language event detection between Chinese and Vietnamese.
[0042] Of course, any product implementing this invention does not necessarily need to achieve all of the advantages described above at the same time. Attached Figure Description
[0043] Figure 1 This invention provides an overall framework diagram of a Chinese-Vietnamese cross-language event detection method based on graph neural networks, as provided in an embodiment of the invention. Detailed Implementation
[0044] To more clearly illustrate the technical solutions of the embodiments of the present invention, the present invention will be described in detail below with reference to the accompanying drawings.
[0045] First, a Sino-Vietnamese cross-linguistic event detection dataset was constructed by crawling Chinese and Vietnamese texts from social media platforms using Wikipedia and web scraping techniques. A multilingual pre-trained language model was used to embed the Chinese and Vietnamese texts, concatenating the embeddings with temporal embeddings to obtain the final text embeddings. A heterogeneous graph was constructed using the co-occurrence relationships between Chinese and Vietnamese texts and their keywords and entities. A Sino-Vietnamese cross-linguistic knowledge graph was then used to align and connect Chinese and Vietnamese nodes describing the same entity, constructing corresponding edges. Next, the heterogeneous graph was transformed into a homogeneous graph with text as nodes. Then, a graph neural network was used to reconstruct the Chinese and Vietnamese text representations using the relationships between the texts, the Sino-Vietnamese cross-linguistic text representations, and event information. Finally, this invention employs a contrastive learning strategy, adjusting the representations in the text vector space to cluster Chinese and Vietnamese texts describing the same event within specific regions, while simultaneously minimizing the distance between text representations describing different events. Finally, k-means clustering was used to achieve Sino-Vietnamese cross-linguistic event detection.
[0046] The present invention will now be described in conjunction with specific embodiments:
[0047] Example 1
[0048] like Figure 1 As shown
[0049] Step 1: Experimental Dataset Construction: Construct the Chinese-Vietnamese cross-language event detection dataset required for the experiment.
[0050] As a preferred embodiment of the present invention, Step 1 includes:
[0051] Step 1.1: Use major events that occurred on the Wikinews website in April 2023 as the source of annotation to construct event keywords.
[0052] Step 1.2: Using the event keywords constructed in Step 1.1, crawl 2052 social media texts from the Han-Yue region on the Twitter platform, and annotate the Han-Yue texts according to the reference events.
[0053] Step 1.3: Then, use Jieba and Spacy tools to segment the Chinese and Vietnamese texts and extract personal names, place names, organization names, etc. from the texts to form the final Chinese-Vietnamese cross-language event detection dataset.
[0054] As a preferred embodiment of the present invention, the specific steps of Step 2 are as follows:
[0055] Step 2.1 We define the dataset size as D, and encode the text of length m using the multilingual pre-trained language model DistiUSE to obtain the text semantic representation T. w =[W1,...,W m The time representation T is calculated using a time embedding algorithm. t =[T s ,T d Among them, T s Representing text at the millisecond level, T d This represents the day-level representation of the text. The semantic representation of the text, T... w and time characterization T t T is obtained by splicing f This serves as the initial representation of the text. Multilingual pre-trained language models enable the representation of Chinese and Vietnamese texts into the same semantic space.
[0056] Step 2.2 where static time It is a fixed time, and the millisecond-level representation T of the text in Step 2.1 is used. s :
[0057]
[0058] Step 2.3 where t is d The publication time of the text. Step 2.1 Representation of the text in days (T) d for:
[0059]
[0060] As a preferred embodiment of the present invention, Step 3 specifically includes:
[0061] Step 3.1: Using entities in the Chinese text as search criteria, retrieve relevant Vietnamese entities from the Chinese-Vietnamese cross-linguistic knowledge graph to obtain a candidate set of Vietnamese entities. The formula is shown below:
[0062] Set vi =search(KG(E) z h))
[0063] Where E zh For Chinese entities, KG is a cross-linguistic knowledge graph between Chinese and Vietnamese. Here, represents entities in the candidate set, m is the total number of entities in the set, and i∈[1,m]. Vietnamese entities in the candidate set are matched with Vietnamese entities extracted from the text; if a match is found, an edge is established between the Vietnamese entity and the retrieved Chinese entity. Weight relationships between Chinese and Vietnamese texts are established using common entities in the graph and shared keywords between monolingual texts, preserving event knowledge and associations in the heterogeneous graph.
[0064] Step 3.2: Map the heterogeneous graph to a homogeneous graph to facilitate text node clustering. Utilize common entities between Chinese and Vietnamese texts and shared keywords between monolingual texts in the heterogeneous graph to establish weight relationships between them, preserving event knowledge and associations in the heterogeneous graph. Calculate the weight A between the i-th and j-th nodes in the homogeneous graph. i,j , o represents different types of information, e represents entities, and k represents keywords. The weight coefficient matrix W of the i-th node in the heterogeneous graph. oi :
[0065]
[0066] As a preferred embodiment of the present invention, the specific implementation of Step 4 includes:
[0067] Step 4.1: Use a graph attention neural network to update and enhance the text representation of graph nodes, extracting deep semantic information and capturing event knowledge between Chinese and Vietnamese texts, thus providing richer information for graph clustering. To utilize the information between neighboring nodes of a text node, it is necessary to calculate the attention score α between nodes. i,j This is used to aggregate event knowledge between nodes, where 'a' is a feedforward neural network, 'W' are learnable parameters, and 'n' is a parameter that can be used to aggregate event knowledge between nodes. i and n j Representing the i-th and j-th nodes, v i Given a set of neighboring nodes and LeakyReLU as the activation function, the formula for calculating the attention score is as follows:
[0068]
[0069] Step 4.2: Building upon Step 4.1, the model is made to allocate attention mechanisms more appropriately and the graph neural network learning is made more stable. For each node, its own attention weight is used to aggregate related nodes, and the node representations generated by each attention head are concatenated to obtain the final node representation p. i K represents the number of multi-head attention, and || represents the splicing operation.
[0070]
[0071] As a preferred embodiment of the present invention, the specific steps of Step 5 are as follows:
[0072] Step 5.1: Use ternary contrastive loss to make the Chinese and Vietnamese text representations describing different events as similar as possible. When using ternary contrastive learning loss, positive and negative samples need to be selected. The selection of positive and negative samples is as follows: within a training batch, find one positive sample and one negative sample for each training sample based on the event label. The positive sample comes from samples of the same event in the same batch, while the negative sample comes from samples of other event classes.
[0073] Step 5.2: Based on the method in Step 5.1, positive and negative sample pairs were established in the training batch. Where p i This represents the representation of the i-th anchor point sample. This represents the positive sample corresponding to the anchor point sample. For negative samples, i is a sample in the training batch. D represents the cosine distance, M is a hyperparameter that controls the boundary between positive and negative samples, and finally, the ternary contrast loss is calculated.
[0074]
[0075] As a preferred embodiment of the present invention, the specific steps of Step 6 are as follows:
[0076] Based on the above steps, the Chinese and Vietnamese text representations were obtained. Finally, the k-means algorithm was used to cluster the Chinese and Vietnamese texts to obtain different event clusters for event detection.
[0077] To compare with existing methods, this invention uses a self-constructed Sino-Vietnamese cross-lingual event detection dataset. This dataset was crawled from Twitter using web scraping technology and manually labeled. It contains 11 events and 2052 Sino-Vietnamese texts, including 1298 Chinese texts and 754 Vietnamese texts. During training, 1652 texts were used as the training set and 200 texts as the test set. Existing comparison methods selected include MBERT, XLM-R, VecMap, M-SERT, DistiUSE, and KPGNN. MBERT, XLM-R, and M-SBERT are multilingual pre-trained language models, and DistiUSE is a multilingual model distilled from multilingual pre-trained language models; both possess the ability to represent Sino-Vietnamese texts into a shared space. VecMap is a bilingual word embedding generation model, used in this paper to generate Sino-Vietnamese cross-lingual word embeddings to represent Sino-Vietnamese texts into the same shared space. KPGNN is an online English event detection model; this invention uses offline scenarios for comparison and employs a multilingual pre-trained language model for text representation. The evaluation metrics are consistent with the comparison methods, using NMI, AMI, and ARI as metrics to evaluate the clustering effect. The results of the comparison methods and the method of this invention on the dataset of this invention are shown in Table 1 below:
[0078] Table 1 Experimental Results
[0079] Model NMI AMI ARI VecMap 22.94 21.33 9.78 XLM 40.21 39.41 23.02 MBERT 60.08 59.55 44.35 M-SBERT 64.73 64.43 51.20 Distiluse 67.43 65.43 52.30 KPGNN(MBERT) 72.18 70.03 51.39 KPGNN (DistilUSE) 72.56 69.87 62.34 Ours (XLM) 73.70 71.77 59.58 Ours (MBERT) 76.99 75.25 63.09 Ours (M-SBERT) 80.16 78.74 70.91 Ours (DistilUSE) 83.61 80.39 72.03
[0080] As shown in Table 1, compared to the original multilingual pre-trained language model, the NMI score improved by 16.18-33.49 percentage points, the AMI score improved by 15.43-33.49 percentage points, and the ARI score improved by 19.73-36.49 percentage points. The experimental group of this invention showed significant improvements in all baseline models. Compared to the original multilingual pre-trained language model, the method of this invention can capture more aligned event knowledge and relationships between Chinese and Vietnamese texts. The proposed method can better represent event knowledge. Compared to KPGNN (DistilUSE), the NMI score improved by 11.05 percentage points, the AMI score improved by 10.52 percentage points, and the ARI score improved by 9.69 percentage points. This is because this invention constructs a heterogeneous graph of Chinese and Vietnamese texts, establishing relationships between event knowledge in Chinese and Vietnamese texts. Based on the multilingual pre-trained language model, this invention can better map and align texts with the same events in Chinese and Vietnamese, improving the representation effect and enhancing the cross-language event detection performance between Chinese and Vietnamese.
[0081] The first experiment ablated the heterogeneous graph and graph neural network constructed from Han-Vietnamese text and event knowledge, while the second experiment ablated the Han-Vietnamese cross-lingual knowledge graph. The results are shown in Table 2 below, where "noGraph" represents the removal of the heterogeneous graph, graph neural network, and cross-lingual knowledge graph constructed from Han-Vietnamese text and event knowledge, while "noKG" represents the removal of only the Han-Vietnamese cross-lingual knowledge graph.
[0082] Table 2 Ablation Experiment Results
[0083] Model NMI AMI ARI Ours(noGraph) 73.12 64.70 60.14 Ours(noKG) 75.26 68.50 63.60 Ours 83.61 80.39 72.03
[0084] As shown in Table 2, compared to the complete model, the noGraph approach reduced the NMI, AMI, and ARI by 10.49, 15.69, and 11.89 percentage points, respectively. This is likely due to the heterogeneous graph and graph neural network modules in the Sino-Vietnamese cross-linguistic model, which capture event knowledge and relationships between texts. However, compared to the original multilingual pre-trained language model, the model still shows a certain degree of performance improvement. After ablation, the model only includes contrastive learning and the multilingual pre-trained language model, further indicating that contrastive learning can reduce the distance between Sino-Vietnamese texts describing the same event in the representation space to some extent, thereby improving the model's performance. After ablation of the Sino-Vietnamese cross-linguistic knowledge graph, compared to the complete model, the NMI, AMI, and ARI decreased by 8.35, 11.89, and 8.43 percentage points, respectively. However, compared to the ablation experiment using the heterogeneous graph and graph neural network modules for constructing Sino-Vietnamese text and event knowledge, the NMI, AMI, and ARI improved by 2.14, 4.80, and 3.46 percentage points, respectively. The performance is lower than the complete model, but an improvement over the noGraph approach. The heterogeneous graph network that ablates the Han-Yue knowledge graph can establish relationships between texts, but it lacks Han-Yue event alignment knowledge and does not establish relationship between event knowledge between Han-Yue texts. This approach may result in poor model performance and capture less event knowledge between Han-Yue texts.
[0085] The specific embodiments of the present invention will be described in detail with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. Within the scope of knowledge possessed by those skilled in the art, various changes can be made to the embodiments without departing from the spirit of the present invention.
Claims
1. A method for cross-language event detection between Chinese and Vietnamese based on graph neural networks, characterized in that, The specific steps of the method are as follows: Step 1: Experimental Dataset Construction: Construct the Chinese-Vietnamese cross-language event detection dataset required for the experiment; Step 2: Represent the Chinese-Vietnamese text using a multilingual pre-trained language model. At the same time, obtain the temporal embedding through a temporal embedding algorithm and concatenate it with the obtained Chinese-Vietnamese text representation to form the initial text representation. Step 3: Construct a heterogeneous graph using Chinese and Vietnamese texts and the co-occurrence relationships between keywords and entities in the texts. Use the Chinese-Vietnamese cross-linguistic knowledge graph to align and connect Chinese and Vietnamese nodes describing the same entity, construct the corresponding edges, and transform the heterogeneous graph into a homogeneous graph with text as nodes. Step 4: Using a graph attention network, text nodes are aggregated by weighting the event knowledge between them to capture the correlation between event knowledge in Han and Yue texts, and the initial representation of Han and Yue texts is reconstructed. Step 5: In a training batch, based on the event type label, determine positive and negative examples for each Han-Vietnamese text sample; train the reconstructed Han-Vietnamese text representation through contrastive learning, and optimize the graph attention network to make Han-Vietnamese texts describing the same event more cohesive; Step 6: Use the k-means clustering algorithm to cluster Chinese and Vietnamese texts based on the distance between text representations to achieve event detection; The specific implementation of Step 2 includes: Step 2.1: A multilingual pre-trained language model can represent Chinese and Vietnamese texts into the same semantic space. Define the dataset size as D, and encode text of length m using the multilingual pre-trained language model DistiUSE to obtain the text semantic representation. The time representation is calculated using a time embedding algorithm. in Represents text at the millisecond level. Representing the day-level characterization of text; representing the semantic characterization of text and time representation spliced together This serves as the initial representation of the text; Step 2.2, text millisecond level representation The calculation method is: ; wherein is a fixed time; Step 2.3, Text day level representation The calculation is: ; The specific implementation of Step 3 includes: Step 3.1, using the entity in Chinese text as a retrieval condition, retrieving relevant Vietnamese entities in the Chinese-Vietnamese cross-language knowledge graph library to obtain a Vietnamese entity candidate set The formula is as follows: ; in For Chinese characters, A cross-linguistic knowledge graph for Chinese and Vietnamese languages. ,in It is an entity in the candidate set. To centralize the total number of entities, ; Match Vietnamese entities in the entity candidate set with Vietnamese entities extracted from the text, and if they match, establish an edge between the Vietnamese entity and the Chinese retrieved entity; Step 3.2: Map the heterogeneous graph to a homogeneous graph to facilitate text node clustering. Utilize common entities between Chinese and Vietnamese texts and shared keywords between monolingual texts in the heterogeneous graph to establish weight relationships between them, preserving event knowledge and associations in the heterogeneous graph; and calculate the weighted relationships between the Chinese and Vietnamese texts in the homogeneous graph. and Weights between nodes , For different types of information, For entities, Using keywords, the first on the heterogeneous graph The weight coefficient matrix of each node : 。 2. The method for detecting cross-language events between Chinese and Vietnamese based on graph neural networks according to claim 1, characterized in that, The specific implementation of Step 1 includes: Step 1.1: Use several events from the Wikimedia Commons website as reference events to construct event keywords; Step 1.2: Based on the event keywords constructed in Step 1.1, crawl several social media texts from Han and Yue on the Twitter platform, and annotate these texts according to the reference events; Step 1.3: Use Jieba and Spacy tools to segment the Chinese and Vietnamese texts and extract personal names, place names, and organization names from the texts to form the final Chinese-Vietnamese cross-language event detection dataset.
3. The method for detecting cross-language events between Chinese and Vietnamese based on graph neural networks as described in claim 1, characterized in that, The specific implementation of Step 4 includes: Step 4.1: Use a graph attention neural network to update and enhance the text representation of isomorphic graph nodes, extract deep semantic information, and capture event knowledge between Chinese and Vietnamese texts, thereby providing richer information for graph clustering; in order to use the information between the neighboring nodes of the text nodes, it is necessary to calculate the attention score between the nodes. This is used to aggregate event knowledge between nodes, where It is a feedforward neural network. For learnable parameters, and Representing the and the 1 node For the set of neighboring nodes, As the activation function, the formula for calculating the attention score is as follows: ; Step 4.2: Building upon Step 4.1, the model is made to allocate attention mechanisms more appropriately and to make graph neural network learning more stable. For each node, its own attention weights are used to aggregate related nodes, and the node representations generated by each attention head are concatenated to obtain the final node representation. .
4. The method for detecting cross-language events between Chinese and Vietnamese based on graph neural networks according to claim 1, characterized in that, The specific implementation of Step 5 includes: Step 5.1: Use ternary contrastive loss to make the Chinese and Vietnamese text representations describing different events as similar as possible. When using ternary contrastive learning loss, positive and negative samples need to be selected. The selection of positive and negative samples is as follows: within a training batch, find one positive sample and one negative sample for each training sample according to the event label; the positive sample comes from the same event in the same batch, and the negative sample comes from samples of other event classes. Step 5.2: Based on the method in Step 5.1, positive and negative sample pairs were established in the training batch. ,in Indicates the first Anchor point sample characterization, This represents the positive sample corresponding to the anchor point sample. For negative sample representation, It is a sample in the training batch; Represents the cosine distance. The hyperparameter controls the boundary between positive and negative samples, and finally, the ternary contrast loss is calculated: 。
Citation Information
Patent Citations
Method and device for searching Chinese and cross-border ethnic text fused with domain knowledge graph
CN115599888A
Multi-language event viewpoint object recognition method fused with Chinese and Chinese association relationship
CN116562302A
