Event extraction, training method of its model, and its device, equipment and medium

By screening the target sample text with decision-making impact for noise reduction training, the problem of high training cost of existing event extraction models is solved, and more efficient model training and improvement of effect is achieved.

CN114328916BActive Publication Date: 2024-11-08IFLYTEK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111572355.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-21
Publication Date
2024-11-08
Estimated Expiration
2041-12-21

AI Technical Summary

Technical Problem

The training cost of existing event extraction models is high and it is difficult to effectively reduce noise, resulting in low training efficiency and poor results of model training.

Method used

By using the target sample text in the first sample set to train the event extraction model first, the decision-making impact is obtained, and the target sample text with promotion effect is selected, the second sample set is formed, and the second training is performed on it. Noise reduction is performed based on decision-making impact.

Benefits of technology

It reduces the training cost of event extraction models, improves the training efficiency and effect of the model, and avoids the use of complex training methods such as contrast learning and confrontation learning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114328916B_ABST
    Figure CN114328916B_ABST
Patent Text Reader

Abstract

The present application discloses an event extraction, a training method for a model thereof, and an apparatus, a device and a medium thereof, wherein the training method for the event extraction model comprises: performing a first training on the event extraction model using target sample texts in a first sample set, wherein the event extraction model is used to predict event classification of texts; obtaining the decision influence of each target sample text in the first sample set on the event extraction model; screening out at least one target sample text from the first sample set based on the decision influence to obtain a second sample set; performing a second training on the event extraction model using the target sample texts in the second sample set. The above scheme directly reduces noise on the target text sample based on the decision influence of the target sample text on the event extraction model, thereby saving the training cost of the event extraction model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of natural language processing, and in particular to an event extraction, a training method of a model thereof, and a device, equipment and medium thereof. Background Art

[0002] In recent years, with the development of industrial control technology and computer network communication technology, industrial bus standards such as RS422 and RS485 have emerged, and are constantly evolving towards supporting multiple sub-nodes, high communication rates, long-distance transmission, high receiving sensitivity and lower costs.

[0003] With the development of the Internet era, countless information has emerged explosively. Manually processing a large amount of text is very complicated and time-consuming. The information extraction task is mainly to automatically extract the specific information that users want from a large amount of text, and to extract structured information from unstructured text to automatically classify massive content. Information extraction tasks include event extraction. For example, in the field of news, since countless new news and events are generated every day, by extracting events from news, we can get the main events that occurred in a piece of news, but manually processing a large amount of text is very complicated and time-consuming.

[0004] Even if models are used to extract events from text, the noise of training samples is very large during model training, so contrastive learning, adversarial learning, and reinforcement learning are needed to reduce the noise of training samples, which leads to complex model training, difficult model convergence, and high training costs. In view of this, how to save the training cost of the model has become an urgent problem to be solved. Summary of the invention

[0005] The main technical problem solved by the present application is to provide an event extraction and a model training method thereof, as well as an apparatus, equipment and medium thereof, which can save the training cost of the event extraction model.

[0006] In order to solve the above technical problems, the first aspect of the present application provides a training method for an event extraction model, comprising: performing a first training on the event extraction model using target sample texts in a first sample set, wherein the event extraction model is used to predict event classification of text; obtaining the decision influence of each target sample text in the first sample set on the event extraction model; screening out at least one target sample text from the first sample set based on the decision influence to obtain a second sample set; and performing a second training on the event extraction model using the target sample texts in the second sample set.

[0007] In order to solve the above technical problems, the second aspect of the present application provides an event extraction method, comprising: using the event extraction model training method described in the first aspect to train an event extraction model; obtaining a text to be extracted; using the event extraction model to perform event extraction on the text to be extracted, and obtaining an event classification of the text to be extracted.

[0008] In order to solve the above technical problems, the third aspect of the present application provides a training device for an event extraction model, including: a first training module, an acquisition module, a screening module and a second training module, the first training module being used to perform a first training on the event extraction model using a target sample text in a first sample set, wherein the event extraction model is used to predict event classification of a text; the acquisition module being used to obtain the decision influence of each target sample text in the first sample set on the event extraction model; the screening module being used to screen out at least one target sample text from the first sample set based on the decision influence to obtain a second sample set; and the second training module being used to perform a second training on the event extraction model using the target sample text in the second sample set.

[0009] In order to solve the above technical problems, the fourth aspect of the present application provides an event extraction device, including a training module, a file acquisition module and a classification module. The training module is used to train an event extraction model using the training method of the event extraction model described in the first aspect above; the file acquisition module is used to acquire the text to be extracted; and the classification module is used to perform event extraction on the text to be extracted using the event extraction model to obtain event classification of the text to be extracted.

[0010] In order to solve the above-mentioned technical problems, the fifth aspect of the present application provides an electronic device, comprising a memory and a processor coupled to each other, wherein the processor is used to execute program instructions stored in the memory to implement the training method of the event extraction model described in the first aspect, or to implement the event extraction method described in the second aspect.

[0011] In order to solve the above technical problems, the sixth aspect of the present application provides a computer-readable storage medium, which stores program instructions that can be executed by a processor, and the program instructions are used to implement the training method of the event extraction model described in the first aspect above, or to implement the event extraction method described in the second aspect above.

[0012] In the above scheme, after the target sample text in the first sample set is used to perform the first training on the event extraction model for predicting event classification of text, the decision influence of each target sample text in the first sample set on the event extraction model is obtained, and at least one target sample text is screened out from the first sample set based on the decision influence to obtain a second sample set. The target sample text in the second sample set can then be used to perform the second training on the event extraction model. Compared with manual denoising or the use of contrastive learning, adversarial learning, and reinforcement learning to perform sample denoising, this scheme directly denoises the target text sample based on the decision influence of the target sample text on the event extraction model, which can save the training cost of the event extraction model. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 It is a flowchart of an embodiment of a training method for an event extraction model of the present application;

[0014] Figure 2 It is a flowchart of another embodiment of the training method of the event extraction model of the present application;

[0015] Figure 3 It is a flowchart of step S29 of another embodiment of the training method of the event extraction model of the present application;

[0016] Figure 4 It is a flowchart of an embodiment of the event extraction method of the present application;

[0017] Figure 5 It is a schematic diagram of the framework of an embodiment of a training device for an event extraction model of the present application;

[0018] Figure 6 It is a schematic diagram of the framework of an embodiment of the event extraction device of the present application;

[0019] Figure 7 It is a schematic diagram of the framework of an embodiment of the electronic device of the present application;

[0020] Figure 8 It is a schematic diagram of a framework of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION

[0021] The scheme of the embodiment of the present application is described in detail below in conjunction with the drawings of the specification.

[0022] In the following description, for the purpose of explanation rather than limitation, specific details such as specific system structures, interfaces, and technologies are provided to facilitate a thorough understanding of the present application.

