A prompt-based event argument extraction method and system

By combining entity recognition and event argument extraction models, identifying and correcting event argument roles, the generated prompt recording event argument information is solved, and the problem of insufficient efficiency and accuracy of event argument extraction in the existing technology is realized. Efficient and accurate identification of the element.

CN114880431BActive Publication Date: 2024-11-19NAT UNIV OF DEFENSE TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210505997.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-10
Publication Date
2024-11-19
Estimated Expiration
2042-05-10

AI Technical Summary

Technical Problem

The existing event argument extraction method based on propt cannot meet the efficiency and accuracy requirements of event argument extraction at the same time.

Method used

By inputting the original text into the entity recognition model that was pre-trained, and inputting it into the event argument extraction model that was pre-trained by Prompts, identifying the event argument role type and correcting it, the generated prompt can At the same time, the trigger word information, event type information, event multiple argument information, and event multiple argument role information are recorded.

Benefits of technology

It realizes accurate identification of multiple roles of event arguments, meeting the efficiency and accuracy requirements of event argument extraction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114880431B_ABST
    Figure CN114880431B_ABST
Patent Text Reader

Abstract

The present invention discloses a prompt-based event argument extraction method and system, the method comprising: inputting the original text into a pre-trained entity recognition model, identifying all entities in the original text and the start and end positions of the entities in the original text; inputting the original text into the event argument extraction model pre-trained by prompts, identifying the argument role type to which each entity in the original text belongs; and correcting the argument span of the argument role based on the argument role type to which each entity in the original text belongs. When the present invention extracts event arguments, the generated prompt can simultaneously record trigger word information, event type information, event multiple argument information, and event multiple argument role information, thereby meeting the accurate identification requirements of event argument multiple roles.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of event argument extraction, and in particular to a prompt-based event argument extraction method and system. Background Art

[0002] With the rapid development of the Internet and a large number of applications, a massive amount of unstructured text data has been generated. If these scattered and diverse document information can be extracted and stored in a standardized structure, the significance will be very significant. For applications in the military, commercial, medical and other fields, obtaining useful information from the massive information in the corresponding fields can help users learn the development trend of similar events from the evolution process of historical events and help users take corresponding measures in time. Human search is the traditional way of information collection, such as consulting a large amount of multimodal data through a professional team, and obtaining the development context of a certain event through the collection and organization of information. However, in the era of information explosion, how to accurately and real-time perceive the development trend of the target event to assist in reasoning and decision-making in emergency events is an urgent problem to be solved in event extraction.

[0003] Event extraction is an information extraction technology that can extract information of interest to users from unstructured information and present it in a structured form. It can help users to timely understand what people (things), why, what methods, when, where, and what they did, so that users can predict subsequent events and their possible impacts based on the development of similar events, and take corresponding measures accordingly. Event extraction requires extracting trigger words and corresponding arguments from the text and completing four tasks: event trigger word detection, event trigger word classification, event argument recognition, and event argument role classification. Event trigger word detection is to detect the words in the text that trigger the occurrence of an event, event type classification is to determine which event type the event triggered by the current trigger word belongs to, event argument recognition is to identify whether the words (entities, values, time, etc.) in the text are involved in the occurrence of the event, and event argument role classification is to determine the specific role played by the event argument in the event (time, place, attacker, attacked, etc.). However, most event extraction methods regard event extraction as a two-stage problem, including event detection and event argument extraction. Event detection includes event trigger word detection and event trigger word classification, and event argument extraction includes event argument recognition and event argument role classification. Current event extraction technologies focus on event detection tasks, while research on event argument extraction tasks is relatively limited. Because the event type is only a general description of the event that occurred, it cannot fully reflect the full picture of what happened. The semantics of the event type must be supplemented by event arguments. Therefore, the importance of event argument extraction in event extraction can be seen.

[0004] The existing prompt-based event argument extraction methods cannot simultaneously meet the requirements of efficiency and accuracy of event argument extraction. Summary of the invention

[0005] In view of this, the present invention provides a prompt-based event argument extraction method and system, and the generated prompt can simultaneously record trigger word information, event type information, event multiple argument information, and event multiple argument role information, thereby meeting the needs of accurate identification of multiple roles of event arguments.

