Event extraction method, device, equipment and storage medium

By integrating trigger words, argument recognition, and argument relationship recognition into the event joint extraction model, the problem of inaccurate event extraction in the existing technology is solved, especially in multi-event scenarios, which improves the accuracy and reliability of event extraction.

CN114840642BActive Publication Date: 2025-09-09HEFEI IFLY DIGITAL TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210503921.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-10
Publication Date
2025-09-09
Estimated Expiration
2042-05-10

AI Technical Summary

Technical Problem

In the existing technology, the identification results of trigger words and argument parameters in event extraction tasks are inaccurate, especially in scenarios where multiple events are mixed, it is difficult to distinguish the argument parameters of different events.

Method used

An event joint extraction model is adopted to integrate the three subtasks of trigger word recognition, argument recognition and argument relationship recognition. Through pre-configured model training, the three subtasks share network parameters, restrict and promote each other, and improve recognition accuracy.

Benefits of technology

The recognition accuracy of trigger words, argument parameters and argument relationships has been improved, which can effectively solve the problem of distinguishing argument parameters in multi-event scenarios and improve the overall accuracy of event extraction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114840642B_ABST
    Figure CN114840642B_ABST
Patent Text Reader

Abstract

The present application discloses an event extraction method, apparatus, device and storage medium. The present application pre-configures an event joint extraction model, which simultaneously integrates three subtasks: trigger word recognition task, argument recognition task and argument relationship recognition task for training. The three subtasks can share the network parameters of the event joint extraction model, so that the trained event joint extraction model can restrict and promote each other when processing the three subtasks, that is, the trigger word recognition process will simultaneously refer to the influence of the arguments and argument relationships in the input text, the argument recognition process will also simultaneously refer to the trigger words in the input text and the influence between different argument relationships, and the argument relationship recognition process will also simultaneously refer to the influence of the trigger words and arguments in the input text. The three subtasks complement each other and can greatly improve the accuracy of the final extracted trigger words, arguments, argument types and argument relationships.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of natural language processing technology, and more specifically, to an event extraction method, apparatus, device and storage medium. Background Art

[0002] Event extraction (EE) is a classic information extraction task in the field of Natural Language Processing (NLP). It is widely used in information collection, information retrieval, document synthesis, and information question-answering in fields such as business and public opinion. Event extraction involves extracting event types and related parameter information of interest to users from semi-structured and unstructured data.

[0003] Traditional machine learning methods model event extraction as a multi-classification problem. For example, event extraction can be divided into tasks such as trigger word recognition and argument parameter recognition. These tasks are processed in multiple, serial stages. For example, in the trigger word recognition stage, a trigger word recognition model is trained; in the argument parameter recognition stage, the argument recognition model is trained. Furthermore, argument parameter recognition is performed on the basis of trigger word recognition. Because trigger word recognition precedes argument parameter recognition, the trigger word recognition model fails to account for the influence of argument parameters, which in turn affects trigger word recognition. Furthermore, argument parameter recognition relies on trigger word recognition, which can easily lead to exposure errors. In other words, if the trigger word is incorrectly recognized, the argument parameter recognition will also be incorrect. Summary of the Invention

[0004] In view of the above problems, this application is proposed to provide an event extraction method, device, equipment and storage medium to solve the problem of inaccurate trigger word and argument parameter extraction results in the prior art. The specific solution is as follows:

[0005] In a first aspect, an event extraction method is provided, comprising:

[0006] Get the input text for event extraction;

[0007] Processing the input text using a preconfigured event joint extraction model to obtain trigger words, argument parameters, argument types of each argument parameter, and relationships between argument parameters contained in the input text; wherein the event joint extraction model is trained using training text annotated with trigger word labels, argument labels, argument type labels, and argument relationship labels;

[0008] Based on the relationship between the argument parameters, the argument parameters are divided into at least one set, wherein each argument parameter in a set corresponds to an event.

[0009] Secondly, another event extraction method is provided, including:

[0010] Get the input text of the event argument to be extracted;

[0011] Inputting the input text into a preconfigured argument extraction model to obtain a label matrix output by the model, wherein the argument extraction model is trained using training text annotated with a label matrix, the annotated label matrix is ​​an n*n matrix, n is the number of segmentations contained in the training text, and the value of the element in the i-th row and j-th column of the label matrix indicates whether the text between the i-th segmentation and the j-th segmentation in the training text belongs to an argument parameter, and the corresponding argument type if it belongs to the argument parameter;

[0012] Based on the value of each position element in the label matrix output by the model, the argument parameter in the input text and the argument type of the argument parameter are determined.

[0013] Thirdly, another event extraction method is provided, including:

[0014] Get the input text of the event argument relationship to be extracted;

[0015] Inputting the input text into a preconfigured argument relationship recognition model to obtain a label matrix output by the model, wherein the argument relationship recognition model is trained with training text annotated with a label matrix, the annotated label matrix is ​​an n*n matrix, n is the number of segmentations contained in the training text, and the value of the element in the i-th row and j-th column in the label matrix represents: the relationship category between the i-th segmentation and the j-th segmentation in the training text, the relationship category including the relationship HH between argument parameters headed by the i-th and j-th segmentations, the relationship EE between argument parameters tailed by the i-th and j-th segmentations, and the remaining relationships O excluding the relationships HH and EE;

[0016] Based on the value of each position element in the label matrix output by the model, the relationship category between each argument parameter in the input text is determined.

[0017] In a fourth aspect, an event extraction device is provided, comprising:

[0018] An input text acquisition unit, used to acquire input text to be used for event extraction;

[0019] a model processing unit, configured to process the input text using a preconfigured event joint extraction model to obtain trigger words, argument parameters, argument types of each argument parameter, and relationships between argument parameters contained in the input text; wherein the event joint extraction model is trained using training text annotated with trigger word labels, argument labels, argument type labels, and argument relationship labels;

[0020] The argument parameter division unit is used to divide the argument parameters into at least one set based on the relationship between the argument parameters, wherein each argument parameter in a set corresponds to an event.

[0021] In a fifth aspect, an event extraction device is provided, comprising: a memory and a processor;

[0022] The memory is used to store programs;

[0023] The processor is used to execute the program to implement the various steps of the above event extraction method.

[0024] In a sixth aspect, a storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the various steps of the above event extraction method are implemented.

[0025] With the help of the above technical solution, the present application pre-configures an event joint extraction model, which simultaneously integrates three sub-tasks of trigger word recognition task, argument recognition task and argument relationship recognition task for training. The three sub-tasks can share the network parameters of the event joint extraction model, so that the trained event joint extraction model can restrict and promote each other when processing the three sub-tasks, that is, the trigger word recognition process will simultaneously refer to the influence of the arguments and argument relationships in the input text, the argument recognition process will also simultaneously refer to the trigger words in the input text and the influence between different argument relationships, and the argument relationship recognition process will also simultaneously refer to the influence of the trigger words and arguments in the input text. The three sub-tasks complement each other and can greatly improve the accuracy of the final extracted trigger words, arguments, argument types and argument relationships.