[0023] The terms "system" and "network" are often used interchangeably in this article. The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship. In addition, "many" in this article means two or more than two.

[0024] See also Figure 1 , Figure 1 This is a flow chart of an embodiment of a training method for an event extraction model of the present application. Specifically, it may include the following steps:

[0025] Step S11: Perform a first training on the event extraction model using the target sample text in the first sample set.

[0026] The event extraction model is used to predict the event classification of the text. When the event extraction model is trained using various sample texts, the sentence representation of the target sample text can be obtained, the classification probability distribution of each word in the sentence representation can be obtained, and then the event classification of each word can be obtained based on the classification probability distribution of each word. Finally, the predicted event classification of the target sample text can be obtained using the event classification of each word, thereby obtaining the event prediction information of the target sample text. The event prediction information may include classification probability distribution, predicted event classification, etc. The classification probability distribution is the result of the text processing before the event extraction model performs event classification. It is used to characterize the matrix representation of the probability size of each word belonging to each preset classification. For example, the classification probability distribution of a text is a two-dimensional matrix of the number of words in the text multiplied by the number of preset classifications, and the classification probability distribution of multiple texts is a three-dimensional matrix of the number of texts, the number of words in the text, and the number of preset classifications. Among them, the preset classifications can be customized, and the text can be the original sample text, expanded sample text, target sample text, test sample text, verification sample text, text to be extracted, etc. In addition, the event extraction model can use deep learning models such as CNN (Convolution Neural Network), RNN (Recurrent Neural Network), BERT (Bidirectional Encoder Representation from Transformers) to train the model's category classifier. In an actual scenario, the event extraction model can be a BERT model with a simple model structure plus a fully connected layer, and each target sample text in the first sample set is input into the event extraction model to obtain the sentence representation of the target sample text. The sequence labeling method is used to perform multiple classifications on each word in the sentence, and then a fully connected layer is used to obtain the corresponding classification probability distribution, and the maximum value of the classification probability distribution is taken as the classification corresponding to each word.

[0027] The first sample set includes several target sample texts, which can be texts in various application scenarios such as news, and are not specifically limited here. The target sample texts can be obtained by using a data enhancement method to expand the original sample texts in the original sample set to obtain several expanded sample texts, or at least part of the original sample texts in the original sample set. For example, in a public embodiment, before using the target sample texts in the first sample set to perform the first training on the event extraction model, the original sample texts in the original sample set can be expanded using a data enhancement method to obtain several expanded sample texts; at least part of the original sample texts in the original sample set and several expanded sample texts are used as target sample texts to form the first sample set. Therefore, through the data enhancement method, the purpose of automatically constructing training data and automatically expanding the sample set can be achieved.

[0028] The data enhancement method can be based on text, directly generating the expanded sample text, or based on representation, denoising the generated expanded sample text. The above data enhancement method can include dictionary replacement, word vector-based replacement, TF-IDF-based replacement, random word insertion, random exchange, random deletion, pre-trained model generation, or other data enhancement methods. The original sample text includes text content and its corresponding label. In order to maintain the consistency of the label, when the data enhancement method is used to perform data expansion on the original sample text in the original sample set, the label is kept unchanged as much as possible or the label is replaced with a synonym to avoid label offset. When the data enhancement method includes dictionary replacement, the word to be replaced is selected from the original sample text, and the word to be replaced is replaced with a synonym in the word library with the same semantics as the word to be replaced, wherein the word library includes but is not limited to WordNet, FrameNet and other word libraries. When the data enhancement method includes word vector replacement, a word is randomly selected from the original sample text for replacement. For example, based on pre-trained word vectors, such as word2vec, glove, etc., the words selected in the original sample text are replaced with words that are closer in the vector space. The data enhancement method includes replacing based on TF-IDF (term frequency–inverse document frequency), using the TF-IDF method to traverse the words of the original sample text, and replacing the words with low TF-IDF scores with preset words. Since a low TF-IDF score indicates that the word appears less frequently in the original sample text and provides less information, after replacing the words with low TF-IDF scores, the label consistency of the original sample text can still be guaranteed. The data enhancement method includes randomly inserting words, randomly selecting a word that is not a stop word from the original sample text, obtaining a synonym of the word, and inserting the synonym into a random position of the original sample text. In addition, in order to ensure the consistency of the label, the random position can be a position other than the label position. The data enhancement method includes randomly exchanging, randomly replacing the positions of several words in the original sample text, and in addition, in order to ensure the consistency of the label, several words do not include the label text. The data enhancement method includes randomly deleting, deleting several words in the original sample text, and in addition, in order to ensure the consistency of the label, several words do not include the label text. The pre-trained model generation method is to mask some words in the text, and use the pre-trained model to generate new words and replace the masked words. For example, in order to ensure label consistency, when the label is masked, label identifiers are added on both sides of the masked position to limit the text generation of the masked label content and prevent semantic deviation from the original sample text.In an actual scenario, the original sample text is: From 0:00 to 24:00 on October 27, 2 new local confirmed cases of new coronary pneumonia were reported in place A, and then the location label identifier was set. <loc>Limit the range of generated text content so that the labels will not deviate too much, so that the pre-training model input is: October 27 0:00 to 24:00, <loc> <mask> <loc>Two new local confirmed cases of COVID-19 were added, and the expanded sample text was obtained: From 0:00 to 24:00 on October 27, two new local confirmed cases of COVID-19 were added in area B. In the above data enhancement method, when using synonyms to replace words in the original sample text or the pre-training model generation method, the label can be replaced. In other cases, the words in the original sample text except the label are processed to maintain the consistency of the label.

[0029] In the prior art, when the original sample text is expanded by manual sample annotation or the original sample text in the original sample set is expanded by data enhancement, since the quality of the expanded sample text cannot be determined, the data enhancement method can only be simply superimposed, and the current classification task is inferred from the model training results to determine whether it is suitable for the data enhancement method used. Generally, only 1-2 data enhancement methods are used, and the data enhancement method needs to be selected manually later. Therefore, there are at least the following disadvantages: high training cost; limited number of expanded sample texts and types of data enhancement methods, especially for scenes such as sudden news event extraction, the generated expanded sample text is still insufficient; there is a lot of noise in the expanded sample text, and the labels of many expanded sample texts may change, which has no promoting effect on the event extraction model, but reduces the event extraction classification effect. Compared with the prior art, the data enhancement method of this scheme is no longer restricted to a certain method. All data enhancement methods that maintain label consistency can be used alone or arbitrarily superimposed, so there is no limit on the data enhancement method and the number of methods, and more data enhancement methods are used as much as possible to effectively obtain more training data and quickly expand the training set.

[0030] Step S12: Obtain the decision-making influence of each target sample text in the first sample set on the event extraction model.