[0006] The present invention provides a prompt-based event argument extraction method, comprising:

[0007] Inputting the original text into a pre-trained entity recognition model to identify all entities in the original text and the start and end positions of the entities in the original text;

[0008] Input the original text into an event argument extraction model pre-trained by Prompts to identify the argument role type to which each entity in the original text belongs;

[0009] Based on the argument role type to which each entity in the original text belongs, the argument span of the argument role is corrected.

[0010] Preferably, the original text is input into a pre-trained entity recognition model to identify all entities in the original text and the start and end positions of the entities in the original text, including:

[0011] The original text X of length n is n} is input into the BERT of the pre-trained entity recognition model to obtain the word vector W = {w1,w2,...,w n};

[0012] The word vector W = {w1, w2, ..., w n} is input into the feedforward neural network layer of the pre-trained entity recognition model, using p i =FFN(w i ) Calculate the probability vector P = {p1, p2, ..., p n};

[0013] The probability vector P = {p1, p2, ..., p n} Input to the conditional random field of the pre-trained entity recognition model, according to the scoring formula Calculate the scores of the input sequence mapped to all possible output entity label sequences, and then maximize the formula Get the optimal label sequence Y' of the input sequence, where y i , t i Respectively represent x i Mapped to label t i The unnormalized probability of Indicates that from t i Transfer to i+1 The transfer score of A is obtained and updated during the CRF training process, and T is the set of all possible labeled paths.

[0014] The optimal label sequence Y' and the input sequence X of the original text are combined to obtain the entities and entity span information existing in the input sequence.

[0015] Preferably, the step of inputting the original text into an event argument extraction model pre-trained by Prompts to identify the argument role type to which each entity in the original text belongs includes:

[0016] The original text of length n, the trigger words contained in the original text, the event type triggered by the trigger words, and the k time argument role types involved in the event type are concatenated as input data I = [{arguementrole1,arguementrole2,...,arguementrole k}, {trigger, event-subevent}, {x1,x2,...,x n}];

[0017] The input data I is input into the event argument extraction model pre-trained by Prompts to obtain the word vectors W'={w'1,w'2,...,w' n};

[0018] The word vector W' is input into the role type tagger to calculate the event argument role sequence vector matrix M in the original text. k×n .

[0019] Preferably, the correcting the argument span of the argument role based on the argument role type to which each entity in the original text belongs includes:

[0020] According to the event argument role sequence vector matrix M in the original text k×n The value in determines which span range’s token is the event argument;

[0021] Compare the judged event argument span1 with the entity span2 information;

[0022] If the event argument span1 is the same as the corresponding entity span2, then the event argument span is span1;

[0023] If the event argument span1 is different from the corresponding entity span2, and the scope of span1 is within span2, then the event argument span is span2;

[0024] If the token corresponding to the event argument span1 is not an entity, the event argument is judged incorrectly.

[0025] Preferably, the pre-trained entity recognition model includes:

[0026] The original text X of length n is n} is input into the BERT entity recognition model to obtain the word vector W = {w1,w2,...,w n};

[0027] The word vector W = {w1, w2, ..., w n} is input into the feedforward neural network layer of the entity recognition model, using p i =FFN(w i ) Calculate the probability vector P = {p1, p2, ..., p n};

[0028] The probability vector P = {p1, p2, ..., p n}The conditional random field input to the entity recognition model is based on the scoring formula Calculate the scores of the input sequence mapped to all possible output entity label sequences, and then maximize the formula Get the optimal label sequence Y' of the input sequence, where y i , t i Respectively represent x i Mapped to label t i The unnormalized probability of Indicates that from t i Transfer to i+1 The transfer score of A is obtained and updated during the CRF training process, and T is the set of all possible labeled paths.

[0029] Determine whether the optimal label sequence Y' is consistent with the real entity sequence Y. If not, repeat the above process until the optimal label sequence Y' is consistent with the real entity sequence Y to complete the entity recognition model training.

[0030] Preferably, the event argument extraction model is pre-trained by Prompts, including:

[0031] The original text of length n, the trigger words contained in the original text, the event type triggered by the trigger words, and the k time argument role types involved in the event type are concatenated as input data I = [{arguementrole1,arguementrole2,...,arguementrole k}, {trigger, event-subevent}, {x1,x2,...,x n}];