[0026] Furthermore, this case adds argument relationship recognition to the traditional trigger word and argument recognition. By integrating the argument relationship recognition task, the accuracy of trigger word and argument parameter recognition can be enhanced. Moreover, for some complex scenarios, such as those with multiple events, the argument parameters of different events may overlap. According to existing technologies, it is impossible to distinguish the argument parameters of different events. By adding the argument relationship recognition task, this application can ultimately identify the relationship between the various argument parameters, thereby assisting in clarifying the argument parameters belonging to different scenarios, which is very helpful in solving the problem of multiple events. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiment below. The accompanying drawings are for illustration purposes only and are not to be considered as limiting the present application. The same reference symbols are used throughout the drawings to represent the same components. In the drawings:

[0028] Figure 1A flow chart of an event extraction method provided in an embodiment of the present application;

[0029] Figure 2 An example of a schematic diagram of the event joint extraction model structure;

[0030] Figure 3 An example of an argument parameter annotation diagram is given;

[0031] Figure 4 An example of a connection diagram of argument parameter relationship is given;

[0032] Figure 5 An example of an argument parameter relationship annotation diagram is given;

[0033] Figure 6 A schematic diagram of the structure of an event extraction device provided in an embodiment of the present application;

[0034] Figure 7 A schematic diagram of the structure of the event extraction device provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0036] This application provides an event extraction solution that can extract event information from text, such as trigger words, argument parameters and types, and the relationship between argument parameters.

[0037] The present application solution can be implemented based on a terminal with data processing capabilities, which can be a mobile phone, computer, server, cloud, etc.

[0038] Next, combine Figure 1 The event extraction method of the present application may include the following steps:

[0039] Step S100: Obtain input text for event extraction.

[0040] Specifically, the input text is a natural language text that requires event extraction.

[0041] Step S110: Process the input text using a preconfigured event joint extraction model to obtain trigger words, argument parameters, argument types of each argument parameter, and relationships between argument parameters contained in the input text.

[0042] Among them, the event joint extraction model is trained with training texts marked with trigger word labels, argument labels, argument type labels and argument relationship labels.

[0043] In this embodiment, in order to improve the accuracy of event extraction results and reduce machine resource consumption, an event joint extraction model that integrates three tasks: trigger word recognition, argument recognition, and argument relationship recognition is pre-trained. It can recognize the argument parameter type and the relationship between argument parameters while recognizing the trigger word.

[0044] During the model training process, labeled training texts can be used for training. In order to achieve the three tasks, the labels of the training texts can include trigger word labels, argument labels, argument type labels, and argument relationship labels.

[0045] Step S120: Based on the relationship between the argument parameters, divide the argument parameters into at least one set, wherein each argument parameter in a set corresponds to an event.

[0046] Specifically, depending on the scenario to which the input text belongs, it may contain one or more events. To better distinguish the argument parameters belonging to different events, this step divides the argument parameters into at least one set based on the relationship between the argument parameters output by the model. Each argument parameter in a set corresponds to an event, and different sets correspond to different events.

[0047] The event extraction method provided in the embodiment of the present application pre-configures an event joint extraction model, which simultaneously integrates three sub-tasks: trigger word recognition task, argument recognition task, and argument relationship recognition task for training. The three sub-tasks can share the network parameters of the event joint extraction model, so that the trained event joint extraction model can restrict and promote each other when processing the three sub-tasks. That is, the trigger word recognition process will simultaneously refer to the influence of the arguments and argument relationships in the input text, the argument recognition process will also simultaneously refer to the trigger words in the input text and the influence between different argument relationships, and the argument relationship recognition process will also simultaneously refer to the influence of the trigger words and arguments in the input text. The three sub-tasks complement each other and can greatly improve the accuracy of the final extracted trigger words, arguments, argument types, and argument relationships.

[0048] Furthermore, based on the traditional trigger word and argument recognition, this application further adds the recognition of argument relations. By integrating the argument relationship recognition task, the accuracy of trigger word and argument parameter recognition can be enhanced. In addition, for some complex scenarios, such as scenarios with multiple events, the argument parameters of different events may overlap. According to the existing technology, it is impossible to distinguish the argument parameters of different events. By adding the argument relationship recognition task, this application can eventually identify the relationship between the various argument parameters, thereby assisting in clarifying the argument parameters belonging to different scenarios, which is very helpful in solving the problem of multiple events.

[0049] In some embodiments of the present application, in order to ensure the boundaries of different event data, the event joint extraction model can be configured to use the trigger word recognition results to guide the recognition of corresponding argument parameters and the recognition of the relationship between argument parameters. Specifically, the event joint extraction model can be configured to: encode the input text, predict the trigger words contained in the input text based on the encoding vector, and combine the encoding vector of the trigger word and the encoding vector of the input text, and predict the internal state representation of the argument parameters, argument types and the relationship between the argument parameters contained in the input text based on the combined encoding vector.

[0050] Combine Figure 2 This paper introduces the structure of an optional event joint extraction model. The event joint extraction model can include an encoding module, an encoding combination module, a trigger word extraction module, an argument extraction module, and an argument relationship recognition module, where:

[0051] 1) The encoding module is used to encode the input text to obtain a text encoding vector.

[0052] The encoding module can use BERT encoding or other encoding methods. Since BERT uses a bidirectional Transformer as a feature extractor, it can learn deep semantic information well.

[0053] The input text can be represented as:

[0054] X={x0,x1,x2,...,x n-2 ,x n-1}

[0055] Where n is the number of tokens in the input text. According to BERT's encoding rules, [CLS] and [SEP] are concatenated at the beginning and end of the input text and then input into the BERT encoding module to obtain the text encoding vector:

[0056] E={e cls ,e0,e1,e2,...,e n-2 ,e n-1 ,e sep}.

[0057] E={e cls ,e0,e1,e2,...,e n-2 ,e n-1 ,e sep}=BERT({x0,x1,x2,...,x n-2 ,x n-1})

[0058] 2) The trigger word extraction module is used to predict the trigger words contained in the input text based on the text encoding vector.

[0059] The trigger word extraction module can adopt a sequence labeling method, such as the LSTM+CRF model combination. After the text encoding vector E encoded by the encoding module is input into the trigger word extraction module, the required sequence labeling result can be directly obtained.

[0060] In this embodiment, the trigger word extraction module can use the BIO sequence tagging method. For the input text X, the corresponding sequence tagging result is Y trg :

[0061] Y trg ={y0,y1,y2,...,y n-2 ,y n-1}

[0062] Among them, y i is x i The corresponding type, if x i If it is not a trigger word, then y i =O; if x i is the first trigger word, then y i =B-type, where type is the trigger word type; if x i If y is not the first trigger word, i =I-type.

[0063] Reference Figure 2 The trigger word annotation results for the input text "Liu Xiaoming appeared in Beijing on the 14th" are shown in Table 1 below:

[0064] X 14 day middle Liu Small bright exist north Beijing dew noodle <![CDATA[Y trg ]]> O O O O O O O O O B-appear I-appear

[0065] Take the trigger word extraction module using the LSTM+CRF model combination as an example:

[0066] Y trg =LSTM-CRF({e cls ,e0,e1,e2,...,e n-2 ,e n-1 ,e sep})

[0067] 3) The encoding combination module is used to encode each group of trigger words output by the trigger word extraction module, and combine the encoding vectors of a group of trigger words with the text encoding vector to obtain a combined encoding vector.

