Event argument extraction method and related equipment integrating entity type information

By fusing entity type information and composite encoders, and combining argument roles and entity type information, the problems of missing semantic dependencies and unclear boundaries in existing event argument extraction methods are solved, and the extraction efficiency and accuracy are improved.

CN117910473BActive Publication Date: 2024-10-29BEIJING UNIV OF POSTS & TELECOMM
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410312722.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-19
Publication Date
2024-10-29
Estimated Expiration
2044-03-19

AI Technical Summary

Technical Problem

Existing event argument extraction methods have problems such as missing semantic dependencies, unclear semantic boundaries, and fuzzy semantic understanding, and their efficiency is low.

Method used

An event argument extraction method that integrates entity type information is adopted. By inputting the text to be processed and the complete prompt template into the trained composite encoder, the argument role and entity type information are combined to determine the start and end positions of the argument, using classic coding. A composite encoder composed of a decoder and a non-autoregressive decoder, and processed through a cross-attention mechanism and a named entity recognition model.

Benefits of technology

It improves the efficiency and accuracy of argument extraction, clarifies semantic boundaries and understanding, and solves the problems of missing semantic dependencies and vague understanding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117910473B_ABST
    Figure CN117910473B_ABST
Patent Text Reader

Abstract

The present application provides an event argument extraction method and related equipment that integrate entity type information. The method comprises: inputting the text to be processed and the complete prompt template corresponding to the text to be processed into a trained composite encoder to obtain first text embedding information and template embedding information; the complete prompt template comprises an argument role label and an entity type label corresponding to each argument role label; based on the first text embedding information and a preset entity type label matrix, determining the entity type label of each word in the text to be processed, and obtaining second text embedding information; determining the argument role and entity type in the text to be processed based on the template embedding information, and determining the starting position and ending position of each argument in the text to be processed based on the argument role, the entity type and the second text embedding information. The present application can effectively improve the efficiency and accuracy of argument extraction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information technology, and in particular to an event argument extraction method integrating entity type information and related equipment. Background Art

[0002] Event argument extraction is the task of quickly identifying and extracting event-related argument information from text data. Event argument extraction is widely used in many fields such as financial forecasting and news reporting to help researchers and companies automatically extract event arguments from large-scale text data, so that they can quickly obtain the required key knowledge from massive information, providing a basis for decision-making, analysis and prediction of downstream tasks.

[0003] Previous event argument extraction methods determined the start and end positions of arguments one by one through questioning or machine reading comprehension. However, this extraction method is inefficient. Therefore, related technologies propose two types of improved extraction methods. The first type classifies each argument in the text into a preset category based on a classification model. The second type determines the probability that each argument in the text meets each argument role based on a generation model, and finally determines the category to which each argument belongs.

[0004] However, the above two methods still have problems such as missing semantic dependencies, unclear semantic boundaries and vague semantic understanding. Summary of the invention

[0005] In view of this, the purpose of this application is to solve the technical problems raised by the background technology and to propose an event argument extraction method and related equipment that integrates entity type information.

[0006] Based on the above purpose, the present application provides an event argument extraction method integrating entity type information, including:

[0007] Inputting the to-be-processed text and the complete prompt template corresponding to the to-be-processed text into the trained composite encoder to obtain first text embedding information and template embedding information; the complete prompt template includes an argument role label and an entity type label corresponding to each argument role label;

[0008] Based on the first text embedding information and a preset entity type label matrix, determine the entity type label of each word in the text to be processed, and obtain second text embedding information;

[0009] The argument roles and entity types in the text to be processed are determined based on the template embedding information, and the starting position and ending position of each argument in the text to be processed are determined based on the argument roles, the entity type and the second text embedding information.

[0010] Optionally, the composite encoder comprises a classical encoder and a non-autoregressive decoder.

[0011] Optionally, the training step of the composite encoder includes:

[0012] Get the training data set;

[0013] Determine all event types in the training data set, and set a prompt template corresponding to each event type; the prompt template includes an argument role label and an entity type label;

[0014] Establishing a dictionary of correspondence between the event type and the prompt template;

[0015] According to the event type of each instance in the training data set, the corresponding prompt template is indexed in the dictionary, and the event type label and trigger word information corresponding to the instance are added to the prompt template to obtain a complete prompt template;