[0032] Initialize the Prompts parameter;

[0033] Input the input data I into the event argument extraction model to obtain the word vector W'={w'1,w'2,...,w' n};

[0034] The word vector W' is input into the role type marker to calculate the vector matrix M k×n ', determine the vector matrix M k×n ' and the event argument role sequence vector matrix M in the original text k×n If they are not consistent, repeat the above process until the calculated M k×n 'With M k×n When the event is consistent, the event argument extraction model training is completed.

[0035] A prompt-based event argument extraction system, including:

[0036] An entity recognition module is used to input the original text into a pre-trained entity recognition model to identify all entities in the original text and the start and end positions of the entities in the original text;

[0037] An entity role classification module is used to input the original text into an event argument extraction model pre-trained by Prompts to identify the argument role type to which each entity in the original text belongs;

[0038] The argument role decision module is used to correct the argument span of the argument role based on the argument role type to which each entity in the original text belongs.

[0039] Preferably, the entity identification module is specifically used for:

[0040] The original text X of length n is n} is input into the BERT of the pre-trained entity recognition model to obtain the word vector W = {w1,w2,...,w n};

[0041] The word vector W = {w1, w2, ..., w n} is input into the feedforward neural network layer of the pre-trained entity recognition model, using p i =FFN(w i ) Calculate the probability vector P = {p1, p2, ..., p n};

[0042] The probability vector P = {p1, p2, ..., p n} Input to the conditional random field of the pre-trained entity recognition model, according to the scoring formula Calculate the scores of the input sequence mapped to all possible output entity label sequences, and then maximize the formula Get the optimal label sequence Y' of the input sequence, where y i , t i Respectively represent x i Mapped to label t i The unnormalized probability of Indicates that from t i Transfer to i+1 The transfer score of A is obtained and updated during the CRF training process, and T is the set of all possible labeled paths.

[0043] The optimal label sequence Y' and the input sequence X of the original text are combined to obtain the entities and entity span information existing in the input sequence.

[0044] Preferably, the entity role classification module is specifically used for:

[0045] The original text of length n, the trigger words contained in the original text, the event type triggered by the trigger words, and the k time argument role types involved in the event type are concatenated as input data I = [{arguementrole1,arguementrole2,...,arguementrolek}, {trigger, event-subevent}, {x1,x2,...,x n}];

[0046] The input data I is input into the event argument extraction model pre-trained by Prompts to obtain the word vectors W'={w'1,w'2,...,w' n};

[0047] The word vector W' is input into the role type tagger to calculate the event argument role sequence vector matrix M in the original text. k×n .

[0048] Preferably, the argument role decision module is specifically used for:

[0049] According to the event argument role sequence vector matrix M in the original text k×n The value in determines which span range’s token is the event argument;

[0050] Compare the judged event argument span1 with the entity span2 information;

[0051] If the event argument span1 is the same as the corresponding entity span2, then the event argument span is span1;

[0052] If the event argument span1 is different from the corresponding entity span2, and the scope of span1 is within span2, then the event argument span is span2;

[0053] If the token corresponding to the event argument span1 is not an entity, the event argument is judged incorrectly.

[0054] Preferably, the system further comprises an entity recognition model training module, which is specifically used for:

[0055] The original text X of length n is n} is input into the BERT entity recognition model to obtain the word vector W = {w1,w2,...,w n};

[0056] The word vector W = {w1, w2, ..., w n} is input into the feedforward neural network layer of the entity recognition model, using p i =FFN(w i) Calculate the probability vector P = {p1, p2, ..., p n};

[0057] The probability vector P = {p1, p2, ..., p n}The conditional random field input to the entity recognition model is based on the scoring formula Calculate the scores of the input sequence mapped to all possible output entity label sequences, and then maximize the formula Get the optimal label sequence Y' of the input sequence, where y i , t i Respectively represent x i Mapped to label t i The unnormalized probability of Indicates that from t i Transfer to i+1 The transfer score of A is obtained and updated during the CRF training process, and T is the set of all possible labeled paths.

[0058] Determine whether the optimal label sequence Y' is consistent with the real entity sequence Y. If not, repeat the above process until the optimal label sequence Y' is consistent with the real entity sequence Y to complete the entity recognition model training.