[0068] Specifically, to ensure that the argument extraction module can consider the influence of trigger words when extracting argument parameters, this embodiment uses trigger words to guide argument parameter extraction and argument relationship identification. Each set of trigger words output by the trigger word extraction module is encoded and combined with the text encoding result to generate a combined encoding vector. This combined encoding vector is used as input for the argument extraction module and the argument relationship identification module.

[0069] At the same time, considering that there may be multiple groups of trigger words in the input text, the encoding combination module combines the encoding results of a group of trigger words with the text encoding results each time, and then inputs them into the argument extraction module and the argument relationship recognition module. Only the combined encoding vectors corresponding to one group of trigger words are input at a time, which can better distinguish the boundaries of different event data.

[0070] As can be seen from the above, the trigger word extraction result is represented by Y trg , then a set of trigger words can be expressed as Y tr ' g In this embodiment, when encoding the trigger word, the label-embedding method can be used, and the trigger word encoding result is represented by E trg , add the trigger word encoding result and the text encoding result E as the combined encoding vector X arg :

[0071] E trg =BERT(Y tr ' g )

[0072] X arg =E trg +E

[0073] 4) The argument extraction module is used to predict the argument parameters contained in the input text and the argument type of each argument parameter based on the combined encoding vector.

[0074] Specifically, the input of the argument extraction module is the combined encoding vector X arg , the output argument parameter can be expressed as Output arg The argument extraction module can predict the argument parameters contained in the input text and the argument type of each argument parameter based on the input combined encoding vector.

[0075] 5) The argument relationship recognition module is used to predict the relationship between the argument parameters contained in the input text based on the combined coding vector.

[0076] Specifically, the input of the argument relationship recognition module is the combined encoding vector X arg , the output argument relationship can be expressed as Output rel The argument relationship recognition module can predict the relationship between argument parameters in the input text based on the input combination encoding vector.

[0077] In some embodiments of the present application, an optional training method for an event joint extraction model is introduced.

[0078] Since the event joint extraction model of this application integrates three tasks: trigger word extraction, argument parameter and type extraction, and argument relationship identification, training text marked with trigger word labels, argument labels, argument type labels, and argument relationship labels can be obtained when training the model.

[0079] The training text is further input into the event joint extraction model to obtain the trigger words, argument parameters, argument types of each argument parameter, and relationships between the argument parameters contained in the training text as predicted by the model. Based on the trigger words, argument parameters, argument types of each argument parameter, and relationships between the argument parameters contained in the training text as predicted by the model, as well as the trigger word labels, argument labels, argument type labels, and argument relationship labels annotated in the training text, a total loss function is determined, and the network parameters of the event joint extraction model are updated according to the total loss function until the set training end conditions are met.

[0080] Taking the structure of the event joint extraction model introduced in the above embodiment as an example, it includes three task modules, namely: trigger word extraction module, argument extraction module and argument relationship recognition model. Therefore, the loss function during the training of the event joint extraction model can be composed of the sum of the losses of the three task modules.

[0081] In some embodiments of the present application, the training process of the event joint extraction model is further introduced.

[0082] Considering the existing event extraction tasks have text overlap problems and single argument multiple type problems:

[0083] (1) Text overlap problem: For two argument parameters in a text, some of the content will overlap. For example, in the text of “Shen Congwen’s Autobiography”, the two argument parameters “Shen Congwen’s Autobiography” and “Shen Congwen” belong to the work and author parameter types respectively, and there is overlap between the two argument parameters.

[0084] (2) Single-argument multi-type problem: In some texts, certain argument parameters may correspond to multiple parameter types, such as “Considering politeness, Xiao Ming checked himself”, where “Xiao Ming” is the subject and object of the “check” event.

[0085] For existing sequence tagging methods, since a segmentation token cannot have more than two labels in sequence tagging, it is impossible to solve the problems of text overlap and single argument multi-type. To this end, this embodiment provides a solution:

[0086] This embodiment provides a form-filling and annotation method based on multi-label classification. During the model training phase, argument labels and argument type labels are annotated on the training text in the form of a label matrix. Specifically, the argument labels and argument type labels annotated on the training text include a first label matrix. The first label matrix is ​​an n*n matrix, where n is the number of word segmentation tokens contained in the training text. The value of the element in the i-th row and j-th column of the first label matrix indicates whether the text between the i-th word segmentation and the j-th word segmentation in the training text belongs to the argument parameter, and the corresponding argument type if it belongs to the argument parameter.

[0087] It is understandable that in the first label matrix, the values ​​of different elements can be set to indicate whether the text belongs to an argument parameter, and the corresponding argument type when it belongs to an argument parameter.

[0088] refer to Figure 3 The first label matrix of the example is annotated diagram. Taking the training text "Liu Xiaoming appeared in Beijing on the 14th" as an example, the first label matrix is ​​an 11*11 matrix. The values ​​of the elements in the matrix are not in Figure 3 As an example, Figure 3 The first label matrix is ​​described for illustrative purposes only. The slashed spaces represent argument parameters and their types in the training text. For example, the argument parameter corresponding to row 1, column 2 is "14th," and the corresponding argument type is "time." Row 3, column 6 corresponds to "China," and the corresponding argument types are "subject affiliation" and "nationality."

[0089] The annotation method provided in the embodiment of the present application can effectively solve the text overlapping problem and the single argument multi-type problem.

[0090] The event joint extraction model trained using the annotation method of this embodiment processes the input text to obtain argument parameters and argument types of the argument parameters contained in the input text, which may include:

[0091] S1 uses the event joint extraction model to process the input text and obtain the first label matrix output by the model;

[0092] S2. Determine the argument parameters in the input text and the argument types of the argument parameters based on the values ​​of the elements at each position in the first label matrix output by the model.

[0093] Furthermore, an optional marking form of the element values in the first label matrix is provided in the embodiments of the present application.

[0094] In the training stage, in the first label matrix corresponding to the training text, the value of the element in the i-th row and j-th column can be represented by a 1*num_arg vector, where num_arg is the number of argument type categories. The value at the corresponding position of the argument type belonging to the vector is 1, and the rest of the positions are 0.

[0095] Specifically, the value 1*num_arg of the element in the i-th row and j-th column can be expressed as:

[0096] (i,j) = {a0,a1,...,a λ ,...,a num_arg-2 ,a num_arg-1}

[0097] where num_arg is the number of argument type categories, and a λ is the probability that the text x i :x j between the i-th word segment and the j-th word segment in the training text belongs to the λ-th argument type. Since it is determined whether each word segment in the training text is an argument in the training stage, if the text between the i-th word segment and the j-th word segment does not belong to the argument parameter, then all positions in the vector of the i-th row and j-th column in the first label matrix are 0; if the text between the i-th word segment and the j-th word segment belongs to the argument parameter and its belonging argument type is also determined, then in the vector of the i-th row and j-th column in the first label matrix, the value at the corresponding position of the belonging argument type is 1, and the rest of the positions are 0.

[0098] Take [[ID=2,8]] Figure 3 as an example. The argument parameter corresponding to the 3rd row and 6th column is "中", and there are two corresponding argument types, namely "subject belonging" and "nationality". Then, in the vector elements of the 3rd row and 6th column in the first label matrix, the values at the positions corresponding to the types "subject belonging" and "nationality" are 1, and the rest are 0.