[0016] The composite encoder is trained based on the training dataset and the complete prompt template.

[0017] Optionally, determining the entity type label of each word in the to-be-processed text based on the first text embedding information and a preset entity type label matrix, and obtaining the second text embedding information includes:

[0018] Inputting the first text embedding information and the preset entity type label matrix into a neural network model based on a cross attention mechanism to obtain third text embedding information;

[0019] Concatenating the third text embedding information and the first text embedding information to obtain fourth text embedding information;

[0020] Inputting the fourth text embedding information into a named entity recognition model based on joint learning and entity type to obtain sequence annotation label embedding information of the text to be processed; the sequence annotation label embedding information indicates an entity type label of each word in the text to be processed;

[0021] The sequence annotation tag embedding information is integrated into the first text embedding information to obtain the second text embedding information.

[0022] Optionally, determining the starting position and the ending position of each argument in the to-be-processed text based on the argument role, the entity type and the second text embedding information comprises:

[0023] Determine a first start position score distribution and a first end position score distribution of each argument role based on the second text embedding information;

[0024] Determining a second start position score distribution and a second end position score distribution for each entity type based on the second text embedding information;

[0025] Based on the first start position score distribution and the second start position score distribution, obtain a third start position score distribution for each argument in the text to be processed;

[0026] Based on the first end position score distribution and the second end position score distribution, obtain a third end position score distribution for each argument in the text to be processed;

[0027] The positions where the score of the third starting position and the score of the third ending position exceed a preset threshold are determined as the target starting position and the target ending position.

[0028] Optionally, determining the first start position score distribution and the first end position score distribution of each argument role based on the second text embedding information includes:

[0029] Based on the argument roles in the text to be processed, a span selector based on the argument roles is obtained; the span selector based on the argument roles is used to determine the starting position and the ending position of the argument in the text to be processed based on the argument roles;

[0030] Based on the argument role-based span selector and the second text embedding information, the first start position score distribution and the first end position score distribution are obtained.

[0031] Optionally, determining a second start position score distribution and a second end position score distribution of each entity type based on the second text embedding information includes:

[0032] Based on the entity type in the text to be processed, a span selector based on the entity type is obtained; the span selector based on the entity type is used to determine the starting position and the ending position of the argument in the text to be processed based on the entity type;

[0033] Based on the entity type-based span selector and the second text embedding information, the second start position score distribution and the second end position score distribution are obtained.

[0034] Based on the same inventive concept, one or more embodiments of the present application further provide an event argument extraction device integrating entity type information, including:

[0035] A first computing module is configured to input the to-be-processed text and the prompt template corresponding to the to-be-processed text into the trained composite encoder to obtain first text embedding information and template embedding information; the prompt template includes an argument role label and an entity type label corresponding to each argument role label;

[0036] A second calculation module is configured to determine the entity type label of each word in the text to be processed based on the first text embedding information and a preset entity type label matrix, and obtain second text embedding information;

[0037] The third computing module is configured to determine the argument role and entity type in the text to be processed based on the template embedding information, and determine the starting position and ending position of each argument in the text to be processed based on the argument role, the entity type and the second text embedding information.

[0038] Based on the same inventive concept, one or more embodiments of the present application also provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the event argument extraction method for fusion of entity type information as described in any one of the above items is implemented.

[0039] Based on the same inventive concept, one or more embodiments of the present application also provide a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable the computer to execute any of the above-mentioned event argument extraction methods for fusion of entity type information.

[0040] As can be seen from the above, the event argument extraction method for integrating entity type information provided by the present application is to obtain first text embedding information and template embedding information by inputting the text to be processed and the prompt template corresponding to the text to be processed into the trained composite encoder; the prompt template includes an argument role label and an entity type label corresponding to each argument role label; based on the first text embedding information and the preset entity type label matrix, the entity type label of each word in the text to be processed is determined, and the second text embedding information is obtained; based on the template embedding information, the argument role and entity type in the text to be processed are determined, and the starting position and ending position of each argument in the text to be processed are determined based on the argument role, the entity type and the second text embedding information. The method provided by the present application adds entity type to the recognition and extraction of arguments. That is, the present application is based on the argument role type and the entity type, combined with the classification model and the prompt template, to jointly determine the starting position and ending position of the argument. The present application can effectively improve the efficiency and accuracy of argument extraction.

