CN-118569376-B - Machine reading understanding event extraction method, device and medium based on template bridging
Abstract
The invention discloses a machine reading and understanding event extraction method, a device and a medium based on template bridging, which comprises the steps of S01 obtaining an input text and a trigger word problem template and combining the input text and the trigger word problem template to form an input example with the trigger word problem prompting template, S02 carrying out grammar analysis on the input example to form an adjacent graph, connecting the input text with the trigger word problem prompting template according to the adjacent graph to obtain a link graph, extracting global features according to the link graph, fusing the global features and semantic features to identify trigger words and trigger word types, S03 generating an argument problem prompting template, combining the prompting template with the input text to form the input example with the problem prompting template, S04 carrying out argument extraction to obtain an argument and argument type output. The method has the advantages of simple implementation method, high event extraction efficiency and precision, good portability and the like.
Inventors
- LIU MING
- LIU LIU
- DING KUN
- SUN YI
- ZHANG HUI
- JIANG GUOQUAN
Assignees
- 中国人民解放军国防科技大学
Dates
- Publication Date
- 20260508
- Application Date
- 20240528
Claims (10)
- 1. A machine-readable understanding event extraction method based on template bridging, comprising the steps of: S01, generating a trigger word problem, namely acquiring an input text and a trigger word problem prompting template, and combining to form an input instance with the trigger word problem prompting template; S02, event detection, namely carrying out grammar analysis on an input instance with a trigger word prompting problem to form an adjacency graph for describing the relation between words in the input instance, carrying out connection operation on an input text and a trigger word problem prompting template according to the adjacency graph to obtain a link graph, bridging the problem with a context, reconstructing the relation between the problem and the text, and extracting global features from the input instance according to the link graph; S03, generating an argument problem prompt template according to the identified trigger word and the trigger word type, and combining the argument problem prompt template with an input text to form an input instance with an argument problem prompt template; S04, extracting the argument, namely extracting the argument from the input instance with the argument problem prompt template to obtain an argument and an argument type output.
- 2. The machine-readable understanding event extraction method of template bridging according to claim 1, wherein when the input text and the trigger word question prompting template are connected in step S02, the relation between each word of the input text and word embedding of the trigger word question is converted into an adjacency matrix a n×n , where n is the number of words in the input instance QA, and the matrix elements in the adjacency matrix a n×n are Where v i 、 vj is the i-th word i, the j-th word i, E includes poss, nsubj, dobj, prompt and other relationships in the input instance QA, pos represents that the occupancy modifier is all lattice qualifiers, nsubj represents a noun subject, dobj represents a direct object, and prompt represents a prompt question template for an event extraction task.
- 3. The machine-readable understanding event extraction method of template bridging according to claim 1, wherein in step S02, a GCN is used to extract global features from an input instance, wherein the following formula is used in performing node information update: Wherein, the Representing a characterization of the layer 1 node v, Representing the characterization of the node V of the layer 1 after optimization, i representing the layer number of the graph neural network, V representing the node, i.e. the word, V representing the set of nodes, I is an identity matrix, and the matrix is a matrix, Is a degree matrix of A, A is an adjacency matrix obtained by converting the relation between words in an input example and word embedding of a trigger word prompt problem, D ii =∑ j A ij , D is the length of a prompt problem template, W (l) is a weight matrix of a first layer, Layer 1 is represented as containing general information about the hint problem template, reLU is represented as an activation function, [ CLS ] is represented as the information collection node, and g () is represented as a feature transformation function.
- 4. The machine-readable understanding event extraction method of claim 3, wherein said extracting global features from input instances using GCN further comprises filtering out interfering terms using a gating mechanism according to the following formula: Wherein g (h v ) represents a gating function, Representing a normalized representation of node v, n representing the length of the input instance, alpha and epsilon being trainable parameters, Let h u denote the square root of all neighbor nodes of v, let u denote the neighbor nodes of v, and N (v) denote the set of all neighbor nodes of v.
- 5. The machine-readable understanding event extraction method of template bridging according to claim 1, wherein in step S02, the global features and semantic features of the input instance are fused by an attention mechanism, and the calculation expression is: CrossAttention(S,G)=γAttention S +λAttention G Wherein, the Representing the semantic features that have undergone a linear transformation, Representing global features, M is the number of words in a sentence, d k represents the dimension of word embedding, crossAttention (S, G) represents the fused features of features Q S and K G , and γ, λ represent weight coefficients; in the trigger word recognition process, the trigger word is predicted and recognized according to the following formula: output trigger =max(a p1 ,a p2 ,…,a pn ) Where a pi denotes the probability that the i-th word w i is a trigger word, n denotes the length of the input instance, Is a trainable parameter, H is the dimension of a i , N is the number of types of trigger words, and output trigger represents the predicted and recognized trigger words.
- 6. The machine-readable understanding event extraction method for template bridging according to any one of claims 1 to 5, wherein step S04 includes: step S401.EAE represents that semantic features E A of an input instance and POE features of each word in the input instance are obtained, wherein the POE features are used for representing whether the word is a trigger word or not; S402, feature fusion, namely fusing semantic features E A of an input instance with POE features of each word to obtain keyword features E C , and respectively obtaining event argument extraction representations by using the semantic features E A , the POE features and the keyword features E C ; s403, predicting and identifying the argument, namely predicting and identifying papers and argument types according to the representation extracted by the event argument.
- 7. The machine-readable understanding event extraction method of claim 6, wherein in step S402, the keyword feature E C is obtained according to the following formula: E C =α⊙Relu(multiply(E A ,T A ))+β⊙E A wherein α and β represent learnable parameters, multiply represents multiplication; The event argument extraction is represented as: Wherein, the Representing concatenation of different types of data, nor represents normalization operation, n represents the length of the input instance.
- 8. The machine-readable understanding event extraction method of template bridging according to claim 6, wherein in step S403, argument predictive recognition is performed according to the following formula: P S (w i )=softmax(f i W s ) P E (w i )=sofmtax(f i W e ) Wherein, P S (w i ) and P E (w i ) represent probabilities that the i-th word w i starts and ends as arguments, And Is a trainable parameter; the span of argument a includes a start offset S a and an end offset E a , which start offset S a and end offset E a satisfy the following rules: S a n is more than or equal to 0 and E a n is more than or equal to 0; E a -S a ≥0; P S (S a )≥threshold≥max(P S ([CLS]),P S ([SEP])) P E (E a )≥threshold≥max(P E ([CLS]),P E ([SEP])); And E a and S a belong to argument a and cannot belong to other arguments.
- 9. A machine-readable understanding event extraction device based on template bridging, comprising: The trigger word problem generating module is used for acquiring an input text and a trigger word problem prompting template and combining the input text and the trigger word problem prompting template to form an input instance with the trigger word problem prompting template; the event detection module is used for carrying out grammar analysis on an input instance with a trigger word prompting problem to form an adjacent graph for describing the relation between words in the input instance, connecting an input text with a trigger word problem prompting template according to the adjacent graph to obtain a link graph, bridging the problem with a context, reconstructing the relation between the problem and the text, and extracting global features from the input instance according to the link graph; The argument problem generating module is used for generating an argument problem prompting template according to the identified trigger words and trigger word types, and combining the argument problem prompting template with an input text to form an input instance with an argument problem prompting template; And the argument extraction module is used for extracting the argument from the input instance with the argument problem prompt template to obtain an argument and an argument type output.
- 10. A computer readable storage medium storing a computer program, wherein the computer program when executed by a processor implements the method of any one of claims 1-8.
Description
Machine reading understanding event extraction method, device and medium based on template bridging Technical Field The present invention relates to the field of Natural Language Processing (NLP) technology, and in particular, to a method, an apparatus, and a medium for extracting a machine reading understanding event based on template bridging. Background Event Extraction (EE) is an important and challenging task in natural language processing, and has been widely used in fields such as knowledge graph construction, information retrieval, question-answering, recommendation, and the like. Event extraction still faces a significant challenge due to the semantic ambiguity of event references and the diversity of event structures. The goal of event extraction is to extract structured event information from unstructured text, typically by dividing event extraction into two subtasks, event Detection (ED) which aims at identifying event trigger words and distinguishing their types, and argument extraction (EAE) which aims at identifying arguments of a given event trigger word and classifying their roles. Taking fig. 1 as an example, sentence S1 is a pain text containing a subtype of "START-POSITION" event, where the trigger word is "hired". In addition, S1 contains four entities, "1997", "company", "John D. Idol" and "coef execution", which are event arguments, which are assigned different roles, such as "TIME", "ENTITY", "PERSON" and "POSITION". Unlike conventional methods that rely on artificial features, deep learning can automatically extract features, and thus deep learning models such as Convolutional Neural Networks (CNNs), recurrent Neural Networks (RNNs), graph Neural Networks (GNNs), and pre-trained language models (PLMs) have achieved significant results in EE. The CNN can automatically capture the characteristics of the text, and words in the information cannot contain long-distance dependency relations due to the limitation of a kernel window of the CNN, the RNN-based model can obtain the long-distance relations between words by using the sequence of the text, however, the RNN model cannot effectively capture the dependency relations between remote and discontinuous trigger words and arguments thereof. GNNs are applied to multiple neurons on a graph structure, and for event extraction tasks, GNNs generally update node information using dependency trees between trigger words and their arguments, so that GNN-based models can capture non-local grammatical relations. PLMs can learn generic language representations from large scale unlabeled corpora, thus pre-training and fine-tuning paradigms are strategies commonly used in the field of natural language processing. However, the event extraction method based on the deep learning model has the following problems: 1. Because the event information is usually extracted directly from the text, the problem template and the plain text are mutually independent, the semantic relationship between the problem template and the plain text is not fully utilized, the prompt of trigger words and event types to the argument characters is absent, and especially for the argument characters with few or no examples in the training stage, the efficiency and the precision of actual event extraction are not high. 2. Traditional deep learning models are poorly portable and require different models to be built according to specific downstream tasks even with pre-training and fine-tuning paradigms. Disclosure of Invention Aiming at the technical problems existing in the prior art, the invention provides a machine reading and understanding event extraction method, device and medium based on template bridging, which have the advantages of simple implementation method, high event extraction efficiency and precision, good extraction performance and good portability. In order to solve the technical problems, the technical scheme provided by the invention is as follows: a machine reading understanding event extraction method based on template bridging comprises the following steps: S01, generating a trigger word problem, namely acquiring an input text and a trigger word problem prompting template, and combining to form an input instance with the trigger word problem prompting template; S02, event detection, namely carrying out grammar analysis on an input instance with a trigger word prompting problem to form an adjacency graph for describing the relation between words in the input instance, carrying out connection operation on an input text and a trigger word problem prompting template according to the adjacency graph to obtain a link graph, bridging the problem with a context, reconstructing the relation between the problem and the text, and extracting global features from the input instance according to the link graph; S03, generating an argument problem prompt template according to the identified trigger word and the trigger word type, and combining the argument problem prompt templa