Event extraction method, electronic device, storage medium and program product

By combining feature encoding and virtual event type embedding with convolutional networks and dual affine attention prediction strategies, the problems of event recognition and extraction in the absence of predefined event modes are solved, and the effective recognition and extraction of event trigger words and arguments in texts are achieved.

CN120408540BActive Publication Date: 2025-09-16CHONGQING SPECIAL EQUIP INSPECTION & RES INST +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510914969.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-03
Publication Date
2025-09-16
Estimated Expiration
2045-07-03

AI Technical Summary

Technical Problem

Existing deep learning-based event extraction methods cannot effectively identify and extract event trigger words and arguments in texts without predefined event patterns.

Method used

The preset feature encoding strategy is used to encode the input data, obtain trigger word embedding and structure embedding, and perform feature fusion through virtual event type embedding. The preset convolutional network and dual affine attention prediction strategy are combined to perform probability prediction, and finally the fusion output event extraction results are output.

Benefits of technology

The generalization of the model in the absence of predefined event patterns is improved, and it can effectively identify and extract event trigger words and arguments in the text.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120408540B_ABST
    Figure CN120408540B_ABST
Patent Text Reader

Abstract

The present application provides an event extraction method, electronic device, storage medium and program product. The method includes: obtaining input data; based on a preset feature encoding strategy, feature encoding the input data to obtain trigger word embedding and structure embedding; obtaining a preset virtual event type embedding; feature fusion of the trigger word embedding, structure embedding and preset virtual event type embedding to obtain a first feature vector; based on the first feature vector, probability prediction of the input data is performed based on a preset convolutional network prediction strategy to obtain a first prediction result; based on the first feature vector, probability prediction of the input data is performed based on a preset dual affine attention prediction strategy to obtain a second prediction result; the first prediction result and the second prediction result are fused and output to obtain an event extraction result. In this way, the problem that the traditional event extraction method cannot effectively identify and extract event trigger words and arguments in the text without a predefined event pattern can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer processing technology, and in particular to an event extraction method, electronic equipment, storage medium and program product. Background Art

[0002] With the rapid development of information technology, specialized equipment such as elevators, hoists, and factory vehicles have been connected to various IoT platforms. These platforms accumulate and store large amounts of unstructured or semi-structured equipment operating data daily. Consequently, extracting structured information from this unstructured data and organizing it into an effective information knowledge system has become a hot topic.

[0003] Currently, deep learning-based event extraction is the mainstream technology for event extraction. However, current event extraction methods, without predefined event models, are unable to effectively identify and extract event trigger words and arguments from text. Summary of the Invention

[0004] In view of this, the purpose of the embodiments of the present application is to provide an event extraction method, electronic device, storage medium and program product, which can improve the problem that traditional event extraction methods cannot effectively identify and extract event trigger words and arguments in texts without predefined event patterns.

[0005] To achieve the above technical objectives, the technical solutions adopted in this application are as follows:

[0006] In a first aspect, an embodiment of the present application provides an event extraction method, the method comprising:

[0007] Get the input data containing the events to be extracted;

[0008] Based on a preset feature encoding strategy, feature encoding is performed on the input data to obtain trigger word embeddings representing semantic features of the input data and structural embeddings representing structural features of the input data;

[0009] Obtaining a preset virtual event type embedding that represents event type features;

[0010] Performing feature fusion on the trigger word embedding, the structure embedding, and the preset virtual event type embedding to obtain a first feature vector corresponding to the input data;

[0011] According to the first feature vector, a probability prediction is performed on the input data based on a preset convolutional network prediction strategy to obtain a first prediction result;

[0012] According to the first feature vector, a probability prediction is performed on the input data based on a preset dual affine attention prediction strategy to obtain a second prediction result;

[0013] The first prediction result and the second prediction result are fused and outputted to obtain an event extraction result.

[0014] In conjunction with the first aspect, in some optional implementations, obtaining input data containing events to be extracted includes:

[0015] Get the text data containing the event to be extracted;

[0016] Splitting the text data into word-unit representations;

[0017] Performing vector conversion on the word unit representation to obtain a word unit embedding vector corresponding to the word unit representation;

[0018] By using a preset AMR parsing strategy, the word element representation is converted into an AMR graph representation to obtain trigger word node information;

[0019] The word element embedding vector and the trigger word node information are used as the input data.

[0020] In conjunction with the first aspect, in some optional implementations, feature encoding is performed on the input data based on a preset feature encoding strategy to obtain a trigger word embedding representing a semantic feature of the input data and a structural embedding representing a structural feature of the input data, including:

[0021] Performing a first feature encoding on the input data using a preset BERT pre-trained model to obtain the trigger word embedding;

[0022] The input data is subjected to a second feature encoding using a preset AGGCN pre-training model to obtain the structural embedding.

[0023] In conjunction with the first aspect, in some optional implementations, feature fusion is performed on the trigger word embedding, the structure embedding, and the preset virtual event type embedding to obtain a first feature vector corresponding to the input data, including:

[0024] For the target trigger word embedding in the trigger word embedding, the attention score of the target trigger word embedding and the preset virtual event type embedding is determined by the following formula, where the target trigger word embedding represents the second feature vector corresponding to the trigger word with overlapping conditions in the trigger word embedding:

[0025]

[0026] Where, represents the inner product operation, Represents the target trigger word embedding With the The attention scores of the virtual event type embeddings, , represents the total number of virtual event type embeddings in the preset virtual event type embeddings;

[0027] Sort multiple virtual event type embeddings in the preset virtual event type embeddings based on the attention scores, and select the top m virtual event type embeddings with the largest attention scores as target virtual event type embeddings, where m is equal to the maximum number of target trigger word embeddings;

[0028] Performing feature encoding on the target virtual event type embedding by a first preset multi-layer perceptron to obtain a virtual event embedding feature;

[0029] A first gated conditional normalization operation is performed on the trigger word embedding and the virtual event embedding features to obtain a first fused feature vector, which is expressed as follows:

[0030]

[0031]

[0032]

[0033] Where, and Respectively represent the multiplication of vector elements and vector splicing operations, 、 、 、 are learnable parameters, Representing the feature vector in the structural embedding In the feature vector Perform gated conditional normalization on the condition, represents the feature vector in the trigger word embedding, express The corresponding virtual event embedding features, represents the first gating unit, and is the feature vector in the structural embedding The mean and standard deviation between each dimension are expressed as follows:

[0034]

[0035]

[0036] Where, Represents the first The first eigenvector dimensional eigenvalues;

[0037] The first fused feature vector is concatenated with the structural embedding to obtain a second fused feature vector as the first feature vector, which is expressed as follows:

[0038]

