Event extraction method, device, equipment and computer readable storage medium

文档序号:1043301 发布日期:2020-10-09 浏览:6次 中文

阅读说明:本技术 事件抽取方法、装置、设备以及计算机可读存储介质 (Event extraction method, device, equipment and computer readable storage medium ) 是由 刘康龙 徐国强 于 2020-06-29 设计创作,主要内容包括:本发明涉及区块链技术领域,公开了一种事件抽取方法、装置、设备以及计算机可读存储介质,该方法包括:获取待测试文章的标题,并确定所述标题对应的事件名;获取所述待测试文章的所有语句,根据所述事件名在各所述语句中获取预设数量的目标语句;将各所述目标语句输入至预训练语言模型进行训练,以获取通用属性;获取输入的预设问题,根据所述预设问题在各所述目标语句中获取特殊论元,并输出所述通用属性和所述特殊论元。此外,待测试文章的所有语句可存储于区块链中。本发明提高了篇章级事件抽取的准确率。(The invention relates to the technical field of block chains, and discloses an event extraction method, an event extraction device, event extraction equipment and a computer-readable storage medium, wherein the method comprises the following steps: acquiring a title of an article to be tested, and determining an event name corresponding to the title; acquiring all sentences of the article to be tested, and acquiring a preset number of target sentences in each sentence according to the event name; inputting each target statement into a pre-training language model for training to obtain a general attribute; and acquiring an input preset problem, acquiring a special argument in each target statement according to the preset problem, and outputting the general attribute and the special argument. Furthermore, all statements of the article to be tested may be stored in the blockchain. The invention improves the accuracy of extracting the discourse-level events.)

1. An event extraction method, characterized by comprising the steps of:

acquiring a title of an article to be tested, and determining an event name corresponding to the title;

acquiring all sentences of the article to be tested, acquiring a preset number of target sentences in each sentence according to the event name, and storing all sentences of the article to be tested in a block chain;

inputting each target statement into a pre-training language model for training to obtain a general attribute;

and acquiring an input preset problem, acquiring a special argument in each target statement according to the preset problem, and outputting the general attribute and the special argument.

2. The event extraction method according to claim 1, wherein the step of determining the event name corresponding to the title comprises:

carrying out event type classification on the title according to a pre-training language model, and determining a target event based on a classification result of the classification;

and determining the event name corresponding to the title according to the target event.

3. The event extraction method according to claim 2, wherein the step of determining the event name corresponding to the title according to the target event comprises:

and extracting grammar corresponding to the target event from the title according to a preset syntax and semantic role labeling algorithm, and combining the grammar to generate an event name corresponding to the title.

4. The event extraction method according to claim 1, wherein the step of obtaining a preset number of target sentences in each sentence according to the event name comprises:

sequencing each sentence according to the event name and a preset sequencing model;

and acquiring a preset number of target sentences in each sentence based on the sorted sorting result.

5. The event extraction method as claimed in claim 1, wherein the step of inputting each of the target sentences into a pre-trained language model for training to obtain generic attributes comprises:

inputting each target sentence into a pre-training language model for training to obtain each training data;

and determining the training attributes of the target sentences in the training data, and acquiring the general attributes according to the training attributes.

6. The event extraction method as claimed in claim 5, wherein said step of obtaining generic attributes according to each of said training attributes comprises:

and classifying the target sentences according to the training attributes, acquiring the common attributes of the target sentences of the same category, and taking the common attributes as general attributes.

7. The event extraction method according to any one of claims 1 to 6, wherein the step of obtaining a special argument in each of the target sentences according to the preset question comprises:

and constructing special argument question and answer pair data according to the preset questions, extracting data in each target statement according to a preset reading understanding model and the special argument question and answer pair data, and taking the data as special arguments.

8. An event extraction device, characterized by comprising:

the first acquisition module is used for acquiring the title of the article to be tested and determining the event name corresponding to the title;

the second acquisition module is used for acquiring all sentences of the article to be tested, acquiring a preset number of target sentences in each sentence according to the event name, and storing all sentences of the article to be tested in a block chain;

the input module is used for inputting each target statement into a pre-training language model for training so as to obtain a general attribute;

and the output module is used for acquiring an input preset problem, acquiring a special argument in each target statement according to the preset problem, and outputting the general attribute and the special argument.