[0041] The event argument extraction device, electronic device and computer-readable storage medium provided in the present application are all capable of implementing the steps of the event argument extraction method for fusing entity type information, and therefore also have the beneficial effects of the event argument extraction method for fusing entity type information. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions in the present application or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0043] Figure 1 A flowchart of an event argument extraction method integrating entity type information according to one or more embodiments of the present application;

[0044] Figure 2 A schematic diagram of the structure of an event argument extraction device integrating entity type information according to one or more embodiments of the present application;

[0045] Figure 3 A schematic diagram of the structure of an electronic device according to one or more embodiments of the present application. DETAILED DESCRIPTION

[0046] In order to make the objectives, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.

[0047] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should be the usual meanings understood by people with ordinary skills in the field to which the present application belongs. The "first", "second" and similar words used in the embodiments of the present application do not represent any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing in front of the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0048] As described in the background technology, the argument extraction methods of related technologies can be divided into two categories: the first category is based on the classification model, after extracting the arguments from the text, it combines the entity knowledge to predict the classification of the extracted arguments; the second category is based on the generation model, combined with the prompt template to prompt the entity knowledge related to the argument role. However, the first type of method does not take into account the relationship between different arguments, and there is a problem of missing semantic dependencies. Although the second type of method strengthens the semantic dependency between arguments, the lack of display rules that can determine the boundaries of arguments leads to the problem of unclear semantic boundaries. In addition, the prompt template in the related technology only introduces entity knowledge, but does not clearly describe the entity type, and there is a problem of vague semantic understanding.

[0049] Therefore, the present application proposes an event argument extraction method that integrates entity type information, breaks the end-to-end structure of the generative model, organically integrates the above two classification methods, and introduces entity type information to strengthen the prompt template. Finally, the start and end positions of the arguments are determined based on the two information of argument role and entity type to improve the efficiency and accuracy of position determination.

[0050] Before explaining the technical solution of the present application in detail, the following terms are first explained.

[0051] An event is a specific occurrence that occurs at a specific time and place and involves one or more participants. It can usually be described as a change in state. The event type is used to describe the category to which this specific event belongs. For example, "Zhang San hits Li Si with a stick" can be considered an event and classified into the event type "assault".

[0052] Trigger words refer to the core unit in event extraction, which are verbs or nouns. In the above example, "strike" is the trigger word.

[0053] Arguments are the main attributes of events. Argument roles refer to the roles played by arguments in events, that is, the relationship between arguments and trigger words. For example, "Zhang San", "Li Si" and "wooden stick" in the above example can all be considered arguments. Among them, the argument role of "Zhang San" is "attacker", the argument role of "Li Si" is "attacked", and the argument role of "wooden stick" is "attacking tool".

[0054] An entity is an object or a group of objects in a semantic category. Entity types include people, organizations, places, times, things, etc. In the above example, the entity types of "Zhang San" and "Li Si" are "people", and the entity type of "wooden stick" is "object".

[0055] The technical solutions of one or more embodiments of the present application are described in detail below through specific examples.

[0056] refer to Figure 1 The event argument extraction method integrating entity type information of one or more embodiments of the present application comprises the following steps:

[0057] Step S101: input the text to be processed and the prompt template corresponding to the text to be processed into the trained composite encoder to obtain first text embedding information and template embedding information; the prompt template includes an argument role label and an entity type label corresponding to each argument role label.

[0058] As mentioned above, the generative model in the related art is an end-to-end structure. This type of model can extract and output all arguments at once according to the predefined result splicing method. However, as the text to be processed grows and the number of arguments increases, the dependency between arguments weakens due to the long distance. This makes the model's understanding of the context semantics less accurate and the performance also decreases.

[0059] In order to obtain an argument extraction method with better performance, the applicant adjusted the original generative model and broke the end-to-end structure of the generative model to facilitate the processing of intermediate data.

[0060] Therefore, in some embodiments, the present application selects a classical encoder and a non-autoregressive decoder to constitute the composite encoder of the present application.