[0039] Where, Representing words to word The first fused feature vector between represents structural embedding, 、 and are learnable parameters, Represents the sigmoid activation function.

[0040] In combination with the first aspect, in some optional implementations, performing a probability prediction on the input data based on a preset convolutional network prediction strategy according to the first feature vector to obtain a first prediction result includes:

[0041] A second gated conditional normalization operation is performed on the first feature vectors corresponding to any two word-unit representations in the input data to obtain a word pair relationship feature between the any two word-unit representations, which is expressed as follows:

[0042]

[0043]

[0044]

[0045]

[0046] Where, and Represent word representation and The corresponding first eigenvector, 、 、 、 and are learnable parameters, represents the second gating unit, and Represent word representation The corresponding first eigenvector The mean and standard deviation between the dimensions in are expressed as follows:

[0047]

[0048]

[0049] Where, Representation of word The corresponding first eigenvector No. dimensional eigenvalues;

[0050] Obtaining a preset first index matrix and a preset second index matrix;

[0051] Determining word pair relative distance embedding and word pair region embedding respectively by using the preset first index matrix and the preset second index matrix;

[0052] The concatenated features of the word pair relationship features, the word pair relative distance embeddings, and the word pair region embeddings are encoded by a second preset multi-layer perceptron to obtain a grid feature representation, which is expressed as follows:

[0053]

[0054] Where, represents the grid feature representation, Represents span prediction or relationship prediction in probability prediction, Represents the word pair relationship feature, Represents the relative distance embedding of word pairs, represents word pair region embedding, Represents the second preset multilayer perceptron;

[0055] The grid feature representation is extracted through the dilated convolutional network to obtain a third fused feature vector, which is expressed as follows:

[0056]

[0057] Where, The expansion rate is Dilated convolutional network for grid feature representation The third fused feature vector obtained after feature extraction, represents the ReLU activation function, The expansion rate is dilated convolution;

[0058] For any word pair representation in the input data, the span prediction feature vector and the relationship prediction feature vector in the third fused feature vector corresponding to the arbitrary word pair representation are encoded by the third preset multi-layer perceptron and the fourth preset multi-layer perceptron respectively, to obtain the first span prediction score vector and the first relationship prediction score vector corresponding to the arbitrary word pair representation, as the first prediction result, which are expressed as follows:

[0059]

[0060]

[0061] Where, Representation word pair The first span prediction score vector, Representation word pair The first relation prediction score vector, Representation word pair The corresponding span prediction feature vector in the third fusion feature vector, Representation word pair The corresponding relationship prediction feature vector in the third fusion feature vector, represents the third preset multilayer perceptron, Represents the fourth preset multilayer perceptron.

[0062] In combination with the first aspect, in some optional implementations, performing a probability prediction on the input data based on a preset bi-affine attention prediction strategy according to the first feature vector to obtain a second prediction result includes:

[0063] The first feature vector is encoded by a fifth preset multi-layer perceptron and a sixth preset multi-layer perceptron respectively to obtain a head feature representation and a tail feature representation of the word unit in the input data as a word unit feature representation, which is expressed as follows:

[0064]

[0065]

[0066] Where, and Respectively represent the head feature representation and tail feature representation of the word, represents the fifth preset multilayer perceptron, Represents the sixth preset multilayer perceptron;

[0067] The word unit feature representation is concatenated with the first feature vector, and the concatenated word unit feature representation is encoded by a seventh preset multi-layer perceptron and an eighth preset multi-layer perceptron, respectively, so as to perform feature fusion on the first feature vector and the head feature representation, and on the first feature vector and the tail feature representation, respectively, to obtain a fourth fused feature vector and a fifth fused feature vector, which are expressed as follows:

[0068]

[0069]

[0070] Where, represents the seventh preset multilayer perceptron, represents the eighth preset multilayer perceptron, Represents vector concatenation operation, Represents the first eigenvector after concatenation by the seventh preset multi-layer perceptron Head feature representation After encoding, the fourth fused feature vector is obtained. Represents the first eigenvector after concatenation by the eighth preset multi-layer perceptron and tail feature representation After encoding, the fifth fused feature vector is obtained;

[0071] Based on the fourth fused feature vector and the fifth fused feature vector, a span prediction in the probability prediction is performed on any word pair representation in the input data through the first biaffine attention prediction strategy to obtain a second span prediction score vector corresponding to the any word pair representation, which is expressed as follows:

[0072]

[0073] Where, Representation word pair The second span prediction score vector, and Represent the fourth fusion feature vector The i-th eigenvector and the fifth fused eigenvector in The jth eigenvector in , 、 and are learnable parameters, Represents vector concatenation operation;

[0074] A bilinear transformation operation is performed on the first feature vector to obtain a relationship feature matrix between word units in the input data, which is expressed as follows:

[0075]

[0076] Where, Represents the relationship feature matrix between word units, represents the activation function, represents a learnable bilinear transformation matrix;

[0077] The concatenated features of the first feature vector, the fourth fused feature vector, and the fifth fused feature vector are encoded by a ninth preset multi-layer perceptron to obtain a boundary constraint feature vector, which is expressed as follows:

[0078]

[0079] Where, represents the boundary constraint feature vector, Represents the ninth preset multilayer perceptron;

[0080] The relationship feature matrix is ​​encoded by the tenth preset multi-layer perceptron to obtain a sixth fused feature vector, which is expressed as follows:

[0081]

[0082] Where, represents the sixth fused eigenvector, Represents the tenth preset multilayer perceptron;

[0083] By using the second biaffine attention prediction strategy, the relationship prediction in the probability prediction is performed on the arbitrary word pair representation in the input data to obtain the second relationship prediction score vector corresponding to the arbitrary word pair representation, which is expressed as follows:

[0084]

[0085] Where, Representation word pair The second relationship prediction score vector, and Represent the boundary constraint feature vectors The i-th eigenvector and the sixth fused eigenvector in The jth eigenvector in , 、 and are learnable parameters, Represents vector concatenation operation;

[0086] The second span prediction score vector and the second relationship prediction score vector are used as the second prediction result.

[0087] In conjunction with the first aspect, in some optional implementations, the first prediction result and the second prediction result are fused and output to obtain an event extraction result, including:

[0088] pass The activation function integrates the first span prediction score vector in the first prediction result and the second span prediction score vector in the second prediction result, as well as the first relationship prediction score vector in the first prediction result and the second relationship prediction score vector in the second prediction result, to obtain the event extraction result, which is expressed as follows:

[0089]

[0090]

[0091] Where, Represents word pairs in the input data The corresponding first span prediction score vector, Representation word pair The corresponding second span prediction score vector, Representation word pair The corresponding first relationship prediction score vector, Representation word pair The corresponding second relationship prediction score vector, represents the comprehensive span prediction score vector, represents a comprehensive relationship prediction score vector, and the comprehensive span prediction score vector and the comprehensive relationship prediction score vector are used as the event extraction result.

