Event intervention strategy generation method fusing trigger word semantic graph and text features
By constructing an event-triggered lexical graph and a text feature fusion module, and combining large-scale model knowledge distillation and weakly supervised learning, the problem of strategy generation in complex social event scenarios was solved, achieving high-quality event intervention strategy generation and improving the model's understanding ability and the relevance and credibility of the strategies.
Patent Information
- Application Number
- CN202411324176.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2044-09-23
AI Technical Summary
Existing technologies struggle to accurately capture the underlying logical relationships in complex social events, resulting in strategies that lack specificity and foresight, and models with insufficient interpretability, leading to low effectiveness and credibility of event intervention strategies.
By constructing an event-triggered lexical graph, combining graph attention networks and text features, and designing a graph structure and text feature fusion module, high-quality social event intervention strategies are generated using large-scale model knowledge distillation and weakly supervised learning methods.
It significantly improves the ability to understand events, generates more targeted and reasonable strategies, solves the problem of data scarcity, and enhances the generalization ability of the model and the diversity and practicality of the generated strategies.
Smart Images

Figure CN119377377B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to an event intervention strategy generation method fusing trigger word reasoning graph and text features, belonging to the technical field of artificial intelligence and natural language processing. BACKGROUND
[0002] With the continuous progress of artificial intelligence technology, text generation technology, as an important research direction in natural language processing, has been widely applied in various application scenarios. Text generation refers to automatically generating natural language text related to input content through a model, and its core tasks include machine translation, text summarization, dialogue systems, and question answering systems. In recent years, with the rise of deep learning methods, the development of text generation technology has been greatly promoted, making the generated text show significant improvement in grammar structure, context relevance, etc. However, although text generation technology has made progress in multiple fields, the application of this technology in complex scenarios, such as social event intervention strategy generation, still faces many challenges.
[0003] Social event intervention strategy refers to the formulation of a targeted and effective response plan when dealing with unexpected social events by analyzing the elements, evolution process, and potential impact of the event. The formulation of such strategies usually involves the collection and analysis of a large amount of data, including news reports, social media information, and other text data. Traditional intervention strategies rely heavily on expert experience and manual analysis, which not only consumes time and effort, but also is easily influenced by subjective bias. With the increasing complexity and diversity of social events, an automated and intelligent event intervention strategy generation method needs to be proposed.
[0004] In the study of social events, event representation is a key task. Event representation aims to abstractly describe social events by extracting core elements such as time, location, participants, and event type. This representation method not only helps researchers better understand the structural information and dynamic evolution process of events, but also lays an important foundation for learning the relationship between events. Existing social event representation methods mainly focus on two directions: text-based vector encoding and graph construction. Text-based event representation methods use natural language processing techniques to abstract text into dense vector form; while graph construction methods represent the relationship between event elements as a graph network structure to more intuitively show the evolution path of the event. However, these methods often struggle to accurately capture the deep logical relationships behind complex social events.
[0005] Existing research has made some progress in event-related text generation tasks, mainly focusing on script event prediction tasks. Such tasks aim to automatically generate the subsequent results of events based on key elements such as event text descriptions and event evolution chains. Application scenarios include event prediction and story continuation. For this task, researchers have proposed various methods, including deep learning-based generation models such as Transformer and GPT, which have made significant progress. These methods based on generation models can generate text with high language quality and coherence while ensuring event coherence and consistency. Existing research mainly focuses on two directions: text generation methods based on pre-trained models, which mainly utilize the advantages of pre-trained models in text generation tasks; and methods that integrate event graphs, which input event elements in a structured form to generate more contextually related and logically coherent text.
[0006] Although existing methods have achieved some success in event-related text generation tasks, there are still some problems. In addition, to further study text, we need to consider it from some aspects:
[0007] Firstly, existing research focuses on solving event prediction problems, and the generated results need to maintain coherence with the input content. However, the event intervention strategy generation task requires the generated results to address the key issues implied in the input content. Therefore, there are some differences in task settings, which on the one hand leads to a lack of relevant data, and on the other hand leads to low adaptability of existing model structures in event intervention strategy generation tasks. Secondly, existing methods are limited to simple event text encoding in event representation, and fail to fully exploit the causal relationships between events. The causal relationship between events is crucial for developing effective intervention strategies, and neglecting this may result in strategies that lack pertinence and foresight. Finally, existing research lacks in model interpretability. As the complexity of generation models increases, their internal decision-making mechanisms often become difficult to explain, which poses a certain obstacle to the practical application of event intervention strategies. Decision-makers may have difficulty trusting the model's output, which can affect the effectiveness of decision-making.
[0008] In summary, although existing research has made preliminary progress in the application of text generation combined with events, there are still obvious shortcomings in the face of the dynamic complexity of social events, causal relationship mining, and model interpretability. Therefore, a more effective method is needed to combine the structural information of the event graph and the event text features to generate targeted and effective social event intervention strategies. This not only helps to improve the efficiency and accuracy of social event response, but also helps to further develop related fields. SUMMARY
[0009] The purpose of the present application is to solve the technical problems of sparse social event data and insufficient event relationship learning, overcome the shortcomings of the prior art, and creatively propose an event intervention strategy generation method fusing trigger word causal graph and text features. The method represents social events by fusing trigger word causal graph and text features to learn the causal relationship of events, and combines large model knowledge distillation and weakly supervised learning methods to solve the data scarcity problem, thereby generating higher quality social event intervention strategies.
[0010] The innovations of the present application include:
[0011] First, the social event intervention strategy generation task is proposed for the first time, relevant event data is collected to build an event intervention strategy dataset, a model is trained for strategy generation, and the generated strategies are evaluated from multiple dimensions.
[0012] Second, event trigger words are extracted and connected according to the event evolution process to build a global event trigger word causal graph. Graph attention network (GAT) can be used to calculate trigger word relationships, and trigger word attention and text attention can be used to represent social emergencies at multiple granularities.
[0013] Third, the large model is guided to analyze and rewrite the small model's generation results through thought chain prompts, and feedback is fed back to the small model to optimize the knowledge distillation, and the weakly supervised learning method is used to mix labeled data and unlabeled data to train the small model. Finally, a lightweight scale and human thinking result consistent intervention strategy generation model is obtained.
[0014] The present application is realized based on the following technical solutions.
[0015] An event intervention strategy generation method fusing trigger word causal graph and text features, comprising the following steps:
[0016] Step 1: Extract event trigger words and build an event trigger word causal graph.
[0017] Specifically, to extract event trigger words, a trigger word extraction method based on a large model is used, a prompt template is constructed and extraction cases are provided, and a large model is used to extract keywords or gerundial phrases (such as "explosion", "cause injury", "launch rescue", etc.) that can reflect the occurrence, development and turning point of events in event text data, to automatically identify key event elements in event text.
[0018] When the event trigger words are extracted, the trigger word set is clustered and merged to alleviate the data sparsity problem.
[0019] The clustered trigger words are expressed as graph nodes, and the graph edges are connected according to the order relationship of the trigger words in the event, so as to construct a global event trigger word graph, and the event elements and the causal relationship therebetween are expressed through the graph structure. The structured representation form can better show the logical relationship inside the same event and between different events, and help the model understand the evolution path of the event.
[0020] Step 2: Design a graph neural network to encode and represent the event trigger word graph.
[0021] Since the structured graph information is not conducive to subsequent model training, first, the trigger words are semantically represented (Bert pre-training model can be used), as the initial encoding representation of the trigger word nodes. Then, the information of the nodes and edges in the trigger word graph is propagated and aggregated, and the constructed event trigger word graph is high-dimensional encoded, and this process can be realized by using a graph attention neural network model GAT.
[0022] For different social events, the trigger word graph can be analyzed from two aspects of global and local. On the one hand, the global trigger word graph contains the trigger words of all events, and the association relationship of these trigger words reflects the general law of the event, in the training process, the node representation can be updated (GAT can be used), and the network is optimized through the node prediction self-supervised task; on the other hand, the local subgraph related to the current input event is extracted from the event trigger word graph to form an event trigger word subgraph. The subgraph is encoded (GAT can be used), the local structure and relationship of the event are learned, and a high-dimensional vector representation containing the semantic and structural information of the event is generated. This encoding representation will serve as the basis for event representation and strategy generation in the subsequent steps.
[0023] Step 3: Design a graph structure and text feature fusion module to represent the social event.
[0024] In the process of generating the event intervention strategy, only relying on the event text information or only relying on the structural information of the event trigger word graph may not be able to capture the complete information of the event. Therefore, the application further designs a graph structure and text feature fusion module, which fuses the graph structure encoding generated by the graph neural network with the text features to obtain a more complete social event representation.
[0025] Specifically, the text features are extracted by using an encoder network (Bart pre-training model can be used). Then, based on the event trigger word subgraph node representation in step 2, the association relationship of the trigger words in the current event is calculated to obtain a trigger word association matrix, and the trigger word association matrix and the text self-attention weight matrix are added to fuse the graph structure encoding information in the text features. Finally, the calculated social event representation contains the structural information and semantic information of the event, which can provide more comprehensive encoding information for the generation of intervention strategies.
[0026] Step 4: The model generates an event intervention strategy based on the social event representation.
[0027] After the final output of the Bart decoder is passed through a linear layer and a softmax layer, the specific word content of each position of the intervention strategy is obtained.
[0028] Step 5: Input the model-generated result into the large model and rewrite the original strategy through the thinking chain prompt.
[0029] After obtaining the representation of the social event, the model decoder generates a preliminary intervention strategy. This strategy is generated based on the event representation and historical strategies in the training data. To further improve the relevance and effectiveness of the strategy, a large model is used to evaluate and rewrite the preliminary strategy generated by the model.
[0030] Specifically, the preliminary intervention strategy is input into the large model and rewritten in combination with the thinking chain prompt technology. In the first stage, the large model evaluates the semantic coherence and strategy coherence of the preliminary intervention strategy, and rewrites it based on this to strengthen the logicality of the strategy. In the second stage, the large model evaluates whether the strategy solves the key problems of the input event, and rewrites and optimizes the strategy based on this.
[0031] In this way, the large model can generate more complex and perfect intervention strategies, improve the shortcomings of the original strategy, and train the model structure of the present invention through the method of knowledge distillation.
[0032] Step 6: Collaboratively train the neural network using perplexity loss and similarity loss as loss functions to calculate loss values.
[0033] Specifically, step 6 can include the following steps:
[0034] Step 6.1: Construct the perplexity loss of the generated strategy.
[0035] For the intervention strategy data generated by the model, calculate the language perplexity loss (PPL) of the intervention strategy to ensure that the intervention strategy generated by the model has semantic coherence and consistency.
[0036] Step 6.2: Construct the similarity loss of the real label.
[0037] For actual data with real strategy labels, the model generates an intervention strategy based on the input event text, calculates the similarity loss between the intervention strategy and the real strategy labeled in the training data, ensures that the intervention strategy generated by the model is consistent with historical data, and ensures that the model training converges.
[0038] Step 6.3: Construct the similarity loss of the large model rewriting label.
[0039] For actual data without real policy labels, the model generates an intervention policy according to the input event text, and calculates the similarity loss between the intervention policy and the policy after being revised by the large model.
[0040] Step 6.4: Within a set number of training rounds, the comprehensive loss is calculated, and the model parameters are adjusted through backpropagation optimization, excluding the large model, so that the model performance is finally optimized.
[0041] After obtaining the two similarity losses, the similarity losses of different labels and the perplexity loss are added after being assigned weights, fused, and a comprehensive loss value is obtained.
[0042] The final model learns the social event representation by fusing the trigger word graph and the text features, and realizes the automatic generation of high-quality intervention policies.
[0043] Advantages
[0044] Compared with the prior art, the method has the following advantages:
[0045] 1. The present application proposes a new task framework for the generation of social event intervention policies, combining trigger word graphs and text features, and constructing a new data set and generation model. This new task fills the gap in the research of social event intervention policy generation in the prior art, providing a reference and data basis for subsequent related research.
[0046] 2. The method combines event trigger word graphs and text features to design a social event representation method that fuses graph structure and text features. This method can effectively capture the structural and semantic information of events, significantly improving the model's understanding of events and generating more targeted and reasonable intervention policies.
[0047] 3. The method combines large model knowledge distillation and weak supervision training to solve the problem of model difficulty in effective training under sparse event data. Through the guidance of large model knowledge, the generalization ability of the policy generation model is enhanced, while ensuring the diversity and practicality of the generated policies. BRIEF DESCRIPTION OF DRAWINGS
[0048] Figure 1 The flowchart of the method of the present application.
[0049] Figure 2 The implementation framework diagram of the method of the present application.
[0050] Figure 3 The details of the graph structure and text feature fusion module in the method of the present application. DETAILED DESCRIPTION
[0051] The application will be further described in detail below with reference to the accompanying drawings and examples.
[0052] Examples
[0053] In this embodiment, the selected data set website is:
[0054] https: / / github.com / whxf / EEOK and http: / / thuctc.thunlp.org /
[0055] A group of samples are selected from the examples, each sample contains a group of event description texts E = {e1, e2,..., e N} and corresponding intervention strategy texts M = (m1, m2,..., m N ). The intervention strategy generation task receives E as input and outputs the predicted intervention strategy text
[0056] As shown in Figure 1 , an event intervention strategy generation method combining trigger words and text features includes the following steps:
[0057] Step 1: Extract event trigger words from all event texts.
[0058] For each event text e i in the event text set E = {e1, e2,..., e N}, use a trigger word extraction method based on a large model to design a prompt template for event element extraction, and identify event trigger words Trigger i from the event text. i represents the event text, and |e i | represents the number of trigger words contained in the current event text. After all event texts are extracted, all event trigger words form a trigger word set C Trigger , C Trigger = {trigger1, trigger2,..., trigger T}.
[0059] After extracting the trigger word set, clustering is performed according to the semantic of the trigger words to alleviate data sparsity. Specifically, the semantic feature vector Em(trigger i ) of all trigger words trigger i is extracted using a Bert pre-training model, and the cosine similarity between the trigger words is calculated as the semantic similarity Sim i,j , which is calculated as follows:
[0060] Sim i,jCosine Similarity(Em(trigger i )), Em(trigger j )
[0061] wherein Cosine Similarity represents cosine similarity.
[0062] After calculating the semantic similarity, trigger word pairs with a similarity higher than a set threshold are merged into the same trigger word. Then, according to the order relationship of the event trigger words in the event text, a graph edge is constructed, and a global event trigger graph G is constructed, G=(V, E), V represents the clustered trigger word node, and E represents the order relationship between trigger words.
[0063] For example, if trigger word trigger i appears before and only before trigger word trigger j in the event text, and they belong to different cluster categories, then there is a directed edge from v i to v j in the graph G.
[0064]
[0065] Step 2: Use the graph attention network (GAT) to further process the graph structure information.
[0066] First, the initial representation vector of the trigger word is semantically encoded by the Bert pre-training language model to obtain the initial node
[0067]
[0068] Then, the node information is propagated and aggregated by GAT. For the k-th layer graph neural network, the update formula of node v i is:
[0069]
[0070] wherein represents the attention weight of node v j to node v i , and the calculation formula is:
[0071]
[0072] Finally, after multi-layer GAT calculation, the node encoding representation H G of the global trigger graph and the node encoding representation H L of the local subgraph are obtained.
[0073] Step 3: design a graph structure and text feature fusion module to capture the overall information of the event for the generation of the event intervention strategy. The module structure is shown in Figure 3 .
[0074] Specifically, the event text features are first extracted by the encoder network of the Bart pre-training model
[0075]
[0076] wherein Encoder represents the encoder.
[0077] In the general text attention mechanism learning process, the model adjusts the linear representation parameters of the text sequence according to the optimizer, thereby learning the text attention weight matrix. However, the event trigger word relationship can intervene in the attention interaction process between texts to some extent, so that the attention mechanism of the text is trained with certain prior knowledge.
[0078] In the attention layer of the event context, a trigger word relationship-based attention intervention module is added. According to the current sequence of events, the corresponding trigger word node representation H L is extracted from the encoded trigger word graph to form a trigger word representation sequence Trigger=[t1,t2,…,t n ], and the Q′ and K′ of the trigger word are calculated through a linear layer, and then the trigger word relationship matrix Matrix t is calculated:
[0079] Matrix t =Q′K′ T
[0080] wherein T represents the matrix transpose.
[0081] Finally, the weight matrix S of the event text attention is intervened in advance by the trigger word relationship matrix Matrix t :
[0082] Attention(Q,K,V)=softmax(S′)V
[0083] S′=αS+(1-α)S⊙Matrix t
[0084]
[0085] wherein S is the original attention calculation process, and is the element-wise matrix multiplication. Each event text token can obtain the relationship between the trigger words when performing attention interaction. α represents the attention weight. d k represents the representation vector dimension. T represents the matrix transpose.
[0086] Step 4: The model decoder generates an event intervention strategy based on the event representation.
[0087] In step 3, the social event fusion features H are obtained through the encoder network and graph feature fusion module of the Bart pre-trained model. Then, the normalized probability distribution of predicted words is obtained through the Bart decoder network. It is the length of the generated intervention strategy, d voc It is the length of the vocabulary. The numerical values represent the probability of each word appearing at each position. The argmax function is used to calculate the index of the maximum value at each word position, which is the index of the word with the highest probability in the vocabulary (VOC), denoted as I. Then, using the index and the vocabulary, the specific word is obtained, resulting in the final generated event intervention strategy text.
[0088]
[0089]
[0090] in, Indicates length is The set of real numbers, I i This represents the index value of each specific word in the vocabulary list.
[0091] Step 5: To address the issues of scarce social event data and task-specific nature, and to further enrich the event data, continue collecting publicly available social events E′={e′1,e′2,...,e′ N The dataset is an unlabeled dataset without a corresponding policy M′. A small model is co-trained using a mixture of labeled and unlabeled data. A thought chain prompt guides the large model to perform logical self-consistency verification and key event question verification on the results generated by the small model. The verification results are then used as the basis for evaluating and rewriting the policies generated by the small model, feeding back to the small model for optimization. This achieves dynamic knowledge distillation, enabling the small model to generate results that better align with human thinking while maintaining a lightweight design.
[0092] The thought chain prompting includes a two-stage evaluation and rewriting process. The first stage evaluates the semantic coherence and consistency of the strategy, assessing whether the intervention strategy is grammatically correct and logically consistent. The evaluation results are then used as the basis for rewriting the generated strategy. Perform the first rewrite to obtain the rewrite strategy. The second phase involves optimizing the strategy to address the key issues of the event, assessing the event-specificity of the intervention strategy, and using the assessment results as a basis for further refining the intervention strategy. Rewrite the code to obtain the large model optimization strategy.
[0093] Step 6: In the training process, in order to enable the model to learn the correct strategy in the historical data when generating the strategy, while absorbing the optimization knowledge of the large model, the present application designs a collaborative loss and collaborative training framework. The specific steps are as follows:
[0094] Step 6.1: Construct the perplexity loss of the generated strategy.
[0095] The language perplexity estimates the possibility of strategy generation through the model output result, that is, the probability of the intervention strategy appearing under the condition of the given event text, and the lower the language perplexity, the higher the confidence of the intervention strategy. On this basis, the intervention strategy generated by the model Define the strategy score S based on language perplexity p :
[0096]
[0097] Where PPL represents the language perplexity. p θ (·) represents the target probability output of the model decoder. T' represents the number of tokens generated by the model. i m
[0098] Optimize the strategy score S based on language perplexity through NCE loss p . Since the language perplexity will change in a large range, a temperature parameter τ is introduced to balance the NCE loss gradient:
[0099]
[0100] Step 6.2: Construct the similarity loss of the real label.
[0101] For training data with real labels, calculate the cosine similarity loss L between the generated strategy M and the real label strategy real :
[0102]
[0103] Step 6.3: Construct the similarity loss of the large model rewriting label.
[0104] For data without real strategy labels, use the generated strategy and the similarity loss L between the large model optimization strategy llm :
[0105]
[0106] Step 6.4: Within the set number of training rounds, calculate the comprehensive loss and optimize the model parameters (excluding the large model) by backpropagation adjustment, finally make the model performance optimal.
[0107] The calculation method of the comprehensive loss L is as follows:
[0108] L = aL p + bL real + gL llm (a + b + g = 1)
[0109] Wherein, a represents the perplexity loss weight, b represents the real label loss weight, and g represents the large model rewritten label loss weight. p represents the perplexity loss, L real represents the real label loss, and L llm represents the large model rewritten label loss.
[0110] Through the backpropagation algorithm, the gradient of the comprehensive similarity loss is calculated and the model parameters are updated.
[0111] So far, the event intervention strategy generation process integrating event trigger word graph and text features has been completed, so that the intervention strategy can contain event structure relationship and event text knowledge, and the model can be further optimized through the large model knowledge distillation framework to generate high-quality event intervention strategies by itself.
[0112] Figure 2 The implementation framework of the method is shown in the figure. The performance of the intervention strategy generated by the method in the strategy evaluation win rate is shown in the last row of Table 1.
[0113] Table 19 kinds of generation mode-2 kinds of data set effect comparison
[0114]
Claims
1. An event intervention strategy generation method fusing a trigger word semantic graph and text features, characterized in that, Comprise the following steps: Step 1: extract event trigger words, and construct an event trigger word graph; Using a trigger word extraction method based on a large model, a prompt template is constructed and an extraction case is provided, and the large model is used to extract keywords or gerund phrases that can reflect the occurrence, development and turning point of the event from the event text data, and automatically identify the key event elements in the event text; When the event trigger words are extracted, the trigger word set is clustered and merged; The clustered trigger words are represented as graph nodes, and the graph edges are connected according to the order relationship of the trigger words in the event, and a global event trigger word graph is constructed, which represents the event elements and the causal relationship between them through the graph structure; Step 2: design a graph neural network to encode and represent the event trigger word graph; First, the trigger words are semantically represented as the initial encoding representation of the trigger word nodes; Then, the information of the nodes and edges in the trigger word graph is propagated and aggregated, and the constructed event trigger word graph is represented in high dimension; Step 3: design a graph structure and text feature fusion module to represent the social event; First, the text features are extracted using an encoder network; Then, based on the subgraph node representation of the event trigger words, the correlation between the trigger words in the current event is calculated to obtain a trigger word correlation matrix, and the trigger word correlation matrix and the text self-attention weight matrix are added to fuse the graph structure encoding information in the text features; The final social event representation contains both structural and semantic information of the event; Step 4: the model generates an event intervention strategy based on the social event representation; Step 5: input the model-generated result into the large model and rewrite the original strategy through the thinking chain prompt; After obtaining the representation of the social event, the model decoder generates a preliminary intervention strategy; The large model is used to evaluate and rewrite the preliminary strategy generated by the model; The preliminary intervention strategy is input into the large model and rewritten using the thinking chain prompt technology; In the first stage, the large model evaluates the semantic coherence and strategy coherence of the preliminary intervention strategy, and rewrites it based on this to strengthen the logic of the strategy; In the second stage, the large model evaluates whether the strategy solves the key problems of the input event, and rewrites and optimizes the strategy based on this; Step 6: use perplexity loss and similarity loss as loss functions to calculate the loss value; The final model learns the social event representation by fusing trigger word graphs and text features, and realizes the automatic generation of intervention strategies.
2. The method of claim 1, wherein the fusion of the trigger word graph and the text features is performed by a recurrent neural network (RNN) or a long short-term memory (LSTM) network. In step 1, a set of samples are selected from the event text data set, each sample containing a set of event description texts E = {e1, e2,..., e N} and corresponding intervention strategy texts M = (m1, m2,..., m N ); the intervention strategy generation task receives E as input and outputs the predicted intervention strategy text For each event text e N in the event text set E={e1, e2, …, e i n}, use a trigger word extraction method based on a large model to design a prompt template for event element extraction, and identify the event trigger word Trigger i from the event text, i represents the event text, |e i | represents the number of trigger words contained in the current event text; after all event text extraction is completed, all event trigger words constitute the trigger word set C Trigger , C Trigger ={trigger1, trigger2, …, trigger T} After extracting the set of trigger words, clustering is performed based on the semantics of the trigger words to alleviate data sparsity; specifically, a BERT pre-trained model is used to extract all trigger words. i The semantic feature vector Em(trigger) i And calculate the cosine similarity between each trigger word as the semantic similarity Sim. i,j The calculation is as follows: Sim i,j = Cosine Similarity(Em(trigger i )), Em(trigger j )) Wherein, Cosine Similarity represents the cosine similarity; After calculating the semantic similarity, trigger words with a similarity higher than a certain threshold are merged into the same trigger word; Then, the graph edges are constructed according to the order relationship of the event trigger words in the event text, and a global event trigger word graph G is constructed, G=(V,E), V represents the clustered trigger word nodes, and E represents the order relationship between the trigger words; trigger i if the trigger word trigger j occurs in the event text before and only before the trigger word trigger i and they belong to different cluster classes, then there is a directed edge from v j to v in the graph G:
3. The method of claim 1, wherein the fusion of the trigger word ontology and the text feature is performed by a rule-based approach. In step 2, first, the initial representation vector of the trigger word is semantically encoded by a Bert pre-training language model to obtain an initial node Then, the propagation and aggregation of node information are performed by GAT; for the kth layer graph neural network, the update formula of node v i is as follows: wherein, represents the node v j the attention weight of the node v i is calculated by the following formula: Finally, the node encoding representation H of the global trigger-argument graph is obtained after multi-layer GAT computation G and the node encoding representation H of the local sub-graph L .
4. The method of claim 1, wherein the fusion of the trigger word ontology and the text feature is performed by a rule-based approach. In Step 3, event text features are first extracted by the encoder network of the Bart pre-trained model Wherein, Encoder represents the encoder; According to the event of the current sequence, the corresponding trigger word node representation H is extracted from the encoded trigger word graph L , a trigger word representation sequence Trigger = [t1, t2, …, t n ] is formed, and Q' and K' of the trigger word are calculated through a linear layer, and then the trigger word relation matrix Matrix t is calculated. Matrix t = Q'K' T T represents matrix transpose; Finally, the weight matrix S of the event text attention is intervened in advance: t prior intervention on the weight matrix S of the event text attention: Attention(Q,K,V)=softmax(S')V S' = aS + (1 - a)S 0 Matrix t Wherein, is the element-wise matrix multiplication, each event text token can obtain the relationship between the trigger words to which it belongs when performing attention interaction; a represents the attention weight; d k represents the dimension of the representation vector; T represents the matrix transpose.
5. The method of claim 1, wherein the fusion of trigger word graph and text feature for event intervention strategy generation method is characterized by, In step 4, the social event fusion feature H is obtained through the encoder network and the graph feature fusion module of the Bart pre-training model, and then the normalized model prediction word probability distribution is obtained through the Bart decoder network is the length of the generated intervention strategy, d voc is the length of the vocabulary; The value in indicates the possibility of each word appearing at each position; the index of the maximum value at each word position is calculated by using the argmax function, and the index of the word with the maximum probability in the vocabulary VOC is denoted as I; the specific word is obtained by using the index and the vocabulary, and the finally generated event intervention strategy text is obtained wherein, denotes a set of real numbers of length denotes a set of real numbers of length i denotes the index value of each word in the word table.
6. The method of claim 1, wherein the fusion of trigger word graph and text feature for event intervention strategy generation method is characterized by, Step 6 comprises the following steps: Step 6.1: construct the perplexity loss of the generated strategy; For the intervention strategy data generated by the model, the language perplexity loss of the intervention strategy is calculated to ensure the semantic coherence and consistency of the intervention strategy generated by the model; Step 6.2: Constructing similarity loss of real labels; For actual data with real strategy labels, the model generates intervention strategies according to input event texts, and calculates the similarity loss between the intervention strategies and the real strategies labeled in the training data, to ensure the consistency of the intervention strategies generated by the model with the historical data and guarantee the convergence of the model training; Step 6.3: Constructing similarity loss of large model rewriting labels; For actual data without real strategy labels, the model generates intervention strategies according to input event texts, and calculates the similarity loss between the intervention strategies and the strategies after large model rewriting; Step 6.4: In the set number of training rounds, the comprehensive loss is calculated, and the model parameters are adjusted through back propagation optimization, where the large model is not included, and finally the model performance is optimized; After obtaining the two similarity losses, the similarity losses of different labels are added to the perplexity loss with weights to obtain the comprehensive loss value; The final model learns the social event representation by fusing trigger graph and text features, and realizes the automatic generation of intervention strategies.
7. The method of claim 6, wherein the fusion of the trigger word graph and the text features is performed by a recurrent neural network (RNN) or a long short-term memory (LSTM) network. In step 6.1, intervention strategies are generated with respect to the model The strategy score S is defined based on the language perplexity p : where PPL denotes perplexity; p θ (·) denotes the target probability output of the model decoder; T' denotes the number of tokens generated by the model; m i denotes the token-by-token generation by the model; Optimizing the language perplexity based policy score S by NCE loss p ; introducing a temperature parameter τ to balance the NCE loss gradient: In step 6.2, the generated policy is computed against the training data with real labels Cosine similarity loss L between the real label policy M real : In step 6.3, for data without real policy label, use the generated policy Similarity loss L with large model optimization policy llm : In step 6.4, the calculation method of the comprehensive loss L is as follows: L = aL p + bL real + gL llm (a + b + g = 1) Wherein, α represents the perplexity loss weight, β represents the real label loss weight, and γ represents the large model rewriting label loss weight; L p represents the perplexity loss, L real represents the real label loss, L llm represents the large model rewriting label loss.
Citation Information
Patent Citations
Causal event map construction method, system and device and storage medium
CN109726293A
Emergency event affair graph construction method
CN115455202A