[0059] Preferably, the system further comprises an event argument extraction model training module, which is specifically used for:

[0060] The original text of length n, the trigger words contained in the original text, the event type triggered by the trigger words, and the k time argument role types involved in the event type are concatenated as input data I = [{arguementrole1,arguementrole2,...,arguementrole k}, {trigger, event-subevent}, {x1,x2,...,x n}];

[0061] Initialize the Prompts parameter;

[0062] Input the input data I into the event argument extraction model to obtain the word vector W'={w'1,w'2,...,w' n};

[0063] The word vector W' is input into the role type marker to calculate the vector matrix M k×n ', determine the vector matrix M k×n' and the event argument role sequence vector matrix M in the original text k×n If they are not consistent, repeat the above process until the calculated M k×n 'With M k×n When the event is consistent, the event argument extraction model training is completed.

[0064] In summary, the present invention discloses a prompt-based event argument extraction method, firstly, the original text is input into a pre-trained entity recognition model, and all entities in the original text and the start and end positions of the entities in the original text are identified; then the original text is input into the event argument extraction model pre-trained by prompts, and the argument role type to which each entity in the original text belongs is identified; based on the argument role type to which each entity in the original text belongs, the argument span of the argument role is corrected. When the present invention extracts event arguments, the generated prompts can simultaneously record trigger word information, event type information, event multiple argument information, and event multiple argument role information, thereby meeting the accurate identification requirements of event argument multiple roles. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0066] Figure 1 It is a flowchart of an embodiment of a prompt-based event argument extraction method disclosed in the present invention;

[0067] Figure 2 A schematic diagram of an entity recognition model disclosed in the present invention;

[0068] Figure 3 It is a schematic diagram of the event argument extraction model disclosed in the present invention;

[0069] Figure 4 The present invention discloses a schematic diagram of the structure of a prompt-based event argument extraction system embodiment. DETAILED DESCRIPTION

[0070] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0071] When it is necessary to extract event arguments based on prompts, the model can be trained in advance, where the model training stage includes training the entity recognition model and training the event argument extraction model through prompts.

[0072] Among them, the entity recognition model training is to transform the original text X = {x1, x2, ..., x n} is input into the entity recognition model, and the real entity sequence Y of the original text is used as a label to train the entity recognition model, so that the trained entity recognition model can eventually output the same result as Y. The schematic diagram of the entity recognition model is as follows Figure 2 shown.

[0073] Specifically, the following steps may be included when training the entity recognition model:

[0074] Step 1: Substitute the original text X of length n into {x1,x2,...,x n} is input into the BERT (Bidirectional Encoder Representation from Transformers) of the entity recognition model to obtain the word vector W = {w1,w2,...,w n};

[0075] Step 2: Transform the word vector W into {w1,w2,...,w n} is input into the feed-forward neural network (FFN) layer of the entity recognition model, using p i =FFN(w i ) Calculate the probability vector P = {p1, p2, ..., p n};

[0076] Step 3: Substitute the probability vector P = {p1, p2, ..., p n} Input to the Conditional Random Field (CRF) of the entity recognition model, according to the scoring formula Calculate the scores of the input sequence mapped to all possible output entity label sequences, and then maximize the formula Get the optimal label sequence Y' of the input sequence, where y i , t i Respectively represent x i Mapped to label t i The unnormalized probability of Indicates that from t i Transfer to i+1 The transfer score of A is obtained and updated during the CRF training process, and T is the set of all possible labeled paths.

[0077] Step 4: Determine whether the optimal label sequence Y' is consistent with the real entity sequence Y. If not, repeat the above process until the optimal label sequence Y' is consistent with the real entity sequence Y to complete the entity recognition model training.

[0078] The prompt training phase of the event argument extraction model is to input the preprocessed text into the event argument extraction model and convert the event argument role sequence vector matrix M in the original text into k×n As labels, the model is trained so that the prompts generated during the training process contain information such as event arguments and event argument roles related to the specified trigger words and event types, and can finally output k×n Exactly the same result.

[0079] Specifically, the prompt training phase of the event argument extraction model includes the following steps:

[0080] Step 1: concatenate the original text of length n, the trigger words contained in the original text, the event type triggered by the trigger words, and the k time argument role types involved in the event type as input data I = [{arguementrole1,arguementrole2,...,arguementrole k}, {trigger, event-subevent}, {x1,x2,...,x n}];

[0081] Step 2: Initialize the Prompts parameter;

[0082] Step 3: Input the input data I into the event argument extraction model to obtain the word vector W'={w'1,w'2,...,w' n};

[0083] Step 4: Input the word vector W' into the role type tagger to calculate the vector matrix M k×n ', judgment vector matrix Mk×n ' and the event argument role sequence vector matrix M in the original text k×n If they are not consistent, repeat the above process until the calculated M k×n 'With M k×n When the event is consistent, the event argument extraction model training is completed.

[0084] After the training of the entity recognition model and the training of the event argument extraction model through Prompts are completed, the event arguments can be extracted based on the trained entity recognition model and the event argument extraction model trained through Prompts.

[0085] like Figure 1 FIG. 1 is a flowchart of a prompt-based event argument extraction method disclosed in an embodiment of the present invention. The method may include the following steps:

[0086] S101, inputting the original text into a pre-trained entity recognition model to identify all entities in the original text and the start and end positions of the entities in the original text;

[0087] The entity recognition stage is to recognize the input text X = {x1, x2, ..., x n} and their spans, where span refers to the starting and ending positions of the entity in the text. The specific steps include:

[0088] Step 1: Substitute the original text X of length n into {x1,x2,...,x n} is input into the BERT of the pre-trained entity recognition model to obtain the word vector W = {w1,w2,...,w n};

[0089] Step 2: Transform the word vector W into {w1,w2,...,w n} is input into the feedforward neural network layer of the pre-trained entity recognition model, using p i =FFN(w i ) Calculate the probability vector P = {p1, p2, ..., p n};

[0090] Step 3: Substitute the probability vector P = {p1, p2, ..., p n} Input to the conditional random field of the pre-trained entity recognition model, according to the scoring formula Calculate the scores of the input sequence mapped to all possible output entity label sequences, and then maximize the formula Get the optimal label sequence Y' of the input sequence, where y i , t i Respectively represent x i Mapped to label t i The unnormalized probability of Indicates that from t i Transfer to i+1 The transfer score of A is obtained and updated during the CRF training process, and T is the set of all possible labeled paths.

[0091] Step 4: Combine the optimal label sequence Y' and the input sequence X of the original text to obtain the entities and entity span information existing in the input sequence.

[0092] S102, inputting the original text into the event argument extraction model pre-trained by Prompts, and identifying the argument role type to which each entity in the original text belongs;

[0093] Entity role classification is to identify the input text X = {x1, x2, ..., x n} to which each entity belongs. The specific steps include:

[0094] Step 1: concatenate the original text of length n, the trigger words contained in the original text, the event type triggered by the trigger words, and the k time argument role types involved in the event type as input data I = [{arguementrole1,arguementrole2,...,arguementrole k}, {trigger, event-subevent}, {x1,x2,...,x n}];

[0095] Step 2: Input the input data I into the event argument extraction model pre-trained by Prompts to obtain the word vectors W'={w'1,w'2,...,w' n};

[0096] Step 3: Input the word vector W' into the role type tagger to calculate a real vector matrix M k×n .

[0097] S103. Based on the argument role type to which each entity in the original text belongs, correct the argument span of the argument role.

[0098] The argument role decision stage is to correct the argument span of the argument role obtained in the entity role classification stage. Specifically, it includes:

[0099] According to the real vector matrix M k×n The value in is used to determine which span range’s token is the event argument; the determined event argument span1 is compared with the entity span2 information; if the event argument span1 is the same as the corresponding entity span2, the event argument span is span1; if the event argument span1 is different from the corresponding entity span2, and the scope of span1 is within span2, the event argument span is span2; if the token corresponding to the event argument span1 is not an entity, the event argument is incorrectly determined.

[0100] like Figure 4 FIG. 1 is a schematic diagram of a prompt-based event argument extraction system disclosed in an embodiment of the present invention. The system may include:

[0101] The entity recognition module 401 is used to input the original text into a pre-trained entity recognition model to recognize all entities in the original text and the start and end positions of the entities in the original text;