9. An event extraction device, characterized in that the event extraction device comprises: memory, processor and an event extraction program stored on the memory and executable on the processor, the event extraction program when executed by the processor implementing the steps of the event extraction method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that an event extraction program is stored on the computer-readable storage medium, which when executed by a processor implements the steps of the event extraction method according to any one of claims 1 to 7.

Technical Field

The present invention relates to the field of block chain technologies, and in particular, to an event extraction method, apparatus, device, and computer-readable storage medium.

Background

At present, the existing event extraction method only extracts event parameters in a sentence range, but the sentence-level event extraction method is difficult to process a large amount of documents of emerging applications, such as types of finance, legislation, health and the like. Event parameters in the documents are always dispersed in different sentences, even the mentions of the same event in the same document may occur multiple times, but the existing event extraction method can only extract the event from the sentence, but cannot extract the event based on the whole document, so that the accuracy of chapter-level event extraction is low.

Disclosure of Invention

The invention mainly aims to provide an event extraction method, an event extraction device, event extraction equipment and a computer-readable storage medium, and aims to solve the technical problem that chapter-level event extraction accuracy is low in the prior art.

In order to achieve the above object, the present invention provides an event extraction method, including:

acquiring a title of an article to be tested, and determining an event name corresponding to the title;

acquiring all sentences of the article to be tested, acquiring a preset number of target sentences in each sentence according to the event name, and storing all sentences of the article to be tested in a block chain;

inputting each target statement into a pre-training language model for training to obtain a general attribute;

and acquiring an input preset problem, acquiring a special argument in each target statement according to the preset problem, and outputting the general attribute and the special argument.

Optionally, the step of determining the event name corresponding to the title includes:

carrying out event type classification on the title according to a pre-training language model, and determining a target event based on a classification result of the classification;

and determining the event name corresponding to the title according to the target event.

Optionally, the step of determining the event name corresponding to the title according to the target event includes:

and extracting grammar corresponding to the target event from the title according to a preset syntax and semantic role labeling algorithm, and combining the grammar to generate an event name corresponding to the title.

Optionally, the step of obtaining a preset number of target sentences in each sentence according to the event name includes:

sequencing each sentence according to the event name and a preset sequencing model;

and acquiring a preset number of target sentences in each sentence based on the sorted sorting result.

Optionally, the step of inputting each target sentence into a pre-training language model for training to obtain a general attribute includes:

inputting each target sentence into a pre-training language model for training to obtain each training data;

and determining the training attributes of the target sentences in the training data, and acquiring the general attributes according to the training attributes.

Optionally, the step of obtaining a generic attribute according to each of the training attributes includes:

and classifying the target sentences according to the training attributes, acquiring the common attributes of the target sentences of the same category, and taking the common attributes as general attributes.

Optionally, the step of obtaining a special argument in each of the target statements according to the preset problem includes:

and constructing special argument question and answer pair data according to the preset questions, extracting data in each target statement according to a preset reading understanding model and the special argument question and answer pair data, and taking the data as special arguments.

In order to achieve the above object, the present invention also provides an event extraction device, including:

the first acquisition module is used for acquiring the title of the article to be tested and determining the event name corresponding to the title;

the second acquisition module is used for acquiring all sentences of the article to be tested, acquiring a preset number of target sentences in each sentence according to the event name, and storing all sentences of the article to be tested in a block chain;

the input module is used for inputting each target statement into a pre-training language model for training so as to obtain a general attribute;

and the output module is used for acquiring an input preset problem, acquiring a special argument in each target statement according to the preset problem, and outputting the general attribute and the special argument.

In addition, in order to achieve the above object, the present invention also provides an event extraction device;

the event extraction device includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein:

the computer program, when executed by the processor, implements the steps of the event extraction method as described above.

In addition, to achieve the above object, the present invention also provides a computer-readable storage medium;

the computer-readable storage medium has stored thereon a computer program which, when being executed by a processor, carries out the steps of the event extraction method as described above.