[0092] In a second aspect, an embodiment of the present application further provides an electronic device, comprising a processor and a memory coupled to each other, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the electronic device executes the above-mentioned method.

[0093] In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program runs on a computer, the computer executes the above method.

[0094] In a fourth aspect, an embodiment of the present application further provides a computer program product, comprising a computer program, which implements the above method when executed by a processor.

[0095] The invention adopting the above technical solution has the following advantages:

[0096] In the technical solution provided in the present application, first, input data containing the event to be extracted is obtained. Then, based on the preset feature encoding strategy, the input data is feature encoded to obtain trigger word embedding and structure embedding. Then, a preset virtual event type embedding that characterizes the event type characteristics is obtained, and the trigger word embedding, structure embedding and preset virtual event type embedding are feature fused to obtain a first feature vector. Then, based on the first feature vector, a probability prediction is performed on the input data based on the preset convolutional network prediction strategy to obtain a first prediction result. Then, based on the first feature vector, a probability prediction is performed on the input data based on the preset dual affine attention prediction strategy to obtain a second prediction result. Finally, the first prediction result and the second prediction result are fused and output to obtain an event extraction result. In this way, the event extraction model learns event types in different fields through virtual event type embedding, constrains trigger words, improves the generalization of the model, and improves the problem that the traditional event extraction method cannot effectively identify and extract event trigger words and arguments in the text without predefined event patterns. BRIEF DESCRIPTION OF THE DRAWINGS

[0097] The present application may be further illustrated by the non-limiting embodiments provided in the accompanying drawings. It should be understood that the following drawings illustrate only certain embodiments of the present application and are therefore not to be construed as limiting the scope of the present application. It is understood that a person skilled in the art can derive other relevant drawings from these drawings without inventive effort.

[0098] Figure 1 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0099] Figure 2 A flowchart of the event extraction method provided in an embodiment of the present application.

[0100] Figure 3 A schematic diagram of the structure of the event extraction model provided in the embodiment of the present application.

[0101] Icon: 100-electronic device; 101-processor; 102-memory. DETAILED DESCRIPTION

[0102] The present application will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that similar or identical parts in the drawings or descriptions are numbered the same. Implementations not shown or described in the drawings are known to those of ordinary skill in the art. In the description of this application, the terms "first," "second," etc. are used solely to distinguish descriptions and are not to be construed as indicating or implying relative importance.

[0103] Please refer to Figure 1 , an embodiment of the present application provides an electronic device 100 that may include a processor 101 and a memory 102. The memory 102 stores a computer program, and when the computer program is executed by the processor 101, the electronic device 100 can perform the corresponding steps in the following event extraction method.

[0104] In this embodiment, the processor 101 may be an integrated circuit chip having signal processing capabilities. The processor 101 may be a general-purpose processor. For example, the processor 101 may be a central processing unit (CPU), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components, and may implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present application.

[0105] The memory 102 may be, but is not limited to, a random access memory, a read-only memory, a programmable read-only memory, an erasable programmable read-only memory, an electrically erasable programmable read-only memory, etc. In this embodiment, the memory 102 may be used to store input data, a preset feature encoding strategy, trigger word embeddings, structure embeddings, preset virtual event type embeddings, first feature vectors, a preset convolutional network prediction strategy, a first prediction result, a preset dual-affine attention prediction strategy, a second prediction result, event extraction results, etc. Of course, the memory 102 may also be used to store programs, which the processor 101 executes upon receiving an execution instruction.

[0106] It is understandable that Figure 1 The structure of the electronic device 100 shown in FIG is only a schematic diagram of a structure. The electronic device 100 may also include Figure 1 More components shown. Figure 1 Each component shown in the figure can be implemented by hardware, software or a combination thereof.

[0107] In this embodiment, the electronic device 100 can be a personal computer, a laptop computer, a cloud server, etc., and is used to obtain input data containing the event to be extracted. Then, based on the preset feature encoding strategy, the input data is feature encoded to obtain trigger word embedding and structure embedding. Then, a preset virtual event type embedding that characterizes the event type characteristics is obtained, and the trigger word embedding, structure embedding and preset virtual event type embedding are feature fused to obtain a first feature vector. Then, based on the first feature vector, a probability prediction is performed on the input data based on the preset convolutional network prediction strategy to obtain a first prediction result. Then, based on the first feature vector, a probability prediction is performed on the input data based on the preset dual affine attention prediction strategy to obtain a second prediction result. Finally, the first prediction result and the second prediction result are fused and output to obtain an event extraction result.

[0108] Please refer to Figure 2 The present application also provides an event extraction method that can be applied to the electronic device 100 described above, and the electronic device 100 executes or implements each step in the method. The event extraction method may include the following steps:

[0109] Step 110, obtaining input data containing events to be extracted;

[0110] Step 120: Based on a preset feature encoding strategy, feature encoding is performed on the input data to obtain trigger word embeddings representing semantic features of the input data and structural embeddings representing structural features of the input data;

[0111] Step 130, obtaining a preset virtual event type embedding representing event type characteristics;

[0112] Step 140: performing feature fusion on the trigger word embedding, the structure embedding, and the preset virtual event type embedding to obtain a first feature vector corresponding to the input data;

[0113] Step 150: performing probability prediction on the input data based on the first feature vector and a preset convolutional network prediction strategy to obtain a first prediction result;

[0114] Step 160: performing probability prediction on the input data based on the first feature vector and a preset dual-affine attention prediction strategy to obtain a second prediction result;

[0115] Step 170: fuse and output the first prediction result and the second prediction result to obtain an event extraction result.

[0116] In the above-mentioned embodiment, first, input data containing the event to be extracted is obtained. Then, based on the preset feature encoding strategy, the input data is feature encoded to obtain trigger word embedding and structure embedding. Then, a preset virtual event type embedding that characterizes the event type characteristics is obtained, and the trigger word embedding, structure embedding and preset virtual event type embedding are feature fused to obtain a first feature vector. Then, based on the first feature vector, a probability prediction is performed on the input data based on the preset convolutional network prediction strategy to obtain a first prediction result. Then, based on the first feature vector, a probability prediction is performed on the input data based on the preset dual affine attention prediction strategy to obtain a second prediction result. Finally, the first prediction result and the second prediction result are fused and output to obtain an event extraction result. In this way, the event extraction model learns event types in different fields through virtual event type embedding, constrains trigger words, improves the generalization of the model, and improves the problem that the traditional event extraction method cannot effectively identify and extract event trigger words and arguments in the text without predefined event patterns.