[0099] Based on the above annotation method of the first label matrix, when training the event joint extraction model, the extraction of argument parameters and argument types can be achieved through multi-label classification, where the multi-label classification threshold can be set according to the actual situation, such as set to 0.5. For the first label matrix output by the model, it can be processed according to the multi-label classification threshold, adjusting the element values greater than or equal to the threshold to 1 and the element values less than the threshold to 0. The element values in the final first label matrix all consist of 0 and 1.

[0100] Output arg =sigmoid(W arg *X arg +barg )

[0101] Among them, W arg and b arg are model parameters.

[0102] According to the aforementioned first label matrix notation format, the aforementioned step S2, based on the values ​​of the elements at each position in the first label matrix output by the model, determines the argument parameters in the input text and the argument types of the argument parameters, may specifically include:

[0103] S21. Searching for the position of a non-all-zero vector element in the first label matrix output by the model, wherein the position includes the target row number x and the target column number y of the vector in the first label matrix;

[0104] S22. For each non-all-zero vector element, determine based on its position whether the text between the xth word segmentation and the yth word segmentation in the input text belongs to the argument parameter, and determine the target argument type corresponding to the position with a value of 1 in the non-all-zero vector element as the argument type of the argument parameter.

[0105] Furthermore, the existing event extraction task may also have the problem of mixing multiple events when dealing with certain complex scenarios. For an event, it consists of a trigger word and argument parameters. The trigger word and argument parameters of the same event must be related. The parameters contained in different events are inconsistent, and the argument parameters are not related. For some texts, one trigger word corresponds to multiple events. Figure 4 As shown in the example, for the text "On the 10th, Xiao Ming and Xiao Hong went to Grandma Liu's and Grandma Niu's homes to help clean," the trigger word "cleaning" in the text corresponds to two events: "On the 10th, Xiao Ming went to Grandma Liu's home to help clean" and "On the 10th, Xiao Hong went to Grandma Niu's home to help clean." These two events share the time parameter "10th." For this type of multi-event problem, existing technologies cannot effectively distinguish the argument parameters belonging to different events.

[0106] In this embodiment, the relationship between argument parameters is defined based on the concept of graph, and a new notation method is constructed to realize the recognition of argument relationships.

[0107] Specifically, during the event joint extraction model training phase, argument relationship labels are annotated on the training text in the form of a label matrix. Specifically, the argument relationship labels annotated on the training text include a second label matrix, which is an n*n matrix. The value of the element in the i-th row and j-th column of the second label matrix represents: the relationship category between the i-th participle and the j-th participle in the training text, wherein the relationship category includes the relationship HH between argument parameters starting with the i-th and j-th participles, the relationship EE between argument parameters ending with the i-th and j-th participles, and the remaining relationships O excluding the relationships HH and EE.

[0108] It is understandable that different relationship categories between word segments can be represented by setting values ​​of different elements in the second label matrix.

[0109] refer to Figure 5 The second label matrix of the example is annotated diagram. Taking the training text "Liu Xiaoming appeared in Beijing on the 14th" as an example, the second label matrix is ​​an 11*11 matrix. The values ​​of the elements in the matrix are not in Figure 5 As an example, Figure 5 The second label matrix is ​​described for illustrative purposes only. The positions filled with grids represent HH relationships, the positions filled with vertical lines represent EE relationships, and the remaining blank positions represent O relationships. For example, if there is a relationship between the argument parameter "14th" and "Beijing", then Figure 5 The positions corresponding to "14" and "North" (row 1, column 8, and column 1, row 8) are filled with grids, and the positions corresponding to "Sun" and "Beijing" (row 2, column 9, and column 2, row 9) are filled with vertical lines.

[0110] According to the annotation method provided in the embodiment of the present application, the trained event joint extraction model can predict the relationship between the various argument parameters contained in the input text. After knowing the relationship between the argument parameters, the argument parameters belonging to different events can be better sorted out, which can effectively solve the problem of multiple event mixing.

[0111] The event joint extraction model trained using the annotation method of this embodiment processes the input text to obtain the relationship between the argument parameters contained in the input text, which may include:

[0112] S1 uses the event joint extraction model to process the input text and obtain the second label matrix output by the model;

[0113] S2. Determine the relationship between argument parameters in the input text based on the value of each position element in the first label matrix output by the model.

[0114] Furthermore, an embodiment of the present application provides an optional marking form for element values ​​in the second label matrix.

[0115] During the training phase, in the second label matrix corresponding to the training text, the value of the element in the i-th row and j-th column is a vector of 1*num_rel, where num_rel is the number of argument relationship categories (3 (HH relationship, EE relationship, and O relationship)). The value of the position corresponding to the argument relationship category in the vector is 1, and the other positions are 0.

[0116] Specifically, the value 1*num_rel for the element in row i and column j can be expressed as:

[0117] (i,j)={a0,a1,a2}

[0118] Among them, a k is the probability that the i-th and j-th participles in the training text belong to the k-th relation type. Since whether each participle in the training text is an argument is determined during the training phase, if the i-th and j-th participles are not the first / last participles of the argument parameter, then the value of the position corresponding to the O relation type in the vector in the i-th row and j-th column of the second label matrix is ​​1, and the rest of the positions are 0; if the i-th and j-th participles are the first participles of the argument parameter, then the value of the position corresponding to the HH relation type in the vector in the i-th row and j-th column of the second label matrix is ​​1, and the rest of the positions are 0; if the i-th and j-th participles are the last participles of the argument parameter, then the value of the position corresponding to the EE relation type in the vector in the i-th row and j-th column of the second label matrix is ​​1, and the rest of the positions are 0.

[0119] Based on the annotation method of the second label matrix above, the second label matrix output by the event joint extraction model can be expressed as:

[0120] Output rel =softmax(W rel *X arg +b rel )

[0121] Among them, W rel and b rel are model parameters.

[0122] According to the second label matrix notation format, the process of determining the relationship between the argument parameters in the input text based on the values ​​of the elements at each position in the first label matrix output by the model in step S2 may specifically include:

[0123] S21. In the second label matrix output by the model, for the vector element in the zth row and the hth column:

[0124] The target argument relationship category corresponding to the position where the value is 1 is determined as the argument relationship between the zth participle and the hth participle in the input text.

[0125] In some embodiments of the present application, the process of dividing each argument parameter into at least one set based on the relationship between the argument parameters in step S120 in the aforementioned embodiment is introduced.

[0126] In an optional way, after determining the relationship between the argument parameters, an argument parameter relationship diagram can be drawn, and based on the argument parameter relationship diagram, the argument parameters belonging to different events can be divided. Specifically, the following steps are implemented:

[0127] S1. Take argument parameters as vertices and connect the vertices represented by argument parameters that have associated relationships to obtain an argument parameter relationship graph.

[0128] S2. Select a vertex that has not been added to the set in the argument parameter relationship graph as a target vertex, and add it to the created empty set.

[0129] S3. Determine a neighbor vertex connected to the target vertex, add the neighbor vertex to the set, and use the neighbor vertex as a new target vertex, and return to executing S3 to determine the neighbor vertex connected to the target vertex until no new neighbor vertex is found.