[0031] After the event extraction model is first trained using the target sample text in the first sample set, a subsampling process is added, specifically referring to step S12 and step S13, to evaluate each target sample text in the first sample set to determine its decision impact on the model training. Since the decision impact indicates whether the target sample text has a promoting effect on the model training or the size of the promoting effect, the target sample text in the first sample set that has a greater promoting effect on the model training can be found in the end, thereby effectively reducing the noise of the target sample text and improving the model effect.

[0032] The method for obtaining the decision influence is not specifically limited. For example, in a disclosed embodiment, when obtaining the decision influence of each target sample text in the first sample set on the event extraction model, the event extraction model that has been trained for the first time can be used to perform event prediction on each target sample text in the first sample set to obtain the first event prediction information of each target sample text; based on the first event prediction information of each target sample text, the decision influence of each target sample text is determined. Among them, the first event prediction information of the target sample text may include the first classification probability distribution of the target sample text, or the predicted event classification of the target sample text. Therefore, the decision influence of each target sample text is determined by using the first event prediction information obtained by event prediction of the target sample text by the event extraction model. Since the event extraction model has been adjusted in parameters after the first training, the decision influence can reflect the training influence of the target sample text on the event extraction model.

[0033] Step S13: at least one target sample text is selected from the first sample set based on the decision influence to obtain a second sample set.

[0034] Each target sample text corresponds to its decision-making influence on the event extraction model. The decision-making influences of each target sample text on the event extraction model are compared, and at least one target sample text is screened out from the first sample set to obtain a second sample set, thereby reducing the noise of the target sample text, and screening out target sample texts with better decision-making influence for the second training. In a disclosed embodiment, when at least one target sample text is screened out from the first sample set based on the decision influence to obtain the second sample set, the target sample text whose decision influence meets the preset influence condition is selected from the first sample set to obtain the second sample set. The preset influence condition is that the decision influence is greater than the preset influence value, or is within the first preset proportion range in the decision influence of each target sample text in the first sample set sorted from high to low. The preset influence condition, preset influence value, and preset proportion range can all be customized and adjusted, and are not specifically limited here.

[0035] Data denoising technology is crucial in the direction of event extraction. In the era of artificial intelligence, training a high-quality information extraction model can achieve rapid and automatic screening of massive data, but how to obtain high-quality training data and achieve rapid and high-quality training data construction is an urgent problem that needs to be solved. Among the expanded sample texts generated by the data enhancement method, not all samples have a promoting effect on the model. During the training process, the model needs to be able to select high-quality data that can help the model training from the expanded sample texts obtained by the data enhancement method, so as to effectively use a variety of data enhancement methods. The existing methods for denoising the target sample text generally use adversarial learning, contrastive learning, reinforcement learning, etc., to perform complex training on the model, the model is difficult to converge, the training cost is high, and the model complexity is high and the model training efficiency is low. In this case, the decision-making influence of each target sample text in the first sample set on the event extraction model is obtained, and at least one target sample text is selected from the first sample set based on the decision-making influence. The decision-making influence of each target sample text on the model training effect is obtained directly through calculation, so as to achieve automated high-quality data sampling, which can more effectively save training costs.

[0036] Step S14: Perform a second training on the event extraction model using the target sample text in the second sample set.

[0037] When the event extraction model is trained for the second time using the target sample text in the second sample set, the training text for the second training is the target sample text after denoising the target sample text using decision influence, and the model training can be implemented by any existing model training method.

[0038] When the event extraction model is first trained using the target sample text in the first sample set, or the event extraction model is second trained using the target sample text in the second sample set, the event extraction model can be used to predict events on the target sample text to obtain the second event prediction information of the target sample text, thereby using the second event prediction information of the target sample text to determine the loss of this training, and adjust the parameters of the event extraction model based on the loss of this training. The second event prediction information can be a classification probability distribution or a predicted event classification. The loss calculation method can be a cross entropy loss function.

[0039] The above scheme uses the target sample text in the first sample set to perform a first training on the event extraction model for event classification of predictive text, and then obtains the decision influence of each target sample text in the first sample set on the event extraction model, thereby screening out at least one target sample text from the first sample set based on the decision influence to obtain a second sample set. The target sample text in the second sample set can then be used to perform a second training on the event extraction model. Compared with manual denoising or the use of contrastive learning, adversarial learning, and reinforcement learning to perform sample denoising, this scheme denoises the target text samples based on the decision influence of the target sample text on the event extraction model, which can save the training cost of the event extraction model.

[0040] See also Figure 2 , Figure 2 This is a flow chart of another embodiment of the training method of the event extraction model of the present application. Specifically, it may include the following steps:

[0041] Step S21: using a data enhancement method to perform data expansion on the original sample text in the original sample set to obtain a number of expanded sample texts, and taking at least part of the original sample text in the original sample set and the several expanded sample texts as target sample texts to form a first sample set.

[0042] The expanded sample text is obtained by transforming the original sample text in the original sample set using the data enhancement method, so that the number of target sample texts is greatly increased, but the expanded sample text may have problems such as label offset, so it is necessary to reduce the noise of the target sample text. The description of step S21 can refer to the above step S11, which will not be repeated here.

[0043] Step S22: Performing a first training on the event extraction model using the target sample text in the first sample set.

[0044] The description of step S22 can refer to the above step S11, which will not be repeated here. After the first training of the event extraction model, a sub-sampling process is added, and the specific process of using sub-sampling to select data in steps S23 to S28 below is specifically referred to.

[0045] Step S23: using the first trained event extraction model, perform event prediction on the test sample texts in the test sample set to obtain a second classification probability distribution of each test sample text in the test sample set.

[0046] Step S24: using the first trained event extraction model, perform event prediction on each target sample text in the first sample set to obtain first event prediction information of each target sample text.

[0047] In the disclosed embodiment, the first event prediction information of the target sample text includes the first classification probability distribution of the target sample text. Therefore, step S23 and step S24 respectively use the first trained event extraction model to perform event prediction on the test sample text and the target sample text, and obtain the second classification probability distribution and the first classification probability distribution accordingly. The first trained event extraction model is a model trained with the target sample text and after adjusting the parameters, so when the target sample text and the test sample text are input into the event extraction model after adjusting the parameters, it is only necessary to take the gradient change, without gradient backpropagation and parameter update, and use the gradient change to calculate the promotion effect of the target sample text on the training results.

[0048] The test sample set includes several test sample texts, and the labels of the test sample texts are as accurate as the original sample texts, so that the second classification probability distribution of the test sample texts is closer to the corresponding actual classification probability distribution. A part of the target sample texts is the expanded sample texts obtained by using the data enhancement method, so the first classification probability distribution of the target sample texts may be significantly different from the corresponding actual classification probability distribution.