[0117] The following is a detailed description of the steps of the event extraction method:

[0118] In step 110, obtaining input data containing events to be extracted may include:

[0119] Get the text data containing the event to be extracted;

[0120] Splitting the text data into word-unit representations;

[0121] Performing vector conversion on the word unit representation to obtain a word unit embedding vector corresponding to the word unit representation;

[0122] By using a preset AMR parsing strategy, the word element representation is converted into an AMR graph representation to obtain trigger word node information;

[0123] The word element embedding vector and the trigger word node information are used as the input data.

[0124] In this embodiment, the text data can be pre-stored in the memory 102 of the electronic device 100 during the event extraction model development phase and then accessed based on computer instructions during the subsequent event extraction process. Alternatively, the text data can be acquired by the user inputting the model in real time during the model application phase and directly participating in the subsequent event extraction. The method for acquiring the text data is not specifically limited herein.

[0125] In this embodiment, after obtaining the text data, the text data is split into word-unit representations (also referred to as word-units for short), and each word-unit is converted into a vector to obtain a word-unit embedding vector corresponding to each word-unit.

[0126] For example, if the text data is "Shenzhou telecom acquired 100% equity of Guangzhou Security", the text data is split into eight word units, namely Shenzhou, telecom, acquired, 100%, equity, of, Guangzhou, and Security. Then, the eight word unit representations are converted into vectors to obtain the word unit embedding vector.

[0127] In this embodiment, AMR (Abstract Meaning Representation) parsing can also be performed on the word gram to obtain trigger word node information, and then the word gram embedding vector and the trigger word node information are used together as the above input data. AMR parsing is a linguistic framework that represents the semantics of a sentence as a unit directed acyclic graph with concepts as nodes. It is a conventional technical means in the field of natural language processing technology and is not described in detail here.

[0128] In step 120, based on a preset feature encoding strategy, feature encoding is performed on the input data to obtain trigger word embeddings representing semantic features of the input data and structural embeddings representing structural features of the input data, which may include:

[0129] Performing a first feature encoding on the input data using a preset BERT pre-trained model to obtain the trigger word embedding;

[0130] The input data is subjected to a second feature encoding using a preset AGGCN pre-training model to obtain the structural embedding.

[0131] In this embodiment, after the input data is determined, the sentence containing N word element embedding vectors is Combined with its AMR parsing results (i.e. input data), it is input into the BERT (Bidirectional Encoder Representations from Transformer) pre-trained model and the AGGCN (Attention Guided Graph Convolutional Networks) pre-trained model in turn to obtain the trigger word embeddings. and structural embedding .

[0132] In step 130, the preset virtual event type is obtained and embedded as ,in, Indicates the number of virtual event type embeddings in the preset virtual event type embeddings.

[0133] In step 140, the abstract event type features (i.e., virtual event type embeddings) are acquired through the attention mechanism and P-Tuning technology. A gate-conditional normalization operation is then used to conditionally fuse the virtual event type embeddings, trigger word embeddings, and structure embeddings. The attention mechanism helps the event extraction model focus on key information related to event trigger words and arguments in the text. P-Tuning technology further enhances the model's ability to capture event type features.

[0134] Among them, P-Tuning technology is a fine-tuning technology based on parameter pruning, which aims to improve the model's ability to capture the dependencies between event elements (that is, event type characteristics) and accelerate the model convergence speed through differentiable virtual event type embedding.

[0135] In this embodiment, in order to solve the situation where there is no overlap of trigger words in predefined event patterns and to allow the model to obtain richer event representations, the model needs to integrate event type information and use it to constrain trigger words. However, in order to improve the generalization of the model, the model cannot use specific event types to constrain trigger words, but instead allows the model to learn event type embeddings in different fields. This application is based on P-Tuning technology and uses virtual event type embedding. Figure 3 To make virtual event type embeddings continuously differentiable, an event type encoder is used to encode these virtual event type embeddings. When fine-tuning in different domains, the weights of the event type encoder and virtual event type embeddings are loaded rather than randomly initialized. This not only accelerates model convergence but also allows different weight parameters to be loaded for event extraction in different domains, allowing the model to adapt to event types in different domains, improving its generalization and transferability.

[0136] Specifically, this embodiment obtains a first feature vector corresponding to the input data by performing feature fusion on the trigger word embedding, the structure embedding, and the preset virtual event type embedding;

[0137] The step of performing feature fusion on the trigger word embedding, the structure embedding, and the preset virtual event type embedding to obtain a first feature vector corresponding to the input data may include:

[0138] For the target trigger word embedding in the trigger word embedding , the attention scores of the target trigger word embedding and the preset virtual event type embedding are determined by the following formula, where the target trigger word embedding represents the second feature vector corresponding to the trigger word with overlapping conditions in the trigger word embedding:

[0139]

[0140] Where, represents the inner product operation, Represents the target trigger word embedding With the The attention scores of the virtual event type embeddings, , represents the total number of virtual event type embeddings in the preset virtual event type embeddings;

[0141] Sort the multiple virtual event type embeddings in the preset virtual event type embeddings based on the attention scores, and select the top m virtual event type embeddings with the largest attention scores as target virtual event type embeddings, where m is equal to the maximum number in the target trigger word embeddings (target trigger word embeddings refer to trigger word vectors that overlap in the trigger word embeddings. Any overlapping trigger word vectors are regarded as a vector group, and m is the maximum number of trigger word vectors in the vector group, which can be 2, 3, 4, etc. This embodiment takes 2 as an example);

[0142] The target virtual event type is embedded by a first preset multilayer perceptron (MLP) to obtain a virtual event embedding feature. ;

[0143] A first gated conditional normalization operation is performed on the trigger word embedding and the virtual event embedding features to obtain a first fused feature vector, which is expressed as follows:

[0144]

[0145]

[0146]

[0147] Where, and Respectively represent the multiplication of vector elements and vector splicing operations, 、 、 、 are learnable parameters, Representing the feature vector in the structural embedding In the feature vector Gated conditional normalization is performed on the condition, represents the feature vector in the trigger word embedding, express The corresponding virtual event embedding features, Represents the first gating unit, which is used to filter unnecessary feature information. and is the feature vector in the structural embedding The mean and standard deviation between each dimension are expressed as follows:

[0148]

[0149]

[0150] Where, Represents the first The first eigenvector dimensional eigenvalues;

[0151] The first fused feature vector is concatenated with the structural embedding to obtain a second fused feature vector as the first feature vector, which is expressed as follows:

[0152]

[0153]

[0154] Where, Representing words to word The first fused feature vector between represents structural embedding, 、 and are learnable parameters, Represents the sigmoid activation function.

[0155] In this way, the feature vector of each word unit integrates event type feature information, trigger word (word level) feature information and structural feature information.