[0130] S4. Determine whether there are any vertices in the argument parameter relationship graph that have not been added to the set. If not, end. If so, return to the step of selecting a vertex in the argument parameter relationship graph that has not been added to the set as the target vertex and adding it to the created empty set.

[0131] The solution introduced in this embodiment can be well adapted to some simple scenarios. However, when different events share argument parameters, division errors may easily occur.

[0132] To this end, this application further provides another method for dividing argument parameters. In order to identify argument parameters shared by different events and accurately parse argument parameters of different events, this embodiment designs a solution based on the idea of ​​graph algorithm:

[0133] In order to measure the strength of the relationship between argument parameters, this application defines the correlation between argument parameters:

[0134] Asso(i,j)=mean(f E-E ,f H-H )

[0135] Among them, f E-E is the probability value of the association between argument parameter i and the final participle of argument parameter j, f H-HIt is the probability value of the association relationship between argument parameter i and the first participle of argument parameter j. Both parameters can be obtained from the output of the event joint extraction model. The mean() function represents the average value.

[0136] The node degree of each argument parameter is the sum of the association degrees of all argument parameters that have an association relationship with the argument parameter:

[0137]

[0138] Among them, I is the set of all argument parameters that are associated with argument parameter i.

[0139] In this embodiment, a fitness function is set, and the set partitioning of each argument parameter is achieved by maximizing the fitness function:

[0140]

[0141] Among them, K is the number of divided sets, is the internal degree of the kth set, which is the sum of the association degrees Asso between all argument parameters in the set, is the external degree of the kth set, which is the sum of the association degrees Asso between all argument parameters in the set and all argument parameters outside the set.

[0142] This embodiment further provides an analytical algorithm, which achieves the goal of maximizing the set fitness function and dividing each argument parameter into at least one set. The specific analytical algorithm process is as follows:

[0143] S1. Among the argument parameters that have not been added to the set, select the argument parameter with the highest node degree as the initial argument parameter.

[0144] S2. Create a blank set and add the initial argument parameters to the created set.

[0145] S3. For each neighbor argument parameter associated with the initial argument parameter, calculate the fitness of the neighbor argument parameter for the set: a fitness change value of the set when the neighbor argument parameter exists and when the neighbor argument parameter does not exist.

[0146] Specifically, the fitness can be calculated using the fitness function. The fitness of the set when the neighbor argument parameter exists is subtracted from the fitness of the set when the neighbor argument parameter does not exist, which is used as the fitness change value. The fitness of the set with the neighbor argument parameter is equal to the fitness change value.

[0147] S4. Select the neighbor argument parameter with the largest fitness from all neighbor argument parameters and add it to the set, and update the fitness of the set. Return to execute step S3, and calculate the fitness of the neighbor argument parameter for the set until there is no neighbor argument parameter that increases the fitness of the set.

[0148] S5. Calculate the fitness of each argument parameter in the set except the initial argument parameter for the set: the fitness change value of the set when the argument parameter exists and when the argument parameter does not exist.

[0149] S6. Delete the argument parameter with the smallest fitness from the set, update the fitness of the set, and return to execute step S5, the step of calculating the fitness of each argument parameter in the set except the initial argument parameter for the set, until there are no argument parameters in the set that reduce the fitness of the set.

[0150] S7. Determine whether there are argument parameters that have not been added to any set. If so, return to step S1 and select the argument parameter with the highest node degree among the argument parameters that have not been added to the set as the initial argument parameter. If not, end and obtain each set, each set corresponding to the argument parameter belonging to an event.

[0151] According to the analytical algorithm provided in this embodiment, for Figure 4 The parameter relationship of each argument in the example will eventually be divided into two sets, one set is [Xiao Ming, Grandma Liu's house, 10th], and the other set is [Xiao Hong, 10th, Grandma Niu's house].

[0152] In some embodiments of the present application, another event extraction method is provided for extracting event argument parameters from input text, and can solve the text overlap problem and the single argument multi-type problem. The specific scheme is as follows:

[0153] S1. Obtain the input text of the event argument to be extracted.

[0154] S2. Input the input text into a preconfigured argument extraction model to obtain a label matrix output by the model.

[0155] Among them, the argument extraction model is trained with training text annotated with a label matrix. The annotated label matrix is ​​an n*n matrix, n is the number of segmentations contained in the training text, and the value of the element in the i-th row and j-th column in the label matrix indicates whether the text between the i-th segmentation and the j-th segmentation in the training text belongs to the argument parameter, and the corresponding argument type when it belongs to the argument parameter.

[0156] Specifically, the label matrix in this embodiment can refer to the first label matrix introduced above, and will not be described in detail.

[0157] S3. Determine the argument parameters in the input text and the argument types of the argument parameters based on the values ​​of the elements at each position in the label matrix output by the model.

[0158] Optionally, in the label matrix annotated during the argument extraction model training process, the value of the element in the i-th row and j-th column is a vector of 1*num_arg, where num_arg is the number of categories of the argument type, and the value of the position corresponding to the argument type in the vector is 1, and the remaining positions are 0. On this basis, the above step S3, based on the value of the element at each position in the label matrix output by the model, determines the argument parameters in the input text and the argument type of the argument parameters, and the process may include:

[0159] Find the position of non-all-zero vector elements in the label matrix output by the model, where the position includes the target row number x and the target column number y of the vector in the label matrix;

[0160] For each non-all-zero vector element, determine based on its position whether the text between the xth word segmentation and the yth word segmentation in the input text belongs to the argument parameter, and determine the target argument type corresponding to the position with a value of 1 in the non-all-zero vector element as the argument type of the argument parameter.

[0161] According to the label matrix annotation format provided in this embodiment, the training text can be annotated with arguments and argument types in a multi-label format. The event joint extraction model based on this training can solve the text overlap problem and the single argument multi-type problem.

[0162] Optionally, in the label matrix annotated during the argument relationship recognition model training process, the value of the element in the i-th row and j-th column is a vector of 1*num_rel, where num_rel is the number of argument relationship categories (3), and the value of the position corresponding to the argument relationship category in the vector is 1, while the other positions are 0. On this basis, the above step S3, based on the value of the element at each position in the label matrix output by the model, determines the relationship category between each argument in the input text, and may include:

[0163] In the second label matrix output by the model, for the vector element in the zth row and hth column:

[0164] The target argument relationship category corresponding to the position where the value is 1 is determined as the argument relationship between the zth participle and the hth participle in the input text.

[0165] According to the label matrix annotation format provided in this embodiment, the argument parameter relationship can be annotated in units of word segments. The event joint extraction model trained based on this can identify the relationship between the argument parameters contained in the input text and solve the problem of multiple event mixing.

[0166] In some embodiments of the present application, another event extraction method is provided for extracting event argument relationships from input text, and can solve the problem of multiple events being mixed. The specific solution is as follows:

[0167] S1. Obtain the input text of the event argument relationship to be extracted.

[0168] S2. Input the input text into a preconfigured argument relationship recognition model to obtain a label matrix output by the model.

[0169] Among them, the argument relationship recognition model is trained with a training text annotated with a label matrix, the annotated label matrix is ​​an n*n matrix, n is the number of segmentations contained in the training text, and the value of the element in the i-th row and j-th column in the label matrix represents: the relationship category between the i-th segmentation and the j-th segmentation in the training text, the relationship category includes the relationship HH between the argument parameters headed by the i-th and j-th segmentations, the relationship EE between the argument parameters tailed by the i-th and j-th segmentations, and the remaining relationships O excluding the relationships HH and EE.