[0061] In some embodiments, the training steps of the above-mentioned composite encoder include: obtaining a training data set; determining all event types in the training data set, and setting a prompt template corresponding to each of the above-mentioned event types; the above-mentioned prompt template includes an argument role label and an entity type label; establishing a dictionary of the correspondence between the above-mentioned event types and the above-mentioned prompt templates; according to the event type of each instance in the above-mentioned training data set, indexing the corresponding prompt template in the above-mentioned dictionary, and adding the event type label and trigger word information corresponding to the instance to the above-mentioned prompt template to obtain a complete prompt template; training the composite encoder according to the above-mentioned training data set and the above-mentioned complete prompt template.

[0062] The training data set includes a plurality of training data, and trigger words and event types corresponding to the training data.

[0063] It should be noted that the complete prompt template in the above training step includes three types of information: event type, argument role, and entity type. The prompt template in the related art only includes information on event type and argument role. Even if entity knowledge is included, there is no clear entity type information. The entity type information of the template prompt in the related art either comes from a placeholder that uses one symbol to represent multiple entity types, or comes from a custom entity type description that is inconsistent with the entity annotation label. They fail to provide the accurate meaning of each argument, which brings about the problem of vague semantic understanding.

[0064] Therefore, the present application provides a set of entity type labels with clear meanings, and associates the above entity type labels with argument role labels.

[0065] It can be understood that the purpose of adding entity type information to the prompt template is to make the semantic relationship between the arguments clearer. That is, in the prompt template, not only the relationship between the arguments is declared, but also the relationship between the arguments and the entity type is declared. This method can solve the above semantic dependency problem.

[0066] In some embodiments, in the process of constructing the above complete prompt template, firstly, a dictionary of the correspondence between event type and argument role, and a dictionary of the relationship between argument role and entity type are established based on the above training data set; then a dictionary between event type and prompt template is established. Based on the above three types of dictionaries, the data in the training data set are indexed one by one, the prompt template corresponding to the event type of each data is determined, and the corresponding event type and trigger word information are added to the prompt template, and finally a complete prompt template is obtained.

[0067] Optionally, the information in the above complete prompt template can be connected using natural language. For example: in an injury event triggered by a beating, the attacker (person or organization) uses a tool (tool or weapon) at a location (position) to cause the victim (person). In this example, "beat" is the trigger word, "injury" is the event type, "attacker", "location", "tool" and "victim" are argument roles, and "person or organization", "location", "tool or weapon" and "person" are entity types.

[0068] The above-mentioned text to be processed is the text that needs to be extracted from arguments. When input into the composite encoder, it is input together with the corresponding complete prompt template. The complete prompt template at this time is determined during the composite encoder training phase. When the composite encoder is not trained for the event type corresponding to the input text, an error reminder will be issued.

[0069] Embedding means embedding a high-dimensional space with a dimension equal to the number of all words into a continuous vector space with a much lower dimension, and each word or phrase is mapped to a vector in the real number field. Step S101 obtains the text embedding information corresponding to the above-mentioned text to be processed and the template embedding information corresponding to the above-mentioned complete prompt template.

[0070] Step S102: Based on the first text embedding information and a preset entity type label matrix, determine the entity type label of each word in the text to be processed, and obtain second text embedding information.

[0071] In addition to optimizing the prompt template, this application also adds an entity type label matrix. The entity type label matrix is ​​obtained based on all entity types corresponding to the event type. That is, the elements in the entity type label matrix are entity type labels.

[0072] In some embodiments, the first text embedding information is processed by a neural network model based on a cross-attention mechanism.

[0073] When the first text embedding information is input into the neural network model, the entity type label matrix corresponding to the event type corresponding to the text to be processed is input simultaneously.

[0074] The neural network model outputs third text embedding information of all entity types corresponding to the perception based on the first text embedding information and the corresponding entity type label matrix.

[0075] In some embodiments, the third text embedding information is concatenated with the first text embedding information to obtain the input of the named entity recognition model.

[0076] That is, in some embodiments, after obtaining the third text embedding information, the method further includes: concatenating the third text embedding information with the first text embedding information to obtain the fourth text embedding information; and inputting the fourth text embedding information into the named entity recognition model to obtain the sequence annotation label embedding information of the text to be processed. The sequence annotation label embedding information indicates the entity type label of each word in the text to be processed.