[0156] Finally, refer again Figure 3 , the embodiment of the present application regards the trigger word and argument extraction task as the span and relationship discrimination task between word pairs through the span-relationship joint prediction layer. On the one hand, a convolutional neural network is used to capture the local and global information between word pairs, obtain the dependency relationship between words, improve the richness of the word pair feature representation, and make probability predictions for them; on the other hand, a span and relationship extractor is used to capture the head and tail feature information of arguments and trigger words and the dependency relationship information between the two, and then a deep dual affine transformation network is used to make probability predictions for word pairs. Finally, the model combines the two probability prediction results to improve the model's effectiveness in identifying and extracting trigger words and arguments.

[0157] Specifically, the embodiment of the present application implements the above-mentioned span-relation joint prediction layer extraction task through steps 150 to 160 as follows:

[0158] In step 150, in order to predict the relationship between word pairs, it is important to generate a high-quality word pair grid representation. The word pair grid representation can be regarded as a 3D feature matrix denoted as ,in, Representation word pair The relational feature representation of The eigenvector of and words The eigenvector of Since word pairs are a partial order relationship, that is, The eigenvectors and The eigenvectors of are different, so the gated conditional normalization operation is used to represent ,Right now The eigenvector of In the feature vector The feature combination is performed based on the conditions of . Specifically, The calculation process of is described in detail below with reference to step 150.

[0159] In step 150, performing probability prediction on the input data based on the first feature vector and a preset convolutional network prediction strategy to obtain a first prediction result may include:

[0160] A second gated conditional normalization operation is performed on the first feature vectors corresponding to any two word-unit representations in the input data to obtain a word pair relationship feature between the any two word-unit representations, which is expressed as follows:

[0161]

[0162]

[0163]

[0164]

[0165] Where, and Represent word representation and The corresponding first eigenvector, 、 、 、 and are learnable parameters, represents the second gating unit, and Represent word representation The corresponding first eigenvector The mean and standard deviation between the dimensions in are expressed as follows:

[0166]

[0167]

[0168] Where, Representation of word The corresponding first eigenvector No. dimensional eigenvalues;

[0169] Obtaining a preset first index matrix and a preset second index matrix;

[0170] Determining word pair relative distance embedding and word pair region embedding respectively by using the preset first index matrix and the preset second index matrix;

[0171] In determining word representation and After embedding the relative distance between words and word pairs, the model fuses the two with the output of the gated conditional normalization operation and uses a multi-layer perceptron to reduce their dimensions, thereby obtaining a grid feature representation with relative position and region awareness.

[0172] The concatenated features of the word pair relationship features, the word pair relative distance embeddings, and the word pair region embeddings are encoded by a second preset multi-layer perceptron to obtain a grid feature representation, which is expressed as follows:

[0173]

[0174] Where, represents the grid feature representation, Represents span prediction or relationship prediction in probability prediction, Represents the word pair relationship feature, Represents the relative distance embedding of word pairs, represents word pair region embedding, Represents the second preset multilayer perceptron;

[0175] In this embodiment, for span prediction and relationship prediction, the model uses multiple two-dimensional convolutions (DConv) with different dilation rates to capture information between word pairs (which can be understood as two tokens) with different distances. Compared to standard convolution kernels, convolution kernels with different dilation rates can capture multi-scale contextual information, making it suitable for predicting the span and relationship of word pairs at different levels. When the dilation rate (i.e., expansion ratio) is 1, the dilated convolution can be regarded as a normal convolution.

[0176] Specifically, this embodiment performs feature extraction on the grid feature representation through an expanded convolutional network to obtain a third fused feature vector, which is expressed as follows:

[0177]

[0178] Where, The expansion rate is Dilated convolutional network for grid feature representation The third fused feature vector obtained after feature extraction, represents the ReLU activation function, The expansion rate is dilated convolution;

[0179] Among them, the level and expansion rate of the dilated convolutional network can be flexibly set according to user needs. For example, in the embodiment of this application, a three-layer dilated convolutional network is taken as an example, and the convolution kernel expansion rates of the three-layer dilated convolutional neural network are 1, 2, and 3 respectively, that is, , then the output of the dilated convolutional network can be expressed as .

[0180] After obtaining the fused feature vectors corresponding to the span information and the fused feature vectors corresponding to the relationship information of the word pair through two dilated convolutional networks, the model uses two multi-layer perceptrons to obtain the span prediction score vector and the relationship prediction score vector based on the dilated convolutional network. As shown below:

[0181] For any word pair representation in the input data, the span prediction feature vector and the relationship prediction feature vector in the third fused feature vector corresponding to the arbitrary word pair representation are encoded by the third preset multi-layer perceptron and the fourth preset multi-layer perceptron respectively, to obtain a first span prediction score vector and a first relationship prediction score vector corresponding to the arbitrary word pair representation, as the first prediction result, which are expressed as follows:

[0182]

[0183]

[0184] Where, Representation word pair The first span prediction score vector, Representation word pair The first relation prediction score vector, Representation word pair The corresponding span prediction feature vector in the third fusion feature vector, Representation word pair The corresponding relationship prediction feature vector in the third fusion feature vector, represents the third preset multilayer perceptron, Represents the fourth preset multilayer perceptron.

[0185] Understandable, refer again Figure 3In order to fully capture the local information of all word pairs, this embodiment uses two convolutional neural network layers to predict the span information and relationship information of word pairs respectively, and the network structures of the two are consistent. A convolutional neural network consists of three components, a gated conditional normalization layer, two word pair grid embeddings (i.e., relative distance embedding and region embedding) and a multi-scale dilated convolution layer. Among them, only the gated conditional normalization layer is shared by span and relationship prediction. This embodiment superimposes a multi-scale dilated convolution layer in combination with dilated convolutions with different dilation rates. By combining dilated convolutions with different dilation rates, although the network has a relatively small perception range, the density of information capture is significantly improved. Therefore, the model of the present application uses two convolutional neural networks with the same structure to extract features from the grid feature representation, and obtains the first span prediction score vector and the first relationship prediction score vector respectively.

[0186] In this embodiment, regarding the relative distance embedding and region embedding, after obtaining the relative distance position of the word pair, the model can use the value of the relative distance position as an index to obtain the relative distance embedding of the word pair. When performing span prediction and relationship prediction, the relative distance embedding is consistent, and the unified relative distance embedding of the word pair is ,in Represents span prediction or relation prediction. Another word pair grid embedding is the word pair region embedding. For span prediction, the model aims to locate the predicted label in the upper triangle of the word pair span matrix, while relation prediction focuses on the region where the trigger word is located. To achieve the prediction task, the word pair region indexes of span and relation need to be indexed through the matrix to obtain their respective region embeddings. For span prediction, the value of the lower triangular area of ​​the word pair region index matrix is ​​set to 1, the upper triangular area is set to 2, and the area filled by [PAD] is set to 0; for relation prediction, the word pair region index matrix considers the area where the trigger word and the corresponding argument are located based on the previous design, and its value is set to 3. Finally, the model obtains the word pair region embeddings required for span prediction and relation prediction through these two index matrices. The size of the word pair region embedding for span prediction is 3, while the size of the word pair region embedding for relation prediction is 4. In order to simplify the description, the word pair region embeddings are uniformly recorded as .