[0170] Specifically, the label matrix in this embodiment can refer to the second label matrix introduced above, and will not be described in detail.

[0171] S3. Determine the relationship category between the argument parameters in the input text based on the value of each position element in the label matrix output by the model.

[0172] After obtaining the relationship between the argument parameters, the argument parameters may be divided into at least one set based on the relationship between the argument parameters, wherein each argument parameter in a set corresponds to an event.

[0173] Specifically, based on the relationship between the argument parameters, the process of dividing the argument parameters into at least one set can refer to the relevant introduction above and will not be repeated here.

[0174] The event extraction device provided in an embodiment of the present application is described below. The event extraction device described below and the event extraction method described above can be referenced to each other.

[0175] See also Figure 6 , Figure 6 This is a schematic diagram of the structure of an event extraction device disclosed in an embodiment of the present application.

[0176] like Figure 6 As shown, the device may include:

[0177] An input text acquisition unit 11 is used to acquire input text for event extraction;

[0178] A model processing unit 12 is configured to process the input text using a preconfigured event joint extraction model to obtain trigger words, argument parameters, argument types of each argument parameter, and relationships between argument parameters contained in the input text; wherein the event joint extraction model is trained using training text annotated with trigger word labels, argument labels, argument type labels, and argument relationship labels;

[0179] The argument parameter division unit 13 is configured to divide the argument parameters into at least one set based on the relationship between the argument parameters, wherein each argument parameter in a set corresponds to an event.

[0180] Optionally, the above-mentioned event joint extraction model can be configured to: encode the input text, predict the trigger words contained in the input text based on the encoding vector, and combine the encoding vector of the trigger word and the encoding vector of the input text, and predict the internal state representation of the argument parameters, argument types and the relationship between the argument parameters contained in the input text based on the combined encoding vector.

[0181] Optionally, the event joint extraction model may include an encoding module, an encoding combination module, a trigger word extraction module, an argument extraction module, and an argument relationship identification module. Based on this, the model processing unit processes the input text using the preconfigured event joint extraction model to obtain the trigger words, argument parameters, and the relationships between the argument parameters contained in the input text, which may include:

[0182] Encode the input text using the encoding module to obtain a text encoding vector;

[0183] Using the trigger word extraction module to predict trigger words contained in the input text based on the text encoding vector;

[0184] Encoding each group of trigger words output by the trigger word extraction module using the encoding combination module, combining the encoding vectors of a group of trigger words with the text encoding vector to obtain a combined encoding vector;

[0185] Using the argument extraction module to predict argument parameters contained in the input text and the argument type of each argument parameter based on the combined encoding vector;

[0186] The argument relationship recognition module is used to predict the relationship between the argument parameters contained in the input text based on the combined coding vector.

[0187] Optionally, the apparatus of the present application may further include a model training unit for training an event joint extraction model. The training process of the event joint extraction model may include:

[0188] Obtain training text annotated with trigger word labels, argument labels, argument type labels, and argument relationship labels;

[0189] Inputting the training text into the event joint extraction model to obtain the trigger words, argument parameters, argument types of the argument parameters, and relationships between the argument parameters contained in the training text as predicted by the model;

[0190] Based on the trigger words, argument parameters, argument types of each argument parameter and the relationship between each argument parameter contained in the training text predicted by the model, as well as the trigger word labels, argument labels, argument type labels and argument relationship labels annotated in the training text, the total loss function is determined, and the network parameters of the event joint extraction model are updated according to the total loss function until the set training end conditions are met.

[0191] Optionally, the argument labels and argument type labels annotated in the training text may include: a first label matrix, wherein the first label matrix is ​​an n*n matrix, where n is the number of word segments contained in the training text, and the value of the element in the i-th row and j-th column of the first label matrix indicates whether the text between the i-th word segment and the j-th word segment in the training text belongs to an argument parameter, and the corresponding argument type when it belongs to an argument parameter. On this basis, the model processing unit uses a preconfigured event joint extraction model to process the input text to obtain the argument parameters contained in the input text and the argument type of each argument parameter, which may include:

[0192] Processing the input text using a preconfigured event joint extraction model to obtain a first label matrix output by the model;

[0193] Based on the values ​​of the elements at each position in the first label matrix output by the model, an argument parameter in the input text and an argument type of the argument parameter are determined.

[0194] Optionally, in the first label matrix of the training text annotation in the event joint extraction model training process, the value of the element in the i-th row and j-th column is a vector of 1*num_arg, where num_arg is the number of categories of the argument type, and the value of the position corresponding to the argument type in the vector is 1, and the remaining positions are 0; then, the model processing unit determines the argument parameters in the input text and the argument type of the argument parameters based on the values ​​of the elements at each position in the first label matrix output by the model, which may include:

[0195] Searching for a position of a non-all-zero vector element in the first label matrix output by the model, the position including the target row number x and the target column number y of the vector in the first label matrix;

[0196] For each non-all-zero vector element, determine based on its position whether the text between the xth word segmentation and the yth word segmentation in the input text belongs to the argument parameter, and determine the target argument type corresponding to the position with a value of 1 in the non-all-zero vector element as the argument type of the argument parameter.

[0197] Optionally, the argument relationship labels annotated in the training text may include: a second label matrix, wherein the second label matrix is ​​an n*n matrix, and the value of the element in the i-th row and j-th column of the second label matrix represents: the relationship category between the i-th participle and the j-th participle in the training text, wherein the relationship category includes the relationship HH between argument parameters starting with the i-th and j-th participles, the relationship EE between argument parameters ending with the i-th and j-th participles, and the remaining relationships O excluding the relationships HH and EE. On this basis, the model processing unit processes the input text using a preconfigured event joint extraction model to obtain the relationship between the argument parameters, which may include:

[0198] Processing the input text using a preconfigured event joint extraction model to obtain a second label matrix output by the model;

[0199] Based on the value of each position element in the second label matrix output by the model, the relationship between each argument parameter in the input text is determined.

[0200] Optionally, in the second label matrix of the training text annotation in the event joint extraction model training process, the value of the element in the i-th row and j-th column is a vector of 1*num_rel, where num_rel is the number of argument relationship categories (3), and the value of the position corresponding to the argument relationship category in the vector is 1, and the remaining positions are 0; then, the process of the model processing unit determining the relationship between the argument parameters in the input text based on the value of the element at each position in the second label matrix output by the model may include:

[0201] In the second label matrix output by the model, for the vector element in the zth row and hth column:

[0202] The target argument relationship category corresponding to the position where the value is 1 is determined as the argument relationship between the zth participle and the hth participle in the input text.

[0203] Optionally, the process of dividing the argument parameters into at least one set based on the relationship between the argument parameters by the argument parameter dividing unit may include:

[0204] Taking argument parameters as vertices, connect the vertices represented by argument parameters that have associated relationships to obtain an argument parameter relationship graph;

[0205] Selecting a vertex that has not been added to the set in the argument parameter relationship graph as a target vertex, and adding it to the created empty set;

