Event intervention strategy generation method fusing trigger word affair graph and text features
Through the combination of graphics and text characteristics of trigger words, and combined with the learning of large model knowledge distillation and weak supervision, the problem of minor cause and effect mining and model interpretation of social events in existing technologies has been solved. Essence
Patent Information
- Application Number
- CN202411324176.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-09-23
AI Technical Summary
The existing technology has shortcomings in the dynamic complexity of social events, causal mining and model interpretability, and it is difficult to generate targeted and effective social event intervention strategies.
By fusion of triggers and text characteristics, combined with large model knowledge distillation and weak supervision learning methods, the causal association of learning events is generated to generate higher -quality social events intervention strategies.
It has significantly enhanced the model of the model to understand the event, the generated intervention strategy is more targeted and rational, and solves the problem of data sparseness and lack of model interpretation.
Smart Images

Figure CN119377377A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to an event intervention strategy generation method integrating a trigger word event diagram and text features, and belongs to the technical field of artificial intelligence and natural language processing. Background Art
[0002] With the continuous advancement of artificial intelligence technology, text generation technology, as an important research direction in natural language processing, has been widely used in various application scenarios. Text generation refers to the automatic generation of natural language text related to the input content through a model. Its core tasks include machine translation, text summarization, dialogue system, question-answering system, etc. In recent years, with the rise of deep learning methods, the development of text generation technology has been greatly promoted, so that the generated text has shown significant improvements in grammatical structure, contextual relevance, etc. However, despite the progress made in text generation technology in many fields, the application of this technology in complex scenarios, such as the generation of social event intervention strategies, still faces many challenges.
[0003] Social event intervention strategies refer to targeted and effective response plans developed by analyzing the factors, evolution and potential impact of sudden social events. The development of such strategies usually involves the collection and analysis of a large amount of data, including text data such as news reports and social media information. Traditional intervention strategies rely on expert experience and manual analysis, which is not only time-consuming and labor-intensive, but also susceptible to subjective bias. With the increasing complexity and diversity of social events, it is necessary to propose an automated and intelligent method for generating event intervention strategies.
[0004] In the study of social events, event representation is a key task. Event representation aims to abstractly describe social events by extracting the core elements of the event, such as time, place, participants, event type, etc. This representation method can not only help researchers better understand the structural information and dynamic evolution process of events, but also lay an important foundation for learning the correlation between events. Existing social event representation methods mainly focus on two directions: text-based vector encoding and graph construction. The text-based event representation method abstracts the text form into a dense vector form through natural language processing technology; while the graph construction method represents the relationship between event elements as a graph network structure, showing the evolution path of the event in a more intuitive way. However, when faced with complex social events, these methods often find it difficult to accurately capture the deep logical relationship behind the event.
[0005] Existing research has made some progress in event-related text generation tasks, mainly focusing on script event prediction tasks. This type of task aims to automatically generate subsequent event results based on key elements such as the text description of the event and the event evolution chain. Application scenarios include event prediction and story continuation. For this task, researchers have proposed a variety of methods, among which deep learning-based generative models, such as Transformer and GPT, have made significant progress. Methods based on these generative models can generate text with high language quality and coherence, while ensuring event coherence and consistency. Existing research mainly focuses on two directions. One is the text generation method based on pre-trained models, which mainly utilizes the advantages of pre-trained models in text generation tasks; the other is the method of integrating event graphs, which generates more contextual and logical text by inputting event elements into the model in a structured form.
[0006] Although existing methods have achieved some success in event-related text generation tasks, there are still some problems. In addition, in order to discuss text in more depth, we need to further consider some aspects:
[0007] First, existing research focuses on solving event prediction problems. The generated results of this task need to be consistent with the input content, while the event intervention strategy generation task requires that the generated results can solve the key problems implied in the input content in a targeted manner. Therefore, there are certain differences in the task settings between the two. On the one hand, the relevant data is relatively scarce, and on the other hand, the existing model structure has low adaptability in the event intervention strategy generation task. Secondly, the existing methods are mostly limited to simple event text encoding in event representation, and fail to fully explore the causal relationship between events. The causal relationship of events is the key to formulating effective intervention strategies. Ignoring this may lead to the lack of targeting and predictability of the generated strategies. Finally, existing research also has deficiencies in model interpretability. As the complexity of the generative model increases, its internal decision-making mechanism often becomes difficult to explain, which creates certain obstacles for the practical application of event intervention strategies. When decision makers adopt these generative strategies, it is difficult to trust the output of the model, which in turn affects the effectiveness of the decision.
[0008] In summary, although existing research has achieved initial results in the application of combining text generation with events, there are still obvious deficiencies 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 with the characteristics of event text to generate targeted and effective social event intervention strategies. This will not only help improve the efficiency and accuracy of social event response, but also help promote further development in related fields. Summary of the invention
[0009] The purpose of the present invention is to solve technical problems such as sparse social event data and insufficient event relationship learning, overcome the shortcomings of the existing technology, and creatively propose an event intervention strategy generation method that integrates trigger word causal graphs and text features. This method characterizes social events by integrating trigger word causal graphs and text features to learn the causal relationship of events, and combines large model knowledge distillation with weak supervision learning methods to solve the problem of data scarcity, thereby generating higher quality social event intervention strategies.
[0010] The innovative features of the present invention include:
[0011] First, a new task of generating social event intervention strategies was proposed for the first time. Relevant event data were collected to construct an event intervention strategy dataset. The model was trained to generate strategies, and the strategies generated by the model were evaluated from multiple dimensions.
[0012] Second, extract event trigger words and establish node connections according to the event evolution process to construct a global event trigger word graph. The graph attention network (GAT) can be used to calculate the trigger word relationship and integrate the trigger word attention and text attention to perform multi-granularity representation of social emergencies.
[0013] Third, the big model is guided by the thought chain prompts to judge and rewrite the results generated by the small model, and the feedback is fed back to the small model for tuning to achieve knowledge distillation, and the small model is trained collaboratively by mixing labeled data and unlabeled data based on the weakly supervised learning method. Finally, a lightweight intervention strategy generation model that conforms to human thinking results is obtained.
[0014] The present invention is achieved based on the following technical solutions.
[0015] A method for generating an event intervention strategy by integrating a trigger word event diagram and text features comprises the following steps:
[0016] Step 1: Extract event trigger words and construct an event trigger word logic diagram.
[0017] Specifically, in order to extract event trigger words, a trigger word extraction method based on a large model is adopted, a prompt template is constructed and extraction cases are provided, and keywords or gerund phrases (such as "explosion", "causing injuries", "launching rescue", etc.) that can reflect the occurrence, development, and turning point of the event are extracted from the event text data through the large model, and key event elements in the event text are automatically identified.
[0018] After 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 represented as graph nodes, and the graph edges are connected according to the order of the trigger words in the event to construct a global event trigger word logic graph, which represents the event elements and the causal relationship between them through the graph structure. This structured representation can better show the logical relationship within 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 the event trigger word graph.
[0021] Since structured graph information is not conducive to subsequent model training, we first semantically represent the trigger words (which can be achieved using the Bert pre-training model) as the initial encoding representation of the trigger word nodes. Then, we propagate and aggregate the information of the nodes and edges in the trigger word graph, and perform high-dimensional encoding representation on the constructed event trigger word logic graph. This process can be achieved using the graph attention neural network model GAT.
[0022] For different social events, the trigger word graph can be analyzed from both global and local perspectives. On the one hand, the global trigger word graph contains the trigger words of all events. The association relationship between these trigger words reflects the general law of things. During the training process, the node representation can be updated (GAT can be used), and the network can be tuned through the node prediction self-supervision task; on the other hand, the local subgraph related to the current input event is extracted from the event trigger word graph to form the event trigger word subgraph. Encode the subgraph (GAT can be used to achieve this), learn the local structure and relationship of the event, and generate a high-dimensional vector representation containing the semantic and structural information of the event. This encoding representation will serve as the basis for event representation and strategy generation in subsequent steps.
[0023] Step 3: Design a module that integrates graph structure and text features to represent social events.
[0024] In the process of event intervention strategy generation, relying only on event text information or relying only on the structural information of the event trigger word graph may not be able to capture the complete information of the event at the same time. Therefore, the present invention further designs a fusion module of graph structure and text features, which fuses the graph structure encoding generated by the graph neural network with the text features to obtain a more complete representation of social events.
[0025] Specifically, the encoder network (which can be pre-trained by Bart) is used to extract text features. 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 the trigger word association matrix. The trigger word association matrix is added to the text self-attention weight matrix to integrate the graph structure encoding information in the text features. The social event representation finally calculated 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 event intervention strategies based on social event representation.
[0027] After the final output of the Bart decoder passes through the linear layer and the softmax layer, the specific word content at each position of the intervention strategy is obtained.
[0028] Step 5: Input the model generation results into the big model and rewrite the original strategy through the thinking chain prompts.
[0029] After obtaining the representation of social events, 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 pertinence and effectiveness of the strategy, the preliminary strategy generated by the model is evaluated and rewritten using a large model.
[0030] Specifically, the preliminary intervention strategy is input into the big model and rewritten in combination with the thought chain prompting technology. In the first stage, the big model evaluates the semantic coherence and strategic coherence of the preliminary intervention strategy, and rewrites it based on this to strengthen the logic of the strategy itself. In the second stage, the big 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 complete intervention strategies, improve the shortcomings of the original strategies, and train the model structure of the present invention through the method of knowledge distillation.
[0032] Step 6: Co-train the neural network and calculate the loss value using perplexity loss and similarity loss as loss functions.
[0033] Specifically, step 6 may include the following steps:
[0034] Step 6.1: Construct the perplexity loss of the generation strategy.
[0035] For the intervention strategy data generated by the model, the language perplexity loss (PPL) of the intervention strategy is calculated 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 true label.
[0037] For actual data with true policy labels, the model generates an intervention strategy based on the input event text and calculates the similarity loss between the intervention strategy and the true policy annotated in the training data to ensure that the intervention strategy generated by the model is consistent with the historical data and that the model training converges.
[0038] Step 6.3: Construct a large model to rewrite the label similarity loss.
[0039] For actual data without true policy labels, the model generates an intervention strategy based on the input event text and calculates the similarity loss between the intervention strategy and the strategy rewritten by the large model.
[0040] Step 6.4: Within the set number of training rounds, calculate the comprehensive loss and adjust the model parameters through back-propagation optimization, excluding large models, to achieve the best model performance.
[0041] After obtaining the two similarity losses, the similarity losses of different labels and the perplexity loss assignment weights are added and fused to obtain the comprehensive loss value.
[0042] The final model learns social event representations by fusing trigger word graphs and text features, achieving automatic generation of high-quality intervention strategies.
[0043] Beneficial Effects
[0044] Compared with the prior art, the method of the present invention has the following advantages:
[0045] 1. Aiming at the actual demand of generating social event intervention strategies, this paper proposes a new task framework, combines the trigger word logic diagram with text features, and constructs a new data set and generation model. This new task fills the gap in the research of generating social event intervention strategies in the prior art, and provides a reference and data basis for subsequent related research.
[0046] 2. This method combines the event trigger word logic graph with text features to design a social event representation method that integrates graph structure and text features. This method can effectively capture the structural and semantic information of events, significantly improve the model's ability to understand events, and thus generate more targeted and reasonable intervention strategies.
[0047] 3. This method combines large model knowledge distillation with weakly supervised training to solve the problem of difficult model training when event data is sparse. Through the knowledge guidance of the large model, the generalization ability of the strategy generation model is enhanced, while ensuring the diversity and practicality of the generated strategy. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 Flow chart of the method of the present invention.
[0049] Figure 2 This is a framework diagram for implementing the method of the present invention.
[0050] Figure 3 This is a detailed diagram of the graph structure and text feature fusion module in the method of the present invention. DETAILED DESCRIPTION
[0051] The present invention is further described in detail below with reference to the accompanying drawings and embodiments.
[0052] Example
[0053] In this embodiment, the selected dataset URL is:
[0054] https: / / github.com / whxf / EEOK and http: / / thuctc.thunlp.org /
[0055] A set of samples is selected from the embodiment, each sample includes a set of event description texts E = {e1, e2, ..., e N} and the corresponding intervention strategy text M=(m1,m2,...,m N ). The intervention strategy generation task receives E as input and outputs the predicted intervention strategy text
[0056] like Figure 1 As shown, a method for generating an event intervention strategy by integrating a trigger word event diagram and text features includes the following steps:
[0057] Step 1: Extract event trigger words from all event texts.
[0058] For the event text set E = {e1, e2, ..., e N Each event text in} i , using the trigger word extraction method based on the large model, designing the prompt template for event element extraction, and identifying the event trigger word Trigger from the event text i , i represents the event text, |e i | indicates the number of trigger words contained in the current event text. When all event texts are extracted, all event trigger words constitute the trigger word set C. Trigger , C Trigger ={trigger1,trigger2,…,trigger T}.
[0059] After extracting the trigger word set, clustering is performed based on the trigger word semantics to alleviate data sparsity. Specifically, the 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 the trigger words one by one as the semantic similarity Sim i,j , calculated as follows:
[0060] Sim i,j=Cosine Similarity(Em(trigger i )),Em(trigger j ))
[0061] Among them, Cosine Similarity represents cosine similarity.
[0062] After calculating the semantic similarity, the trigger word pairs with similarity higher than the set threshold are merged into the same trigger word. Then, the graph edges are constructed based on the order relationship of the event trigger words in the event text, and the global event trigger word logic 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 the trigger word trigger i Before and only before the trigger word trigger in the event text j appear, and they belong to different clustering categories, then there exists v in graph G i to v j The directed edges of :
[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 through the Bert pre-trained language model to obtain the initial node
[0067]
[0068] Then, GAT is used to propagate and aggregate node information. For the k-th layer of the graph neural network, node v i The update formula is:
[0069]
[0070] in, Represents node v j For node v i The attention weight is calculated as:
[0071]
[0072] Finally, after multi-layer GAT calculation, the node encoding representation H of the global trigger word event graph is obtained. G and the node encoding representation H of the local subgraph L .
[0073] Step 3: Design a graph structure and text feature fusion module to capture the overall information of the event for the generation of event intervention strategies. The module structure is as follows Figure 3 shown.
[0074] Specifically, we first extract event text features through the encoder network of the Bart pre-trained model.
[0075]
[0076] Among them, Encoder represents an encoder.
[0077] In the general text attention mechanism learning process, the model adaptively adjusts the linear representation parameters of the text sequence according to the optimizer to learn the text attention weight matrix. However, the event trigger word relationship can intervene in the attention interaction process between texts to a certain extent, so that the text attention mechanism can be trained after obtaining certain prior knowledge.
[0078] In the event context attention layer, an attention intervention module based on the trigger word relationship is added. According to the current sequence of events, the corresponding trigger word node representation H is extracted from the encoded trigger word graph. L , forming a trigger word representation sequence Trigger = [t1, t2, ..., t n ], and obtain the trigger word Q′ and K′ through the linear layer calculation, and then calculate the trigger word relationship matrix Matrix t :
[0079] Matrix t =Q′K′ T
[0080] Where T represents the matrix transpose.
[0081] Finally, through the trigger word relationship matrix Matrix t , perform a priori intervention on the weight matrix S of event text attention:
[0082] Attention(Q,K,V)=softmax(S′)V
[0083] S′=αS+(1-α)S⊙Matrix t
[0084]
[0085] Among them, S is the original attention calculation process, ⊙ is the element-by-element matrix multiplication, and each event text token can obtain the relationship between its trigger words when performing attention interaction. α represents the attention weight. k Represents the dimension of the representation vector. 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 feature H is obtained through the encoder network and graph feature fusion module of the Bart pre-trained model. 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 represents 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, that is, the index of the word with the highest probability in the vocabulary VOC, recorded as I, and then the index and vocabulary are used to obtain the specific word to obtain the final event intervention strategy text.
[0088]
[0089]
[0090] in, Indicates the length is The set of real numbers, I i Indicates the index value of each specific word in the vocabulary.
[0091] Step 5: To solve the problems of scarcity of social event data and specific task domains, further enrich the event data and continue to collect public social events E′={e′1,e′2,...,e′ N}, as an unlabeled dataset without the corresponding strategy M′. The small model is trained collaboratively by mixing labeled data with unlabeled data. The big model is guided by the thinking chain prompt to verify the logical self-consistency and event key issues of the results generated by the small model, and the verification results are used as the basis to evaluate and rewrite the strategies generated by the small model in turn, and the feedback is fed back to the small model for tuning to achieve dynamic knowledge distillation, so that the small model can generate results that are more in line with human thinking while maintaining a lightweight scale.
[0092] The thinking chain prompt includes two stages of evaluation and rewriting. The first stage evaluates the semantic coherence and consistency of the strategy, evaluates whether the intervention strategy is fluent and logically consistent, and uses the evaluation results as a basis for the generation of strategies. Perform the first rewrite and get the rewrite strategy In the second stage, the strategy is optimized to solve the key problems of the incident, and the intervention strategy is evaluated to see whether it is targeted at the incident. The evaluation results are used as a basis for further evaluation of the intervention strategy. Rewrite to get the large model optimization strategy
[0093] Step 6: During the training process, in order to enable the model to learn the correct strategy in historical data when generating strategies and absorb the optimization knowledge of the large model, the present invention designs a collaborative loss and collaborative training framework. The specific steps are as follows:
[0094] Step 6.1: Construct the perplexity loss of the generation strategy.
[0095] The language perplexity estimates the possibility of strategy generation through the model output results, that is, the probability of the intervention strategy appearing given the event text. The lower the language perplexity, the higher the confidence of the intervention strategy. Based on this, the intervention strategy generated by the model Define the strategy score S based on language perplexity p :
[0096]
[0097] Among them, PPL represents the language perplexity. θ (·) represents the target probability output of the model decoder. T′ represents the number of tokens generated by the model. m i Represents the tokens generated by the model.
[0098] The strategy score S based on language perplexity is optimized by NCE loss p Since the language perplexity varies over 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 true label.
[0101] Calculate the generation strategy for training data with true labels The cosine similarity loss L between the policy M and the true label real :
[0102]
[0103] Step 6.3: Construct a large model to rewrite the label similarity loss.
[0104] For data without true policy labels, use the generated policy Optimization strategies for large models The similarity loss L llm :
[0105]
[0106] Step 6.4: Within the set number of training rounds, calculate the comprehensive loss and adjust the model parameters (excluding large models) through back-propagation optimization to ultimately achieve the optimal model performance.
[0107] The calculation method of comprehensive loss L is as follows:
[0108] L=αL p +βL real +γL llm (α+β+γ=1)
[0109] Among them, α represents the perplexity loss weight, β represents the true label loss weight, and γ represents the large model rewrite label loss weight. p represents the perplexity loss, L real represents the true label loss, L llm Represents the label rewriting loss of the large model.
[0110] Through the back-propagation algorithm, the gradient of the comprehensive similarity loss is calculated and the model parameters are updated.
[0111] At this point, the event intervention strategy generation process that integrates event trigger word graphs and text features has been completed, so that the intervention strategy can include event structure relationships and event text knowledge. At the same time, the model is further optimized through the large model knowledge distillation framework to achieve self-generation of high-quality event intervention strategies.
[0112] Figure 2 The implementation framework of this method is shown in the last row of Table 1.
[0113] Table 19 Comparison of the effects of 2 data sets for 9 generation methods
[0114]
Claims
1. A method for generating event intervention strategies by integrating trigger word event graph and text features, characterized in that: The following steps are involved: Step 1: Extract event trigger words and construct event trigger word event diagram; A trigger word extraction method based on a large model is used to build a prompt template and provide extraction cases. The large model is used to extract keywords or gerund phrases in event text data that can reflect the occurrence, development, and turning point of the event, and automatically identify key event elements in the event text; After 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 of the trigger words in the event to construct a global event trigger word event graph, which represents the event elements and the causal relationship between them through the graph structure; Step 2: Design a graph neural network to encode the event trigger word graph; First, the trigger word is semantically represented as the initial encoding representation of the trigger word node; Then, the information of nodes and edges in the trigger word graph is propagated and aggregated, and the constructed event trigger word graph is represented by high-dimensional encoding; Step 3: Design a module to fuse graph structure and text features to represent social events; First, the encoder network is used to extract text features; Then, based on the event trigger word subgraph node representation, the association relationship of the trigger words in the current event is calculated to obtain the trigger word association matrix. The trigger word association matrix is added to the text self-attention weight matrix to integrate the graph structure encoding information into the text features. The social event representation finally calculated contains the structural and semantic information of the event; Step 4: The model generates event intervention strategies based on social event representation; Step 5: Input the model generation results into the big model and rewrite the original strategy through the thinking chain prompts; After obtaining the representation of the social event, the model decoder generates a preliminary intervention strategy; Use the big model to evaluate and rewrite the initial strategies generated by the model; Input the preliminary intervention strategy into the big model and rewrite it in conjunction with the thought chain prompting technique; In the first stage, the big model evaluates the semantic coherence and strategic coherence of the initial intervention strategy, and rewrites it based on this to strengthen the strategy's own logic; in the second stage, the big model evaluates whether the strategy solves the key problems of the input event, and rewrites and optimizes the strategy based on this; Step 6: Co-train the neural network and use the perplexity loss and similarity loss as the loss function to calculate the loss value; The final model learns social event representations by fusing trigger word graphs and text features to achieve automatic generation of intervention strategies.
2. The event intervention strategy generation method integrating trigger word event diagram and text features as described in claim 1 is characterized in that: In step 1, a set of samples is selected from the event text data set, each sample contains a set of event description text E = {e1, e2, ..., e N } and the corresponding intervention strategy text M = (m1, m2, ..., m N ); The intervention strategy generation task receives E as input and outputs the predicted intervention strategy text For the event text set E = {e1, e2, ..., e N Each event text in} i ,Using the trigger word extraction method based on the large model, designing the prompt template for event element extraction, identifying the event trigger word Triggeri from the event text, i represents the event text, |e i | indicates the number of trigger words contained in the current event text; when all event texts are extracted, all event trigger words constitute the trigger word set C Trigger , C Trigger ={trigger1,trigger2,...,trigger T }; After extracting the trigger word set, clustering is performed based on the trigger word semantics to alleviate data sparsity; specifically, the 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 the trigger words one by one as the semantic similarity Sim i,j , calculated as follows: Sim i,j =Cosine Similarity(Em(trigger i )),Em(trigger j )) Among them, Cosine Similarity represents cosine similarity; After calculating the semantic similarity, the trigger word pairs with similarity higher than the set 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 the global event trigger word logic graph G is constructed, G = (V, E), V represents the trigger word node after clustering, and E represents the order relationship between trigger words; If the trigger word trigger i Before and only before the trigger word trigger in the event text j appear, and they belong to different clustering categories, then there exists v in graph G i to v j The directed edges of :
3. The event intervention strategy generation method integrating trigger word event diagram and text features as described in claim 1 is characterized in that: In step 2, first, the initial representation vector of the trigger word is semantically encoded through the Bert pre-trained language model to obtain the initial node Then, GAT is used to propagate and aggregate node information; for the k-th layer of the graph neural network, node v i The update formula is: in, Represents node v j For node v i The attention weight is calculated as: Finally, after multi-layer GAT calculation, the node encoding representation H of the global trigger word event graph is obtained. G and the node encoding representation H of the local subgraph L .
4. The event intervention strategy generation method integrating trigger word event diagram and text features as claimed in claim 1 is characterized in that: In step 3, the event text features are first extracted through the encoder network of the Bart pre-trained model Among them, Encoder represents an encoder; According to the current sequence of events, extract the corresponding trigger word node representation H from the encoded trigger word graph L , forming a trigger word representation sequence Trigger = [t1, t2, ..., t n ], and calculate the trigger word Q′ and K′ through the linear layer, and then calculate the trigger word relationship matrix Matrix t : Matrix t =Q′K′ T T represents matrix transpose; Finally, through the trigger word relationship matrix Matrix t , perform a priori intervention on the weight matrix S of event text attention: Attention(Q,K,V)=softmax(S′)V S′=αS+(1-α)S⊙Matrix t Among them, S is the original attention calculation process, ⊙ is the element-by-element matrix multiplication. When each event text token performs attention interaction, it can obtain the relationship between the trigger words it belongs to; α represents the attention weight; d k represents the dimension of the representation vector; T represents the matrix transpose.
5. The event intervention strategy generation method integrating trigger word event diagram and text features as claimed in claim 1 is characterized in that: In step 4, the encoder network and graph feature fusion module of the Bart pre-trained model are used to obtain the social event fusion feature slice, 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 represents 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, and the index of the word with the highest probability in the vocabulary VOC is recorded as I. Then the index and vocabulary are used to obtain the specific word to obtain the final event intervention strategy text. in, Indicates the length is The set of real numbers, I i Indicates the index value of each specific word in the vocabulary.
6. The event intervention strategy generation method integrating trigger word event diagram and text features as claimed in claim 1 is characterized in that: Step 6 includes the following steps: Step 6.1: Construct the perplexity loss of the generation strategy; For the intervention strategy data generated by the model, calculate the language perplexity loss of the intervention strategy to ensure that the intervention strategy generated by the model has semantic coherence and consistency; Step 6.2: Construct the similarity loss of the true label; For actual data with real policy labels, the model generates an intervention policy based on the input event text and calculates the similarity loss between the intervention policy and the real policy annotated in the training data to ensure that the intervention policy generated by the model is consistent with the historical data and that the model training converges; Step 6.3: Construct a large model to rewrite the label similarity loss; For real data without real policy labels, the model generates an intervention policy based on the input event text and calculates the similarity loss between the intervention policy and the policy rewritten by the large model; Step 6.4: Calculate the comprehensive loss within the set number of training rounds, and adjust the model parameters through back-propagation optimization, excluding large models, to achieve the best model performance; After obtaining the two similarity losses, add the similarity losses of different labels and the weights of the perplexity losses, and fuse them to get the comprehensive loss value. The final model learns social event representations by fusing trigger word graphs and text features to achieve automatic generation of intervention strategies.
7. The event intervention strategy generation method integrating trigger word event diagram and text features as claimed in claim 6 is characterized in that: Intervention strategies for model generation in step 6.1 Define the strategy score S based on language perplexity p : Among them, PPL represents language perplexity; p θ (·) represents the target probability output of the model decoder; T′ represents the number of tokens generated by the model; m i Represents the tokens generated by the model one by one; The strategy score S based on language perplexity is optimized by NCE loss p ; Introduce the temperature parameter τ to balance the NCE loss gradient: In step 6.2, the generation strategy is calculated for the training data with true labels The cosine similarity loss L between the policy M and the true label real : In step 6.3, for data without true policy labels, use the generated strategy Optimization strategies for large models The similarity loss L llm : In step 6.4, the calculation method of comprehensive loss L is as follows: L=aL p +βL real +γL llm (a+b+c=1) Among them, α represents the perplexity loss weight, β represents the true label loss weight, and γ represents the large model rewrite label loss weight; L p represents the perplexity loss, L real represents the true label loss, L llm Represents the label rewriting loss of the large model.
Citation Information
Patent Citations
Causal event map construction method, system and device and storage medium
CN109726293A
Emergency event affair graph construction method
CN115455202A
Generative event extraction method based on ontology guidance
WO2023051399A1
Cited By
Digital calendar event prediction reminding method and system based on artificial intelligence
CN119940663A
Digital calendar event prediction and reminder method and system based on artificial intelligence
CN119940663B
Aquaculture disease prevention and control text data enhancement method and device based on small model guidance and storage medium
CN120277217A
Aquaculture disease prevention and control text data enhancement method, device and storage medium based on small model guidance
CN120277217B
Strategy generation model training method and device, strategy generation method and device, and terminal
CN120494031A