[0187] In step 160, refer again to Figure 3 In order to allow the head word meta-information and tail word meta-information of the trigger word or argument to interact, the model uses a deep biaffine attention mechanism (Deep Biaffine) to form a span extractor and a relation extractor.

[0188] According to the first feature vector, performing probability prediction on the input data based on a preset bi-affine attention prediction strategy to obtain a second prediction result may include:

[0189] The first feature vector is encoded by a fifth preset multi-layer perceptron and a sixth preset multi-layer perceptron respectively to obtain a head feature representation and a tail feature representation of the word unit in the input data as a word unit feature representation, which is expressed as follows:

[0190]

[0191]

[0192] Where, and Respectively represent the head feature representation and tail feature representation of the word, represents the fifth preset multilayer perceptron, Represents the sixth preset multilayer perceptron;

[0193] Since the traditional deep dual affine attention mechanism only uses the head feature representation and tail feature representation of the word and ignores the information within each trigger word or argument, the following feature fusion is performed on the head feature representation and tail feature representation of the word.

[0194] The word unit feature representation is concatenated with the first feature vector, and the concatenated word unit feature representation is encoded by a seventh preset multi-layer perceptron and an eighth preset multi-layer perceptron, respectively, so as to perform feature fusion on the first feature vector and the head feature representation, and on the first feature vector and the tail feature representation, respectively, to obtain a fourth fused feature vector and a fifth fused feature vector, which are expressed as follows:

[0195]

[0196]

[0197] Where, represents the seventh preset multilayer perceptron, represents the eighth preset multilayer perceptron, Represents vector concatenation operation, Represents the first eigenvector after concatenation by the seventh preset multi-layer perceptron Head feature representation After encoding, the fourth fused feature vector is obtained. Represents the first eigenvector after concatenation by the eighth preset multi-layer perceptron and tail feature representation After encoding, the fifth fused feature vector is obtained;

[0198] The model then uses the following dual affine attention mechanism to predict a span prediction score vector for a trigger word or argument.

[0199] Based on the fourth fused feature vector and the fifth fused feature vector, a span prediction in the probability prediction is performed on any word pair representation in the input data through the first biaffine attention prediction strategy to obtain a second span prediction score vector corresponding to the any word pair representation, which is expressed as follows:

[0200]

[0201] Where, Representation word pair The second span prediction score vector, and Represent the fourth fusion feature vector The i-th eigenvector and the fifth fused eigenvector in The jth eigenvector in , 、 and are learnable parameters, Represents vector concatenation operation;

[0202] In order to capture the relationship between the trigger word and the argument, a bilinear transformation operation is performed on the first feature vector to obtain the relationship feature matrix between the word elements in the input data, which is expressed as follows:

[0203]

[0204] Where, Represents the relationship feature matrix between word units, represents the activation function, represents the first eigenvector, represents a learnable bilinear transformation matrix;

[0205] In this embodiment, although The feature matrix represents the relationship between word units, but there is no word boundary information to constrain it. In order to effectively utilize the word boundary information, the model uses the following calculation method to fuse the head feature representation and tail feature representation of the word into the feature representation of the word.

[0206] The concatenated features of the first feature vector, the fourth fused feature vector, and the fifth fused feature vector are encoded by a ninth preset multi-layer perceptron to obtain a boundary constraint feature vector, which is expressed as follows:

[0207]

[0208] Where, represents the boundary constraint feature vector, Represents the ninth preset multilayer perceptron;

[0209] Then, the relationship feature matrix is ​​encoded by the tenth preset multi-layer perceptron to obtain a sixth fused feature vector, which is expressed as follows:

[0210]

[0211] Where, represents the sixth fused eigenvector, Represents the tenth preset multilayer perceptron;

[0212] Then, the second biaffine attention prediction strategy is used to perform relationship prediction in probability prediction on the arbitrary word pair representation in the input data to obtain a second relationship prediction score vector corresponding to the arbitrary word pair representation, which is expressed as follows:

[0213]

[0214] Where, Representation word pair The second relationship prediction score vector, and Represent the boundary constraint feature vectors The i-th eigenvector and the sixth fused eigenvector in The jth eigenvector in , 、 and are learnable parameters, Represents vector concatenation operation;

[0215] The second span prediction score vector and the second relationship prediction score vector are used as the second prediction result.

[0216] Finally, in step 170, the model integrates the span and relation prediction score vectors based on the convolutional neural network with the span and relation prediction score vectors based on the deep bi-affine attention mechanism, and then uses the Softmax activation function to obtain the word pair The final span and relationship prediction probability results are also the event extraction results.

[0217] Specifically, in step 170, the first prediction result and the second prediction result are fused and output to obtain an event extraction result, which may include:

[0218] pass The activation function integrates the first span prediction score vector in the first prediction result and the second span prediction score vector in the second prediction result, as well as the first relationship prediction score vector in the first prediction result and the second relationship prediction score vector in the second prediction result, to obtain the event extraction result, which is expressed as follows:

[0219]

[0220]

[0221] Where, Represents word pairs in the input data The corresponding first span prediction score vector, Representation word pair The corresponding second span prediction score vector, Representation word pair The corresponding first relationship prediction score vector, Representation word pair The corresponding second relationship prediction score vector, represents the comprehensive span prediction score vector, represents a comprehensive relationship prediction score vector, and the comprehensive span prediction score vector and the comprehensive relationship prediction score vector are used as the event extraction result.

[0222] For easier understanding, please refer to Figure 3 The embodiment of the present application also provides an event extraction model as an implementation environment of the above event extraction method. The event extraction model includes an input layer, a coding layer, an information fusion layer, a span-relation joint prediction layer and an output layer. Figure 3 The event extraction model shown in the figure again describes the overall implementation process of the above event extraction method as follows:

[0223] ①The input layer receives text data and converts it into word representation;

[0224] ② The encoding layer uses BERT and AGGCN to extract trigger word embeddings that represent the semantic features of the text event and structural embeddings that represent the structural features;

[0225] ③ The information fusion layer uses the attention mechanism and P-Tuning technology to obtain the virtual event type embedding, and then conditionally fuses the event type features (i.e., virtual event type embedding), event semantic features (trigger word embedding), and event structure features (structure embedding) through the gated conditional normalization (GCLN) layer to obtain the first feature vector;