The title of an article to be tested is obtained, and an event name corresponding to the title is determined; acquiring all sentences of the article to be tested, acquiring a preset number of target sentences in each sentence according to the event name, and storing all sentences of the article to be tested in a block chain; inputting each target statement into a pre-training language model for training to obtain a general attribute; and acquiring an input preset problem, acquiring a special argument in each target statement according to the preset problem, and outputting the general attribute and the special argument. The target sentences are obtained from all sentences of the article to be tested according to the event names corresponding to the titles of the article to be tested, the general attributes of all the target sentences are determined, the special argument is obtained according to the preset problem, and the general attributes and the special argument are output, so that the problem that in the prior art, only the event extraction method can extract the events from the sentences, but not the events based on the whole document is avoided, the difficulty of extracting the discourse-level events is effectively reduced, and the accuracy of extracting the discourse-level events is improved.

Drawings

FIG. 1 is a schematic diagram of an event extraction device of a hardware operating environment according to an embodiment of the present invention;

FIG. 2 is a flowchart illustrating a first embodiment of an event extraction method according to the present invention;

fig. 3 is a functional block diagram of the event extraction device according to the present invention.

The objects, features and advantages of the present invention will be further explained with reference to the accompanying drawings.

Detailed Description

It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

As shown in fig. 1, fig. 1 is a schematic structural diagram of an event extraction device of a hardware operating environment according to an embodiment of the present invention.

As shown in fig. 1, the event extraction device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.

Optionally, the event extraction device may further include a camera, RF (Radio Frequency) circuitry, sensors, audio circuitry, a WiFi module, and so forth. Such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display screen according to the brightness of ambient light. Of course, the terminal device may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which are not described herein again.

Those skilled in the art will appreciate that the event extraction device configuration shown in fig. 1 does not constitute a limitation of the event extraction device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.

As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and an event extraction program.

In the event extraction device shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be configured to call an event extraction program stored in the memory 1005 and execute an event extraction method provided by an embodiment of the present invention.

Referring to fig. 2, in an embodiment of the event extraction method, the event extraction method includes the following steps:

step S10, acquiring the title of the article to be tested and determining the event name corresponding to the title;

in this embodiment, when it is determined that event extraction needs to be performed on a document (i.e., an article to be tested, such as an article on a news website, or an article and a paper on another website), a title of the article to be tested needs to be obtained first, and the title of the article to be tested may be extracted separately from an original news website by using a crawler technology. After the title of the article to be tested is obtained, the title needs to be trained through a pre-training model so as to classify the event type of the title, and thus the target event corresponding to the title is obtained. The pre-training model can be a bidirectional encoder representation Transformers-bidirectional long and short term memory network-conditional random field model, so that the event type classification can be carried out on the title through the model to determine the target event corresponding to the title. Among them, the transformations-two-way long-short term memory network-conditional random field model can be used to determine whether the words (i.e. events) in the title are required by the user, and after the determination, the words are used as event trigger words. For example, a bidirectional encoder represents transformations, a bidirectional long and short term memory network and a conditional random field model to perform word segmentation on a title, a corresponding vocabulary is created according to each word segmentation, and each vocabulary is predicted according to the conditional random field model to obtain an event name corresponding to the title.

And when event classification is performed according to the pre-training language model, an event name corresponding to the target event is extracted based on the title of the article to be tested. Therefore, in order to reduce the interference of multiple events in the whole document (i.e. the article to be tested), the range of event extraction is narrowed to the most core event in the document, namely the target event included in the title. Also, the target event is key information contained in the title. For example, when the title of the a document is "apology of XX", the key information contained in the title may be determined by the pre-training language model, such as apology, and "apology" is used as the target event trigger corresponding to the title of the a document, and based on the target event trigger, a target event corresponding to the content contained in the a document is determined, and "apology" is used as the event name corresponding to the target event.

Step S20, acquiring all sentences of the article to be tested, acquiring a preset number of target sentences in each sentence according to the event name, and storing all sentences of the article to be tested in a block chain;

after the event name is obtained and all sentences of the article to be tested are obtained, sentences related to the event name can be selected from all sentences of the article to be tested according to the event name, and then a preset number (which can be any number set in advance by a user) of target sentences can be obtained from the related sentences based on a certain rule. The method comprises the steps of scoring all sentences of an article to be tested according to event names and a preset ranking model, such as a Learn-to-Rank ranking model, to determine the degree of association between each sentence and the event names, ranking each sentence according to the scoring result, namely ranking according to the score, selecting sentences with scores larger than a preset number from the ranking results to serve as target sentences, or directly selecting sentences with preset numbers from large to small according to the score to serve as target sentences. The target sentence is a sentence with a higher score, wherein the target sentence is a sentence with a target event mentioned in the article to be tested. And the relative relevance between all sentences of the article to be tested and the target sentences can be determined through the Learn-to-Rank ordering model, scoring is carried out according to the relative relevance, and then the sentences are ordered based on the scoring result.