[0206] Determine a neighbor vertex connected to the target vertex, add the neighbor vertex to the set, and use the neighbor vertex as a new target vertex, and return to the step of determining the neighbor vertex connected to the target vertex until no new neighbor vertex is found;

[0207] Determine whether there are any vertices in the argument parameter relationship graph that have not been added to the set. If not, end. If so, return to the step of selecting a vertex in the argument parameter relationship graph that has not been added to the set as the target vertex and adding it to the created empty set.

[0208] Optionally, the process of dividing the argument parameters into at least one set based on the relationship between the argument parameters by the argument parameter dividing unit may include:

[0209] With the goal of maximizing the set fitness function, each argument parameter is divided into at least one set, where the fitness function is:

[0210]

[0211] Among them, K is the number of divided sets, is the internal degree of the kth set, which is the sum of the association degrees Asso between all argument parameters in the set, is the external degree of the kth set, which is the sum of the association degrees Asso between all argument parameters in the set and all argument parameters outside the set;

[0212] Among them, the correlation degree Asso between argument parameters i and j is:

[0213] Asso(i,j)=mean(f E-E ,f H-H )

[0214] f E-E is the probability value of the association between argument parameter i and the final participle of argument parameter j, f H-H It is the probability value that there is an association relationship between argument parameter i and the first participle of argument parameter j, and the mean() function represents the average value.

[0215] Optionally, the process of dividing each argument parameter into at least one set by the argument parameter division unit with the goal of maximizing a set fitness function may include:

[0216] Among the argument parameters that have not been added to the set, the argument parameter with the highest node degree is selected as the initial argument parameter, where the node degree of argument parameter i is expressed as:

[0217]

[0218] Where I is the set of all argument parameters that are associated with argument parameter i;

[0219] Create a blank set, and add the initial argument parameter to the created set;

[0220] For each neighbor argument parameter associated with the initial argument parameter, calculating the fitness of the neighbor argument parameter for the set: a change in the fitness of the set when the neighbor argument parameter is present and when the neighbor argument parameter is absent;

[0221] Selecting a neighbor argument parameter with the largest fitness from all neighbor argument parameters and adding it to the set, updating the fitness of the set, and returning to the step of calculating the fitness of the neighbor argument parameter for the set until no neighbor argument parameter increases the fitness of the set;

[0222] Calculate the fitness of each argument parameter in the set except the initial argument parameter for the set: the fitness change value of the set when the argument parameter exists and when it does not exist;

[0223] Deleting the argument parameter with the smallest fitness from the set, updating the fitness of the set, and returning to the step of calculating the fitness of each argument parameter in the set except the initial argument parameter for the set, until no argument parameter in the set causes the fitness of the set to decrease;

[0224] Determine whether there are any argument parameters that have not been added to any set. If not, end. If so, return to the step of selecting the argument parameter with the highest node degree as the initial argument parameter among the argument parameters that have not been added to the set.

[0225] The event extraction device provided in the embodiment of the present application can be applied to event extraction devices, such as terminals: mobile phones, computers, etc. Optionally, Figure 7 The hardware structure diagram of the event extraction device is shown in FIG. Figure 7 ,The hardware structure of the event extraction device may include: at least one processor 1, at least one communication interface 2, at least one memory 3 and at least one communication bus 4;

[0226] In the embodiment of the present application, the number of the processor 1, the communication interface 2, the memory 3, and the communication bus 4 is at least one, and the processor 1, the communication interface 2, and the memory 3 communicate with each other through the communication bus 4;

[0227] The processor 1 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention;

[0228] The memory 3 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory;

[0229] The memory stores a program, and the processor can call the program stored in the memory, wherein the program is used to:

[0230] Get the input text for event extraction;

[0231] Processing the input text using a preconfigured event joint extraction model to obtain trigger words, argument parameters, argument types of each argument parameter, and relationships between argument parameters contained in the input text; wherein the event joint extraction model is trained using training text annotated with trigger word labels, argument labels, argument type labels, and argument relationship labels;

[0232] Based on the relationship between the argument parameters, the argument parameters are divided into at least one set, wherein each argument parameter in a set corresponds to an event.

[0233] Optionally, the detailed functions and extended functions of the program may refer to the above description.

[0234] An embodiment of the present application further provides a storage medium, which may store a program suitable for execution by a processor, wherein the program is used to:

[0235] Get the input text for event extraction;

[0236] Processing the input text using a preconfigured event joint extraction model to obtain trigger words, argument parameters, argument types of each argument parameter, and relationships between argument parameters contained in the input text; wherein the event joint extraction model is trained using training text annotated with trigger word labels, argument labels, argument type labels, and argument relationship labels;

[0237] Based on the relationship between the argument parameters, the argument parameters are divided into at least one set, wherein each argument parameter in a set corresponds to an event.

[0238] Optionally, the detailed functions and extended functions of the program may refer to the above description.

[0239] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.

[0240] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can be referenced to each other.

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

Claims

1. An event extraction method, characterized in that: include: Get the input text for event extraction; Processing the input text using a preconfigured event joint extraction model to obtain trigger words, argument parameters, argument types of each argument parameter, and relationships between argument parameters contained in the input text; wherein the event joint extraction model is trained using training text annotated with trigger word labels, argument labels, argument type labels, and argument relationship labels; With the goal of maximizing the set fitness function, each argument parameter is divided into at least one set, where the fitness function is: k∈(1,K) Among them, K is the number of divided sets, is the internal degree of the kth set, which is the sum of the association degrees Asso between all argument parameters in the set, is the external degree of the kth set, which is the sum of the association degrees Asso between all argument parameters in the set and all argument parameters outside the set; Among them, the correlation degree Asso between argument parameters i and j is: Asso(i,j)=mean(f E-E ,f H-H ) f E-E is the probability value of the association between argument parameter i and the final participle of argument parameter j, f H-H It is the probability value that there is an association relationship between argument parameter i and the first participle of argument parameter j. The mean() function represents the average value, where each argument parameter in a set corresponds to an event.

2. The method according to claim 1, characterized in that The event joint extraction model is configured to: encode the input text, predict the trigger words contained in the input text based on the encoding vector, and combine the encoding vector of the trigger word and the encoding vector of the input text, and predict the internal state representation of the argument parameters, argument types and the relationship between the argument parameters contained in the input text based on the combined encoding vector.

3. The method according to claim 2, characterized in that The event joint extraction model includes a coding module, a coding combination module, a trigger word extraction module, an argument extraction module and an argument relationship recognition module; The method of processing the input text using a preconfigured event joint extraction model to obtain trigger words, argument parameters, and relationships between argument parameters contained in the input text includes: Encode the input text using the encoding module to obtain a text encoding vector; Using the trigger word extraction module to predict trigger words contained in the input text based on the text encoding vector; Encoding each group of trigger words output by the trigger word extraction module using the encoding combination module, combining the encoding vectors of a group of trigger words with the text encoding vector to obtain a combined encoding vector; Using the argument extraction module to predict argument parameters contained in the input text and the argument type of each argument parameter based on the combined encoding vector; The argument relationship recognition module is used to predict the relationship between the argument parameters contained in the input text based on the combined coding vector.