[0049] In the embodiment of the present disclosure, the first event prediction information of the target sample text includes the first classification probability distribution of the target sample text. Before determining the decision impact of each target sample text based on the first event prediction information of each target sample text, the event extraction model trained first is used to perform event prediction on the test sample text in the test sample set to obtain the second classification probability distribution of each test sample text in the test sample set, so as to achieve the following steps S25-S27. Figure 1 In the embodiment, step S12 determines the decision impact of each target sample text based on the first event prediction information of each target sample text.

[0050] Step S25: using the first classification probability distribution of the target sample text, determine the vector parameters of each target sample text.

[0051] In a disclosed embodiment, when determining the vector parameters of each target sample text using the first classification probability distribution of the target sample text, the difference between the first classification probability distribution and the first actual classification probability distribution is calculated, and the sum of the difference, the square of the sentence representation of the target sample text, the product of the regularization parameter and one is taken as the inverse Hessian vector product of the target sample text. The specific formula is as follows:

[0052]

[0053] Where H represents the inverse Hessian vector product, y i represents the first classification probability distribution; y i represents the first actual classification probability distribution; x ik represents the sentence representation of the target sample text, and i Indicates sentence, k represents a word; C represents a regular parameter.

[0054] Step S26: based on the first event prediction information of each target sample text, obtain the first loss corresponding to each target sample text, and based on the second classification probability distribution of each test sample text, obtain the second loss corresponding to each test sample text.

[0055] The first event prediction information of the target sample text includes the first classification probability distribution of the target sample text. The loss is the result of calculating the difference between the classification probability distribution predicted by the event extraction model and the corresponding actual classification probability distribution. For example, the loss calculation method can be obtained by a cross entropy loss function.

[0056] Step S27: using the vector parameter, the first loss of the target sample text, and the second loss of the test sample text, an influence function vector corresponding to each target sample text is obtained, where the influence function vector represents the decision influence of the target sample text.

[0057] The calculation formula of the influence function vector is as follows:

[0058]

[0059] z i ~P is the classification probability distribution of the i-th target sample text in the first sample set, is the classification probability distribution of the j-th test sample text in the test sample set, φ represents the influence function vector of the i-th target sample text in the first sample set obtained by using the j-th test sample text in the test sample set; Represents the second loss of the j-th test sample text in the test sample set; Represents the first loss of the i-th target sample text in the first sample set. Therefore, when the influence function vector corresponding to each target sample text is obtained by using the vector parameter, the first loss of the target sample text, and the second loss of the test sample text, the product of the inverse Hessian vector product, the first loss of the target sample text, and the second loss of the test sample text is used as the influence function vector of the target sample text, thereby introducing the influence function method for data sampling so as to select high-quality target sample texts from a large amount of data. The second loss of the test sample text is the second loss of any test sample text in the test sample set, so that when calculating the influence function vector of each target sample text, the target sample text is compared with any test sample text to obtain the parameter influence of the target sample text on the model training.

[0060] Step S28: Select target sample texts whose influence function vectors satisfy preset influence conditions from the first sample set to obtain a second sample set.

[0061] Since the influence function vector represents the decision influence of the target sample text, when at least one target sample text is screened out from the first sample set based on the decision influence to obtain the second sample set, the target sample text whose influence function vector satisfies the preset influence condition is selected from the first sample set to obtain the second sample set. The preset influence condition is that the influence function vector is greater than the preset influence value, or is within the first preset proportion range in the influence function vectors of the target sample texts in the first sample set sorted from high to low.

[0062] Based on the influence function vector, the influence of each target sample text on the event extraction model parameters is obtained. Therefore, after obtaining the influence function vector corresponding to each target sample text using the vector parameters, the first loss of the target sample text, and the second loss of the test sample text, the influence function vector can be processed by a linear sampling function to calculate the sampling classification probability distribution for each target sample text. Therefore, when at least one target sample text is screened out from the first sample set based on the decision influence to obtain the second sample set, the target sample text whose processed influence function vector meets the preset influence condition is selected from the first sample set to obtain the second sample set.

[0063] The decision impact of each target sample text is obtained through influence function calculation and represented by an influence function vector, so that the influence function vector can obtain the impact of each target sample text on the parameters of the training event extraction model, and then obtain the sampling probability distribution according to the influence function vector, and sub-sample the first sample set. Through sub-sampling, the target sample text that can help model training is retained, and the target sample text that has label offset due to data enhancement is filtered out, so as to improve the quality of the target sample text and promote better model training.

[0064] Step S29: Perform a second training on the event extraction model using the target sample text in the second sample set.

[0065] When the event extraction model is trained for the second time using the target sample text in the second sample set, the event extraction model can be used to predict events for the target sample text, so that the event extraction model executes to obtain the sentence representation of the target sample text, and obtains the third classification probability distribution of each word in the sentence representation, and uses the third classification probability distribution as the second event prediction information of the target sample text; then the second event prediction information of the target sample text is used to determine the loss of this training, and the parameters of the event extraction model can be adjusted based on the loss of this training to complete the second training of the event extraction model.

[0066] Based on the influence function vector that characterizes the impact of the decision, the target sample text in the first sample set is denoised to obtain the target sample text in the second sample set. Since the influence function vector can obtain whether the target sample text has a promoting effect on the model training, the useful target sample text can be saved, and since each target sample text has a different degree of promotion to the model training, during the training process, for samples that are more promoting, we hope that their weights are larger, and for samples that are less promoting, we hope that their weights are relatively smaller. Therefore, when the target sample text in the second sample set is used to perform the second training on the event extraction model, in order to better assist the model training with the screened target sample text, different weights can be matched for the target sample text. Based on this, in order to clearly explain step S29, please refer to Figure 3 , Figure 3 This is a flow chart of step S29 of another embodiment of the training method of the event extraction model of the present application. Specifically, it may include the following steps:

[0067] Step S291: Copy the first trained event extraction model to obtain a copied model.

[0068] In order not to affect the parameter update of the first trained event extraction model when obtaining the weights, the first trained event extraction model is copied to obtain a copied model, thereby redefining a model with the same structure as the first trained event extraction model, and saving the model parameters and model gradients of the first trained event extraction model.

[0069] Step S292: Use the target sample text in the second sample set to train the replication model.

[0070] After the copy model is trained using the target sample text in the second sample set, the trained copy model is used to predict events for the verification sample set. When the copy model is trained using the target sample text in the second sample set, the target sample text in the second sample set is input into the copy model in batches for event prediction to obtain the fifth classification probability distribution of the target sample text of the corresponding batch, and then an indirect vector of the same size as the target sample text contained in the batch is defined, and the indirect vector is multiplied by the fifth classification probability distribution of the target sample text of the batch to obtain the third loss of the copy model, and finally the parameters of the copy model are adjusted based on the third loss. The fifth classification probability distribution is a matrix of multiple dimensions, specifically a matrix of the number of target sample texts of the corresponding batch, the number of words in the target sample text, and the number of preset categories to which the words belong. The indirect vector is also a matrix of the number of target sample texts of the corresponding batch multiplied by one.