It should be emphasized that, in order to further ensure the privacy and security of all the sentences, all the sentences of the article to be tested can also be stored in the nodes of a blockchain.

Step S30, inputting each target sentence into a pre-training language model for training to obtain a general attribute;

after the event name and each target sentence are obtained, each target sentence may be trained according to a pre-training language model (e.g., a two-way coder representing transforms-two-way long-short term memory network-conditional random field model) to obtain a training attribute of each target sentence. For example, a bidirectional encoder represents Transformers-bidirectional long and short term memory network-conditional random field model to classify and participle an input target sentence, determines an event type corresponding to each participle, and then takes each event type as a training attribute of the input target sentence. And classifying the target sentences according to the obtained training attributes, determining which target sentences carry the same training attributes (such as time attributes or region attributes), and taking the target sentences corresponding to the same training attributes as the latest target sentences. For example, assuming that in target statement A, B, C, A and B both carry a time attribute, and C does not, then A and B may be taken as the latest target statement. Then, the same training attributes of the latest target sentences are extracted as general attributes. For example, the time attributes in a and B can be extracted as common attributes.

And step S40, acquiring the input preset problem, acquiring special arguments in each target statement according to the preset problem, and outputting the general attributes and the special arguments.

After obtaining each target statement and extracting the general attributes, extracting special arguments, namely obtaining an input preset question, designing a question template and a preset question based on special argument information, constructing special argument question-answer pair data, expressing a machine reading understanding model of Transformers based on a bidirectional encoder, and extracting answers from each target statement as the special arguments. For example, after receiving the special argument question and answer pair data in the machine reading understanding model representing Transformers based on the bidirectional encoder, prediction can be performed in combination with each target sentence, namely, which target sentence has a semantic relationship with the special argument question and answer pair data is judged in each target sentence, and data associated with the special argument question and answer pair data is extracted from the target sentence with the semantic relationship as a special argument.

And after acquiring each general attribute and each special argument, outputting the general attributes and the special arguments as chapter-level events. The machine reading understanding model can comprise four modules of embedded coding, feature extraction, article-question interaction and answer prediction. And the embedded coding module transmits the word vector representation of the input articles and questions in the natural language form to the feature extraction module for feature extraction. In the article-question interaction module, a machine can use interaction information between articles and questions to deduce which statement parts in the articles are more important for answering the questions, and the answer prediction module carries out statistical analysis according to information obtained by three modules, namely embedded coding, feature extraction and article-question interaction, so as to obtain final answer prediction. It should be noted that the machine needs to first detect whether an input preset question can be answered according to a given article (i.e., an article to be tested), and if not, mark the preset question as being unanswerable, and stop answering. If yes, outputting the answer.

When the preset question is a complete filling-in-the-blank question, the answer output is a word or a sentence in the article to be tested. Therefore, the attention weight scores of the same words in the article to be tested can be accumulated to obtain each integral, and the word with the highest integral is selected from the integral to be used as the answer to be output. When the preset question is a multi-choice task, since the multi-choice task is to pick out a correct answer from a plurality of candidate answers, and generally to score the candidate answers, the candidate with the highest score can be selected as the answer. However, when the preset question is a segment extraction type question, a continuous segment associated with the question can be extracted from the article to be tested as an answer. And in the embodiment, the task of event extraction can be understood as finding events of a specific category from the text, and then performing a form filling process.

In the embodiment, the title of an article to be tested is obtained, and an event name corresponding to the title is determined; acquiring all sentences of the article to be tested, acquiring a preset number of target sentences in each sentence according to the event name, and storing all sentences of the article to be tested in a block chain; inputting each target statement into a pre-training language model for training to obtain a general attribute; and acquiring an input preset problem, acquiring a special argument in each target statement according to the preset problem, and outputting the general attribute and the special argument. The target sentences are obtained from all sentences of the article to be tested according to the event names corresponding to the titles of the article to be tested, the general attributes of all the target sentences are determined, the special argument is obtained according to the preset problem, and the general attributes and the special argument are output, so that the problem that in the prior art, only the event extraction method can extract the events from the sentences, but not the events based on the whole document is avoided, the difficulty of extracting the discourse-level events is effectively reduced, and the accuracy of extracting the discourse-level events is improved.