4. The method according to claim 1, wherein The training process of the event joint extraction model includes: Obtain training text annotated with trigger word labels, argument labels, argument type labels, and argument relationship labels; Inputting the training text into the event joint extraction model to obtain the trigger words, argument parameters, argument types of the argument parameters, and relationships between the argument parameters contained in the training text as predicted by the model; Based on the trigger words, argument parameters, argument types of each argument parameter and the relationship between each argument parameter contained in the training text predicted by the model, as well as the trigger word labels, argument labels, argument type labels and argument relationship labels annotated in the training text, the total loss function is determined, and the network parameters of the event joint extraction model are updated according to the total loss function until the set training end conditions are met.

5. The method according to claim 4, characterized in that The argument labels and argument type labels annotated with the training text include: a first label matrix, the first label matrix is ​​an n*n matrix, n is the number of word segments contained in the training text, and the value of the element in the i-th row and j-th column of the first label matrix indicates whether the text between the i-th word segmentation and the j-th word segmentation in the training text belongs to the argument parameter, and the corresponding argument type when it belongs to the argument parameter.

6. The method according to claim 5, characterized in that The process of processing the input text using a preconfigured event joint extraction model to obtain argument parameters contained in the input text and argument types of each argument parameter includes: Processing the input text using a preconfigured event joint extraction model to obtain a first label matrix output by the model; Based on the value of each position element in the first label matrix output by the model, an argument parameter in the input text and an argument type of the argument parameter are determined.

7. The method according to claim 6, characterized in that In the first label matrix of the training text annotation of the event joint extraction model training process, the value of the element in the i-th row and j-th column is a vector of 1*num_arg, where num_arg is the number of categories of the argument type, and the value of the position corresponding to the argument type in the vector is 1, and the other positions are 0; Then, the method of determining the argument parameters in the input text and the argument types of the argument parameters based on the values ​​of the elements at each position in the first label matrix output by the model includes: Searching for a position of a non-all-zero vector element in the first label matrix output by the model, the position including the target row number x and the target column number y of the vector in the first label matrix; For each non-all-zero vector element, determine based on its position whether the text between the xth word segmentation and the yth word segmentation in the input text belongs to the argument parameter, and determine the target argument type corresponding to the position with a value of 1 in the non-all-zero vector element as the argument type of the argument parameter.

8. The method according to claim 4, characterized in that The argument relationship labels annotated in the training text include: a second label matrix, the second label matrix is ​​an n*n matrix, and the value of the element in the i-th row and j-th column in the second label matrix represents: the relationship category between the i-th participle and the j-th participle in the training text, the relationship category including the association HH between the argument parameters headed by the i-th and j-th participles, the association EE between the argument parameters tailed by the i-th and j-th participles, and the remaining relationships O excluding the relationships HH and EE.

9. The method according to claim 8, characterized in that The process of processing the input text using the preconfigured event joint extraction model to obtain the relationship between the argument parameters includes: Processing the input text using a preconfigured event joint extraction model to obtain a second label matrix output by the model; Based on the value of each position element in the second label matrix output by the model, the relationship between each argument parameter in the input text is determined.

10. The method according to claim 9, characterized in that In the second label matrix of the training text annotation in the event joint extraction model training process, the value of the element in the i-th row and j-th column is a vector of 1*num_rel, where num_rel is the number of argument relationship categories 3, and the value of the position corresponding to the argument relationship category in the vector is 1, and the other positions are 0; Then, determining the relationship between the argument parameters in the input text based on the value of each position element in the second label matrix output by the model includes: In the second label matrix output by the model, for the vector element in the zth row and hth column: The target argument relationship category corresponding to the position where the value is 1 is determined as the argument relationship between the zth participle and the hth participle in the input text.

11. The method according to any one of claims 1 to 10, characterized in that Based on the relationship between the argument parameters, the argument parameters are divided into at least one set, including: Taking argument parameters as vertices, connect the vertices represented by argument parameters that have associated relationships to obtain an argument parameter relationship graph; Selecting a vertex that has not been added to the set in the argument parameter relationship graph as a target vertex, and adding it to the created empty set; Determine a neighbor vertex connected to the target vertex, add the neighbor vertex to the set, and use the neighbor vertex as a new target vertex, and return to the step of determining the neighbor vertex connected to the target vertex until no new neighbor vertex is found; Determine whether there are any vertices in the argument parameter relationship graph that have not been added to the set. If not, end. If so, return to the step of selecting a vertex in the argument parameter relationship graph that has not been added to the set as the target vertex and adding it to the created empty set.

12. The method according to claim 1, characterized in that The goal is to maximize the set fitness function, and to divide each argument parameter into at least one set, including: Among the argument parameters that have not been added to the set, the argument parameter with the highest node degree is selected as the initial argument parameter, where the node degree of argument parameter i is expressed as: Where I is the set of all argument parameters that are associated with argument parameter i; Create a blank set, and add the initial argument parameter to the created set; For each neighbor argument parameter associated with the initial argument parameter, calculating the fitness of the neighbor argument parameter for the set: a change in the fitness of the set when the neighbor argument parameter is present and when the neighbor argument parameter is absent; Selecting a neighbor argument parameter with the largest fitness from all neighbor argument parameters and adding it to the set, updating the fitness of the set, and returning to the step of calculating the fitness of the neighbor argument parameter for the set until no neighbor argument parameter increases the fitness of the set; Calculate the fitness of each argument parameter in the set except the initial argument parameter for the set: the fitness change value of the set when the argument parameter exists and when it does not exist; Deleting the argument parameter with the smallest fitness from the set, updating the fitness of the set, and returning to the step of calculating the fitness of each argument parameter in the set except the initial argument parameter for the set, until no argument parameter in the set causes the fitness of the set to decrease; Determine whether there are any argument parameters that have not been added to any set. If not, end. If so, return to the step of selecting the argument parameter with the highest node degree as the initial argument parameter among the argument parameters that have not been added to the set.

13. An event extraction device, characterized in that: include: An input text acquisition unit, used to acquire input text to be used for event extraction; a model processing unit, configured to process the input text using a preconfigured event joint extraction model to obtain trigger words, argument parameters, argument types of each argument parameter, and relationships between argument parameters contained in the input text; wherein the event joint extraction model is trained using training text annotated with trigger word labels, argument labels, argument type labels, and argument relationship labels; The argument parameter partitioning unit is used to partition each argument parameter into at least one set with the goal of maximizing a set fitness function, wherein the fitness function is: k∈(1,K) Among them, K is the number of divided sets, is the internal degree of the kth set, which is the sum of the association degrees Asso between all argument parameters in the set, is the external degree of the kth set, which is the sum of the association degrees Asso between all argument parameters in the set and all argument parameters outside the set; Among them, the correlation degree Asso between argument parameters i and j is: Asso(i,j)=mean(f E-E ,f H-H ) f E-E is the probability value of the association between argument parameter i and the final participle of argument parameter j, f H-H It is the probability value that there is an association relationship between argument parameter i and the first participle of argument parameter j. The mean() function represents the average value, where each argument parameter in a set corresponds to an event.

14. An event extraction device, characterized in that: include: memory and processor; The memory is used to store programs; The processor is configured to execute the program to implement each step of the event extraction method according to any one of claims 1 to 12.

15. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, each step of the event extraction method according to any one of claims 1 to 12 is implemented.

Citation Information

Patent Citations

  • Event extraction method and device, electronic equipment and readable storage medium

    CN114328838A