Gating mechanism-based passage-level event element extraction method, system and computer readable medium
By combining Transformer-Encode based on gating mechanism and CRF layer, the problem of traditional methods being unable to handle multiple event types and elements in document-level text is solved, and accurate extraction of multiple event types and elements in document-level text is achieved, which is applicable to fields such as finance and public opinion.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 南京云问网络技术有限公司
- Filing Date
- 2022-11-03
- Publication Date
- 2026-05-12
AI Technical Summary
Traditional event element extraction methods cannot effectively handle multiple event types and multiple event elements for each event type in chapter-level texts, resulting in incomplete extraction.
By employing a gating mechanism-based approach, combining a Transformer-Encode structure and a CRF layer, and utilizing feature processing, event type discrimination, and element extraction, along with cross-entropy and Viterbi decoding, we achieve accurate extraction of multiple event types and elements from document-level texts.
It achieves accurate identification and extraction of multiple event types and detailed event elements for each event type in chapter-level texts, and is suitable for applications in finance, public opinion and other fields.
Smart Images

Figure CN116595165B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of natural language processing technology, and more specifically to a method, system, and computer-readable medium for extracting document-level event elements based on a gating mechanism. Background Technology
[0002] With the rapid development of natural language processing and knowledge graph technologies, event element extraction, as a crucial prerequisite for event knowledge graphs, has received widespread attention and has been applied in fields such as finance and public opinion. Event element extraction mainly involves identifying the event type from the input text and, based on predefined event element types, extracting the corresponding event elements from the text.
[0003] Traditional event element extraction based on short texts often targets only a single type of event or extracts only relevant elements for a single event from the input text. In daily work, there are numerous document-level texts available, containing various event types. Traditional event element extraction methods are unable to handle longer fields containing multiple event types, and each event type may require multiple event element extractions. Summary of the Invention
[0004] According to a first aspect of the present invention, a method for extracting chapter-level event elements based on a gating mechanism is provided, comprising the following steps:
[0005] Step 101: Using a predefined event framework, input the chapter-level text d as training sample data. i , i = 1, 2, 3, ..., m, where m represents the number of training sample data at the chapter level;
[0006] Step 102: Process the text d entered in Step 101. i Perform feature processing to obtain feature information;
[0007] Step 103: Input the feature information obtained in step 102 into the representation layer of the model M based on the Transformer-Encode structure for representation, and obtain the model encoded feature En;
[0008] Step 104: Input the model encoding features En obtained in step 103 into an event discrimination layer composed of fully connected layers, and obtain the event type discrimination information P through the softmax activation function. e ;
[0009] Step 105: Input the model-encoded features En obtained in Step 103 into a feature extraction module composed of a CRF layer, and obtain the label state type of each word in the input text through Viterbi decoding to obtain the event feature extraction information P.a ;
[0010] Step 106: Integrate the event type discrimination information P obtained in step 104 e And the event element extraction information P obtained in step 105 a The input is fed into the fusion layer, which is composed of encoders in the standard Transformer model Decoder structure. The fusion layer determines the number of event types and the detailed event elements of the corresponding event types.
[0011] Step 107: Train the model using chapter-level training sample data as input. During the training of the event discrimination layer in step 104, the cross-entropy loss function (Loss) is used. event Calculate its loss value; during the training process of the feature extraction module in step 105, the loss function Loss is used. entity Calculate its loss value; during the training of the fusion layer in step 106, the cross-entropy loss function Loss is used. args Calculate its loss value, and use a joint training method to reduce the loss. event Loss entity and Loss args Dynamically weighted, the final loss function Loss is obtained, and the model is trained to obtain a chapter-level event element extraction model.
[0012] Step 108: Input the text to be processed into the aforementioned text-level event element extraction model, extract each event type and the corresponding event elements through the model, and finally summarize to obtain the final extraction result R.
[0013] As an optional embodiment, in step 101, the predefined event framework includes a set of event types E, E = {e1, e2, ..., e...} i ,…,e n}, where e i Indicates the i-th event type;
[0014] Each event type is configured with multiple corresponding event element types; that is, for any event type, its corresponding event element type set T is configured. e T e ={T e1 T e2 ,…,T ei ,…,T en}, where T e1 T e2 ,…,T ei ,…,T en This represents the n event element types corresponding to a certain event type e;
[0015] The event element types configured for each event type in the predefined event framework are summarized to form a set T, T = {t1, t2, ..., t3}. i ,…,t k}, where k represents the total number of event element types summarized.
[0016] As an optional embodiment, in step 103, the model M based on the Transformer-Encode structure includes a 12-layer Transformer-Encode structure, which encodes and outputs the input feature information through the following process:
[0017] The feature information is represented by word embeddings to obtain the vector representation E of the text:
[0018] E = E input (input_id)+E position (position_id)
[0019] Among them, E input (input_id) represents the word embedding representation obtained after embedding the input_id feature. position (position_id) represents the position embedding representation obtained after embedding the position_id feature;
[0020] The obtained vector representation E is input into the standard Transformer model Encoder for encoding:
[0021] E n =TransformerEncoder(E)
[0022] Here, TransformerEncoder represents the encoder of the standard Transformer model, and En is the vector representation of the text E, which is the vector representation output by the encoder.
[0023] As an optional embodiment, in step 104, the event type discrimination information P is obtained through the softmax activation function. e ,include:
[0024] The event type discrimination information P is obtained based on the following processing. e :
[0025]
[0026]
[0027] in, P represents the probability of event type discrimination information, softmax is the activation function, and W and b represent the weights and biases of the fully connected layer, respectively. e This indicates event type discrimination information; argmax represents the value to be taken. Information on the event type with the highest probability value.
[0028] As an optional embodiment, in step 105, the tag state type of each character in the input text is obtained through Viterbi decoding, which is used to extract event element information to obtain event element extraction information P. a :
[0029]
[0030] Where A is the transition matrix, Indicates from label x i To tag x i+1 The score of the transition; x0 and x n These are the beginning and end markers of a sentence, added to a set of possible markers.
[0031] In embodiments of the present invention, the label status type of each character includes five types: B - starting identifier of central content, I - middle identifier of central content, E - ending identifier of central content, O - non-central content identifier, and S - single character identifier of central content.
[0032] As an optional embodiment, in step 106, the fusion layer used is a standard Transformer model decoder structure with a gating mechanism. The cue template is used as the prefix content of the decoder's starting content, and its output is passed through a fully connected layer. The event type and event element information are determined one by one through the softmax activation function.
[0033] E g =TransformerDecoder(E n )
[0034] Where E g The encoder output is shown; TransformerDecoder is the standard Transformer model decoder.
[0035] Hidden state of the decoder's gated unit output at time t The calculation formula is as follows:
[0036]
[0037] Where E g P is the output of the encoder.a To extract information from event elements obtained from chapter-level text, Output the state from the previous time step;
[0038] Therefore, the decoding formula at time t is:
[0039]
[0040] in For target decoding, λ is the fusion factor, calculated as follows:
[0041]
[0042] The event element information obtained at time t is a n The calculation formula is as follows:
[0043]
[0044]
[0045] in, This represents the probability of discriminating and outputting event element information, where W and b represent the weights and biases of the fully connected layer, respectively, and argmax is the value taken from the output. Information on the event element with the highest probability value.
[0046] According to a second aspect of the present invention, a computer system is provided, comprising:
[0047] One or more processors;
[0048] The memory stores operable instructions, which, when executed by one or more processors, implement the aforementioned gating-based chapter-level event element extraction method.
[0049] In a third aspect of the present invention, a computer-readable medium for storing a computer program is also provided, the computer program including instructions executable by one or more computers, the instructions, when executed by the one or more computers, implementing the aforementioned process of the chapter-level event element extraction method based on a gating mechanism.
[0050] It should be understood that the purpose of event element extraction is mainly to identify the event type of the input text and extract the corresponding event elements from the text for output and representation. Traditional event element extraction based on short text often only extracts elements for a single type of event, or only extracts relevant elements for one event from the input text. This makes it impossible to extract event elements for long fields containing multiple event types, with each event type potentially having multiple elements. However, in daily work, there are numerous document-level texts available, and these texts contain various event types. Therefore, in the embodiments of this invention, a method for event element extraction for document-level texts is proposed.
[0051] Based on the implementation process of the above embodiments, the document-level event element extraction method proposed in this invention, which uses the input document-level text, determines the event types contained in the input text and extracts event element information other than the text, and combines the predefined event types and event element types, uses a gating mechanism to supplement the corresponding events with detailed event elements, accurately identifies and extracts the event types in the document-level text and the event element types contained in each event type.
[0052] The gating mechanism-based chapter-level event element extraction method of this invention supports applications in various application scenarios, such as financial institution announcements, mobile service provider packages, listed company information disclosures, and other specific fields. It can be trained in a targeted manner using labeled data in specific fields, thus making it applicable to chapter-level event element extraction in various fields.
[0053] It should be understood that all combinations of the foregoing concepts and the additional concepts described in more detail below may be considered part of the inventive subject matter of this disclosure, provided that such concepts do not contradict each other. Furthermore, all combinations of the claimed subject matter are considered part of the inventive subject matter of this disclosure.
[0054] The foregoing and other aspects, embodiments, and features of the teachings of the present invention will be more fully understood from the following description in conjunction with the accompanying drawings. Other additional aspects of the invention, such as features and / or beneficial effects of exemplary embodiments, will become apparent from the following description or may be learned through practice of specific embodiments according to the teachings of the present invention. Attached Figure Description
[0055] The accompanying drawings are not intended to be drawn to scale. In the drawings, each identical or nearly identical component shown in the various figures may be denoted by the same reference numeral. For clarity, not every component is labeled in each figure. Embodiments of various aspects of the invention will now be described by way of example and with reference to the accompanying drawings.
[0056] Figure 1This is a schematic flowchart illustrating an exemplary method for extracting chapter-level event elements based on a gating mechanism according to the present invention.
[0057] Figure 2 This is an exemplary schematic diagram of chapter-level text event element extraction in the field of listed company information disclosure application of the present invention.
[0058] Figure 3 This is a schematic diagram illustrating a predefined event framework established by the present invention in the field of information disclosure of listed companies.
[0059] Figure 4 This is a schematic diagram of the structure of model M, which is an example of the present invention. Detailed Implementation
[0060] To better understand the technical content of the present invention, specific embodiments are described below in conjunction with the accompanying drawings.
[0061] Various aspects of the invention are described in this disclosure with reference to the accompanying drawings, which illustrate numerous illustrative embodiments. The embodiments of this disclosure are not necessarily intended to encompass all aspects of the invention. It should be understood that the various concepts and embodiments described above, as well as those described in more detail below, can be implemented in any of many ways, because the concepts and embodiments disclosed herein are not limited to any particular implementation. Furthermore, some aspects of the invention disclosed may be used alone or in any suitable combination with other aspects of the invention disclosed.
[0062] The present invention proposes a method for extracting chapter-level event elements based on a gating mechanism, which aims to analyze and extract multiple event types contained in the chapter-level text and the corresponding event element types contained in each event type.
[0063] The present invention proposes a document-level event element extraction method based on a gating mechanism. This method uses input document-level text, determines the event types contained in the input text and extracts event element information other than the text, and combines it with predefined event types and event element types. The gating mechanism is used to supplement the corresponding events with detailed event elements, accurately identifying and extracting the event types in the document-level text and the event element types contained in each event type.
[0064] Combination Figure 1 The document-level event element extraction method based on a gating mechanism shown in the exemplary embodiment includes the following implementation process:
[0065] Step 101: Using a predefined event framework, input the chapter-level text d as training sample data. i , i = 1, 2, 3, ..., m, where m represents the number of training sample data at the chapter level;
[0066] Step 102: Process the text d entered in Step 101. i Perform feature processing to obtain feature information;
[0067] Step 103: Input the feature information obtained in step 102 into the representation layer of the model M based on the Transformer-Encode structure for representation, and obtain the model encoded feature En;
[0068] Step 104: Input the model encoding features En obtained in step 103 into an event discrimination layer composed of fully connected layers, and obtain the event type discrimination information P through the softmax activation function. e ;
[0069] Step 105: Input the model-encoded features En obtained in Step 103 into a feature extraction module composed of a CRF layer, and obtain the label state type of each word in the input text through Viterbi decoding to obtain the event feature extraction information P. a ;
[0070] Step 106: Integrate the event type discrimination information P obtained in step 104 e And the event element extraction information P obtained in step 105 a The input is fed into the fusion layer, which is composed of encoders in the standard Transformer model Decoder structure. The fusion layer determines each event type and the detailed event element information of the corresponding event type.
[0071] Step 107: Train the model using chapter-level training sample data as input. During the training of the event discrimination layer in step 104, the cross-entropy loss function (Loss) is used. event Calculate its loss value; during the training process of the feature extraction module in step 105, the loss function Loss is used. entity Calculate its loss value; during the training of the fusion layer in step 106, the cross-entropy loss function Loss is used. args Calculate its loss value, and use a joint training method to reduce the loss. event Loss entity and Loss args Dynamically weighted, the final loss function Loss is obtained, and the model is trained to obtain a chapter-level event element extraction model.
[0072] Step 108: Input the text to be processed into the aforementioned text-level event element extraction model, extract each event type and the corresponding event elements through the model, and finally summarize to obtain the final extraction result R.
[0073] In step 101, the predefined event framework includes a set of event types E, E = {e1, e2, ..., e...} i ,…,e n}, where e i Indicates the i-th event type;
[0074] Each event type is configured with multiple corresponding event element types; that is, for any event type, its corresponding event element type set T is configured. e T e ={T e1 T e2 ,…,T ei ,…,T en}, where T e1 T e2 ,…,T ei ,…,T en This represents the n event element types corresponding to a certain event type e.
[0075] In embodiments of the present invention, the event element types configured for each event type in a predefined event framework are aggregated to form a set T, T = {t1, t2, ..., t...} i ,…,t k}, where k represents the total number of event element types summarized.
[0076] Therefore, for any event e i Define the corresponding event element type T ei That is, T ei ={e_t i1 e_t i2 , ..., e_t ij ,…,e_t iki}, where e_t i ∈T, e i ∈E, and event type e i The inclusion of k i Each event element.
[0077] by Figure 2 The example shown is an instance of extracting event elements from a chapter-level text in an exemplary application area. This example uses a chapter-level text of information disclosure from a listed company as an illustration.
[0078] like Figure 3 The image shows an example of an event framework established in this application domain.
[0079] Combination Figure 3As shown, seven event frameworks are constructed in the chapter-level text of listed companies' information disclosure, namely, the seven event types of release of pledge, equity pledge, shareholder increase, shareholder reduction, company listing, corporate acquisition and corporate financing, and the event element types of the corresponding events, such as the pledgee, pledgee, and pledge quantity.
[0080] like Figure 2 The document-level text shown contains two types of events: "equity pledge" and "release of pledge." Each event type has corresponding event element types, which contain specific event elements. For the event "equity pledge," the "company owning the pledged asset" is "Jinhui Liquor"; for the event "release of pledge," the "pledgee" is "Yate Group." Both equity pledge and release of pledge are event types, while the company owning the pledged asset and the pledgor are event element types corresponding to those event types. Jinhui Liquor and Yate Group are the specific event elements corresponding to the event element types.
[0081] The task of chapter-level event element extraction is to analyze the event types contained in the text and the corresponding event element information for each time type.
[0082] As an optional implementation, in step 102, the acquired feature information includes input_ids features and position_ids features.
[0083] input_id is a sequence, where each element is the dictionary ID number corresponding to each character in the text.
[0084] position_id is a sequence where elements start from 0 and increment sequentially, representing the position of each character in the text.
[0085] Combination Figure 4 As shown, as an optional implementation, in step 103, the model M based on the Transformer-Encode structure includes a 12-layer Transformer-Encode structure, and the input feature information is encoded and output through the following process:
[0086] The feature information is represented by word embeddings to obtain the vector representation E of the text:
[0087] E = E input (input_id)+E position (position_id)
[0088] Among them, E input(input_id) represents the word embedding representation obtained after embedding the input_id feature. position (position_id) represents the position embedding representation obtained after embedding the position_id feature;
[0089] The obtained vector representation E is input into the standard Transformer model Encoder for encoding:
[0090] E n =TransformerEncoder(E)
[0091] Here, TransformerEncoder represents the encoder of the standard Transformer model, and En is the vector representation of the text E, which is the vector representation output by the encoder.
[0092] Combination Figure 4 As shown, as an optional implementation, in step 104, the event type discrimination information P is obtained through the softmax activation function. e ,include:
[0093] The event type discrimination information P is obtained based on the following processing. e :
[0094]
[0095]
[0096] in, P represents the probability of event type discrimination information, softmax is the activation function, and W and b represent the weights and biases of the fully connected layer, respectively. e This indicates event type discrimination information; argmax represents the value to be taken. Information on the event type with the highest probability value.
[0097] It should be understood that the event discrimination layer designed in the embodiments of the present invention is an event type discriminator.
[0098] During training, cross-entropy loss is used to calculate the discriminant loss value, Loss. event .
[0099] As an optional implementation, during training, the loss value is calculated using the cross-entropy loss function, as follows:
[0100]
[0101] Label e Indicates that the text is di Label the real events with category tags.
[0102] As an optional implementation, in step 105, the tag state type of each character in the input text is obtained through Viterbi decoding, which is used to extract event element information to obtain event element extraction information P. a :
[0103]
[0104] Where A is the transition matrix, Indicates from x i To tag x i+1 The score of the transition; x0 and x n These are the beginning and end markers of a sentence, which are added to a set of possible markers;
[0105] The label status types include five types: B - Start of central content, I - Middle of central content, E - End of central content, O - Non-central content, and S - Single character of central content.
[0106] It should be understood that, in the embodiments of the present invention, the CRF layer used in step 105 above is a discriminator based on a conditional random field model, which obtains the label state type of each character in the input text through Viterbi decoding to obtain event element extraction information P. a .
[0107] During the training of the discriminator, its model parameters are randomly initialized and optimized during the training process.
[0108] The following loss function is used to calculate the loss value during training:
[0109]
[0110] Where s(Q,x) represents the expression for chapter d i The probability of the label state type of the extracted event elements, where exp is an exponential function, and Label X Indicates chapter d i A sequence of label types for real event elements.
[0111] Combination Figure 4 As shown, as an optional implementation, in step 106, the fusion layer used is a standard Transformer model decoder structure with a gating mechanism. The cue template is used as the prefix content of the decoder's starting content, and its output is passed through a fully connected layer. The event type and event element information are determined one by one through the softmax activation function.
[0112] E g =TransformerDecoder(E n )
[0113] Where E g The encoder output is shown; TransformerDecoder is the standard Transformer model decoder.
[0114] Hidden state of the decoder's gated unit output at time t The calculation formula is as follows:
[0115]
[0116] Where E g P is the output of the encoder. a To extract information from event elements obtained from chapter-level text, Output the state from the previous time step;
[0117] Therefore, the decoding formula at time t is:
[0118]
[0119] in For target decoding, λ is the fusion factor, calculated as follows:
[0120]
[0121] The event element information obtained at time t is a n The calculation formula is as follows:
[0122]
[0123]
[0124] in, This represents the probability of discriminating and outputting event element information, where W and b represent the weights and biases of the fully connected layer, respectively, and argmax is the value taken from the output. Information on the event element with the highest probability value.
[0125] Combining with step 104 above, the cross-entropy loss during the training process is... event Expressed as:
[0126]
[0127] Among them, Label e Indicates that the text is d i Label the real events with category tags.
[0128] Combining with step 105 above, its training loss function Loss entity The expression is:
[0129]
[0130] Where s(Q,x) represents the expression for chapter d i The probability of the label state type of the extracted event element category, where exp is an exponential function, and Label X Indicates chapter d i A sequence of label types for real event element categories;
[0131] Combining with step 106 above, the cross-entropy loss function Loss during the training process args The expression is as follows:
[0132]
[0133] in, Indicates that the text is d i Labels for real event elements.
[0134] Therefore, in embodiments of the present invention, through dynamic weighted loss event Loss entity and Loss args The final loss function Loss is obtained by combining the two functions, and the model is then jointly trained.
[0135] Loss = w1 * Loss entity +w2*Loss event +w3*Loss args
[0136] Where w1, w2, and w3 are weighting coefficients, and w1 + w2 + w3 = 1.
[0137] Combination Figure 1 , 4 The embodiments shown and the above-described method for extracting chapter-level event elements based on gating mechanisms are further illustrated by an embodiment of the present invention, which proposes a computer system comprising: one or more processors and at least one memory.
[0138] The aforementioned memory is configured to store operable instructions that, when executed by one or more processors, implement the process of the gate-based chapter-level event element extraction method of the aforementioned embodiments.
[0139] Combination Figure 1 , 4The embodiments shown and the above-described gating mechanism-based chapter-level event element extraction method are further proposed according to embodiments of the present invention, including a computer-readable medium storing a computer program, wherein the computer program includes instructions executable by one or more computers, which, when executed by one or more computers, implement the process of the gating mechanism-based chapter-level event element extraction method of the above-described embodiments.
[0140] While the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the invention. Those skilled in the art can make various modifications and refinements without departing from the spirit and scope of the invention. Therefore, the scope of protection of the present invention shall be determined by the claims.
Claims
1. A method for extracting chapter-level event elements based on a gating mechanism, characterized in that, include: Step 101: Using a predefined event framework, input the chapter-level text d as training sample data. i , i=1,2,3,…,m, where m represents the number of training sample data at the chapter level; Step 102: Process the text d entered in Step 101. i Perform feature processing to obtain feature information; Step 103: Input the feature information obtained in step 102 into the representation layer of the model M based on the Transformer-Encode structure for representation, and obtain the model encoded feature En; Step 104: Input the model encoding features En obtained in step 103 into an event discrimination layer composed of fully connected layers, and obtain event type discrimination information through the softmax activation function. ; Step 105: Input the model-encoded features En obtained in Step 103 into a feature extraction module composed of a CRF layer, and obtain the label state type of each word in the input text through Viterbi decoding to obtain event feature extraction information. ; Step 106: Integrate the event type discrimination information obtained in Step 104 And the event element extraction information obtained in step 105 The input is fed into the fusion layer, which is composed of encoders in the standard Transformer model Decoder structure. The fusion layer determines the number of event types and the detailed event elements of the corresponding event types. Step 107: Train the model using chapter-level training sample data as input. During the training of the event discrimination layer in step 104, the cross-entropy loss function is used. Calculate its loss value; during the training process of the feature extraction module in step 105, a loss function is used. Calculate its loss value; during the training of the fusion layer in step 106, the cross-entropy loss function is used. Calculate its loss value, and through joint training, ... , and Dynamic weighting is used to obtain the final loss function Loss, and joint training is performed to obtain a chapter-level event element extraction model. Step 108: Input the text to be processed into the previously trained text-level event element extraction model, extract each event type and the event elements of the corresponding event type through the model, and summarize to obtain the final extraction result R; In step 106, the fusion layer used is a standard Transformer model decoder structure with a gating mechanism. The cue template is used as the prefix of the decoder's starting content, and its output is passed through a fully connected layer. The event type and event element information are determined one by one through the softmax activation function. ; in The output of the encoder; For the standard Transformer model Decoder; Hidden state of the decoder's gated unit output at time t The calculation formula is as follows: ; in The output of the encoder, To extract information from event elements obtained from chapter-level text, Output the state from the previous time step; Therefore, the decoding formula at time t is: ; in Decode the target. The fusion factor is calculated as follows: ; The event element information obtained at time t is The calculation formula is as follows: ; ; in, This represents the probability of discriminating and outputting event element information, where W and b represent the weights and biases of the fully connected layer, respectively. To obtain Information on the event element with the highest probability value.
2. The method for extracting chapter-level event elements based on a gating mechanism according to claim 1, characterized in that, In step 101, the predefined event framework includes a set of event types E, E={e1, e2, ..., e...} i ,…,e n }, where e i Indicates the i-th event type; Each event type is configured with multiple corresponding event element types; that is, for any event type, its corresponding event element type set T is configured. e T e ={T e1 T e2 ,…,T ei ,…,T en }, where T e1 T e2 ,…,T ei ,…,T en This represents the n event element types corresponding to a certain event type e.
3. The method for extracting chapter-level event elements based on a gating mechanism according to claim 1, characterized in that, In step 102, the acquired feature information includes input_ids features and placement_ids features, wherein: input_id is a sequence where each element is the dictionary ID number corresponding to each character in the text; position_id is a sequence where elements start from 0 and increment sequentially, representing the position of each character in the text.
4. The method for extracting chapter-level event elements based on a gating mechanism according to claim 1, characterized in that, In step 103, the model M based on the Transformer-Encode structure includes a 12-layer Transformer-Encode structure, which encodes and outputs the input feature information through the following process: The feature information is represented by word embeddings to obtain the vector representation E of the text: ; in, This represents the word embedding representation obtained after embedding the input_id feature. This represents the position embedding representation obtained after embedding the position_id feature; The obtained vector representation E is input into the standard Transformer model Encoder for encoding: ; in, This represents the encoder of the standard Transformer model, where En is the vector representation of the text, and E is the vector representation output by the encoder.
5. The method for extracting chapter-level event elements based on a gating mechanism according to claim 1, characterized in that, In step 104, event type discrimination information is obtained through the softmax activation function. ,include: Event type identification information is obtained based on the following processing. : ; ; in, This indicates the probability of event type discrimination information. Let W be the activation function, and b be the weights and biases of the fully connected layer, respectively. This indicates information to determine the event type. Indicates taking Information on the event type with the highest probability value.
6. The method for extracting chapter-level event elements based on a gating mechanism according to claim 1, characterized in that, In step 105, the label state type of each character in the input text is obtained through Viterbi decoding, which is used to extract event element information, thus obtaining event element extraction information. : ; in, It is a transition matrix. Indicates from To tag The score of the transfer; and These are the start and end markers of sentences in text, added to a set of possible markers; The label status types include five types: B - Start of central content, I - Middle of central content, E - End of central content, O - Non-central content, and S - Single character of central content.
7. The method for extracting chapter-level event elements based on a gating mechanism according to claim 1, characterized in that, The aforementioned cross-entropy loss Its expression is: ; in, Indicates that the text is d i Label the real events with category tags; The loss The expression is: ; in, Indicates that the text is d i The probability of the label state type of the extracted event elements. It is an exponential function. Indicates chapter d i A sequence of tag types for real event elements; The cross-entropy loss function The expression is as follows: ; in, Indicates that the text is d i Labels for real-world event elements; Through dynamic weighting , and The final loss function Loss is obtained by combining the two functions, and the model is then jointly trained. ; in, These are the weighting coefficients, .
8. A computer system, characterized in that, include: One or more processors; A memory that stores operable instructions that, when executed by one or more processors, implement the process of the document-level event element extraction method based on a gating mechanism as described in any one of claims 1 to 7.
9. A computer-readable medium for storing computer programs, characterized in that, The computer program includes instructions executable by one or more computers, which, when executed by the one or more computers, implement the process of the document-level event element extraction method based on gating mechanism as described in any one of claims 1 to 7.