[0077] Optionally, the named entity recognition model is trained based on a federated learning method. Federated learning refers to two things that happen repeatedly close in time, and eventually gradually form a connection in the brain. For example, classical conditioning and operant conditioning belong to this type of learning. Federated learning can improve model quality, reduce latency, and reduce power consumption while ensuring privacy.

[0078] Optionally, the above-mentioned named entity recognition model takes entity type information into consideration during training, so the named entity recognition model can also be trained based on entity type information.

[0079] The named entity recognition model can identify the boundaries and categories of each entity in the text to be processed. The named entity recognition model can solve the problem of unclear semantic boundaries based on the integration of entity type knowledge.

[0080] Finally, the above sequence annotation label embedding information is integrated into the above first text embedding information to obtain the above second text embedding information. It can be understood that the above second text embedding information not only perceives all entity type information, but also clarifies entity boundaries and categories.

[0081] Step S103: Determine the argument roles and entity types in the to-be-processed text based on the above template embedding information, and determine the start position and end position of each argument in the to-be-processed text based on the above argument roles, the above entity types, and the above second text embedding information.

[0082] In the process of implementing this application, in order to organically integrate entity type knowledge and argument role knowledge, the applicant constructs two types of span selectors to separately judge the start position and end position of an argument from the above two aspects, and then comprehensively considers the two judgment results to obtain the final result.

[0083] In this step, first determine the embedding of each argument role in the to-be-processed text and the embedding of the entity type description corresponding to the argument role based on the above template embedding information.

[0084] After that, two types of span selectors are established. The first type of span selector is constructed based on the argument role and includes and , which respectively represent the start position and end position of an argument determined based on the argument role. The start position and end position of the above argument can be understood as the position of the first character and the position of the last character among the multiple characters included in the argument. For example, in the argument "fresh flower cake", the position of the character "fresh" is the start position, and the position of the character "cake" is the end position.

[0085] The second type of span selector is constructed based on the entity type and includes and , which respectively represent the start position and end position of an argument determined based on the entity type.

[0086] It should be noted that each argument in the to-be-processed text will have four corresponding span selectors , , and , where represents the th argument.

[0087] Multiply the above four span selectors by the second text embedding information obtained in the above step S102, and the score distributions of the start position and end position of each argument marked as the th argument in the to-be-processed text can be obtained. The above marking refers to the smallest independent part in the to-be-processed text.

[0088] It should be noted that the above span selector does not directly obtain the determined position of an argument, that is, a token cannot be determined through the span selector, but the scores of the start position or end position of each token marked as an argument in the to-be-processed text are obtained.

[0089] It can be understood that the score distribution of each marked start position and the score distribution of the end position in the text to be processed can be obtained through the above span selector. Among them, the score distribution of the start position includes two types: based on the argument role and based on the entity type; the score distribution of the end position also includes two types: based on the argument role and based on the entity type.

[0090] Finally, the two score distributions of the starting position are multiplied to obtain the score distribution of the argument starting position under the constraints of the two span selectors. One or more positions whose scores exceed a preset threshold can be selected as the starting position of the argument extraction.

[0091] Similarly, the two score distributions of the end position are multiplied to obtain the score distribution of the argument end position under the constraints of the two span selectors. One or more positions where the score exceeds a preset threshold can be selected as the end position of the argument extraction.

[0092] Through the span selector, it is possible to determine the start and end positions of the arguments based on the argument role and entity type. Therefore, through this step, the problem of semantic understanding constraints is solved.

[0093] The concatenation and fusion method in this application refers to the operation of directly concatenating related contents in the last dimension of the vector and then reducing the dimension and activating it.

[0094] According to the above content, the event argument extraction method that integrates entity type information proposed in this application can enhance the semantics of model encoding from the root. Existing encoding models mainly use encoders for encoding, and the attention mechanism used to extract features is relatively simple. This application designs a composite encoder for encoding, which is composed of a classic encoder and a non-autoregressive decoder. Compared with the encoding method using an encoder, it has two more attention mechanisms for extracting different features: a masked self-attention mechanism and a cross self-attention mechanism. Compared with the decoding method using an autoregressive decoder that uses word-by-word reasoning, it reduces the accumulation of errors. At the same time, the practice of splicing the text and prompt template into the composite encoder can also achieve two-way attention of the two-part input, and finally obtain a more semantically rich encoding result.