[0102] The entity recognition stage is to recognize the input text X = {x1, x2, ..., x n} and their spans, where span refers to the starting and ending positions of the entity in the text. The specific steps include:

[0103] Step 1: Substitute the original text X of length n into {x1,x2,...,x n} is input into the BERT of the pre-trained entity recognition model to obtain the word vector W = {w1,w2,...,w n};

[0104] Step 2: Transform the word vector W into {w1,w2,...,w n} is input into the feedforward neural network layer of the pre-trained entity recognition model, using p i =FFN(w i ) Calculate the probability vector P = {p1, p2, ..., p n};

[0105] Step 3: Substitute the probability vector P = {p1, p2, ..., p n} Input to the conditional random field of the pre-trained entity recognition model, according to the scoring formula Calculate the scores of the input sequence mapped to all possible output entity label sequences, and then maximize the formula Get the optimal label sequence Y' of the input sequence, where y i , t i Respectively represent x i Mapped to label t i The unnormalized probability of Indicates that from t i Transfer to i+1 The transfer score of A is obtained and updated during the CRF training process, and T is the set of all possible labeled paths.

[0106] Step 4: Combine the optimal label sequence Y' and the input sequence X of the original text to obtain the entities and entity span information existing in the input sequence.

[0107] The entity role classification module 402 is used to input the original text into the event argument extraction model pre-trained by Prompts to identify the argument role type of each entity in the original text;

[0108] Entity role classification is to identify the input text X = {x1, x2, ..., x n} to which each entity belongs. The specific steps include:

[0109] Step 1: concatenate the original text of length n, the trigger words contained in the original text, the event type triggered by the trigger words, and the k time argument role types involved in the event type as input data I = [{arguementrole1,arguementrole2,...,arguementrole k}, {trigger, event-subevent}, {x1,x2,...,x n}];

[0110] Step 2: Input the input data I into the event argument extraction model pre-trained by Prompts to obtain the word vectors W'={w'1,w'2,...,w' n};

[0111] Step 3: Input the word vector W' into the role type tagger to calculate a real vector matrix M k×n .

[0112] The argument role decision module 403 is used to correct the argument span of the argument role based on the argument role type to which each entity in the original text belongs.

[0113] The argument role decision stage is to correct the argument span of the argument role obtained in the entity role classification stage. Specifically, it includes:

[0114] According to the real vector matrix M k×n The value in is used to determine which span range’s token is the event argument; the determined event argument span1 is compared with the entity span2 information; if the event argument span1 is the same as the corresponding entity span2, the event argument span is span1; if the event argument span1 is different from the corresponding entity span2, and the scope of span1 is within span2, the event argument span is span2; if the token corresponding to the event argument span1 is not an entity, the event argument is incorrectly determined.

[0115] In summary, when extracting event arguments, the present invention generates prompts that can simultaneously record trigger word information, event type information, event multiple argument information, and event multiple argument role information, thereby meeting the need for accurate identification of event argument multiple roles.

[0116] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0117] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0118] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0119] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A prompt-based event argument extraction method, It is characterized in that include: Inputting the original text into a pre-trained entity recognition model to identify all entities in the original text and the start and end positions of the entities in the original text; Input the original text into an event argument extraction model pre-trained by Prompts to identify the argument role type to which each entity in the original text belongs; Based on the argument role type to which each entity in the original text belongs, correcting the argument span of the argument role; The original text is input into a pre-trained entity recognition model to identify all entities in the original text and the start and end positions of the entities in the original text, including: The original text X of length n is 1 ,x 2 ,...,x n } is input into the BERT of the pre-trained entity recognition model to obtain the word vector W = {w 1 ,w 2 ,...,w n }; The word vector W = {w 1 ,w 2 ,...,w n } is input into the feedforward neural network layer of the pre-trained entity recognition model, using p i =FFN(w i ) Calculate the probability vector P = {p 1 ,p 2 ,...,p n }; The probability vector P = {p 1 ,p 2 ,...,p n } Input to the conditional random field of the pre-trained entity recognition model, according to the scoring formula Calculate the scores of the input sequence mapped to all possible output entity label sequences, and then maximize the formula Get the optimal label sequence Y' of the input sequence, where y i , t i Respectively represent x i Mapped to label t i The unnormalized probability of Indicates that from t i Transfer to i+1 The transfer score of A is obtained and updated during the CRF training process, and T is the set of all possible labeled paths. The optimal label sequence Y' and the input sequence X of the original text are combined to obtain the entities and entity span information existing in the input sequence.