Further, on the basis of the first embodiment of the present invention, a second embodiment of the event extraction method of the present invention is proposed, where this embodiment is step S10 of the first embodiment of the present invention, and a refinement of the step of determining the event name corresponding to the title includes:

step a, carrying out event type classification on the title according to a pre-training language model, and determining a target event based on a classification result of the classification;

in this embodiment, after the title of the article to be tested is obtained, the title may be trained according to a pre-training language model set in advance, that is, event trigger words in the title are identified according to the pre-training language model, event types of the title are classified according to the event trigger words, which event is required by the user is determined according to a classification result of the classification, and the event is used as a target event.

And b, determining an event name corresponding to the title according to the target event.

After the target event is acquired, the information of the target event can be directly extracted, and the event name of the target event is determined from the extracted information and is used as the event name corresponding to the title.

In this embodiment, event type classification is performed on the title according to the pre-training language model to determine the target event, and the event name is determined according to the target event, so that the accuracy of the acquired event name is guaranteed.

Specifically, the step of determining the event name corresponding to the title according to the target event includes:

and c, extracting grammar corresponding to the target event from the title according to a preset syntax and semantic role labeling algorithm, and combining the grammar to generate an event name corresponding to the title.

In this embodiment, after the target event is obtained, a syntax and semantic role tagging algorithm set in advance may be obtained, and a syntax corresponding to the target event is extracted from the title based on the syntax and semantic role tagging algorithm, that is, the target event in the title is parsed from the perspectives of lexical analysis, syntactic analysis, semantic analysis, and the like, so as to obtain an event name corresponding to the target event. Namely, the subject, the predicate and the object of the target event are extracted from the title, and the event name corresponding to the title is generated according to the subject, the predicate and the object triple.

In this embodiment, the grammar corresponding to the target event is extracted from the title, and the grammars are combined to obtain the event name corresponding to the title, so that the accuracy of the obtained event name is guaranteed.

Further, the step of obtaining a preset number of target sentences in each sentence according to the event name includes:

d, sequencing each sentence according to the event name and a preset sequencing model;

in this embodiment, after the event name is obtained, all sentences of the article to be tested need to be obtained, sentences related to the event name are selected from the sentences according to the event name, and a preset number of target sentences are obtained from the related sentences based on a certain rule. That is, all sentences of the article to be tested can be scored according to the event names and a preset ranking model, such as a Learn-to-Rank ranking model, so as to determine the degree of association between each sentence and the event names, and the sentences can be ranked according to the size of the scoring result.

And e, acquiring a preset number of target sentences from each sentence based on the sorted sorting result.

Obtaining the sequencing result of sequencing of each sentence, and sequentially selecting the sentences with the highest scores (namely target sentences) in a preset number as the target event mentions to define the context of the target event information. I.e. by default these target sentences have mentioned target events.

In this embodiment, the sentences are sorted according to the event names and the sorting model, and the target sentence is determined according to the sorting result, so that the high relevance between the obtained target sentence and the event name is ensured.

Further, the step of inputting each target sentence into a pre-training language model for training to obtain a general attribute includes:

step f, inputting each target sentence into a pre-training language model for training to obtain each training data;

in this embodiment, after obtaining each target sentence, each target sentence may be input into a pre-training language model (such as a conditional random field model) for training, and training data corresponding to each target sentence is determined according to a training result. Wherein the training data is data positively and negatively associated with the target sentence. A positive association is that the training data is associated with the target sentence, and a negative association is that the training data is not associated with the target sentence.

And g, determining the training attributes of the target sentences in the training data, and acquiring the general attributes according to the training attributes.

After each training data is obtained, training can be continued according to the pre-training language model, which training data are associated with the target sentence and which training data are not associated with the target sentence are determined, and the training data associated with the target sentence are used as the training attributes of the target sentence. In this embodiment, the same processing manner is adopted for each target sentence to obtain the training attributes of each target sentence, and it is determined which training attributes are carried by most target sentences (i.e., more than a certain number of target sentences) among the training attributes, and the training attributes are used as general attributes.