[0095] In addition, the method proposed in this application can fully integrate entity type information from three aspects: semantic dependency supplementation, semantic boundary distinction and semantic understanding constraint, and correspondingly solve the problems of missing semantic dependency, unclear semantic boundaries and vague semantic understanding existing in the traditional event argument extraction model that introduces entity knowledge.

[0096] In summary, the present invention first constructs a composite encoder composed of a classic encoder and a non-autoregressive decoder to fundamentally enhance the semantic representation of the code. Then, the present invention uses the correspondence between the argument role and the entity type in the complete template to supplement the semantic dependency; distinguishes the semantic boundary through the named entity recognition model and the event argument extraction model; sets the argument role and entity type double span selector to constrain the semantic understanding. The present application achieves more accurate argument extraction by enriching the semantic representation and solving the problems of definite semantic dependency, unclear semantic boundary, and vague semantic understanding.

[0097] This application integrates and optimizes two types of methods in related technologies, introduces entity type knowledge to strengthen semantic dependence and solve the problem of unclear semantic boundaries. In addition, this application also creatively adds a method to determine the distribution of argument position scores through span selectors, strengthens semantic understanding constraints, and solves the problem of ambiguous semantic understanding.

[0098] In order to better understand the technical solution of the present application, a specific embodiment of the present application is used as an illustration below.

[0099] In this embodiment, the text to be processed is first input into a composite encoder consisting of a BART encoder and a non-autoregressive BART decoder for encoding to obtain text embedding information. and template embedding information Two parts of content.

[0100] After that, embed the above text into the message and the preset entity type label matrix Input the neural network model based on the cross-attention mechanism to obtain the text embedding information that perceives all entity types . Fusion of text embedding information and text embedded information , get text embedding information .in , and represents the learnable parameters, Is an activation function. Embedding text into information Input the named entity recognition model based on joint learning and entity type to obtain the predicted entity type label of each word in the text to be processed. The above predicted entity type labels can be concatenated to obtain the sequence annotation label. The above sequence annotation label is embedded in the information Integrate into contextual embeddings Among them, we can obtain text embedding information that perceives entity type information and boundaries .in, , and represents the learnable parameters, Represents the activation function.

[0101] Finally, embed information based on the above template and the above text embed information Determine the starting position and ending position of each argument. Specifically, it includes the following steps: embed information using the above template Get the argument role of each argument Embedded information and corresponding entity type description Embedding information; based on the above two types of information, span selectors are established respectively , , and ,in, , , , , Indicates the role of the argument Embedded information in the mold, Represents an entity type description Embedded information in the mold, and represents a learnable parameter shared by all argument roles, and Represents the learnable parameters shared by all entity type descriptions; the above four span selectors are respectively embedded with the above text information Multiply each token in the text to be processed as the score distribution of the start position and the end position of the argument span; multiply the two score distributions of the start position and the two score distributions of the end position to obtain the target start position score distribution and the target end position score distribution; filter the tokens whose scores in the target start position score distribution and the target end position score distribution exceed the preset threshold as the target start position and the target end position.

