Event and event relation joint extraction method and system based on dynamic graph propagation
By adopting a dynamic graph propagation method in the event extraction system, a multi-level dynamic graph is constructed and a gated mechanism is introduced, the problem of robustness and insufficient structural modeling capabilities of joint extraction of events and event relationships in the existing technology is solved, and more efficient event extraction and relationship modeling is achieved.
Patent Information
- Application Number
- CN202510595578.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-09
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2045-05-09
AI Technical Summary
In the joint extraction of events and event relationships, the existing technology has problems such as static graph structure limitations, lack of fine-grained graph update mechanisms, and difficulty in effectively modeling semantic relationships between events, resulting in insufficient overall robustness and structural modeling capabilities of the system.
Using a method based on dynamic graph propagation, a multi-level dynamic graph structure is constructed and a mechanism is introduced to realize dynamic transmission and joint update of information between elements within events and events, thereby completing collaborative learning of subtasks such as event trigger word recognition, argument recognition, role classification, event type determination and event relationship classification.
It effectively improves the overall robustness and structural modeling capabilities of the event extraction system, especially when dealing with nested events and long-distance events, and can better capture context dependencies.
Smart Images

Figure CN120144788A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of audio processing and natural language processing, and specifically relates to a method and system for jointly extracting events and event relations based on dynamic graph propagation. Background Art
[0002] In the field of Natural Language Processing (NLP), event extraction is one of the core tasks of information extraction, which aims to identify semantically meaningful events and their components from unstructured text. Event extraction is widely used in scenarios such as public opinion analysis, intelligent question answering, financial information analysis, and legal text mining.
[0003] Traditional event extraction tasks usually rely on predefined event type templates or pipeline structures, and proceed in the order of trigger word recognition, argument extraction, and role recognition. However, such methods have problems such as semantic fragmentation, error cascades, and insufficient structural modeling, making it difficult to cope with complex, ambiguous, and nested natural language scenarios.
[0004] In addition, the span mechanism is widely used in current event extraction research, that is, a certain length of character or word sequence in the text is used as a candidate entity or component unit to model trigger words or arguments. Compared with the word-level annotation method, the span-based modeling method is more flexible and can capture complex components composed of multiple words.
[0005] In order to better represent the internal structure of events and the relationship between events, graph neural networks (GNN) and dynamic graph modeling methods have been gradually applied to event extraction tasks in recent years. By constructing event feature graphs and event-level graphs, syntactic structures, semantic connections, and contextual dependencies can be captured more effectively. However, existing graph-based methods often have the following problems: 1) The static graph structure limits the ability of dynamic semantic evolution between nodes; 2) There is a lack of fine-grained graph update mechanism, which makes it difficult to fully integrate the information of different types of nodes (such as trigger words and arguments); 3) In the context of multiple events, there is a lack of ability to effectively model the semantic relationships (such as causality, parallelism, and inclusion) between events.
[0006] Therefore, how to improve the overall robustness and structural modeling capabilities of the event extraction system is a technical problem that needs to be solved urgently. Summary of the invention
[0007] The object of the present invention is to solve the problem that events and event relationships are difficult to be efficiently and robustly jointly extracted in the prior art, and to provide a method and system for jointly extracting events and event relationships based on dynamic graph propagation.
[0008] The specific technical solutions adopted by the present invention are as follows: In a first aspect, the present invention provides a method for jointly extracting events and event relationships based on dynamic graph propagation, which includes: S1. Process the text to be extracted into a token sequence and a token embedding sequence; S2. Extract a candidate span set from the token sequence, and generate an initial span representation for each candidate span by combining token embeddings and span features; S3. Based on the part-of-speech of tokens, classify the candidate spans in the candidate span set into two categories: trigger words and arguments, and establish a dynamic graph of event elements as initial nodes. After updating through a gate mechanism, obtain the final span representation of each node; S4. Input the final span representation of each node in the dynamic graph of event elements into a first classification model to obtain the binary classification probabilities of each node belonging to trigger words and arguments, thereby updating the node types in the dynamic graph of event elements; then, based on the dynamic graph of event elements with updated node types, splice the final span representations of each pair of trigger word nodes and argument nodes and input them into a second classification model to obtain the corresponding event role types and confidence levels of this pair of nodes. Only retain the edge connections between trigger word nodes and argument nodes with a confidence level higher than the first threshold, thereby updating the graph structure; S5. For the dynamic graph of event elements with an updated graph structure, form an event by each trigger word node and all its associated argument nodes, fuse the final span representations of all nodes within the event into an initial event representation, and construct a fully connected event-level dynamic graph with all events as nodes. After updating through a gate mechanism, obtain the final event representation of each event node; S6. Input the final event representation of each event node in the event-level dynamic graph into a third classification model to predict the event type; then, splice the final event representations of each pair of event nodes and input them into a fourth classification model to obtain the event relationship type and confidence level, and delete the edge connections between nodes with a confidence level lower than the second threshold to form an event and event relationship graph.
[0009] Preferably, in the above S2, a sliding window with different lengths is used to slide and extract the token sequence, and all possible candidate spans are extracted in an exhaustive manner and added to the candidate span set. Each candidate span in the candidate span set consists of one or more consecutive tokens; then, according to the syntactic dependency rules, the candidate span set is screened, and the candidate spans with subject-predicate structure, verb-object structure, prepositional-object structure or attributive-middle structure are retained, and other candidate spans are deleted.
[0010] Preferably, for the first aspect above, the initial span representation of each candidate span is formed by concatenating the start token embedding, end token embedding, average token embedding, and the number of tokens in the candidate span.
[0011] Preferably, for the first aspect above, in S3, for each candidate span in the candidate span set, if the candidate span contains a verb-object structure or a token with verb part-of-speech, then classify the candidate span as a trigger word, otherwise classify the candidate span as an argument; when initially constructing the event element dynamic graph, each trigger word node needs to establish edge connections with all argument nodes.
[0012] Preferably, for the event element dynamic graph and the event-level dynamic graph, the way of updating using the gate mechanism is as follows: traverse each node in the graph, calculate the weights through the gating function, and then update the node representations of the neighbor nodes to the currently traversed node according to the weights to complete one round of iteration; after multiple rounds of iteration, obtain the final node representation of each node.
[0013] Preferably, for the first classification model, the second classification model, the third classification model, and the fourth classification model, all use forward propagation neural networks, and S1~S6 constitute a joint extraction framework for events and event relationships. All learnable network parameters in this framework need to be jointly optimized using a multi-task loss function, and the multi-task loss function is obtained by weighting the trigger word prediction loss, argument recognition loss, event role classification loss, event type classification loss, and event relationship classification loss.
[0014] In a second aspect, the present invention provides a joint extraction system for events and event relationships based on dynamic graph propagation, which includes: A tokenization module for processing the text to be extracted into a token sequence and a token embedding sequence; A span extraction module for extracting a candidate span set from the token sequence, and generating an initial span representation for each candidate span by combining the token embedding and span features; An event element dynamic graph construction module for classifying the candidate spans in the candidate span set into trigger words and arguments based on the token part-of-speech, and establishing an event element dynamic graph as the initial nodes, and obtaining the final span representation of each node after updating through the gate mechanism; An element-level extraction module is used to input the final span representation of each node in the event element dynamic graph into the first classification model to obtain the binary classification probabilities of each node belonging to trigger words and arguments, thereby updating the node types in the event element dynamic graph; based on the event element dynamic graph with updated node types, the final span representations of each pair of trigger word nodes and argument nodes are concatenated and input into the second classification model to obtain the event role type and confidence corresponding to this pair of nodes, and only the edge connections between trigger word nodes and argument nodes with a confidence higher than the first threshold are retained, thereby updating the graph structure; An event-level dynamic graph construction module is used to, for the event element dynamic graph with updated graph structure, form an event from each trigger word node and all its associated argument nodes, fuse the final span representations of all nodes in the event into an initial event representation, construct a fully connected event-level dynamic graph with all events as nodes, and then obtain the final event representation of each event node after updating through a gate mechanism; An event-level extraction module inputs the final event representation of each event node in the event-level dynamic graph into the third classification model to predict the event type; then, the final event representations of each pair of event nodes are concatenated and input into the fourth classification model to obtain the event relationship type and confidence, and the edge connections between nodes with a confidence lower than the second threshold are deleted to form an event and event relationship graph.
[0015] In a third aspect, the present invention provides a computer program product, including a computer program / instructions, which when executed by a processor, can implement the method for jointly extracting events and event relationships based on dynamic graph propagation as described in any one of the above first aspect solutions.
[0016] In a fourth aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it can implement the method for jointly extracting events and event relationships based on dynamic graph propagation as described in any one of the above first aspect solutions.
[0017] In a fifth aspect, the present invention provides a computer electronic device, which includes a memory and a processor; The memory is used to store a computer program; The processor is used to, when executing the computer program, be able to implement the method for jointly extracting events and event relationships based on dynamic graph propagation as described in any one of the above first aspect solutions.
[0018] The present invention has the following beneficial effects compared with the prior art: The present invention proposes a method and system for jointly extracting events and event relationships based on dynamic graph propagation. By constructing a multi-level dynamic graph structure and introducing a gate mechanism, dynamic transfer and joint update of information within event elements and between events are realized, so as to achieve collaborative learning of sub-tasks such as end-to-end event trigger word recognition, argument recognition, role classification, event type determination, and event relationship classification. The present invention simultaneously completes the prediction of event elements, event types, and event relationships through dynamic graph propagation, effectively captures context dependencies, and has significant advantages especially in dealing with nested events and long-distance event relationships, effectively improving the overall robustness and structural modeling ability of the event extraction system, and can be widely applied to fields such as financial public opinion analysis, medical event tracking, and judicial case reasoning. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 It is a schematic diagram of the steps of the method for jointly extracting events and event relationships based on dynamic graph propagation; Figure 2 It is a schematic diagram of the calculation of trigger word prediction loss, argument recognition loss, and event role classification loss; Figure 3 It is a schematic diagram of the calculation of event type classification loss and event relationship classification loss; Figure 4 It is a schematic diagram of the module composition of the system for jointly extracting events and event relationships based on dynamic graph propagation; Figure 5 It is a schematic diagram of the structure of a computer electronic device. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0020] In order to make the above-mentioned objects, features, and advantages of the present invention more obvious and understandable, the following detailed description of the specific embodiments of the present invention will be given in conjunction with the accompanying drawings. Many specific details are set forth in the following description in order to fully understand the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without departing from the connotation of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed below. The technical features in various embodiments of the present invention can be combined correspondingly without conflict.
[0021] In the description of the present invention, it should be understood that the terms "first" and "second" are only used for the purpose of distinguishing descriptions, and cannot be understood as indicating or implying relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one of such features.
[0022] The present invention provides a method for jointly extracting events and event relationships based on dynamic graph propagation. By constructing a multi-level dynamic graph structure and introducing a gate mechanism, it realizes the dynamic transfer and joint update of information within event elements and between events, thereby achieving the collaborative learning of sub-tasks such as end-to-end event trigger word recognition, argument recognition, role classification, event type determination, and event relationship classification, effectively improving the overall robustness and structural modeling ability of the event extraction system. The following describes the specific implementation of the above joint extraction method of the present invention in detail.
[0023] As Figure 1 shown, in a preferred embodiment of the present invention, a method for jointly extracting events and event relationships based on dynamic graph propagation is provided. This method includes multiple steps S1 to S6. The following specifically elaborates on the implementation of each step.
[0024] S1. Process the text to be extracted into a token sequence and a token embedding sequence.
[0025] It should be noted that the text to be extracted in the present invention refers to a natural language text from which events and event relationships need to be extracted. The token in the present invention is the same as token, also known as a word element. The tokenization of the text to be extracted belongs to the prior art. The text to be extracted can be segmented first to form a token sequence, and each token is vectorized through a language representation model to obtain the token embedding corresponding to each token. The language representation model can be implemented using the BERT model or the large language model LLM.
[0026] In the embodiment of the present invention, the specific implementation of the above S1 step is as follows: S11: First, segment the text to be extracted through a text segmentation tool (such as jieba, HanLP), and then obtain a token sequence composed of a series of tokens and the initial representation of each token through a pre-trained BERT model ; S12: Encode the initial representation of each token through the bidirectional transformer encoder of the BERT model to obtain a token embedding that integrates context information .
[0027] To better illustrate the specific implementation of the present invention, the following gives an exemplary financial news text as the text to be extracted. This text to be extracted is denoted as the text to be extracted A, and the specific content is as follows: "In March 2024, due to the sharp decline of US technology stocks, the Nasdaq index fell by more than 12% within a week. Subsequently, JPMorgan Chase announced a cut in its first-quarter earnings forecast and laid off 2,000 employees to control costs. This move triggered further concerns in the market about the health of the banking industry, and relevant financial regulatory agencies also intervened in the investigation." Perform BERT tokenization and encoding on the above-mentioned text A to be extracted, obtain token-level context embeddings, and thus obtain rich semantic representations. Some of the extracted token examples are "plunge", "fall", "cut profit expectations", "lay off employees", "worry", "launch an investigation".
[0028] S2. Extract candidate spans from the token sequence and form a candidate span set, and generate an initial span representation for each candidate span in the candidate span set by combining token embeddings and span features.
[0029] It should be noted that each span is a token sequence of a certain length, at least 1 token, and can also be multiple tokens.
[0030] In the embodiments of the present invention, a sliding window of different lengths can be used to slide and extract the token sequence to extract all possible candidate spans in an exhaustive manner and add them to the candidate span set. Each candidate span in the candidate span set consists of one or more consecutive tokens; then, the candidate span set is filtered according to syntactic dependency rules, and the candidate spans with subject-predicate structure (SBV), verb-object structure (VOB), prepositional-object structure (POB) or attributive-middle structure (ATT) as candidate spans or the candidate spans with only single noun or verb part-of-speech tokens are retained, and other candidate spans are deleted. Among them, for the subject-predicate structure, the dependency relationship between the subject and the verb is extracted to form a candidate span; for the verb-object structure, the dependency relationship between the verb and the object is extracted to form a candidate span; for the prepositional-object structure, the dependency relationship between the preposition and its object is extracted to form a candidate span; for the attributive-middle structure, the relationship between the adjective modifying the noun and the noun is extracted to form a candidate span. Finally, all candidate spans are filtered and merged to ensure that the result is semantically complete and meets the structural requirements, and thus the candidate span set can be formed.
[0031] Continuing with the above-mentioned text A to be extracted as an example, in the execution of step S2 above, candidate spans are generated by exhaustive extraction using a sliding window in combination with syntactic dependency structure rules. For example: The original token segmentation of "This move has triggered further concerns about the health of the banking industry" is ["This move", "has triggered", "the market", "about", "the banking industry", "health condition", "of", "further", "concerns"]. Assuming the total number of tokens in text A to be extracted is n, all candidate spans of 1 to n tokens are exhaustively extracted in the form of a variable-length sliding window and added to the candidate span set. For example, candidate spans of 2 tokens are "This move has triggered", "has triggered the market", "the market about", etc. For the candidate span set, the (simplified) dependency structure is analyzed using tools such as spaCy / Stanza. The candidate span set is filtered using dependency structure rules, including candidate spans span that satisfy the subject-predicate structure (SBV), verb-object structure (VOB), prepositional-object structure (POB), and attributive-middle structure (ATT), such as "has triggered", "has triggered market concerns", "further concerns", etc., and the remaining candidate spans are deleted. Then for each remaining candidate span, an initial span representation of each candidate span is generated by combining token embeddings and span features.
[0032] In an embodiment of the present invention, the initial span representation of each candidate span is formed by concatenating the start token embedding, end token embedding, average token embedding, and the number of tokens in the candidate span. The initial span representation of each candidate span The calculation formula can be expressed as:
[0033] where is the token embedding of the start token of the i-th candidate span, is the token embedding of the end token of the candidate span, is the average value of the token embeddings of all tokens in the candidate span, encodes the number of tokens contained in the candidate span, and ";" represents vector concatenation.
[0034] S3. Based on the token part-of-speech, the candidate spans in the candidate span set are classified into two categories: trigger words and arguments, and an event element dynamic graph is established with them as initial nodes. After updating through a gate mechanism, the final span representation of each node is obtained.
[0035] It should be noted that in the event extraction task, trigger, argument, and event role are three core concepts used to describe the key information of an event. The trigger is the core indicator of the occurrence of an event and is used to identify the type of the event. The trigger determines the category of the event and is the starting point of event extraction. For example, in the sentence "Xiaoming signed a contract in Beijing yesterday", "signed" is the trigger, indicating that this is a "contract signing" event; in the sentence "The company announced layoffs", "announced" is the trigger, indicating that this is an "announcement" event. An argument is a participant or attribute of an event and is an important part of the event. The argument provides detailed information about the event, including the subject, object, time, location, etc. In "Xiaoming signed a contract in Beijing yesterday": the subject is "Xiaoming", the time is "yesterday", the location is "Beijing", and the object is "contract"; while in "The company announced layoffs": the subject is "the company", and the object is "layoffs". By identifying the trigger and the argument, the event information can be completely extracted, providing a basis for the event extraction task. The event role refers to the entity or concept that undertakes a specific function or attribute in the event. They describe the specific role or identity of the argument in the event and are an important part of the event structure. For example, in "Xiaoming signed a contract in Beijing yesterday", if "Xiaoming" is the argument, its event role may be "signer".
[0036] Therefore, when classifying the candidate spans in the candidate span set into triggers and arguments, the general part-of-speech of the trigger and the argument can be used for distinction. In the present invention, for each candidate span in the candidate span set, if the candidate span contains a verb-object structure or is a token with a verb part-of-speech, the candidate span is classified as a trigger; otherwise, the candidate span is classified as an argument. Thus, all the triggers and arguments can be used as two sections of graph nodes. When initially constructing the dynamic graph of event elements, each trigger word node in the initial graph needs to establish an edge connection with all the argument nodes, and then the edge connections in the graph are pruned according to the confidence level later.
[0037] Continuing with the above-mentioned text A to be extracted as an example, when executing the dynamic graph of event elements in step S3 above, the initial trigger word nodes are selected as candidate spans with verb parts-of-speech such as "plunge", "announce", "cut", "layoff", "investigate", etc., and the remaining spans are used as initial argument nodes. Initialize the edge connection between each trigger and all candidate arguments, and the edge type is "role to be classified". Thus, the node representation can be dynamically updated through the information propagation mechanism (such as a gated neural network) between the trigger and the argument in the graph structure.
[0038] In an embodiment of the present invention, a gate mechanism is used to update the event element dynamic graph. The specific approach is as follows: Traverse each node in the graph, calculate weights through a gating function, and then update the node representations of neighbor nodes to the currently traversed node according to the weights, thereby propagating information between the trigger word and the argument to complete one round of iteration. After multiple rounds of iteration, the final node representation of each node is obtained. Specifically, the process of updating the event element dynamic graph using the gate mechanism can be executed according to the following sub-steps: S31: Traverse each trigger word node and argument node in the event element dynamic graph. For each currently traversed node i, its current latest node representation is denoted as , and it is necessary to first generate a neighbor aggregation feature for this node representation . The generation method is as follows: Assume that the set of neighbor nodes of the currently traversed node i is . First, traverse all neighbor nodes j of node i, and calculate the similarity between the node representation of the currently traversed node i and the node representation of neighbor node j. Then, normalize the similarity score to obtain the normalized weight between the two:
[0039] Thus, the normalized weight can be used to perform weighted aggregation on the node representations of all neighbor nodes to obtain the neighbor aggregation feature = .
[0040] S32: Use the neighbor aggregation feature , and update according to the gate mechanism. The update method is as follows:
[0041] Among them, is the current node representation, λ is the weight generated by the gating function, and is calculated using the following function: ) Among them, σ is the simoid activation function, is the trainable parameter matrix, represents the concatenation of the current node representation and the update value.
[0042] S33: Repeat steps S31 and S32 a total of N times to obtain the final node representation Since each node is a candidate span, this final node represents the final span representation.
[0043] S4. Input the final span representation of each node in the event element dynamic graph into the first classification model to obtain the binary classification probabilities of each node belonging to a trigger word and an argument, thereby updating the node types in the event element dynamic graph; then, based on the event element dynamic graph with updated node types, splice the final span representations of each pair of trigger word nodes and argument nodes and input them into the second classification model to obtain the event role type and confidence level corresponding to this pair of nodes, and only retain the edge connections between the trigger word nodes and argument nodes with a confidence level higher than the first threshold, thereby updating the graph structure.
[0044] It should be noted that the first classification model and the second classification model in the present invention can adopt any model capable of implementing classification, such as a multi-layer perceptron MLP, a forward propagation neural network FNN, a support vector machine SVM, etc. In the embodiments of the present invention, both the first classification model and the second classification model can be implemented using a forward propagation neural network FNN. Therefore, the specific implementation sub-steps of the above S4 step are as follows: S41: Classify the final node representation of each node in the event element dynamic graph through the first forward propagation neural network (Feed-forward Neural Network, FNN) to predict its binary classification probability of being a trigger word or an argument, thereby updating the node types in the event element dynamic graph.
[0045] S42: For each pair of neighbor nodes in the event element dynamic graph, splice the final node representations of the two nodes and input them into the second forward propagation neural network to predict the event role type and probability between this pair of nodes.
[0046] S43: Use the probability of the predicted event role type for each pair of neighbor nodes in the event element dynamic graph as the confidence level, update the event element graph structure according to the confidence level, and only retain the edge connections between the trigger word nodes and argument nodes with a confidence level greater than the preset threshold, while removing the remaining edge connections, thereby completing the dynamic adjustment of the event element dynamic graph structure.
[0047] Continuing with the above-mentioned text A to be extracted as an example, after retaining the edges with a confidence level higher than the threshold of 0.8, the event elements of the trigger words, arguments, and event roles retained in the event element dynamic graph are shown in Table 1 as follows: Table 1
[0048] S5. For the event element dynamic graph after the graph structure update, an event is formed by each trigger word node and all its associated argument nodes. The final span representations of all nodes within the event are fused into the initial event representation, and a fully connected event-level dynamic graph is constructed with all events as nodes. After updating through the gate mechanism, the final event representation of each event node is obtained. 。
[0049] It should be noted that in the event element dynamic graph, a trigger word node may be connected to multiple argument nodes. Each trigger word node and all its associated argument nodes can form an event. Thus, a series of events can be extracted from the event element dynamic graph. These events can all be used as nodes to construct an event-level dynamic graph. The initial event-level dynamic graph is a fully connected graph, that is, there is an initial edge connection between any two event nodes, but the edge type is "event relationship to be classified".
[0050] Continuing with the above-mentioned text A to be extracted as an example, by fusing the event elements shown in Table 1 above, 5 structured event examples are constructed as shown in Table 2: Table 2
[0051] For the event-level dynamic graph, the gate mechanism can also be used for updating. The update method is the same as that of the gate mechanism update of the event element dynamic graph. Each event node in the event-level dynamic graph can be traversed, the weights between the currently traversed node and each of its neighbor nodes are calculated through the gating function, and then the node representations of the neighbor nodes are updated to the currently traversed node according to their respective weights to complete one round of iteration; after multiple rounds of iteration, the final event representation of each event node k is obtained. 。Thus, by introducing the gate mechanism in the event-level dynamic graph and referring to the information propagation process in steps S31~S33, information is transmitted between event nodes and the event representation is updated, improving the modeling ability for event types and event relationships.
[0052] S6. Input the final event representation of each event node in the event-level dynamic graph into the third classification model to predict the event type; then, concatenate the final event representations of each pair of event nodes and input them into the fourth classification model to obtain the event relationship type and confidence level. Delete the edge connections between nodes with a confidence level lower than the second threshold to form an event and event relationship graph.
[0053] It should be noted that the third classification model and the fourth classification model in the present invention can adopt any model capable of classification, such as a multi-layer perceptron MLP, a forward propagation neural network FNN, a support vector machine SVM, etc. In the embodiments of the present invention, both the third classification model and the fourth classification model can be implemented using a forward propagation neural network FNN. Thus, the specific implementation sub-steps of the above S6 step are as follows: S61: Represent the final event of each event node in the event-level dynamic graph , and classify it through a forward propagation network to predict the event type and its confidence corresponding to the event node.
[0054] Continuing with the above-mentioned text A to be extracted as an example, for the 5 events shown in Table 2 above, the predicted results of the remaining event types are shown in Table 3 below: Table 3
[0055] S62: Concatenate the final event representations of each pair of neighbor nodes in the event-level dynamic graph , and predict the event relationship type and confidence through another forward propagation network. The event relationship labels can include sequential relationship, causal relationship, inclusion relationship, triggering relationship, etc.
[0056] Continuing with the above-mentioned text A to be extracted as an example, for the 5 events shown in Table 2 above, the predicted results of the event relationship types are shown in Table 4 below: Table 4
[0057] S63: After predicting the event relationship type and confidence for each pair of neighbor nodes in the event-level dynamic graph, retain the high-confidence nodes and edges, and delete the edge connections between nodes with confidence lower than the preset threshold, thereby forming the final event and event relationship graph.
[0058] It should be noted that the above-mentioned event and event relationship joint extraction method based on dynamic graph propagation described in S1~S6 can form an event and event relationship joint extraction framework as a whole. All learnable network parameters in this framework need to be jointly optimized using a multi-task loss function, and the learnable parameters in the first classification model, the second classification model, the third classification model, the fourth classification model, and other modules all need to participate in the optimization. The above multi-task loss function is obtained by weighting the trigger word prediction loss, argument recognition loss, event role classification loss, event type classification loss, and event relationship classification loss. Among them, as Figure 2 shown, the trigger word prediction loss, argument recognition loss, and event role classification loss are calculated by the first classification model and the second classification model based on the event element dynamic graph, while as Figure 3 shown, the event type classification loss and event relationship classification loss are calculated by the third classification model and the fourth classification model based on the event-level dynamic graph. The specific model training method belongs to the prior art. In the embodiments of the present invention, the network training steps include: S71: Construct a training data set including event trigger words, argument roles, event types, and event relationship annotations; S72: Sample training samples from the training dataset, and sequentially execute steps S1 to S6 for each training sample to calculate the prediction probabilities of trigger words, arguments, roles, event types, and event relationships; S73: Use a multi-task loss function to jointly optimize each sub-task, where the loss function includes: Trigger word prediction loss
[0059] Argument recognition loss
[0060] Role classification loss
[0061] Event type classification loss
[0062] Event relationship classification loss
[0063] The joint loss function is defined as: + + + +
[0064] Where are 5 adjustable weight coefficients used to balance the importance of each sub-task.
[0065] S74: Based on the training dataset and the joint loss function, use the backpropagation algorithm and the gradient descent strategy to iteratively update the network parameters until the loss converges.
[0066] Thus, the above event and event relationship graph records the finally retained events, event types, and event relationships. At the same time, each event also records the corresponding event elements (trigger words, arguments, event roles). It should be noted that the jointly extracted results of events and event relationships finally returned to the user can be the visualization results of the above event element dynamic graph and event and event relationship graph, or other forms specified by the user, such as structured JSON expressions. When displaying, it is preferably to return the jointly extracted results of events and event relationships in the form of a visualization graph, while when storing, it is preferably to store them in a structured JSON file.
[0067] It should be noted that the method steps shown in the above S1~S6 can essentially be implemented in the form of a computer program.
[0068] Therefore, based on the same inventive concept, a system for jointly extracting events and event relationships based on dynamic graph propagation is also provided, asFigure 4 As shown in the figure, the system includes: A tokenization module for processing the text to be extracted into a token sequence and a token embedding sequence; A span extraction module for extracting a candidate span set from the token sequence, and generating an initial span representation for each candidate span by combining token embeddings and span features; An event element dynamic graph construction module for classifying the candidate spans in the candidate span set into two categories, trigger words and arguments, based on the token part-of-speech, and establishing an event element dynamic graph with these as initial nodes, and obtaining the final span representation of each node after updating through a gate mechanism; An element-level extraction module for inputting the final span representation of each node in the event element dynamic graph into a first classification model to obtain the binary classification probabilities of each node belonging to trigger words and arguments, thereby updating the node types in the event element dynamic graph; then, based on the event element dynamic graph with updated node types, concatenating the final span representations of each pair of trigger word nodes and argument nodes and inputting them into a second classification model to obtain the corresponding event role type and confidence of this pair of nodes, and only retaining the edge connections between trigger word nodes and argument nodes with a confidence higher than the first threshold, thereby updating the graph structure; An event-level dynamic graph construction module for, for the event element dynamic graph with updated graph structure, forming an event from each trigger word node and all its associated argument nodes, fusing the final span representations of all nodes within the event into an initial event representation, and constructing a fully connected event-level dynamic graph with all events as nodes, and obtaining the final event representation of each event node after updating through a gate mechanism; An event-level extraction module for inputting the final event representation of each event node in the event-level dynamic graph into a third classification model to predict the event type; then, concatenating the final event representations of each pair of event nodes and inputting them into a fourth classification model to obtain the event relationship type and confidence, and deleting the edge connections between nodes with a confidence lower than the second threshold to form an event and event relationship graph.
[0069] In addition, based on the same inventive concept, as Figure 5 shown in the figure, the present invention also provides a computer electronic device corresponding to the method for jointly extracting events and event relationships based on dynamic graph propagation provided in the above embodiment, which includes a memory and a processor; The memory is used for storing a computer program; The processor is used for, when executing the computer program, implementing the method for jointly extracting events and event relationships based on dynamic graph propagation as described above; In addition, when the logical instructions in the above-mentioned memory are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention.
[0070] Therefore, based on the same inventive concept, the present invention provides a computer-readable storage medium corresponding to a method for jointly extracting events and event relationships based on dynamic graph propagation. A computer program is stored on the storage medium, and when the computer program is executed by a processor, it can implement the method for jointly extracting events and event relationships based on dynamic graph propagation as described above.
[0071] Therefore, based on the same inventive concept, the present invention provides a computer program product, including a computer program / instructions, which when executed by a processor, can implement the method for jointly extracting events and event relationships based on dynamic graph propagation as described above.
[0072] Specifically, in the computer-readable storage media of the above three embodiments, the stored computer program is executed by a processor, and the steps of S1 to S6 described above can be executed.
[0073] It can be understood that the above storage medium may include a random access memory (RAM), and may also include a non-volatile memory (NVM), such as at least one disk memory. At the same time, the storage medium may also be various media such as a USB flash drive, a mobile hard disk, a magnetic disk, or an optical disc that can store program codes.
[0074] It can be understood that the above-mentioned processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0075] In addition, it should be noted that those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the system described above can refer to the corresponding process in the foregoing method embodiments, and will not be elaborated herein. In the embodiments provided in the present application, the division of steps or modules in the system and method is only a logical function division, and there may be other division methods in actual implementation. For example, multiple modules or steps can be combined or integrated together, and a module or step can also be split.
[0076] The above-described embodiments are only some preferred implementation solutions of the present invention, but are not intended to limit the present invention. Those of ordinary skill in the relevant technical field can still make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, all technical solutions obtained by means of equivalent replacement or equivalent transformation fall within the protection scope of the present invention.
Claims
1. A method for jointly extracting events and event relations based on dynamic graph propagation, characterized in that: include: S1, processing the text to be extracted into a token sequence and a token embedding sequence; S2, extracting a candidate span set from the token sequence, and generating an initial span representation of each candidate span by combining token embedding and span features; S3, based on the token part of speech, the candidate spans in the candidate span set are divided into trigger words and arguments, and the event element dynamic graph is established as the initial node, and the final span representation of each node is obtained after updating through the gate mechanism; S4, inputting the final span representation of each node in the event element dynamic graph into the first classification model, obtaining the binary classification probability of each node belonging to the trigger word and the argument, thereby updating the node type in the event element dynamic graph; Based on the event element dynamic graph after the node type is updated, the final span representation of each pair of trigger word nodes and argument nodes is concatenated and input into the second classification model to obtain the event role type and confidence corresponding to this pair of nodes, and only the edge connection between the trigger word node and the argument node with a confidence higher than the first threshold is retained, thereby updating the graph structure; S5. For the event element dynamic graph after the graph structure is updated, each trigger word node and all its associated argument nodes constitute an event, the final span representations of all nodes in the event are merged into the initial event representation, and a fully connected event-level dynamic graph is constructed with all events as nodes, and then the final event representation of each event node is obtained after updating through the gate mechanism; S6, inputting the final event representation of each event node in the event-level dynamic graph into a third classification model to predict the event type; The final event representations of each pair of event nodes are then concatenated and input into the fourth classification model to obtain the event relationship type and confidence, and the edge connections between nodes with confidence levels lower than the second threshold are deleted to form a graph of events and event relationships.
2. The method for jointly extracting events and event relations based on dynamic graph propagation according to claim 1, characterized in that: In S2, sliding extraction is performed on the token sequence using sliding windows of different lengths, and all possible candidate spans are extracted in an exhaustive manner and added to a candidate span set, where each candidate span in the candidate span set consists of one or more continuous tokens; then the candidate span set is screened according to syntactic dependency rules, and candidate spans with subject-predicate structure, verb-object structure, preposition-object structure or attributive-predicate structure are retained, and other candidate spans are deleted.
3. The method for jointly extracting events and event relations based on dynamic graph propagation according to claim 1, characterized in that: The initial span representation of each candidate span is concatenated by the start token embedding, end token embedding, average token embedding, and number of tokens in the candidate span.
4. The method for jointly extracting events and event relations based on dynamic graph propagation according to claim 1, characterized in that: In S3, for each candidate span in the candidate span set, if the candidate span is a token of a verb part of speech, the candidate span is classified as a trigger word, otherwise the candidate span is classified as an argument; when initially constructing the event element dynamic graph, each trigger word node needs to establish an edge connection with all argument nodes.
5. The method for jointly extracting events and event relations based on dynamic graph propagation according to claim 1, characterized in that: For event element dynamic graphs and event-level dynamic graphs, the gate mechanism is used to update the graph by traversing each node in the graph, calculating the weight through the gating function, and then updating the node representation of the neighboring node to the current traversed node according to the weight to complete a round of iteration; after multiple rounds of iteration, the final node representation of each node is obtained.
6. The method for jointly extracting events and event relations based on dynamic graph propagation according to claim 1, characterized in that: The first classification model, the second classification model, the third classification model and the fourth classification model all adopt a forward propagation neural network, and S1~S6 constitute a joint extraction framework of events and event relations. All learnable network parameters in the framework need to be jointly optimized using a multi-task loss function, and the multi-task loss function is obtained by weighting the trigger word prediction loss, argument recognition loss, event role classification loss, event type classification loss and event relationship classification loss.
7. A joint extraction system of events and event relations based on dynamic graph propagation, characterized in that: include: A tokenization module is used to process the text to be extracted into a token sequence and a token embedding sequence; A span extraction module, configured to extract a candidate span set from the token sequence, and generate an initial span representation of each candidate span by combining token embedding and span features; The event element dynamic graph construction module is used to classify the candidate spans in the candidate span set into trigger words and arguments based on the token part of speech, and use them as the initial nodes to establish the event element dynamic graph. The final span representation of each node is obtained after updating through the gate mechanism; The element-level extraction module is used to input the final span representation of each node in the event element dynamic graph into the first classification model to obtain the binary classification probability of each node belonging to the trigger word and the argument, thereby updating the node type in the event element dynamic graph; Based on the event element dynamic graph after the node type is updated, the final span representation of each pair of trigger word nodes and argument nodes is concatenated and input into the second classification model to obtain the event role type and confidence corresponding to this pair of nodes, and only the edge connection between the trigger word node and the argument node with a confidence higher than the first threshold is retained, thereby updating the graph structure; The event-level dynamic graph construction module is used to construct the event element dynamic graph after the graph structure is updated. Each trigger word node and all its associated argument nodes constitute an event, merge the final span representation of all nodes in the event into the initial event representation, and construct a fully connected event-level dynamic graph with all events as nodes. The final event representation of each event node is obtained after updating through the gate mechanism. The event-level extraction module inputs the final event representation of each event node in the event-level dynamic graph into the third classification model to predict the event type; The final event representations of each pair of event nodes are then concatenated and input into the fourth classification model to obtain the event relationship type and confidence, and the edge connections between nodes with confidence levels lower than the second threshold are deleted to form a graph of events and event relationships.
8. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, it can implement the method for jointly extracting events and event relations based on dynamic graph propagation as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method for jointly extracting events and event relationships based on dynamic graph propagation as described in any one of claims 1 to 6 is implemented.
10. A computer electronic device, characterized in that: including memory and processor; The memory is used to store computer programs; The processor is used to implement the method for jointly extracting events and event relationships based on dynamic graph propagation as described in any one of claims 1 to 6 when executing the computer program.
Citation Information
Patent Citations
Event argument extraction method based on event element interaction and tag semantic enhancement
CN114648016A
Event extraction method, device and equipment and computer readable storage medium
CN116049446A
Event argument role classification method and system based on role consistency
CN116595406A
Role representation multi-round learning method and system for text-level event argument extraction
CN119849574A
Event extraction method, device and storage medium
US20220300546A1