[0071] Before determining the weights of each target sample text in the second sample set based on the second loss of event prediction of the replication model on the verification sample set, the replication model can be trained using the target sample text in the second sample set. The trained replication model is used to perform event prediction on the verification sample set.

[0072] Step S293: Determine the weight of each target sample text in the second sample set based on the second loss of event prediction for the verification sample set by the replication model.

[0073] When determining the weight of each target sample text in the second sample set based on the second loss of event prediction for the verification sample set by the replication model, the replication model can be used to perform event prediction on each verification sample text in the verification sample set to obtain third event prediction information of each verification sample text, and then based on the third event prediction information of each verification sample text, the second loss of the verification sample set is obtained, and finally the weight of each target sample text in the second sample set is determined using the second loss of the verification sample set. Specifically, when determining the weight of each target sample text in the second sample set using the second loss of the verification sample set, the gradient change of the indirect vector can be obtained, and the result of the normalized gradient change is used as the weight.

[0074] In order to avoid overfitting of the test set, that is, to avoid the situation where the target sample text only has a promoting effect on the test sample text, but has no promoting effect after replacing a part of the sample text, it is also necessary to replicate the second loss of the model for event prediction on the verification sample set and determine the weight of each target sample text in the second sample set.

[0075] After copying the model, the sampled samples are input into the copied model, the probability distribution matrix is ​​output, the gradient is returned, and the parameters are adjusted, just like the above model training. Then the validation set samples are input into the copied model after adjusting the parameters. In order to obtain the validation set weight, the validation set validation samples need to be input into the model to obtain the gradient, without gradient return and parameter adjustment.

[0076] Therefore, since the target sample texts in the second sample set retained after sampling have different promoting effects on the event extraction model, the target sample texts with greater promoting effects are given a greater weight, and the target sample texts with less promoting effects are given a smaller weight. By introducing weight distribution and calculating the weights of the sampled target sample texts, the target sample texts of the second training have a greater promoting effect on the model training and a greater weight, thereby better helping the model training.

[0077] Step S294: Use the event extraction model to perform event prediction on the target sample text to obtain second event prediction information of the target sample text.

[0078] When the second event prediction information includes the third classification probability distribution, when the event extraction model is used to perform event prediction on the target sample text to obtain the second event prediction information of the target sample text, the event extraction model is used to obtain the sentence representation of the target sample text, and the third classification probability distribution of each word in the sentence representation is obtained.

[0079] The entire process of obtaining weights from step S291 to step S293 is performed on the replication model, while step S294 of obtaining the second event prediction information of the target sample text is performed on the event extraction model, and since the event extraction model is trained for the second time using the target sample text in the second sample set, the event extraction model is an event extraction model that has undergone the first training. The order of the entire process of obtaining weights from step S291 to step S293 and obtaining the second event prediction information of the target sample text in step S294 is not limited.

[0080] Step S295: Use the weight to weight the third classification probability distribution of the target sample text to obtain the fourth classification probability distribution of the target sample text, and determine the training loss based on the fourth classification probability distribution of the target sample text, and adjust the parameters of the event extraction model based on the training loss.

[0081] In the second training process, when determining the loss of this training using the second event prediction information of the target sample text, the third classification probability distribution of the target sample text can be weighted using the weight to obtain the fourth classification probability distribution of the target sample text; based on the fourth classification probability distribution of the target sample text, the loss of this training is determined, and the parameters of the event extraction model are adjusted based on the loss of this training.

[0082] Therefore, in the above scheme, the input of the event extraction model is no longer the target sample text in the entire first training set, but the target sample text in the second training set after sampling the data using the influence function vector and achieving noise reduction. In addition, the target sample text whose influence function vector meets the preset influence condition can be selected, so as to facilitate the selection of the sampling ratio with the best effect on the test set and obtain higher quality training samples. At the same time, in the second training process, the weight distribution method is adopted to calculate the importance of the target sample text according to the gradient changes on the verification set, so as to better promote model training.

[0083] See also Figure 4 , Figure 4 It is a flow chart of an embodiment of the event extraction method of the present application.

[0084] Specifically, the following steps may be included:

[0085] Step S41: using any of the above event extraction model training methods to train an event extraction model.

[0086] The training method of the event extraction model may be any of the methods in the above-mentioned training method embodiments of the event extraction model.

[0087] Step S42: Obtain the text to be extracted.

[0088] The text to be extracted can be any text. For example, in a real scenario, when the COVID-19 outbreak occurs suddenly, the news centered on the COVID-19 event will have an exponential growth. The text to be extracted is the news text, so the event extraction method can be used to predict the event category of the news text.

[0089] Step S43: Use the event extraction model to perform event extraction on the text to be extracted to obtain the event classification of the text to be extracted.

[0090] When using the event extraction model to extract events from the text to be extracted and obtain the event classification of the text to be extracted, the sentence representation of the text to be extracted can be obtained, the classification probability distribution of each word in the sentence representation can be obtained, and then the event classification of each word can be obtained based on the classification probability distribution of each word. Finally, the event classification of each word can be used to obtain the event classification of the text to be extracted. Therefore, the trained event extraction model is used to extract the text to be extracted, its maximum classification probability distribution is obtained, and the event classification is predicted.

[0091] Through the above method, after obtaining the text to be extracted, the event extraction model is used to extract events from the text to be extracted, and the event classification of the text to be extracted is obtained, so that event extraction can be realized quickly and conveniently.

[0092] See also Figure 5 , Figure 5 It is a schematic diagram of the framework of an embodiment of a training device 50 for an event extraction model of the present application. The training device 50 for an event extraction model includes a first training module 51, an acquisition module 52, a screening module 53, and a second training module 54. The first training module 51 is used to perform a first training on the event extraction model using the target sample text in the first sample set, wherein the event extraction model is used to predict the event classification of the text; the acquisition module 52 is used to obtain the decision influence of each target sample text in the first sample set on the event extraction model; the screening module 53 is used to screen out at least one target sample text from the first sample set based on the decision influence to obtain a second sample set; the second training module 54 is used to perform a second training on the event extraction model using the target sample text in the second sample set.

[0093] In the above scheme, after the first training module 51 uses the target sample text in the first sample set to perform the first training on the event extraction model for event classification of predictive text, the acquisition module 52 obtains the decision-making influence of each target sample text in the first sample set on the event extraction model, so that the screening module 53 screens out at least one target sample text from the first sample set based on the decision-making influence to obtain the second sample set, and the second training module 54 can use the target sample text in the second sample set to perform the second training on the event extraction model. Compared with artificial denoising or using contrastive learning, adversarial learning, and reinforcement learning to perform sample denoising, this scheme reduces the noise of the target text sample based on the decision-making influence of the target sample text on the event extraction model, which can save the training cost of the event extraction model.