In this embodiment, the target sentence is input to the pre-training language model for training, so as to obtain each training data, the training attribute of the target sentence is determined according to the training data, and the general attribute is determined based on the training attribute, so that the accuracy of the obtained general attribute is ensured.

Specifically, the step of obtaining the generic attribute according to each of the training attributes includes:

and h, classifying the target sentences according to the training attributes, acquiring the common attributes of the target sentences of the same category, and taking the common attributes as general attributes.

When the general attributes are obtained according to the training attributes, the target sentences may be classified according to the training attributes, that is, it is determined which target sentences carry the same training attributes, and then the common attributes of the target sentences of the same category are obtained, and then the common attributes are used as the general attributes. For example, assuming that the training attributes include 1, 2, and 3, and the target sentence includes A, B, C and D, where a and B both carry training attribute 1, and D and C both carry training attribute 3, then a and B may be taken as the same class, and training attribute 1 may be taken as a common attribute; the same holds for D and C as the same category, and for training attribute 3 as the common attribute.

In this embodiment, each target sentence is classified, common attributes of the target sentences of the same class are acquired, and the common attributes are used as the common attributes, so that the accuracy of the acquired common attributes is guaranteed.

Further, the step of obtaining a special argument in each of the target sentences according to the preset problem includes:

and k, constructing special argument question and answer pair data according to the preset questions, extracting data in each target statement according to a preset reading understanding model and the special argument question and answer pair data, and taking the data as special arguments.

In this embodiment, after the input preset question is acquired, special argument question and answer pair data may be constructed in the special argument information design question template according to the preset question, and data (i.e., answers) may be extracted from each target sentence according to the reading understanding model and the special argument question and answer pair data set in advance, and this data may be used as a special argument.

In the embodiment, the accuracy of the obtained special argument is ensured by constructing the special argument question-answer pair data and extracting the special argument from each target statement according to the preset reading understanding model.

In addition, referring to fig. 3, an embodiment of the present invention further provides an event extraction device, where the event extraction device includes:

the first acquisition module A10 is used for acquiring titles of articles to be tested and determining event names corresponding to the titles;

a second obtaining module a20, configured to obtain all statements of the article to be tested, and obtain a preset number of target statements in each statement according to the event name, where all statements of the article to be tested are stored in a block chain;

the input module A30 is used for inputting each target sentence into a pre-training language model for training to obtain a general attribute;

and the output module A40 is used for acquiring an input preset problem, acquiring a special argument in each target statement according to the preset problem, and outputting the general attribute and the special argument.

Optionally, the first obtaining module a10 is further configured to:

carrying out event type classification on the title according to a pre-training language model, and determining a target event based on a classification result of the classification;

and determining the event name corresponding to the title according to the target event.

Optionally, the first obtaining module a10 is further configured to:

and extracting grammar corresponding to the target event from the title according to a preset syntax and semantic role labeling algorithm, and combining the grammar to generate an event name corresponding to the title.

Optionally, the second obtaining module a20 is further configured to:

sequencing each sentence according to the event name and a preset sequencing model;

and acquiring a preset number of target sentences in each sentence based on the sorted sorting result.

Optionally, the input module a30 is further configured to:

inputting each target sentence into a pre-training language model for training to obtain each training data;

and determining the training attributes of the target sentences in the training data, and acquiring the general attributes according to the training attributes.

Optionally, the input module a30 is further configured to:

and classifying the target sentences according to the training attributes, acquiring the common attributes of the target sentences of the same category, and taking the common attributes as general attributes.

Optionally, the output module a40 is further configured to:

and constructing special argument question and answer pair data according to the preset questions, extracting data in each target statement according to a preset reading understanding model and the special argument question and answer pair data, and taking the data as special arguments.

The steps implemented by each functional module of the event extraction device may refer to each embodiment of the event extraction method of the present invention, and are not described herein again.

The present invention also provides an event extraction device, including: a memory, a processor, and an event extraction program stored on the memory; the processor is configured to execute the event extraction program to implement the steps of the embodiments of the event extraction method.

The present invention also provides a computer readable storage medium storing one or more programs which are also executable by one or more processors for implementing the steps of the embodiments of the above-described event extraction method.

The specific implementation of the computer-readable storage medium of the present invention is substantially the same as the embodiments of the event extraction method, and is not described herein again.

The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.

It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.

The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.

Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.

The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

14页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:基于注意力分布已知的抽象式神经网络生成摘要的方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!