[0102] In this embodiment, the training of the composite encoder includes the following steps: obtaining English sentence-level event argument extraction datasets ACE2005 and ERE; analyzing the correspondence between event types and argument roles in the above datasets, such as the "injury" event contains the argument roles of "attacker, victim, tool and location", and according to the entity annotations contained in the dataset, the correspondence between argument roles and entity types is counted simultaneously, such as the "location" role corresponds to the "position" entity type, and a dictionary of corresponding event types-argument roles and argument roles-entity types is constructed; according to the event definition of the dataset (refer to the explanation in the dataset annotation manual), a prompt template for each event type is designed, and the template contains argument role labels and corresponding entity type labels, and event-related natural language connections are used, such as "the attacker (person or organization) uses tools (tools or weapons) at a location (position) to injure the victim (person)", and the template content includes argument roles and entity types, and the entity type is written in brackets, and a dictionary of event type index corresponding to the template is constructed; according to the event definition of the dataset (refer to the explanation in the dataset annotation manual), a prompt template for each event type is designed, and the template contains argument role labels and corresponding entity type labels, and event-related natural language connections are used, such as "the attacker (person or organization) uses tools (tools or weapons) at a location (position) to injure the victim (person)", and the template content includes argument roles and entity types, and the entity type is written in brackets, and a dictionary of event type index corresponding to the template is constructed; Event type for each instance , index the corresponding prompt argument role and entity type information template in the dictionary of the event type index corresponding template, then add the event type label information and trigger word information of the current instance, and connect them with expressions close to natural language, such as adding "in the injury event triggered by beating" in front of the original template to obtain a complete prompt template suitable for the current instance ; Splice Instances of text And the corresponding prompt template , and train the composite encoder.

[0103] It should be noted that the method of the embodiment of the present application can be performed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present application, and the multiple devices will interact with each other to complete the described method.

[0104] It should be noted that the above describes some embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0105] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides an event argument extraction device that integrates entity type information.

[0106] refer to Figure 2 , the event argument extraction device integrating entity type information comprises:

[0107] The first computing module 11 is configured to input the to-be-processed text and the prompt template corresponding to the to-be-processed text into the trained composite encoder to obtain first text embedding information and template embedding information; the prompt template includes an argument role label and an entity type label corresponding to each argument role label;

[0108] A second calculation module 12 is configured to determine the entity type label of each word in the text to be processed based on the first text embedding information and a preset entity type label matrix, and obtain second text embedding information;

[0109] The third computing module 13 is configured to determine the argument role and entity type in the text to be processed based on the template embedding information, and determine the starting position and ending position of each argument in the text to be processed based on the argument role, the entity type and the second text embedding information.

[0110] For the convenience of description, the above device is described in terms of functions divided into various modules. Of course, when implementing the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.

[0111] The device of the above embodiment is used to implement the event argument extraction method integrating entity type information corresponding to any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.

[0112] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the event argument extraction method for fusion of entity type information described in any of the above embodiments is implemented.

[0113] Figure 3 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.

[0114] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0115] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.

[0116] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.

[0117] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0118] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010 , the memory 1020 , the input / output interface 1030 , and the communication interface 1040 ).

[0119] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.

[0120] The electronic device of the above embodiment is used to implement the event argument extraction method of integrating entity type information corresponding to any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.

[0121] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the event argument extraction method for fusing entity type information as described in any of the above embodiments.

[0122] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.

[0123] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the event argument extraction method integrating entity type information as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0124] A person skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application (including the claims) is limited to these examples. In line with the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.

[0125] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present application difficult to understand, the known power / ground connections to the integrated circuit (IC) chip and other components may or may not be shown in the provided drawings. In addition, the device may be shown in the form of a block diagram to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform on which the embodiments of the present application are to be implemented (that is, these details should be fully within the scope of understanding of those skilled in the art). Where specific details (e.g., circuits) are set forth to describe exemplary embodiments of the present application, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details or with changes in these specific details. Therefore, these descriptions should be considered illustrative rather than restrictive.

[0126] Although the present application has been described in conjunction with specific embodiments of the present application, many alternatives, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the discussed embodiments.

[0127] The embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the scope of protection of the present application.

Claims