[0094] In some disclosed embodiments, the acquisition module 52 is used to obtain the decision-making influence of each target sample text in the first sample set on the event extraction model, and is also used to use the first trained event extraction model to perform event prediction on each target sample text in the first sample set to obtain first event prediction information of each target sample text; based on the first event prediction information of each target sample text, the decision-making influence of each target sample text is determined.

[0095] Therefore, the first event prediction information obtained by event prediction of the target sample text by the event extraction model is used to determine the decision impact of each target sample text, so that the decision impact can reflect the training impact of the target sample text on the event extraction model.

[0096] In some disclosed embodiments, the first event prediction information of the target sample text includes a first classification probability distribution of the target sample text; the acquisition module 52 is used to use the first trained event extraction model to perform event prediction on the test sample texts in the test sample set before determining the decision impact of each target sample text based on the first event prediction information of each target sample text, so as to obtain the second classification probability distribution of each test sample text in the test sample set; the acquisition module 52 is used to use the first classification probability distribution of the target sample text to determine the vector parameters of each target sample text when determining the decision impact of each target sample text based on the first event prediction information of each target sample text; based on the first event prediction information of each target sample text, a first loss corresponding to each target sample text is obtained, and based on the second classification probability distribution of each test sample text, a second loss corresponding to each test sample text is obtained; using the vector parameters, the first loss of the target sample text, and the second loss of the test sample text, an influence function vector corresponding to each target sample text is obtained, and the influence function vector represents the decision impact of the target sample text.

[0097] Therefore, the target sample text and the test sample text are both input into the first trained event extraction model to obtain the corresponding classification probability distribution, and the respective losses are calculated based on the corresponding classification probability distribution. The first classification probability distribution of the target sample text is used to determine the vector parameters of each target sample text, and then the influence function vector corresponding to each target sample text is obtained by using the vector parameters, the first loss of the target sample text, and the second loss of the test sample text, so that the influence function vector represents the decision-making influence of the target sample text, and the influence function vector is the result of comparative analysis of the target sample text and the test sample text.

[0098] In some disclosed embodiments, the acquisition module 52 is used to use the first classification probability distribution of the target sample text to determine the vector parameters of each target sample text, and is also used to calculate the difference between the first classification probability distribution and the first actual classification probability distribution, and use the sum of the difference, the square of the sentence representation of the target sample text, the product of the regularization parameter, and one as the inverse Hessian vector product of the target sample text; the acquisition module 52 is used to use the vector parameters, the first loss of the target sample text, and the second loss of the test sample text to obtain the influence function vector corresponding to each target sample text, and is also used to use the product of the inverse Hessian vector product, the first loss of the target sample text, and the second loss of the test sample text as the influence function vector of the target sample text.

[0099] Therefore, the vector parameter is the inverse Hessian vector product, and the product of the inverse Hessian vector product, the first loss of the target sample text, and the second loss of the test sample text is used as the influence function vector of the target sample text, so as to realize the judgment of the decision impact of model training by calculation, which can save the cost of model training compared with complex models.

[0100] In some disclosed embodiments, when the first training module 51 is used to perform a first training on the event extraction model using the target sample text in the first sample set, or the second training module 54 is used to perform a second training on the event extraction model using the target sample text in the second sample set, it is also used to perform event prediction on the target sample text using the event extraction model to obtain second event prediction information of the target sample text; the second event prediction information of the target sample text is used to determine the loss of this training, and the parameters of the event extraction model are adjusted based on the loss of this training.

[0101] Therefore, the event extraction model is used to perform event prediction on the target sample text to obtain the second event prediction information to calculate the loss of the model, thereby achieving the adjustment of the model parameters in the first training and the second training.

[0102] In some disclosed embodiments, the second event prediction information includes a third classification probability distribution. The first training module 51 or the second training module 54 is used to use the event extraction model to perform event prediction on the target sample text. When the second event prediction information of the target sample text is obtained, it is also used to use the event extraction model to execute: obtaining a sentence representation of the target sample text, and obtaining the third classification probability distribution of each word in the sentence representation.

[0103] Therefore, the event extraction model obtains the sentence representation of the target sample text and obtains the third classification probability distribution of each word in the sentence representation as the second event prediction information. The entire model training process is simple and has low requirements on the model structure.

[0104] In some disclosed embodiments, the second training module 54 is used to perform a second training on the event extraction model using the target sample text in the second sample set, and is also used to copy the event extraction model that has been first trained to obtain a copied model; based on the second loss of event prediction on the verification sample set by the copied model, the weight of each target sample text in the second sample set is determined; during the second training process, the second training module 54 is used to use the second event prediction information of the target sample text to determine the loss of this training, and is also used to weight the third classification probability distribution of the target sample text using the weight to obtain a fourth classification probability distribution of the target sample text; based on the fourth classification probability distribution of the target sample text, the loss of this training is determined.

[0105] Therefore, since the target sample texts in the second sample set retained after sampling have different promoting effects on the event extraction model, the target sample texts with greater promoting effects are given a greater weight, and the target sample texts with less promoting effects are given a smaller weight. By introducing weight distribution and calculating the weights of the sampled target sample texts, the target sample texts of the second training have a greater promoting effect on the model training and a greater weight, thereby better helping the model training.

[0106] In some disclosed embodiments, the second training module 54 is used to train the replication model using the target sample texts in the second sample set before determining the weights of each target sample text in the second sample set based on the second loss of event prediction for the verification sample set by the replication model, wherein the trained replication model is used to predict events for the verification sample set; and / or, when the second training module 54 is used to determine the weights of each target sample text in the second sample set based on the second loss of event prediction for the verification sample set by the replication model, it is also used to perform event prediction on each verification sample text in the verification sample set using the replication model to obtain third event prediction information for each verification sample text; obtain the second loss of the verification sample set based on the third event prediction information of each verification sample text; and determine the weights of each target sample text in the second sample set using the second loss of the verification sample set.

[0107] Therefore, in order to avoid overfitting of the test set, that is, to avoid the situation where the target sample text has a promoting effect on the test sample text, but has no promoting effect after replacing a part of the sample text, it is also necessary to verify the copy model after adjusting the parameters of the sample text input, perform event prediction on the verification sample set, and prove the size of the promoting effect of the target sample text, so as to determine the corresponding weights, thereby introducing weight distribution and optimizing the model training effect.