[0226] ④ The span-relation joint prediction layer regards the trigger word and argument extraction task as the span and relationship discrimination task between word pairs. On the one hand, a convolutional neural network is used to capture the local and global information between word pairs, obtain the dependency relationship between words, and perform probability estimation to obtain the first prediction result (i.e., the first span prediction score vector and the first relationship prediction score vector). On the other hand, a span and relationship extractor is used to capture the head and tail feature information of the argument and trigger word, as well as the dependency relationship information between the two. Then, a deep dual affine transformation network is used to perform probability prediction on the word pair to obtain the second prediction result (i.e., the second span prediction score vector and the second relationship prediction score vector).

[0227] ⑤The output layer integrates the span and relationship prediction score vector based on the convolutional neural network with the span and relationship prediction score vector based on the deep bi-affine attention mechanism, and then uses the Softmax activation function to obtain the final span and relationship prediction probability results of the word pair as the event extraction result.

[0228] It should be noted that those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working process of the above-mentioned electronic device 100 can refer to the corresponding processes of each step in the aforementioned event extraction method, and will not be elaborated here.

[0229] The present application also provides a computer-readable storage medium that stores a computer program, which, when executed on a computer, causes the computer to execute the event extraction method described in the above embodiment.

[0230] An embodiment of the present application further provides a computer program product, including a computer program, which implements the above-mentioned event extraction method when executed by the processor 101.

[0231] Through the description of the above implementation methods, those skilled in the art can clearly understand that the present application can be implemented through hardware or by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each implementation scenario of the present application.

[0232] In summary, the embodiments of the present application provide an event extraction method, electronic device, storage medium and program product. In this technical solution, first, input data containing the event to be extracted is obtained. Then, based on a preset feature encoding strategy, feature encoding is performed on the input data to obtain trigger word embedding and structure embedding. Then, a preset virtual event type embedding that represents the event type characteristics is obtained, and the trigger word embedding, structure embedding and preset virtual event type embedding are feature fused to obtain a first feature vector. Then, based on the first feature vector, a probability prediction is performed on the input data based on a preset convolutional network prediction strategy to obtain a first prediction result. Then, based on the first feature vector, a probability prediction is performed on the input data based on a preset dual affine attention prediction strategy to obtain a second prediction result. Finally, the first prediction result and the second prediction result are fused and output to obtain an event extraction result. In this way, the event extraction model learns event types in different fields through virtual event type embedding, constrains trigger words, improves the generalization of the model, and improves the problem that traditional event extraction methods cannot effectively identify and extract event trigger words and arguments in text without predefined event patterns.

[0233] In the embodiments provided in the present application, it should be understood that the disclosed method can also be implemented in other ways. The method embodiments described above are merely schematic. For example, the flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the methods and computer program products according to the multiple embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of code, and a part of the module, program segment or code includes one or more executable instructions for implementing the specified logical function. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions. In addition, the functional modules in the various embodiments of the present application can be integrated together to form an independent part, or each module can exist alone, or two or more modules can be integrated to form an independent part.

[0234] The above description is merely an embodiment of the present application and is not intended to limit the scope of protection of the present application. For those skilled in the art, various modifications and variations of the present application are possible. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. An event extraction method, characterized in that: The method comprises: Get the input data containing the events to be extracted; Based on a preset feature encoding strategy, feature encoding is performed on the input data to obtain trigger word embeddings representing semantic features of the input data and structural embeddings representing structural features of the input data; Obtaining a preset virtual event type embedding that represents event type features; Performing feature fusion on the trigger word embedding, the structure embedding, and the preset virtual event type embedding to obtain a first feature vector corresponding to the input data; According to the first feature vector, a probability prediction is performed on the input data based on a preset convolutional network prediction strategy to obtain a first prediction result; According to the first feature vector, a probability prediction is performed on the input data based on a preset dual affine attention prediction strategy to obtain a second prediction result; fusing and outputting the first prediction result and the second prediction result to obtain an event extraction result; The trigger word embedding, the structure embedding, and the preset virtual event type embedding are subjected to feature fusion to obtain a first feature vector corresponding to the input data, including: For the target trigger word embedding in the trigger word embedding, the attention score of the target trigger word embedding and the preset virtual event type embedding is determined by the following formula, where the target trigger word embedding represents the second feature vector corresponding to the trigger word with overlapping conditions in the trigger word embedding: ; Where, represents the inner product operation, Represents the target trigger word embedding With the The attention scores of the virtual event type embeddings, , represents the total number of virtual event type embeddings in the preset virtual event type embeddings; Sort multiple virtual event type embeddings in the preset virtual event type embeddings based on the attention scores, and select the top m virtual event type embeddings with the largest attention scores as target virtual event type embeddings, where m is equal to the maximum number of target trigger word embeddings; Performing feature encoding on the target virtual event type embedding by a first preset multi-layer perceptron to obtain a virtual event embedding feature; A first gated conditional normalization operation is performed on the trigger word embedding and the virtual event embedding features to obtain a first fused feature vector, which is expressed as follows: ; ; ; Where, and Respectively represent the multiplication of vector elements and vector splicing operations, 、 、 、 are learnable parameters, Representing the feature vector in the structural embedding In the feature vector Perform gated conditional normalization on the condition, represents the feature vector in the trigger word embedding, express The corresponding virtual event embedding features, represents the first gating unit, and is the feature vector in the structural embedding The mean and standard deviation between each dimension are expressed as follows: ; ; Where, Represents the first The first eigenvector dimensional eigenvalues; The first fused feature vector is concatenated with the structural embedding to obtain a second fused feature vector as the first feature vector, which is expressed as follows: ; Where, Representing words to word The first fused feature vector between represents structural embedding, 、 and are learnable parameters, Represents the sigmoid activation function.

2. The method according to claim 1, characterized in that Get the input data containing the events to be extracted, including: Get the text data containing the event to be extracted; Splitting the text data into word-unit representations; Performing vector conversion on the word unit representation to obtain a word unit embedding vector corresponding to the word unit representation; By using a preset AMR parsing strategy, the word element representation is converted into an AMR graph representation to obtain trigger word node information; The word element embedding vector and the trigger word node information are used as the input data.

3. The method according to claim 1, characterized in that Based on a preset feature encoding strategy, feature encoding is performed on the input data to obtain trigger word embeddings representing semantic features of the input data and structural embeddings representing structural features of the input data, including: Performing a first feature encoding on the input data using a preset BERT pre-trained model to obtain the trigger word embedding; The input data is subjected to a second feature encoding using a preset AGGCN pre-training model to obtain the structural embedding.