1. A method for extracting event arguments by integrating entity type information, characterized in that: include: Inputting the text to be processed and the complete prompt template corresponding to the event type of the text to be processed into the trained composite encoder to obtain first text embedding information and template embedding information; The complete prompt template includes an argument role label and an entity type label corresponding to each argument role label, as well as the event type label and trigger word information; The complete prompt template declares the relationship between arguments and the relationship between each argument and the entity type; Based on the first text embedding information and a preset entity type label matrix, determine the entity type label of each word in the text to be processed, and obtain second text embedding information; Determine the argument role and entity type in the text to be processed based on the template embedding information, and determine the starting position and ending position of each argument in the text to be processed based on the argument role, the entity type and the second text embedding information; Wherein, determining the starting position and the ending position of each argument in the text to be processed based on the argument role, the entity type and the second text embedding information includes: Based on the argument roles in the text to be processed, a span selector based on the argument roles is obtained; the span selector based on the argument roles is used to determine the starting position and the ending position of the argument in the text to be processed based on the argument roles; Based on the argument role-based span selector and the second text embedding information, obtaining a first start position score distribution and a first end position score distribution; Based on the entity type in the text to be processed, a span selector based on the entity type is obtained; the span selector based on the entity type is used to determine the starting position and the ending position of the argument in the text to be processed based on the entity type; Based on the entity type-based span selector and the second text embedding information, obtaining a second start position score distribution and a second end position score distribution; Based on the first start position score distribution and the second start position score distribution, obtain a third start position score distribution for each argument in the text to be processed; Based on the first end position score distribution and the second end position score distribution, obtain a third end position score distribution for each argument in the text to be processed; The positions where the score of the third starting position and the score of the third ending position exceed a preset threshold are determined as the target starting position and the target ending position.

2. The method according to claim 1, characterized in that The composite encoder includes a classical encoder and a non-autoregressive decoder.

3. The method according to claim 2, characterized in that The training steps of the composite encoder include: Get the training data set; Determine all event types in the training data set, and set a prompt template corresponding to each event type; the prompt template includes an argument role label and an entity type label; Establishing a dictionary of correspondence between the event type and the prompt template; According to the event type of each instance in the training data set, the corresponding prompt template is indexed in the dictionary, and the event type label and trigger word information corresponding to the instance are added to the prompt template to obtain a complete prompt template; The composite encoder is trained based on the training dataset and the complete prompt template.

4. The method according to claim 1, characterized in that The step of determining the entity type label of each word in the text to be processed based on the first text embedding information and a preset entity type label matrix, and obtaining the second text embedding information, includes: Inputting the first text embedding information and the preset entity type label matrix into a neural network model based on a cross attention mechanism to obtain third text embedding information; Concatenating the third text embedding information and the first text embedding information to obtain fourth text embedding information; Inputting the fourth text embedding information into a named entity recognition model based on joint learning and entity type to obtain sequence annotation label embedding information of the text to be processed; the sequence annotation label embedding information indicates an entity type label of each word in the text to be processed; The sequence annotation tag embedding information is integrated into the first text embedding information to obtain the second text embedding information.

5. An event argument extraction device integrating entity type information, characterized in that: include: A first calculation module is configured to input the text to be processed and the prompt template corresponding to the event type of the text to be processed into the trained composite encoder to obtain first text embedding information and template embedding information; The prompt template includes an argument role label and an entity type label corresponding to each argument role label, as well as the event type label and trigger word information; The prompt template declares the relationship between arguments and the relationship between each argument and entity type; A second calculation module is configured to determine the entity type label of each word in the text to be processed based on the first text embedding information and a preset entity type label matrix, and obtain second text embedding information; A third computing module is configured to determine the argument role and entity type in the to-be-processed text based on the template embedding information, and determine the starting position and ending position of each argument in the to-be-processed text based on the argument role, the entity type and the second text embedding information; Wherein, determining the starting position and the ending position of each argument in the text to be processed based on the argument role, the entity type and the second text embedding information includes: Based on the argument roles in the text to be processed, a span selector based on the argument roles is obtained; the span selector based on the argument roles is used to determine the starting position and the ending position of the argument in the text to be processed based on the argument roles; Based on the argument role-based span selector and the second text embedding information, obtaining a first start position score distribution and a first end position score distribution; Based on the entity type in the text to be processed, a span selector based on the entity type is obtained; the span selector based on the entity type is used to determine the starting position and the ending position of the argument in the text to be processed based on the entity type; Based on the entity type-based span selector and the second text embedding information, obtaining a second start position score distribution and a second end position score distribution; Based on the first start position score distribution and the second start position score distribution, obtain a third start position score distribution for each argument in the text to be processed; Based on the first end position score distribution and the second end position score distribution, obtain a third end position score distribution for each argument in the text to be processed; The positions where the score of the third starting position and the score of the third ending position exceed a preset threshold are determined as the target starting position and the target ending position.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 4 is implemented.

7. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Training event extraction model, event extraction method and target event extraction model

    CN114490953A