2. The method according to claim 1, It is characterized in that The inputting the original text into the event argument extraction model pre-trained by Prompts to identify the argument role type to which each entity in the original text belongs includes: The original text of length n, the trigger words contained in the original text, the event type triggered by the trigger words, and the k time argument role types involved in the event type are concatenated as input data I = [{arguementrole 1 ,arguement role 2 ,...,arguement role k }, {trigger, event-subevent}, {x 1 ,x 2 ,...,x n }]; The input data I is input into the event argument extraction model pre-trained by Prompts to obtain the word vectors W'={w' 1 ,w' 2 ,...,w' n }; The word vector W' is input into the role type tagger to calculate the event argument role sequence vector matrix M in the original text. k×n .

3. The method according to claim 2, It is characterized in that The correcting the argument span of the argument role based on the argument role type to which each entity in the original text belongs includes: According to the event argument role sequence vector matrix M in the original text k×n The value in determines which span range’s token is the event argument; The event argument span obtained by judgment 1 With entity span 2 Compare information; If the event argument span 1 And the corresponding entity span 2 The same, then the event argument span is span 1 ; If the event argument span 1 And the corresponding entity span 2 Not the same, and span 1 The range is in span 2 Internally, the event argument span is span 2 ; If the event argument span 1 If the corresponding token is not an entity, the event argument is incorrectly judged.

4. The method according to claim 3, It is characterized in that Pre-trained entity recognition models include: The original text X of length n is 1 ,x 2 ,...,x n } is input into the BERT entity recognition model to obtain the word vector W = {w 1 ,w 2 ,...,w n }; The word vector W = {w 1 ,w 2 ,...,w n } is input into the feedforward neural network layer of the entity recognition model, using p i =FFN(w i ) Calculate the probability vector P = {p 1 ,p 2 ,...,p n }; The probability vector P = {p 1 ,p 2 ,...,p n }The conditional random field input to the entity recognition model is based on the scoring formula Calculate the scores of the input sequence mapped to all possible output entity label sequences, and then maximize the formula Get the optimal label sequence Y' of the input sequence, where y i , t i Respectively represent x i Mapped to label t i The unnormalized probability of Indicates that from t i Transfer to i+1 The transfer score of A is obtained and updated during the CRF training process, and T is the set of all possible labeled paths. Determine whether the optimal label sequence Y' is consistent with the real entity sequence Y. If not, repeat the above process until the optimal label sequence Y' is consistent with the real entity sequence Y to complete the entity recognition model training.

5. The method according to claim 4, It is characterized in that Pre-train the event argument extraction model through Prompts, including: The original text of length n, the trigger words contained in the original text, the event type triggered by the trigger words, and the k time argument role types involved in the event type are concatenated as input data I = [{arguementrole 1 ,arguement role 2 ,...,arguement role k }, {trigger, event-subevent}, {x 1 ,x 2 ,...,x n }]; Initialize the Prompts parameter; Input the input data I into the event argument extraction model to obtain the word vector W'={w' 1 ,w' 2 ,...,w' n }; The word vector W' is input into the role type marker to calculate the vector matrix M k×n ', determine the vector matrix M k×n ' and the event argument role sequence vector matrix M in the original text k×n If they are not consistent, repeat the above process until the calculated M k×n 'With M k×n When the event is consistent, the event argument extraction model training is completed.