[0108] In some disclosed embodiments, the second training module 54 is used to train the replication model using the target sample text in the second sample set, and is also used to input the target sample text in the second sample set into the replication model in batches for event prediction to obtain the fifth classification probability distribution of the target sample text of the corresponding batch; define an indirect vector of the same size as the target sample text contained in the batch, multiply the indirect vector by the fifth classification probability distribution of the target sample text of the batch to obtain the third loss of the replication model; adjust the parameters of the replication model based on the third loss; the second training module 54 is used to determine the weights of each target sample text in the second sample set using the second loss of the verification sample set, and is also used to obtain the gradient change of the indirect vector, and use the normalized result of the gradient change as the weight.

[0109] Therefore, a weight calculation is performed on the sampled target sample text, so that the greater the promotion effect of the target sample text on the model training, the greater the weight, which can better help the model training.

[0110] In some disclosed embodiments, the screening module 53 is used to screen out at least one target sample text from the first sample set based on the decision influence to obtain the second sample set, and is also used to select, from the first sample set, a target sample text whose decision influence satisfies a preset influence condition to obtain the second sample set, wherein the preset influence condition is that the decision influence is greater than a preset influence value, or is within a first preset proportion range in the decision influence of each target sample text in the first sample set sorted from high to low.

[0111] Therefore, the decision-making influence of each target sample text in the first sample set on the event extraction model is obtained, and at least one target sample text is selected from the first sample set based on the decision-making influence. The decision-making influence of each target sample text on the model training effect is obtained directly through calculation, so as to achieve automated high-quality data sampling, which can save training costs more effectively.

[0112] In some disclosed embodiments, the first training module 51 is used to perform data augmentation on the original sample text in the original sample set using a data augmentation method before performing a first training on the event extraction model using the target sample text in the first sample set to obtain a number of expanded sample texts; at least part of the original sample text in the original sample set and a number of expanded sample texts are used as target sample texts to form a first sample set.

[0113] Therefore, through data enhancement methods, it is possible to automatically construct training data and thus automatically expand the sample set.

[0114] In some disclosed embodiments, the data enhancement method includes one or a combination of dictionary replacement, word vector-based replacement, TF-IDF-based replacement, random word insertion, random exchange, random deletion, and pre-trained model generation method, wherein the pre-trained model generation method is to mask some words in the text, and use the pre-trained model to generate new words and replace the masked words.

[0115] Therefore, the application of data enhancement methods is no longer restricted to a single method. All data enhancement methods that maintain label consistency can be used individually or in combination. There is no limit on the data enhancement methods and the number of methods. Try to use as many data enhancement methods as possible to effectively obtain more training data and quickly expand the training set.

[0116] See also Figure 6 , Figure 6 It is a schematic diagram of the framework of an embodiment of the event extraction device 60 of the present application. The event extraction device 60 includes a training module 61, a file acquisition module 62 and a classification module 63. The training module 61 is used to train the event extraction model using any of the above-mentioned event extraction model training method embodiments; the file acquisition module 62 is used to obtain the text to be extracted; the classification module 63 is used to extract events from the text to be extracted using the event extraction model to obtain the event classification of the text to be extracted.

[0117] Through the above method, after the file acquisition module 62 acquires the text to be extracted, the file acquisition module 62 uses the event extraction model to perform event extraction on the text to be extracted, and obtains the event classification of the text to be extracted, which can quickly and conveniently implement event extraction.

[0118] See also Figure 7 , Figure 7 : is a schematic diagram of a framework of an embodiment of an electronic device 70 of the present application. The electronic device 70 includes a memory 71 and a processor 72 coupled to each other, the memory 71 stores program instructions, and the processor 72 is used to execute the program instructions to implement the steps in the training method embodiment of any of the above event extraction models, or to implement the steps in the embodiment of any of the above event extraction methods. Specifically, the electronic device 70 may include but is not limited to: a desktop computer, a laptop computer, a server, a mobile phone, a tablet computer, etc., which are not limited here.

[0119] Specifically, the processor 72 is used to control itself and the memory 71 to implement the steps in the training method embodiment of any of the above event extraction models, or to implement the steps in the above event extraction method embodiment. The processor 72 can also be called a CPU (Central Processing Unit). The processor 72 may be an integrated circuit chip with signal processing capabilities. The processor 72 can also be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In addition, the processor 72 can be implemented by an integrated circuit chip.

[0120] The above scheme uses the target sample text in the first sample set to perform a first training on the event extraction model for event classification of predictive text, and then obtains the decision influence of each target sample text in the first sample set on the event extraction model, thereby screening out at least one target sample text from the first sample set based on the decision influence to obtain a second sample set. The target sample text in the second sample set can then be used to perform a second training on the event extraction model. Compared with manual denoising or the use of contrastive learning, adversarial learning, and reinforcement learning to perform sample denoising, this scheme denoises the target text samples based on the decision influence of the target sample text on the event extraction model, which can save the training cost of the event extraction model.

[0121] See also Figure 8 , Figure 8 1 is a schematic diagram of a framework of an embodiment of a computer-readable storage medium 80 of the present application. The computer-readable storage medium 80 stores program instructions 81 that can be executed by a processor, and the program instructions 81 are used to implement the steps in any of the above-mentioned event extraction model training method embodiments, or to implement the steps in any of the above-mentioned event extraction method embodiments.

[0122] The above scheme uses the target sample text in the first sample set to perform a first training on the event extraction model for event classification of predictive text, and then obtains the decision influence of each target sample text in the first sample set on the event extraction model, thereby screening out at least one target sample text from the first sample set based on the decision influence to obtain a second sample set. The target sample text in the second sample set can then be used to perform a second training on the event extraction model. Compared with manual denoising or the use of contrastive learning, adversarial learning, and reinforcement learning to perform sample denoising, this scheme denoises the target text samples based on the decision influence of the target sample text on the event extraction model, which can save the training cost of the event extraction model.

[0123] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0124] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.

[0125] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0126] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0127] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0128] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.< / loc> < / mask> < / loc> < / loc>

Claims

1. A training method for an event extraction model, It is characterized in that The method comprises: Performing a first training on the event extraction model using the target sample text in the first sample set, wherein the event extraction model is used to predict event classification of the text; Using the event extraction model trained by the first step, performing event prediction on each target sample text in the first sample set to obtain first event prediction information of each target sample text, wherein the first event prediction information of the target sample text includes a first classification probability distribution of the target sample text; Using the event extraction model trained by the first step, event prediction is performed on the test sample texts in the test sample set to obtain a second classification probability distribution of each test sample text in the test sample set; Determine a vector parameter of each of the target sample texts by using the first classification probability distribution of the target sample texts; Based on the first event prediction information of each of the target sample texts, a first loss corresponding to each of the target sample texts is obtained, and based on the second classification probability distribution of each of the test sample texts, a second loss corresponding to each of the test sample texts is obtained; Using the vector parameter, the first loss of the target sample text, and the second loss of the test sample text, an influence function vector corresponding to each of the target sample texts is obtained, wherein the influence function vector represents the decision influence of the target sample text; Based on the decision impact, at least one target sample text is selected from the first sample set to obtain a second sample set; The event extraction model is trained for the second time using the target sample text in the second sample set.

