Event element extraction method and device, electronic equipment and storage medium
By performing multi-dimensional vectorization and self-attention weighted processing on financial texts, combined with a target domain corpus and a bidirectional long short-term memory network, the problems of pronoun ambiguity and redundancy in the extraction of event elements in the financial field are solved, thus improving the extraction effect.
Patent Information
- Application Number
- CN202310257340.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-09
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2043-03-09
AI Technical Summary
Existing technologies lack targeted extraction methods for event elements in the financial field, resulting in problems such as unclear pronoun references, redundant and contradictory event element extraction, and a limited number of event datasets in the financial field.
By performing multi-dimensional vectorization on the original text, basic semantic vectors are generated. Then, a self-attention mechanism is used to perform relevance weighting to generate enhanced semantic vectors. Finally, event element extraction is optimized by combining the target domain corpus and bidirectional long short-term memory network.
It improves the accuracy and recall of event element extraction, eliminates pronoun ambiguity, and enhances the ability to understand events in the financial field.
Smart Images

Figure CN116204609B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of deep learning, and particularly relates to an event element extraction method and device, electronic equipment and storage medium. BACKGROUND
[0002] Event element extraction is to extract formal triples of <event identifier, event element role name, event element role value> from original text to help us understand important information of events and realize automatic processing of massive information. Compared with entity extraction and relation extraction, the data processed by event element extraction is more complex and the scene is more variable. With the rapid development of deep learning and the increasing demand for event element extraction, using deep learning to automatically extract event elements avoids the dependence on tool construction and feature engineering, and the extraction effect is also improved compared with other methods. Therefore, event element extraction based on deep learning has become a research hotspot.
[0003] For example, the event extraction framework JMEE is used, which introduces syntactic shortcut arc enhanced information representation and graph neural network to construct event graph information, effectively solving the complex event extraction task of multiple events corresponding to one sentence; or by analyzing the domain related data, defining multiple event trigger words and multiple event element labels, an attention mechanism based on event elements is proposed to improve the extraction ability of event elements; or based on the double affine deep grammar dependency tree, the mask mechanism is optimized, the constraint relationship between entities, trigger words and element roles is input into the model to improve the extraction effect of event elements.
[0004] However, the related art does not mention the disambiguation of multiple representations of the same object, especially in the financial field, there are many pronouns referring to certain elements, which will cause problems such as missing of attributes of pronoun and element mapped objects, event element extraction redundancy and / or event element contradiction. In addition, the existing event data sets are mostly general data sets, and there are few databases related to financial events, lacking targeted event element extraction methods for the financial field. SUMMARY
[0005] In order to solve at least one of the foregoing problems, the present disclosure provides an event element extraction method, device, electronic equipment and storage medium.
[0006] According to one aspect of the present disclosure, an event element extraction method is provided, which can include: performing multi-dimensional vectorization processing on each word in an original text to obtain a basic semantic vector for representing an independent semantic of the word; performing correlation weighting on the basic semantic vector to obtain a strengthened semantic vector for representing a text-related semantic of the word, wherein a plurality of words referring to the same text-related semantic correspond to the same strengthened semantic vector; and determining an element role corresponding to the strengthened semantic vector in an event type of the original text to obtain an event element including the element role.
[0007] In some embodiments, the multi-dimensional vectorization processing on each word in the original text to obtain a basic semantic vector for representing an independent semantic of the word includes: obtaining a plurality of semantic vectors of each word in the original text, wherein the semantic vectors at least include a word vector, a character vector, a position vector, an event type vector, and an external information vector; and fusing each semantic vector to generate the basic semantic vector for representing the independent semantic of the word, wherein the independent semantic is a general semantic of the word in an event type corresponding to the original text.
[0008] In some embodiments, the correlation weighting on the basic semantic vector to obtain a strengthened semantic vector for representing a text-related semantic of the word includes: determining a correlation between a query word and a target word in the original text according to the basic semantic vector, wherein each word in the original text is a query word by polling, and the target word is a word other than the query word in the original text; performing normalization processing on the correlation to generate an attention score for representing a similarity between the query word and the target word; fusing the attention score and a feature vector of the corresponding target word to obtain an attention fusion result of the target word; and integrating the attention fusion results of each target word to generate a strengthened semantic vector for representing a text-related semantic of the query word.
[0009] In some embodiments, the attention score is:
[0010]
[0011] wherein, α i,j is a correlation between an i-th word in the original text and a j-th word in the original text, the i-th word is a query word, and the j-th word is a target word; n is a total number of words in the original text, and the α i,n is a correlation between the i-th word in the original text and an n-th word in the original text.
[0012] In some embodiments, the event element comprises: an event identification, the element role, and the element role value.
[0013] In some embodiments, the event type comprises at least: a change of ownership, a bond issuance, a company listing, a capital restructuring, a merger and acquisition, and a major contract.
[0014] In some embodiments, before the multi-dimensional vectorization of each word in the original text to obtain a basic semantic vector for representing an independent semantic of the word, the method further comprises: processing a plurality of raw corpora of a target field to construct a corpus of the target field that integrates word table information and artificial annotation information.
[0015] In some embodiments, after the relevance weighting of the basic semantic vector to obtain a strengthened semantic vector for representing a text-related semantic of the word, the method further comprises: fusing a forward time sequence and a backward time sequence of the original text to obtain a global feature sequence for representing a time sequence feature of the original text.
[0016] In some embodiments, after the fusing of the forward time sequence and the backward time sequence of the original text to obtain the global feature sequence for representing the time sequence feature of the original text, the method further comprises: determining a plurality of time sequence labels of each word of the original text, arranging a plurality of the time sequence labels in a time sequence using a conditional random field to generate a label time sequence, and verifying the global feature sequence using the time sequence label sequence to optimize the global feature sequence to obtain a target time sequence for representing real time sequence information of the word.
[0017] According to another aspect of the present disclosure, an event element extraction device is provided, which can comprise: a vectorization processing module configured to perform multi-dimensional vectorization on each word in an original text to obtain a basic semantic vector for representing an independent semantic of the word; a pronoun disambiguation module configured to perform relevance weighting on the basic semantic vector to obtain a strengthened semantic vector for representing a text-related semantic of the word, wherein a plurality of words referring to the same text-related semantic correspond to the same strengthened semantic vector; and an event element extraction module configured to determine an element role corresponding to the strengthened semantic vector in an event type of the original text to obtain an event element comprising the element role.
[0018] According to still another aspect of the present disclosure, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the program, the event element extraction method according to any one of the above embodiments is implemented.
[0019] According to still another aspect of the present disclosure, a readable storage medium is provided, which stores a computer program adapted to be loaded on a processor to execute the event element extraction method according to any one of the above embodiments. BRIEF DESCRIPTION OF DRAWINGS
[0020] The accompanying drawings, which are included to provide a further understanding of the present disclosure and are incorporated in and constitute a part of this specification, illustrate exemplary embodiments of the present disclosure and together with the description serve to explain the principles of the present disclosure.
[0021] Figure 1 Flow chart of the event element extraction method according to the exemplary embodiment of the present disclosure;
[0022] Figure 2 Architecture diagram of the event element extraction model according to the exemplary embodiment of the present disclosure;
[0023] Figure 3 Relationship heat map of the self-attention mechanism according to the exemplary embodiment of the present disclosure;
[0024] Figure 4 Schematic diagram of the dot product calculation according to the exemplary embodiment of the present disclosure;
[0025] Figure 5 Schematic diagram of the global feature sequence extraction according to the exemplary embodiment of the present disclosure;
[0026] Figure 6 Schematic diagram of the corpus generation according to the exemplary embodiment of the present disclosure;
[0027] Figure 7 Comparison diagram of the influence of the multi-head attention mechanism on the event element extraction result;
[0028] Figure 8 Comparison diagram of the event element extraction effect of mainstream models; and
[0029] Figure 9 Schematic diagram of the event element extraction device according to the exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0030] The present disclosure will be described in further detail below with reference to the drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the related content, and not to limit the present disclosure. In addition, it should be noted that only parts related to the present disclosure are shown in the drawings for ease of description.
[0031] It should be noted that the embodiments and features in the present disclosure can be combined with each other without conflict. The technical solutions of the present disclosure will be described in detail below with reference to the drawings and in combination with the embodiments.
[0032] Unless otherwise specified, the exemplary embodiments / instances shown will be understood to provide exemplary features of various details that can implement the technical concepts of the present disclosure in practice. Therefore, unless otherwise specified, the features of various embodiments / instances can be additionally combined, separated, interchanged and / or rearranged without departing from the technical concepts of the present disclosure.
[0033] The terms used herein are for the purpose of describing specific embodiments, and are not limiting. As used herein, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. Furthermore, the use of the term "comprise" and / or "include" and variations thereof, in the specification and claims, is intended to mean that the stated features, integers, steps, operations, components, components, and / or groups thereof, are present, but not to the exclusion of the presence or addition of one or more other features, integers, steps, operations, components, components, and / or groups thereof. It is also noted that, as used herein, the terms "substantially," "approximately," and other similar terms are used as synonyms for "about," so that the inventive subject matter encompasses a range of values close to the stated values within which the described inventive benefits typically occur, and / or the values the human eye and / or the human brain typically perceives as a approximate.
[0034] Figure 1 Flowchart of the event element extraction method according to the exemplary embodiments of the present disclosure; Figure 2 Architecture diagram of the event element extraction model according to the exemplary embodiments of the present disclosure. The following will be described in combination with Figure 1 and Figure 2 The event element extraction method S100 of the present disclosure will be described.
[0035] In step S102, each word in the original text is subjected to multi-dimensional vectorization processing to obtain a basic semantic vector for representing the independent semantics of the word.
[0036] The original text refers to a sentence or a group of sentences in an article that needs event element extraction. Each original text corresponds to one or more events, and each event is composed of different participants. For example, the original text can be "Jingdong Group officially listed on the Hong Kong Stock Exchange", which is usually composed of multiple words.
[0037] The multi-dimensional vectorization processing is a process of performing multi-dimensional vector representation and splicing on each word in the original text. Through multi-dimensional vectorization processing, multi-dimensional semantic information of each word in the original text can be obtained, which mainly refers to the independent general semantic of the word in the corresponding event type. The multi-dimension in multi-dimensional vectorization processing refers to word dimension, character dimension, position dimension, event type dimension and external information dimension. Each dimension forms a vector representation, which is spliced together to obtain a basic semantic vector for representing the independent semantic of the word. Among them, the vectorization processing of the word dimension refers to the representation of converting each word into a word vector; the vectorization processing of the character dimension refers to the representation of converting the word into single characters and converting each character into a character vector; the vectorization processing of the position dimension refers to the representation of converting the position of each word in the original text into a position vector; the vectorization processing of the event type dimension refers to the representation of converting the event type of the original text into an event type vector; the vectorization processing of the external information dimension refers to the representation of converting the professional language of the same type in other articles in the target field into an external information vector according to the event type.
[0038] The basic semantic vector is the processing result obtained by multi-dimensional vectorization processing, which is used to represent the independent semantic of the corresponding word. Since the basic semantic vector is the splicing result of multiple dimension vectors, it can more completely and richly represent the general semantic of the word in the corresponding event field.
[0039] For an original text with n words (i.e., the length of the original text is n), the vector matrix composed of the basic semantic vectors of each word contained in the original text can be represented as {V i1 ,V i2 ,V i3 ,…,V ij ,…,V in}, where i represents the serial number of the original text in the corresponding article; j represents the serial number of the word in the original text; n represents the total number of words in the original text; V ij represents the vectorization representation of the jth word in the original text when the ith sentence in the article is taken as the original text.
[0040] That is, in the extraction process of the event element, in addition to using the basic word vector, character vector and position vector, the special term vector of the target field is also fused to provide the domain word vector space for the target field. The target field may be, for example, the Chinese financial field, and the event types corresponding to the field at least include: equity change, bond issuance, company listing, fund restructuring, merger and acquisition, and major contract; in the Chinese financial field, the same word may have different professional meanings when corresponding to different event types, so the basic semantic vector of the word is enhanced by using the external information vector of the external professional language of the same field according to the event type, which improves the fitting degree of the event element extraction result to the target field and the event type, and further improves the accuracy.
[0041] However, the basic semantic vector is not associated with the context, which may not adapt to the language environment of the context. In addition, since the basic semantic vector is not combined with the language environment of the context, the words in the original text that refer to the same object may correspond to different basic semantic vectors, causing pronoun ambiguity and other problems. Based on the basic semantic vector, the scheme of step S104 is proposed, and the execution process of step S104 will be described in detail below.
[0042] Step S104: The basic semantic vector is weighted according to the relevance to obtain a strengthened semantic vector for representing the text-related semantics of the word.
[0043] Based on the foregoing, the basic semantic vector does not pay attention to the context information of the word, while in some fields (for example, the Chinese financial field), each word has a close relationship with the context word, and the relevance between each word and different context words is also different, so the context information of the word and the relevance information between the event element and the current word need to be paid attention to during event element extraction.
[0044] Specifically, based on the self-attention mechanism, the specific implementation of step S104 is: determining the relevance between the query word and the target word in the original text according to the basic semantic vector of each word; normalizing the relevance to generate an attention score for representing the similarity between the query word and the target word; fusing the attention score and the feature vector of the corresponding target word to obtain an attention fusion result corresponding to the target word; and integrating the attention fusion results of each target word to generate a strengthened semantic vector for representing the text-related semantics of the query word.
[0045] Among them, each word in the original text becomes a query word through polling, and the target word is other words in the original text except the query word. The strengthened semantic vector can represent the context relationship of the query word in different dimensions and has rich semantic information.
[0046] Specifically, referring to Figure 3 , the original text is "Taiye Technology obtains tens of millions of yuan financing from Xiaomi Industrial Fund, Anxin Investment and other institutions, and its valuation exceeds one billion yuan", which can be segmented into multiple words; among them, "Taiye Technology", "Xiaomi Industrial Fund" and "Anxin Investment" can be regarded as role values corresponding to the same or similar role names (such as enterprise names), and "it" is a pronoun. The usual event extraction mechanism cannot determine the role values referred to by "it", which will cause extraction redundancy or ambiguity of event elements and the like. By paying attention to the similarity between each word of the original text, it can be determined that the similarity or attention score between "it" and "Taiye Technology" is greater, so the association between them is stronger, that is, "it" refers to "Taiye Technology". Based on this, the pronoun resolution can be realized, and the attribute information of "Taiye Technology" such as "valuation exceeding one billion yuan" can be effectively retained.
[0047] The core of the self-attention mechanism is to calculate the vector correlation between words and words. In this method, the point product method is used to calculate the vector correlation. By converting the input two vectors through the transformation matrix, for example, converting the basic semantic vector of the query word through the transformation matrix W q , the converted query vector q is obtained; the basic semantic vector of each target word is also converted through the transformation matrix W k , and the converted target vector k is obtained; then the converted query vector q and the target vector k are multiplied by the point, and the correlation α between the basic semantic vector of the query word and the basic semantic vector of the target word can be calculated. The greater the correlation between the two vectors, the greater the value of the correlation α.
[0048] Specifically, referring to Figure 4 , the basic semantic vector of the query word q 1 is multiplied by the transformation matrix W q , and the result is defined as the query vector q 1 ; the basic semantic vector of the first target word a 1 is multiplied by the transformation matrix W n , and the result is defined as the target vector k 1 ; the basic semantic vector of the second target word a 2 is multiplied by the transformation matrix W n , and the result is defined as the target vector k 2 ; the basic semantic vector of the third target word a 3 is multiplied by the transformation matrix W n , and the result is defined as the target vector k 3 ; the basic semantic vector of the fourth target word a 4 is multiplied by the transformation matrix W n , and the result is defined as the target vector k4 Further, the query vector q 1 is calculated by full connection with the target vector k 1 , k 2 , k 3 and k 4 of each target word, so as to obtain the correlation degree a i,j between the query word and each target word, wherein i represents the correlation degree between the ith word in the original text and the jth word in the original text when the ith word is the query word and the jth word is the target word. Further, the correlation degrees are normalized by the normalization layer Softmax, so as to obtain a plurality of attention scores corresponding to the query word and each target word:
[0049]
[0050] wherein a i,j is the correlation degree between the ith word in the original text and the jth word in the original text, the ith word is the query word, and the jth word is the target word; n is the total number of words in the original text, and a i,n is the correlation degree between the ith word in the original text and the nth word in the original text. For example, a 1,1 , a 1,2 , a 1,3 , a 1,4 .
[0051] Through the attention scores, the correlation degrees between each word as the query word and other words are obtained; further, the basic semantic vector of each target word is multiplied with the feature matrix to obtain the feature vector V. The V of each target word is multiplied with the attention score corresponding to each target word respectively and summed, so as to obtain the reinforced semantic vector b 1 corresponding to the query word, which fuses the context relationship of the query word in different dimensions and has more rich semantic information.
[0052] In step S106, the element role corresponding to the reinforced semantic vector in the event type of the original text is determined, so as to obtain the event element including the element role.
[0053] The same word corresponds to different role names in different event types, so the matching element role is selected in the element role list corresponding to the event type according to the reinforced semantic vector. Further, the semantic information contained in the reinforced semantic vector is used to match the corresponding role value for the element role. For example, when the event type is “company listing”, the element role is “financing company”, and the role value is “Taiye Technology”.
[0054] The event element is in the form of a triple, which can be represented as <event identifier, event element role name, event element role value>. For example, <event 1, financing company, Taisite Technology>; <event 1, financing time, January 1, 2023>; <event 2, contract signing time, January 1, 2023>; and the like. That is, one original text can have multiple events, and one event can extract multiple event elements. In addition, according to the event type of the original text, the same role value can be assigned different role names.
[0055] In some embodiments, before step S102, the method further includes: processing a plurality of raw corpora of the target field to construct a corpus of the target field that integrates word table information and artificial annotation information.
[0056] The target field can be a field that has multiple event types, and there are many pronouns or multiple forms of words representing the same object. The target field can be, for example, the Chinese financial field.
[0057] Reference Figure 6 The process of constructing the corpus of the target field is to obtain raw corpora (i.e., articles or data of the target field that have not been processed) corresponding to the target field by using multiple channels, and then process the raw corpora through data preprocessing, artificial annotation, machine conversion, and the like to propose a corpus of the target field that integrates word table information and artificial annotation information.
[0058] When the Chinese financial field is taken as the target field, the raw corpora can be obtained from financial articles, financial news of financial websites, Sina Weibo, WeChat public accounts, or self-media. The data preprocessing can include removing unnecessary data, removing / modifying logically incorrect data, removing / modifying format and content error data, and removing / completing missing data.
[0059] After obtaining the corpus, the corpus can be used to train the event element extraction model, so that the model can perform steps S102 to S106. A rich corpus can obtain more accurate event element extraction results.
[0060] In some embodiments, after step S104, the method further includes: fusing the forward time sequence and the backward time sequence of the original text to obtain a global feature sequence for representing the time sequence features of the original text.
[0061] Reference Figure 5 The forward time sequence of the original text is obtained by a forward LSTM L (Long Short-Term Memory, long short-term memory network), and the backward time sequence of the original text is obtained by a backward LSTM LObtain the forward temporal vector h of "AI application" in the original text. L0 The forward temporal vector h of "Storytelling with Numbers" in the original text L1 Obtain the forward temporal vector h of "obtain" in the original text. L2 Obtain the forward temporal vector h of "Shengsong Capital" in the original text. L3 Obtain the forward temporal vector h of "financing" in the original text. L4 Through backward LSTM R (Long Short-Term Memory) network obtains the backward temporal sequence of the original text; for example, if the original text is "AI application data storytelling receives funding from Shengsong Capital", a backward LSTM network can be used to obtain the backward temporal sequence of the original text. R Obtain the backward temporal vector h of "AI application" in the original text. R4 Obtain the backward time-series vector h of "Data Storytelling" in the original text. R3 Obtain the backward time-series vector h of "obtain" in the original text. R2 Obtain the backward time-series vector h of "Shengsong Capital" in the original text. R1 Obtain the backward time-series vector h of "financing" in the original text. R0 By fusing the forward and backward temporal sequences, the resulting global feature sequence representing the temporal features of the original text can be represented as h0h1h2h3h4=[h L0 h R4 h L1 h R3 h L2 h R2 h L3 h R1 h L4 h R0 h]. Where h0 is h]. L0 and h R4 The splicing result, h1 is h L1 and h R3 The splicing result, h2 is h L2 and h R2 The splicing result, h3 is h L3 and h R1 The splicing result, h4 is h L4 and h R0 The splicing result. Through the global feature sequence, the temporal relationship between the event elements "AI Application Data Storytelling" and "Shengsong Capital" and the context, as well as the temporal relationship between the trigger word "financing" and the event elements, can be obtained.
[0062] In some embodiments, after obtaining the global feature sequence, further comprising: determining a plurality of time sequence labels of each word of the original text, performing time sequence arrangement on the plurality of time sequence labels by using a conditional random field to generate a label time sequence; and verifying the global feature sequence by using the time sequence label sequence to optimize the global feature sequence, and obtaining a target time sequence for representing real time sequence information of the word.
[0063] The semantic information of the context needs to be considered when outputting the time sequence label, and the semantic information of the context before and after has a strong dependence. For example, "B-finance" is followed by "I-finance", where the time sequence label B represents the beginning of the word, and the time sequence label I represents the end of the word. A complete word starts from the time sequence label B and ends from the time sequence label I. Based on this, each word of the original text is labeled with a time sequence label, and then the dependency relationship between the time sequence labels is obtained by using CRF (conditional random field), the global feature sequence is verified, the error time sequence is adjusted, and a target time sequence for representing real time sequence information of the word is obtained.
[0064] Based on the foregoing, the results of event extraction are evaluated, and the evaluation indicators include accuracy P, recall R, accuracy F1 value, etc. In the training process, it is assumed that the word vector of the event element extraction model has 768 hidden layer units, the number of time element attention heads is 4 layers, the number of training samples is 16, the learning rate is 0.001, the number of hidden layer nodes of the bidirectional long short-term memory network is 128, and the dropout value is 0.2. Referring to Figure 7 , which represents the influence of the multi-head self-attention mechanism on the event element extraction model. Under the same event data set and the same experimental parameters, before adding the multi-head attention mechanism, the recall rate of event element extraction is only 48.43%, and after adding the multi-head attention mechanism, the recall rate is increased by 4.68%. By analyzing the experimental results, it can be seen that when the multi-head attention mechanism is not added, the model will ignore a lot of key information, especially the supplementary description information, resulting in a too low full search rate in the event element extraction. After adding the multi-head attention mechanism, the model can capture the associated information between different event elements, thereby improving the full search rate in the event element extraction process. In terms of accuracy of event element extraction, the recognition effect of adding the multi-head attention mechanism is improved by 7.35% compared with that of not adding the multi-head attention mechanism, which shows that the multi-head attention plays a key role in improving the accuracy. After optimization by the multi-head attention mechanism, the final accuracy F1 value of the model is improved by 5.78%.
[0065] Referring to Figure 8, the effect comparison results of the self-attention mechanism in mainstream models are shown. The accuracy of the mainstream model IDCNN is 56.96%, the recall rate is 41.79%, and the F1 value is 48.21%; the accuracy of the mainstream model IDCNN_CRF is 58.83%, the recall rate is 45.31%, and the F1 value is 51.19%; the accuracy of the mainstream model BiGRU is 60.08%, the recall rate is 44.88%, and the F1 value is 51.38%; the accuracy of the mainstream model BiLSTM is 60.87%, the recall rate is 48.43%, and the F1 value is 53.94%; the accuracy of the mainstream model BiGRU_CRF is 62.47%, the recall rate is 50.54%, and the F1 value is 55.88%; the accuracy of the event element extraction model BiLSTM_CRF of the method is 68.22%, the recall rate is 53.11%, and the F1 value is 59.72%. Compared with the two mainstream models IDCNN and BiGRU, the event element extraction model improves the F1 value by 8.53% and 3.84% respectively. In event element extraction, BiLSTM is used to calculate the global vector to obtain the preliminary correlation between each event element, and the self-attention mechanism is used to correct it, which finally improves the extraction effect of event elements. In addition, after adding the conditional random field, the recognition effect of the event elements is improved.
[0066] The event element extraction method of the present disclosure adds event type vectors and external information vectors such as professional terms in the vector representation stage, so that the model can use event type information to improve the event element extraction effect; the multi-head attention mechanism is used to eliminate the problems of semantic loss and redundancy caused by pronouns, the bidirectional long short-term memory network is used to mine the context semantic information of the original text, the temporal nature of each word in the original text is strengthened, and finally the conditional random field is added for label checking, so that the result is more in line with the actual situation.
[0067] Figure 9 A schematic diagram of an event element extraction device according to an exemplary embodiment of the present disclosure is shown.
[0068] As shown in Figure 9 , the present disclosure provides an event element extraction device 1000, comprising: a vectorization processing module 1002, configured to perform multi-dimensional vectorization processing on each word in an original text to obtain a basic semantic vector for representing the independent semantics of the word; a pronoun disambiguation module 1004, configured to weight the relevance of the basic semantic vector to obtain a strengthened semantic vector for representing the text-related semantics of the word, wherein a plurality of words referring to the same text-related semantics correspond to the same strengthened semantic vector; and an event element extraction module 1006, configured to determine the element role corresponding to the strengthened semantic vector in the event type of the original text to obtain an event element including the element role.
[0069] The apparatus 1000 can include respective modules to perform the respective or several steps in the above-described flowcharts. Thus, each or several steps in the above-described flowcharts can be performed by respective modules, and the apparatus can include one or more of these modules. The modules can be one or more hardware modules specially configured to perform the respective steps, or implemented by a processor configured to perform the respective steps, or stored in a computer-readable medium for implementation by a processor, or implemented by some combination.
[0070] The hardware structure can be implemented with a bus architecture. The bus architecture can include any number of interconnecting buses and bridges, depending on the specific application of the hardware and the overall design constraints. The bus 1100 connects various circuits including one or more processors 1200, memory 1300, and / or hardware modules together. The bus 1100 can also connect various other circuits 1400 such as peripheral devices, voltage regulators, power management circuits, external antennas, etc.
[0071] The bus 1100 can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one connection line is shown in the figure, but it does not mean that there is only one bus or only one type of bus.
[0072] The event element extraction device of the present disclosure adds event type vectors and external information vectors such as professional terms to the vector representation stage, so that the model can use event type information and improve the event element extraction effect; the multi-head attention mechanism eliminates the problems of semantic loss, redundancy, etc. caused by pronouns, the bidirectional long short-term memory network is used to mine the context semantic information of the original text, the time sequence between each word in the original text is strengthened, and finally the conditional random field is added for label checking, so that the result is more in line with the actual situation.
[0073] Any processes or methods described in the flowcharts or otherwise described herein can be understood as representing code modules, segments, or portions of code which include one or more executable instructions for implementing specific logic functions (or steps) of the process, and / or that the various embodiments of the present disclosure can represent alternative process or methods including the steps thereof which can be implemented by other than the recited ordering and / or flow, such will be obvious to those having skill in the art of the disclosed embodiments' technical fields. The processors execute the various ones of the methods and processes described above. For example, the method embodiments of the present disclosure can be implemented as a software program which is tangibly embodied within a machine-readable medium, such as a memory. In some embodiments, portions of the software program can be loaded and / or installed via the memory and / or communication interface. When the software program is loaded into the memory and executed by the processor, one or more of the steps of the methods described above can be performed. Alternatively, in other embodiments, the processor can be configured to perform one of the methods described above by other means, such as by way of firmware.
[0074] Logic and / or steps represented in the flowcharts and / or otherwise described herein can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor- containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions.
[0075] For the purposes of this specification, a "computer-readable medium" can be any apparatus that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. The computer-readable medium can specifically include the following, which are non-exhaustive examples: electrical connection (electrical device), portable computer diskette (magnetic device), random-access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fiber device, and portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium can even be paper or other suitable medium upon which the program can be printed, as the program can be electronically captured, for example via the optical scanner of the paper or other medium, then compiled, interpreted, or otherwise processed in a suitable manner, if necessary, and stored in the memory.
[0076] It should be understood that various parts of the present disclosure can be implemented in hardware, software, or a combination thereof. In the above-described embodiments, a plurality of steps or methods can be implemented by software stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, and as in another embodiment, any one or a combination of the following technologies known in the art can be used: discrete logic circuitry having logic gates for implementing logic functions on data signals, application specific integrated circuits having appropriate combinational logic gates, programmable gate arrays (PGA), field programmable gate arrays (FPGA), etc.
[0077] Those skilled in the art of the present technology can understand that all or part of the steps of the above-described embodiments can be completed by programs instructing related hardware, and the programs can be stored in a readable storage medium, and when executed, include one or a combination of the steps of the method embodiments.
[0078] In addition, each functional unit in each embodiment of the present disclosure can be integrated into one processing module, or each unit can be physically present separately, or two or more units can be integrated into one module. The above-mentioned integrated module can be realized in the form of hardware or in the form of a software function module. The integrated module, if realized in the form of a software function module and sold or used as an independent product, can also be stored in a readable storage medium. The storage medium can be a read-only memory, a magnetic disk or an optical disk, etc.
[0079] In the description of the present specification, the description of the terms "one embodiment / way", "some embodiments / ways", "specific examples", or "some examples" and the like means that the specific features, structures, materials or characteristics described in connection with the embodiment / way or example are included in at least one embodiment / way or example of the present disclosure. In the present specification, the illustrative expressions of the above terms are not necessarily the same embodiment / way or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any appropriate manner in any one or more embodiments / ways or examples. In addition, those skilled in the art can combine and combine the different embodiments / ways or examples described in the present specification and the features of the different embodiments / ways or examples, without contradiction.
[0080] In addition, the terms "first", "second" are used only for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include at least one of the features. In the description of the present disclosure, the meaning of "a plurality of" is at least two, for example, two, three, etc., unless otherwise explicitly specified.
[0081] Those skilled in the art will understand that the above-described embodiments are merely intended to clarify the present disclosure, and are not intended to limit the scope of the present disclosure. Other changes or modifications can be made by those skilled in the art based on the above disclosure, and the changes or modifications are still within the scope of the present disclosure.
Claims
1. An extraction method of an event element, characterized by, The method comprises: performing multi-dimensional vectorization on each word in the original text to obtain a basic semantic vector for representing independent semantics of the word; performing relevance weighting on the basic semantic vector to obtain a strengthened semantic vector for representing text-related semantics of the word, wherein a plurality of words referring to the same text-related semantics correspond to the same strengthened semantic vector; and determining an element role corresponding to the strengthened semantic vector in an event type of the original text to obtain an event element comprising the element role, wherein the relevance weighting on the basic semantic vector to obtain the strengthened semantic vector for representing the text-related semantics of the word comprises: determining a relevance between a query word and a target word in the original text according to the basic semantic vector, wherein each word in the original text becomes the query word through polling, and the target word is a word other than the query word in the original text; performing normalization processing on the relevance to generate an attention score for representing a similarity between the query word and the target word; fusing the attention score and a feature vector of the corresponding target word to obtain an attention fusion result corresponding to the target word; and integrating the attention fusion results of each target word to generate a strengthened semantic vector for representing text-related semantics of the query word.
2. The method of claim 1, wherein, The multi-dimensional vectorization on each word in the original text to obtain a basic semantic vector for representing independent semantics of the word comprises: obtaining a plurality of semantic vectors of each word in the original text, wherein the semantic vectors at least include a word vector, a character vector, a position vector, an event type vector, and an external information vector; and fusing each semantic vector to generate the basic semantic vector for representing independent semantics of the word, wherein the independent semantics are general semantics of the word in an event type corresponding to the original text.
3. The method of claim 1, wherein, The attention score is: , wherein, is a relevance between an i-th word in the original text and an n-th word in the original text, the i-th word being a query word, the n-th word being a target word; n is a total number of words in the original text, the is a relevance between an i-th word in the original text and an n-th word in the original text.
4. The method of claim 1, wherein, Before the multi-dimensional vectorization on each word in the original text to obtain a basic semantic vector for representing independent semantics of the word, the method further comprises: processing a plurality of raw corpora of a target domain to construct a corpus library of the target domain fused with vocabulary information and artificial annotation information.
5. The method of claim 1, wherein, After the relevance weighting on the basic semantic vector to obtain a strengthened semantic vector for representing text-related semantics of the word, the method further comprises: fusing a forward time sequence and a backward time sequence of the original text to obtain a global feature sequence for representing time sequence features of the original text.
6. The method of claim 5, wherein the event element extraction is performed by: After the fusion of the forward time sequence and the backward time sequence of the original text to obtain a global feature sequence for representing time sequence features of the original text, the method further comprises: determining a plurality of time sequence labels of each word in the original text, and performing time sequence arrangement on the plurality of time sequence labels by using a conditional random field to generate a time sequence label sequence; and The global feature sequence is verified by using the time sequence label sequence, so as to optimize the global feature sequence, and obtain a target time sequence sequence for representing real time sequence information of the word.
7. An extraction apparatus of an event element, characterized by comprising: Comprise: A vectorization processing module is configured to perform multi-dimensional vectorization processing on each word in the original text to obtain a basic semantic vector for representing independent semantics of the word. A pronoun disambiguation module is configured to perform relevance weighting on the basic semantic vector to obtain a strengthened semantic vector for representing text-related semantics of the word, wherein a plurality of words referring to the same text-related semantics correspond to the same strengthened semantic vector. An event element extraction module is configured to determine an element role corresponding to the strengthened semantic vector in an event type of the original text to obtain an event element comprising the element role. The relevance weighting on the basic semantic vector to obtain the strengthened semantic vector for representing text-related semantics of the word comprises: determining a relevance between a query word and a target word in the original text according to the basic semantic vector, wherein each word in the original text is polled to become the query word, and the target word is a word other than the query word in the original text; performing normalization processing on the relevance to generate an attention score for representing a similarity between the query word and the target word; fusing the attention score and a feature vector of the corresponding target word to obtain an attention fusion result corresponding to the target word; and integrating the attention fusion results of each target word to generate a strengthened semantic vector for representing text-related semantics of the query word.
8. An electronic device, comprising: The computer program is loaded into the processor to execute the event element extraction method according to any one of claims 1 to 6.
9. A readable storage medium, characterized by, The readable storage medium stores a computer program, and the computer program is adapted to be loaded into the processor to execute the event element extraction method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Event element extraction method and device, computing equipment and storage medium
CN109582949A
Knowledge extraction method, apparatus, electronic device, and storage medium
WO2021212682A1