6. A prompt-based event argument extraction system, It is characterized in that include: An entity recognition module is used to input the original text into a pre-trained entity recognition model to identify all entities in the original text and the start and end positions of the entities in the original text; An entity role classification module is used to input the original text into an event argument extraction model pre-trained by Prompts to identify the argument role type to which each entity in the original text belongs; An argument role decision module, used for correcting the argument span of the argument role based on the argument role type to which each entity in the original text belongs; The entity recognition module is specifically used for: The original text X of length n is 1 ,x 2 ,...,x n } is input into the BERT of the pre-trained entity recognition model to obtain the word vector W = {w 1 ,w 2 ,...,w n }; The word vector W = {w 1 ,w 2 ,...,w n } is input into the feedforward neural network layer of the pre-trained entity recognition model, using p i =FFN(w i ) Calculate the probability vector P = {p 1 ,p 2 ,...,p n }; The probability vector P = {p 1 ,p 2 ,...,p n } Input to the conditional random field of the pre-trained entity recognition model, according to the scoring formula Calculate the scores of the input sequence mapped to all possible output entity label sequences, and then maximize the formula Get the optimal label sequence Y' of the input sequence, where y i , t i Respectively represent x i Mapped to label t i The unnormalized probability of Indicates that from t i Transfer to i+1 The transfer score of A is obtained and updated during the CRF training process, and T is the set of all possible labeled paths. The optimal label sequence Y' and the input sequence X of the original text are combined to obtain the entities and entity span information existing in the input sequence.

7. The system according to claim 6, It is characterized in that The entity role classification module is specifically used for: The original text of length n, the trigger words contained in the original text, the event type triggered by the trigger words, and the k time argument role types involved in the event type are concatenated as input data I = [{arguementrole 1 ,arguement role 2 ,...,arguement role k }, {trigger, event-subevent}, {x 1 ,x 2 ,...,x n }]; The input data I is input into the event argument extraction model pre-trained by Prompts to obtain the word vectors W'={w' 1 ,w' 2 ,...,w' n }; The word vector W' is input into the role type tagger to calculate the event argument role sequence vector matrix M in the original text. k×n .

8. The system according to claim 7, It is characterized in that The argument role decision module is specifically used for: According to the event argument role sequence vector matrix M in the original text k×n The value in determines which span range’s token is the event argument; The event argument span obtained by judgment 1 With entity span 2 Compare information; If the event argument span 1 And the corresponding entity span 2 The same, then the event argument span is span 1 ; If the event argument span 1 And the corresponding entity span 2 Not the same, and span 1 The range is in span 2 Internally, the event argument span is span 2 ; If the event argument span 1 If the corresponding token is not an entity, the event argument is incorrectly judged.

9. The system according to claim 8, It is characterized in that It also includes an entity recognition model training module, which is specifically used for: The original text X of length n is 1 ,x 2 ,...,x n } is input into the BERT entity recognition model to obtain the word vector W = {w 1 ,w 2 ,...,w n }; The word vector W = {w 1 ,w 2 ,...,w n } is input into the feedforward neural network layer of the entity recognition model, using p i =FFN(w i ) Calculate the probability vector P = {p 1 ,p 2 ,...,p n }; The probability vector P = {p 1 ,p 2 ,...,p n }The conditional random field input to the entity recognition model is based on the scoring formula Calculate the scores of the input sequence mapped to all possible output entity label sequences, and then maximize the formula Get the optimal label sequence Y' of the input sequence, where y i , t i Respectively represent x i Mapped to label t i The unnormalized probability of Indicates that from t i Transfer to i+1 The transfer score of A is obtained and updated during the CRF training process, and T is the set of all possible labeled paths. Determine whether the optimal label sequence Y' is consistent with the real entity sequence Y. If not, repeat the above process until the optimal label sequence Y' is consistent with the real entity sequence Y to complete the entity recognition model training.

10. The system according to claim 9, It is characterized in that It also includes an event argument extraction model training module, which is specifically used for: The original text of length n, the trigger words contained in the original text, the event type triggered by the trigger words, and the k time argument role types involved in the event type are concatenated as input data I = [{arguementrole 1 ,arguement role 2 ,...,arguement role k }, {trigger, event-subevent}, {x 1 ,x 2 ,...,x n }]; Initialize the Prompts parameter; Input the input data I into the event argument extraction model to obtain the word vector W'={w' 1 ,w' 2 ,...,w' n }; The word vector W' is input into the role type marker to calculate the vector matrix M k×n ', determine the vector matrix M k×n ' and the event argument role sequence vector matrix M in the original text k×n If they are not consistent, repeat the above process until the calculated M k×n 'With M k×n When the event is consistent, the event argument extraction model training is completed.