2. The method according to claim 1, It is characterized in that The determining of the vector parameters of each target sample text by using the first classification probability distribution of the target sample text includes: Calculating a difference between the first classification probability distribution and the first actual classification probability distribution, and taking the sum of the difference, the square of the sentence representation of the target sample text, the product of the regularization parameter and one as the inverse Hessian vector product of the target sample text; The using the vector parameter, the first loss of the target sample text, and the second loss of the test sample text to obtain the influence function vector corresponding to each target sample text includes: The product of the inverse Hessian vector product, the first loss of the target sample text, and the second loss of the test sample text is used as the influence function vector of the target sample text.

3. The method according to claim 1, It is characterized in that The first training of the event extraction model using the target sample text in the first sample set, or the second training of the event extraction model using the target sample text in the second sample set, includes: Using the event extraction model to perform event prediction on the target sample text to obtain second event prediction information of the target sample text; The second event prediction information of the target sample text is used to determine the current training loss, and the parameters of the event extraction model are adjusted based on the current training loss.

4. The method according to claim 3, It is characterized in that The second event prediction information includes a third classification probability distribution, and the event prediction is performed on the target sample text using the event extraction model to obtain the second event prediction information of the target sample text, including: The event extraction model is used to perform: obtaining a sentence representation of the target sample text, and obtaining a third classification probability distribution of each word in the sentence representation.

5. The method according to claim 4, It is characterized in that The performing a second training on the event extraction model using the target sample text in the second sample set also includes: Copying the event extraction model trained by the first step to obtain a copy model; Determining the weight of each target sample text in the second sample set based on a second loss of event prediction performed by the replication model on the verification sample set; In the second training process, the use of the second event prediction information of the target sample text to determine the current training loss includes: weighting the third classification probability distribution of the target sample text by using the weight to obtain a fourth classification probability distribution of the target sample text; Based on the fourth classification probability distribution of the target sample text, the current training loss is determined.

6. The method according to claim 5, It is characterized in that Before determining the weight of each target sample text in the second sample set based on the second loss of event prediction for the verification sample set by the replication model, the method further includes: Using the target sample text in the second sample set to train the replication model, wherein the trained replication model is used to perform event prediction on the verification sample set; And / or, the second loss of event prediction for the verification sample set based on the replication model, determining the weight of each target sample text in the second sample set, comprises: Using the replication model to perform event prediction on each verification sample text in the verification sample set to obtain third event prediction information of each verification sample text; Based on the third event prediction information of each of the verification sample texts, obtaining a second loss of the verification sample set; The weight of each target sample text in the second sample set is determined by using the second loss of the verification sample set.

7. The method according to claim 6, It is characterized in that The training of the replication model using the target sample text in the second sample set includes: Inputting the target sample texts in the second sample set into the replication model in batches for event prediction, so as to obtain a fifth classification probability distribution of the target sample texts in the corresponding batches; defining an indirect vector having the same size as the target sample text contained in the batch, and multiplying the indirect vector by the fifth classification probability distribution of the target sample text in the batch to obtain a third loss of the replication model; Based on the third loss, adjusting parameters of the replication model; The determining the weight of each target sample text in the second sample set by using the second loss of the verification sample set includes: The gradient change of the indirect vector is obtained, and a result after normalizing the gradient change is used as the weight.

8. The method according to claim 1, It is characterized in that The step of selecting at least one target sample text from the first sample set based on the decision influence to obtain a second sample set includes: From the first sample set, target sample texts whose decision impact satisfies a preset impact condition are selected to obtain a second sample set, wherein the preset impact condition is that the decision impact is greater than a preset impact value, or is within a first preset proportion range in the order of the decision impacts of the target sample texts in the first sample set from high to low.

9. The method according to claim 1, It is characterized in that Before performing a first training on the event extraction model using the target sample text in the first sample set, the method further includes: Using data enhancement method to expand the data of the original sample text in the original sample set, to obtain a number of expanded sample texts; At least part of the original sample texts and a number of expanded sample texts in the original sample set are used as target sample texts to form the first sample set.

10. The method according to claim 9, It is characterized in that The data enhancement method includes one or a combination of dictionary replacement, word vector-based replacement, TF-IDF-based replacement, random word insertion, random exchange, random deletion, and pre-trained model generation method, wherein the pre-trained model generation method is to block some words in the text, and use the pre-trained model to generate new words and replace the blocked words.

11. An event extraction method, It is characterized in that The method comprises: Using the event extraction model training method according to any one of claims 1 to 10 to train an event extraction model; Get the text to be extracted; The event extraction model is used to extract events from the text to be extracted, and event classification of the text to be extracted is obtained.

12. A training device for an event extraction model, It is characterized in that The device comprises: A first training module, used to perform a first training on the event extraction model using target sample text in a first sample set, wherein the event extraction model is used to predict event classification of text; An acquisition module is used to use the event extraction model trained by the first step to perform event prediction on each target sample text in the first sample set, and obtain first event prediction information of each target sample text, wherein the first event prediction information of the target sample text includes a first classification probability distribution of the target sample text; use the event extraction model trained by the first step to perform event prediction on the test sample text in the test sample set, and obtain a second classification probability distribution of each test sample text in the test sample set; use the first classification probability distribution of the target sample text to determine the vector parameter of each target sample text; based on the first event prediction information of each target sample text, obtain the first loss corresponding to each target sample text, and based on the second classification probability distribution of each test sample text, obtain the second loss corresponding to each test sample text; use the vector parameter, the first loss of the target sample text, and the second loss of the test sample text to obtain the influence function vector corresponding to each target sample text, and the influence function vector represents the decision influence of the target sample text; A screening module, configured to screen out at least one target sample text from the first sample set based on the decision impact, so as to obtain a second sample set; The second training module is used to perform a second training on the event extraction model using the target sample text in the second sample set.

13. An event extraction device, It is characterized in that The device comprises: A training module, used to train an event extraction model using the event extraction model training method according to any one of claims 1 to 10; File acquisition module, used to obtain the text to be extracted; The classification module is used to extract events from the text to be extracted using the event extraction model to obtain event classification of the text to be extracted.

14. An electronic device, It is characterized in that It comprises a memory and a processor coupled to each other, wherein the processor is used to execute program instructions stored in the memory to implement the training method of the event extraction model described in any one of claims 1 to 10, or to implement the event extraction method described in claim 11.

15. A computer-readable storage medium having stored thereon program instructions executable by a processor, It is characterized in that When the program instructions are executed by a processor, they implement the training method of the event extraction model described in any one of claims 1 to 10, or implement the event extraction method described in claim 11.