4. The method according to claim 1, wherein According to the first feature vector, a probability prediction is performed on the input data based on a preset convolutional network prediction strategy to obtain a first prediction result, including: A second gated conditional normalization operation is performed on the first feature vectors corresponding to any two word-unit representations in the input data to obtain a word pair relationship feature between the any two word-unit representations, which is expressed as follows: ; ; ; ; Where, and Represent word representation and The corresponding first eigenvector, 、 、 、 and are learnable parameters, represents the second gating unit, and Represent word representation The corresponding first eigenvector The mean and standard deviation between the dimensions in are expressed as follows: ; ; Where, Representation of word The corresponding first eigenvector No. dimensional eigenvalues; Obtaining a preset first index matrix and a preset second index matrix; Determining word pair relative distance embedding and word pair region embedding respectively by using the preset first index matrix and the preset second index matrix; The concatenated features of the word pair relationship features, the word pair relative distance embeddings, and the word pair region embeddings are encoded by a second preset multi-layer perceptron to obtain a grid feature representation, which is expressed as follows: ; Where, represents the grid feature representation, Represents span prediction or relationship prediction in probability prediction, Represents the word pair relationship feature, Represents the relative distance embedding of word pairs, represents word pair region embedding, Represents the second preset multilayer perceptron; The grid feature representation is extracted through the dilated convolutional network to obtain a third fused feature vector, which is expressed as follows: ; Where, The expansion rate is Dilated convolutional network for grid feature representation The third fused feature vector obtained after feature extraction, represents the ReLU activation function, The expansion rate is dilated convolution; For any word pair representation in the input data, the span prediction feature vector and the relationship prediction feature vector in the third fused feature vector corresponding to the arbitrary word pair representation are encoded by the third preset multi-layer perceptron and the fourth preset multi-layer perceptron respectively, to obtain the first span prediction score vector and the first relationship prediction score vector corresponding to the arbitrary word pair representation, as the first prediction result, which are expressed as follows: ; ; Where, Representation word pair The first span prediction score vector, Representation word pair The first relation prediction score vector, Representation word pair The corresponding span prediction feature vector in the third fusion feature vector, Representation word pair The corresponding relationship prediction feature vector in the third fusion feature vector, represents the third preset multilayer perceptron, Represents the fourth preset multilayer perceptron.

5. The method according to claim 1, wherein According to the first feature vector, a probability prediction is performed on the input data based on a preset dual affine attention prediction strategy to obtain a second prediction result, including: The first feature vector is encoded by a fifth preset multi-layer perceptron and a sixth preset multi-layer perceptron respectively to obtain a head feature representation and a tail feature representation of the word unit in the input data as a word unit feature representation, which is expressed as follows: ; ; Where, and Respectively represent the head feature representation and tail feature representation of the word, represents the fifth preset multilayer perceptron, Represents the sixth preset multilayer perceptron; The word unit feature representation is concatenated with the first feature vector, and the concatenated word unit feature representation is encoded by a seventh preset multi-layer perceptron and an eighth preset multi-layer perceptron, respectively, so as to perform feature fusion on the first feature vector and the head feature representation, and on the first feature vector and the tail feature representation, respectively, to obtain a fourth fused feature vector and a fifth fused feature vector, which are expressed as follows: ; ; Where, represents the seventh preset multilayer perceptron, represents the eighth preset multilayer perceptron, Represents vector concatenation operation, Represents the first eigenvector after concatenation by the seventh preset multi-layer perceptron Head feature representation After encoding, the fourth fused feature vector is obtained. Represents the first eigenvector after concatenation by the eighth preset multi-layer perceptron and tail feature representation After encoding, the fifth fused feature vector is obtained; Based on the fourth fused feature vector and the fifth fused feature vector, a span prediction in the probability prediction is performed on any word pair representation in the input data through the first biaffine attention prediction strategy to obtain a second span prediction score vector corresponding to the any word pair representation, which is expressed as follows: ; Where, Representation word pair The second span prediction score vector, and Represent the fourth fusion feature vector The i-th eigenvector and the fifth fused eigenvector in The jth eigenvector in , 、 and are learnable parameters, Represents vector concatenation operation; A bilinear transformation operation is performed on the first feature vector to obtain a relationship feature matrix between word units in the input data, which is expressed as follows: ; Where, Represents the relationship feature matrix between word units, represents the activation function, represents a learnable bilinear transformation matrix; The concatenated features of the first feature vector, the fourth fused feature vector, and the fifth fused feature vector are encoded by a ninth preset multi-layer perceptron to obtain a boundary constraint feature vector, which is expressed as follows: ; Where, represents the boundary constraint feature vector, Represents the ninth preset multilayer perceptron; The relationship feature matrix is ​​encoded by the tenth preset multi-layer perceptron to obtain a sixth fused feature vector, which is expressed as follows: ; Where, represents the sixth fused eigenvector, Represents the tenth preset multilayer perceptron; By using the second biaffine attention prediction strategy, the relationship prediction in the probability prediction is performed on the arbitrary word pair representation in the input data to obtain the second relationship prediction score vector corresponding to the arbitrary word pair representation, which is expressed as follows: ; Where, Representation word pair The second relationship prediction score vector, and Represent the boundary constraint feature vectors The i-th eigenvector and the sixth fused eigenvector in The jth eigenvector in , 、 and are learnable parameters, Represents vector concatenation operation; The second span prediction score vector and the second relationship prediction score vector are used as the second prediction result.

6. The method according to claim 1, wherein The first prediction result and the second prediction result are fused and output to obtain an event extraction result, including: pass The activation function integrates the first span prediction score vector in the first prediction result and the second span prediction score vector in the second prediction result, as well as the first relationship prediction score vector in the first prediction result and the second relationship prediction score vector in the second prediction result, to obtain the event extraction result, which is expressed as follows: ; ; Where, Represents word pairs in the input data The corresponding first span prediction score vector, Representation word pair The corresponding second span prediction score vector, Representation word pair The corresponding first relationship prediction score vector, Representation word pair The corresponding second relationship prediction score vector, represents the comprehensive span prediction score vector, represents a comprehensive relationship prediction score vector, and the comprehensive span prediction score vector and the comprehensive relationship prediction score vector are used as the event extraction result.

7. An electronic device, characterized in that: The electronic device includes a processor and a memory coupled to each other, wherein a computer program is stored in the memory. When the computer program is executed by the processor, the electronic device executes the method according to any one of claims 1 to 6.

8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is run on a computer, the computer is caused to execute the method according to any one of claims 1 to 6.

9. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Script event prediction method based on action scene enhancement

    CN113919319A

  • Feature and attention mechanism fusion-based event joint extraction system

    CN114298053A